Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vendors~videojs.js « js - github.com/nextcloud/files_videoplayer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9cc31ce67fcb7c4cb2d1c993b264aeac27b7a97 (plain)
1
2
3
4
5
6
7
8
9
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[,,,function(e,t,n){var i=n(54);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(17)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){"use strict";n.r(t);var i=n(18),r=n.n(i),a=n(19),s=n.n(a),o=n(23),l=n.n(o),u=n(24),c=n.n(u),d=n(31),h=n.n(d),p=n(7),f=n.n(p),m=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},y=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},b=function(){function e(){m(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},e.prototype.trigger=function(e){var t=this.listeners[e],n=void 0,i=void 0,r=void 0;if(t)if(2===arguments.length)for(i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),i=t.length,n=0;n<i;++n)t[n].apply(this,r)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},e}(),_=function(e){function t(){m(this,t);var n=y(this,e.call(this));return n.buffer="",n}return v(t,e),t.prototype.push=function(e){var t=void 0;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(b),T=function(e){for(var t=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},i=t.length,r=void 0;i--;)""!==t[i]&&((r=/([^=]*)=(.*)/.exec(t[i]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),n[r[0]]=r[1]);return n},S=function(e){function t(){m(this,t);var n=y(this,e.call(this));return n.customParsers=[],n}return v(t,e),t.prototype.push=function(e){var t=void 0,n=void 0;if(0!==(e=e.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===e[0]){for(var i=0;i<this.customParsers.length;i++)if(this.customParsers[i].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void this.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void this.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void this.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var r=T(t[1]);if(r.URI&&(n.uri=r.URI),r.BYTERANGE){var a=r.BYTERANGE.split("@"),s=a[0],o=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),o&&(n.byterange.offset=parseInt(o,10))}}this.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=T(t[1]),n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION.split("x"),u={};l[0]&&(u.width=parseInt(l[0],10)),l[1]&&(u.height=parseInt(l[1],10)),n.attributes.RESOLUTION=u}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))}this.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=T(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=T(t[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(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=T(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)})}else this.trigger("data",{type:"uri",uri:e})},t.prototype.addParser=function(e){var t=this,n=e.expression,i=e.customType,r=e.dataParser,a=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:i,segment:a}),!0})},t}(b),k=function(e){function t(){m(this,t);var n=y(this,e.call(this));n.lineStream=new _,n.parseStream=new S,n.lineStream.pipe(n.parseStream);var i=n,r=[],a={},s=void 0,o=void 0,l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},u=0;return n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},n.parseStream.on("data",function(e){var t=void 0,n=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(a.byterange=t,t.offset=e.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"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(o.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):o=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,u=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(a.attributes||(a.attributes={}),g(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],(n={default:/yes/i.test(e.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(n.language=e.attributes.LANGUAGE),e.attributes.URI&&(n.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(n.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(n.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(n.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=n}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){u+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||function(){}).call(i)},uri:function(){a.uri=e.uri,r.push(a),!this.manifest.targetDuration||"duration"in a||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),o&&(a.key=o),a.timeline=u,s&&(a.map=s),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)}),n}return v(t,e),t.prototype.push=function(e){this.lineStream.push(e)},t.prototype.end=function(){this.lineStream.push("\n")},t.prototype.addParser=function(e){this.parseStream.addParser(e)},t}(b),w=n(32),C=n.n(w),j=n(34),E=n(8),A=n.n(E),x=n(36),L=n(50),O=n.n(L);var U=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},P=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),I=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},D=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],i=t[4],r=n[4],a=void 0,s=void 0,o=void 0,l=[],u=[],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!i[s];s^=c||1,o=u[o]||1)for(h=(h=o^o<<1^o<<2^o<<3^o<<4)>>8^255&h^99,i[s]=h,r[h]=s,f=16843009*l[d=l[c=l[s]]]^65537*d^257*c^16843008*s,p=257*l[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,n[a][h]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),n[a]=n[a].slice(0);return e},R=null,M=function(){function e(t){U(this,e),R||(R=D()),this._tables=[[R[0][0].slice(),R[0][1].slice(),R[0][2].slice(),R[0][3].slice(),R[0][4].slice()],[R[1][0].slice(),R[1][1].slice(),R[1][2].slice(),R[1][3].slice(),R[1][4].slice()]];var n=void 0,i=void 0,r=void 0,a=void 0,s=void 0,o=this._tables[0][4],l=this._tables[1],u=t.length,c=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(a=t.slice(0),s=[],this._key=[a,s],n=u;n<4*u+28;n++)r=a[n-1],(n%u==0||8===u&&n%u==4)&&(r=o[r>>>24]<<24^o[r>>16&255]<<16^o[r>>8&255]<<8^o[255&r],n%u==0&&(r=r<<8^r>>>24^c<<24,c=c<<1^283*(c>>7))),a[n]=a[n-u]^r;for(i=0;n;i++,n--)r=a[3&i?n:n-4],s[i]=n<=4||i<4?r:l[0][o[r>>>24]]^l[1][o[r>>16&255]]^l[2][o[r>>8&255]]^l[3][o[255&r]]}return e.prototype.decrypt=function(e,t,n,i,r,a){var s=this._key[1],o=e^s[0],l=i^s[1],u=n^s[2],c=t^s[3],d=void 0,h=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,v=this._tables[1],y=v[0],b=v[1],_=v[2],T=v[3],S=v[4];for(m=0;m<f;m++)d=y[o>>>24]^b[l>>16&255]^_[u>>8&255]^T[255&c]^s[g],h=y[l>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&o]^s[g+1],p=y[u>>>24]^b[c>>16&255]^_[o>>8&255]^T[255&l]^s[g+2],c=y[c>>>24]^b[o>>16&255]^_[l>>8&255]^T[255&u]^s[g+3],g+=4,o=d,l=h,u=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[l>>16&255]<<16^S[u>>8&255]<<8^S[255&c]^s[g++],d=o,o=l,l=u,u=c,c=d},e}(),B=function(){function e(){U(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},e}(),N=function(e){function t(){U(this,t);var n=I(this,e.call(this,B));return n.jobs=[],n.delay=1,n.timeout_=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},t.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(B),F=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},V=function(e,t,n){var i=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new M(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,m=void 0;for(o=n[0],l=n[1],u=n[2],c=n[3],m=0;m<i.length;m+=4)d=F(i[m]),h=F(i[m+1]),p=F(i[m+2]),f=F(i[m+3]),r.decrypt(d,h,p,f,s,m),s[m]=F(s[m]^o),s[m+1]=F(s[m+1]^l),s[m+2]=F(s[m+2]^u),s[m+3]=F(s[m+3]^c),o=d,l=h,u=p,c=f;return a},z=function(){function e(t,n,i,r){U(this,e);var a=e.STEP,s=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new N,this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),n,i,o)),l=a;l<s.length;l+=a)i=new Uint32Array([F(s[l-4]),F(s[l-3]),F(s[l-2]),F(s[l-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),n,i,o));this.asyncStream_.push(function(){var e;r(null,(e=o).subarray(0,e.byteLength-e[e.byteLength-1]))})}return e.prototype.decryptChunk_=function(e,t,n,i){return function(){var r=V(e,t,n);i.set(r,e.byteOffset)}},P(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}(),H="7.4.1";function q(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e,t,n){return(W=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&G(r,n.prototype),r}).apply(null,arguments)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X(e,t){return t||(t=e.slice(0)),e.raw=t,e}var J=[],K=function(e,t){return function(n,i,r){var a=t.levels[i],s=new RegExp("^("+a+")$");if("log"!==n&&r.unshift(n.toUpperCase()+":"),r.unshift(e+":"),J&&J.push([].concat(r)),f.a.console){var o=f.a.console[n];o||"debug"!==n||(o=f.a.console.info||f.a.console.log),o&&a&&s.test(n)&&o[Array.isArray(r)?"apply":"call"](f.a.console,r)}}};var Q=function e(t){var n,i="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n("log",i,t)};return n=K(t,r),r.createLogger=function(n){return e(t+": "+n)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(r.history=function(){return J?[].concat(J):[]}).filter=function(e){return(J||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},r.history.clear=function(){J&&(J.length=0)},r.history.disable=function(){null!==J&&(J.length=0,J=null)},r.history.enable=function(){null===J&&(J=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("error",i,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("warn",i,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("debug",i,t)},r}("VIDEOJS"),Z=Q.createLogger,$=Object.prototype.toString,ee=function(e){return ie(e)?Object.keys(e):[]};function te(e,t){ee(e).forEach(function(n){return t(e[n],n)})}function ne(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach(function(t){t&&te(t,function(t,n){e[n]=t})}),e)}function ie(e){return!!e&&"object"==typeof e}function re(e){return ie(e)&&"[object Object]"===$.call(e)&&e.constructor===Object}function ae(e,t){if(!e||!t)return"";if("function"==typeof f.a.getComputedStyle){var n=f.a.getComputedStyle(e);return n?n[t]:""}return""}function se(){var e=X(["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 ","."]);return se=function(){return e},e}function oe(e){return"string"==typeof e&&/\S/.test(e)}function le(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function ue(){return C.a===f.a.document}function ce(e){return ie(e)&&1===e.nodeType}function de(){try{return f.a.parent!==f.a.self}catch(e){return!0}}function he(e){return function(t,n){if(!oe(t))return C.a[e](null);oe(n)&&(n=C.a.querySelector(n));var i=ce(n)?n:C.a;return i[e]&&i[e](t)}}function pe(e,t,n,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=C.a.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Q.warn(l()(se(),e,n)),r.setAttribute(e,n)):"textContent"===e?fe(r,n):r[e]=n}),Object.getOwnPropertyNames(n).forEach(function(e){r.setAttribute(e,n[e])}),i&&Pe(r,i),r}function fe(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function me(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ge(e,t){return le(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function ve(e,t){return e.classList?e.classList.add(t):ge(e,t)||(e.className=(e.className+" "+t).trim()),e}function ye(e,t){return e.classList?e.classList.remove(t):(le(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function be(e,t,n){var i=ge(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n!==i)return n?ve(e,t):ye(e,t),e}function _e(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)})}function Te(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,r=i.length-1;r>=0;r--){var a=i[r].name,s=i[r].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function Se(e,t){return e.getAttribute(t)}function ke(e,t,n){e.setAttribute(t,n)}function we(e,t){e.removeAttribute(t)}function Ce(){C.a.body.focus(),C.a.onselectstart=function(){return!1}}function je(){C.a.onselectstart=function(){return!0}}function Ee(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(n[e]=t[e])}),n.height||(n.height=parseFloat(ae(e,"height"))),n.width||(n.width=parseFloat(ae(e,"width"))),n}}function Ae(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=C.a.documentElement,i=C.a.body,r=n.clientLeft||i.clientLeft||0,a=f.a.pageXOffset||i.scrollLeft,s=t.left+a-r,o=n.clientTop||i.clientTop||0,l=f.a.pageYOffset||i.scrollTop,u=t.top+l-o;return{left:Math.round(s),top:Math.round(u)}}function xe(e,t){var n={},i=Ae(e),r=e.offsetWidth,a=e.offsetHeight,s=i.top,o=i.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+a)/a)),n.x=Math.max(0,Math.min(1,(u-o)/r)),n}function Le(e){return ie(e)&&3===e.nodeType}function Oe(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ue(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),ce(e)||Le(e)?e:"string"==typeof e&&/\S/.test(e)?C.a.createTextNode(e):void 0}).filter(function(e){return e})}function Pe(e,t){return Ue(t).forEach(function(t){return e.appendChild(t)}),e}function Ie(e,t){return Pe(Oe(e),t)}function De(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||0===e.button&&1===e.buttons)}var Re=he("querySelector"),Me=he("querySelectorAll"),Be=Object.freeze({isReal:ue,isEl:ce,isInFrame:de,createEl:pe,textContent:fe,prependTo:me,hasClass:ge,addClass:ve,removeClass:ye,toggleClass:be,setAttributes:_e,getAttributes:Te,getAttribute:Se,setAttribute:ke,removeAttribute:we,blockTextSelection:Ce,unblockTextSelection:je,getBoundingClientRect:Ee,findPosition:Ae,getPointerPosition:xe,isTextNode:Le,emptyEl:Oe,normalizeContent:Ue,appendContent:Pe,insertContent:Ie,isSingleLeftClick:De,$:Re,$$:Me}),Ne=1;function Fe(){return Ne++}var Ve={},ze="vdata"+(new Date).getTime();function He(e){var t=e[ze];return t||(t=e[ze]=Fe()),Ve[t]||(Ve[t]={}),Ve[t]}function qe(e){var t=e[ze];return!!t&&!!Object.getOwnPropertyNames(Ve[t]).length}function Ge(e){var t=e[ze];if(t){delete Ve[t];try{delete e[ze]}catch(t){e.removeAttribute?e.removeAttribute(ze):e[ze]=null}}}function We(e,t){var n=He(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ge(e)}function Ye(e,t,n,i){n.forEach(function(n){e(t,n,i)})}function Xe(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var i=e||f.a.event;for(var r in e={},i)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&i.preventDefault||(e[r]=i[r]));if(e.target||(e.target=e.srcElement||C.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var a=C.a.documentElement,s=C.a.body;e.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var Je=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){Je=!0}});f.a.addEventListener("test",null,e),f.a.removeEventListener("test",null,e)}catch(e){}}();var Ke=["touchstart","touchmove"];function Qe(e,t,n){if(Array.isArray(t))return Ye(Qe,e,t,n);var i=He(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=Fe()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=Xe(t);var r=i.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;s<o&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,n)}catch(e){Q.error(e)}}}),1===i.handlers[t].length)if(e.addEventListener){var r=!1;Je&&Ke.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,i.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function Ze(e,t,n){if(qe(e)){var i=He(e);if(i.handlers){if(Array.isArray(t))return Ye(Ze,e,t,n);var r=function(e,t){i.handlers[t]=[],We(e,t)};if(void 0!==t){var a=i.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s<a.length;s++)a[s].guid===n.guid&&a.splice(s--,1);We(e,t)}else r(e,t)}else for(var o in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},o)&&r(e,o)}}}function $e(e,t,n){var i=qe(e)?He(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Xe(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)$e.call(null,r,t,n);else if(!r&&!t.defaultPrevented){var a=He(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function et(e,t,n){if(Array.isArray(t))return Ye(et,e,t,n);var i=function i(){Ze(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||Fe(),Qe(e,t,i)}var tt,nt=Object.freeze({fixEvent:Xe,on:Qe,off:Ze,trigger:$e,one:et}),it=!1,rt=function(){if(ue()&&!1!==tt.options.autoSetup){var e=Array.prototype.slice.call(C.a.getElementsByTagName("video")),t=Array.prototype.slice.call(C.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(C.a.getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(var r=0,a=i.length;r<a;r++){var s=i[r];if(!s||!s.getAttribute){at(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&tt(s)}else it||at(1)}};function at(e,t){t&&(tt=t),f.a.setTimeout(rt,e)}ue()&&"complete"===C.a.readyState?it=!0:et(f.a,"load",function(){it=!0});var st,ot=function(e){var t=C.a.createElement("style");return t.className=e,t},lt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},ut=function(e,t,n){t.guid||(t.guid=Fe());var i=function(){return t.apply(e,arguments)};return i.guid=n?n+"_"+t.guid:t.guid,i},ct=function(e,t){var n=Date.now();return function(){var i=Date.now();i-n>=t&&(e.apply(void 0,arguments),n=i)}},dt=function(e,t,n,i){var r;void 0===i&&(i=f.a);var a=function(){var a=this,s=arguments,o=function(){r=null,o=null,n||e.apply(a,s)};!r&&n&&e.apply(a,s),i.clearTimeout(r),r=i.setTimeout(o,t)};return a.cancel=function(){i.clearTimeout(r),r=null},a},ht=function(){};ht.prototype.allowedEvents_={},ht.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Qe(this,e,t),this.addEventListener=n},ht.prototype.addEventListener=ht.prototype.on,ht.prototype.off=function(e,t){Ze(this,e,t)},ht.prototype.removeEventListener=ht.prototype.off,ht.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},et(this,e,t),this.addEventListener=n},ht.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Xe(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),$e(this,e)},ht.prototype.dispatchEvent=ht.prototype.trigger,ht.prototype.queueTrigger=function(e){var t=this;st||(st=new Map);var n=e.type||e,i=st.get(this);i||(i=new Map,st.set(this,i));var r=i.get(n);i.delete(n),f.a.clearTimeout(r);var a=f.a.setTimeout(function(){0===i.size&&(i=null,st.delete(t)),t.trigger(e)},0);i.set(n,a)};var pt=function(e){return e instanceof ht||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},ft=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},mt=function(e){if(!e.nodeName&&!pt(e))throw new Error("Invalid target; must be a DOM node or evented object.")},gt=function(e){if(!ft(e))throw new Error("Invalid event type; must be a non-empty string or array.")},vt=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},yt=function(e,t){var n,i,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],r=t[1]):(n=t[0],i=t[1],r=t[2]),mt(n),gt(i),vt(r),{isTargetingSelf:a,target:n,type:i,listener:r=ut(e,r)}},bt=function(e,t,n,i){mt(e),e.nodeName?nt[t](e,n,i):e[t](n,i)},_t={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=yt(this,n),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(bt(s,"on",o,l),!a){var u=function(){return e.off(s,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,bt(this,"on","dispose",u),bt(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=yt(this,n),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(a)bt(s,"one",o,l);else{var u=function t(){e.off(s,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];l.apply(null,i)};u.guid=l.guid,bt(s,"one",o,u)}},off:function(e,t,n){if(!e||ft(e))Ze(this.eventBusEl_,e,t);else{var i=e,r=t;mt(i),gt(r),vt(n),n=ut(this,n),this.off("dispose",n),i.nodeName?(Ze(i,r,n),Ze(i,"dispose",n)):pt(i)&&(i.off(r,n),i.off("dispose",n))}},trigger:function(e,t){return $e(this.eventBusEl_,e,t)}};function Tt(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=pe("span",{className:"vjs-event-bus"});return ne(e,_t),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),f.a.setTimeout(function(){e.eventBusEl_=null},0)}),e}var St={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),te(e,function(e,i){n.state[i]!==e&&((t=t||{})[i]={from:n.state[i],to:e}),n.state[i]=e}),t&&pt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function kt(e,t){return ne(e,St),e.state=ne({},e.state,t),"function"==typeof e.handleStateChanged&&pt(e)&&e.on("statechanged",e.handleStateChanged),e}function wt(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function Ct(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){t&&te(t,function(t,n){re(t)?(re(e[n])||(e[n]={}),e[n]=Ct(e[n],t)):e[n]=t})}),e}var jt=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.options_=Ct({},this.options_),t=this.options_=Ct(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+Fe()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&Tt(this,{eventBusKey:this.el_?"el_":null}),kt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ge(this.el_),this.el_=null),this.player_=null},t.player=function(){return this.player_},t.options=function(e){return Q.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=Ct(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return pe(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],s=i&&i.split("-")[0],o=r&&r[s],l=n;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r})),l},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return e=wt(e),this.childNameIndex_[e]},t.addChild=function(t,n,i){var r,a;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof t){a=wt(t);var s=n.componentClass||a;n.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,n)}else r=t;if(this.children_.splice(i,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&wt(r.name()))&&(this.childNameIndex_[a]=r),"function"==typeof r.el&&r.el()){var l=this.contentEl().children[i]||null;this.contentEl().insertBefore(r.el(),l)}return r},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var i,r=this.options_,a=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(e){return!i.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(e){var i,r;return"string"==typeof e?r=n[i=e]||t.options_[i]||{}:(i=e.name,r=e),{name:i,opts:r}}).filter(function(t){var n=e.getComponent(t.opts.componentClass||wt(t.name));return n&&!a.isTech(n)}).forEach(function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var a=t.addChild(n,i);a&&(t[n]=a)}})}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},t.$=function(e,t){return Re(e,t||this.contentEl())},t.$$=function(e,t){return Me(e,t||this.contentEl())},t.hasClass=function(e){return ge(this.el_,e)},t.addClass=function(e){ve(this.el_,e)},t.removeClass=function(e){ye(this.el_,e)},t.toggleClass=function(e,t){be(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return Se(this.el_,e)},t.setAttribute=function(e,t){ke(this.el_,e,t)},t.removeAttribute=function(e){we(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+wt(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof f.a.getComputedStyle){var n=f.a.getComputedStyle(this.el_);t=n.getPropertyValue(e)||n[e]}if(0===(t=parseFloat(t))){var i="offset"+wt(e);t=this.el_[i]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",function(i){1===i.touches.length&&(n={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},t=(new Date).getTime(),e=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)e=!1;else if(n){var i=t.touches[0].pageX-n.pageX,r=t.touches[0].pageY-n.pageY;Math.sqrt(i*i+r*r)>10&&(e=!1)}});var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",function(i){(n=null,!0===e)&&((new Date).getTime()-t<200&&(i.preventDefault(),this.trigger("tap")))})},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=ut(this.player(),this.player().reportUserActivity);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.setTimeout=function(e,t){var n,i,r=this;return e=ut(this,e),n=f.a.setTimeout(function(){r.off("dispose",i),e()},t),(i=function(){return r.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",i),n},t.clearTimeout=function(e){f.a.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},t.setInterval=function(e,t){var n=this;e=ut(this,e);var i=f.a.setInterval(e,t),r=function(){return n.clearInterval(i)};return r.guid="vjs-interval-"+i,this.on("dispose",r),i},t.clearInterval=function(e){f.a.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},t.requestAnimationFrame=function(e){var t,n,i=this;return this.supportsRaf_?(e=ut(this,e),t=f.a.requestAnimationFrame(function(){i.off("dispose",n),e()}),(n=function(){return i.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",n),t):this.setTimeout(e,1e3/60)},t.cancelAnimationFrame=function(e){if(this.supportsRaf_){f.a.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,r=e.getComponent("Tech"),a=r&&r.isTech(n),s=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!s)throw i=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=wt(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map(function(e){return l[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,n},e.getComponent=function(t){if(t)return t=wt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();jt.prototype.supportsRaf_="function"==typeof f.a.requestAnimationFrame&&"function"==typeof f.a.cancelAnimationFrame,jt.registerComponent("Component",jt);var Et,At=f.a.navigator&&f.a.navigator.userAgent||"",xt=/AppleWebKit\/([\d.]+)/i.exec(At),Lt=xt?parseFloat(xt.pop()):null,Ot=/iPad/i.test(At),Ut=/iPhone/i.test(At)&&!Ot,Pt=/iPod/i.test(At),It=Ut||Ot||Pt,Dt=(Et=At.match(/OS (\d+)_/i))&&Et[1]?Et[1]:null,Rt=/Android/i.test(At),Mt=function(){var e=At.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Bt=Rt&&Mt<5&&Lt<537,Nt=/Firefox/i.test(At),Ft=/Edge/i.test(At),Vt=!Ft&&(/Chrome/i.test(At)||/CriOS/i.test(At)),zt=function(){var e=At.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ht=function(){var e=/MSIE\s(\d+)\.\d/.exec(At),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(At)&&/rv:11.0/.test(At)&&(t=11),t}(),qt=/Safari/i.test(At)&&!Vt&&!Rt&&!Ft,Gt=(qt||It)&&!Vt,Wt=ue()&&("ontouchstart"in f.a||f.a.navigator.maxTouchPoints||f.a.DocumentTouch&&f.a.document instanceof f.a.DocumentTouch),Yt=Object.freeze({IS_IPAD:Ot,IS_IPHONE:Ut,IS_IPOD:Pt,IS_IOS:It,IOS_VERSION:Dt,IS_ANDROID:Rt,ANDROID_VERSION:Mt,IS_NATIVE_ANDROID:Bt,IS_FIREFOX:Nt,IS_EDGE:Ft,IS_CHROME:Vt,CHROME_VERSION:zt,IE_VERSION:Ht,IS_SAFARI:qt,IS_ANY_SAFARI:Gt,TOUCH_ENABLED:Wt});function Xt(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function Jt(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Xt.bind(null,"start",0,e),end:Xt.bind(null,"end",1,e)}}function Kt(e,t){return Array.isArray(e)?Jt(e):void 0===e||void 0===t?Jt():Jt([[e,t]])}function Qt(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=Kt(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(i=e.end(a))>t&&(i=t),r+=i-n;return r/t}for(var Zt,$t={},en=[["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"]],tn=en[0],nn=0;nn<en.length;nn++)if(en[nn][1]in C.a){Zt=en[nn];break}if(Zt)for(var rn=0;rn<Zt.length;rn++)$t[tn[rn]]=Zt[rn];function an(e){if(e instanceof an)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:ie(e)&&("number"==typeof e.code&&(this.code=e.code),ne(this,e)),this.message||(this.message=an.defaultMessages[this.code]||"")}an.prototype.code=0,an.prototype.message="",an.prototype.status=null,an.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],an.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 sn=0;sn<an.errorTypes.length;sn++)an[an.errorTypes[sn]]=sn,an.prototype[an.errorTypes[sn]]=sn;function on(e){return null!=e&&"function"==typeof e.then}function ln(e){on(e)&&e.then(null,function(e){})}var un=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,n,i){return e[n]&&(t[n]=e[n]),t},{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})},cn=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=un(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===n.indexOf(e)}).map(un))},dn=function(e,t){return e.forEach(function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return n.addCue(e)})}),t.textTracks()},hn="vjs-modal-dialog",pn=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=pe("div",{className:hn+"-content"},{role:"document"}),i.descEl_=pe("p",{className:hn+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),fe(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return hn+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",ut(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",ut(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Ie(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},n.empty=function(){this.trigger("beforemodalempty"),Oe(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=C.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(C.a,"keydown",this.handleKeyDown))},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(C.a,"keydown",this.handleKeyDown)},n.handleKeyDown=function(e){if(9===e.which){for(var t,n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=0;r<n.length;r++)if(i===n[r]){t=r;break}C.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof f.a.HTMLAnchorElement||e instanceof f.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof f.a.HTMLInputElement||e instanceof f.a.HTMLSelectElement||e instanceof f.a.HTMLTextAreaElement||e instanceof f.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof f.a.HTMLIFrameElement||e instanceof f.a.HTMLObjectElement||e instanceof f.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},t}(jt);pn.prototype.options_={pauseOnOpen:!0,temporary:!0},jt.registerComponent("ModalDialog",pn);var fn=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(Y(Y(n)),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)n.addTrack(t[i]);return n}q(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},n.removeTrack=function(e){for(var t,n=0,i=this.length;n<i;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack"})},n.getTrackById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},t}(ht);for(var mn in fn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},fn.prototype.allowedEvents_)fn.prototype["on"+mn]=null;var gn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},vn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].enabled){gn(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}return q(t,e),t.prototype.addTrack=function(t){var n=this;t.enabled&&gn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,gn(n,t),n.changing_=!1,n.trigger("change"))})},t}(fn),yn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},bn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].selected){yn(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(Y(Y(n)),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}return q(t,e),t.prototype.addTrack=function(t){var n=this;t.selected&&yn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,yn(n,t),n.changing_=!1,n.trigger("change"))})},t}(fn),_n=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",ut(this,function(){this.queueTrigger("change")}));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",ut(this,function(){this.trigger("selectedlanguagechange")}))},t}(fn),Tn=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),Sn=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,i=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<i)for(n=t;n<i;n++)r.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},e}(),kn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},wn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Cn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},jn={disabled:"disabled",hidden:"hidden",showing:"showing"},En=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var i={id:t.id||"vjs_track_"+Fe(),kind:t.kind||"",label:t.label||"",language:t.language||""},r=function(e){Object.defineProperty(Y(Y(n)),e,{get:function(){return i[e]},set:function(){}})};for(var a in i)r(a);return n}return q(t,e),t}(ht),An=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=C.a.createElement("a");n.href=e;var i,r=""===n.host&&"file:"!==n.protocol;r&&((i=C.a.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),C.a.body.appendChild(i));for(var a={},s=0;s<t.length;s++)a[t[s]]=n[t[s]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=f.a.location.protocol),r&&C.a.body.removeChild(i),a},xn=function(e){if(!e.match(/^https?:\/\//)){var t=C.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Ln=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},On=function(e){var t=f.a.location,n=An(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Un=Object.freeze({parseUrl:An,getAbsoluteURL:xn,getFileExtension:Ln,isCrossOrigin:On}),Pn=function(e,t){var n=new f.a.WebVTT.Parser(f.a,f.a.vttjs,f.a.WebVTT.StringDecoder()),i=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){i.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),i.length>0&&(f.a.console&&f.a.console.groupCollapsed&&f.a.console.groupCollapsed("Text Track parsing errors for "+t.src),i.forEach(function(e){return Q.error(e)}),f.a.console&&f.a.console.groupEnd&&f.a.console.groupEnd()),n.flush()},In=function(e,t){var n={uri:e},i=On(e);i&&(n.cors=i),c()(n,ut(this,function(e,n,i){if(e)return Q.error(e,n);if(t.loaded_=!0,"function"!=typeof f.a.WebVTT){if(t.tech_){var r=function(){return Pn(i,t)};t.tech_.on("vttjsloaded",r),t.tech_.on("vttjserror",function(){Q.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",r)})}}else Pn(i,t)}))},Dn=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=Ct(t,{kind:Cn[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=jn[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=e.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[];var s=new Sn(n.cues_),o=new Sn(n.activeCues_),l=!1,u=ut(Y(Y(n)),function(){this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1)});return"disabled"!==r&&n.tech_.ready(function(){n.tech_.on("timeupdate",u)},!0),Object.defineProperties(Y(Y(n)),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return r},set:function(e){var t=this;jn[e]&&("disabled"!==(r=e)?this.tech_.ready(function(){t.tech_.on("timeupdate",u)},!0):this.tech_.off("timeupdate",u),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 o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n<i;n++){var r=this.cues[n];r.startTime<=e&&r.endTime>=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),i.src?(n.src=i.src,In(i.src,Y(Y(n)))):n.loaded_=!0,n}q(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(f.a.vttjs&&!(e instanceof f.a.vttjs.VTTCue)){for(var n in t=new f.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var i=this.tech_.textTracks(),r=0;r<i.length;r++)i[r]!==this&&i[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(En);Dn.prototype.allowedEvents_={cuechange:"cuechange"};var Rn=function(e){function t(t){var n;void 0===t&&(t={});var i=Ct(t,{kind:wn[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(Y(Y(n)),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),i.enabled&&(n.enabled=i.enabled),n.loaded_=!0,n}return q(t,e),t}(En),Mn=function(e){function t(t){var n;void 0===t&&(t={});var i=Ct(t,{kind:kn[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(Y(Y(n)),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),i.selected&&(n.selected=i.selected),n}return q(t,e),t}(En),Bn=0,Nn=2,Fn=function(e){function t(t){var n,i;void 0===t&&(t={}),n=e.call(this)||this;var r=new Dn(t);return n.kind=r.kind,n.src=r.src,n.srclang=r.language,n.label=r.label,n.default=r.default,Object.defineProperties(Y(Y(n)),{readyState:{get:function(){return i}},track:{get:function(){return r}}}),i=Bn,r.addEventListener("loadeddata",function(){i=Nn,n.trigger({type:"load",target:Y(Y(n))})}),n}return q(t,e),t}(ht);Fn.prototype.allowedEvents_={load:"load"},Fn.NONE=Bn,Fn.LOADING=1,Fn.LOADED=Nn,Fn.ERROR=3;var Vn={audio:{ListClass:vn,TrackClass:Rn,capitalName:"Audio"},video:{ListClass:bn,TrackClass:Mn,capitalName:"Video"},text:{ListClass:_n,TrackClass:Dn,capitalName:"Text"}};Object.keys(Vn).forEach(function(e){Vn[e].getterName=e+"Tracks",Vn[e].privateName=e+"Tracks_"});var zn={remoteText:{ListClass:_n,TrackClass:Dn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Tn,TrackClass:Fn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Hn=Ct(Vn,zn);zn.names=Object.keys(zn),Vn.names=Object.keys(Vn),Hn.names=[].concat(zn.names).concat(Vn.names);var qn=function(e){function t(t,n){var i;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(i=e.call(this,null,t,n)||this).hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),Hn.names.forEach(function(e){var n=Hn[e];t&&t[n.getterName]&&(i[n.privateName]=t[n.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===t["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new Hn.text.ListClass,i.initTrackListeners(),t.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}q(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ut(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return Kt(0,0)},n.bufferedPercent=function(){return Qt(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Vn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach(function(e){for(var n=t[e+"Tracks"]()||[],i=n.length;i--;){var r=n[i];"text"===e&&t.removeRemoteTextTrack(r),n.removeTrack(r)}})},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.error=function(e){return void 0!==e&&(this.error_=new an(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Kt(0,0):Kt()},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Vn.names.forEach(function(t){var n=Vn[t],i=function(){e.trigger(t+"trackchange")},r=e[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),e.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})},n.addWebVttScript_=function(){var e=this;if(!f.a.WebVTT)if(C.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&re(s.a)&&Object.keys(s.a).length>0)return void this.trigger("vttjsloaded");var t=C.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),f.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",function(){n.off("addtrack",i),n.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}})},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;var s=new Hn.text.TrackClass(r);return a.addTrack(s),s}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Ct(e,{tech:this});return new zn.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var i=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Q.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!0!==t&&this.ready(function(){return n.autoRemoteTextTracks_.addTrack(i.track)}),i},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=wt(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=wt(e),t.techs_&&t.techs_[e]?t.techs_[e]:f.a&&f.a.videojs&&f.a.videojs[e]?(Q.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),f.a.videojs[e]):void 0},t}(jt);Hn.names.forEach(function(e){var t=Hn[e];qn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),qn.prototype.featuresVolumeControl=!0,qn.prototype.featuresMuteControl=!0,qn.prototype.featuresFullscreenResize=!1,qn.prototype.featuresPlaybackRate=!1,qn.prototype.featuresProgressEvents=!1,qn.prototype.featuresSourceset=!1,qn.prototype.featuresTimeupdateEvents=!1,qn.prototype.featuresNativeTextTracks=!1,qn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var i=e.sourceHandlers;i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){for(var n,i=e.sourceHandlers||[],r=0;r<i.length;r++)if(n=i[r].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var i=e.sourceHandlers||[],r=0;r<i.length;r++)if(i[r].canHandleSource(t,n))return i[r];return null},e.canPlaySource=function(t,n){var i=e.selectSourceHandler(t,n);return i?i.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:Q.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.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)}},jt.registerComponent("Tech",qn),qn.registerTech("Tech",qn),qn.defaultTechOrder_=[];var Gn={},Wn={},Yn={};function Xn(e,t,n){e.setTimeout(function(){return function e(t,n,i,r,a,s){void 0===t&&(t={});void 0===n&&(n=[]);void 0===a&&(a=[]);void 0===s&&(s=!1);var o=n,l=o[0],u=o.slice(1);if("string"==typeof l)e(t,Gn[l],i,r,a,s);else if(l){var c=function(e,t){var n=Wn[e.id()],i=null;if(null==n)return i=t(e),Wn[e.id()]=[[t,i]],i;for(var r=0;r<n.length;r++){var a=n[r],s=a[0],o=a[1];s===t&&(i=o)}null===i&&(i=t(e),n.push([t,i]));return i}(r,l);if(!c.setSource)return a.push(c),e(t,u,i,r,a,s);c.setSource(ne({},t),function(n,o){if(n)return e(t,u,i,r,a,s);a.push(c),e(o,t.type===o.type?u:Gn[o.type],i,r,a,s)})}else u.length?e(t,u,i,r,a,s):s?i(t,a):e(t,Gn["*"],i,r,a,!0)}(t,Gn[t.type],n,e)},1)}function Jn(e,t,n,i){void 0===i&&(i=null);var r="call"+wt(n),a=e.reduce($n(r),i),s=a===Yn,o=s?null:t[n](a);return function(e,t,n,i){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](i,n)}}(e,n,o,s),o}var Kn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Qn={setCurrentTime:1},Zn={play:1,pause:1};function $n(e){return function(t,n){return t===Yn?Yn:n[e]?n[e](t):t}}var ei={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"},ti=function(e){void 0===e&&(e="");var t=Ln(e);return ei[t.toLowerCase()]||""};function ni(e){var t=ti(e.src);return!e.type&&t&&(e.type=t),e}var ii=function(e){function t(t,n,i){var r,a=Ct({createEl:!1},n);if(r=e.call(this,t,a,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s<o.length;s++){var l=wt(o[s]),u=qn.getTech(l);if(l||(u=jt.getComponent(l)),u&&u.isSupported()){t.loadTech_(l);break}}return r}return q(t,e),t}(jt);jt.registerComponent("MediaLoader",ii);var ri=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).emitTapEvents(),i.enable(),i}q(t,e);var n=t.prototype;return n.createEl=function(t,n,i){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n=ne({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Q.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=ne({role:"button"},i),this.tabIndex_=n.tabIndex;var r=e.prototype.createEl.call(this,t,n,i);return this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=pe("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,fe(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.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))},n.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)},n.handleClick=function(e){},n.handleFocus=function(e){Qe(C.a,"keydown",ut(this,this.handleKeyPress))},n.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},n.handleBlur=function(e){Ze(C.a,"keydown",ut(this,this.handleKeyPress))},t}(jt);jt.registerComponent("ClickableComponent",ri);var ai=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update(),t.on("posterchange",ut(Y(Y(i)),i.update)),i}q(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},n.createEl=function(){return pe("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?ln(this.player_.play()):this.player_.pause())},t}(ri);jt.registerComponent("PosterImage",ai);var si={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function oi(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function li(e,t,n){try{e.style[t]=n}catch(e){return}}var ui=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var a=ut(Y(Y(r)),r.updateDisplay);return t.on("loadstart",ut(Y(Y(r)),r.toggleDisplay)),t.on("texttrackchange",a),t.on("loadedmetadata",ut(Y(Y(r)),r.preselectTrack)),t.ready(ut(Y(Y(r)),function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",a),t.on("playerresize",a),f.a.addEventListener("orientationchange",a),t.on("dispose",function(){return f.a.removeEventListener("orientationchange",a)});for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}})),r}q(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,i={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in i?o.kind===a.kind?n=o:n||(n=o):a&&!a.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in i&&!t&&(t=o):e=o)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof f.a.WebVTT&&f.a.WebVTT.processCues(f.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,n=null,i=e.length;i--;){var r=e[i];"showing"===r.mode&&("descriptions"===r.kind?t=r:n=r)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},n.updateForTrack=function(e){if("function"==typeof f.a.WebVTT&&e.activeCues){for(var t=[],n=0;n<e.activeCues.length;n++)t.push(e.activeCues[n]);if(f.a.WebVTT.processCues(f.a,t,this.el_),this.player_.textTrackSettings)for(var i=this.player_.textTrackSettings.getValues(),r=t.length;r--;){var a=t[r];if(a){var s=a.displayState;if(i.color&&(s.firstChild.style.color=i.color),i.textOpacity&&li(s.firstChild,"color",oi(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(s.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&li(s.firstChild,"backgroundColor",oi(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?li(s,"backgroundColor",oi(i.windowColor,i.windowOpacity)):s.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===i.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===i.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===i.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),i.fontPercent&&1!==i.fontPercent){var o=f.a.parseFloat(s.style.fontSize);s.style.fontSize=o*i.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=si[i.fontFamily])}}}},t}(jt);jt.registerComponent("TextTrackDisplay",ui);var ci=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),i=pe("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r},t}(jt);jt.registerComponent("LoadingSpinner",ci);var di=function(e){function t(){return e.apply(this,arguments)||this}q(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=ne({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=ne({type:"button"},n);var i=jt.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Q.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),jt.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(ri);jt.registerComponent("Button",di);var hi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)ln(t);else{var n=this.player_.getChild("controlBar"),i=n&&n.getChild("playToggle");if(i){var r=function(){return i.focus()};on(t)?t.then(r,function(){}):this.setTimeout(r,1)}else this.player_.focus()}},n.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(di);hi.prototype.controlText_="Play Video",jt.registerComponent("BigPlayButton",hi);var pi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).controlText(n&&n.controlText||i.localize("Close")),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(di);jt.registerComponent("CloseButton",pi);var fi=function(e){function t(t,n){var i;return void 0===n&&(n={}),i=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,i.on(t,"play",i.handlePlay),i.on(t,"pause",i.handlePause),n.replay&&i.on(t,"ended",i.handleEnded),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(di);fi.prototype.controlText_="Play",jt.registerComponent("PlayToggle",fi);var mi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=r>0||s>0?r+":":"")+(i=((r||a>=10)&&i<10?"0"+i:i)+":")+(n=n<10?"0"+n:n)},gi=mi;function vi(e,t){return void 0===t&&(t=e),gi(e,t)}var yi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).throttledUpdateContent=ct(ut(Y(Y(i)),i.updateContent),25),i.on(t,"timeupdate",i.throttledUpdateContent),i}q(t,e);var n=t.prototype;return n.createEl=function(t){var n=this.buildCSSClass(),i=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=pe("span",{className:n+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=C.a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},n.formatTime_=function(e){return vi(e)},n.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},n.updateContent=function(e){},t}(jt);yi.prototype.labelText_="Time",yi.prototype.controlText_="Time",jt.registerComponent("TimeDisplay",yi);var bi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"ended",i.handleEnded),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(yi);bi.prototype.labelText_="Current Time",bi.prototype.controlText_="Current Time",jt.registerComponent("CurrentTimeDisplay",bi);var _i=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",i.updateContent),i.on(t,"loadstart",i.updateContent),i.on(t,"loadedmetadata",i.throttledUpdateContent),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(yi);_i.prototype.labelText_="Duration",_i.prototype.controlText_="Duration",jt.registerComponent("DurationDisplay",_i);var Ti=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(jt);jt.registerComponent("TimeDivider",Ti);var Si=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",i.throttledUpdateContent),i.on(t,"ended",i.handleEnded),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},n.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(yi);Si.prototype.labelText_="Remaining Time",Si.prototype.controlText_="Remaining Time",jt.registerComponent("RemainingTimeDisplay",Si);var ki=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}q(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=pe("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(jt);jt.registerComponent("LiveDisplay",ki);var wi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus),i}q(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=pe("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(e){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(di);wi.prototype.controlText_="Seek to live, currently playing live",jt.registerComponent("SeekToLive",wi);var Ci=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}q(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.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)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=ne({tabIndex:0},n),i=ne({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Vt||e.preventDefault(),Ce(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;je(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",i=t.el().style;return this.vertical()?i.height=n:i.width=n,e}}},n.calculateDistance=function(e){var t=xe(this.el_,e);return this.vertical()?t.y:t.x},n.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},n.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},n.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},n.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(jt);jt.registerComponent("Slider",Ci);var ji=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).partEls_=[],i.on(t,"progress",i.update),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})},n.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this.player_.liveTracker,n=this.player_.buffered(),i=t&&t.isLive()?t.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),a=this.partEls_,s=this.$(".vjs-control-text-loaded-percentage"),o=function(e,t,n){var i=e/t||0;return i=100*(i>=1?1:i),n&&(i=i.toFixed(2)),i+"%"};this.el_.style.width=o(r,i),fe(s,o(r,i,!0));for(var l=0;l<n.length;l++){var u=n.start(l),c=n.end(l),d=a[l];d||(d=this.el_.appendChild(pe()),a[l]=d),d.style.left=o(u,r),d.style.width=o(c-u,r)}for(var h=a.length;h>n.length;h--)this.el_.removeChild(a[h-1]);a.length=n.length},t}(jt);jt.registerComponent("LoadProgressBar",ji);var Ei=function(e){function t(){return e.apply(this,arguments)||this}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var i=Ee(this.el_),r=Ee(this.player_.el()),a=e.width*t;if(r&&i){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),l=i.width/2;s<l?l+=l-s:o<l&&(l=o),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px",fe(this.el_,n)}},n.updateTime=function(e,t,n,i){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var a,s=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-t*o;a=(l<1?"":"-")+vi(l,o)}else a=vi(n,s);r.update(e,t,a),i&&i()})},t}(jt);jt.registerComponent("TimeTooltip",Ei);var Ai=function(e){function t(){return e.apply(this,arguments)||this}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(jt);Ai.prototype.options_={children:[]},It||Rt||Ai.prototype.options_.children.push("timeTooltip"),jt.registerComponent("PlayProgressBar",Ai);var xi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=ct(ut(Y(Y(i)),i.update),25),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,function(){n.el_.style.left=e.width*t+"px"})},t}(jt);xi.prototype.options_={children:["timeTooltip"]},jt.registerComponent("MouseTimeDisplay",xi);var Li=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).setEventHandlers_(),i}q(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update=ct(ut(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval(function(){e.requestAnimationFrame(function(){e.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(t){e.player_.liveTracker&&e.player_.liveTracker.isLive()&&"ended"!==t.type||e.clearInterval(e.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update_=function(e,t){var n=this.player_.liveTracker,i=this.player_.duration();n&&n.isLive()&&(i=this.player_.liveTracker.liveCurrentTime()),n&&n.seekableEnd()===1/0?this.disable():this.enable(),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[vi(e,i),vi(i,i)],"{1} of {2}")),this.bar.update(Ee(this.el_),t)},n.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.handleEnded=function(e){this.update_(this.player_.duration(),1)},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e>=1?1:e||0},n.handleMouseDown=function(t){De(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(De(e)){var t,n=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){var r=i.seekableStart(),a=i.liveCurrentTime();if((t=r+n*i.liveWindow())>=a&&(t=a),t<=r&&(t=r+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&ln(this.player_.play())},n.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Ci);Li.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},It||Rt||Li.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Li.prototype.playerEvent="timeupdate",jt.registerComponent("SeekBar",Li);var Oi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseMove=ct(ut(Y(Y(i)),i.handleMouseMove),25),i.throttledHandleMouseSeek=ct(ut(Y(Y(i)),i.handleMouseSeek),25),i.enable(),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),i=t.el(),r=Ee(i),a=xe(i,e).x;a>1?a=1:a<0&&(a=0),n&&n.update(r,a)}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(jt);Oi.prototype.options_={children:["seekBar"]},jt.registerComponent("ProgressControl",Oi);var Ui=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"fullscreenchange",i.handleFullscreenChange),!1===C.a[$t.fullscreenEnabled]&&i.disable(),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(di);Ui.prototype.controlText_="Fullscreen",jt.registerComponent("FullscreenToggle",Ui);var Pi=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},Ii=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(jt);jt.registerComponent("VolumeLevel",Ii);var Di=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on("slideractive",i.updateLastVolume_),i.on(t,"volumechange",i.updateARIAAttributes),t.ready(function(){return i.updateARIAAttributes()}),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){De(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){De(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},t}(Ci);Di.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Di.prototype.playerEvent="volumechange",jt.registerComponent("VolumeBar",Di);var Ri=function(e){function t(t,n){var i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||re(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),i=e.call(this,t,n)||this,Pi(Y(Y(i)),t),i.throttledHandleMouseMove=ct(ut(Y(Y(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}q(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(jt);Ri.prototype.options_={children:["volumeBar"]},jt.registerComponent("VolumeControl",Ri);var Mi=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},Bi=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,Mi(Y(Y(i)),t),i.on(t,["loadstart","volumechange"],i.update),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var i=n<.1?.1:n;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;It&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)ye(this.el_,"vjs-vol-"+n);ve(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(di);Bi.prototype.controlText_="Mute",jt.registerComponent("MuteToggle",Bi);var Ni=function(e){function t(t,n){var i;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||re(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(i=e.call(this,t,n)||this).on(t,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}q(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.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")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(jt);Ni.prototype.options_={children:["muteToggle","volumeControl"]},jt.registerComponent("VolumePanel",Ni);var Fi=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,n&&(i.menuButton_=n.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}q(t,e);var n=t.prototype;return n.addItem=function(e){this.addChild(e),e.on("blur",ut(this,this.handleBlur)),e.on(["tap","click"],ut(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=pe(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Qe(n,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),n},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||C.a.activeElement;if(!this.children().some(function(e){return e.el()===t})){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(jt);jt.registerComponent("Menu",Fi);var Vi=function(e){function t(t,n){var i;void 0===n&&(n={}),(i=e.call(this,t,n)||this).menuButton_=new di(t,n),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=di.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+r,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(i.menuButton_,"mouseenter",function(){i.menu.show()}),i.on("keydown",i.handleSubmenuKeyPress),i}q(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new Fi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=pe("li",{className:"vjs-menu-title",innerHTML:wt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),me(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+di.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleFocus=function(){Qe(C.a,"keydown",ut(this,this.handleKeyPress))},n.handleBlur=function(){Ze(C.a,"keydown",ut(this,this.handleKeyPress))},n.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):13!==e.which&&38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},n.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),It&&de())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(jt);jt.registerComponent("MenuButton",Vi);var zi=function(e){function t(t,n){var i,r=n.tracks;if((i=e.call(this,t,n)||this).items.length<=1&&i.hide(),!r)return Y(i);var a=ut(Y(Y(i)),i.update);return r.addEventListener("removetrack",a),r.addEventListener("addtrack",a),i.player_.on("ready",a),i.player_.on("dispose",function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a)}),i}return q(t,e),t}(Vi);jt.registerComponent("TrackButton",zi);var Hi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).selectable=n.selectable,i.isSelected_=n.selected||!1,i.multiSelectable=n.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}q(t,e);var n=t.prototype;return n.createEl=function(t,n,i){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",ne({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),i)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(ri);jt.registerComponent("MenuItem",Hi);var qi=function(e){function t(t,n){var i,r=n.track,a=t.textTracks();n.label=r.label||r.language||"Unknown",n.selected="showing"===r.mode,(i=e.call(this,t,n)||this).track=r;var s,o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(Y(Y(i)),t)},l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleSelectedLanguageChange.apply(Y(Y(i)),t)};(t.on(["loadstart","texttrackchange"],o),a.addEventListener("change",o),a.addEventListener("selectedlanguagechange",l),i.on("dispose",function(){t.off(["loadstart","texttrackchange"],o),a.removeEventListener("change",o),a.removeEventListener("selectedlanguagechange",l)}),void 0===a.onchange)&&i.on(["tap","click"],function(){if("object"!=typeof f.a.Event)try{s=new f.a.Event("change")}catch(e){}s||(s=C.a.createEvent("Event")).initEvent("change",!0,!0),a.dispatchEvent(s)});return i.handleTracksChange(),i}q(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track.kind,i=this.track.kinds,r=this.player_.textTracks();if(i||(i=[n]),e.prototype.handleClick.call(this,t),r)for(var a=0;a<r.length;a++){var s=r[a];s===this.track&&i.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Hi);jt.registerComponent("TextTrackMenuItem",qi);var Gi=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}q(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var a=t[i];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var a=t[i];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(qi);jt.registerComponent("OffTextTrackMenuItem",Gi);var Wi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return q(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=qi),this.label_&&(n=this.label_+" off"),e.push(new Gi(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<i.length;r++){var a=i[r];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(zi);jt.registerComponent("TextTrackButton",Wi);var Yi=function(e){function t(t,n){var i,r=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime,(i=e.call(this,t,n)||this).track=r,i.cue=a,r.addEventListener("cuechange",ut(Y(Y(i)),i.update)),i}q(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(Hi);jt.registerComponent("ChaptersTrackMenuItem",Yi);var Xi=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(wt(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,i=t.length;n<i;n++){var r=t[n],a=new Yi(this.player_,{track:this.track_,cue:r});e.push(a)}return e},t}(Wi);Xi.prototype.kind_="chapters",Xi.prototype.controlText_="Chapters",jt.registerComponent("ChaptersButton",Xi);var Ji=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var a=t.textTracks(),s=ut(Y(Y(r)),r.handleTracksChange);return a.addEventListener("change",s),r.on("dispose",function(){a.removeEventListener("change",s)}),r}q(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,i=0,r=t.length;i<r;i++){var a=t[i];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Wi);Ji.prototype.kind_="descriptions",Ji.prototype.controlText_="Descriptions",jt.registerComponent("DescriptionsButton",Ji);var Ki=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Wi);Ki.prototype.kind_="subtitles",Ki.prototype.controlText_="Subtitles",jt.registerComponent("SubtitlesButton",Ki);var Qi=function(e){function t(t,n){var i;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(i=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+n.kind+" settings dialog"),i}return q(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(qi);jt.registerComponent("CaptionSettingsMenuItem",Qi);var Zi=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Qi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Wi);Zi.prototype.kind_="captions",Zi.prototype.controlText_="Captions",jt.registerComponent("CaptionsButton",Zi);var $i=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.createEl=function(t,n,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),r+="</span>",e.prototype.createEl.call(this,t,ne({innerHTML:r},n),i)},t}(qi);jt.registerComponent("SubsCapsMenuItem",$i);var er=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(wt(i.label_)),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Qi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,$i)},t}(Wi);er.prototype.kinds_=["captions","subtitles"],er.prototype.controlText_="Subtitles",jt.registerComponent("SubsCapsButton",er);var tr=function(e){function t(t,n){var i,r=n.track,a=t.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,(i=e.call(this,t,n)||this).track=r,i.addClass("vjs-"+r.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(Y(Y(i)),t)};return a.addEventListener("change",s),i.on("dispose",function(){a.removeEventListener("change",s)}),i}q(t,e);var n=t.prototype;return n.createEl=function(t,n,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),r+="</span>",e.prototype.createEl.call(this,t,ne({innerHTML:r},n),i)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var i=0;i<n.length;i++){var r=n[i];r.enabled=r===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Hi);jt.registerComponent("AudioTrackMenuItem",tr);var nr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var i=t[n];e.push(new tr(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e},t}(zi);nr.prototype.controlText_="Audio Track",jt.registerComponent("AudioTrackButton",nr);var ir=function(e){function t(t,n){var i,r=n.rate,a=parseFloat(r,10);return n.label=r,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1,(i=e.call(this,t,n)||this).label=r,i.rate=a,i.on(t,"ratechange",i.update),i}q(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Hi);ir.prototype.contentElType="button",jt.registerComponent("PlaybackRateMenuItem",ir);var rr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateVisibility(),i.updateLabel(),i.on(t,"loadstart",i.updateVisibility),i.on(t,"ratechange",i.updateLabel),i}q(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=pe("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new Fi(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new ir(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),i=n[0],r=0;r<n.length;r++)if(n[r]>t){i=n[r];break}this.player().playbackRate(i)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Vi);rr.prototype.controlText_="Playback Rate",jt.registerComponent("PlaybackRateMenuButton",rr);var ar=function(e){function t(){return e.apply(this,arguments)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(jt);jt.registerComponent("Spacer",ar);var sr=function(e){function t(){return e.apply(this,arguments)||this}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(ar);jt.registerComponent("CustomControlSpacer",sr);var or=function(e){function t(){return e.apply(this,arguments)||this}return q(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(jt);or.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},jt.registerComponent("ControlBar",or);var lr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"error",i.open),i}q(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(pn);lr.prototype.options_=Ct(pn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),jt.registerComponent("ErrorDisplay",lr);var ur=["#000","Black"],cr=["#00F","Blue"],dr=["#0FF","Cyan"],hr=["#0F0","Green"],pr=["#F0F","Magenta"],fr=["#F00","Red"],mr=["#FFF","White"],gr=["#FF0","Yellow"],vr=["1","Opaque"],yr=["0.5","Semi-Transparent"],br=["0","Transparent"],_r={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ur,mr,fr,hr,cr,gr,pr,dr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[vr,yr,br]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[mr,ur,fr,hr,cr,gr,pr,dr]},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(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[vr,yr]},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:[br,yr,vr]}};function Tr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}_r.windowColor.options=_r.backgroundColor.options;var Sr=function(e){function t(t,n){var i;return n.temporary=!1,(i=e.call(this,t,n)||this).updateDisplay=ut(Y(Y(i)),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=pe("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),te(_r,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}q(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n="label");var r=_r[e],a=r.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map(function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',i.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return pe("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return pe("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("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return pe("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,i=this;return t=function(e,t,n){var r,a,s=(r=i.$(t.selector),a=t.parser,Tr(r.options[r.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),ee(e=_r).reduce(function(n,i){return t(n,e[i],i)},n)},n.setValues=function(e){var t=this;te(_r,function(n,i){!function(e,t,n){if(t)for(var i=0;i<e.options.length;i++)if(Tr(e.options[i].value,n)===t){e.selectedIndex=i;break}}(t.$(n.selector),e[i],n.parser)})},n.setDefaults=function(){var e=this;te(_r,function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n})},n.restoreSettings=function(){var e;try{e=JSON.parse(f.a.localStorage.getItem("vjs-text-track-settings"))}catch(e){Q.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?f.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):f.a.localStorage.removeItem("vjs-text-track-settings")}catch(e){Q.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(C.a,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(pn);jt.registerComponent("TextTrackSettings",Sr);var kr=function(e){function t(t,n){var i,r=n.ResizeObserver||f.a.ResizeObserver;null===n.ResizeObserver&&(r=!1);var a=Ct({createEl:!r,reportTouchActivity:!1},n);return(i=e.call(this,t,a)||this).ResizeObserver=n.ResizeObserver||f.a.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=dt(function(){i.resizeHandler()},100,!1,Y(Y(i))),r?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){i.el_&&i.el_.contentWindow&&Qe(i.el_.contentWindow,"resize",i.debouncedHandler_)},i.one("load",i.loadListener_)),i}q(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.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&&Ze(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},t}(jt);jt.registerComponent("ResizeManager",kr);var wr=function(e){function t(t,n){var i,r=Ct({createEl:!1},n);return(i=e.call(this,t,r)||this).reset_(),i.on(i.player_,"durationchange",i.handleDurationchange),i}q(t,e);var n=t.prototype;return n.isBehind_=function(){if(!this.timeupdateSeen_)return!1;var e=this.liveCurrentTime(),t=this.player_.currentTime(),n=this.seekableIncrement_;return e!==1/0&&e-(2*n+.07)>=t},n.trackLive_=function(){this.pastSeekEnd_=this.pastSeekEnd_;var e=this.player_.seekable();if(e&&e.length){var t=this.seekableEnd();t!==this.lastSeekEnd_&&(this.lastSeekEnd_&&(this.seekableIncrement_=Math.abs(t-this.lastSeekEnd_)),this.pastSeekEnd_=0,this.lastSeekEnd_=t,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},n.startTracking=function(){var e=this;this.isTracking()||(this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),this.one(this.player_,"play",this.handlePlay),this.timeupdateSeen_||(this.handleTimeupdate=function(){e.timeupdateSeen_=!0,e.handleTimeupdate=null},this.one(this.player_,"timeupdate",this.handleTimeupdate)))},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},n.reset_=function(){this.pastSeekEnd_=0,this.lastSeekEnd_=null,this.behindLiveEdge_=null,this.timeupdateSeen_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.seekableIncrement_=12,this.off(this.player_,"play",this.trackLive_),this.off(this.player_,"pause",this.trackLive_),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.seekToLiveEdge),this.handleTimeupdate&&(this.off(this.player_,"timeupdate",this.handleTimeupdate),this.handleTimeupdate=null)},n.stopTracking=function(){this.isTracking()&&this.reset_()},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?1/0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){return this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},n.dispose=function(){this.stopTracking(),e.prototype.dispose.call(this)},t}(jt);jt.registerComponent("LiveTracker",wr);var Cr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),i=[],r="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&-1===i.indexOf(s)&&i.push(s)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},jr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=C.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=C.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",f.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Er=function(e,t){for(var n={},i=0;i<e.length&&!((n=Object.getOwnPropertyDescriptor(e[i],t))&&n.set&&n.get);i++);return n.enumerable=!0,n.configurable=!0,n},Ar=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},i=function(e){return Er([e.el(),f.a.HTMLMediaElement.prototype,f.a.Element.prototype,jr],"innerHTML")}(e),r=function(n){return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];var s=n.apply(t,r);return Cr(e),s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){t[e]&&(n[e]=t[e],t[e]=r(n[e]))}),Object.defineProperty(t,"innerHTML",Ct(i,{set:r(i.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach(function(e){t[e]=n[e]}),Object.defineProperty(t,"innerHTML",i)},e.one("sourceset",t.resetSourceWatch_)}},xr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?xn(f.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return f.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Lr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Er([e.el(),f.a.HTMLMediaElement.prototype,xr],"src")}(e),i=t.setAttribute,r=t.load;Object.defineProperty(t,"src",Ct(n,{set:function(i){var r=n.set.call(t,i);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(n,r){var a=i.call(t,n,r);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=r.call(t);return Cr(e)||(e.triggerSourceset(""),Ar(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Cr(e)||Ar(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=r,t.setAttribute=i,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}};function Or(){var e=X(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]);return Or=function(){return e},e}var Ur=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var r=t.source,a=!1;if(r&&(i.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(r):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var s=i.el_.childNodes,o=s.length,u=[];o--;){var c=s[o];"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")||!On(c.src)||(a=!0)):u.push(c))}for(var d=0;d<u.length;d++)i.el_.removeChild(u[d])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&a&&Q.warn(l()(Or())),i.restoreMetadataTracksInIOSNativePlayer_(),(Wt||Ut||Bt)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}q(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){Lr(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var i=t[n];"metadata"===i.kind&&e.push({track:i,storedMode:i.mode})}};n(),t.addEventListener("change",n),this.on("dispose",function(){return t.removeEventListener("change",n)});var i=function n(){for(var i=0;i<e.length;i++){var r=e[i];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",n),t.removeEventListener("change",i),t.addEventListener("change",i)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",i)})},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(function(e){n.el()[i+"Tracks"].removeEventListener(e,n[i+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Vn[e],i=this.el()[n.getterName],r=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&i&&i.addEventListener){var a={change:function(e){r.trigger({type:"change",target:r,currentTarget:r,srcElement:r})},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<r.length;t++){for(var n=!1,a=0;a<i.length;a++)if(i[a]===r[t]){n=!0;break}n||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach(function(e){var n=a[e];i.addEventListener(e,n),t.on("dispose",function(t){return i.removeEventListener(e,n)})}),this.on("loadstart",s),this.on("dispose",function(e){return t.off("loadstart",s)})}},n.proxyNativeTracks_=function(){var e=this;Vn.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=C.a.createElement("video");var i=Ct({},this.options_.tag&&Te(this.options_.tag));Wt&&!0===this.options_.nativeControlsForTouch||delete i.controls,_e(e,ne(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&ke(e,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],a=0;a<r.length;a++){var s=r[a],o=this.options_[s];void 0!==o&&(o?ke(e,s,s):we(e,s),e[s]=o)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var i=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",i),t||this.trigger("loadstart")})}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready(function(){r.forEach(function(e){this.trigger(e)},this)})}},n.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){Q(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&Rt&&Vt&&0===this.el_.currentTime){return this.on("timeupdate",function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)})}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=f.a.navigator&&f.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},n.exitFullScreen=function(){this.el_.webkitExitFullScreen()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,i):e.prototype.addTextTrack.call(this,t,n,i)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=C.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var i=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)t!==n[i]&&t!==n[i].track||this.el().removeChild(n[i])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),f.a.performance&&"function"==typeof f.a.performance.now?e.creationTime=f.a.performance.now():f.a.performance&&f.a.performance.timing&&"number"==typeof f.a.performance.timing.navigationStart&&(e.creationTime=f.a.Date.now()-f.a.performance.timing.navigationStart),e},t}(qn);if(ue()){Ur.TEST_VID=C.a.createElement("video");var Pr=C.a.createElement("track");Pr.kind="captions",Pr.srclang="en",Pr.label="English",Ur.TEST_VID.appendChild(Pr)}Ur.isSupported=function(){try{Ur.TEST_VID.volume=.5}catch(e){return!1}return!(!Ur.TEST_VID||!Ur.TEST_VID.canPlayType)},Ur.canPlayType=function(e){return Ur.TEST_VID.canPlayType(e)},Ur.canPlaySource=function(e,t){return Ur.canPlayType(e.type)},Ur.canControlVolume=function(){try{var e=Ur.TEST_VID.volume;return Ur.TEST_VID.volume=e/2+.1,e!==Ur.TEST_VID.volume}catch(e){return!1}},Ur.canMuteVolume=function(){try{var e=Ur.TEST_VID.muted;return Ur.TEST_VID.muted=!e,Ur.TEST_VID.muted?ke(Ur.TEST_VID,"muted","muted"):we(Ur.TEST_VID,"muted"),e!==Ur.TEST_VID.muted}catch(e){return!1}},Ur.canControlPlaybackRate=function(){if(Rt&&Vt&&zt<58)return!1;try{var e=Ur.TEST_VID.playbackRate;return Ur.TEST_VID.playbackRate=e/2+.1,e!==Ur.TEST_VID.playbackRate}catch(e){return!1}},Ur.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(C.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(C.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(C.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(C.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ur.supportsNativeTextTracks=function(){return Gt||It&&Vt},Ur.supportsNativeVideoTracks=function(){return!(!Ur.TEST_VID||!Ur.TEST_VID.videoTracks)},Ur.supportsNativeAudioTracks=function(){return!(!Ur.TEST_VID||!Ur.TEST_VID.audioTracks)},Ur.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Ur.prototype.featuresVolumeControl=Ur.canControlVolume(),Ur.prototype.featuresMuteControl=Ur.canMuteVolume(),Ur.prototype.featuresPlaybackRate=Ur.canControlPlaybackRate(),Ur.prototype.featuresSourceset=Ur.canOverrideAttributes(),Ur.prototype.movingMediaElementInDOM=!It,Ur.prototype.featuresFullscreenResize=!0,Ur.prototype.featuresProgressEvents=!0,Ur.prototype.featuresTimeupdateEvents=!0,Ur.prototype.featuresNativeTextTracks=Ur.supportsNativeTextTracks(),Ur.prototype.featuresNativeVideoTracks=Ur.supportsNativeVideoTracks(),Ur.prototype.featuresNativeAudioTracks=Ur.supportsNativeAudioTracks();var Ir=Ur.TEST_VID&&Ur.TEST_VID.constructor.prototype.canPlayType,Dr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;function Rr(){var e=X(["\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      "]);return Rr=function(){return e},e}Ur.patchCanPlayType=function(){Mt>=4&&!Nt&&!Vt&&(Ur.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Dr.test(e)?"maybe":Ir.call(this,e)})},Ur.unpatchCanPlayType=function(){var e=Ur.TEST_VID.constructor.prototype.canPlayType;return Ur.TEST_VID.constructor.prototype.canPlayType=Ir,e},Ur.patchCanPlayType(),Ur.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Ur.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Ur.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Ur.prototype["set"+wt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Ur.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Ur.prototype["set"+wt(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){Ur.prototype[e]=function(){return this.el_[e]()}}),qn.withSourceHandlers(Ur),Ur.nativeSourceHandler={},Ur.nativeSourceHandler.canPlayType=function(e){try{return Ur.TEST_VID.canPlayType(e)}catch(e){return""}},Ur.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ur.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Ln(e.src);return Ur.nativeSourceHandler.canPlayType("video/"+n)}return""},Ur.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Ur.nativeSourceHandler.dispose=function(){},Ur.registerSourceHandler(Ur.nativeSourceHandler),qn.registerTech("Html5",Ur);var Mr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Br={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Nr=["tiny","xsmall","small","medium","large","xlarge","huge"],Fr={};Nr.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Fr[e]="vjs-layout-"+t});var Vr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},zr=function(e){function t(n,i,r){var a;if(n.id=n.id||i.id||"vjs_video_"+Fe(),(i=ne(t.getTagSettings(n),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(i.language=s.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(Te(o).hasOwnProperty("lang")){i.language=o.getAttribute("lang");break}o=o.parentNode}if((a=e.call(this,null,i,r)||this).log=Z(a.id_),a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&Te(n),a.language(a.options_.language),i.languages){var l={};Object.getOwnPropertyNames(i.languages).forEach(function(e){l[e.toLowerCase()]=i.languages[e]}),a.languages_=l}else a.languages_=t.prototype.options_.languages;a.cache_={},a.poster_=i.poster||"",a.controls_=!!i.controls,a.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?a.options_.autoplay=!0:a.autoplay(a.options_.autoplay),a.scrubbing_=!1,a.el_=a.createEl(),a.cache_.lastPlaybackRate=a.defaultPlaybackRate(),Tt(Y(Y(a)),{eventBusKey:"el_"}),a.fluid_&&a.on("playerreset",a.updateStyleEl_);var u=Ct(a.options_);if(i.plugins){var c=i.plugins;Object.keys(c).forEach(function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](c[e])},Y(Y(a)))}a.options_.playerOptions=u,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),It||a.addClass("vjs-workinghover"),t.players[a.id_]=Y(Y(a));var d=H.split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("fullscreenchange",a.handleFullscreenChange_),a.on("stageclick",a.handleStageClick_),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.changingSrc_=!1,a.playWaitingForReady_=!1,a.playOnLoadstart_=null,a}q(t,e);var n=t.prototype;return n.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.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),Wn[this.id()]=null,e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,i=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();i?t=this.el_=n.parentNode:r||(t=this.el_=e.prototype.createEl.call(this,"div"));var a=Te(n);if(r){for(t=this.el_=n,n=this.tag=C.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);ge(t,"video-js")||ve(t,"video-js"),t.appendChild(n),i=this.playerElIngest_=t,Object.keys(t).forEach(function(e){n[e]=t[e]})}if(n.setAttribute("tabindex","-1"),a.tabindex="-1",Ht&&(n.setAttribute("role","application"),a.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(e){r&&"class"===e||t.setAttribute(e,a[e]),r&&n.setAttribute(e,a[e])}),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==f.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=ot("vjs-styles-dimensions");var s=Re(".vjs-styles-defaults"),o=Re("head");o.insertBefore(this.styleEl_,s?s.nextSibling:o.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var l=n.getElementsByTagName("a"),u=0;u<l.length;u++){var c=l.item(u);ve(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!i&&n.parentNode.insertBefore(t,n),me(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t)return this[n]=void 0,void this.updateStyleEl_();var i=parseFloat(t);isNaN(i)?Q.error('Improper value "'+t+'" supplied for for '+e):(this[n]=i,this.updateStyleEl_())},n.fluid=function(e){if(void 0===e)return!!this.fluid_;var t,n;this.fluid_=!!e,pt(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),pt(t=function(){this.on("playerreset",this.updateStyleEl_)})?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==f.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=i[1]/i[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),lt(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid {\n        padding-top: "+100*r+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(a>=0&&(o.width=a),s>=0&&(o.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=wt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(qn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Hn.names.forEach(function(e){var t=Hn[e];a[t.getterName]=n[t.privateName]}),ne(a,this.options_[i]),ne(a,this.options_[r]),ne(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var s=qn.getTech(e);if(!s)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new s(a),this.tech_.ready(ut(this,this.handleTechReady_),!0),dn(this.textTracksJson_||[],this.tech_),Mr.forEach(function(e){n.on(n.tech_,e,n["handleTech"+wt(e)+"_"])}),Object.keys(Br).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Br[e]+"_"].bind(n),event:t}):n["handleTech"+Br[e]+"_"](t)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||me(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Hn.names.forEach(function(t){var n=Hn[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=cn(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Q.warn(l()(Rr())),this.tech_},n.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_)},n.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_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,i=function(){var e=t.muted();t.muted(!0);var n=t.play();if(n&&n.then&&n.catch)return n.catch(function(n){t.muted(e)})};if("any"===e?(n=this.play())&&n.then&&n.catch&&n.catch(function(){return i()}):n="muted"===e?i():this.play(),n&&n.then&&n.catch)return n.then(function(){t.trigger({type:"autoplay-success",autoplay:e})}).catch(function(n){t.trigger({type:"autoplay-failure",autoplay:e})})}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter(function(e){return e.src===t});if(n.length)return n[0].type;for(var i=e.$$("source"),r=0;r<i.length;r++){var a=i[r];if(a.type&&a.src&&a.src===t)return a.type}return ti(t)}(this,t)),this.cache_.source=Ct({},e,{src:t,type:n});for(var i=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var l=Te(a[o]);r.push(l),l.src&&l.src===t&&s.push(l.src)}s.length&&!i.length?this.cache_.sources=r:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},i=this.currentSource().src,r=e.src;if(i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(n=function(){}),n(r),!e.src){this.tech_.one(["sourceset","loadstart"],function e(n){if("sourceset"!==n.type){var i=t.techGet("currentSrc");t.lastSource_.tech=i,t.updateSourceCaches_(i)}t.tech_.off(["sourceset","loadstart"],e)})}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))})},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Q.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")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){De(e)&&this.controls_&&(this.paused()?ln(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.preventDefault()},n.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.handleStageClick_=function(){this.reportUserActivity()},n.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.techCall_=function(e,t){this.ready(function(){if(e in Qn)return function(e,t,n,i){return t[n](e.reduce($n(n),i))}(this.middleware_,this.tech_,e,t);if(e in Zn)return Jn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Q(e),e}},!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Kn)return function(e,t,n){return e.reduceRight($n(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Zn)return Jn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Q("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Q("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Q(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||f.a.Promise;return t?new t(function(t){e.play_(t)}):this.play_()},n.play_=function(e){var t=this;if(void 0===e&&(e=ln),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())})}},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Kt(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?(this.addClass("vjs-live"),this.options_.liveui&&this.player_.liveTracker&&this.addClass("vjs-liveui")):(this.removeClass("vjs-live"),this.removeClass("vjs-liveui")),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=Kt(0,0)),e},n.bufferedPercent=function(){return Qt(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},n.requestFullscreen=function(){var e=$t;this.isFullscreen(!0),e.requestFullscreen?(Qe(C.a,e.fullscreenchange,ut(this,function t(n){this.isFullscreen(C.a[e.fullscreenElement]),!1===this.isFullscreen()&&Ze(C.a,e.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},n.exitFullscreen=function(){var e=$t;this.isFullscreen(!1),e.requestFullscreen?C.a[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},n.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=C.a.documentElement.style.overflow,Qe(C.a,"keydown",ut(this,this.fullWindowOnEscKey)),C.a.documentElement.style.overflow="hidden",ve(C.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullWindow=!1,Ze(C.a,"keydown",this.fullWindowOnEscKey),C.a.documentElement.style.overflow=this.docOrigOverflow,ye(C.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.canPlayType=function(e){for(var t,n=0,i=this.options_.techOrder;n<i.length;n++){var r=i[n],a=qn.getTech(r);if(a||(a=jt.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else Q.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,i=this.options_.techOrder.map(function(e){return[e,qn.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(Q.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(e,t,n){var i;return e.some(function(e){return t.some(function(t){if(i=n(e,t))return!0})}),i},a=function(e,t){var i=e[0];if(e[1].canPlaySource(t,n.options_[i.toLowerCase()]))return{source:t,tech:i}};return(this.options_.sourceOrder?r(e,i,(t=a,function(e,n){return t(n,e)})):r(i,e,a))||!1},n.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):ie(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[ni({src:t})]:ie(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[ni(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Xn(this,n[0],function(e,i){var r,a;if(t.middleware_=i,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady());r=i,a=t.tech_,r.forEach(function(e){return e.setTech&&e.setTech(a)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},n.src_=function(e){var t,n,i=this,r=this.selectSource([e]);return!r||(t=r.tech,n=this.techName_,wt(t)!==wt(n)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1):(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),pt(this)&&this.trigger("playerreset")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),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_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new an(e),this.addClass("vjs-error"),Q.error("(CODE:"+this.error_.code+" "+an.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,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(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,i,r=ut(this,this.reportUserActivity);this.on("mousedown",function(){r(),this.clearInterval(e),e=this.setInterval(r,250)}),this.on("mousemove",function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())}),this.on("mouseup",function(t){r(),this.clearInterval(e)}),this.on("keydown",r),this.on("keyup",r),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(i);var e=this.options_.inactivityTimeout;e<=0||(i=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},n.languages=function(){return Ct(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Ct(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var i=t[n];(i=Ct(i)).player=void 0,e.tracks[n]=i}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var i=new pn(this,t);return this.addChild(i),i.on("dispose",function(){n.removeChild(i)}),i.open(),i},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Nr.length;n++){var i=Nr[n];if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(Fr[e]),this.addClass(Fr[i]),this.breakpoint_=i;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e?ne(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=ne({},Vr,e),this.updateCurrentBreakpoint_(),ne(this.breakpoints_))},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Fr[this.breakpoint_]||""},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Te(e),i=n["data-setup"];if(ge(e,"vjs-fill")&&(n.fill=!0),ge(e,"vjs-fluid")&&(n.fluid=!0),null!==i){var a=r()(i||"{}"),s=a[0],o=a[1];s&&Q.error(s),ne(n,o)}if(ne(t,n),e.hasChildNodes())for(var l=e.childNodes,u=0,c=l.length;u<c;u++){var d=l[u],h=d.nodeName.toLowerCase();"source"===h?t.sources.push(Te(d)):"track"===h&&t.tracks.push(Te(d))}return t},n.flexNotSupported_=function(){var e=C.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(jt);Hn.names.forEach(function(e){var t=Hn[e];zr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),zr.players={};var Hr=f.a.navigator;zr.prototype.options_={techOrder:qn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Hr&&(Hr.languages&&Hr.languages[0]||Hr.userLanguage||Hr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){zr.prototype[e]=function(){return this.techGet_(e)}}),Mr.forEach(function(e){zr.prototype["handleTech"+wt(e)+"_"]=function(){return this.trigger(e)}}),jt.registerComponent("Player",zr);var qr={},Gr=function(e){return qr.hasOwnProperty(e)},Wr=function(e){return Gr(e)?qr[e]:void 0},Yr=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Xr=function(e,t,n){var i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Jr=function(e,t){return t.prototype.name=e,function(){Xr(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var a=W(t,[this].concat(i));return this[e]=function(){return a},Xr(this,a.getEventHash()),a}},Kr=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,Tt(this),delete this.trigger,kt(this,this.constructor.defaultState),Yr(t,this.name),this.dispose=ut(this,this.dispose),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),$e(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=Jr(e,qr[e])},e.isBasic=function(t){var n="string"==typeof t?Wr(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Gr(t))Q.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(zr.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return qr[t]=n,"plugin"!==t&&(e.isBasic(n)?zr.prototype[t]=function(e,t){var n=function(){Xr(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Yr(this,e),Xr(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach(function(e){n[e]=t[e]}),n}(t,n):zr.prototype[t]=Jr(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Gr(e)&&(delete qr[e],delete zr.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(qr)),e.forEach(function(e){var n=Wr(e);n&&((t=t||{})[e]=n)}),t},e.getPluginVersion=function(e){var t=Wr(e);return t&&t.VERSION||""},e}();Kr.getPlugin=Wr,Kr.BASE_PLUGIN_NAME="plugin",Kr.registerPlugin("plugin",Kr),zr.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},zr.prototype.hasPlugin=function(e){return!!Gr(e)};var Qr=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Zr(e,t,n){var i=Zr.getPlayer(e);if(i)return t&&Q.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i.ready(n),i;var r="string"==typeof e?Re("#"+Qr(e)):e;if(!ce(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");C.a.body.contains(r)||Q.warn("The element supplied is not included in the DOM"),t=t||{},Zr.hooks("beforesetup").forEach(function(e){var n=e(r,Ct(t));ie(n)&&!Array.isArray(n)?t=Ct(t,n):Q.error("please return an object in beforesetup hooks")});var a=jt.getComponent("Player");return i=new a(r,t,n),Zr.hooks("setup").forEach(function(e){return e(i)}),i}if(Zr.hooks_={},Zr.hooks=function(e,t){return Zr.hooks_[e]=Zr.hooks_[e]||[],t&&(Zr.hooks_[e]=Zr.hooks_[e].concat(t)),Zr.hooks_[e]},Zr.hook=function(e,t){Zr.hooks(e,t)},Zr.hookOnce=function(e,t){Zr.hooks(e,[].concat(t).map(function(t){return function n(){return Zr.removeHook(e,n),t.apply(void 0,arguments)}}))},Zr.removeHook=function(e,t){var n=Zr.hooks(e).indexOf(t);return!(n<=-1)&&(Zr.hooks_[e]=Zr.hooks_[e].slice(),Zr.hooks_[e].splice(n,1),!0)},!0!==f.a.VIDEOJS_NO_DYNAMIC_STYLE&&ue()){var $r=Re(".vjs-styles-defaults");if(!$r){$r=ot("vjs-styles-defaults");var ea=Re("head");ea&&ea.insertBefore($r,ea.firstChild),lt($r,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}at(1,Zr),Zr.VERSION=H,Zr.options=zr.prototype.options_,Zr.getPlayers=function(){return zr.players},Zr.getPlayer=function(e){var t,n=zr.players;if("string"==typeof e){var i=Qr(e),r=n[i];if(r)return r;t=Re("#"+i)}else t=e;if(ce(t)){var a=t,s=a.player,o=a.playerId;if(s||n[o])return s||n[o]}},Zr.getAllPlayers=function(){return Object.keys(zr.players).map(function(e){return zr.players[e]}).filter(Boolean)},Zr.players=zr.players,Zr.getComponent=jt.getComponent,Zr.registerComponent=function(e,t){qn.isTech(t)&&Q.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),jt.registerComponent.call(jt,e,t)},Zr.getTech=qn.getTech,Zr.registerTech=qn.registerTech,Zr.use=function(e,t){Gn[e]=Gn[e]||[],Gn[e].push(t)},Object.defineProperty(Zr,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Zr.middleware,"TERMINATOR",{value:Yn,writeable:!1,enumerable:!0}),Zr.browser=Yt,Zr.TOUCH_ENABLED=Wt,Zr.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},i={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),i=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(n,e),i)i.hasOwnProperty(r)&&(n.prototype[r]=i[r]);return n},Zr.mergeOptions=Ct,Zr.bind=ut,Zr.registerPlugin=Kr.registerPlugin,Zr.deregisterPlugin=Kr.deregisterPlugin,Zr.plugin=function(e,t){return Q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Kr.registerPlugin(e,t)},Zr.getPlugins=Kr.getPlugins,Zr.getPlugin=Kr.getPlugin,Zr.getPluginVersion=Kr.getPluginVersion,Zr.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Zr.options.languages=Ct(Zr.options.languages,((n={})[e]=t,n)),Zr.options.languages[e]},Zr.log=Q,Zr.createLogger=Z,Zr.createTimeRange=Zr.createTimeRanges=Kt,Zr.formatTime=vi,Zr.setFormatTime=function(e){gi=e},Zr.resetFormatTime=function(){gi=mi},Zr.parseUrl=An,Zr.isCrossOrigin=On,Zr.EventTarget=ht,Zr.on=Qe,Zr.one=et,Zr.off=Ze,Zr.trigger=$e,Zr.xhr=c.a,Zr.TextTrack=Dn,Zr.AudioTrack=Rn,Zr.VideoTrack=Mn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){Zr[e]=function(){return Q.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Be[e].apply(null,arguments)}}),Zr.computedStyle=ae,Zr.dom=Be,Zr.url=Un;
/**
 * @videojs/http-streaming
 * @version 1.5.1
 * @copyright 2018 Brightcove, Inc
 * @license Apache-2.0
 */
var ta=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=h.a.buildAbsoluteURL(f.a.location.href,e)),h.a.buildAbsoluteURL(e,t))},na=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ia=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),ra=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},aa=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},sa=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oa=Zr.mergeOptions,la=Zr.EventTarget,ua=Zr.log,ca=function(e,t){["AUDIO","SUBTITLES"].forEach(function(n){for(var i in e.mediaGroups[n])for(var r in e.mediaGroups[n][i]){var a=e.mediaGroups[n][i][r];t(a,n,i,r)}})},da=function(e,t){var n=oa(e,{}),i=n.playlists[t.uri];if(!i)return null;if(i.segments&&t.segments&&i.segments.length===t.segments.length&&i.mediaSequence===t.mediaSequence)return null;var r=oa(i,t);i.segments&&(r.segments=function(e,t,n){var i=t.slice();n=n||0;for(var r=Math.min(e.length,t.length+n),a=n;a<r;a++)i[a-n]=oa(e[a],i[a-n]);return i}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),r.segments.forEach(function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=ta(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ta(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ta(t,e.map.uri))}(e,r.resolvedUri)});for(var a=0;a<n.playlists.length;a++)n.playlists[a].uri===t.uri&&(n.playlists[a]=r);return n.playlists[t.uri]=r,n},ha=function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];e.playlists[n.uri]=n,n.resolvedUri=ta(e.uri,n.uri),n.id=t,n.attributes||(n.attributes={},ua.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},pa=function(e){ca(e,function(t){t.uri&&(t.resolvedUri=ta(e.uri,t.uri))})},fa=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},ma=function(e){function t(e,n,i){na(this,t);var r=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(r.srcUrl=e,r.hls_=n,r.withCredentials=i,!r.srcUrl)throw new Error("A non-empty playlist URL is required");return r.state="HAVE_NOTHING",r.on("mediaupdatetimeout",function(){"HAVE_METADATA"===r.state&&(r.state="HAVE_CURRENT_METADATA",r.request=r.hls_.xhr({uri:ta(r.master.uri,r.media().uri),withCredentials:r.withCredentials},function(e,t){if(r.request)return e?r.playlistRequestError(r.request,r.media().uri,"HAVE_METADATA"):void r.haveMetadata(r.request,r.media().uri)}))}),r}return ra(t,la),ia(t,[{key:"playlistRequestError",value:function(e,t,n){this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var n=this;this.request=null,this.state="HAVE_METADATA";var i=new k;i.push(e.responseText),i.end(),i.manifest.uri=t,i.manifest.attributes=i.manifest.attributes||{};var r=da(this.master,i.manifest);this.targetDuration=i.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[i.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(f.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=f.a.setTimeout(function(){n.trigger("mediaupdatetimeout")},fa(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),f.a.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var i=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(i){if(this.state="SWITCHING_MEDIA",this.request){if(ta(this.master.uri,e.uri)===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:ta(this.master.uri,e.uri),withCredentials:this.withCredentials},function(i,r){if(t.request){if(i)return t.playlistRequestError(t.request,e.uri,n);t.haveMetadata(r,e.uri),"HAVE_MASTER"===n?t.trigger("loadedmetadata"):t.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),f.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;f.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=f.a.setTimeout(function(){return t.load()},i)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var i=new k;return i.push(n.responseText),i.end(),e.state="HAVE_MASTER",i.manifest.uri=e.srcUrl,i.manifest.playlists?(e.master=i.manifest,ha(e.master),pa(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(i.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:f.a.location.href,playlists:[{uri:e.srcUrl,id:0}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.master.playlists[0].resolvedUri=e.srcUrl,e.master.playlists[0].attributes=e.master.playlists[0].attributes||{},e.haveMetadata(n,e.srcUrl),e.trigger("loadedmetadata"))}})}}]),t}(),ga=Zr.createTimeRange,va=function(e,t,n){var i,r;return void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(i=function(e,t){var n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(void 0!==(r=e.segments[i]).end)return{result:n+r.end,precise:!0};if(n+=r.duration,void 0!==r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t)).precise?i.result:(r=function(e,t){for(var n=0,i=void 0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(i=e.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=i.duration,void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?r.result:i.result+n},ya=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return f.a.Infinity}return va(e,t,n)},ba=function(e,t,n){var i=0;if(t>n){var r=[n,t];t=r[0],n=r[1]}if(t<0){for(var a=t;a<Math.min(0,n);a++)i+=e.targetDuration;t=0}for(var s=t;s<n;s++)i+=e.segments[s].duration;return i},_a=function(e){if(!e.segments.length)return 0;for(var t=e.segments.length-1,n=e.segments[t].duration||e.targetDuration,i=n+2*e.targetDuration;t--&&!((n+=e.segments[t].duration)>=i););return Math.max(0,t)},Ta=function(e,t,n){if(!e||!e.segments)return null;if(e.endList)return ya(e);if(null===t)return null;t=t||0;var i=n?_a(e):e.segments.length;return va(e,e.mediaSequence+i,t)},Sa=function(e){return e-Math.floor(e)==0},ka=function(e,t){if(Sa(t))return t+.1*e;for(var n=t.toString().split(".")[1].length,i=1;i<=n;i++){var r=Math.pow(10,i),a=t*r;if(Sa(a)||i===n)return(a+e)/r}},wa=ka.bind(null,1),Ca=ka.bind(null,-1),ja=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Ea=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Aa=function(e){var t=ja(e);return!e.disabled&&!t},xa=function(e,t){return t.attributes&&t.attributes[e]},La=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!Aa(e)&&(e.attributes.BANDWIDTH||0)<n}).length},Oa={duration:ya,seekable:function(e,t){var n=t||0,i=Ta(e,t,!0);return null===i?ga():ga(n,i)},safeLiveIndex:_a,getMediaInfoForTime:function(e,t,n,i){var r=void 0,a=void 0,s=e.segments.length,o=t-i;if(o<0){if(n>0)for(r=n-1;r>=0;r--)if(a=e.segments[r],(o+=Ca(a.duration))>0)return{mediaIndex:r,startTime:i-ba(e,n,r)};return{mediaIndex:0,startTime:t}}if(n<0){for(r=n;r<0;r++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(r=n;r<s;r++)if(a=e.segments[r],(o-=wa(a.duration))<0)return{mediaIndex:r,startTime:i+ba(e,n,r)};return{mediaIndex:s-1,startTime:t}},isEnabled:Aa,isDisabled:function(e){return e.disabled},isBlacklisted:ja,isIncompatible:Ea,playlistEnd:Ta,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:xa,estimateSegmentRequestTime:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return xa("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*i)/t:NaN},isLowestEnabledRendition:La},Ua=Zr.xhr,Pa=Zr.mergeOptions,Ia=function(){return function e(t,n){t=Pa({timeout:45e3},t);var i=e.beforeRequest||Zr.Hls.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var a=Ua(t,function(e,t){var i=a.response;!e&&i&&(a.responseTime=Date.now(),a.roundTripTime=a.responseTime-a.requestTime,a.bytesReceived=i.byteLength||i.length,a.bandwidth||(a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3))),t.headers&&(a.responseHeaders=t.headers),e&&"ETIMEDOUT"===e.code&&(a.timedout=!0),e||a.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(a&&(i||a.responseText)))),n(e,a)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a}},Da=function(e,t){return e.start(t)+"-"+e.end(t)},Ra=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Ma=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ba=function(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n];ArrayBuffer.isView(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i}),t},Na=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Fa=function(e){for(var t=Array.prototype.slice.call(e),n="",i=0;i<t.length/16;i++)n+=t.slice(16*i,16*i+16).map(Ra).join("")+" "+t.slice(16*i,16*i+16).map(Ma).join("")+"\n";return n},Va=Object.freeze({createTransferableMessage:Ba,initSegmentId:Na,hexDump:Fa,tagDump:function(e){var t=e.bytes;return Fa(t)},textRanges:function(e){var t="",n=void 0;for(n=0;n<e.length;n++)t+=Da(e,n)+" ";return t}}),za=function(e,t,n,i){var r=void 0;if("stream"===t){r=new Date(1e3*i+n.getTime());var a=e.toISOString(),s=n.toISOString(),o=r.toISOString();return s<=a&&a<=o}if("player"===t)return r=i+n,n<=e&&e<=r},Ha=function(e,t,n){if(!n.segments||0===n.segments.length)return null;if("player"!==t&&"stream"!==t)return null;for(var i=0,r=0;r<n.segments.length;r++){var a=n.segments[r],s=i+a.duration,o=void 0,l=void 0;"player"===t?(o=a.start,l=i):(o=a.dateTimeObject,l=a.dateTimeObject);var u=void 0!==a.start&&void 0!==a.end&&za(e,t,o,a.end-a.start),c=za(e,t,l,a.duration);if(u)return{segment:a,estimatedStart:l,type:"accurate"};if(c)return{segment:a,estimatedStart:l,type:"estimate"};i=s}return null},qa=function(e){var t=e.playlist,n=e.time,i=void 0===n?void 0:n,r=e.callback;if(!r)throw new Error("getStreamTime: callback must be provided");if(!t||void 0===i)return r({message:"getStreamTime: playlist and time must be provided"});var a=function(e,t){return Ha(e,"player",t)}(i,t);if(!a)return r({message:"valid streamTime was not found"});if("estimate"===a.type)return r({message:"Accurate streamTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:i};return a.segment.dateTimeObject&&(s.programDateTime=a.segment.dateTimeObject.toISOString()),r(null,s)},Ga=function e(t){var n=t.streamTime,i=t.playlist,r=t.retryCount,a=void 0===r?2:r,s=t.seekTo,o=t.pauseAfterSeek,l=void 0===o||o,u=t.tech,c=t.callback;if(!c)throw new Error("seekToStreamTime: callback must be provided");if(void 0===n||!i||!s)return c({message:"seekToStreamTime: streamTime, seekTo and playlist must be provided"});if(!i.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(i))return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var d=function(e,t){var n=void 0;try{n=new Date(e)}catch(e){return null}return Ha(n,"stream",t)}(n,i);if(!d)return c({message:n+" was not found in the stream"});if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):e({streamTime:n,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:l,tech:u,callback:c});var h=d.segment,p=function(e,t){var n=void 0,i=void 0;try{n=new Date(e),i=new Date(t)}catch(e){}var r=n.getTime();return(i.getTime()-r)/1e3}(h.dateTimeObject,n),f=h.start+p;u.one("seeked",function(){return c(null,u.currentTime())}),l&&u.pause(),s(f)},Wa=function(e,t){var n=[],i=void 0;if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return Zr.createTimeRanges(n)},Ya=function(e,t){return Wa(e,function(e,n){return e-1/30<=t&&n+1/30>=t})},Xa=function(e,t){return Wa(e,function(e){return e-1/30>=t})},Ja=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},Ka=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},Qa=function(e,t,n){var i=void 0,r=void 0;if(n&&n.cues)for(i=n.cues.length;i--;)(r=n.cues[i]).startTime<=t&&r.endTime>=e&&n.removeCue(r)},Za=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e},$a=function(e,t,n){var i=f.a.WebKitDataCue||f.a.VTTCue;if(t&&t.forEach(function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new i(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},e),n){var r=Za(e.mediaSource_.duration);if(n.forEach(function(e){var t=e.cueTime+this.timestampOffset;e.frames.forEach(function(e){var n=new i(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Zr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Zr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Zr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),this.metadataTrack_.addCue(n)},this)},e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(var a=e.metadataTrack_.cues,s=[],o=0;o<a.length;o++)a[o]&&s.push(a[o]);var l=s.reduce(function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e},{}),u=Object.keys(l).sort(function(e,t){return Number(e)-Number(t)});u.forEach(function(e,t){var n=l[e],i=Number(u[t+1])||r;n.forEach(function(e){e.endTime=i})})}}},es="undefined"!=typeof window?window:{},ts="undefined"==typeof Symbol?"__target":Symbol(),ns="application/javascript",is=es.BlobBuilder||es.WebKitBlobBuilder||es.MozBlobBuilder||es.MSBlobBuilder,rs=es.URL||es.webkitURL||rs&&rs.msURL,as=es.Worker;function ss(e,t){return function(n){var i=this;if(!t)return new as(e);if(as&&!n){var r=cs(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[ts]=new as(r),function(e,t){if(!e||!t)return;var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&rs.revokeObjectURL(e.objURL),n.call(e)}}(this[ts],r),this[ts]}var a={postMessage:function(e){i.onmessage&&setTimeout(function(){i.onmessage({data:e,target:a})})}};t.call(a),this.postMessage=function(e){setTimeout(function(){a.onmessage({data:e,target:i})})},this.isThisThread=!0}}if(as){var os,ls=cs("self.onmessage = function () {}"),us=new Uint8Array(1);try{(os=new as(ls)).postMessage(us,[us.buffer])}catch(e){as=null}finally{rs.revokeObjectURL(ls),os&&os.terminate()}}function cs(e){try{return rs.createObjectURL(new Blob([e],{type:ns}))}catch(n){var t=new is;return t.append(e),rs.createObjectURL(t.getBlob(type))}}var ds=new ss("./transmuxer-worker.worker.js",function(e,t){var n=this;!function(){var e,t,i,r,a,s,o,l,u,c,d,h,p,f,m,g,v,y,b,_,T,S,k,w,C,j,E,A,x,L,O,U,P,I,D,R,M,B,N,F,V=Math.pow(2,32)-1;!function(){var e;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(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),j=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]),E=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]),A={video:j,audio:E},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0]),U=new Uint8Array([0,0,0,0,0,0,0,0]),P=U,I=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D=U,x=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},t=function(){return e(S.dinf,e(S.dref,O))},i=function(t){return e(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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},m=function(t){return e(S.hdlr,A[t])},f=function(t){var n=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&&(n[12]=t.samplerate>>>24&255,n[13]=t.samplerate>>>16&255,n[14]=t.samplerate>>>8&255,n[15]=255&t.samplerate),e(S.mdhd,n)},p=function(t){return e(S.mdia,f(t),m(t.type),s(t))},a=function(t){return e(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},s=function(n){return e(S.minf,"video"===n.type?e(S.vmhd,x):e(S.smhd,L),t(),v(n))},o=function(t,n){for(var i=[],r=n.length;r--;)i[r]=b(n[r]);return e.apply(null,[S.moof,a(t)].concat(i))},l=function(t){for(var n=t.length,i=[];n--;)i[n]=d(t[n]);return e.apply(null,[S.moov,c(4294967295)].concat(i).concat(u(t)))},u=function(t){for(var n=t.length,i=[];n--;)i[n]=_(t[n]);return e.apply(null,[S.mvex].concat(i))},c=function(t){var n=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 e(S.mvhd,n)},g=function(t){var n,i,r=t.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e(S.sdtp,a)},v=function(t){return e(S.stbl,y(t),e(S.stts,D),e(S.stsc,P),e(S.stsz,I),e(S.stco,U))},y=function(t){return e(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?R(t):M(t))},R=function(t){var n,i=t.sps||[],r=t.pps||[],a=[],s=[];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]));for(n=0;n<r.length;n++)s.push((65280&r[n].byteLength)>>>8),s.push(255&r[n].byteLength),s=s.concat(Array.prototype.slice.call(r[n]));return e(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&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]),e(S.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(a).concat([r.length]).concat(s))),e(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},M=function(t){return e(S.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]),i(t))},h=function(t){var n=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 e(S.tkhd,n)},b=function(t){var n,i,r,a,s,o;return n=e(S.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])),s=Math.floor(t.baseMediaDecodeTime/(V+1)),o=Math.floor(t.baseMediaDecodeTime%(V+1)),i=e(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===t.type?(r=T(t,92),e(S.traf,n,i,r)):(a=g(t),r=T(t,a.length+92),e(S.traf,n,i,r,a))},d=function(t){return t.duration=t.duration||4294967295,e(S.trak,h(t),p(t))},_=function(t){var n=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&&(n[n.length-1]=0),e(S.trex,n)},F=function(e,t){var n=0,i=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|i|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},N=function(t,n){var i,r,a,s;for(n+=20+16*(r=t.samples||[]).length,i=F(r,n),s=0;s<r.length;s++)a=r[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 e(S.trun,new Uint8Array(i))},B=function(t,n){var i,r,a,s;for(n+=20+8*(r=t.samples||[]).length,i=F(r,n),s=0;s<r.length;s++)a=r[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 e(S.trun,new Uint8Array(i))},T=function(e,t){return"audio"===e.type?B(e,t):N(e,t)};var z,H,q,G,W,Y={ftyp:r=function(){return e(S.ftyp,k,w,k,C)},mdat:function(t){return e(S.mdat,t)},moof:o,moov:l,initSegment:function(e){var t,n=r(),i=l(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t}},X=function(e){return e>>>0};q=function(e){return z(e,["moov","trak"]).reduce(function(e,t){var n,i,r,a,s;return(n=z(t,["tkhd"])[0])?(i=n[0],a=X(n[r=0===i?12:20]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3]),(s=z(t,["mdia","mdhd"])[0])?(r=0===(i=s[0])?12:20,e[a]=X(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null},{})},G=function(e,t){var n,i,r;return n=z(t,["moof","traf"]),i=[].concat.apply([],n.map(function(t){return z(t,["tfhd"]).map(function(n){var i,r;return i=X(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),r=e[i]||9e4,(z(t,["tfdt"]).map(function(e){var t,n;return t=e[0],n=X(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=X(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n})[0]||1/0)/r})})),r=Math.min.apply(null,i),isFinite(r)?r:0},W=function(e){var t=z(e,["moov","trak"]),n=[];return t.forEach(function(e){var t=z(e,["mdia","hdlr"]),i=z(e,["tkhd"]);t.forEach(function(e,t){var r,a,s=H(e.subarray(8,12)),o=i[t];"vide"===s&&(a=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),n.push(a))})}),n};var J={findBox:z=function(e,t){var n,i,r,a,s,o=[];if(!t.length)return null;for(n=0;n<e.byteLength;)i=X(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),r=H(e.subarray(n+4,n+8)),a=i>1?n+i:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(n+8,a)):(s=z(e.subarray(n+8,a),t.slice(1))).length&&(o=o.concat(s))),n=a;return o},parseType:H=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},timescale:q,startTime:G,videoTrackIds:W},K=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},this.dispose=function(){e={}}}};K.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},K.prototype.push=function(e){this.trigger("data",e)},K.prototype.flush=function(e){this.trigger("done",e)};var Q,Z,$,ee,te,ne,ie,re=K,ae=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},se=function(e){var t,n,i=[],r=[];for(i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.push(i),r},oe=function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},le=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ue=function(e,t){var n,i,r,a,s,o=t||0,l=[];for(n=0;n<e.length;n++)for(a=e[n],i=0;i<a.length;i++)s=a[i],o+=(r=ae(s,o)).size,l.push(r);return l},ce=function(e){var t,n,i,r,a,s,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(a=r[n],i=0;i<a.length;i++)s=a[i],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},de=[33,16,5,32,164,27],he=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],pe=function(e){for(var t=[];e--;)t.push(0);return t},fe={96000:[de,[227,64],pe(154),[56]],88200:[de,[231],pe(170),[56]],64000:[de,[248,192],pe(240),[56]],48000:[de,[255,192],pe(268),[55,148,128],pe(54),[112]],44100:[de,[255,192],pe(268),[55,163,128],pe(84),[112]],32000:[de,[255,192],pe(268),[55,234],pe(226),[112]],24000:[de,[255,192],pe(268),[55,255,128],pe(268),[111,112],pe(126),[224]],16000:[de,[255,192],pe(268),[55,255,128],pe(268),[111,255],pe(269),[223,108],pe(195),[1,192]],12000:[he,pe(268),[3,127,248],pe(268),[6,255,240],pe(268),[13,255,224],pe(268),[27,253,128],pe(259),[56]],11025:[he,pe(268),[3,127,248],pe(268),[6,255,240],pe(268),[13,255,224],pe(268),[27,255,192],pe(268),[55,175,128],pe(108),[112]],8000:[he,pe(268),[3,121,16],pe(47),[7]]},me=(Q=fe,Object.keys(Q).reduce(function(e,t){return e[t]=new Uint8Array(Q[t].reduce(function(e,t){return e.concat(t)},[])),e},{}));ne=function(e,t){return Z(te(e,t))},ie=function(e,t){return $(ee(e),t)};Z=function(e){return 9e4*e},$=function(e,t){return e*t},ee=function(e){return e/9e4},te=function(e,t){return e/t};var ge=ne,ve=ie,ye=function(e,t,n,i){var r,a,s,o,l=0,u=0,c=0;if(t.length&&(r=ge(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(9e4/(e.samplerate/1024)),n&&i&&(l=r-Math.max(n,i),c=(u=Math.floor(l/a))*a),!(u<1||c>45e3))){for((s=me[e.samplerate])||(s=t[0].data),o=0;o<u;o++)t.splice(o,0,{data:s});e.baseMediaDecodeTime-=Math.floor(ve(c,e.samplerate))}},be=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},_e=function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},Te=function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r},Se=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ke=function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},we=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ce=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}t+=r,i=0,r=0}return n},je=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ee=function(e,t){var n,i,r,a,s=[];if(!(64&t[0]))return s;for(i=31&t[0],n=0;n<i;n++)a={type:3&t[2+(r=3*n)],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s},Ae=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},xe=4,Le=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new De(0,0),new De(0,1),new De(1,0),new De(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))},this)};(Le.prototype=new re).push=function(e){var t,n,i;if("sei_rbsp"===e.nalUnitType&&(t=Ce(e.escapedRBSP)).payloadType===xe&&(n=je(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=Ee(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Le.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(e){e.flush()},this)):this.ccStreams_.forEach(function(e){e.flush()},this)},Le.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},Le.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Le.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Le.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)};var Oe={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},Ue=function(e){return null===e?"":(e=Oe[e]||e,String.fromCharCode(e))},Pe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ie=function(){for(var e=[],t=15;t--;)e.push("");return e},De=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ie();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ie();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ie()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))a=Ue((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(i,r))"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),a=Ue((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var s=Pe.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),a=Ue(i),a+=Ue(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};De.prototype=new re,De.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},De.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ie(),this.nonDisplayed_=Ie(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},De.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_},De.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},De.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},De.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},De.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},De.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},De.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},De.prototype.isNormalChar=function(e){return e>=32&&e<=127},De.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ie(),this.displayed_=Ie()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},De.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,n)},De.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},De.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},De.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},De.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},De.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Re={CaptionStream:Le,Cea608Stream:De},Me={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Be=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ne=function e(t){var n,i;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void 0===i&&(i=e.dts),e.dts=Be(e.dts,i),e.pts=Be(e.pts,i),n=e.dts,this.trigger("data",e))},this.flush=function(){i=n,this.trigger("done")},this.discontinuity=function(){i=void 0,n=void 0}};Ne.prototype=new re;var Fe,Ve=Ne,ze=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},He=function(e,t,n){return decodeURIComponent(ze(e,t,n))},qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ge={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=He(e.data,1,t),e.value=He(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=He(e.data,1,t),e.url=He(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(ze(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Fe=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},i=0,r=[],a=0;if(Fe.prototype.init.call(this),this.dispatchType=Me.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,s,o,l,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(r.push(e),a+=e.data.byteLength,1===r.length&&(i=qe(e.data.subarray(6,10)),i+=10),!(a<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},u=0;u<i;)t.data.set(r[0].data.subarray(0,i-u),u),u+=r[0].data.byteLength,a-=r[0].data.byteLength,r.shift();s=10,64&t.data[5]&&(s+=4,s+=qe(t.data.subarray(10,14)),i-=qe(t.data.subarray(16,20)));do{if((o=qe(t.data.subarray(s+4,s+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((l={id:String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]),data:t.data.subarray(s+10,s+o+10)}).key=l.id,Ge[l.id]&&(Ge[l.id](l),"com.apple.streaming.transportStreamTimestamp"===l.owner)){var c=l.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],l.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=l.timeStamp,t.dts=l.timeStamp),this.trigger("timestamp",l)}t.frames.push(l),s+=10,s+=o}while(s<i);this.trigger("data",t)}}}).prototype=new re;var We,Ye,Xe,Je=Fe,Ke=Ve;(We=function(){var e=new Uint8Array(188),t=0;We.prototype.init.call(this),this.push=function(n){var i,r=0,a=188;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;a<i.byteLength;)71!==i[r]||71!==i[a]?(r++,a++):(this.trigger("data",i.subarray(r,a)),r+=188,a+=188);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=new re,(Ye=function(){var e,t,n,i;Ye.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var a=e[r],s=(31&e[r+1])<<8|e[r+2];a===Me.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=s:a===Me.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=s:a===Me.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Me.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Me.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new re,Ye.STREAM_TYPES={h264:27,adts:15},(Xe=function(){var e=this,t={data:[],size:0},n={data:[],size:0},i={data:[],size:0},r=function(t,n,i){var r,a,s=new Uint8Array(t.size),o={type:n},l=0,u=0;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,l=0;l<t.data.length;l++)a=t.data[l],s.set(a.data,u),u+=a.data.byteLength;var c,d,h;c=s,(d=o).packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8]),r="video"===n||o.packetLength<=t.size,(i||r)&&(t.size=0,t.data.length=0),r&&e.trigger("data",o)}};Xe.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,s;switch(a.streamType){case Me.H264_STREAM_TYPE:case Me.H264_STREAM_TYPE:e=t,s="video";break;case Me.ADTS_STREAM_TYPE:e=n,s="audio";break;case Me.METADATA_STREAM_TYPE:e=i,s="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&r(e,s,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},n=a.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[a.type]()},this.flush=function(){r(t,"video"),r(n,"audio"),r(i,"timed-metadata"),this.trigger("done")}}).prototype=new re;var Qe={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:We,TransportParseStream:Ye,ElementaryStream:Xe,TimestampRolloverStream:Ke,CaptionStream:Re.CaptionStream,Cea608Stream:Re.Cea608Stream,MetadataStream:Je};for(var Ze in Me)Me.hasOwnProperty(Ze)&&(Qe[Ze]=Me[Ze]);var $e,et=Qe,tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];($e=function(){var e;$e.prototype.init.call(this),this.push=function(t){var n,i,r,a,s,o,l=0,u=0;if("audio"===t.type)for(e?(a=e,(e=new Uint8Array(a.byteLength+t.data.byteLength)).set(a),e.set(t.data,a.byteLength)):e=t.data;l+5<e.length;)if(255===e[l]&&240==(246&e[l+1])){if(i=2*(1&~e[l+1]),n=(3&e[l+3])<<11|e[l+4]<<3|(224&e[l+5])>>5,o=9e4*(s=1024*(1+(3&e[l+6])))/tt[(60&e[l+2])>>>2],r=l+n,e.byteLength<r)return;if(this.trigger("data",{pts:t.pts+u*o,dts:t.dts+u*o,sampleCount:s,audioobjecttype:1+(e[l+2]>>>6&3),channelcount:(1&e[l+2])<<2|(192&e[l+3])>>>6,samplerate:tt[(60&e[l+2])>>>2],samplingfrequencyindex:(60&e[l+2])>>>2,samplesize:16,data:e.subarray(l+7+i,r)}),e.byteLength===r)return void(e=void 0);u++,e=e.subarray(r)}else l++},this.flush=function(){this.trigger("done")}}).prototype=new re;var nt,it,rt,at=$e,st=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),n=new DataView(a.buffer).getUint32(0),i=8*s,t-=s},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),a=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(0!=(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(it=function(){var e,t,n=0;it.prototype.init.call(this),this.push=function(i){var r;for(t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}}).prototype=new re,rt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(nt=function(){var e,t,n,i,r,a,s,o=new it;nt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",function(s){var o={trackId:t,pts:n,dts:i,data:s};switch(31&s[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)}),o.on("done",function(){e.trigger("done")}),this.flush=function(){o.flush()},s=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},a=function(e){var t,n,i,r,a,o,l,u,c,d,h,p,f,m=0,g=0,v=0,y=0,b=1;if(n=(t=new st(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),rt[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,f=0;f<h;f++)t.readBoolean()&&s(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}p&&(b=p[0]/p[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:Math.ceil((16*(u+1)-2*m-2*g)*b),height:(2-d)*(c+1)*16-2*v-2*y}}}).prototype=new re;var ot,lt={H264Stream:nt,NalByteStream:it},ut=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},ct=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},dt=function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n};(ot=function(){var e=new Uint8Array,t=0;ot.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,a,s,o=0,l=0;for(e.length?(s=e.length,(e=new Uint8Array(n.byteLength+s)).set(e.subarray(0,s)),e.set(n,s)):e=n;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=dt(e,l))>e.length)break;a={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",a),l+=o}else{if(e.length-l<10)break;if(l+(o=ct(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}i=e.length-l,e=i>0?e.subarray(l):new Uint8Array}}).prototype=new re;var ht,pt,ft,mt,gt=ot,vt=lt.H264Stream,yt=ut,bt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],_t=["width","height","profileIdc","levelIdc","profileCompatibility"],Tt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};(pt=function(e,t){var n=[],i=0,r=0,a=0,s=1/0;t=t||{},pt.prototype.init.call(this),this.push=function(t){we(e,t),e&&bt.forEach(function(n){e[n]=t[n]}),n.push(t)},this.setEarliestDts=function(t){r=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,l,u,c;0!==n.length?(o=be(n,e,r),e.baseMediaDecodeTime=ke(e,t.keepOriginalTimestamps),ye(e,o,a,s),e.samples=_e(o),u=Y.mdat(Te(o)),n=[],l=Y.moof(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),Se(e),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=new re,(ht=function(e,t){var n,i,r=0,a=[],s=[];t=t||{},ht.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){we(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],_t.forEach(function(t){e[t]=n[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var n,i,o,l,u,c;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=se(a),(o=oe(n))[0][0].keyFrame||((i=this.getGopForFusion_(a[0],e))?(o.unshift(i),o.byteLength+=i.byteLength,o.nalCount+=i.nalCount,o.pts=i.pts,o.dts=i.dts,o.duration+=i.duration):o=le(o)),s.length){var d;if(!(d=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Se(e),o=d}we(e,o),e.samples=ue(o),u=Y.mdat(ce(o)),e.baseMediaDecodeTime=ke(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=Y.moof(r,[e]),c=new Uint8Array(l.byteLength+u.byteLength),r++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){Se(e),n=void 0,i=void 0},this.getGopForFusion_=function(t){var n,i,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&Tt(e.pps[0],a.pps[0])&&e.sps&&Tt(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=a,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,a,o,l,u;for(a=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;t<s.length&&n<e.length&&(i=s[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,a-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===n?e:n===e.length?null:((u=e.slice(n)).byteLength=a,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,n,i,r,a,o,l;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(i=s[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(l=o?n:a))return e;var u=e.slice(l),c=u.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){s=e}}).prototype=new re,(mt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,mt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new re,mt.prototype.flush=function(e){var t,n,i,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,_t.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,bt.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,i=Y.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(i.byteLength),s.initSegment.set(i),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=t.startPts,this.keepOriginalTimestamps||(t.startTime-=o),t.startTime/=9e4,t.endTime=t.endPts,this.keepOriginalTimestamps||(t.endTime-=o),t.endTime/=9e4,s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=n.pts,this.keepOriginalTimestamps||(n.cueTime-=o),n.cueTime/=9e4,s.metadata.push(n);s.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",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(ft=function(e){var t,n,i=this,r=!0;ft.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new et.MetadataStream,t.aacStream=new gt,t.audioTimestampRolloverStream=new et.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new et.TimestampRolloverStream("timed-metadata"),t.adtsStream=new at,t.coalesceStream=new mt(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(r){"timed-metadata"!==r.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new pt(n,e),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new et.MetadataStream,r.packetStream=new et.TransportPacketStream,r.parseStream=new et.TransportParseStream,r.elementaryStream=new et.ElementaryStream,r.videoTimestampRolloverStream=new et.TimestampRolloverStream("video"),r.audioTimestampRolloverStream=new et.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new et.TimestampRolloverStream("timed-metadata"),r.adtsStream=new at,r.h264Stream=new vt,r.captionStream=new et.CaptionStream,r.coalesceStream=new mt(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream),r.elementaryStream.pipe(r.videoTimestampRolloverStream).pipe(r.h264Stream),r.elementaryStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.elementaryStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new ht(t,e),r.videoSegmentStream.on("timelineStartInfo",function(e){n&&(n.timelineStartInfo=e,r.audioSegmentStream.setEarliestDts(e.dts))}),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new pt(n,e),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream))}}),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Se(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Se(t),r.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=i)),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(r){var t=yt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new re;var St,kt,wt={Transmuxer:ft,VideoSegmentStream:ht,AudioSegmentStream:pt,AUDIO_PROPERTIES:bt,VIDEO_PROPERTIES:_t},Ct=J.parseType,jt=function(e){return new Date(1e3*e-20828448e5)},Et=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},At=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},xt={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:St(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(i=6,r=0;r<o;r++)n=a.getUint16(i),i+=2,s.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=a.getUint16(i),i+=2,s.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return s},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:Ct(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},i=8;i<e.byteLength;)n.compatibleBrands.push(Ct(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:St(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:St(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:Ct(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:At(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=jt(n.getUint32(i)),i+=8,r.modificationTime=jt(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=jt(n.getUint32(i)),i+=4,r.modificationTime=jt(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:St(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:St(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=St(e.subarray(28))[0]),n},moof:function(e){return{boxes:St(e)}},moov:function(e){return{boxes:St(e)}},mvex:function(e){return{boxes:St(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=jt(t.getUint32(n)),n+=8,i.modificationTime=jt(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=jt(t.getUint32(n)),n+=4,i.modificationTime=jt(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},r=n.getUint16(22);for(t=24;r;t+=12,r--)i.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:St(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:St(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return xt.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],s=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],u=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),u&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=jt(t.getUint32(n)),n+=8,i.modificationTime=jt(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=jt(t.getUint32(n)),n+=4,i.modificationTime=jt(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,i.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/16,i},traf:function(e){return{boxes:St(e)}},trak:function(e){return{boxes:St(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],l=4&n.flags[1],u=8&n.flags[1],c=i.getUint32(4),d=8;for(r&&(n.dataOffset=i.getInt32(d),d+=4),a&&c&&(t={flags:Et(e.subarray(d,d+4))},d+=4,s&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),u&&(t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},s&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),l&&(t.flags=Et(e.subarray(d,d+4)),d+=4),u&&(t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},Lt={inspect:St=function(e){for(var t,n,i,r,a,s=0,o=[],l=new ArrayBuffer(e.length),u=new Uint8Array(l),c=0;c<e.length;++c)u[c]=e[c];for(t=new DataView(l);s<e.byteLength;)n=t.getUint32(s),i=Ct(e.subarray(s+4,s+8)),r=n>1?s+n:e.byteLength,(a=(xt[i]||function(e){return{data:e}})(e.subarray(s+8,r))).size=n,a.type=i,o.push(a),s=r;return o},textify:kt=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map(function(e,i){return n+e.type+"\n"+Object.keys(e).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(t){var i=n+"  "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return a?1===a.length?i+"<"+a.join("").slice(1)+">":i+"<\n"+a.map(function(e){return n+"  "+e}).join("\n")+"\n"+n+"  >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map(function(e,t){return 0===t?e:n+"  "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+kt(e.boxes,t+1):"")}).join("\n")},parseTfdt:xt.tfdt,parseHdlr:xt.hdlr,parseTfhd:xt.tfhd,parseTrun:xt.trun},Ot=Ae,Ut=Re.CaptionStream,Pt=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},It=function(e,t){var n=J.findBox(e,["moof","traf"]),i=J.findBox(e,["mdat"]),r={},a=[];return i.forEach(function(e,t){var i=n[t];a.push({mdat:e,traf:i})}),a.forEach(function(e){var n,i=e.mdat,a=e.traf,s=J.findBox(a,["tfhd"]),o=Lt.parseTfhd(s[0]),l=o.trackId,u=J.findBox(a,["tfdt"]),c=u.length>0?Lt.parseTfdt(u[0]).baseMediaDecodeTime:0,d=J.findBox(a,["trun"]);t===l&&d.length>0&&(n=function(e,t,n){var i,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l=[];for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+a),c=Pt(r,t);i={nalUnitType:"sei_rbsp",size:a,data:u,escapedRBSP:Ot(u),trackId:n},c?(i.pts=c.pts,i.dts=c.dts,s=c):(i.pts=s.pts,i.dts=s.dts),l.push(i)}return l}(i,function(e,t,n){var i=t,r=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,o=[];return e.forEach(function(e){var t=Lt.parseTrun(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=i+e.compositionTimeOffset,i+=e.duration}),o=o.concat(t)}),o}(d,c,o),l),r[l]||(r[l]=[]),r[l]=r[l].concat(n))}),r},Dt={generator:Y,probe:J,Transmuxer:wt.Transmuxer,AudioSegmentStream:wt.AudioSegmentStream,VideoSegmentStream:wt.VideoSegmentStream,CaptionParser:function(){var e,t,n,i,r,a=!1;this.isInitialized=function(){return a},this.init=function(){e=new Ut,a=!0,e.on("data",function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&i===t[n])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))n=a[0],i=s[n];else if(!n||!i)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,a,s)}return null!==(o=function(e,t,n){return t?{seiNals:It(e,t)[t],timescale:n}:null}(e,n,i))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},Rt=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Mt=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Bt=function(){function e(t,n){Rt(this,e),this.options=n||{},this.self=t,this.init()}return Mt(e,[{key:"init",value:function(){var e,t;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Dt.Transmuxer(this.options),e=this.self,(t=this.transmuxer).on("data",function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])}),t.captionStream&&t.captionStream.on("data",function(t){e.postMessage({action:"caption",data:t})}),t.on("done",function(t){e.postMessage({action:"done"})}),t.on("gopInfo",function(t){e.postMessage({action:"gopInfo",gopInfo:t})})}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),e}();new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new Bt(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new Bt(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()}),hs={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},ps=function(e){return e.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})})},fs=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n={codecCount:0};return n.codecCount=t.split(",").length,n.codecCount=n.codecCount||2,(e=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t))&&(n.videoCodec=e[2],n.videoObjectTypeIndicator=e[3]),n.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t),n.audioProfile=n.audioProfile&&n.audioProfile[2],n},ms=function(e,t,n){return e+"/"+t+'; codecs="'+n.filter(function(e){return!!e}).join(", ")+'"'},gs=function(e,t){var n=function(e){return e.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"}(t),i=function(e){var t=e.attributes||{};return t.CODECS?fs(t.CODECS):hs}(t),r=t.attributes||{},a=!0,s=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&r.AUDIO){var o=e.mediaGroups.AUDIO[r.AUDIO];if(o)for(var l in s=!0,a=!1,o)if(!o[l].uri&&!o[l].playlists){a=!0;break}}s&&!i.audioProfile&&(a||(i.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return fs(r.playlists[0].attributes.CODECS).audioProfile}return null}(e,r.AUDIO)),i.audioProfile||(Zr.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),i.audioProfile=hs.audioProfile));var u={};i.videoCodec&&(u.video=""+i.videoCodec+i.videoObjectTypeIndicator),i.audioProfile&&(u.audio="mp4a.40."+i.audioProfile);var c=ms("audio",n,[u.audio]),d=ms("video",n,[u.video]),h=ms("video",n,[u.video,u.audio]);return s?!a&&u.video?[d,c]:a||u.video?[h,c]:[c,c]:u.video?[h]:[c]},vs=function(e){return/mp4a\.\d+.\d+/i.test(e)},ys=function(e){return/avc1\.[\da-f]+/i.test(e)},bs=function(e,t,n){if(null==t||!e.length)return[];var i=Math.ceil(9e4*(t-n+3)),r=void 0;for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)},_s=function(e,t,n){var i=null,r=null,a=0,s=[],o=[];if(!e&&!t)return Zr.createTimeRange();if(!e)return t.buffered;if(!t)return e.buffered;if(n)return e.buffered;if(0===e.buffered.length&&0===t.buffered.length)return Zr.createTimeRange();for(var l=e.buffered,u=t.buffered,c=l.length;c--;)s.push({time:l.start(c),type:"start"}),s.push({time:l.end(c),type:"end"});for(c=u.length;c--;)s.push({time:u.start(c),type:"start"}),s.push({time:u.end(c),type:"end"});for(s.sort(function(e,t){return e.time-t.time}),c=0;c<s.length;c++)"start"===s[c].type?2===++a&&(i=s[c].time):"end"===s[c].type&&1===--a&&(r=s[c].time),null!==i&&null!==r&&(o.push([i,r]),i=null,r=null);return Zr.createTimeRanges(o)},Ts=function(e){function t(e,n){na(this,t);var i=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,Zr.EventTarget));i.timestampOffset_=0,i.pendingBuffers_=[],i.bufferUpdating_=!1,i.mediaSource_=e,i.codecs_=n,i.audioCodec_=null,i.videoCodec_=null,i.audioDisabled_=!1,i.appendAudioInitSegment_=!0,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=Zr.browser.IE_VERSION>=11;var r={remux:!1,alignGopsAtEnd:i.safeAppend_};return i.codecs_.forEach(function(e){vs(e)?i.audioCodec_=e:ys(e)&&(i.videoCodec_=e)}),i.transmuxer_=new ds,i.transmuxer_.postMessage({action:"init",options:r}),i.transmuxer_.onmessage=function(e){return"data"===e.data.action?i.data_(e):"done"===e.data.action?i.done_(e):"gopInfo"===e.data.action?i.appendGopInfo_(e):void 0},Object.defineProperty(i,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(i,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(i,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(i,"buffered",{get:function(){return _s(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),i}return ra(t,e),ia(t,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,n){var i=t.player_;if(n.captions&&n.captions.length)for(var r in e.inbandTextTracks_||(e.inbandTextTracks_={}),n.captionStreams)if(!e.inbandTextTracks_[r]){i.tech_.trigger({type:"usage",name:"hls-608"});var a=i.textTracks().getTrackById(r);e.inbandTextTracks_[r]=a||i.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}n.metadata&&n.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=n.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var e=this,t=["audio","video"];t.forEach(function(n){if(e[n+"Codec_"]&&!e[n+"Buffer_"]){var i=null;if(e.mediaSource_[n+"Buffer_"])(i=e.mediaSource_[n+"Buffer_"]).updating=!1;else{var r=n+'/mp4;codecs="'+e[n+"Codec_"]+'"';i=function(e,t){var n=e.addSourceBuffer(t),i=Object.create(null);i.updating=!1,i.realBuffer_=n;var r=function(e){"function"==typeof n[e]?i[e]=function(){return n[e].apply(n,arguments)}:void 0===i[e]&&Object.defineProperty(i,e,{get:function(){return n[e]},set:function(t){return n[e]=t}})};for(var a in n)r(a);return i}(e.mediaSource_.nativeMediaSource_,r),e.mediaSource_[n+"Buffer_"]=i}e[n+"Buffer_"]=i,["update","updatestart","updateend"].forEach(function(r){i.addEventListener(r,function(){if("audio"!==n||!e.audioDisabled_)return"updateend"===r&&(e[n+"Buffer_"].updating=!1),t.every(function(t){return!("audio"!==t||!e.audioDisabled_)||(n===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating)})?e.trigger(r):void 0})})}})}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:bs(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var i=t[0].pts,r=0;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=function(e,t,n,i){for(var r=Math.ceil(9e4*(t-i)),a=Math.ceil(9e4*(n-i)),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),s.splice(l,o-l+1),s}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),Qa(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)Qa(e,t,this.inbandTextTracks_[n])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce(function(e,t){var n=t.type,i=t.data,r=t.initSegment;return e[n].segments.push(i),e[n].bytes+=i.byteLength,e[n].initSegment=r,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[n].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e},e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_),$a(this,e.captions,e.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var n=0,i=void 0;if(e.bytes){i=new Uint8Array(e.bytes),e.segments.forEach(function(e){i.set(e,n),n+=e.byteLength});try{t.updating=!0,t.appendBuffer(i)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{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}}]),t}(Zr.EventTarget),Ss=function(e){function t(){na(this,t);var e=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=void 0;for(n in e.nativeMediaSource_=new f.a.MediaSource,e.nativeMediaSource_)n in t.prototype||"function"!=typeof e.nativeMediaSource_[n]||(e[n]=e.nativeMediaSource_[n].bind(e.nativeMediaSource_));return e.duration_=NaN,Object.defineProperty(e,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){this.duration_=e,e===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(e,"seekable",{get:function(){return this.duration_===1/0?Zr.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(e,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(e,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),e.sourceBuffers=[],e.activeSourceBuffers_=[],e.updateActiveSourceBuffers_=function(){if(e.activeSourceBuffers_.length=0,1===e.sourceBuffers.length){var t=e.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void e.activeSourceBuffers_.push(t)}for(var n=!1,i=!0,r=0;r<e.player_.audioTracks().length;r++){var a=e.player_.audioTracks()[r];if(a.enabled&&"main"!==a.kind){n=!0,i=!1;break}}e.sourceBuffers.forEach(function(t,r){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=n;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,i=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=r?i:!i,t.audioDisabled_))return;e.activeSourceBuffers_.push(t)})},e.onPlayerMediachange_=function(){e.sourceBuffers.forEach(function(e){e.appendAudioInitSegment_=!0})},e.onHlsReset_=function(){e.sourceBuffers.forEach(function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})})},e.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach(function(e){return e.timeMapping_=t.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},e),e.on("sourceopen",function(t){var n=C.a.querySelector('[src="'+e.url_+'"]');n&&(e.player_=Zr(n.parentNode),e.player_&&(e.player_.tech_.on("hls-reset",e.onHlsReset_),e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_),e.player_.audioTracks&&e.player_.audioTracks()&&(e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)),e.player_.on("mediachange",e.onPlayerMediachange_)))}),e.on("sourceended",function(t){for(var n=Za(e.duration),i=0;i<e.sourceBuffers.length;i++){var r=e.sourceBuffers[i],a=r.metadataTrack_&&r.metadataTrack_.cues;a&&a.length&&(a[a.length-1].endTime=n)}}),e.on("sourceclose",function(e){this.sourceBuffers.forEach(function(e){e.transmuxer_&&e.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_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),e}return ra(t,e),ia(t,[{key:"addSeekableRange_",value:function(e,t){var n=void 0;if(this.duration!==1/0)throw(n=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",n.code=11,n;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,n=function(e){var t={type:"",parameters:{}},n=e.trim().split(";");return t.type=n.shift().trim(),n.forEach(function(e){var n=e.trim().split("=");if(n.length>1){var i=n[0].replace(/"/g,"").trim(),r=n[1].replace(/"/g,"").trim();t.parameters[i]=r}}),t}(e);if(/^(video|audio)\/mp2t$/i.test(n.type)){var i=[];n.parameters&&n.parameters.codecs&&(i=n.parameters.codecs.split(","),i=(i=ps(i)).filter(function(e){return vs(e)||ys(e)})),0===i.length&&(i=["avc1.4d400d","mp4a.40.2"]),t=new Ts(this,i),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),t}(Zr.EventTarget),ks=0;Zr.mediaSources={};var ws=function(e,t){var n=Zr.mediaSources[e];if(!n)throw new Error("Media Source not found (Video.js)");n.trigger({type:"sourceopen",swfId:t})},Cs=function(){return!!f.a.MediaSource&&!!f.a.MediaSource.isTypeSupported&&f.a.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},js=function(){if(this.MediaSource={open:ws,supportsNativeMediaSources:Cs},Cs())return new Ss;throw new Error("Cannot use create a virtual MediaSource for this video")};js.open=ws,js.supportsNativeMediaSources=Cs;var Es={createObjectURL:function(e){var t=void 0;return e instanceof Ss?(t=f.a.URL.createObjectURL(e.nativeMediaSource_),e.url_=t,t):e instanceof Ss?(t="blob:vjs-media-source/"+ks,ks++,Zr.mediaSources[t]=e,t):(t=f.a.URL.createObjectURL(e),e.url_=t,t)}};Zr.MediaSource=js,Zr.URL=Es;var As=Zr.EventTarget,xs=Zr.mergeOptions,Ls=function(e,t){for(var n=xs(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),i=0;i<t.playlists.length;i++){var r=da(n,t.playlists[i]);r&&(n=r)}return ca(t,function(e,t,i,r){if(e.playlists&&e.playlists.length){var a=e.playlists[0].uri,s=da(n,e.playlists[0]);s&&((n=s).mediaGroups[t][i][r].playlists[0]=n.playlists[a])}}),n},Os=function(e){function t(e,n,i,r){na(this,t);var a=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(a.hls_=n,a.withCredentials=i,!e)throw new Error("A non-empty playlist URL or playlist is required");return a.on("minimumUpdatePeriod",function(){a.refreshXml_()}),a.on("mediaupdatetimeout",function(){a.refreshMedia_()}),"string"==typeof e?(a.srcUrl=e,a.state="HAVE_NOTHING",aa(a)):(a.masterPlaylistLoader_=r,a.state="HAVE_METADATA",a.started=!0,a.media(e),f.a.setTimeout(function(){a.trigger("loadedmetadata")},0),a)}return ra(t,As),ia(t,[{key:"dispose",value:function(){this.stopRequest(),f.a.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var t=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var n=!this.media_||e.uri!==this.media_.uri;this.state="HAVE_METADATA",n&&(this.media_&&this.trigger("mediachanging"),this.media_=e,this.refreshMedia_(),"HAVE_MASTER"!==t&&this.trigger("mediachange"))}},{key:"pause",value:function(){this.stopRequest(),f.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(e){var t=this;f.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=f.a.setTimeout(function(){return t.load()},i)}else this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var e=Object(j.a)(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_});e.uri=this.srcUrl;for(var t=0;t<e.playlists.length;t++){var n="placeholder-uri-"+t;e.playlists[t].uri=n,e.playlists[n]=e.playlists[t]}return ca(e,function(t,n,i,r){if(t.playlists&&t.playlists.length){var a="placeholder-uri-"+n+"-"+i+"-"+r;t.playlists[0].uri=a,e.playlists[a]=t.playlists[0]}}),ha(e),pa(e),e}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?e.masterLoaded_=Date.parse(n.responseHeaders.date):e.masterLoaded_=Date.now(),e.syncClientServerClock_(e.onClientServerClockSync_.bind(e))}})}},{key:"syncClientServerClock_",value:function(e){var t=this,n=Object(j.b)(this.masterXml_);return null===n?(this.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.clientOffset_=n.value-Date.now(),e()):void(this.request=this.hls_.xhr({uri:ta(this.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},function(i,r){if(t.request){if(i)return t.clientOffset_=t.masterLoaded_-Date.now(),e();var a=void 0;a="HEAD"===n.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.clientOffset_=a-Date.now(),e()}}))}},{key:"onClientServerClockSync_",value:function(){var e=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),f.a.setTimeout(function(){e.trigger("loadedmetadata")},0),this.master.minimumUpdatePeriod&&f.a.setTimeout(function(){e.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}},{key:"refreshXml_",value:function(){var e=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=n.responseText;var i=e.parseMasterXml();e.master=Ls(e.master,i),f.a.setTimeout(function(){e.trigger("minimumUpdatePeriod")},e.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(){var e=this,t=void 0,n=void 0;this.masterPlaylistLoader_?(t=this.masterPlaylistLoader_.master,n=this.masterPlaylistLoader_.parseMasterXml()):(t=this.master,n=this.parseMasterXml());var i=Ls(t,n);i?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=i:this.master=i,this.media_=i.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=f.a.setTimeout(function(){e.trigger("mediaupdatetimeout")},fa(this.media(),!!i))),this.trigger("loadedplaylist")}}]),t}(),Us=function(e){return Zr.log.debug?Zr.log.debug.bind(Zr,"VHS:",e+" >"):function(){}};function Ps(){}var Is=function(){function e(t,n,i,r){na(this,e),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=i,this.mimeType_=n,this.logger_=Us("SourceUpdater["+i+"]["+n+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,n,r)):this.createSourceBuffer_(n,r)}return ia(e,[{key:"createSourceBuffer_",value:function(e,t){var n=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",function(){n.start_()}):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.logger_("buffered ["+Ja(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},e)}},{key:"appendBuffer",value:function(e,t){var n=this;this.processedAppend_=!0,this.queueCallback_(function(){n.sourceBuffer_.appendBuffer(e)},t)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:Zr.createTimeRanges()}},{key:"remove",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ps;this.processedAppend_&&this.queueCallback_(function(){n.logger_("remove ["+e+" => "+t+"]"),n.sourceBuffer_.remove(e,t)},i)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(e){var t=this;return void 0!==e&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=e}),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),e}(),Ds={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},Rs=2,Ms=-101,Bs=-102,Ns=function(e){var t,n,i={};return e.byterange&&(i.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),i},Fs=function(e){e.forEach(function(e){e.abort()})},Vs=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ms,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Bs,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Rs,xhr:t}:null},zs=function(e,t,n){var i=0,r=!1;return function(a,s){if(!r)return a?(r=!0,Fs(e),n(a,s)):(i+=1)===e.length?(s.endOfAllRequests=Date.now(),s.encryptedBytes?function(e,t,n){e.addEventListener("message",function i(r){if(r.data.source===t.requestId){e.removeEventListener("message",i);var a=r.data.decrypted;return t.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength),n(null,t)}}),e.postMessage(Ba({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])}(t,s,n):n(null,s)):void 0}},Hs=function(e,t){return function(n){var i,r,a;return e.stats=Zr.mergeOptions(e.stats,(r=(i=n).target,(a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-r.requestTime||0}).bytesReceived=i.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(n,e)}},qs=function(e,t,n,i,r,a,s){var o=[],l=zs(o,n,s);if(r.key){var u=e(Zr.mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,i){var r=i.response,a=Vs(n,i);if(a)return t(a,e);if(16!==r.byteLength)return t({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:Rs,xhr:i},e);var s=new DataView(r);return e.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}}(r,l));o.push(u)}if(r.map&&!r.map.bytes){var c=e(Zr.mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ns(r.map)}),function(e,t,n){return function(i,r){var a=r.response,s=Vs(i,r);return s?n(s,e):0===a.byteLength?n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Rs,xhr:r},e):(e.map.bytes=new Uint8Array(r.response),t.isInitialized()||t.init(),e.map.timescales=A.a.timescale(e.map.bytes),e.map.videoTrackIds=A.a.videoTrackIds(e.map.bytes),n(null,e))}}(r,i,l));o.push(c)}var d=e(Zr.mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:Ns(r)}),function(e,t,n){return function(i,r){var a=r.response,s=Vs(i,r),o=void 0;return s?n(s,e):0===a.byteLength?n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Rs,xhr:r},e):(e.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),e.key?e.encryptedBytes=new Uint8Array(r.response):e.bytes=new Uint8Array(r.response),e.map&&e.map.bytes&&(t.isInitialized()||t.init(),(o=t.parse(e.bytes,e.map.videoTrackIds,e.map.timescales))&&o.captions&&(e.captionStreams=o.captionStreams,e.fmp4Captions=o.captions)),n(null,e))}}(r,i,l));return d.addEventListener("progress",Hs(r,a)),o.push(d),function(){return Fs(o)}},Gs=function(e,t){var n;return e&&(n=f.a.getComputedStyle(e))?n[t]:""},Ws=function(e,t){var n=e.slice();e.sort(function(e,i){var r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r})},Ys=function(e,t){var n=void 0,i=void 0;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||f.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),n-(i=i||f.a.Number.MAX_VALUE)},Xs=function(e,t,n){if(!e||!t)return!1;var i=n===e.segments.length;return e.endList&&"open"===t.readyState&&i},Js=function(e){return"number"==typeof e&&isFinite(e)},Ks=function(e){function t(e){na(this,t);var n=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=e.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.hasPlayed_=e.hasPlayed,n.currentTime_=e.currentTime,n.seekable_=e.seekable,n.seeking_=e.seeking,n.duration_=e.duration,n.mediaSource_=e.mediaSource,n.hls_=e.hls,n.loaderType_=e.loaderType,n.startingMedia_=void 0,n.segmentMetadataTrack_=e.segmentMetadataTrack,n.goalBufferLength_=e.goalBufferLength,n.sourceType_=e.sourceType,n.inbandTextTracks_=e.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 x.CaptionParser,n.decrypter_=e.decrypter,n.syncController_=e.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_=Us("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(n,"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),n}return ra(t,e),ia(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_.reset()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():Zr.createTimeRanges()}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=Na(e),i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,timescales:e.timescales,videoTrackIds:e.videoTrackIds}),i||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new Is(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var r=n?n.id:null;if(this.logger_("playlist update ["+r+" => "+e.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(n&&n.uri===e.uri){var a=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),i&&(i.mediaIndex-=a,i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(f.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e,t){this.mimeType_||(this.mimeType_=e,this.sourceBufferEmitter_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(e){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),e),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(e,t,n){if(this.sourceUpdater_&&this.sourceUpdater_.remove(e,t,n),Qa(e,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Qa(e,t,this.inbandTextTracks_[i])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&f.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=f.a.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&f.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=f.a.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e)Xs(this.playlist_,this.mediaSource_,e.mediaIndex)?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment,this.captionParser_.clearAllCaptions()),this.loadSegment_(e))}}},{key:"checkBuffer_",value:function(e,t,n,i,r,a){var s=0,o=void 0;e.length&&(s=e.end(e.length-1));var l=Math.max(0,s-r);if(!t.segments.length)return null;if(l>=this.goalBufferLength_())return null;if(!i&&l>=1)return null;if(null===a)return n=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,n,null,!0);if(null!==n){var u=t.segments[n];return o=u&&u.end?u.end:s,this.generateSegmentInfo_(t,n+1,o,!1)}if(this.fetchAtBuffer_){var c=Oa.getMediaInfoForTime(t,s,a.segmentIndex,a.time);n=c.mediaIndex,o=c.startTime}else{var d=Oa.getMediaInfoForTime(t,r,a.segmentIndex,a.time);n=d.mediaIndex,o=d.startTime}return this.generateSegmentInfo_(t,n,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var n=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,n,i){if(t<0||t>=e.segments.length)return null;var r=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:i,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),n=e.bandwidth,i=this.pendingSegment_.duration,r=Oa.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=function(e){var t=e.master,n=e.currentTime,i=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,l=e.syncController,u=t.playlists.filter(function(e){return!Oa.isIncompatible(e)}),c=u.filter(Oa.isEnabled);c.length||(c=u.filter(function(e){return!Oa.isDisabled(e)}));var d=c.filter(Oa.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=l.getSyncPoint(e,r,o,n)?1:2;return{playlist:e,rebufferingImpact:Oa.estimateSegmentRequestTime(a,i,e)*t-s}}),h=d.filter(function(e){return e.rebufferingImpact<=0});return Ws(h,function(e,t){return Ys(t.playlist,e.playlist)}),h.length?h[0]:(Ws(d,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),d[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,l=.5;return a<=1/30&&(l=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<l?!1:(this.bandwidth=s.playlist.attributes.BANDWIDTH*Ds.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=qs(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t=function(e,t,n){var i=void 0;return i=e.length&&e.start(0)>0&&e.start(0)<t?e.start(0):t-30,Math.min(i,t-n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key={resolvedUri:t.key.resolvedUri,iv:i}}return t.map&&(n.map=this.initSegment(t.map)),n}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===Bs?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===Ms?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,e.fmp4Captions&&(!function(e,t,n){for(var i in n)if(!e[i]){t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(i);e[i]=r||t.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,e.captionStreams),function(e){var t=e.inbandTextTracks,n=e.captionArray,i=e.timestampOffset;if(n){var r=window.WebKitDataCue||window.VTTCue;n.forEach(function(e){var n=e.stream,a=e.startTime,s=e.endTime;t[n]&&(a+=i,s+=i,t[n].addCue(new r(a,s,e.text)))})}}({inbandTextTracks:this.inbandTextTracks_,captionArray:e.fmp4Captions,timestampOffset:0}),this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,n=t.segment,i=this.syncController_.probeSegmentInfo(t);void 0===this.startingMedia_&&i&&(i.containsAudio||i.containsVideo)&&(this.startingMedia_={containsAudio:i.containsAudio,containsVideo:i.containsVideo});var r,a,s,o=(r=this.loaderType_,a=this.startingMedia_,s=i,"main"===r&&a&&s?s.containsAudio||s.containsVideo?a.containsVideo&&!s.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.":!a.containsVideo&&s.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);if(o)return this.error({message:o,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var l=this.syncController_.mappingForTimeline(t.timeline);if(null!==l&&this.trigger({type:"segmenttimemapping",mapping:l}),this.state="APPENDING",n.map){var u=Na(n.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==u){var c=this.initSegment(n.map);this.sourceUpdater_.appendBuffer(c.bytes,function(){e.activeInitSegmentId_=u})}}t.byteLength=t.bytes.byteLength,"number"==typeof n.start&&"number"==typeof n.end?this.mediaSecondsLoaded+=n.end-n.start:this.mediaSecondsLoaded+=n.duration,this.logger_(function(e){var t=e.segment,n=t.start,i=t.end,r=e.playlist,a=r.mediaSequence,s=r.id,o=r.segments,l=void 0===o?[]:o,u=e.mediaIndex,c=e.timeline;return["appending ["+u+"] of ["+a+", "+(a+l.length)+"] from playlist ["+s+"]","["+n+" => "+i+"] in timeline ["+c+"]"].join(" ")}(t)),this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,n=null!==this.mediaIndex;(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)?this.resetEverything():(n&&this.trigger("bandwidthupdate"),this.trigger("progress"),Xs(e.playlist,this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,i=t.end;if(Js(n)&&Js(i)){Qa(n,i,this.segmentMetadataTrack_);var r=f.a.WebKitDataCue||f.a.VTTCue,a={dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:n,end:i},s=new r(n,i,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),t}(Zr.EventTarget),Qs=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Zs=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),$s=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};na(this,t);var i=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.mediaSource_=null,i.subtitlesTrack_=null,i}return ra(t,Ks),ia(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Zr.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Zr.createTimeRanges([[t,n]])}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=Na(e),i=this.initSegments_[n];if(t&&!i&&e.bytes){var r=Zs.byteLength+e.bytes.byteLength,a=new Uint8Array(r);a.set(e.bytes),a.set(Zs,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return i||e}},{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(e){return void 0===e?this.subtitlesTrack_:(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}},{key:"remove",value:function(e,t){Qa(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;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=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,n=t.segment;if("function"!=typeof f.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var i=function(){e.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",i),void this.subtitlesTrack_.tech_.one("vttjserror",function(){e.subtitlesTrack_.tech_.off("vttjsloaded",i),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})}n.requested=!0;try{this.parseVTTCues_(t)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach(function(t){e.subtitlesTrack_.addCue(t)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,n=!1;"function"==typeof f.a.TextDecoder?t=new f.a.TextDecoder("utf8"):(t=f.a.WebVTT.StringDecoder(),n=!0);var i=new f.a.WebVTT.Parser(f.a,f.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=function(t){return e.timestampmap=t},i.onparsingerror=function(e){Zr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var r=e.segment.map.bytes;n&&(r=Qs(r)),i.parse(r)}var a=e.bytes;n&&(a=Qs(a)),i.parse(a),i.flush()}},{key:"updateTimeMapping_",value:function(e,t,n){var i=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/9e4-r.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-i.duration)}}}else i.empty=!0}}]),t}(),eo=function(e,t){for(var n=e.cues,i=0;i<n.length;i++){var r=n[i];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},to=O.a.inspect,no=[{name:"VOD",run:function(e,t,n,i,r){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,n,i,r){if(!e.datetimeToDisplayTime)return null;var a=t.segments||[],s=null,o=null;r=r||0;for(var l=0;l<a.length;l++){var u=a[l];if(u.dateTimeObject){var c=u.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,d=Math.abs(r-c);if(null!==o&&o<d)break;o=d,s={time:c,segmentIndex:l}}}return s}},{name:"Segment",run:function(e,t,n,i,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var l=0;l<a.length;l++){var u=a[l];if(u.timeline===i&&void 0!==u.start){var c=Math.abs(r-u.start);if(null!==o&&o<c)break;(!s||null===o||o>=c)&&(o=c,s={time:u.start,segmentIndex:l})}}return s}},{name:"Discontinuity",run:function(e,t,n,i,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,c=e.discontinuities[u];if(c){var d=Math.abs(r-c.time);if(null!==s&&s<d)break;(!a||null===s||s>=d)&&(s=d,a={time:c.time,segmentIndex:l})}}return a}},{name:"Playlist",run:function(e,t,n,i,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],io=function(e){function t(){na(this,t);var e=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.inspectCache_=void 0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=Us("SyncController"),e}return ra(t,e),ia(t,[{key:"getSyncPoint",value:function(e,t,n,i){var r=this.runStrategies_(e,t,n,i);return r.length?this.selectSyncPoint_(r,{key:"time",value:i}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+ba(e,i.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,n,i){for(var r=[],a=0;a<no.length;a++){var s=no[a],o=s.run(this,e,t,n,i);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r}},{key:"selectSyncPoint_",value:function(e,t){for(var n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<i&&(i=s,n=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var i=e.segments[n];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,n=e.playlist,i=void 0;return(i=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,i)&&(this.saveDiscontinuitySyncInfo_(e),n.syncInfo||(n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:t.start})),i}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,n=A.a.timescale(t.map.bytes),i=A.a.startTime(n,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=i),{start:i,end:i+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=to(e.bytes,this.inspectCache_),n=void 0,i=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,n=t.video[0].dtsTime,i=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,n=t.audio[0].dtsTime,i=t.audio[1].dtsTime),{start:n,end:i,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var n=e.segment,i=this.timelines[e.timeline];if(null!==e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]"),n.start=e.startOfSegment,n.end=t.end+i.mapping;else{if(!i)return!1;n.start=t.start+i.mapping,n.end=t.end+i.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var i=0;i<t.discontinuityStarts.length;i++){var r=t.discontinuityStarts[i],a=t.discontinuitySequence+i+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var l=void 0;l=s<0?n.start-ba(t,e.mediaIndex,r):n.end+ba(t,e.mediaIndex+1,r),this.discontinuities[a]={time:l,accuracy:o}}}}}]),t}(Zr.EventTarget),ro=new ss("./decrypter-worker.worker.js",function(e,t){var n=this;!function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},r=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],i=t[4],r=n[4],a=void 0,s=void 0,o=void 0,l=[],u=[],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!i[s];s^=c||1,o=u[o]||1)for(h=(h=o^o<<1^o<<2^o<<3^o<<4)>>8^255&h^99,i[s]=h,r[h]=s,f=16843009*l[d=l[c=l[s]]]^65537*d^257*c^16843008*s,p=257*l[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,n[a][h]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),n[a]=n[a].slice(0);return e},a=null,s=function(){function t(n){e(this,t),a||(a=r()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];var i=void 0,s=void 0,o=void 0,l=void 0,u=void 0,c=this._tables[0][4],d=this._tables[1],h=n.length,p=1;if(4!==h&&6!==h&&8!==h)throw new Error("Invalid aes key size");for(l=n.slice(0),u=[],this._key=[l,u],i=h;i<4*h+28;i++)o=l[i-1],(i%h==0||8===h&&i%h==4)&&(o=c[o>>>24]<<24^c[o>>16&255]<<16^c[o>>8&255]<<8^c[255&o],i%h==0&&(o=o<<8^o>>>24^p<<24,p=p<<1^283*(p>>7))),l[i]=l[i-h]^o;for(s=0;i;s++,i--)o=l[3&s?i:i-4],u[s]=i<=4||s<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(e,t,n,i,r,a){var s=this._key[1],o=e^s[0],l=i^s[1],u=n^s[2],c=t^s[3],d=void 0,h=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,v=this._tables[1],y=v[0],b=v[1],_=v[2],T=v[3],S=v[4];for(m=0;m<f;m++)d=y[o>>>24]^b[l>>16&255]^_[u>>8&255]^T[255&c]^s[g],h=y[l>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&o]^s[g+1],p=y[u>>>24]^b[c>>16&255]^_[o>>8&255]^T[255&l]^s[g+2],c=y[c>>>24]^b[o>>16&255]^_[l>>8&255]^T[255&u]^s[g+3],g+=4,o=d,l=h,u=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[l>>16&255]<<16^S[u>>8&255]<<8^S[255&c]^s[g++],d=o,o=l,l=u,u=c,c=d},t}(),o=function(){function t(){e(this,t),this.listeners={}}return t.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},t.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},t}(),l=function(t){function n(){e(this,n);var r=i(this,t.call(this,o));return r.jobs=[],r.delay=1,r.timeout_=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(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(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},n}(o),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},c=function(){function n(t,i,r,a){e(this,n);var s=n.STEP,o=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),d=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),i,r,c)),d=s;d<o.length;d+=s)r=new Uint32Array([u(o[d-4]),u(o[d-3]),u(o[d-2]),u(o[d-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),i,r,c));this.asyncStream_.push(function(){var e;a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}return n.prototype.decryptChunk_=function(e,t,n,i){return function(){var r=function(e,t,n){var i=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new s(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),o=new Int32Array(a.buffer),l=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,m=void 0,g=void 0,v=void 0;for(l=n[0],c=n[1],d=n[2],h=n[3],v=0;v<i.length;v+=4)p=u(i[v]),f=u(i[v+1]),m=u(i[v+2]),g=u(i[v+3]),r.decrypt(p,f,m,g,o,v),o[v]=u(o[v]^l),o[v+1]=u(o[v+1]^c),o[v+2]=u(o[v+2]^d),o[v+3]=u(o[v+3]^h),l=p,c=f,d=m,h=g;return a}(e,t,n);i.set(r,e.byteOffset)}},t(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}();new function(e){e.onmessage=function(t){var n=t.data,i=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),r=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),a=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new c(i,r,a,function(t,i){var r,a;e.postMessage((r={source:n.source,decrypted:i},a={},Object.keys(r).forEach(function(e){var t=r[e];ArrayBuffer.isView(t)?a[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:a[e]=t}),a),[i.buffer])})}}(n)}()}),ao=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},so=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},oo=function(e,t){t.activePlaylistLoader=e,e.load()},lo={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;so(n,i);var a=i.activeTrack(),s=i.activeGroup(),o=(s.filter(function(e){return e.default})[0]||s[0]).id,l=i.tracks[o];if(a!==l){for(var u in Zr.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[u].enabled=i.tracks[u]===l;i.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e];Zr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),so(n,i);var r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}}},uo={AUDIO:function(e,t,n){if(t){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),i.paused()||a.load()}),t.on("error",lo[e](e,n))}},SUBTITLES:function(e,t,n){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),i.paused()||a.load()}),t.on("error",lo[e](e,n))}},co=function(e,t){return function(n){return n.attributes[e]===t}},ho=function(e){return function(t){return t.resolvedUri===e}},po={AUDIO:function(e,t){var n=t.hls,i=t.sourceType,r=t.segmentLoaders[e],a=t.requestOptions.withCredentials,s=t.master,o=s.mediaGroups,l=s.playlists,u=t.mediaTypes[e],c=u.groups,d=u.tracks,h=t.masterPlaylistLoader;for(var p in o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}}),o[e]){c[p]||(c[p]=[]);var f=l.filter(co(e,p));for(var m in o[e][p]){var g=o[e][p][m];f.filter(ho(g.resolvedUri)).length&&delete g.resolvedUri;var v=void 0;if(v=g.resolvedUri?new ma(g.resolvedUri,n,a):g.playlists&&"dash"===i?new Os(g.playlists[0],n,a,h):null,g=Zr.mergeOptions({id:m,playlistLoader:v},g),uo[e](e,g.playlistLoader,t),c[p].push(g),void 0===d[m]){var y=new Zr.AudioTrack({id:m,kind:ao(g),enabled:!1,language:g.language,default:g.default,label:m});d[m]=y}}}r.on("error",lo[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,i=t.hls,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions.withCredentials,o=t.master.mediaGroups,l=t.mediaTypes[e],u=l.groups,c=l.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in u[h]||(u[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if("hls"===r?m=new ma(f.resolvedUri,i,s):"dash"===r&&(m=new Os(f.playlists[0],i,s,d)),f=Zr.mergeOptions({id:p,playlistLoader:m},f),uo[e](e,f.playlistLoader,t),u[h].push(f),void 0===c[p]){var g=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",lo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,i=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(var o in i[e])for(var l in a[o]||(a[o]=[]),i[e][o]){var u=i[e][o][l];if(u.instreamId.match(/CC\d/)&&(a[o].push(Zr.mergeOptions({id:l},u)),void 0===s[l])){var c=n.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default&&u.autoselect,language:u.language,label:l},!1).track;s[l]=c}}}},fo={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if(n[i].enabled)return n[i];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if("showing"===n[i].mode)return n[i];return null}}},mo=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){po[t](t,e)});var t=e.mediaTypes,n=e.masterPlaylistLoader,i=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach(function(n){t[n].activeGroup=function(e,t){return function(n){var i=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=i.media();if(!a)return null;var s=null;return a.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,void 0===n?s:null===n?null:s.filter(function(e){return e.id===n.id})[0]||null}}(n,e),t[n].activeTrack=fo[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,i=n[e],r=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),l=a.activePlaylistLoader;so(i,a),o&&(o.playlistLoader?(i.resyncLoader(),oo(o.playlistLoader,a)):l&&r.resetEverything())}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,i=n[e],r=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),l=a.activePlaylistLoader;so(i,a),o&&(o.playlistLoader?l!==o.playlistLoader?(i.track&&i.track(s),i.resetEverything(),oo(o.playlistLoader,a)):oo(o.playlistLoader,a):r.resetEverything())}}(n,e)});var a=t.AUDIO.activeGroup(),s=(a.filter(function(e){return e.default})[0]||a[0]).id;t.AUDIO.tracks[s].enabled=!0,t.AUDIO.onTrackChanged(),n.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanged()})});var o=function(){t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"hls-audio-change"})};for(var l in i.audioTracks().addEventListener("change",o),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){i.audioTracks().removeEventListener("change",o),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),i.clearTracks("audio"),t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[l])},go=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ps,activeTrack:Ps,onGroupChanged:Ps,onTrackChanged:Ps}}),e},vo=void 0,yo=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],bo=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},_o=function(e){function t(e){na(this,t);var n=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=e.url,r=e.withCredentials,a=e.tech,s=e.bandwidth,o=e.externHls,l=e.useCueTags,u=e.blacklistDuration,c=e.enableLowInitialPlaylist,d=e.sourceType,h=e.seekTo;if(!i)throw new Error("A non-empty playlist URL is required");vo=o,n.withCredentials=r,n.tech_=a,n.hls_=a.hls,n.seekTo_=h,n.sourceType_=d,n.useCueTags_=l,n.blacklistDuration=u,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_=go(),n.mediaSource=new Zr.MediaSource,n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_.bind(n)),n.seekable_=Zr.createTimeRanges(),n.hasPlayed_=function(){return!1},n.syncController_=new io(e),n.segmentMetadataTrack_=a.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new ro,n.inbandTextTracks_={};var p={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:s,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new Os(i,n.hls_,n.withCredentials):new ma(i,n.hls_,n.withCredentials),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Ks(Zr.mergeOptions(p,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),e),n.audioSegmentLoader_=new Ks(Zr.mergeOptions(p,{loaderType:"audio"}),e),n.subtitleSegmentLoader_=new $s(Zr.mergeOptions(p,{loaderType:"vtt"}),e),n.setupSegmentLoaderListeners_(),yo.forEach(function(e){n[e+"_"]=bo.bind(n,e)}),n.logger_=Us("MPC"),n.masterPlaylistLoader_.load(),n}return ra(t,e),ia(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=e.masterPlaylistLoader_.media(),n=1.5*e.masterPlaylistLoader_.targetDuration*1e3;La(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),mo({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t);try{e.setupSourceBuffers_()}catch(t){return Zr.log.warn("Failed to create SourceBuffers",t),e.mediaSource.endOfStream("decode")}e.setupFirstPlay(),e.trigger("selectedinitialmedia")}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var t=e.masterPlaylistLoader_.media();if(!t){e.excludeUnsupportedVariants_();var n=void 0;return e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),e.initialMedia_=n,void e.masterPlaylistLoader_.media(e.initialMedia_)}if(e.useCueTags_&&e.updateAdCues_(t),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.updateDuration(),e.tech_.paused()||(e.mainSegmentLoader_.load(),e.audioSegmentLoader_&&e.audioSegmentLoader_.load()),!t.endList){var i=function(){var t=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))};if(e.duration()!==1/0){e.tech_.one("durationchange",function t(){e.duration()===1/0?i():e.tech_.one("durationchange",t)})}else i()}}),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var t=e.masterPlaylistLoader_.media(),n=1.5*e.masterPlaylistLoader_.targetDuration*1e3;La(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(e,t){var n=e.mediaGroups||{},i=!0,r=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var s in n.AUDIO[a]){n.AUDIO[a][s].uri||(i=!1)}i&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),vo.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),vo.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),r.length&&Object.keys(n.AUDIO[r[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 e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=e.selectPlaylist(),n=e.masterPlaylistLoader_.media(),i=e.tech_.buffered(),r=i.length?i.end(i.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!n.endList||e.duration()<Ds.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<n.attributes.BANDWIDTH||r>=a)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){e.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})}),this.audioSegmentLoader_.on("ended",function(){e.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var e=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything(function(){Zr.browser.IE_VERSION||Zr.browser.IS_EDGE?e.tech_.setCurrentTime(e.tech_.currentTime()+.04):e.tech_.setCurrentTime(e.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.seekTo_(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_())return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Zr.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.seekTo_(n.end(0)),e.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(e){return Zr.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,function(e){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var n=vo.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=.1;var a=r.end(r.length-1);return a-i<=.1&&n-a<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],i=void 0;if(i=t.playlist||this.masterPlaylistLoader_.media(),n=n||t.blacklistDuration||this.blacklistDuration,!i){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var r=1===this.masterPlaylistLoader_.master.playlists.filter(Aa).length;return r?(Zr.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(r)):(i.excludeUntil=Date.now()+1e3*n,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),e=this.selectPlaylist(),Zr.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(e))}},{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(e){var t=Ya(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(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:vo.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,t=void 0;if(this.masterPlaylistLoader_){var n=this.masterPlaylistLoader_.media();if(n){var i=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(null!==i&&0!==(e=vo.Playlist.seekable(n,i)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(n,this.mediaSource.duration)))return;if(0===(t=vo.Playlist.seekable(n,i)).length)return}t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=Zr.createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)<e.end(0)?t.end(0):e.end(0)]]):this.seekable_=e,this.logger_("seekable updated ["+Ja(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,n=vo.Playlist.duration(this.masterPlaylistLoader_.media()),i=this.tech_.buffered(),r=function t(){e.mediaSource.duration=n,e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};i.length>0&&(n=Math.max(n,i.end(i.length-1))),t!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(t){var n=e.mediaTypes_[t].groups;for(var i in n)n[i].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=gs(this.masterPlaylistLoader_.master,t)).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(e){var t=e.length>1&&-1===e[0].indexOf(",")&&e[0]!==e[1]?new Zr.EventTarget:null;this.mainSegmentLoader_.mimeType(e[0],t),e[1]&&this.audioSegmentLoader_.mimeType(e[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(e){var t;e.attributes.CODECS&&f.a.MediaSource&&f.a.MediaSource.isTypeSupported&&!f.a.MediaSource.isTypeSupported('video/mp4; codecs="'+(t=e.attributes.CODECS,t.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return ps([e])[0]}))+'"')&&(e.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(e){var t=2,n=null,i=void 0;e.attributes.CODECS&&(i=fs(e.attributes.CODECS),n=i.videoCodec,t=i.codecCount),this.master().playlists.forEach(function(e){var i={codecCount:2,videoCodec:null};e.attributes.CODECS&&(i=fs(e.attributes.CODECS)),i.codecCount!==t&&(e.excludeUntil=1/0),i.videoCodec!==n&&(e.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.segments)for(var i=n,r=void 0,a=0;a<e.segments.length;a++){var s=e.segments[a];if(r||(r=eo(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new f.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var o,l,u=s.cueOutCont.split("/").map(parseFloat),c=sa(u,2);o=c[0],l=c[1],(r=new f.a.VTTCue(i,i+s.duration,"")).adStartTime=i-o,r.adEndTime=r.adStartTime+l,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=Ds.GOAL_BUFFER_LENGTH,n=Ds.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,Ds.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=Ds.BUFFER_LOW_WATER_LINE,n=Ds.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,Ds.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,i)}}]),t}(Zr.EventTarget),To=function e(t,n,i){na(this,e);var r,a,s,o=t.masterPlaylistController_,l=o[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(n.attributes.RESOLUTION){var u=n.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=n.attributes.BANDWIDTH,this.id=i,this.enabled=(r=t.playlists,a=n.uri,s=l,function(e){var t=r.master.playlists[a],n=Ea(t),i=Aa(t);return void 0===e?i:(e?delete t.disabled:t.disabled=!0,e===i||n||(s(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},So=["seeking","seeked","pause","playing","error"],ko=function(){function e(t){var n=this;na(this,e),this.tech_=t.tech,this.seekable=t.seekable,this.seekTo=t.seekTo,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Us("PlaybackWatcher"),this.logger_("initialize");var i=function(){return n.monitorCurrentTime_()},r=function(){return n.techWaiting_()},a=function(){return n.cancelTimer_()},s=function(){return n.fixesBadSeeks_()};this.tech_.on("seekablechanged",s),this.tech_.on("waiting",r),this.tech_.on(So,a),this.tech_.on("canplay",i),this.dispose=function(){n.logger_("dispose"),n.tech_.off("seekablechanged",s),n.tech_.off("waiting",r),n.tech_.off(So,a),n.tech_.off("canplay",i),n.checkCurrentTimeTimeout_&&f.a.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}return ia(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&f.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=f.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),n=this.tech_.currentTime(),i=void 0;e&&this.afterSeekableWindow_(t,n)&&(i=t.end(t.length-1));e&&this.beforeSeekableWindow_(t,n)&&(i=t.start(0)+.1);return void 0!==i&&(this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+Ja(t)+". Seeking to "+i+"."),this.seekTo(i),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Ya(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.seekTo(e),this.logger_("Stopped at "+e+" 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 e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.seekTo(n),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var i=this.tech_.buffered(),r=Xa(i,t);if(this.videoUnderflow_(r,i,t))return this.cancelTimer_(),this.seekTo(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){var a=r.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,n){if(0===e.length){var i=this.gapFromVideoUnderflow_(t,n);if(i)return this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+n),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),i=Xa(t,n);this.cancelTimer_(),0!==i.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.seekTo(i.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var n=function(e){if(e.length<2)return Zr.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var i=e.end(n-1),r=e.start(n);t.push([i,r])}return Zr.createTimeRanges(t)}(e),i=0;i<n.length;i++){var r=n.start(i),a=n.end(i);if(t-r<4&&t-r>2)return{start:r,end:a}}return null}}]),e}(),wo={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Co=function(e){!function e(t,n){var i=0,r=0,a=Zr.mergeOptions(wo,n);t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},l=function(){if(Date.now()-i<1e3*a.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(a.getSource&&"function"==typeof a.getSource)return i=Date.now(),a.getSource.call(t,o);Zr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},u=function e(){t.off("loadedmetadata",s),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",u),t.reloadSourceOnError=function(n){u(),e(t,n)}}(this,e)};Zr.use("*",function(e){return{setSource:function(e,t){t(null,e)},setCurrentTime:function(t){return e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(t),t},play:function(){e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(e.currentTime())}}});var jo={PlaylistLoader:ma,Playlist:Oa,Decrypter:z,AsyncStream:N,decrypt:V,utils:Va,STANDARD_PLAYLIST_SELECTOR:function(){return function(e,t,n,i,r){var a=e.playlists.map(function(e){var t,n;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||f.a.Number.MAX_VALUE,width:t,height:n,playlist:e}});Ws(a,function(e,t){return e.bandwidth-t.bandwidth});var s=(a=a.filter(function(e){return!Oa.isIncompatible(e.playlist)})).filter(function(e){return Oa.isEnabled(e.playlist)});s.length||(s=a.filter(function(e){return!Oa.isDisabled(e.playlist)}));var o=s.filter(function(e){return e.bandwidth*Ds.BANDWIDTH_VARIANCE<t}),l=o[o.length-1],u=o.filter(function(e){return e.bandwidth===l.bandwidth})[0];if(!1===r){var c=u||s[0]||a[0];return c?c.playlist:null}var d=o.filter(function(e){return e.width&&e.height});Ws(d,function(e,t){return e.width-t.width});var h=d.filter(function(e){return e.width===n&&e.height===i});l=h[h.length-1];var p=h.filter(function(e){return e.bandwidth===l.bandwidth})[0],m=void 0,g=void 0,v=void 0;p||(g=(m=d.filter(function(e){return e.width>n||e.height>i})).filter(function(e){return e.width===m[0].width&&e.height===m[0].height}),l=g[g.length-1],v=g.filter(function(e){return e.bandwidth===l.bandwidth})[0]);var y=v||p||u||s[0]||a[0];return y?y.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Gs(this.tech_.el(),"width"),10),parseInt(Gs(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var e=this.playlists.master.playlists.filter(Oa.isEnabled);return Ws(e,function(e,t){return Ys(e,t)}),e.filter(function(e){return fs(e.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:Ys,comparePlaylistResolution:function(e,t){var n=void 0,i=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||f.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),n===(i=i||f.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:Ia()};["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(e){Object.defineProperty(jo,e,{get:function(){return Zr.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),Ds[e]},set:function(t){Zr.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Zr.log.warn("value of Hls."+e+" must be greater than or equal to 0"):Ds[e]=t}})});var Eo=function(e){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e))return"hls";return/^application\/dash\+xml/i.test(e)?"dash":null},Ao=function(e,t){for(var n=t.media(),i=-1,r=0;r<e.length;r++)if(e[r].id===n.uri){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};jo.canPlaySource=function(){return Zr.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var xo=function(e){if("dash"===e.options_.sourceType){var t=Zr.players[e.tech_.options_.playerId];if(t.eme){var n=function(e,t,n){if(!e)return e;var i={};for(var r in e)i[r]={audioContentType:'audio/mp4; codecs="'+n.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+t.attributes.CODECS+'"'},t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(i[r].pssh=t.contentProtection[r].pssh),"string"==typeof e[r]&&(i[r].url=e[r]);return Zr.mergeOptions(e,i)}(e.source_.keySystems,e.playlists.media(),e.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());n&&(t.currentSource().keySystems=n,t.eme.initializeMediaKeys&&t.eme.initializeMediaKeys())}}},Lo=function(){if(!window.localStorage)return null;var e=window.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};jo.supportsNativeHls=function(){var e=C.a.createElement("video");if(!Zr.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),jo.supportsNativeDash=!!Zr.getTech("Html5").isSupported()&&/maybe|probably/i.test(C.a.createElement("video").canPlayType("application/dash+xml")),jo.supportsTypeNatively=function(e){return"hls"===e?jo.supportsNativeHls:"dash"===e&&jo.supportsNativeDash},jo.isSupported=function(){return Zr.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Oo=Zr.getComponent("Component"),Uo=function(e){function t(e,n,i){na(this,t);var r=aa(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i.hls));if(n.options_&&n.options_.playerId){var a=Zr(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Zr.log.warn("player.hls is deprecated. Use player.tech().hls instead."),n.trigger({type:"usage",name:"hls-player-access"}),r},configurable:!0}),a.vhs=r,a.dash=r,r.player_=a}if(r.tech_=n,r.source_=e,r.stats={},r.setOptions_(),r.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(C.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=C.a.fullscreenElement||C.a.webkitFullscreenElement||C.a.mozFullScreenElement||C.a.msFullscreenElement;t&&t.contains(r.tech_.el())&&r.masterPlaylistController_.smoothQualityChange_()}),r.on(r.tech_,"seeking",function(){this.tech_.seeking()&&0===this.tech_.currentTime()&&this.tech_.player_.loop()&&this.setCurrentTime(0)}),r.on(r.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),r.on(r.tech_,"play",r.play),r}return ra(t,Oo),ia(t,[{key:"setOptions_",value:function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Lo();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Ds.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ds.INITIAL_BANDWIDTH,["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange"].forEach(function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(e,t){var n=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=jo,this.options_.sourceType=Eo(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e),n.setCurrentTime(e)},this.masterPlaylistController_=new _o(this.options_),this.playbackWatcher_=new ko(Zr.mergeOptions(this.options_,{seekable:function(){return n.seekable()}})),this.masterPlaylistController_.on("error",function(){Zr.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):jo.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=jo.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(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){Zr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),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 Ka(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 Ka(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.tech_.on("bandwidthupdate",function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!window.localStorage)return!1;var t=Lo();t=t?Zr.mergeOptions(t,e):e;try{window.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var e,t;t=(e=n).playlists,e.representations=function(){return t.master.playlists.filter(function(e){return!Ea(e)}).map(function(t,n){return new To(e,t,t.uri)})},xo(n)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.tech_.ready(function(){return n.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(Zr.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=Zr.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach(function(e){t.addQualityLevel(e)}),Ao(t,n.playlists)}),this.playlists.on("mediachange",function(){Ao(e.qualityLevels_,e.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.hls&&delete this.tech_.hls,function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToStreamTime",value:function(e,t){return qa({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}},{key:"seekToStreamTime",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return Ga({streamTime:e,playlist:this.masterPlaylistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),t}(),Po={name:"videojs-http-streaming",VERSION:"1.5.1",canHandleSource:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Zr.mergeOptions(Zr.options,t);return Po.canPlayType(e.type,n)},handleSource:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Zr.mergeOptions(Zr.options,n);return t.hls=new Uo(e,t,i),t.hls.xhr=Ia(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Zr.mergeOptions(Zr.options,t).hls.overrideNative,i=Eo(e);return i&&(!jo.supportsTypeNatively(i)||n)?"maybe":""}};void 0!==Zr.MediaSource&&void 0!==Zr.URL||(Zr.MediaSource=js,Zr.URL=Es),js.supportsNativeMediaSources()&&Zr.getTech("Html5").registerSourceHandler(Po,0),Zr.HlsHandler=Uo,Zr.HlsSourceHandler=Po,Zr.Hls=jo,Zr.use||Zr.registerComponent("Hls",jo),Zr.options.hls=Zr.options.hls||{},Zr.registerPlugin?Zr.registerPlugin("reloadSourceOnError",Co):Zr.plugin("reloadSourceOnError",Co);t.default=Zr},function(e,t,n){"use strict";var i=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},e.exports=i},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(9))},function(e,t,n){"use strict";var i,r,a,s,o,l=n(35).toUnsigned;i=function(e,t){var n,a,s,o,u,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=l(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=r(e.subarray(n+4,n+8)),o=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?c.push(e.subarray(n+8,o)):(u=i(e.subarray(n+8,o),t.slice(1))).length&&(c=c.concat(u))),n=o;return c},r=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},a=function(e){return i(e,["moov","trak"]).reduce(function(e,t){var n,r,a,s,o;return(n=i(t,["tkhd"])[0])?(r=n[0],s=l(n[a=0===r?12:20]<<24|n[a+1]<<16|n[a+2]<<8|n[a+3]),(o=i(t,["mdia","mdhd"])[0])?(a=0===(r=o[0])?12:20,e[s]=l(o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3]),e):null):null},{})},s=function(e,t){var n,r,a;return n=i(t,["moof","traf"]),r=[].concat.apply([],n.map(function(t){return i(t,["tfhd"]).map(function(n){var r,a;return r=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,(i(t,["tfdt"]).map(function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n})[0]||1/0)/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},o=function(e){var t=i(e,["moov","trak"]),n=[];return t.forEach(function(e){var t=i(e,["mdia","hdlr"]),a=i(e,["tkhd"]);t.forEach(function(e,t){var i,s,o=r(e.subarray(8,12)),l=a[t];"vide"===o&&(s=0===(i=new DataView(l.buffer,l.byteOffset,l.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(s))})}),n},e.exports={findBox:i,parseType:r,timescale:a,startTime:s,videoTrackIds:o}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i,r,a,s,o=n(5),l=n(12),u=n(37),c=n(38),d=n(41),h=n(42),p=n(44),f=n(45).H264Stream,m=n(47),g=n(11).isLikelyAacData,v=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],y=["width","height","profileIdc","levelIdc","profileCompatibility"],b=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};(r=function(e,t){var n=[],i=0,a=0,s=0,o=1/0;t=t||{},r.prototype.init.call(this),this.push=function(t){d.collectDtsInfo(e,t),e&&v.forEach(function(n){e[n]=t[n]}),n.push(t)},this.setEarliestDts=function(t){a=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var r,u,h,p;0!==n.length?(r=c.trimAdtsFramesByEarliestDts(n,e,a),e.baseMediaDecodeTime=d.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),c.prefixWithSilence(e,r,s,o),e.samples=c.generateSampleTable(r),h=l.mdat(c.concatenateFrameData(r)),n=[],u=l.moof(i,[e]),p=new Uint8Array(u.byteLength+h.byteLength),i++,p.set(u),p.set(h,u.byteLength),d.clearDtsInfo(e),this.trigger("data",{track:e,boxes:p}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=new o,(i=function(e,t){var n,r,a=0,s=[],o=[];t=t||{},i.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){d.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],y.forEach(function(t){e[t]=n[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var n,i,r,c,h,p;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=u.groupNalsIntoFrames(s),(r=u.groupFramesIntoGops(n))[0][0].keyFrame||((i=this.getGopForFusion_(s[0],e))?(r.unshift(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.pts=i.pts,r.dts=i.dts,r.duration+=i.duration):r=u.extendFirstKeyFrame(r)),o.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))return this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");d.clearDtsInfo(e),r=f}d.collectDtsInfo(e,r),e.samples=u.generateSampleTable(r),h=l.mdat(u.concatenateNalData(r)),e.baseMediaDecodeTime=d.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",r.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),c=l.moof(a,[e]),p=new Uint8Array(c.byteLength+h.byteLength),a++,p.set(c),p.set(h,c.byteLength),this.trigger("data",{track:e,boxes:p}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){d.clearDtsInfo(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&b(e.pps[0],a.pps[0])&&e.sps&&b(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=a,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,a,s,l,u;for(a=e.byteLength,s=e.nalCount,l=e.duration,t=n=0;t<o.length&&n<e.length&&(i=o[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,a-=r.byteLength,s-=r.nalCount,l-=r.duration);return 0===n?e:n===e.length?null:((u=e.slice(n)).byteLength=a,u.duration=l,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,n,i,r,a,s,l;for(t=o.length-1,n=e.length-1,a=null,s=!1;t>=0&&n>=0;){if(i=o[t],r=e[n],i.pts===r.pts){s=!0;break}i.pts>r.pts?t--:(t===o.length-1&&(a=n),n--)}if(!s&&null===a)return null;if(0===(l=s?n:a))return e;var u=e.slice(l),c=u.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){o=e}}).prototype=new o,(s=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,s.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new o,s.prototype.flush=function(e){var t,n,i,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,y.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,v.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,i=l.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(i.byteLength),s.initSegment.set(i),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=t.startPts,this.keepOriginalTimestamps||(t.startTime-=o),t.startTime/=9e4,t.endTime=t.endPts,this.keepOriginalTimestamps||(t.endTime-=o),t.endTime/=9e4,s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=n.pts,this.keepOriginalTimestamps||(n.cueTime-=o),n.cueTime/=9e4,s.metadata.push(n);s.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",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(a=function(e){var t,n,o=this,l=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new h.MetadataStream,t.aacStream=new m,t.audioTimestampRolloverStream=new h.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new h.TimestampRolloverStream("timed-metadata"),t.adtsStream=new p,t.coalesceStream=new s(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(i){"timed-metadata"!==i.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:o.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new r(n,e),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var a={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=new h.MetadataStream,a.packetStream=new h.TransportPacketStream,a.parseStream=new h.TransportParseStream,a.elementaryStream=new h.ElementaryStream,a.videoTimestampRolloverStream=new h.TimestampRolloverStream("video"),a.audioTimestampRolloverStream=new h.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new h.TimestampRolloverStream("timed-metadata"),a.adtsStream=new p,a.h264Stream=new f,a.captionStream=new h.CaptionStream,a.coalesceStream=new s(e,a.metadataStream),a.headOfPipeline=a.packetStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream),a.elementaryStream.pipe(a.videoTimestampRolloverStream).pipe(a.h264Stream),a.elementaryStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.elementaryStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.h264Stream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",function(s){var l;if("metadata"===s.type){for(l=s.tracks.length;l--;)t||"video"!==s.tracks[l].type?n||"audio"!==s.tracks[l].type||((n=s.tracks[l]).timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime):(t=s.tracks[l]).timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime;t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new i(t,e),a.videoSegmentStream.on("timelineStartInfo",function(e){n&&(n.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))}),a.videoSegmentStream.on("processedGopsInfo",o.trigger.bind(o,"gopInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),n&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new r(n,e),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream))}}),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,d.clearDtsInfo(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,d.clearDtsInfo(t),r.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=i)),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(l){var t=g(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),l=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){l=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new o,e.exports={Transmuxer:a,VideoSegmentStream:i,AudioSegmentStream:r,AUDIO_PROPERTIES:v,VIDEO_PROPERTIES:y}},function(e,t,n){"use strict";var i=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},parseId3TagSize:function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return i[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if((n=r(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var a=0;a<i.byteLength;a++)if(0===i[a]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(i,0,a))){var s=i.subarray(a+1),o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;return o*=4,o+=3&s[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){"use strict";var i,r,a,s,o,l,u,c,d,h,p,f,m,g,v,y,b,_,T,S,k,w,C,j,E,A,x,L,O,U,P,I,D,R,M,B,N,F,V,z,H,q=Math.pow(2,32)-1;!function(){var e;if(C={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in C)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);j=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),x=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]),O={video:x,audio:L},I=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),R=D,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=D,U=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},r=function(){return i(C.dinf,i(C.dref,I))},a=function(e){return i(C.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]))},s=function(){return i(C.ftyp,j,E,j,A)},y=function(e){return i(C.hdlr,O[e])},o=function(e){return i(C.mdat,e)},v=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(C.mdhd,t)},g=function(e){return i(C.mdia,v(e),y(e.type),u(e))},l=function(e){return i(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},u=function(e){return i(C.minf,"video"===e.type?i(C.vmhd,U):i(C.smhd,P),r(),_(e))},c=function(e,t){for(var n=[],r=t.length;r--;)n[r]=S(t[r]);return i.apply(null,[C.moof,l(e)].concat(n))},d=function(e){for(var t=e.length,n=[];t--;)n[t]=f(e[t]);return i.apply(null,[C.moov,p(4294967295)].concat(n).concat(h(e)))},h=function(e){for(var t=e.length,n=[];t--;)n[t]=k(e[t]);return i.apply(null,[C.mvex].concat(n))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(C.mvhd,t)},b=function(e){var t,n,r=e.samples||[],a=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)t=r[n].flags,a[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(C.sdtp,a)},_=function(e){return i(C.stbl,T(e),i(C.stts,B),i(C.stsc,R),i(C.stsz,M),i(C.stco,D))},T=function(e){return i(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?N(e):F(e))},N=function(e){var t,n=e.sps||[],r=e.pps||[],a=[],s=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)s.push((65280&r[t].byteLength)>>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));return i(C.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]),i(C.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length]).concat(a).concat([r.length]).concat(s))),i(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},F=function(e){return i(C.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))},m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(C.tkhd,t)},S=function(e){var t,n,r,a,s,o;return t=i(C.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/(q+1)),o=Math.floor(e.baseMediaDecodeTime%(q+1)),n=i(C.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=w(e,92),i(C.traf,t,n,r)):(a=b(e),r=w(e,a.length+92),i(C.traf,t,n,r,a))},f=function(e){return e.duration=e.duration||4294967295,i(C.trak,m(e),g(e))},k=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),i(C.trex,t)},H=function(e,t){var n=0,i=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|i|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},z=function(e,t){var n,r,a,s;for(t+=20+16*(r=e.samples||[]).length,n=H(r,t),s=0;s<r.length;s++)a=r[s],n=n.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 i(C.trun,new Uint8Array(n))},V=function(e,t){var n,r,a,s;for(t+=20+8*(r=e.samples||[]).length,n=H(r,t),s=0;s<r.length;s++)a=r[s],n=n.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 i(C.trun,new Uint8Array(n))},w=function(e,t){return"audio"===e.type?V(e,t):z(e,t)},e.exports={ftyp:s,mdat:o,moof:c,moov:d,initSegment:function(e){var t,n=s(),i=d(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t}}},function(e,t,n){"use strict";var i=n(5),r=n(14),a=function(){a.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new c(0,0),new c(0,1),new c(1,0),new c(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))},this)};a.prototype=new i,a.prototype.push=function(e){var t,n,i;if("sei_rbsp"===e.nalUnitType&&(t=r.parseSei(e.escapedRBSP)).payloadType===r.USER_DATA_REGISTERED_ITU_T_T35&&(n=r.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=r.parseCaptionPackets(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},a.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(e){e.flush()},this)):this.ccStreams_.forEach(function(e){e.flush()},this)},a.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},a.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},a.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},a.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)};var s={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},o=function(e){return null===e?"":(e=s[e]||e,String.fromCharCode(e))},l=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],u=function(){for(var e=[],t=15;t--;)e.push("");return e},c=function(e,t){c.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=u();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=u();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=u()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))a=o((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(i,r))"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),a=o((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var s=l.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),a=o(i),a+=o(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};c.prototype=new i,c.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},c.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=u(),this.nonDisplayed_=u(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},c.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},c.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},c.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},c.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},c.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){return e>=32&&e<=127},c.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=u(),this.displayed_=u()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},c.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,n)},c.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},c.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},c.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},c.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},c.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},e.exports={CaptionStream:a,Cea608Stream:c}},function(e,t,n){"use strict";e.exports={parseSei:function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}t+=r,i=0,r=0}return n},parseUserData:function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var n,i,r,a,s=[];if(!(64&t[0]))return s;for(i=31&t[0],n=0;n<i;n++)a={type:3&t[2+(r=3*n)],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s},discardEmulationPreventionBytes:function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},USER_DATA_REGISTERED_ITU_T_T35:4}},function(e,t,n){"use strict";var i=n(5),r=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},a=function(e){var t,n;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===n&&(n=e.dts),e.dts=r(e.dts,n),e.pts=r(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.discontinuity=function(){n=void 0,t=void 0}};a.prototype=new i,e.exports={TimestampRolloverStream:a,handleRollover:r}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=(s=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(a).concat([r]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(r=0;r<e.length;r++){var s=e[r];null!=s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){var i,r,a={},s=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=i.apply(this,arguments)),r}),o=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var i=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),l=null,u=0,c=[],d=n(53);function h(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=a[i.id];if(r){r.refs++;for(var s=0;s<r.parts.length;s++)r.parts[s](i.parts[s]);for(;s<i.parts.length;s++)r.parts.push(y(i.parts[s],t))}else{var o=[];for(s=0;s<i.parts.length;s++)o.push(y(i.parts[s],t));a[i.id]={id:i.id,refs:1,parts:o}}}}function p(e,t){for(var n=[],i={},r=0;r<e.length;r++){var a=e[r],s=t.base?a[0]+t.base:a[0],o={css:a[1],media:a[2],sourceMap:a[3]};i[s]?i[s].parts.push(o):n.push(i[s]={id:s,parts:[o]})}return n}function f(e,t){var n=o(e.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 i=c[c.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.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 r=o(e.insertAt.before,n);n.insertBefore(t,r)}}function m(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=function(){0;return n.nc}();i&&(e.attrs.nonce=i)}return v(t,e.attrs),f(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,i,r,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var s=u++;n=l||(l=g(t)),i=T.bind(null,n,s,!1),r=T.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),f(e,t),t}(t),i=function(e,t,n){var i=n.css,r=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||a)&&(i=d(i));r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([i],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(s),o&&URL.revokeObjectURL(o)}.bind(null,n,t),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),i=function(e,t){var n=t.css,i=t.media;i&&e.setAttribute("media",i);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var s=n[r];(o=a[s.id]).refs--,i.push(o)}e&&h(p(e,t),t);for(r=0;r<i.length;r++){var o;if(0===(o=i[r]).refs){for(var l=0;l<o.parts.length;l++)o.parts[l]();delete a[o.id]}}}};var b,_=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function T(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=_(t,r);else{var a=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}},function(e,t){e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},function(e,t,n){var i=n(7),r=e.exports={WebVTT:n(20),VTTCue:n(21),VTTRegion:n(22)};i.vttjs=r,i.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=i.VTTCue,l=i.VTTRegion;r.shim=function(){i.VTTCue=a,i.VTTRegion=s},r.restore=function(){i.VTTCue=o,i.VTTRegion=l},i.VTTCue||r.shim()},function(e,t){var n=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function i(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function r(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function a(){this.values=n(null)}function s(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(n);if(2===s.length)t(s[0],s[1])}}function o(e,t,n){var o=e;function l(){var t=r(e);if(null===t)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=l(),u(),"--\x3e"!==e.substr(0,3))throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),u(),t.endTime=l(),u(),function(e,t){var i=new a;s(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line","auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align","middle"),t.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}i.prototype=n(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},c={v:"title",lang:"lang"},d={rt:"ruby"};function h(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e){return l[e]}function a(e){for(;y=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(y[0],i);return e}function s(e,t){return!d[t.localName]||d[t.localName]===e.localName}function o(t,n){var i=u[t];if(!i)return null;var r=e.document.createElement(i);r.localName=i;var a=c[t];return a&&n&&(r[a]=n.trim()),r}for(var h,p=e.document.createElement("div"),f=p,m=[];null!==(h=n());)if("<"!==h[0])f.appendChild(e.document.createTextNode(a(h)));else{if("/"===h[1]){m.length&&m[m.length-1]===h.substr(2).replace(">","")&&(m.pop(),f=f.parentNode);continue}var g,v=r(h.substr(1,h.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),f.appendChild(g);continue}var y=h.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=o(y[1],y[3])))continue;if(!s(f,g))continue;y[2]&&(g.className=y[2].substr(1).replace("."," ")),m.push(y[1]),f.appendChild(g),f=g}return p}var p=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function f(e){for(var t=0;t<p.length;t++){var n=p[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function m(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a<n.length;a++)if(f(n.charCodeAt(a)))return"rtl";return"ltr"}function g(){}function v(e,t,n){g.call(this),this.cue=t,this.cueDiv=h(e,t.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:m(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"middle":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function y(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function b(e,t,n,i){var r=new y(t),a=t.cue,s=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(a),o=[];if(a.snapToLines){var l;switch(a.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=r.lineHeight,c=u*Math.round(s),d=n[l]+u,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),r.move(h,c)}else{var p=r.lineHeight/n.height*100;switch(a.lineAlign){case"middle":s-=p/2;break;case"end":s-=p}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],r=new y(t)}var f=function(e,t){for(var r,a=new y(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var l=e.intersectPercentage(n);s>l&&(r=new y(e),s=l),e=new y(a)}return r||a}(r,o);t.move(f.toCSSCompatValues(n))}function _(){}g.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},g.prototype.formatStyle=function(e,t){return 0===e?0:e+t},v.prototype=n(g.prototype),v.prototype.constructor=v,y.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},y.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},y.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},y.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},y.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},y.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},y.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},y.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},_.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},_.convertCueToDOMTree=function(e,t){return e&&t?h(e,t):null};_.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],a=y.getSimpleBoxPosition(i),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,l=0;l<t.length;l++)o=t[l],n=new v(e,o,s),i.appendChild(n.div),b(0,n,a,r),o.displayState=n.div,r.push(y.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},_.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},_.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof i))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function l(e){e.match(/X-TIMESTAMP-MAP/)?s(e,function(e,n){switch(e){case"X-TIMESTAMP-MAP":i=n,o=new a,s(i,function(e,t){switch(e){case"MPEGT":o.integer(e+"S",t);break;case"LOCA":o.set(e+"L",r(t))}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:o.get("MPEGTS"),LOCAL:o.get("LOCAL")})}var i,o},/=/):s(e,function(e,n){switch(e){case"Region":!function(e){var n=new a;if(s(e,function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new a;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}},/=/,/\s/),n.has("id")){var i=new(t.vttjs.VTTRegion||t.window.VTTRegion);i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)}},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var u;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(u=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new i(i.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:u=n(),t.state){case"HEADER":/:/.test(u)?l(u):u||(t.state="ID");continue;case"NOTE":u||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(u)){t.state="NOTE";break}if(!u)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===u.indexOf("--\x3e")){t.cue.id=u;continue}case"CUE":try{o(u,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==u.indexOf("--\x3e");if(!u||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=u;continue;case"BADCUE":u||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new i(i.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=_},function(e,t){var n="auto",i={"":1,lr:1,rl:1},r={start:1,middle:1,end:1,left:1,right:1};function a(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function s(e,t,r){this.hasBeenReset=!1;var s="",o=!1,l=e,u=t,c=r,d=null,h="",p=!0,f="auto",m="start",g=50,v="middle",y=50,b="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");l=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(e){var t=function(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");h=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!=typeof e&&e!==n)throw new SyntaxError("An invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return v},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},function(e,t){var n={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,r=0,a=100,s=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}},function(e,t){function n(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",i=0;i<arguments.length;i++)t+=n(e[i])+(arguments[i+1]||"");return t}},function(e,t,n){"use strict";var i=n(7),r=n(25),a=n(26),s=n(30);function o(e,t,n){var i=e;return r(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=s(t,{uri:e}),i.callback=n,i}function l(e,t,n){return u(t=o(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML;return null}(c),v)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function s(){if(!u){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=y,s=null;return 0!==t?(r={body:i(),statusCode:t,method:p,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(r.headers=a(c.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),n(s,r,r.body)}}var o,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var d,h=c.url=e.uri||e.url,p=c.method=e.method||"GET",f=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(v=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(s,0)},c.onload=s,c.onerror=r,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=r,c.open(p,h,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout(function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(f||null),c}e.exports=l,l.XMLHttpRequest=i.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){l["delete"===e?"del":e]=function(t,n,i){return(n=o(t,n,i)).method=e.toUpperCase(),u(n)}})},function(e,t){e.exports=function(e){var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var i=n(27),r=n(28);e.exports=function(e){if(!e)return{};var t={};return r(i(e).split("\n"),function(e){var n,r=e.indexOf(":"),a=i(e.slice(0,r)).toLowerCase(),s=i(e.slice(r+1));void 0===t[a]?t[a]=s:(n=t[a],"[object Array]"===Object.prototype.toString.call(n)?t[a].push(s):t[a]=[t[a],s])}),t}},function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,n){"use strict";var i=n(29),r=Object.prototype.toString,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!i(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=n),"[object Array]"===r.call(e)?function(e,t,n){for(var i=0,r=e.length;i<r;i++)a.call(e,i)&&(null==n?t(e[i],i,e):t.call(n,e[i],i,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var i=0,r=e.length;i<r;i++)null==n?t(e.charAt(i),i,e):t.call(n,e.charAt(i),i,e)}(e,t,s):function(e,t,n){for(var i in e)a.call(e,i)&&(null==n?t(e[i],i,e):t.call(n,e[i],i,e))}(e,t,s)}},function(e,t,n){"use strict";var i=Function.prototype.toString,r=/^\s*class\b/,a=function(e){try{var t=i.call(e);return r.test(t)}catch(e){return!1}},s=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(o)return function(e){try{return!a(e)&&(i.call(e),!0)}catch(e){return!1}}(e);if(a(e))return!1;var t=s.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var i=arguments[t];for(var r in i)n.call(i,r)&&(e[r]=i[r])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){var i,r,a,s,o;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=r.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(d)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},function(e,t,n){(function(t){var i,r=void 0!==t?t:"undefined"!=typeof window?window:{},a=n(33);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=i}).call(this,n(9))},,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return G}),n.d(t,"b",function(){return W});var i=n(7),r=n.n(i),a=function(e){return!!e&&"object"==typeof e},s=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.reduce(function(t,n){return Object.keys(n).forEach(function(i){Array.isArray(t[i])&&Array.isArray(n[i])?t[i]=t[i].concat(n[i]):a(t[i])&&a(n[i])?t[i]=e(t[i],n[i]):t[i]=n[i]}),t},{})},o=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},l=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},u=function(e){var t;return(t=e.reduce(function(e,t){var n,i=t.attributes.id+(t.attributes.lang||"");e[i]?(t.segments[0].discontinuity=!0,(n=e[i].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):e[i]=t;return e},{}),Object.keys(t).map(function(e){return t[e]})).map(function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce(function(e,t,i){return t[n]&&e.push(i),e},[])),e})},c=function(e){var t,n=e.attributes,i=e.segments,r={attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:i,mediaSequence:i.length?i[0].number:1};return n.contentProtection&&(r.contentProtection=n.contentProtection),r},d=function(e){var t,n=e.attributes,i=e.segments,r={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:i,mediaSequence:i.length?i[0].number:1};return n.contentProtection&&(r.contentProtection=n.contentProtection),r},h=function(e){var t;if(!e.length)return{};var n=e[0].attributes,i=n.sourceDuration,r=n.minimumUpdatePeriod,a=void 0===r?0:r,s=u(e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType})).map(d),o=u(e.filter(function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType})),l=e.filter(function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType}),h={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:i,playlists:s,minimumUpdatePeriod:1e3*a};return o.length&&(h.mediaGroups.AUDIO.audio=o.reduce(function(e,t){var n=t.attributes.role&&t.attributes.role.value||"main",i=t.attributes.lang||"",r="main";return i&&(r=t.attributes.lang+" ("+n+")"),e[r]&&e[r].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth?e:(e[r]={language:i,autoselect:!0,default:"main"===n,playlists:[c(t)],uri:""},e)},{})),l.length&&(h.mediaGroups.SUBTITLES.subs=function(e){return e.reduce(function(e,t){var n,i,r,a,s=t.attributes.lang||"text";return e[s]?e:(e[s]={language:s,default:!1,autoselect:!1,playlists:[(n=t,r=n.attributes,a=n.segments,void 0===a&&(a=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration),{attributes:(i={NAME:r.id,BANDWIDTH:r.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:a,mediaSequence:a.length?a[0].number:1})],uri:""},e)},{})}(l)),h};"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;var p,f=(function(e,t){var n,i,r,a,s;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(d)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s}(p={exports:{}},p.exports),p.exports),m=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=f.buildAbsoluteURL(r.a.location.href,e)),f.buildAbsoluteURL(e,t))},g=function(e){var t=e.baseUrl,n=void 0===t?"":t,i=e.source,r=void 0===i?"":i,a=e.range,s=void 0===a?"":a,o={uri:r,resolvedUri:m(n||"",r)};if(s){var l=s.split("-"),u=parseInt(l[0],10),c=parseInt(l[1],10);o.byterange={length:c-u,offset:u}}return o},v=function(e,t,n){var i=e.NOW,r=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,l=e.start,u=void 0===l?0:l,c=e.minimumUpdatePeriod,d=(i+r)/1e3+(void 0===c?0:c)-(a+u);return Math.ceil((d*o-t)/n)},y=function(e,t){for(var n=e.type,i=void 0===n?"static":n,r=e.minimumUpdatePeriod,a=void 0===r?0:r,s=e.media,o=void 0===s?"":s,l=e.sourceDuration,u=e.timescale,c=void 0===u?1:u,d=e.startNumber,h=void 0===d?1:d,p=e.periodIndex,f=[],m=-1,g=0;g<t.length;g++){var y=t[g],b=y.d,_=y.r||0,T=y.t||0;m<0&&(m=T),T&&T>m&&(m=T);var S=void 0;if(_<0){var k=g+1;S=k===t.length?"dynamic"===i&&a>0&&o.indexOf("$Number$")>0?v(e,m,b):(l*c-m)/b:(t[k].t-m)/b}else S=_+1;for(var w=h+f.length+S,C=h+f.length;C<w;)f.push({number:C,duration:b/c,time:m,timeline:p}),m+=b,C++}return f},b={static:function(e){var t=e.duration,n=e.timescale,i=void 0===n?1:n,r=e.sourceDuration;return{start:0,end:Math.ceil(r/(t/i))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,i=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,l=void 0===o?0:o,u=e.minimumUpdatePeriod,c=void 0===u?0:u,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=(t+n)/1e3,f=i+l,m=p+c-f,g=Math.ceil(m*a/s),v=Math.floor((p-f-h)*a/s),y=Math.floor((p-f)*a/s);return{start:Math.max(0,v),end:Math.min(g,y)}}},_=function(e){var t=e.type,n=void 0===t?"static":t,i=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.sourceDuration,o=b[n](e),l=function(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}(o.start,o.end).map(function(e){return function(t,n){var i=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.periodIndex,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:i/a,timeline:s,time:n*i}}}(e));if("static"===n){var u=l.length-1;l[u].duration=s-i/a*u}return l},T=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,S=function(e,t){return e.replace(T,function(e){return function(t,n,i,r){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(r=i?parseInt(r,10):1,a.length>=r?a:""+new Array(r-a.length+1).join("0")+a)}}(t))},k=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,r=void 0===i?{sourceURL:"",range:""}:i,a=g({baseUrl:e.baseUrl,source:S(r.sourceURL,n),range:r.range});return function(e,t){return e.duration||t?e.duration?_(e):y(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map(function(t){n.Number=t.number,n.Time=t.time;var i=S(e.media||"",n);return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:m(e.baseUrl||"",i),map:a,number:t.number}})},w="INVALID_NUMBER_OF_PERIOD",C="DASH_EMPTY_MANIFEST",j="DASH_INVALID_XML",E="NO_BASE_URL",A="SEGMENT_TIME_UNSPECIFIED",x="UNSUPPORTED_UTC_TIMING_SCHEME",L=function(e,t){var n=e.duration,i=e.segmentUrls,r=void 0===i?[]:i;if(!n&&!t||n&&t)throw new Error(A);var a,s=r.map(function(t){return function(e,t){var n=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,a=g({baseUrl:n,source:r.sourceURL,range:r.range}),s=g({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)});return n&&(a=_(e)),t&&(a=y(e,t)),a.map(function(e,t){if(s[t]){var n=s[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}}).filter(function(e){return e})},O=function(e){var t=e.baseUrl,n=e.initialization,i=void 0===n?{}:n,r=e.sourceDuration,a=e.timescale,s=void 0===a?1:a,o=e.indexRange,l=void 0===o?"":o,u=e.duration;if(!t)throw new Error(E);var c=g({baseUrl:t,source:i.sourceURL,range:i.range}),d=g({baseUrl:t,source:t,range:l});if(d.map=c,u){var h=_(e);h.length&&(d.duration=h[0].duration,d.timeline=h[0].timeline)}else r&&(d.duration=r/s,d.timeline=0);return d.number=0,[d]},U=function(e){var t,n,i=e.attributes,r=e.segmentInfo;if(r.template?(n=k,t=s(i,r.template)):r.base?(n=O,t=s(i,r.base)):r.list&&(n=L,t=s(i,r.list)),!n)return{attributes:i};var a=n(t,r.timeline);if(t.duration){var o=t,l=o.duration,u=o.timescale,c=void 0===u?1:u;t.duration=l/c}else a.length?t.duration=a.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return{attributes:t,segments:a}},P=function(e,t){return l(e.childNodes).filter(function(e){return e.tagName===t})},I=function(e){return e.textContent.trim()},D=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),i=n[0],r=n[1],a=n[2],s=n[3],o=n[4],l=n[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(l||0)},R={mediaPresentationDuration:function(e){return D(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return D(e)},timeShiftBufferDepth:function(e){return D(e)},start:function(e){return D(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?D(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},M=function(e){return e&&e.attributes?l(e.attributes).reduce(function(e,t){var n=R[t.name]||R.DEFAULT;return e[t.name]=n(t.value),e},{}):{}};var B={"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"},N=function(e,t){return t.length?o(e.map(function(e){return t.map(function(t){return m(e,I(t))})})):e},F=function(e){var t=P(e,"SegmentTemplate")[0],n=P(e,"SegmentList")[0],i=n&&P(n,"SegmentURL").map(function(e){return s({tag:"SegmentURL"},M(e))}),r=P(e,"SegmentBase")[0],a=n||t,o=a&&P(a,"SegmentTimeline")[0],l=n||r||t,u=l&&P(l,"Initialization")[0],c=t&&M(t);c&&u?c.initialization=u&&M(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var d={template:c,timeline:o&&P(o,"S").map(function(e){return M(e)}),list:n&&s(M(n),{segmentUrls:i,initialization:M(u)}),base:r&&s(M(r),{initialization:M(u)})};return Object.keys(d).forEach(function(e){d[e]||delete d[e]}),d},V=function(e){return e.reduce(function(e,t){var n=M(t),i=B[n.schemeIdUri];if(i){e[i]={attributes:n};var a=P(t,"cenc:pssh")[0];if(a){var s=I(a),o=s&&function(e){for(var t=r.a.atob(e),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(s);e[i].pssh=o}}return e},{})},z=function(e,t,n){return function(i){var r=M(i),a=N(t,P(i,"BaseURL")),l=P(i,"Role")[0],u={role:M(l)},c=s(e,r,u),d=V(P(i,"ContentProtection"));Object.keys(d).length&&(c=s(c,{contentProtection:d}));var h=F(i),p=P(i,"Representation"),f=s(n,h);return o(p.map(function(e,t,n){return function(i){var r=P(i,"BaseURL"),a=N(t,r),o=s(e,M(i)),l=F(i);return a.map(function(e){return{segmentInfo:s(n,l),attributes:s(o,{baseUrl:e})}})}}(c,a,f)))}},H=function(e,t){void 0===t&&(t={});var n=t,i=n.manifestUri,a=void 0===i?"":i,l=n.NOW,u=void 0===l?Date.now():l,c=n.clientOffset,d=void 0===c?0:c,h=P(e,"Period");if(!h.length)throw new Error(w);var p=M(e),f=N([a],P(e,"BaseURL"));return p.sourceDuration=p.mediaPresentationDuration||0,p.NOW=u,p.clientOffset=d,o(h.map(function(e,t){return function(n,i){var a=N(t,P(n,"BaseURL")),l=M(n),u=parseInt(l.id,10),c=r.a.isNaN(u)?i:u,d=s(e,{periodIndex:c}),h=P(n,"AdaptationSet"),p=F(n);return o(h.map(z(d,a,p)))}}(p,f)))},q=function(e){if(""===e)throw new Error(C);var t=(new r.a.DOMParser).parseFromString(e,"application/xml"),n=t&&"MPD"===t.documentElement.tagName?t.documentElement:null;if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(j);return n},G=function(e,t){return h(H(q(e),t).map(U))},W=function(e){return function(e){var t=P(e,"UTCTiming")[0];if(!t)return null;var n=M(t);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(x)}return n}(q(e))}}).call(this,n(9))},function(e,t){e.exports={toUnsigned:function(e){return e>>>0}}},function(e,t,n){e.exports={generator:n(12),probe:n(8),Transmuxer:n(10).Transmuxer,AudioSegmentStream:n(10).AudioSegmentStream,VideoSegmentStream:n(10).VideoSegmentStream,CaptionParser:n(48)}},function(e,t){var n=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n};e.exports={groupNalsIntoFrames:function(e){var t,n,i=[],r=[];for(i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.push(i),r},groupFramesIntoGops:function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,r,a,s,o,l=t||0,u=[];for(i=0;i<e.length;i++)for(s=e[i],r=0;r<s.length;r++)o=s[r],l+=(a=n(o,l)).size,u.push(a);return u},concatenateNalData:function(e){var t,n,i,r,a,s,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(a=r[n],i=0;i<a.length;i++)s=a[i],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c}}},function(e,t,n){var i=n(39),r=n(40);e.exports={prefixWithSilence:function(e,t,n,a){var s,o,l,u,c=0,d=0,h=0;if(t.length&&(s=r.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(9e4/(e.samplerate/1024)),n&&a&&(c=s-Math.max(n,a),h=(d=Math.floor(c/o))*o),!(d<1||h>45e3))){for((l=i[e.samplerate])||(l=t[0].data),u=0;u<d;u++)t.splice(u,0,{data:l});e.baseMediaDecodeTime-=Math.floor(r.videoTsToAudioTs(h,e.samplerate))}},trimAdtsFramesByEarliestDts:function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},concatenateFrameData:function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r}}},function(e,t){var n,i=[33,16,5,32,164,27],r=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],a=function(e){for(var t=[];e--;)t.push(0);return t},s={96000:[i,[227,64],a(154),[56]],88200:[i,[231],a(170),[56]],64000:[i,[248,192],a(240),[56]],48000:[i,[255,192],a(268),[55,148,128],a(54),[112]],44100:[i,[255,192],a(268),[55,163,128],a(84),[112]],32000:[i,[255,192],a(268),[55,234],a(226),[112]],24000:[i,[255,192],a(268),[55,255,128],a(268),[111,112],a(126),[224]],16000:[i,[255,192],a(268),[55,255,128],a(268),[111,255],a(269),[223,108],a(195),[1,192]],12000:[r,a(268),[3,127,248],a(268),[6,255,240],a(268),[13,255,224],a(268),[27,253,128],a(259),[56]],11025:[r,a(268),[3,127,248],a(268),[6,255,240],a(268),[13,255,224],a(268),[27,255,192],a(268),[55,175,128],a(108),[112]],8000:[r,a(268),[3,121,16],a(47),[7]]};e.exports=(n=s,Object.keys(n).reduce(function(e,t){return e[t]=new Uint8Array(n[t].reduce(function(e,t){return e.concat(t)},[])),e},{}))},function(e,t){var n,i,r,a,s,o;n=function(e){return 9e4*e},i=function(e,t){return e*t},r=function(e){return e/9e4},a=function(e,t){return e/t},s=function(e,t){return n(a(e,t))},o=function(e,t){return i(r(e),t)},e.exports={secondsToVideoTs:n,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:s,videoTsToAudioTs:o}},function(e,t){e.exports={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},collectDtsInfo:function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}}},function(e,t,n){"use strict";var i,r,a,s=n(5),o=n(13),l=n(6),u=n(15).TimestampRolloverStream,c=n(6);(i=function(){var e=new Uint8Array(188),t=0;i.prototype.init.call(this),this.push=function(n){var i,r=0,a=188;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;a<i.byteLength;)71!==i[r]||71!==i[a]?(r++,a++):(this.trigger("data",i.subarray(r,a)),r+=188,a+=188);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=new s,(r=function(){var e,t,n,i;r.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var a=e[r],s=(31&e[r+1])<<8|e[r+2];a===l.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=s:a===l.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=s:a===l.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=l.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=l.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new s,r.STREAM_TYPES={h264:27,adts:15},(a=function(){var e=this,t={data:[],size:0},n={data:[],size:0},i={data:[],size:0},r=function(t,n,i){var r,a,s=new Uint8Array(t.size),o={type:n},l=0,u=0;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,l=0;l<t.data.length;l++)a=t.data[l],s.set(a.data,u),u+=a.data.byteLength;var c,d,h;c=s,(d=o).packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8]),r="video"===n||o.packetLength<=t.size,(i||r)&&(t.size=0,t.data.length=0),r&&e.trigger("data",o)}};a.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,s;switch(a.streamType){case l.H264_STREAM_TYPE:case c.H264_STREAM_TYPE:e=t,s="video";break;case l.ADTS_STREAM_TYPE:e=n,s="audio";break;case l.METADATA_STREAM_TYPE:e=i,s="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&r(e,s,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},n=a.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[a.type]()},this.flush=function(){r(t,"video"),r(n,"audio"),r(i,"timed-metadata"),this.trigger("done")}}).prototype=new s;var d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:i,TransportParseStream:r,ElementaryStream:a,TimestampRolloverStream:u,CaptionStream:o.CaptionStream,Cea608Stream:o.Cea608Stream,MetadataStream:n(43)};for(var h in l)l.hasOwnProperty(h)&&(d[h]=l[h]);e.exports=d},function(e,t,n){"use strict";var i,r=n(5),a=n(6),s=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},o=function(e,t,n){return decodeURIComponent(s(e,t,n))},l=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},u={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=o(e.data,1,t),e.value=o(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=o(e.data,1,t),e.url=o(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(s(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(i=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,s=[],o=0;if(i.prototype.init.call(this),this.dispatchType=a.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,c,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(s.push(e),o+=e.data.byteLength,1===s.length&&(r=l(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:s[0].pts,dts:s[0].dts},d=0;d<r;)t.data.set(s[0].data.subarray(0,r-d),d),d+=s[0].data.byteLength,o-=s[0].data.byteLength,s.shift();i=10,64&t.data[5]&&(i+=4,i+=l(t.data.subarray(10,14)),r-=l(t.data.subarray(16,20)));do{if((a=l(t.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((c={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=c.id,u[c.id]&&(u[c.id](c),"com.apple.streaming.transportStreamTimestamp"===c.owner)){var h=c.data,p=(1&h[3])<<30|h[4]<<22|h[5]<<14|h[6]<<6|h[7]>>>2;p*=4,p+=3&h[7],c.timeStamp=p,void 0===t.pts&&void 0===t.dts&&(t.pts=c.timeStamp,t.dts=c.timeStamp),this.trigger("timestamp",c)}t.frames.push(c),i+=10,i+=a}while(i<r);this.trigger("data",t)}}}).prototype=new r,e.exports=i},function(e,t,n){"use strict";var i,r=n(5),a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(i=function(){var e;i.prototype.init.call(this),this.push=function(t){var n,i,r,s,o,l,u=0,c=0;if("audio"===t.type)for(e?(s=e,(e=new Uint8Array(s.byteLength+t.data.byteLength)).set(s),e.set(t.data,s.byteLength)):e=t.data;u+5<e.length;)if(255===e[u]&&240==(246&e[u+1])){if(i=2*(1&~e[u+1]),n=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,l=9e4*(o=1024*(1+(3&e[u+6])))/a[(60&e[u+2])>>>2],r=u+n,e.byteLength<r)return;if(this.trigger("data",{pts:t.pts+c*l,dts:t.dts+c*l,sampleCount:o,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:a[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+i,r)}),e.byteLength===r)return void(e=void 0);c++,e=e.subarray(r)}else u++},this.flush=function(){this.trigger("done")}}).prototype=new r,e.exports=i},function(e,t,n){"use strict";var i,r,a,s=n(5),o=n(46);(r=function(){var e,t,n=0;r.prototype.init.call(this),this.push=function(i){var r;for(t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}}).prototype=new s,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(i=function(){var e,t,n,s,l,u,c,d=new r;i.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,s=e.dts,d.push(e))},d.on("data",function(i){var r={trackId:t,pts:n,dts:s,data:i};switch(31&i[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=l(i.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=l(i.subarray(1)),r.config=u(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",r)}),d.on("done",function(){e.trigger("done")}),this.flush=function(){d.flush()},c=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},l=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},u=function(e){var t,n,i,r,s,l,u,d,h,p,f,m,g,v=0,y=0,b=0,_=0,T=1;if(n=(t=new o(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),a[n]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==s?8:12,g=0;g<f;g++)t.readBoolean()&&c(g<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(l=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===l)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),g=0;g<u;g++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),h=t.readUnsignedExpGolomb(),0===(p=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),_=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:m=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}m&&(T=m[0]/m[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:Math.ceil((16*(d+1)-2*v-2*y)*T),height:(2-p)*(h+1)*16-2*b-2*_}}}).prototype=new s,e.exports={H264Stream:i,NalByteStream:r}},function(e,t,n){"use strict";var i;i=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),n=new DataView(a.buffer).getUint32(0),i=8*s,t-=s},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),a=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(0!=(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},e.exports=i},function(e,t,n){"use strict";var i,r=n(5),a=n(11);(i=function(){var e=new Uint8Array,t=0;i.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,s,o,l=0,u=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(l=a.parseAdtsSize(e,u))>e.length)break;s={type:"audio",data:e.subarray(u,u+l),pts:t,dts:t},this.trigger("data",s),u+=l}else{if(e.length-u<10)break;if(u+(l=a.parseId3TagSize(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+l)},this.trigger("data",r),u+=l}i=e.length-u,e=i>0?e.subarray(u):new Uint8Array}}).prototype=new r,e.exports=i},function(e,t,n){"use strict";var i=n(14).discardEmulationPreventionBytes,r=n(13).CaptionStream,a=n(8),s=n(49),o=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},l=function(e,t){var n=a.findBox(e,["moof","traf"]),r=a.findBox(e,["mdat"]),l={},u=[];return r.forEach(function(e,t){var i=n[t];u.push({mdat:e,traf:i})}),u.forEach(function(e){var n,r=e.mdat,u=e.traf,c=a.findBox(u,["tfhd"]),d=s.parseTfhd(c[0]),h=d.trackId,p=a.findBox(u,["tfdt"]),f=p.length>0?s.parseTfdt(p[0]).baseMediaDecodeTime:0,m=a.findBox(u,["trun"]);t===h&&m.length>0&&(n=function(e,t,n){var r,a,s,l,u=new DataView(e.buffer,e.byteOffset,e.byteLength),c=[];for(a=0;a+4<e.length;a+=s)if(s=u.getUint32(a),a+=4,!(s<=0))switch(31&e[a]){case 6:var d=e.subarray(a+1,a+1+s),h=o(a,t);r={nalUnitType:"sei_rbsp",size:s,data:d,escapedRBSP:i(d),trackId:n},h?(r.pts=h.pts,r.dts=h.dts,l=h):(r.pts=l.pts,r.dts=l.dts),c.push(r)}return c}(r,function(e,t,n){var i=t,r=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,o=n.trackId,l=[];return e.forEach(function(e){var t=s.parseTrun(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=o,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=i+e.compositionTimeOffset,i+=e.duration}),l=l.concat(t)}),l}(m,f,d),h),l[h]||(l[h]=[]),l[h]=l[h].concat(n))}),l};e.exports=function(){var e,t,n,i,a,s=!1;this.isInitialized=function(){return s},this.init=function(){e=new r,s=!0,e.on("data",function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,a.captions.push(e),a.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&i===t[n])},this.parse=function(e,r,s){var o;if(!this.isInitialized())return null;if(!r||!s)return null;if(this.isNewInit(r,s))n=r[0],i=s[n];else if(!n||!i)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,r,s)}return null!==(o=function(e,t,n){return t?{seiNals:l(e,t)[t],timescale:n}:null}(e,n,i))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),a):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){a.captions=[],a.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,a?this.clearParsedCaptions():a={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},function(e,t,n){"use strict";var i,r,a=n(8).parseType,s=function(e){return new Date(1e3*e-20828448e5)},o=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},l=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},u={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:i(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(i=6,r=0;r<o;r++)n=a.getUint16(i),i+=2,s.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=a.getUint16(i),i+=2,s.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return s},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:a(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},i=8;i<e.byteLength;)n.compatibleBrands.push(a(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:i(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:i(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:a(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:l(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=s(n.getUint32(i)),i+=8,r.modificationTime=s(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=s(n.getUint32(i)),i+=4,r.modificationTime=s(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:i(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:i(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=i(e.subarray(28))[0]),n},moof:function(e){return{boxes:i(e)}},moov:function(e){return{boxes:i(e)}},mvex:function(e){return{boxes:i(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=s(t.getUint32(n)),n+=8,i.modificationTime=s(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=s(t.getUint32(n)),n+=4,i.modificationTime=s(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},r=n.getUint16(22);for(t=24;r;t+=12,r--)i.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:i(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:i(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return u.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],s=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],u=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),u&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=s(t.getUint32(n)),n+=8,i.modificationTime=s(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=s(t.getUint32(n)),n+=4,i.modificationTime=s(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,i.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/16,i},traf:function(e){return{boxes:i(e)}},trak:function(e){return{boxes:i(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],l=2&n.flags[1],u=4&n.flags[1],c=8&n.flags[1],d=i.getUint32(4),h=8;for(r&&(n.dataOffset=i.getInt32(h),h+=4),a&&d&&(t={flags:o(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),l&&(t.size=i.getUint32(h),h+=4),c&&(t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t),d--);d--;)t={},s&&(t.duration=i.getUint32(h),h+=4),l&&(t.size=i.getUint32(h),h+=4),u&&(t.flags=o(e.subarray(h,h+4)),h+=4),c&&(t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};i=function(e){for(var t,n,i,r,s,o=0,l=[],c=new ArrayBuffer(e.length),d=new Uint8Array(c),h=0;h<e.length;++h)d[h]=e[h];for(t=new DataView(c);o<e.byteLength;)n=t.getUint32(o),i=a(e.subarray(o+4,o+8)),r=n>1?o+n:e.byteLength,(s=(u[i]||function(e){return{data:e}})(e.subarray(o+8,r))).size=n,s.type=i,l.push(s),o=r;return l},r=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map(function(e,i){return n+e.type+"\n"+Object.keys(e).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(t){var i=n+"  "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return a?1===a.length?i+"<"+a.join("").slice(1)+">":i+"<\n"+a.map(function(e){return n+"  "+e}).join("\n")+"\n"+n+"  >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map(function(e,t){return 0===t?e:n+"  "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+r(e.boxes,t+1):"")}).join("\n")},e.exports={inspect:i,textify:r,parseTfdt:u.tfdt,parseHdlr:u.hdlr,parseTfhd:u.tfhd,parseTrun:u.trun}},function(e,t,n){"use strict";var i=n(6),r=n(15).handleRollover,a={};a.ts=n(51),a.aac=n(11);var s=function(e,t,n){for(var i,r,s,o,l=0,u=188,c=!1;u<=e.byteLength;)if(71!==e[l]||71!==e[u]&&u!==e.byteLength)l++,u++;else{switch(i=e.subarray(l,u),a.ts.parseType(i,t.pid)){case"pes":r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(o=a.ts.parsePesTime(i))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;l+=188,u+=188}for(l=(u=e.byteLength)-188,c=!1;l>=0;)if(71!==e[l]||71!==e[u]&&u!==e.byteLength)l--,u--;else{switch(i=e.subarray(l,u),a.ts.parseType(i,t.pid)){case"pes":r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(o=a.ts.parsePesTime(i))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;l-=188,u-=188}},o=function(e,t,n){for(var i,r,s,o,l,u,c,d=0,h=188,p=!1,f={data:[],size:0};h<e.byteLength;)if(71!==e[d]||71!==e[h])d++,h++;else{switch(i=e.subarray(d,h),a.ts.parseType(i,t.pid)){case"pes":if(r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(s&&!p&&(o=a.ts.parsePesTime(i))&&(o.type="video",n.video.push(o),p=!0),!n.firstKeyFrame)){if(s&&0!==f.size){for(l=new Uint8Array(f.size),u=0;f.data.length;)c=f.data.shift(),l.set(c,u),u+=c.byteLength;a.ts.videoPacketContainsKeyFrame(l)&&(n.firstKeyFrame=a.ts.parsePesTime(l),n.firstKeyFrame.type="video"),f.size=0}f.data.push(i),f.size+=i.byteLength}}if(p&&n.firstKeyFrame)break;d+=188,h+=188}for(d=(h=e.byteLength)-188,p=!1;d>=0;)if(71!==e[d]||71!==e[h])d--,h--;else{switch(i=e.subarray(d,h),a.ts.parseType(i,t.pid)){case"pes":r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(o=a.ts.parsePesTime(i))&&(o.type="video",n.video.push(o),p=!0)}if(p)break;d-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,i=0,r=188;r<e.byteLength;)if(71!==e[i]||71!==e[r])i++,r++;else{switch(n=e.subarray(i,r),a.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=a.ts.parsePat(n));break;case"pmt":t.table||(t.table=a.ts.parsePmt(n))}if(t.pid&&t.table)return;i+=188,r+=188}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case i.H264_STREAM_TYPE:n.video=[],o(e,t,n),0===n.video.length&&delete n.video;break;case i.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=a.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,s=null,o=0,l=0;e.length-l>=3;){switch(a.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((o=a.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+o),s=a.aac.parseAacTimestamp(t)),l+=o;break;case"audio":if(e.length-l<7){n=!0;break}if((o=a.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===r&&(t=e.subarray(l,l+o),r=a.aac.parseSampleRate(t)),i++,l+=o;break;default:l++}if(n)return null}if(null===r||null===s)return null;var u=9e4/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*i*u,pts:s+1024*i*u}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach(function(e){e.dts=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var i=t;if(void 0===i&&(i=e.video[0].dts),e.video.forEach(function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,i),a.pts=r(a.pts,i),a.dtsTime=a.dts/9e4,a.ptsTime=a.dts/9e4}}}(n,t),n):null},parseAudioPes_:s}},function(e,t,n){"use strict";var i=n(6),r=function(e){var t=31&e[1];return t<<=8,t|=e[2]},a=function(e){return!!(64&e[1])},s=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},o=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=r(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=a(e),n=4+s(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=a(e),i=4+s(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var o=12+((15&e[i+10])<<8|e[i+11]);o<r;){var l=i+o;t[(31&e[l+1])<<8|e[l+2]]=e[l],o+=5+((15&e[l+3])<<8|e[l+4])}return t}},parsePayloadUnitStartIndicator:a,parsePesType:function(e,t){switch(t[r(e)]){case i.H264_STREAM_TYPE:return"video";case i.ADTS_STREAM_TYPE:return"audio";case i.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!a(e))return null;var t=4+s(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+s(e),n=e.subarray(t),i=0,r=0,a=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0),a}}},,function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(r=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:i+a.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){(e.exports=n(16)(!1)).push([e.i,'.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-modal-dialog, .vjs-modal-dialog .vjs-modal-dialog-content {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n\n.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .vjs-button > .vjs-icon-placeholder:before {\n  text-align: center; }\n\n@font-face {\n  font-family: VideoJS;\n  src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABBIAAsAAAAAGoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3RY21hcAAAAYQAAADQAAADIjn098ZnbHlmAAACVAAACv4AABEIAwnSw2hlYWQAAA1UAAAAKwAAADYV1OgpaGhlYQAADYAAAAAbAAAAJA4DByFobXR4AAANnAAAAA8AAACE4AAAAGxvY2EAAA2sAAAARAAAAEQ9NEHGbWF4cAAADfAAAAAfAAAAIAEyAIFuYW1lAAAOEAAAASUAAAIK1cf1oHBvc3QAAA84AAABDwAAAZ5AAl/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+DwalTqIAAHicY2BkYGAA4gDud4bx/DZfGbjZGUDg+q1z05BpdkawOAcDE4gCAB45CXEAeJxjYGRgYGcAARD5/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");\n  font-weight: normal;\n  font-style: normal; }\n\n.vjs-icon-play, .video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-play:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder:before {\n    content: "\\f101"; }\n\n.vjs-icon-play-circle {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-play-circle:before {\n    content: "\\f102"; }\n\n.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {\n    content: "\\f103"; }\n\n.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {\n    content: "\\f104"; }\n\n.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {\n    content: "\\f105"; }\n\n.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {\n    content: "\\f106"; }\n\n.vjs-icon-volume-high, .video-js .vjs-mute-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-volume-high:before, .video-js .vjs-mute-control .vjs-icon-placeholder:before {\n    content: "\\f107"; }\n\n.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {\n    content: "\\f108"; }\n\n.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {\n    content: "\\f109"; }\n\n.vjs-icon-square {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-square:before {\n    content: "\\f10a"; }\n\n.vjs-icon-spinner {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-spinner:before {\n    content: "\\f10b"; }\n\n.vjs-icon-subtitles, .video-js .vjs-subtitles-button .vjs-icon-placeholder, .video-js .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-subtitles:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before, .video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,\n  .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n  .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n  .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n  .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before {\n    content: "\\f10c"; }\n\n.vjs-icon-captions, .video-js .vjs-captions-button .vjs-icon-placeholder, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-captions:before, .video-js .vjs-captions-button .vjs-icon-placeholder:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n  .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before {\n    content: "\\f10d"; }\n\n.vjs-icon-chapters, .video-js .vjs-chapters-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-chapters:before, .video-js .vjs-chapters-button .vjs-icon-placeholder:before {\n    content: "\\f10e"; }\n\n.vjs-icon-share {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-share:before {\n    content: "\\f10f"; }\n\n.vjs-icon-cog {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-cog:before {\n    content: "\\f110"; }\n\n.vjs-icon-circle, .video-js .vjs-play-progress, .video-js .vjs-volume-level, .vjs-seek-to-live-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-circle:before, .video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before {\n    content: "\\f111"; }\n\n.vjs-icon-circle-outline {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-circle-outline:before {\n    content: "\\f112"; }\n\n.vjs-icon-circle-inner-circle {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-circle-inner-circle:before {\n    content: "\\f113"; }\n\n.vjs-icon-hd {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-hd:before {\n    content: "\\f114"; }\n\n.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before {\n    content: "\\f115"; }\n\n.vjs-icon-replay, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-replay:before, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before {\n    content: "\\f116"; }\n\n.vjs-icon-facebook {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-facebook:before {\n    content: "\\f117"; }\n\n.vjs-icon-gplus {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-gplus:before {\n    content: "\\f118"; }\n\n.vjs-icon-linkedin {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-linkedin:before {\n    content: "\\f119"; }\n\n.vjs-icon-twitter {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-twitter:before {\n    content: "\\f11a"; }\n\n.vjs-icon-tumblr {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-tumblr:before {\n    content: "\\f11b"; }\n\n.vjs-icon-pinterest {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-pinterest:before {\n    content: "\\f11c"; }\n\n.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before {\n    content: "\\f11d"; }\n\n.vjs-icon-audio, .video-js .vjs-audio-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-audio:before, .video-js .vjs-audio-button .vjs-icon-placeholder:before {\n    content: "\\f11e"; }\n\n.vjs-icon-next-item {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-next-item:before {\n    content: "\\f11f"; }\n\n.vjs-icon-previous-item {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal; }\n  .vjs-icon-previous-item:before {\n    content: "\\f120"; }\n\n.video-js {\n  display: block;\n  vertical-align: top;\n  box-sizing: border-box;\n  color: #fff;\n  background-color: #000;\n  position: relative;\n  padding: 0;\n  font-size: 10px;\n  line-height: 1;\n  font-weight: normal;\n  font-style: normal;\n  font-family: Arial, Helvetica, sans-serif;\n  word-break: initial; }\n  .video-js:-moz-full-screen {\n    position: absolute; }\n  .video-js:-webkit-full-screen {\n    width: 100% !important;\n    height: 100% !important; }\n\n.video-js[tabindex="-1"] {\n  outline: none; }\n\n.video-js *,\n.video-js *:before,\n.video-js *:after {\n  box-sizing: inherit; }\n\n.video-js ul {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n  list-style-position: outside;\n  margin-left: 0;\n  margin-right: 0;\n  margin-top: 0;\n  margin-bottom: 0; }\n\n.video-js.vjs-fluid,\n.video-js.vjs-16-9,\n.video-js.vjs-4-3 {\n  width: 100%;\n  max-width: 100%;\n  height: 0; }\n\n.video-js.vjs-16-9 {\n  padding-top: 56.25%; }\n\n.video-js.vjs-4-3 {\n  padding-top: 75%; }\n\n.video-js.vjs-fill {\n  width: 100%;\n  height: 100%; }\n\n.video-js .vjs-tech {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n\nbody.vjs-full-window {\n  padding: 0;\n  margin: 0;\n  height: 100%; }\n\n.vjs-full-window .video-js.vjs-fullscreen {\n  position: fixed;\n  overflow: hidden;\n  z-index: 1000;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  right: 0; }\n\n.video-js.vjs-fullscreen {\n  width: 100% !important;\n  height: 100% !important;\n  padding-top: 0 !important; }\n\n.video-js.vjs-fullscreen.vjs-user-inactive {\n  cursor: none; }\n\n.vjs-hidden {\n  display: none !important; }\n\n.vjs-disabled {\n  opacity: 0.5;\n  cursor: default; }\n\n.video-js .vjs-offscreen {\n  height: 1px;\n  left: -9999px;\n  position: absolute;\n  top: 0;\n  width: 1px; }\n\n.vjs-lock-showing {\n  display: block !important;\n  opacity: 1;\n  visibility: visible; }\n\n.vjs-no-js {\n  padding: 20px;\n  color: #fff;\n  background-color: #000;\n  font-size: 18px;\n  font-family: Arial, Helvetica, sans-serif;\n  text-align: center;\n  width: 300px;\n  height: 150px;\n  margin: 0px auto; }\n\n.vjs-no-js a,\n.vjs-no-js a:visited {\n  color: #66A8CC; }\n\n.video-js .vjs-big-play-button {\n  font-size: 3em;\n  line-height: 1.5em;\n  height: 1.5em;\n  width: 3em;\n  display: block;\n  position: absolute;\n  top: 10px;\n  left: 10px;\n  padding: 0;\n  cursor: pointer;\n  opacity: 1;\n  border: 0.06666em solid #fff;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n  border-radius: 0.3em;\n  transition: all 0.4s; }\n\n.vjs-big-play-centered .vjs-big-play-button {\n  top: 50%;\n  left: 50%;\n  margin-top: -0.75em;\n  margin-left: -1.5em; }\n\n.video-js:hover .vjs-big-play-button,\n.video-js .vjs-big-play-button:focus {\n  border-color: #fff;\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5);\n  transition: all 0s; }\n\n.vjs-controls-disabled .vjs-big-play-button,\n.vjs-has-started .vjs-big-play-button,\n.vjs-using-native-controls .vjs-big-play-button,\n.vjs-error .vjs-big-play-button {\n  display: none; }\n\n.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button {\n  display: block; }\n\n.video-js button {\n  background: none;\n  border: none;\n  color: inherit;\n  display: inline-block;\n  font-size: inherit;\n  line-height: inherit;\n  text-transform: none;\n  text-decoration: none;\n  transition: none;\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none; }\n\n.vjs-control .vjs-button {\n  width: 100%;\n  height: 100%; }\n\n.video-js .vjs-control.vjs-close-button {\n  cursor: pointer;\n  height: 3em;\n  position: absolute;\n  right: 0;\n  top: 0.5em;\n  z-index: 2; }\n\n.video-js .vjs-modal-dialog {\n  background: rgba(0, 0, 0, 0.8);\n  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0));\n  overflow: auto; }\n\n.video-js .vjs-modal-dialog > * {\n  box-sizing: border-box; }\n\n.vjs-modal-dialog .vjs-modal-dialog-content {\n  font-size: 1.2em;\n  line-height: 1.5;\n  padding: 20px 24px;\n  z-index: 1; }\n\n.vjs-menu-button {\n  cursor: pointer; }\n\n.vjs-menu-button.vjs-disabled {\n  cursor: default; }\n\n.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu {\n  display: none; }\n\n.vjs-menu .vjs-menu-content {\n  display: block;\n  padding: 0;\n  margin: 0;\n  font-family: Arial, Helvetica, sans-serif;\n  overflow: auto; }\n\n.vjs-menu .vjs-menu-content > * {\n  box-sizing: border-box; }\n\n.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu {\n  display: none; }\n\n.vjs-menu li {\n  list-style: none;\n  margin: 0;\n  padding: 0.2em 0;\n  line-height: 1.4em;\n  font-size: 1.2em;\n  text-align: center;\n  text-transform: lowercase; }\n\n.vjs-menu li.vjs-menu-item:focus,\n.vjs-menu li.vjs-menu-item:hover,\n.js-focus-visible .vjs-menu li.vjs-menu-item:hover {\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5); }\n\n.vjs-menu li.vjs-selected,\n.vjs-menu li.vjs-selected:focus,\n.vjs-menu li.vjs-selected:hover,\n.js-focus-visible .vjs-menu li.vjs-selected:hover {\n  background-color: #fff;\n  color: #2B333F; }\n\n.vjs-menu li.vjs-menu-title {\n  text-align: center;\n  text-transform: uppercase;\n  font-size: 1em;\n  line-height: 2em;\n  padding: 0;\n  margin: 0 0 0.3em 0;\n  font-weight: bold;\n  cursor: default; }\n\n.vjs-menu-button-popup .vjs-menu {\n  display: none;\n  position: absolute;\n  bottom: 0;\n  width: 10em;\n  left: -3em;\n  height: 0em;\n  margin-bottom: 1.5em;\n  border-top-color: rgba(43, 51, 63, 0.7); }\n\n.vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n  position: absolute;\n  width: 100%;\n  bottom: 1.5em;\n  max-height: 15em; }\n\n.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu,\n.vjs-menu-button-popup .vjs-menu.vjs-lock-showing {\n  display: block; }\n\n.video-js .vjs-menu-button-inline {\n  transition: all 0.4s;\n  overflow: hidden; }\n\n.video-js .vjs-menu-button-inline:before {\n  width: 2.222222222em; }\n\n.video-js .vjs-menu-button-inline:hover,\n.video-js .vjs-menu-button-inline:focus,\n.video-js .vjs-menu-button-inline.vjs-slider-active,\n.video-js.vjs-no-flex .vjs-menu-button-inline {\n  width: 12em; }\n\n.vjs-menu-button-inline .vjs-menu {\n  opacity: 0;\n  height: 100%;\n  width: auto;\n  position: absolute;\n  left: 4em;\n  top: 0;\n  padding: 0;\n  margin: 0;\n  transition: all 0.4s; }\n\n.vjs-menu-button-inline:hover .vjs-menu,\n.vjs-menu-button-inline:focus .vjs-menu,\n.vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n  display: block;\n  opacity: 1; }\n\n.vjs-no-flex .vjs-menu-button-inline .vjs-menu {\n  display: block;\n  opacity: 1;\n  position: relative;\n  width: auto; }\n\n.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n  width: auto; }\n\n.vjs-menu-button-inline .vjs-menu-content {\n  width: auto;\n  height: 100%;\n  margin: 0;\n  overflow: hidden; }\n\n.video-js .vjs-control-bar {\n  display: none;\n  width: 100%;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  height: 3.0em;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7); }\n\n.vjs-has-started .vjs-control-bar {\n  display: flex;\n  visibility: visible;\n  opacity: 1;\n  transition: visibility 0.1s, opacity 0.1s; }\n\n.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n  visibility: visible;\n  opacity: 0;\n  transition: visibility 1s, opacity 1s; }\n\n.vjs-controls-disabled .vjs-control-bar,\n.vjs-using-native-controls .vjs-control-bar,\n.vjs-error .vjs-control-bar {\n  display: none !important; }\n\n.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n  opacity: 1;\n  visibility: visible; }\n\n.vjs-has-started.vjs-no-flex .vjs-control-bar {\n  display: table; }\n\n.video-js .vjs-control {\n  position: relative;\n  text-align: center;\n  margin: 0;\n  padding: 0;\n  height: 100%;\n  width: 4em;\n  flex: none; }\n\n.vjs-button > .vjs-icon-placeholder:before {\n  font-size: 1.8em;\n  line-height: 1.67; }\n\n.video-js .vjs-control:focus:before,\n.video-js .vjs-control:hover:before,\n.video-js .vjs-control:focus {\n  text-shadow: 0em 0em 1em white; }\n\n.video-js .vjs-control-text {\n  border: 0;\n  clip: rect(0 0 0 0);\n  height: 1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px; }\n\n.vjs-no-flex .vjs-control {\n  display: table-cell;\n  vertical-align: middle; }\n\n.video-js .vjs-custom-control-spacer {\n  display: none; }\n\n.video-js .vjs-progress-control {\n  cursor: pointer;\n  flex: auto;\n  display: flex;\n  align-items: center;\n  min-width: 4em;\n  touch-action: none; }\n\n.video-js .vjs-progress-control.disabled {\n  cursor: default; }\n\n.vjs-live .vjs-progress-control {\n  display: none; }\n\n.vjs-liveui .vjs-progress-control {\n  display: flex;\n  align-items: center; }\n\n.vjs-no-flex .vjs-progress-control {\n  width: auto; }\n\n.video-js .vjs-progress-holder {\n  flex: auto;\n  transition: all 0.2s;\n  height: 0.3em; }\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n  margin: 0 10px; }\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder {\n  font-size: 1.666666666666666666em; }\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled {\n  font-size: 1em; }\n\n.video-js .vjs-progress-holder .vjs-play-progress,\n.video-js .vjs-progress-holder .vjs-load-progress,\n.video-js .vjs-progress-holder .vjs-load-progress div {\n  position: absolute;\n  display: block;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  width: 0; }\n\n.video-js .vjs-play-progress {\n  background-color: #fff; }\n  .video-js .vjs-play-progress:before {\n    font-size: 0.9em;\n    position: absolute;\n    right: -0.5em;\n    top: -0.333333333333333em;\n    z-index: 1; }\n\n.video-js .vjs-load-progress {\n  background: rgba(115, 133, 159, 0.5); }\n\n.video-js .vjs-load-progress div {\n  background: rgba(115, 133, 159, 0.75); }\n\n.video-js .vjs-time-tooltip {\n  background-color: #fff;\n  background-color: rgba(255, 255, 255, 0.8);\n  border-radius: 0.3em;\n  color: #000;\n  float: right;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 1em;\n  padding: 6px 8px 8px 8px;\n  pointer-events: none;\n  position: absolute;\n  top: -3.4em;\n  visibility: hidden;\n  z-index: 1; }\n\n.video-js .vjs-progress-holder:focus .vjs-time-tooltip {\n  display: none; }\n\n.video-js .vjs-progress-control:hover .vjs-time-tooltip,\n.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {\n  display: block;\n  font-size: 0.6em;\n  visibility: visible; }\n\n.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip {\n  font-size: 1em; }\n\n.video-js .vjs-progress-control .vjs-mouse-display {\n  display: none;\n  position: absolute;\n  width: 1px;\n  height: 100%;\n  background-color: #000;\n  z-index: 1; }\n\n.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n  z-index: 0; }\n\n.video-js .vjs-progress-control:hover .vjs-mouse-display {\n  display: block; }\n\n.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {\n  visibility: hidden;\n  opacity: 0;\n  transition: visibility 1s, opacity 1s; }\n\n.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n  display: none; }\n\n.vjs-mouse-display .vjs-time-tooltip {\n  color: #fff;\n  background-color: #000;\n  background-color: rgba(0, 0, 0, 0.8); }\n\n.video-js .vjs-slider {\n  position: relative;\n  cursor: pointer;\n  padding: 0;\n  margin: 0 0.45em 0 0.45em;\n  /* iOS Safari */\n  -webkit-touch-callout: none;\n  /* Safari */\n  -webkit-user-select: none;\n  /* Konqueror HTML */\n  /* Firefox */\n  -moz-user-select: none;\n  /* Internet Explorer/Edge */\n  -ms-user-select: none;\n  /* Non-prefixed version, currently supported by Chrome and Opera */\n  user-select: none;\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5); }\n\n.video-js .vjs-slider.disabled {\n  cursor: default; }\n\n.video-js .vjs-slider:focus {\n  text-shadow: 0em 0em 1em white;\n  box-shadow: 0 0 1em #fff; }\n\n.video-js .vjs-mute-control {\n  cursor: pointer;\n  flex: none; }\n\n.video-js .vjs-volume-control {\n  cursor: pointer;\n  margin-right: 1em;\n  display: flex; }\n\n.video-js .vjs-volume-control.vjs-volume-horizontal {\n  width: 5em; }\n\n.video-js .vjs-volume-panel .vjs-volume-control {\n  visibility: visible;\n  opacity: 0;\n  width: 1px;\n  height: 1px;\n  margin-left: -1px; }\n\n.video-js .vjs-volume-panel {\n  transition: width 1s; }\n  .video-js .vjs-volume-panel:hover .vjs-volume-control,\n  .video-js .vjs-volume-panel:active .vjs-volume-control,\n  .video-js .vjs-volume-panel:focus .vjs-volume-control,\n  .video-js .vjs-volume-panel .vjs-volume-control:hover,\n  .video-js .vjs-volume-panel .vjs-volume-control:active,\n  .video-js .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control,\n  .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active {\n    visibility: visible;\n    opacity: 1;\n    position: relative;\n    transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s; }\n    .video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal,\n    .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {\n      width: 5em;\n      height: 3em; }\n    .video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-vertical,\n    .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,\n    .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,\n    .video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-vertical,\n    .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,\n    .video-js .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-vertical,\n    .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical {\n      left: -3.5em; }\n  .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active {\n    width: 9em;\n    transition: width 0.1s; }\n  .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only {\n    width: 4em; }\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n  height: 8em;\n  width: 3em;\n  left: -3000em;\n  transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s; }\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n  transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s; }\n\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n  width: 5em;\n  height: 3em;\n  visibility: visible;\n  opacity: 1;\n  position: relative;\n  transition: none; }\n\n.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n  position: absolute;\n  bottom: 3em;\n  left: 0.5em; }\n\n.video-js .vjs-volume-panel {\n  display: flex; }\n\n.video-js .vjs-volume-bar {\n  margin: 1.35em 0.45em; }\n\n.vjs-volume-bar.vjs-slider-horizontal {\n  width: 5em;\n  height: 0.3em; }\n\n.vjs-volume-bar.vjs-slider-vertical {\n  width: 0.3em;\n  height: 5em;\n  margin: 1.35em auto; }\n\n.video-js .vjs-volume-level {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  background-color: #fff; }\n  .video-js .vjs-volume-level:before {\n    position: absolute;\n    font-size: 0.9em; }\n\n.vjs-slider-vertical .vjs-volume-level {\n  width: 0.3em; }\n  .vjs-slider-vertical .vjs-volume-level:before {\n    top: -0.5em;\n    left: -0.3em; }\n\n.vjs-slider-horizontal .vjs-volume-level {\n  height: 0.3em; }\n  .vjs-slider-horizontal .vjs-volume-level:before {\n    top: -0.3em;\n    right: -0.5em; }\n\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical {\n  width: 4em; }\n\n.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level {\n  height: 100%; }\n\n.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {\n  width: 100%; }\n\n.video-js .vjs-volume-vertical {\n  width: 3em;\n  height: 8em;\n  bottom: 8em;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7); }\n\n.video-js .vjs-volume-horizontal .vjs-menu {\n  left: -2em; }\n\n.vjs-poster {\n  display: inline-block;\n  vertical-align: middle;\n  background-repeat: no-repeat;\n  background-position: 50% 50%;\n  background-size: contain;\n  background-color: #000000;\n  cursor: pointer;\n  margin: 0;\n  padding: 0;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  height: 100%; }\n\n.vjs-has-started .vjs-poster {\n  display: none; }\n\n.vjs-audio.vjs-has-started .vjs-poster {\n  display: block; }\n\n.vjs-using-native-controls .vjs-poster {\n  display: none; }\n\n.video-js .vjs-live-control {\n  display: flex;\n  align-items: flex-start;\n  flex: auto;\n  font-size: 1em;\n  line-height: 3em; }\n\n.vjs-no-flex .vjs-live-control {\n  display: table-cell;\n  width: auto;\n  text-align: left; }\n\n.video-js:not(.vjs-live) .vjs-live-control,\n.video-js.vjs-liveui .vjs-live-control {\n  display: none; }\n\n.video-js .vjs-seek-to-live-control {\n  cursor: pointer;\n  flex: none;\n  display: inline-flex;\n  height: 100%;\n  padding-left: 0.5em;\n  padding-right: 0.5em;\n  font-size: 1em;\n  line-height: 3em;\n  width: auto;\n  min-width: 4em; }\n\n.vjs-no-flex .vjs-seek-to-live-control {\n  display: table-cell;\n  width: auto;\n  text-align: left; }\n\n.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,\n.video-js:not(.vjs-live) .vjs-seek-to-live-control {\n  display: none; }\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge {\n  cursor: auto; }\n\n.vjs-seek-to-live-control .vjs-icon-placeholder {\n  margin-right: 0.5em;\n  color: #888; }\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder {\n  color: red; }\n\n.video-js .vjs-time-control {\n  flex: none;\n  font-size: 1em;\n  line-height: 3em;\n  min-width: 2em;\n  width: auto;\n  padding-left: 1em;\n  padding-right: 1em; }\n\n.vjs-live .vjs-time-control {\n  display: none; }\n\n.video-js .vjs-current-time,\n.vjs-no-flex .vjs-current-time {\n  display: none; }\n\n.video-js .vjs-duration,\n.vjs-no-flex .vjs-duration {\n  display: none; }\n\n.vjs-time-divider {\n  display: none;\n  line-height: 3em; }\n\n.vjs-live .vjs-time-divider {\n  display: none; }\n\n.video-js .vjs-play-control {\n  cursor: pointer; }\n\n.video-js .vjs-play-control .vjs-icon-placeholder {\n  flex: none; }\n\n.vjs-text-track-display {\n  position: absolute;\n  bottom: 3em;\n  left: 0;\n  right: 0;\n  top: 0;\n  pointer-events: none; }\n\n.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {\n  bottom: 1em; }\n\n.video-js .vjs-text-track {\n  font-size: 1.4em;\n  text-align: center;\n  margin-bottom: 0.1em; }\n\n.vjs-subtitles {\n  color: #fff; }\n\n.vjs-captions {\n  color: #fc6; }\n\n.vjs-tt-cue {\n  display: block; }\n\nvideo::-webkit-media-text-track-display {\n  -webkit-transform: translateY(-3em);\n  transform: translateY(-3em); }\n\n.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display {\n  -webkit-transform: translateY(-1.5em);\n  transform: translateY(-1.5em); }\n\n.video-js .vjs-fullscreen-control {\n  cursor: pointer;\n  flex: none; }\n\n.vjs-playback-rate > .vjs-menu-button,\n.vjs-playback-rate .vjs-playback-rate-value {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%; }\n\n.vjs-playback-rate .vjs-playback-rate-value {\n  pointer-events: none;\n  font-size: 1.5em;\n  line-height: 2;\n  text-align: center; }\n\n.vjs-playback-rate .vjs-menu {\n  width: 4em;\n  left: 0em; }\n\n.vjs-error .vjs-error-display .vjs-modal-dialog-content {\n  font-size: 1.4em;\n  text-align: center; }\n\n.vjs-error .vjs-error-display:before {\n  color: #fff;\n  content: \'X\';\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 4em;\n  left: 0;\n  line-height: 1;\n  margin-top: -0.5em;\n  position: absolute;\n  text-shadow: 0.05em 0.05em 0.1em #000;\n  text-align: center;\n  top: 50%;\n  vertical-align: middle;\n  width: 100%; }\n\n.vjs-loading-spinner {\n  display: none;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin: -25px 0 0 -25px;\n  opacity: 0.85;\n  text-align: left;\n  border: 6px solid rgba(43, 51, 63, 0.7);\n  box-sizing: border-box;\n  background-clip: padding-box;\n  width: 50px;\n  height: 50px;\n  border-radius: 25px;\n  visibility: hidden; }\n\n.vjs-seeking .vjs-loading-spinner,\n.vjs-waiting .vjs-loading-spinner {\n  display: block;\n  -webkit-animation: 0s linear 0.3s forwards vjs-spinner-show;\n          animation: 0s linear 0.3s forwards vjs-spinner-show; }\n\n.vjs-loading-spinner:before,\n.vjs-loading-spinner:after {\n  content: "";\n  position: absolute;\n  margin: -6px;\n  box-sizing: inherit;\n  width: inherit;\n  height: inherit;\n  border-radius: inherit;\n  opacity: 1;\n  border: inherit;\n  border-color: transparent;\n  border-top-color: white; }\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:after {\n  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; }\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:before {\n  border-top-color: white; }\n\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:after {\n  border-top-color: white;\n  -webkit-animation-delay: 0.44s;\n  animation-delay: 0.44s; }\n\n@keyframes vjs-spinner-show {\n  to {\n    visibility: visible; } }\n\n@-webkit-keyframes vjs-spinner-show {\n  to {\n    visibility: visible; } }\n\n@keyframes vjs-spinner-spin {\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg); } }\n\n@-webkit-keyframes vjs-spinner-spin {\n  100% {\n    -webkit-transform: rotate(360deg); } }\n\n@keyframes vjs-spinner-fade {\n  0% {\n    border-top-color: #73859f; }\n  20% {\n    border-top-color: #73859f; }\n  35% {\n    border-top-color: white; }\n  60% {\n    border-top-color: #73859f; }\n  100% {\n    border-top-color: #73859f; } }\n\n@-webkit-keyframes vjs-spinner-fade {\n  0% {\n    border-top-color: #73859f; }\n  20% {\n    border-top-color: #73859f; }\n  35% {\n    border-top-color: white; }\n  60% {\n    border-top-color: #73859f; }\n  100% {\n    border-top-color: #73859f; } }\n\n.vjs-chapters-button .vjs-menu ul {\n  width: 24em; }\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n  vertical-align: middle;\n  display: inline-block;\n  margin-bottom: -0.1em; }\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n  font-family: VideoJS;\n  content: "\\f10d";\n  font-size: 1.5em;\n  line-height: inherit; }\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n  vertical-align: middle;\n  display: inline-block;\n  margin-bottom: -0.1em; }\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n  font-family: VideoJS;\n  content: " \\f11d";\n  font-size: 1.5em;\n  line-height: inherit; }\n\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer {\n  flex: auto;\n  display: block; }\n\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer {\n  width: auto; }\n\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time,\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control,\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-panel,\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-descriptions-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button,\n.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subs-caps-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-audio-button {\n  display: none; }\n\n.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time,\n.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate,\n.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-panel,\n.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-descriptions-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button,\n.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subs-caps-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-audio-button {\n  display: none; }\n\n.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time,\n.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate,\n.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-panel,\n.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-descriptions-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button,\n.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-audio-button {\n  display: none; }\n\n.vjs-modal-dialog.vjs-text-track-settings {\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.75);\n  color: #fff;\n  height: 70%; }\n\n.vjs-text-track-settings .vjs-modal-dialog-content {\n  display: table; }\n\n.vjs-text-track-settings .vjs-track-settings-colors,\n.vjs-text-track-settings .vjs-track-settings-font,\n.vjs-text-track-settings .vjs-track-settings-controls {\n  display: table-cell; }\n\n.vjs-text-track-settings .vjs-track-settings-controls {\n  text-align: right;\n  vertical-align: bottom; }\n\n@supports (display: grid) {\n  .vjs-text-track-settings .vjs-modal-dialog-content {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    grid-template-rows: 1fr;\n    padding: 20px 24px 0px 24px; }\n  .vjs-track-settings-controls .vjs-default-button {\n    margin-bottom: 20px; }\n  .vjs-text-track-settings .vjs-track-settings-controls {\n    grid-column: 1 / -1; }\n  .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,\n  .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,\n  .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content {\n    grid-template-columns: 1fr; } }\n\n.vjs-track-setting > select {\n  margin-right: 1em;\n  margin-bottom: 0.5em; }\n\n.vjs-text-track-settings fieldset {\n  margin: 5px;\n  padding: 3px;\n  border: none; }\n\n.vjs-text-track-settings fieldset span {\n  display: inline-block; }\n\n.vjs-text-track-settings fieldset span > select {\n  max-width: 7.3em; }\n\n.vjs-text-track-settings legend {\n  color: #fff;\n  margin: 0 0 5px 0; }\n\n.vjs-text-track-settings .vjs-label {\n  position: absolute;\n  clip: rect(1px 1px 1px 1px);\n  clip: rect(1px, 1px, 1px, 1px);\n  display: block;\n  margin: 0 0 5px 0;\n  padding: 0;\n  border: 0;\n  height: 1px;\n  width: 1px;\n  overflow: hidden; }\n\n.vjs-track-settings-controls button:focus,\n.vjs-track-settings-controls button:active {\n  outline-style: solid;\n  outline-width: medium;\n  background-image: linear-gradient(0deg, #fff 88%, #73859f 100%); }\n\n.vjs-track-settings-controls button:hover {\n  color: rgba(43, 51, 63, 0.75); }\n\n.vjs-track-settings-controls button {\n  background-color: #fff;\n  background-image: linear-gradient(-180deg, #fff 88%, #73859f 100%);\n  color: #2B333F;\n  cursor: pointer;\n  border-radius: 2px; }\n\n.vjs-track-settings-controls .vjs-default-button {\n  margin-right: 1em; }\n\n@media print {\n  .video-js > *:not(.vjs-tech):not(.vjs-poster) {\n    visibility: hidden; } }\n\n.vjs-resize-manager {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: none;\n  z-index: -1000; }\n\n.js-focus-visible .video-js *:focus:not(.focus-visible) {\n  outline: none;\n  background: none; }\n\n.video-js *:focus:not(:focus-visible),\n.video-js .vjs-menu *:focus:not(:focus-visible) {\n  outline: none;\n  background: none; }\n',""])}]]);
//# sourceMappingURL=vendors~videojs.js.map