(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{552:function(e,t,i){"use strict";varn=function(){this.init=function(){vare={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){varn;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){vari,n,r,a;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(a=[],n=arguments.length,n=1;n<arguments.length;++n)a.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,a)}},this.dispose=function(){e={}}}};n.prototype.pipe=function(e){returnthis.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},n.prototype.push=function(e){this.trigger("data",e)},n.prototype.flush=function(e){this.trigger("done",e)},e.exports=n},561:function(e,t,i){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},562:function(e,t,i){(function(t){vari;i="undefined"!==typeofwindow?window:"undefined"!==typeoft?t:"undefined"!==typeofself?self:{},e.exports=i}).call(this,i(48))},563:function(e,t,i){"use strict";varn,r,a,s,o,u=i(655).toUnsigned;n=function(e,t){vari,a,s,o,l,c=[];if(!t.length)returnnull;for(i=0;i<e.byteLength;)a=u(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),s=r(e.subarray(i+4,i+8)),o=a>1?i+a:e.byteLength,s===t[0]&&(1===t.length?c.push(e.subarray(i+8,o)):(l=n(e.subarray(i+8,o),t.slice(1))).length&&(c=c.concat(l))),i=o;returnc},r=function(e){vart="";returnt+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},a=function(e){returnn(e,["moov","trak"]).reduce(function(e,t){vari,r,a,s,o;return(i=n(t,["tkhd"])[0])?(r=i[0],s=u(i[a=0===r?12:20]<<24|i[a+1]<<16|i[a+2]<<8|i[a+3]),(o=n(t,["mdia","mdhd"])[0])?(a=0===(r=o[0])?12:20,e[s]=u(o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3]),e):null):null},{})},s=function(e,t){vari,r,a;returni=n(t,["moof","traf"]),r=[].concat.apply([],i.map(function(t){returnn(t,["tfhd"]).map(function(i){varr,a;returnr=u(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),a=e[r]||9e4,(n(t,["tfdt"]).map(function(e){vart,i;returnt=e[0],i=u(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=u(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0]||1/0)/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},o=function(e){vart=n(e,["moov","trak"]),i=[];returnt.forEach(function(e){vart=n(e,["mdia","hdlr"]),a=n(e,["tkhd"]);t.forEach(function(e,t){varn,s,o=r(e.subarray(8,12)),u=a[t];"vide"===o&&(s=0===(n=newDataView(u.buffer,u.byteOffset,u.byteLength)).getUint8(0)?n.getUint32(12):n.getUint32(20),i.push(s))})}),i},e.exports={findBox:n,parseType:r,timescale:a,startTime:s,videoTrackIds:o}},568:function(e,t,i){"use strict";varn=i(635);e.exports=Function.prototype.bind||n},569:function(e,t,i){"use strict";varn=Function.prototype.toString,r=/^\s*class\b/,a=function(e){try{vart=n.call(e);returnr.test(t)}catch(i){return!1}},s=Object.prototype.toString,o="function"===typeofSymbol&&"symbol"===typeofSymbol.toStringTag;e.exports=function(e){if(!e)return!1;if("function"!==typeofe&&"object"!==typeofe)return!1;if("function"===typeofe&&!e.prototype)return!0;if(o)returnfunction(e){try{return!a(e)&&(n.call(e),!0)}catch(t){return!1}}(e);if(a(e))return!1;vart=s.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},570:function(e,t,i){"use strict";varn,r,a,s,o=i(552),u=i(597),l=i(657),c=i(658),d=i(661),h=i(662),p=i(664),f=i(665).H264Stream,m=i(667),g=i(571).isLikelyAacData,y=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],v=["width","height","profileIdc","levelIdc","profileCompatibility"],_=function(e,t){vari;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},b=function(e,t,i,n,r,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:a,baseMediaDecodeTime:e}};(r=function(e,t){vari=[],n=0,a=0,s=0,o=1/0;t=t||{},r.prototype.init.call(this),this.push=function(t){d.collectDtsInfo(e,t),e&&y.forEach(function(i){e[i]=t[i]}),i.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(){varr,l,h,p;0!==i.length?(r=c.trimAdtsFramesByEarliestDts(i,e,a),e.baseMediaDecodeTime=d.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),c.prefixWithSilence(e,r,s,o),e.samples=c.generateSampleTable(r),h=u.mdat(c.concatenateFrameData(r)),i=[],l=u.moof(n,[e]),p=newUint8Array(l.byteLength+h.byteLength),n++,p.set(l),p.set(h,l.byteLength),d.clearDtsInfo(e),this.trigger("data",{track:e,boxes:p}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=newo,(n=function(e,t){vari,r,a=0,s=[],o=[];t=t||{},n.prototype.init.call(this),deletee.minPTS,this.gopCache_=[],this.push=function(t){d.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],v.forEach(function(t){e[t]=i[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(vari,n,r,c,h,p,f,m,g=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)returnthis.resetStream_(),voidthis.trigger("done","VideoSegmentStream");if(i=l.groupNalsIntoFrames(s),(r=l.groupFramesIntoGops(i))[0][0].keyFrame||((n=this.getGopForFusion_(s[0],e))?(g=n.duration,r.unshift(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.pts=n.pts,r.dts=n.dts,r.duration+=n.duration):r=l.extendFirstKeyFrame(r)),o.length){vary;if(!(y=t.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))returnthis.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),voidthis.trigger("done","VideoSegmentStream");d.clearDtsInfo(e),r=y}d.collectDtsInfo(e,r),e.samples=l.generateSampleTable(r),h=u.mdat(l.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}})),f=r[0],m=r[r.length-1],this.trigger("segmentTimingInfo",b(e.baseMediaDecodeTime,f.dts,f.pts,m.dts+m.duration,m.pts+m.duration,g)),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=u.moof(a,[e]),p=newUint8Array(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),i=void0,r=void0},this.getGopForFusion_=function(t){vari,n,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&_(e.pps[0],a.pps[0])&&e.sps&&_(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=a,o=i));returnn?n.gop:null},this.alignGopsAtStart_=function(e){vart,i,n,r,a,s,u,l;for(a=e.byteLength,s=e.nalCount,u=e.duration,t=i=0;t<o.length&&i<e.length&&(n=o[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,a-=r.byteLength,s-=r.nalCount,u-=r.duration);return0===i?e:i===e.length?null:((l=e.slice(i)).byteLength=a,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){vart,i,n,r,a,s,u;for(t=o.length-1,i=e.length-1,a=null,s=!1;t>=0&&i>=0;){if(n=o[t],r=e[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?t--:(t===o.length-1&&(a=i),i--)}if(!s&&null===a)returnnull;if(0===(u=s?i:a))returne;varl=e.slice(u),c=l.reduce(function(e,t){returne.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});returnl.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){o=e}}).prototype=newo,(s=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeofe.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){returne.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=newo,s.prototype.flush=function(e){vart,i,n,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)returnthis.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,v.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,y.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=u.initSegment(this.pendingTracks),s.initSegment=newUint8Array(n.byteLength),s.initSegment.set(n),s.data=newUint8Array(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++)(i=this.pendingMetadata[r]).cueTime=i.pts,this.keepOriginalTimestamps||(i.cueTime-=o),i.cueTime/=9e4,s.metadata.push(i);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){vart,i,o=this,u=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){vart={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=newh.MetadataStream,t.aacStream=newm,t.audioTimestampRolloverStream=newh.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=newh.TimestampRolloverStream("timed-metadata"),t.adtsStream=newp,t.coalesceStream=news(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(n){"timed-metadata"!==n.type||t.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:o.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=newr(i,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(){vara={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=newh.MetadataStream,a.packetStream=newh.TransportPacketStream,a.parseStream=newh.TransportParseStream,a.elementaryStream=newh.ElementaryStream,a.videoTimestampRolloverStream=newh.TimestampRolloverStream("video"),a.audioTimestampRolloverStream=newh.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=newh.TimestampRolloverStream("timed-metadata"),a.adtsStream=newp,a.h264Stream=newf,a.captionStream=newh.CaptionStream,a.coalesceStream=news(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){varu;if("metadata"===s.type){for(u=s.tracks.length;u--;)t||"video"!==s.tracks[u].type?i||"audio"!==s.tracks[u].type||((i=s.tracks[u]).timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime):(t=s.tracks[u]).timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime;t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=newn(t,e),a.videoSegmentStream.on("timelineStartInfo",function(e){i&&(i.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))}),a.videoSegmentStream.on("processedGopsInfo",o.trigger.bind(o,"gopInfo")),a.videoSegmentStream.on("segmentTimingInfo",o.trigger.bind(o,"videoSegmentTimingInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",function(e){i&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=newr(i,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(n){varr=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void0,i.timelineStartInfo.pts=void0,d.clearDtsInfo(i),e.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void0,t.timelineStartInfo.pts=void0,d.clearDtsInfo(t),r.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=n)),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(u){vart=g(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),u=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){u=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=newo,e.exports={Transmuxer:a,VideoSegmentStream:n,AudioSegmentStream:r,AUDIO_PROPERTIES:y,VIDEO_PROPERTIES:v,generateVideoSegmentTimingInfo:b}},571:function(e,t,i){"use strict";varn=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){returne[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){returne[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},parseId3TagSize:function(e,t){vari=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?i+20:i+10},parseAdtsSize:function(e,t){vari=(224&e[t+5])>>5,n=e[t+4]<<3;return6144&e[t+3]|n|i},parseType:function(e,t){returne[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(vart=0;t+5<e.length;){if(255===e[t]&&240===(246&e[t+1]))returnn[(60&e[t+2])>>>2];t++}returnnull},parseAacTimestamp:function(e){vart,i,n;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if((i=r(e.subarray(t+4,t+8)))<1)returnnull;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(vara=0;a<n.byteLength;a++)if(0===n[a]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,i){varn,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);returnr}(n,0,a))){vars=n.subarray(a+1),o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;returno*=4,o+=3&s[7]}break}}t+=10,t+=i}while(t<e.byteLength);returnnull}}},590:function(e,t,i){"use strict";varn=i(636),r="function"===typeofSymbol&&"symbol"===typeofSymbol("foo"),a=Object.prototype.toString,s=Array.prototype.concat,o=Object.defineProperty,u=o&&function(){vare={};try{for(vartino(e,"x",{enumerable:!1,value:e}),e)return!1;returne.x===e}catch(i){return!1}}(),l=function(e,t,i,n){varr;tine&&("function"!==typeof(r=n)||"[object Function]"!==a.call(r)||!n())||(u?o(e,t,{configurable:!0,enumerable:!1,value:i,writable:!0}):e[t]=i)},c=function(e,t){vari=arguments.length>2?arguments[2]:{},a=n(t);r&&(a=s.call(a,Object.getOwnPropertySymbols(t)));for(varo=0;o<a.length;o+=1)l(e,a[o],t[a[o]],i[a[o]])};c.supportsDescriptors=!!u,e.exports=c},591:function(e,t,i){"use strict";varn=Object.prototype.toString;e.exports=function(e){vart=n.call(e),i="[object Arguments]"===t;returni||(i="[object Array]"!==t&&null!==e&&"object"===typeofe&&"number"===typeofe.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),i}},592:function(e,t,i){"use strict";varn=i(568),r=i(638),a=n.call(Function.call,String.prototype.replace),s=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,o=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){vare=r.ToString(r.CheckObjectCoercible(this));returna(a(e,s,""),o,"")}},593:function(e,t,i){"use strict";varn=Object.getOwnPropertyDescriptor?function(){returnObject.getOwnPropertyDescriptor(arguments,"callee").get}():function(){thrownewTypeError},r="function"===typeofSymbol&&"symbol"===typeofSymbol.iterator,a=Object.getPrototypeOf||function(e){returne.__proto__},s=void0,o="undefined"===typeofUint8Array?void0:a(Uint8Array),u={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"===typeofArrayBuffer?void0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"===typeofArrayBuffer?void0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":r?a([][Symbol.iterator]()):void0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void0,"$ %AsyncFunction%":void0,"$ %AsyncFunctionPrototype%":void0,"$ %AsyncGenerator%":void0,"$ %AsyncGeneratorFunction%":void0,"$ %AsyncGeneratorPrototype%":void0,"$ %AsyncIteratorPrototype%":s&&r&&Symbol.asyncIterator?s[Symbol.asyncIterator]():void0,"$ %Atomics%":"undefined"===typeofAtomics?void0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"===typeofDataView?void0:DataView,"$ %DataViewPrototype%":"undefined"===typeofDataView?void0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"===typeofFloat32Array?void0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"===typeofFloat32Array?void0:Float32Array.prototype,"$ %Float64Array%":"undefined"===typeofFloat64Array?void0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"===typeofFloat64Array?void0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void0,"$ %GeneratorFunction%":void0,"$ %GeneratorPrototype%":void0,"$ %Int8Array%":"undefined"===typeofInt8Array?void0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"===typeofInt8Array?void0:Int8Array.prototype,"$ %Int16Array%":"undefined"===typeofInt16Array?void0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"===typeofInt16Array?void0:Int8Array.prototype,"$ %Int32Array%":"undefined"===typeofInt32Array?void0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"===typeofInt32Array?void0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":r?a(a([][Symbol.iterator]())):void0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"===typeofMap?void0:Map,"$ %MapIteratorPrototype%":"undefined"!==typeofMap&&r?a((newMap)[Symbol.iterator]()):void0,"$ %MapPrototype%":"undefined"===typeofMap?void0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"===typeofPromise?void0:Promise,"$ %PromisePrototype%":"undefined"===typeofPromise?void0:Promise.prototype,"$ %PromiseProto_then%":"undefined"===typeofPromise?void0:Promise.prototype.then,"$ %Promise_all%":"undefined"===typeofPromise?void0:Promise.all,"$ %Promise_reject%":"undefined"===typeofPromise?void0:Promise.reject,"$ %Promise_resolve%":"undefined"===typeofPromise?void0:Promise.resolve,"$ %Proxy%":"undefined"===typeofProxy?void0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"===typeofReflect?void0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"===typeofSet?void0:Set,"$ %SetIteratorPrototype%":"undefined"!==typeofSet&&r?a((newSet)[Symbol.iterator]()):void0,"$ %SetPrototype%":"undefined"===typeofSet?void0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"===typeofSharedArrayBuffer?void0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"===typeofSharedArrayBuffer?void0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":r?a(""[Symbol.iterator]()):void0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":r?Symbol:void0,"$ %SymbolPrototype%":r?Symbol.prototype:void0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":n,"$ %TypedArray%":o,"$ %TypedArrayPrototype%":o?o.prototype:void0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"===typeofUint8Array?void0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"===typeofUint8Array?void0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"===typeofUint8ClampedArray?void0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"===typeofUint8ClampedArray?void0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"===typeofUint16Array?void0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"===typeofUint16Array?void0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"===typeofUint32Array?void0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"===typeofUint32Array?void0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"===typeofWeakMap?void0:WeakMap,"$ %WeakMapPrototype%":"undefined"===typeofWeakMap?void0:WeakMap.prototype,"$ %WeakSet%":"undefined"===typeofWeakSet?void0:WeakSet,"$ %WeakSetPrototype%":"undefined"===typeofWeakSet?void0:WeakSet.prototype};e.exports=function(e,t){if(arguments.length>1&&"boolean"!==typeoft)thrownewTypeError('"allowMissing" argument must be a boolean');vari="$ "+e;if(!(iinu))thrownewSyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeofu[i]&&!t)thrownewTypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");returnu[i]}},594:function(e,t,i){"use strict";varn=i(568);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},595:function(e,t,i){"use strict";varn=i(592);e.exports=function(){returnString.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:n}},596:function(e,t,i){"use strict";varn,r,a=i(563).parseType,s=function(e){returnnewDate(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]}},u=function(e){vart,i,n=newDataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");elseswitch(31&e[t]){case1:r.push("slice_layer_without_partitioning_rbsp");break;case5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case6:r.push("sei_rbsp");break;case7:r.push("seq_parameter_set_rbsp");break;case8:r.push("pic_parameter_set_rbsp");break;case9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}returnr},l={avc1:function(e){vart=newDataView(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:n(e.subarray(78,e.byteLength))}},avcC:function(e){vart,i,n,r,a=newDataView(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(n=6,r=0;r<o;r++)i=a.getUint16(n),n+=2,s.sps.push(newUint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,r=0;r<t;r++)i=a.getUint16(n),n+=2,s.pps.push(newUint8Array(e.subarray(n,n+i))),n+=i;returns},btrt:function(e){vart=newDataView(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:newUint8Array(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(vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:a(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(a(e.subarray(n,n+4))),n+=4;returni},dinf:function(e){return{boxes:n(e)}},dref:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),dataReferences:n(e.subarray(8))}},hdlr:function(e){vart={version:newDataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:newUint8Array(e.subarray(1,4)),handlerType:a(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}returnt.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:u(e)}},mdhd:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:i.getUint8(0),flags:newUint8Array(e.subarray(1,4)),language:""};return1===r.version?(n+=4,r.creationTime=s(i.getUint32(n)),n+=8,r.modificationTime=s(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8,r.duration=i.getUint32(n)):(r.creationTime=s(i.getUint32(n)),n+=4,r.modificationTime=s(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4,r.duration=i.getUint32(n)),n+=4,t=i.getUint16(n),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:n(e)}},mfhd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:n(e)}},mp4a:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};returne.byteLength>28&&(i.streamDescriptor=n(e.subarray(28))[0]),i},moof:function(e){return{boxes:n(e)}},moov:function(e){return{boxes:n(e)}},mvex:function(e){return{boxes:n(e)}},mvhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4))};return1===n.version?(i+=4,n.creationTime=s(t.getUint32(i)),i+=8,n.modificationTime=s(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8,n.duration=t.getUint32(i)):(n.creationTime=s(t.getUint32(i)),i+=4,n.modificationTime=s(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4,n.duration=t.getUint32(i)),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=newUint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){vart,i={version:e[0],flags:newUint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});returni},sidx:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(t=24;r;t+=12,r--)n.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&i.getUint32(t),subsegmentDuration:i.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&i.getUint32(t+8)});returnn},smhd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:n(e)}},stco:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(t=8;r;t+=4,r--)n.chunkOffsets.push(i.getUint32(t));returnn},stsc:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),r={version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;t+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});returnr},stsd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleDescriptions:n(e.subarray(8))}},stsz:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));returnn},stts:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(t=8;r;t+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});returnn},styp:function(e){returnl.ftyp(e)},tfdt:function(e){vart={version:e[0],flags:newUint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return1===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){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];returnt=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),u&&(n.defaultSampleFlags=i.getUint32(t)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4))};return1===n.version?(i+=4,n.creationTime=s(t.getUint32(i)),i+=8,n.modificationTime=s(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8,n.duration=t.getUint32(i)):(n.creationTime=s(t.getUint32(i)),i+=4,n.modificationTime=s(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4,n.duration=t.getUint32(i)),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=newUint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/16,n},traf:function(e){return{boxes:n(e)}},trak:function(e){return{boxes:n(e)}},trex:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:newUint8Array(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){vart,i={version:e[0],flags:newUint8Array(e.subarray(1,4)),samples:[]},n=newDataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],u=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&d&&(t={flags:o(e.subarray(h,h+4))},h+=4,s&&(t.duration=n.getUint32(h),h+=4),u&&(t.size=n.getUint32(h),h+=4),c&&(t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t),d--);d--;)t={},s&&(t.duration=n.getUint32(h),h+=4),u&&(t.size=n.getUint32(h),h+=4),l&&(t.flags=o(e.subarray(h,h+4)),h+=4),c&&(t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t);returni},"url ":function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4))}},vmhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:newUint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:newUint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};n=function(e){for(vart,i,n,r,s,o=0,u=[],c=newArrayBuffer(e.length),d=newUint8Array(c),h=0;h<e.length;++h)d[h]=e[h];for(t=newDataView(c);o<e.byteLength;)i=t.getUint32(o),n=a(e.subarray(o+4,o+8)),r=i>1?o+i:e.byteLength,(s=(l[n]||function(e){return{data:e}})(e.subarray(o+8,r))).size=i,s.type=n,u.push(s),o=r;returnu},r=function(e,t){vari;returnt=t||0,i=newArray(2*t+1).join(" "),e.map(function(e,n){returni+e.type+"\n"+Object.keys(e).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(t){varn=i+" "+t+": ",r=e[t];if(rinstanceofUint8Array||rinstanceofUint32Array){vara=Array.prototype.slice.call(newUint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);returna?1===a.length?n+"<"+a.join("").slice(1)+">":n+"<\n"+a.map(function(e){returni+" "+e}).join("\n")+"\n"+i+" >":n+"<>"}returnn+JSON.stringify(r,null,2).split("\n").map(function(e,t){return0===t?e:i+" "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+r(e.boxes,t+1):"")}).join("\n")},e.exports={inspect:n,textify:r,parseTfdt:l.tfdt,parseHdlr:l.hdlr,parseTfhd:l.tfhd,parseTrun:l.trun,parseSidx:l.sidx}},597:function(e,t,i){"use strict";varn,r,a,s,o,u,l,c,d,h,p,f,m,g,y,v,_,b,T,S,k,w,C,E,A,P,L,x,I,O,U,D,R,M,B,N,j=Math.pow(2,32)-1;!function(){vare;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"!==typeofUint8Array){for(einC)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=newUint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),P=newUint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=newUint8Array([0,0,0,1]),L=newUint8Array([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]),x=newUint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:L,audio:x},D=newUint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),U=newUint8Array([0,0,0,0,0,0,0,0]),R=newUint8Array([0,0,0,0,0,0,0,0]),M=R,B=newUint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=R,O=newUint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){vart,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=newUint8Array(r+8),newDataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;returni},r=function(){returnn(C.dinf,n(C.dref,D))},a=function(e){returnn(C.esds,newUint8Array([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(){returnn(C.ftyp,E,A,E,P)},v=function(e){returnn(C.hdlr,I[e])},o=function(e){returnn(C.mdat,e)},y=function(e){vart=newUint8Array([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]);returne.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(C.mdhd,t)},g=function(e){returnn(C.mdia,y(e),v(e.type),l(e))},u=function(e){returnn(C.mfhd,newUint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){returnn(C.minf,"video"===e.type?n(C.vmhd,O):n(C.smhd,U),r(),b(e))},c=function(e,t){for(vari=[],r=t.length;r--;)i[r]=S(t[r]);returnn.apply(null,[C.moof,u(e)].concat(i))},d=function(e){for(vart=e.length,i=[];t--;)i[t]=f(e[t]);returnn.apply(null,[C.moov,p(4294967295)].concat(i).concat(h(e)))},h=function(e){for(vart=e.length,i=[];t--;)i[t]=k(e[t]);returnn.apply(null,[C.mvex].concat(i))},p=function(e){vart=newUint8Array([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]);returnn(C.mvhd,t)},_=function(e){vart,i,r=e.samples||[],a=newUint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,a[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;returnn(C.sdtp,a)},b=function(e){returnn(C.stbl,T(e),n(C.stts,N),n(C.stsc,M),n(C.stsz,B),n(C.stco,R))},function(){vare,t;T=function(i){returnn(C.stsd,newUint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){vart,i=e.sps||[],r=e.pps||[],a=[],s=[];for(t=0;t<i.length;t++)a.push((65280&i[t].byteLength)>>>8),a.push(255&i[t].byteLength),a=a.concat(Array.prototype.slice.call(i[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]));returnn(C.avc1,newUint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(C.avcC,newUint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length]).concat(a).concat([r.length]).concat(s))),n(C.btrt,newUint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){returnn(C.mp4a,newUint8Array([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){vart=newUint8Array([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]);returnn(C.tkhd,t)},S=function(e){vart,i,r,a,s,o;returnt=n(C.tfhd,newUint8Array([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/(j+1)),o=Math.floor(e.baseMediaDecodeTime%(j+1)),i=n(C.tfdt,newUint8Array([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),n(C.traf,t,i,r)):(a=_(e),r=w(e,a.length+92),n(C.traf,t,i,r,a))},f=function(e){returne.duration=e.duration||4294967295,n(C.trak,m(e),g(e))},k=function(e){vart=newUint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(C.trex,t)},function(){vare,t,i;i=function(e,t){vari=0,n=0,r=0,a=0;returne.length&&(void0!==e[0].duration&&(i=1),void0!==e[0].size&&(n=2),void0!==e[0].flags&&(r=4),void0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){varr,a,s,o;for(t+=20+16*(a=e.samples||[]).length,r=i(a,t),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);returnn(C.trun,newUint8Array(r))},e=function(e,t){varr,a,s,o;for(t+=20+8*(a=e.samples||[]).length,r=i(a,t),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);returnn(C.trun,newUint8Array(r))},w=function(i,n){return"audio"===i.type?e(i,n):t(i,n)}}(),e.exports={ftyp:s,mdat:o,moof:c,moov:d,initSegment:function(e){vart,i=s(),n=d(e);return(t=newUint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}}},598:function(e,t,i){"use strict";varn=i(552),r=i(599),a=functione(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[newc(0,0),newc(0,1),newc(1,0),newc(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=newn).push=function(e){vart,i,n;if("sei_rbsp"===e.nalUnitType&&(t=r.parseSei(e.escapedRBSP)).payloadType===r.USER_DATA_REGISTERED_ITU_T_T35&&(i=r.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)returnthis.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=r.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),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){returne.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.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null: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){return4096===(30720&e.ccData)},a.prototype.setsChannel2Active=function(e){return6144===(30720&e.ccData)},a.prototype.setsTextOrXDSActive=function(e){return256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)};vars={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){returnnull===e?"":(e=s[e]||e,String.fromCharCode(e))},u=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],l=function(){for(vare=[],t=15;t--;)e.push("");returne},c=functione(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){vart,i,n,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";elseif(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;elseif(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);elseif(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);elseif(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);elseif(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;elseif(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);elseif(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=l();elseif(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=l();elseif(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=l()),this.mode_="paintOn",this.startPts_=e.pts;elseif(this.isSpecialCharacter(n,r))a=o((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;elseif(this.isExtCharacter(n,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((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;elseif(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);elseif(this.isOffsetControlCode(n,r))this.column_+=3&r;elseif(this.isPAC(n,r)){vars=u.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"])}elsethis.isNormalChar(n)&&(0===r&&(r=null),a=o(n),a+=o(r),this[this.mode_](e.pts,a),this.column_+=a.length)}elsethis.lastControlCode_=null}};c.prototype=newn,c.prototype.flushDisplayed=function(e){vart=this.displayed_.map(function(e){try{returne.trim()}catch(t){returnconsole.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_=l(),this.nonDisplayed_=l(),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){returne===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){returne===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){returne===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){returne>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},c.prototype.isColorPAC=function(e){returne>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){returne>=32&&e<=127},c.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=l(),this.displayed_=l()),void0!==t&&t!==this.row_)for(vari=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},c.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);vari=t.reduce(function(e,t){returne+"<"+t+">"},"");this[this.mode_](e,i)},c.prototype.clearFormatting=function(e){if(this.formatting_.length){vart=this.formatting_.reverse().reduce(function(e,t){returne+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},c.prototype.popOn=function(e,t){vari=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},c.prototype.rollUp=function(e,t){vari=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},c.prototype.shiftRowsUp_=function(){vare;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){vari=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},e.exports={CaptionStream:a,Cea608Stream:c}},599:function(e,t,i){"use strict";e.exports={parseSei:function(e){for(vart=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}t+=r,n=0,r=0}returni},parseUserData:function(e){return181!==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){vari,n,r,a,s=[];if(!(64&t[0]))returns;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));returns},discardEmulationPreventionBytes:function(e){for(vart,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)returne;t=n-r.length,i=newUint8Array(t);vars=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];returni},USER_DATA_REGISTERED_ITU_T_T35:4}},600:function(e,t,i){"use strict";varn=i(552),r=function(e,t){vari=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;returne},a=functione(t){vari,n;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void0===n&&(n=e.dts),e.dts=r(e.dts,n),e.pts=r(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){n=void0,i=void0}};a.prototype=newn,e.exports={TimestampRolloverStream:a,handleRollover:r}},622:function(e,t,i){"use strict";i(47),i(623)},623:function(e,t,i){},624:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});varn=c(i(5)),r=c(i(12)),a=c(i(6)),s=c(i(13)),o=i(751),u=c(o),l=function(e){if(e&&e.__esModule)returne;vart={};if(null!=e)for(variine)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt.default=e,t}(i(0));functionc(e){returne&&e.__esModule?e:{default:e}}vard=function(e){functiont(){return(0,n.default)(this,t),(0,a.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,r.default)(t,[{key:"render",value:function(){returnl.createElement(u.default,this.props)}}]),t}(l.Component);t.default=d,d.Panel=o.Panel,d.defaultProps={prefixCls:"am-accordion"},e.exports=t.default},626:function(e,t,i){(function(t){varn,r="undefined"!==typeoft?t:"undefined"!==typeofwindow?window:{},a=i(627);"undefined"!==typeofdocument?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=n}).call(this,i(48))},628:function(e,t){functioni(e){returne.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(vart="",n=0;n<arguments.length;n++)t+=i(e[n])+(arguments[n+1]||"");returnt}},629:function(e,t){e.exports=function(e,t){vari,n=null;try{i=JSON.parse(e,t)}catch(r){n=r}return[n,i]}},630:function(e,t){functioni(e){if(e&&"object"===typeofe){vart=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeofe)returns[e];vari,a=String(e);return(i=n[a.toLowerCase()])?i:(i=r[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void0)}i.isEventKey=function(e,t){if(e&&"object"===typeofe){vari=e.which||e.keyCode||e.charCode;if(null===i||void0===i)return!1;if("string"===typeoft){vara;if(a=n[t.toLowerCase()])returna===i;if(a=r[t.toLowerCase()])returna===i}elseif("number"===typeoft)returnt===i;return!1}};varn=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var s=t.names=t.title={};for(a in n)s[n[a]]=a;for(var o in r)n[o]=r[o]},631:function(e,t,i){"use strict";var n=i(562),r=i(632),a=i(633),s=i(648);function o(e,t,i){var n=e;return r(t)?(i=t,"string"===typeof e&&(n={uri:e})):n=s(t,{uri:e}),n.callback=i,n}function u(e,t,i){return l(t=o(e,t,i))}function l(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,n,r){t||(t=!0,e.callback(i,n,r))};function n(){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),y)try{e=JSON.parse(e)}catch(t){}return e}function r(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,v)}function s(){if(!l){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=v,s=null;return 0!==t?(r={body:n(),statusCode:t,method:p,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(r.headers=a(c.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),i(s,r,r.body)}}var o,l,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.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,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(y=!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(){l=!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(!l){l=!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=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],function(e){u["delete"===e?"del":e]=function(t,i,n){return(i=o(t,i,n)).method=e.toUpperCase(),l(i)}})},632:function(e,t){e.exports=function(e){var t=i.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 i=Object.prototype.toString},633:function(e,t,i){var n=i(634),r=i(647);e.exports=function(e){if(!e)return{};var t={};return r(n(e).split("\n"),function(e){var i,r=e.indexOf(":"),a=n(e.slice(0,r)).toLowerCase(),s=n(e.slice(r+1));"undefined"===typeof t[a]?t[a]=s:(i=t[a],"[object Array]"===Object.prototype.toString.call(i)?t[a].push(s):t[a]=[t[a],s])}),t}},634:function(e,t,i){"use strict";var n=i(568),r=i(590),a=i(592),s=i(595),o=i(646),u=n.call(Function.call,s());r(u,{getPolyfill:s,implementation:a,shim:o}),e.exports=u},635:function(e,t,i){"use strict";var n=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!==typeof t||"[object Function]"!==r.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var i,a=n.call(arguments,1),s=Math.max(0,t.length-a.length),o=[],u=0;u<s;u++)o.push("$"+u);if(i=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var r=t.apply(this,a.concat(n.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(n.call(arguments)))}),t.prototype){var l=function(){};l.prototype=t.prototype,i.prototype=new l,l.prototype=null}return i}},636:function(e,t,i){"use strict";var n=Array.prototype.slice,r=i(591),a=Object.keys,s=a?function(e){return a(e)}:i(637),o=Object.keys;s.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=s;return Object.keys||s},e.exports=s},637:function(e,t,i){"use strict";var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=i(591),o=Object.prototype.propertyIsEnumerable,u=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&r.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{d(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(e){var t=null!==e&&"object"===typeof e,i="[object Function]"===a.call(e),n=s(e),o=t&&"[object String]"===a.call(e),h=[];if(!t&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var f=l&&i;if(o&&e.length>0&&!r.call(e,0))for(var m=0;m<e.length;++m)h.push(String(m));if(n&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var y in e)f&&"prototype"===y||!r.call(e,y)||h.push(String(y));if(u)for(var v=function(e){if("undefined"===typeof window||!p)return d(e);try{return d(e)}catch(t){return!1}}(e),_=0;_<c.length;++_)v&&"constructor"===c[_]||!r.call(e,c[_])||h.push(c[_]);return h}}e.exports=n},638:function(e,t,i){"use strict";var n=i(593),r=n("%Object%"),a=n("%TypeError%"),s=n("%String%"),o=i(639),u=i(640),l=i(641),c=i(642),d=i(643),h=i(569),p=i(644),f=i(594),m={ToPrimitive:p,ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return u(t)?0:0!==t&&l(t)?c(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);if(u(t)||0===t||!l(t))return 0;var i=c(t)*Math.floor(Math.abs(t));return d(i,65536)},ToString:function(e){return s(e)},ToObject:function(e){return this.CheckObjectCoercible(e),r(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new a(t||"Cannot call method on "+e);return e},IsCallable:h,SameValue:function(e,t){return e===t?0!==e||1/e===1/t:u(e)&&u(t)},Type:function(e){return null===e?"Null":"undefined"===typeof e?"Undefined":"function"===typeof e||"object"===typeof e?"Object":"number"===typeof e?"Number":"boolean"===typeof e?"Boolean":"string"===typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var i in e)if(f(e,i)&&!t[i])return!1;var n=f(e,"[[Value]]"),r=f(e,"[[Get]]")||f(e,"[[Set]]");if(n&&r)throw new a("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!==typeof e&&(o(this,"Property Descriptor","Desc",e),!(!f(e,"[[Get]]")&&!f(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!==typeof e&&(o(this,"Property Descriptor","Desc",e),!(!f(e,"[[Value]]")&&!f(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!==typeof e&&(o(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"===typeof e)return e;if(o(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new a("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new a("ToPropertyDescriptor requires an object");var t={};if(f(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),f(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),f(e,"value")&&(t["[[Value]]"]=e.value),f(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),f(e,"get")){var i=e.get;if("undefined"!==typeof i&&!this.IsCallable(i))throw new TypeError("getter must be a function");t["[[Get]]"]=i}if(f(e,"set")){var n=e.set;if("undefined"!==typeof n&&!this.IsCallable(n))throw new a("setter must be a function");t["[[Set]]"]=n}if((f(t,"[[Get]]")||f(t,"[[Set]]"))&&(f(t,"[[Value]]")||f(t,"[[Writable]]")))throw new a("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}};e.exports=m},639:function(e,t,i){"use strict";var n=i(593),r=n("%TypeError%"),a=n("%SyntaxError%"),s=i(594),o={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(s(t,n)&&!i[n])return!1;var a=s(t,"[[Value]]"),o=s(t,"[[Get]]")||s(t,"[[Set]]");if(a&&o)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}};e.exports=function(e,t,i,n){var s=o[t];if("function"!==typeof s)throw new a("unknown record type: "+t);if(!s(e,n))throw new r(i+" must be a "+t);console.log(s(e,n),n)}},640:function(e,t){e.exports=Number.isNaN||function(e){return e!==e}},641:function(e,t){var i=Number.isNaN||function(e){return e!==e};e.exports=Number.isFinite||function(e){return"number"===typeof e&&!i(e)&&e!==1/0&&e!==-1/0}},642:function(e,t){e.exports=function(e){return e>=0?1:-1}},643:function(e,t){e.exports=function(e,t){var i=e%t;return Math.floor(i>=0?i:i+t)}},644:function(e,t,i){"use strict";var n=Object.prototype.toString,r=i(645),a=i(569),s=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===n.call(e)?String:Number)===String||t===Number){var i,s,o=t===String?["toString","valueOf"]:["valueOf","toString"];for(s=0;s<o.length;++s)if(a(e[o[s]])&&(i=e[o[s]](),r(i)))return i;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};e.exports=function(e){return r(e)?e:arguments.length>1?s(e,arguments[1]):s(e)}},645:function(e,t){e.exports=function(e){return null===e||"function"!==typeof e&&"object"!==typeof e}},646:function(e,t,i){"use strict";var n=i(590),r=i(595);e.exports=function(){var e=r();return n(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},647:function(e,t,i){"use strict";var n=i(569),r=Object.prototype.toString,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=i),"[object Array]"===r.call(e)?function(e,t,i){for(var n=0,r=e.length;n<r;n++)a.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(e,t,s):"string"===typeof e?function(e,t,i){for(var n=0,r=e.length;n<r;n++)null==i?t(e.charAt(n),n,e):t.call(i,e.charAt(n),n,e)}(e,t,s):function(e,t,i){for(var n in e)a.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(e,t,s)}},648:function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e};var i=Object.prototype.hasOwnProperty},649:function(e,t,i){var n=i(562),r=e.exports={WebVTT:i(650),VTTCue:i(651),VTTRegion:i(652)};n.vttjs=r,n.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=n.VTTCue,u=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=u},n.VTTCue||r.shim()},650:function(e,t){var i=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 n(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function r(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function a(){this.values=i(null)}function s(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"===typeof r[a]){var s=r[a].split(i);if(2===s.length)t(s[0],s[1])}}function o(e,t,i){var o=e;function u(){var t=r(e);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=u(),l(),"--\x3e"!==e.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),l(),t.endTime=u(),l(),function(e,t){var n=new a;s(e,function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];n.integer(e,s),n.percent(e,s)&&n.set("snapToLines",!1),n.alt(e,s,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),n.percent(e,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical",""),t.line=n.get("line","auto"),t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100),t.align=n.get("align","middle"),t.position=n.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=n.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}n.prototype=i(Error.prototype),n.prototype.constructor=n,n.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,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){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 u={"&":"&","<":"<",">":">","‎":"\u200e","‏":"\u200f"," ":"\xa0"},l={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 i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(e){return u[e]}function a(e){for(;v=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(v[0],n);return e}function s(e,t){return!d[t.localName]||d[t.localName]===e.localName}function o(t,i){var n=l[t];if(!n)return null;var r=e.document.createElement(n);r.localName=n;var a=c[t];return a&&i&&(r[a]=i.trim()),r}for(var h,p=e.document.createElement("div"),f=p,m=[];null!==(h=i());)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,y=r(h.substr(1,h.length-2));if(y){g=e.document.createProcessingInstruction("timestamp",y),f.appendChild(g);continue}var v=h.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(g=o(v[1],v[3])))continue;if(!s(f,g))continue;v[2]&&(g.className=v[2].substr(1).replace("."," ")),m.push(v[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 i=p[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function m(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function r(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var a=i.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):i}return"ruby"===t.tagName?r(e):t.childNodes?(n(e,t),r(e)):void 0}for(n(t,e);i=r(t);)for(var a=0;a<i.length;a++)if(f(i.charCodeAt(a)))return"rtl";return"ltr"}function g(){}function y(e,t,i){g.call(this),this.cue=t,this.cueDiv=h(e,t.text);var n={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(n,this.cueDiv),this.div=e.document.createElement("div"),n={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:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),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 v(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=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||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function _(e,t,i,n){var r=new v(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,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}(a),o=[];if(a.snapToLines){var u;switch(a.vertical){case"":o=["+y","-y"],u="height";break;case"rl":o=["+x","-x"],u="width";break;case"lr":o=["-x","+x"],u="width"}var l=r.lineHeight,c=l*Math.round(s),d=i[u]+l,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?i.height:i.width,o=o.reverse()),r.move(h,c)}else{var p=r.lineHeight/i.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 v(t)}var f=function(e,t){for(var r,a=new v(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var u=e.intersectPercentage(i);s>u&&(r=new v(e),s=u),e=new v(a)}return r||a}(r,o);t.move(f.toCSSCompatValues(i))}function b(){}g.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},g.prototype.formatStyle=function(e,t){return 0===e?0:e+t},y.prototype=i(g.prototype),y.prototype.constructor=y,v.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}},v.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},v.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},v.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},v.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}},v.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)},v.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}},v.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=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||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},b.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},b.convertCueToDOMTree=function(e,t){return e&&t?h(e,t):null};b.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),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=v.getSimpleBoxPosition(n),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var i,o,u=0;u<t.length;u++)o=t[u],i=new y(e,o,s),n.appendChild(i.div),_(0,i,a,r),o.displayState=i.div,r.push(v.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},b.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},b.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof n))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function u(e){e.match(/X-TIMESTAMP-MAP/)?s(e,function(e,i){switch(e){case"X-TIMESTAMP-MAP":!function(e){var i=new a;s(e,function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",r(t))}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(i)}},/=/):s(e,function(e,i){switch(e){case"Region":!function(e){var i=new a;if(s(e,function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new a;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"])}},/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}(i)}},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var l;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(l=i()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:l=i(),t.state){case"HEADER":/:/.test(l)?u(l):l||(t.state="ID");continue;case"NOTE":l||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(l)){t.state="NOTE";break}if(!l)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===l.indexOf("--\x3e")){t.cue.id=l;continue}case"CUE":try{o(l,t.cue,t.regionList)}catch(p){t.reportOrThrowError(p),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==l.indexOf("--\x3e");if(!l||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+=l;continue;case"BADCUE":l||(t.state="ID");continue}}}catch(p){t.reportOrThrowError(p),"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 n(n.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=b},651:function(e,t){var i="auto",n={"":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,u=e,l=t,c=r,d=null,h="",p=!0,f="auto",m="start",g=50,y="middle",v=50,_="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 u},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");l=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&&!!n[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!==i)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 y},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return _},set:function(e){var t=a(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},652:function(e,t){var i={"":!0,up:!0};function n(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,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(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(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},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.");u=t}}})}},653:function(e,t,i){!function(t){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.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 i.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 u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=s.normalizePath(d)}else l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));return null===l.path&&(l.path=i.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(l)},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(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}()},654:function(e,t,i){"use strict";(function(e){i.d(t,"a",function(){return K}),i.d(t,"b",function(){return Y});var n=i(562),r=i.n(n),a=function(e){return!!e&&"object"===typeof e},s=function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.reduce(function(t,i){return Object.keys(i).forEach(function(n){Array.isArray(t[n])&&Array.isArray(i[n])?t[n]=t[n].concat(i[n]):a(t[n])&&a(i[n])?t[n]=e(t[n],i[n]):t[n]=i[n]}),t},{})},o=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},u=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},l="INVALID_NUMBER_OF_PERIOD",c="DASH_EMPTY_MANIFEST",d="DASH_INVALID_XML",h="NO_BASE_URL",p="SEGMENT_TIME_UNSPECIFIED",f="UNSUPPORTED_UTC_TIMING_SCHEME";"undefined"!==typeof window?window:"undefined"!==typeof e||"undefined"!==typeof self&&self;var m,g=(function(e,t){!function(t){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.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 i.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 u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=s.normalizePath(d)}else l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));return null===l.path&&(l.path=i.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(l)},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(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}()}(m={exports:{}},m.exports),m.exports),y=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=g.buildAbsoluteURL(r.a.location.href,e)),g.buildAbsoluteURL(e,t))},v=function(e){var t=e.baseUrl,i=void 0===t?"":t,n=e.source,r=void 0===n?"":n,a=e.range,s=void 0===a?"":a,o=e.indexRange,u=void 0===o?"":o,l={uri:r,resolvedUri:y(i||"",r)};if(s||u){var c=(s||u).split("-"),d=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-d+1,offset:d}}return l},_=function(e){var t=e.offset+e.length-1;return e.offset+"-"+t},b={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration;return{start:0,end:Math.ceil(r/(t/n))}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=(t+i)/1e3,f=n+u,m=p+c-f,g=Math.ceil(m*a/s),y=Math.floor((p-f-h)*a/s),v=Math.floor((p-f)*a/s);return{start:Math.max(0,y),end:Math.min(g,v)}}},T=function(e){var t=e.type,i=void 0===t?"static":t,n=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.sourceDuration,o=b[i](e),u=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}(o.start,o.end).map(function(e){return function(t,i){var n=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:n/a,timeline:s,time:i*n}}}(e));if("static"===i){var l=u.length-1;u[l].duration=s-n/a*l}return u},S=function(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,a=e.timescale,s=void 0===a?1:a,o=e.indexRange,u=void 0===o?"":o,l=e.duration;if(!t)throw new Error(h);var c=v({baseUrl:t,source:n.sourceURL,range:n.range}),d=v({baseUrl:t,source:t,indexRange:u});if(d.map=c,l){var p=T(e);p.length&&(d.duration=p[0].duration,d.timeline=p[0].timeline)}else r&&(d.duration=r/s,d.timeline=0);return d.number=0,[d]},k=function(e,t,i){for(var n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,u=t.timescale,l=t.references.filter(function(e){return 1!==e.referenceType}),c=[],d=o+t.firstOffset,h=0;h<l.length;h++){var p=t.references[h],f=p.referencedSize,m=p.subsegmentDuration,g=S({baseUrl:i,timescale:u,timeline:a,periodIndex:a,duration:m,sourceDuration:r,indexRange:d+"-"+(d+f-1)})[0];n&&(g.map=n),c.push(g),d+=f}return e.segments=c,e},w=function(e){var t;return(t=e.reduce(function(e,t){var i,n=t.attributes.id+(t.attributes.lang||"");e[n]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):e[n]=t;return e},{}),Object.keys(t).map(function(e){return t[e]})).map(function(e){var t,i;return e.discontinuityStarts=(t=e.segments,i="discontinuity",t.reduce(function(e,t,n){return t[i]&&e.push(n),e},[])),e})},C=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e){var n=e[i];if(n.sidx){var r=n.sidx.uri+"-"+_(n.sidx.byterange),a=t[r]&&t[r].sidx;n.sidx&&a&&k(n,a,n.sidx.resolvedUri)}}return e},E=function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a={attributes:(t={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a},A=function(e){var t,i=e.attributes,n=e.segments;return"undefined"===typeof n&&(n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration),{attributes:(t={NAME:i.id,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:i.baseUrl||"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}},P=function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a},L=function(e,t){var i;if(void 0===t&&(t={}),!e.length)return{};var n=e[0].attributes,r=n.sourceDuration,a=n.minimumUpdatePeriod,s=void 0===a?0:a,o=w(e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType})).map(P),u=w(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}),c={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:r,playlists:C(o,t),minimumUpdatePeriod:1e3*s};return u.length&&(c.mediaGroups.AUDIO.audio=function(e,t){var i;void 0===t&&(t={});var n=e.reduce(function(e,n){var r=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"",s="main";if(a){var o=r?" ("+r+")":"";s=""+n.attributes.lang+o}return e[s]&&e[s].playlists[0].attributes.BANDWIDTH>n.attributes.bandwidth?e:(e[s]={language:a,autoselect:!0,default:"main"===r,playlists:C([E(n)],t),uri:""},"undefined"===typeof i&&"main"===r&&((i=n).default=!0),e)},{});i||(n[Object.keys(n)[0]].default=!0);return n}(u,t)),l.length&&(c.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce(function(e,i){var n=i.attributes.lang||"text";return e[n]?e:(e[n]={language:n,default:!1,autoselect:!1,playlists:C([A(i)],t),uri:""},e)},{})}(l,t)),c},x=function(e,t,i){var n=e.NOW,r=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(n+r)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*o-t)/i)},I=function(e,t){for(var i=e.type,n=void 0===i?"static":i,r=e.minimumUpdatePeriod,a=void 0===r?0:r,s=e.media,o=void 0===s?"":s,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,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],v=y.d,_=y.r||0,b=y.t||0;m<0&&(m=b),b&&b>m&&(m=b);var T=void 0;if(_<0){var S=g+1;T=S===t.length?"dynamic"===n&&a>0&&o.indexOf("$Number$")>0?x(e,m,v):(u*c-m)/v:(t[S].t-m)/v}else T=_+1;for(var k=h+f.length+T,w=h+f.length;w<k;)f.push({number:w,duration:v/c,time:m,timeline:p}),m+=v,w++}return f},O=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,U=function(e,t){return e.replace(O,function(e){return function(t,i,n,r){if("$$"===t)return"$";if("undefined"===typeof e[i])return t;var a=""+e[i];return"RepresentationID"===i?a:(r=n?parseInt(r,10):1,a.length>=r?a:""+new Array(r-a.length+1).join("0")+a)}}(t))},D=function(e,t){var i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},n=e.initialization,r=void 0===n?{sourceURL:"",range:""}:n,a=v({baseUrl:e.baseUrl,source:U(r.sourceURL,i),range:r.range});return function(e,t){return e.duration||t?e.duration?T(e):I(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map(function(t){i.Number=t.number,i.Time=t.time;var n=U(e.media||"",i);return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:y(e.baseUrl||"",n),map:a,number:t.number}})},R=function(e,t){var i=e.duration,n=e.segmentUrls,r=void 0===n?[]:n;if(!i&&!t||i&&t)throw new Error(p);var a,s=r.map(function(t){return function(e,t){var i=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,a=v({baseUrl:i,source:r.sourceURL,range:r.range}),s=v({baseUrl:i,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)});return i&&(a=T(e)),t&&(a=I(e,t)),a.map(function(e,t){if(s[t]){var i=s[t];return i.timeline=e.timeline,i.duration=e.duration,i.number=e.number,i}}).filter(function(e){return e})},M=function(e){var t,i,n=e.attributes,r=e.segmentInfo;r.template?(i=D,t=s(n,r.template)):r.base?(i=S,t=s(n,r.base)):r.list&&(i=R,t=s(n,r.list));var a={attributes:n};if(!i)return a;var o=i(t,r.timeline);if(t.duration){var u=t,l=u.duration,c=u.timescale,d=void 0===c?1:c;t.duration=l/d}else o.length?t.duration=o.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return a.attributes=t,a.segments=o,r.base&&t.indexRange&&(a.sidx=o[0],a.segments=[]),a},B=function(e,t){return u(e.childNodes).filter(function(e){return e.tagName===t})},N=function(e){return e.textContent.trim()},j=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 i=t.slice(1),n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],u=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},F={mediaPresentationDuration:function(e){return j(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 j(e)},timeShiftBufferDepth:function(e){return j(e)},start:function(e){return j(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)?j(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}},V=function(e){return e&&e.attributes?u(e.attributes).reduce(function(e,t){var i=F[t.name]||F.DEFAULT;return e[t.name]=i(t.value),e},{}):{}};var H={"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"},q=function(e,t){return t.length?o(e.map(function(e){return t.map(function(t){return y(e,N(t))})})):e},z=function(e){var t=B(e,"SegmentTemplate")[0],i=B(e,"SegmentList")[0],n=i&&B(i,"SegmentURL").map(function(e){return s({tag:"SegmentURL"},V(e))}),r=B(e,"SegmentBase")[0],a=i||t,o=a&&B(a,"SegmentTimeline")[0],u=i||r||t,l=u&&B(u,"Initialization")[0],c=t&&V(t);c&&l?c.initialization=l&&V(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var d={template:c,timeline:o&&B(o,"S").map(function(e){return V(e)}),list:i&&s(V(i),{segmentUrls:n,initialization:V(l)}),base:r&&s(V(r),{initialization:V(l)})};return Object.keys(d).forEach(function(e){d[e]||delete d[e]}),d},W=function(e){return e.reduce(function(e,t){var i=V(t),n=H[i.schemeIdUri];if(n){e[n]={attributes:i};var a=B(t,"cenc:pssh")[0];if(a){var s=N(a),o=s&&function(e){for(var t=r.a.atob(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}(s);e[n].pssh=o}}return e},{})},G=function(e,t,i){return function(n){var r=V(n),a=q(t,B(n,"BaseURL")),u=B(n,"Role")[0],l={role:V(u)},c=s(e,r,l),d=W(B(n,"ContentProtection"));Object.keys(d).length&&(c=s(c,{contentProtection:d}));var h=z(n),p=B(n,"Representation"),f=s(i,h);return o(p.map(function(e,t,i){return function(n){var r=B(n,"BaseURL"),a=q(t,r),o=s(e,V(n)),u=z(n);return a.map(function(e){return{segmentInfo:s(i,u),attributes:s(o,{baseUrl:e})}})}}(c,a,f)))}},$=function(e,t){void 0===t&&(t={});var i=t,n=i.manifestUri,a=void 0===n?"":n,u=i.NOW,c=void 0===u?Date.now():u,d=i.clientOffset,h=void 0===d?0:d,p=B(e,"Period");if(!p.length)throw new Error(l);var f=V(e),m=q([a],B(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=c,f.clientOffset=h,o(p.map(function(e,t){return function(i,n){var a=q(t,B(i,"BaseURL")),u=V(i),l=parseInt(u.id,10),c=r.a.isNaN(l)?n:l,d=s(e,{periodIndex:c}),h=B(i,"AdaptationSet"),p=z(i);return o(h.map(G(d,a,p)))}}(f,m)))},X=function(e){if(""===e)throw new Error(c);var t=(new r.a.DOMParser).parseFromString(e,"application/xml"),i=t&&"MPD"===t.documentElement.tagName?t.documentElement:null;if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(d);return i},K=function(e,t){return void 0===t&&(t={}),L($(X(e),t).map(M),t.sidxMapping)},Y=function(e){return function(e){var t=B(e,"UTCTiming")[0];if(!t)return null;var i=V(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.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(f)}return i}(X(e))}}).call(this,i(48))},655:function(e,t){e.exports={toUnsigned:function(e){return e>>>0}}},656:function(e,t,i){e.exports={generator:i(597),probe:i(563),Transmuxer:i(570).Transmuxer,AudioSegmentStream:i(570).AudioSegmentStream,VideoSegmentStream:i(570).VideoSegmentStream,CaptionParser:i(668)}},657:function(e,t){var i=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i};e.exports={groupNalsIntoFrames:function(e){var t,i,n=[],r=[];for(n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},groupFramesIntoGops:function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.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++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),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 n,r,a,s,o,u=t||0,l=[];for(n=0;n<e.length;n++)for(s=e[n],r=0;r<s.length;r++)o=s[r],u+=(a=i(o,u)).size,l.push(a);return l},concatenateNalData:function(e){var t,i,n,r,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c}}},658:function(e,t,i){var n=i(659),r=i(660);e.exports={prefixWithSilence:function(e,t,i,a){var s,o,u,l,c=0,d=0,h=0;if(t.length&&(s=r.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(9e4/(e.samplerate/1024)),i&&a&&(c=s-Math.max(i,a),h=(d=Math.floor(c/o))*o),!(d<1||h>45e3))){for((u=n[e.samplerate])||(u=t[0].data),l=0;l<d;l++)t.splice(l,0,{data:u});e.baseMediaDecodeTime-=Math.floor(r.videoTsToAudioTs(h,e.samplerate))}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},generateSampleTable:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},concatenateFrameData:function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r}}},659:function(e,t){var i,n=[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:[n,[227,64],a(154),[56]],88200:[n,[231],a(170),[56]],64000:[n,[248,192],a(240),[56]],48000:[n,[255,192],a(268),[55,148,128],a(54),[112]],44100:[n,[255,192],a(268),[55,163,128],a(84),[112]],32000:[n,[255,192],a(268),[55,234],a(226),[112]],24000:[n,[255,192],a(268),[55,255,128],a(268),[111,112],a(126),[224]],16000:[n,[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=(i=s,Object.keys(i).reduce(function(e,t){return e[t]=new Uint8Array(i[t].reduce(function(e,t){return e.concat(t)},[])),e},{}))},660:function(e,t){var i,n,r,a,s,o;i=function(e){return 9e4*e},n=function(e,t){return e*t},r=function(e){return e/9e4},a=function(e,t){return e/t},s=function(e,t){return i(a(e,t))},o=function(e,t){return n(r(e),t)},e.exports={secondsToVideoTs:i,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:s,videoTsToAudioTs:o}},661: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 i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/9e4,i=Math.floor(i)),i},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))}}},662:function(e,t,i){"use strict";var n,r,a,s=i(552),o=i(598),u=i(561),l=i(600).TimestampRolloverStream,c=i(561);(n=function(){var e=new Uint8Array(188),t=0;n.prototype.init.call(this),this.push=function(i){var n,r=0,a=188;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;a<n.byteLength;)71!==n[r]||71!==n[a]?(r++,a++):(this.trigger("data",n.subarray(r,a)),r+=188,a+=188);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.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,i,n;r.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){var a=e[r],s=(31&e[r+1])<<8|e[r+2];a===u.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=s:a===u.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=s:a===u.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=u.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=u.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new s,r.STREAM_TYPES={h264:27,adts:15},(a=function(){var e=this,t={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(t,i,n){var r,a,s=new Uint8Array(t.size),o={type:i},u=0,l=0;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,u=0;u<t.data.length;u++)a=t.data[u],s.set(a.data,l),l+=a.data.byteLength;!function(e,t){var i;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])}(s,o),r="video"===i||o.packetLength<=t.size,(n||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 u.H264_STREAM_TYPE:case c.H264_STREAM_TYPE:e=t,s="video";break;case u.ADTS_STREAM_TYPE:e=i,s="audio";break;case u.METADATA_STREAM_TYPE:e=n,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:[]},i=a.programMapTable;null!==i.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.video,codec:"avc",type:"video"}),null!==i.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[a.type]()},this.flush=function(){r(t,"video"),r(i,"audio"),r(n,"timed-metadata"),this.trigger("done")}}).prototype=new s;var d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:n,TransportParseStream:r,ElementaryStream:a,TimestampRolloverStream:l,CaptionStream:o.CaptionStream,Cea608Stream:o.Cea608Stream,MetadataStream:i(663)};for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h]);e.exports=d},663:function(e,t,i){"use strict";var n,r=i(552),a=i(561),s=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},o=function(e,t,i){return decodeURIComponent(s(e,t,i))},u=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},l={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,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(s(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(n=function(e){var t,i={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,s=[],o=0;if(n.prototype.init.call(this),this.dispatchType=a.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,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)))i.debug&&console.log("Skipping unrecognized metadata packet");else if(s.push(e),o+=e.data.byteLength,1===s.length&&(r=u(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();n=10,64&t.data[5]&&(n+=4,n+=u(t.data.subarray(10,14)),r-=u(t.data.subarray(16,20)));do{if((a=u(t.data.subarray(n+4,n+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((c={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+a+10)}).key=c.id,l[c.id]&&(l[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),n+=10,n+=a}while(n<r);this.trigger("data",t)}}}).prototype=new r,e.exports=n},664:function(e,t,i){"use strict";var n,r=i(552),a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(n=function(){var e;n.prototype.init.call(this),this.push=function(t){var i,n,r,s,o,u,l=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;l+5<e.length;)if(255===e[l]&&240===(246&e[l+1])){if(n=2*(1&~e[l+1]),i=(3&e[l+3])<<11|e[l+4]<<3|(224&e[l+5])>>5,u=9e4*(o=1024*(1+(3&e[l+6])))/a[(60&e[l+2])>>>2],r=l+i,e.byteLength<r)return;if(this.trigger("data",{pts:t.pts+c*u,dts:t.dts+c*u,sampleCount:o,audioobjecttype:1+(e[l+2]>>>6&3),channelcount:(1&e[l+2])<<2|(192&e[l+3])>>>6,samplerate:a[(60&e[l+2])>>>2],samplingfrequencyindex:(60&e[l+2])>>>2,samplesize:16,data:e.subarray(l+7+n,r)}),e.byteLength===r)return void(e=void 0);c++,e=e.subarray(r)}else l++},this.flush=function(){this.trigger("done")}}).prototype=new r,e.exports=n},665:function(e,t,i){"use strict";var n,r,a,s=i(552),o=i(666);(r=function(){var e,t,i=0;r.prototype.init.call(this),this.push=function(n){var r;for(t?((r=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),r.set(n.data,t.byteLength),t=r):t=n.data;i<t.byteLength-3;i++)if(1===t[i+2]){e=i+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}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<t.length);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=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},(n=function(){var e,t,i,s,u,l,c,d=new r;n.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,d.push(e))},d.on("data",function(n){var r={trackId:t,pts:i,dts:s,data:n};switch(31&n[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=u(n.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=u(n.subarray(1)),r.config=l(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 i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},u=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-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=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},l=function(e){var t,i,n,r,s,u,l,d,h,p,f,m,g,y=0,v=0,_=0,b=0,T=1;if(i=(t=new o(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),a[i]&&(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===(u=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===u)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),g=0;g<l;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()&&(y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),_=t.readUnsignedExpGolomb(),b=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:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(d+1)-2*y-2*v)*T),height:(2-p)*(h+1)*16-2*_-2*b}}}).prototype=new s,e.exports={H264Stream:n,NalByteStream:r}},666:function(e,t,i){"use strict";var n;n=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),i=new DataView(a.buffer).getUint32(0),n=8*s,t-=s},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),a=i>>>32-r;return(n-=r)>0?i<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(0!==(i&2147483648>>>e))return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},e.exports=n},667:function(e,t,i){"use strict";var n,r=i(552),a=i(571);(n=function(){var e=new Uint8Array,t=0;n.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,r,s,o,u=0,l=0;for(e.length?(o=e.length,(e=new Uint8Array(i.byteLength+o)).set(e.subarray(0,o)),e.set(i,o)):e=i;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+(u=a.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+u),pts:t,dts:t},this.trigger("data",s),l+=u}else{if(e.length-l<10)break;if(l+(u=a.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+u)},this.trigger("data",r),l+=u}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array}}).prototype=new r,e.exports=n},668:function(e,t,i){"use strict";var n=i(599).discardEmulationPreventionBytes,r=i(598).CaptionStream,a=i(563),s=i(596),o=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null},u=function(e,t){var i=a.findBox(e,["moof","traf"]),r=a.findBox(e,["mdat"]),u={},l=[];return r.forEach(function(e,t){var n=i[t];l.push({mdat:e,traf:n})}),l.forEach(function(e){var i,r=e.mdat,l=e.traf,c=a.findBox(l,["tfhd"]),d=s.parseTfhd(c[0]),h=d.trackId,p=a.findBox(l,["tfdt"]),f=p.length>0?s.parseTfdt(p[0]).baseMediaDecodeTime:0,m=a.findBox(l,["trun"]);t===h&&m.length>0&&(i=function(e,t,i){var r,a,s,u,l=new DataView(e.buffer,e.byteOffset,e.byteLength),c=[];for(a=0;a+4<e.length;a+=s)if(s=l.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:n(d),trackId:i},h?(r.pts=h.pts,r.dts=h.dts,u=h):(r.pts=u.pts,r.dts=u.dts),c.push(r)}return c}(r,function(e,t,i){var n=t,r=i.defaultSampleDuration||0,a=i.defaultSampleSize||0,o=i.trackId,u=[];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=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=n+e.compositionTimeOffset,n+=e.duration}),u=u.concat(t)}),u}(m,f,d),h),u[h]||(u[h]=[]),u[h]=u[h].concat(i))}),u};e.exports=function(){var e,t,i,n,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/n,e.endTime=e.endPts/n,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)&&(i!==e[0]||n!==t[i])},this.parse=function(e,r,s){var o;if(!this.isInitialized())return null;if(!r||!s)return null;if(this.isNewInit(r,s))i=r[0],n=s[i];else if(!i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,s)}return null!==(o=function(e,t,i){return t?{seiNals:u(e,t)[t],timescale:i}:null}(e,i,n))&&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=[],i=null,n=null,a?this.clearParsedCaptions():a={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},669:function(e,t,i){"use strict";var n=i(561),r=i(600).handleRollover,a={};a.ts=i(670),a.aac=i(571);var s=function(e,t,i){for(var n,r,s,o,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(n=e.subarray(u,l),a.ts.parseType(n,t.pid)){case"pes":r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(o=a.ts.parsePesTime(n))&&(o.type="audio",i.audio.push(o),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(n=e.subarray(u,l),a.ts.parseType(n,t.pid)){case"pes":r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(o=a.ts.parsePesTime(n))&&(o.type="audio",i.audio.push(o),c=!0)}if(c)break;u-=188,l-=188}},o=function(e,t,i){for(var n,r,s,o,u,l,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(n=e.subarray(d,h),a.ts.parseType(n,t.pid)){case"pes":if(r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(s&&!p&&(o=a.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),p=!0),!i.firstKeyFrame)){if(s&&0!==f.size){for(u=new Uint8Array(f.size),l=0;f.data.length;)c=f.data.shift(),u.set(c,l),l+=c.byteLength;if(a.ts.videoPacketContainsKeyFrame(u)){var m=a.ts.parsePesTime(u);m?(i.firstKeyFrame=m,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(n),f.size+=n.byteLength}}if(p&&i.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(n=e.subarray(d,h),a.ts.parseType(n,t.pid)){case"pes":r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"video"===r&&s&&(o=a.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),p=!0)}if(p)break;d-=188,h-=188}},u=function(e){var t={pid:null,table:null},i={};for(var r in function(e,t){for(var i,n=0,r=188;r<e.byteLength;)if(71!==e[n]||71!==e[r])n++,r++;else{switch(i=e.subarray(n,r),a.ts.parseType(i,t.pid)){case"pat":t.pid||(t.pid=a.ts.parsePat(i));break;case"pmt":t.table||(t.table=a.ts.parsePmt(i))}if(t.pid&&t.table)return;n+=188,r+=188}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case n.H264_STREAM_TYPE:i.video=[],o(e,t,i),0===i.video.length&&delete i.video;break;case n.ADTS_STREAM_TYPE:i.audio=[],s(e,t,i),0===i.audio.length&&delete i.audio}}return i};e.exports={inspect:function(e,t){var i;return(i=a.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,s=null,o=0,u=0;e.length-u>=3;){switch(a.aac.parseType(e,u)){case"timed-metadata":if(e.length-u<10){i=!0;break}if((o=a.aac.parseId3TagSize(e,u))>e.length){i=!0;break}null===s&&(t=e.subarray(u,u+o),s=a.aac.parseAacTimestamp(t)),u+=o;break;case"audio":if(e.length-u<7){i=!0;break}if((o=a.aac.parseAdtsSize(e,u))>e.length){i=!0;break}null===r&&(t=e.subarray(u,u+o),r=a.aac.parseSampleRate(t)),n++,u+=o;break;default:u++}if(i)return null}if(null===r||null===s)return null;var l=9e4/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*n*l,pts:s+1024*n*l}]}}(e):u(e))&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;"undefined"===typeof i&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var n=t;if("undefined"===typeof n&&(n=e.video[0].dts),e.video.forEach(function(e){e.dts=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,n),a.pts=r(a.pts,n),a.dtsTime=a.dts/9e4,a.ptsTime=a.dts/9e4}}}(i,t),i):null},parseAudioPes_:s}},670:function(e,t,i){"use strict";var n=i(561),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 i=r(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=a(e),i=4+s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=a(e),n=4+s(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var o=12+((15&e[n+10])<<8|e[n+11]);o<r;){var u=n+o;t[(31&e[u+1])<<8|e[u+2]]=e[u],o+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:a,parsePesType:function(e,t){switch(t[r(e)]){case n.H264_STREAM_TYPE:return"video";case n.ADTS_STREAM_TYPE:return"audio";case n.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 i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+s(e),i=e.subarray(t),n=0,r=0,a=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(a=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(a=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(a=!0),a}}},671:function(e,t,i){},751:function(e,t,i){"use strict";i.r(t);var n=i(0),r=i.n(n),a=i(2),s=i.n(a),o=i(15),u=i.n(o),l=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}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,n["Component"]),l(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.forceRender||this.props.isActive||e.isActive}},{key:"render",value:function(){var e;if(this._isActived=this.props.forceRender||this._isActived||this.props.isActive,!this._isActived)return null;var t=this.props,i=t.prefixCls,n=t.isActive,a=t.children,s=t.destroyInactivePanel,o=t.forceRender,l=t.role,d=u()((c(e={},i+"-content",!0),c(e,i+"-content-active",n),c(e,i+"-content-inactive",!n),e)),h=o||n||!s?r.a.createElement("div",{className:i+"-content-box"},a):null;return r.a.createElement("div",{className:d,role:l},h)}}]),t}();d.propTypes={prefixCls:s.a.string,isActive:s.a.bool,children:s.a.any,destroyInactivePanel:s.a.bool,forceRender:s.a.bool,role:s.a.string};var h=d,p=i(81),f=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function m(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function g(e,t){if(!e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var y=function(e){function t(){var e,i,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=n=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.handleItemClick=function(){n.props.onItemClick&&n.props.onItemClick()},n.handleKeyPress=function(e){"Enter"!==e.key&&13!==e.keyCode&&13!==e.which||n.handleItemClick()},g(n,i)}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,n["Component"]),f(t,[{key:"render",value:function(){var e,t=this.props,i=t.className,n=t.id,a=t.style,s=t.prefixCls,o=t.header,l=t.headerClass,c=t.children,d=t.isActive,f=t.showArrow,g=t.destroyInactivePanel,y=t.disabled,v=t.accordion,_=t.forceRender,b=u()(s+"-header",m({},l,l)),T=u()((m(e={},s+"-item",!0),m(e,s+"-item-active",d),m(e,s+"-item-disabled",y),e),i);return r.a.createElement("div",{className:T,style:a,id:n},r.a.createElement("div",{className:b,onClick:this.handleItemClick,role:v?"tab":"button",tabIndex:y?-1:0,"aria-expanded":""+d,onKeyPress:this.handleKeyPress},f&&r.a.createElement("i",{className:"arrow"}),o),r.a.createElement(p.a,{showProp:"isActive",exclusive:!0,component:"",animation:this.props.openAnimation},r.a.createElement(h,{prefixCls:s,isActive:d,destroyInactivePanel:g,forceRender:_,role:v?"tabpanel":null},c)))}}]),t}();y.propTypes={className:s.a.oneOfType([s.a.string,s.a.object]),id:s.a.string,children:s.a.any,openAnimation:s.a.object,prefixCls:s.a.string,header:s.a.oneOfType([s.a.string,s.a.number,s.a.node]),headerClass:s.a.string,showArrow:s.a.bool,isActive:s.a.bool,onItemClick:s.a.func,style:s.a.object,destroyInactivePanel:s.a.bool,disabled:s.a.bool,accordion:s.a.bool,forceRender:s.a.bool},y.defaultProps={showArrow:!0,isActive:!1,destroyInactivePanel:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var v=y,_=i(146);function b(e,t,i,n){var r=void 0;return Object(_.a)(e,i,{start:function(){t?(r=e.offsetHeight,e.style.height=0):e.style.height=e.offsetHeight+"px"},active:function(){e.style.height=(t?r:0)+"px"},end:function(){e.style.height="",n()}})}var T=function(e){return{enter:function(t,i){return b(t,!0,e+"-anim",i)},leave:function(t,i){return b(t,!1,e+"-anim",i)}}},S=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function k(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function w(e){var t=e;return Array.isArray(t)||(t=t?[t]:[]),t}var C=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=i.props,r=n.activeKey,a=n.defaultActiveKey;return"activeKey"in i.props&&(a=r),i.state={openAnimation:i.props.openAnimation||T(i.props.prefixCls),activeKey:w(a)},i}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,n["Component"]),S(t,[{key:"componentWillReceiveProps",value:function(e){"activeKey"in e&&this.setState({activeKey:w(e.activeKey)}),"openAnimation"in e&&this.setState({openAnimation:e.openAnimation})}},{key:"onClickItem",value:function(e){var t=this.state.activeKey;if(this.props.accordion)t=t[0]===e?[]:[e];else{var i=(t=[].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(t))).indexOf(e);i>-1?t.splice(i,1):t.push(e)}this.setActiveKey(t)}},{key:"getItems",value:function(){var e=this,t=this.state.activeKey,i=this.props,a=i.prefixCls,s=i.accordion,o=i.destroyInactivePanel,u=[];return n.Children.forEach(this.props.children,function(i,n){if(i){var l=i.key||String(n),c=i.props,d=c.header,h=c.headerClass,p=c.disabled,f=!1;f=s?t[0]===l:t.indexOf(l)>-1;var m={key:l,header:d,headerClass:h,isActive:f,prefixCls:a,destroyInactivePanel:o,openAnimation:e.state.openAnimation,accordion:s,children:i.props.children,onItemClick:p?null:function(){return e.onClickItem(l)}};u.push(r.a.cloneElement(i,m))}}),u}},{key:"setActiveKey",value:function(e){"activeKey"in this.props||this.setState({activeKey:e}),this.props.onChange(this.props.accordion?e[0]:e)}},{key:"render",value:function(){var e,t=this.props,i=t.prefixCls,n=t.className,a=t.style,s=t.accordion,o=u()((k(e={},i,!0),k(e,n,!!n),e));return r.a.createElement("div",{className:o,style:a,role:s?"tablist":null},this.getItems())}}]),t}();C.propTypes={children:s.a.any,prefixCls:s.a.string,activeKey:s.a.oneOfType([s.a.string,s.a.arrayOf(s.a.string)]),defaultActiveKey:s.a.oneOfType([s.a.string,s.a.arrayOf(s.a.string)]),openAnimation:s.a.object,onChange:s.a.func,accordion:s.a.bool,className:s.a.string,style:s.a.object,destroyInactivePanel:s.a.bool},C.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},C.Panel=v;var E=C;i.d(t,"Panel",function(){return A});t.default=E;var A=E.Panel},752:function(e,t,i){"use strict";var n=i(562),r=i.n(n),a=i(626),s=i.n(a),o=i(628),u=i.n(o),l=i(629),c=i.n(l),d=i(630),h=i.n(d),p=i(631),f=i.n(p),m=i(649),g=i.n(m),y=i(653),v=i.n(y);function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function b(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function T(e){if(void 0===e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return e}var S=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t,i,n,r=this.listeners[e];if(r)if(2===arguments.length)for(i=r.length,t=0;t<i;++t)r[t].call(this,arguments[1]);else for(n=Array.prototype.slice.call(arguments,1),i=r.length,t=0;t<i;++t)r[t].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",function(t){e.push(t)})},e}(),k=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return b(t,e),t.prototype.push=function(e){var t;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}(S),w=function(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n},C=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}b(t,e);var i=t.prototype;return i.push=function(e){var t,i,n=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(function(t,i){var n=i(e);return n===e?t:t.concat([n])},[e]).forEach(function(e){for(var r=0;r<n.customParsers.length;r++)if(n.customParsers[r].call(n,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void n.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"totalduration"},t[1]&&(i.duration=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void n.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"byterange"},t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),void n.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"map"},t[1]){var a=w(t[1]);if(a.URI&&(i.uri=a.URI),a.BYTERANGE){var s=a.BYTERANGE.split("@"),o=s[0],u=s[1];i.byterange={},o&&(i.byterange.length=parseInt(o,10)),u&&(i.byterange.offset=parseInt(u,10))}}n.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=w(t[1]),i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),i.attributes.RESOLUTION=c}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}n.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=w(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e))n.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))n.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=w(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void n.trigger("data",i);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=w(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);n.trigger("data",{type:"tag",data:e.slice(4)})}}}else n.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:e}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,a=e.segment;"function"!==typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:n,segment:a}),!0})},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push(function(e){return t.test(e)?i(e):e})},t}(S),E=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new k,t.parseStream=new C,t.lineStream.pipe(t.parseStream);var i,n,r=T(T(t)),a=[],s={},o={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},u=0;return t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},t.parseStream.on("data",function(e){var t,l;({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&&(s.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(s.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&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof e.attributes.IV&&(n.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):n=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(){i={},e.uri&&(i.uri=e.uri),e.byterange&&(i.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||o,e.attributes?(s.attributes||(s.attributes={}),_(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||o,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"]],(l={default:/yes/i.test(e.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(l.language=e.attributes.LANGUAGE),e.attributes.URI&&(l.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(l.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(l.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(l.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){u+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.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(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data}}[e.tagType]||function(){}).call(r)},uri:function(){s.uri=e.uri,a.push(s),!this.manifest.targetDuration||"duration"in s||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),n&&(s.key=n),s.timeline=u,i&&(s.map=i),s={}},comment:function(){},custom:function(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)}),t}b(t,e);var i=t.prototype;return i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push("\n")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(S),A=i(654),P=i(596),L=i.n(P),x=i(563),I=i.n(x),O=i(656),U=i(669),D=i.n(U);var R=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),B=function(e,t){if(!e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},N=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4],a=void 0,s=void 0,o=void 0,u=[],l=[],c=void 0,d=void 0,h=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(h=(h=o^o<<1^o<<2^o<<3^o<<4)>>8^255&h^99,n[s]=h,r[h]=s,f=16843009*u[d=u[c=u[s]]]^65537*d^257*c^16843008*s,p=257*u[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][h]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},j=null,F=function(){function e(t){R(this,e),j||(j=N()),this._tables=[[j[0][0].slice(),j[0][1].slice(),j[0][2].slice(),j[0][3].slice(),j[0][4].slice()],[j[1][0].slice(),j[1][1].slice(),j[1][2].slice(),j[1][3].slice(),j[1][4].slice()]];var i=void 0,n=void 0,r=void 0,a=void 0,s=void 0,o=this._tables[0][4],u=this._tables[1],l=t.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(a=t.slice(0),s=[],this._key=[a,s],i=l;i<4*l+28;i++)r=a[i-1],(i%l===0||8===l&&i%l===4)&&(r=o[r>>>24]<<24^o[r>>16&255]<<16^o[r>>8&255]<<8^o[255&r],i%l===0&&(r=r<<8^r>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-l]^r;for(n=0;i;n++,i--)r=a[3&n?i:i-4],s[n]=i<=4||n<4?r:u[0][o[r>>>24]]^u[1][o[r>>16&255]]^u[2][o[r>>8&255]]^u[3][o[255&r]]}return e.prototype.decrypt=function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],u=n^s[1],l=i^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,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)d=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],h=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=d,u=h,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],d=o,o=u,u=l,l=c,c=d},e}(),V=function(){function e(){R(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 i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),i>-1},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].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}(),H=function(e){function t(){R(this,t);var i=B(this,e.call(this,V));return i.jobs=[],i.delay=1,i.timeout_=null,i}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}(V),q=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},z=function(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new F(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m<n.length;m+=4)d=q(n[m]),h=q(n[m+1]),p=q(n[m+2]),f=q(n[m+3]),r.decrypt(d,h,p,f,s,m),s[m]=q(s[m]^o),s[m+1]=q(s[m+1]^u),s[m+2]=q(s[m+2]^l),s[m+3]=q(s[m+3]^c),o=d,u=h,l=p,c=f;return a},W=function(){function e(t,i,n,r){R(this,e);var a=e.STEP,s=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new H,this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),i,n,o)),u=a;u<s.length;u+=a)n=new Uint32Array([q(s[u-4]),q(s[u-3]),q(s[u-2]),q(s[u-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),i,n,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,i,n){return function(){var r=z(e,t,i);n.set(r,e.byteOffset)}},M(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}(),G="7.6.0";function $(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t,i){return(K=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,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&X(r,i.prototype),r}).apply(null,arguments)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn'tbeeninitialised-super()hasn't been called");return e}function Q(e,t){return t||(t=e.slice(0)),e.raw=t,e}var J=[],Z=function(e,t){return function(i,n,a){var s=t.levels[n],o=new RegExp("^("+s+")$");if("log"!==i&&a.unshift(i.toUpperCase()+":"),a.unshift(e+":"),J&&J.push([].concat(a)),r.a.console){var u=r.a.console[i];u||"debug"!==i||(u=r.a.console.info||r.a.console.log),u&&s&&o.test(i)&&u[Array.isArray(a)?"apply":"call"](r.a.console,a)}}};var ee=function e(t){var i,n="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i("log",n,t)};return i=Z(t,r),r.createLogger=function(i){return e(t+": "+i)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=function(e){if("string"===typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'"innotavalidloglevel');n=e}return n},(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 i("error",n,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("warn",n,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("debug",n,t)},r}("VIDEOJS"),te=ee.createLogger,ie=Object.prototype.toString,ne=function(e){return se(e)?Object.keys(e):[]};function re(e,t){ne(e).forEach(function(i){return t(e[i],i)})}function ae(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[e].concat(i)):(i.forEach(function(t){t&&re(t,function(t,i){e[i]=t})}),e)}function se(e){return!!e&&"object"===typeof e}function oe(e){return se(e)&&"[object Object]"===ie.call(e)&&e.constructor===Object}function ue(e,t){if(!e||!t)return"";if("function"===typeof r.a.getComputedStyle){var i=r.a.getComputedStyle(e);return i?i[t]:""}return""}function le(){var e=Q(["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 le=function(){return e},e}function ce(e){return"string"===typeof e&&/\S/.test(e)}function de(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function he(){return s.a===r.a.document}function pe(e){return se(e)&&1===e.nodeType}function fe(){try{return r.a.parent!==r.a.self}catch(e){return!0}}function me(e){return function(t,i){if(!ce(t))return s.a[e](null);ce(i)&&(i=s.a.querySelector(i));var n=pe(i)?i:s.a;return n[e]&&n[e](t)}}function ge(e,t,i,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={});var r=s.a.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(ee.warn(u()(le(),e,i)),r.setAttribute(e,i)):"textContent"===e?ye(r,i):r[e]=i}),Object.getOwnPropertyNames(i).forEach(function(e){r.setAttribute(e,i[e])}),n&&Me(r,n),r}function ye(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function ve(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function _e(e,t){return de(t),e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className);var i}function be(e,t){return e.classList?e.classList.add(t):_e(e,t)||(e.className=(e.className+" "+t).trim()),e}function Te(e,t){return e.classList?e.classList.remove(t):(de(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function Se(e,t,i){var n=_e(e,t);if("function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=!n),i!==n)return i?be(e,t):Te(e,t),e}function ke(e,t){Object.getOwnPropertyNames(t).forEach(function(i){var n=t[i];null===n||"undefined"===typeof n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)})}function we(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value;"boolean"!==typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function Ce(e,t){return e.getAttribute(t)}function Ee(e,t,i){e.setAttribute(t,i)}function Ae(e,t){e.removeAttribute(t)}function Pe(){s.a.body.focus(),s.a.onselectstart=function(){return!1}}function Le(){s.a.onselectstart=function(){return!0}}function xe(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(ue(e,"height"))),i.width||(i.width=parseFloat(ue(e,"width"))),i}}function Ie(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=s.a.documentElement,n=s.a.body,a=i.clientLeft||n.clientLeft||0,o=r.a.pageXOffset||n.scrollLeft,u=t.left+o-a,l=i.clientTop||n.clientTop||0,c=r.a.pageYOffset||n.scrollTop,d=t.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function Oe(e,t){var i={},n=Ie(e),r=e.offsetWidth,a=e.offsetHeight,s=n.top,o=n.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-u+a)/a)),i.x=Math.max(0,Math.min(1,(l-o)/r)),i}function Ue(e){return se(e)&&3===e.nodeType}function De(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Re(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"===typeof e&&(e=e()),pe(e)||Ue(e)?e:"string"===typeof e&&/\S/.test(e)?s.a.createTextNode(e):void 0}).filter(function(e){return e})}function Me(e,t){return Re(t).forEach(function(t){return e.appendChild(t)}),e}function Be(e,t){return Me(De(e),t)}function Ne(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var je=me("querySelector"),Fe=me("querySelectorAll"),Ve=Object.freeze({isReal:he,isEl:pe,isInFrame:fe,createEl:ge,textContent:ye,prependTo:ve,hasClass:_e,addClass:be,removeClass:Te,toggleClass:Se,setAttributes:ke,getAttributes:we,getAttribute:Ce,setAttribute:Ee,removeAttribute:Ae,blockTextSelection:Pe,unblockTextSelection:Le,getBoundingClientRect:xe,findPosition:Ie,getPointerPosition:Oe,isTextNode:Ue,emptyEl:De,normalizeContent:Re,appendContent:Me,insertContent:Be,isSingleLeftClick:Ne,$:je,$$:Fe}),He=1;function qe(){return He++}var ze={},We="vdata"+Math.floor(r.a.performance&&r.a.performance.now()||Date.now());function Ge(e){var t=e[We];return t||(t=e[We]=qe()),ze[t]||(ze[t]={}),ze[t]}function $e(e){var t=e[We];return!!t&&!!Object.getOwnPropertyNames(ze[t]).length}function Xe(e){var t=e[We];if(t){delete ze[t];try{delete e[We]}catch(i){e.removeAttribute?e.removeAttribute(We):e[We]=null}}}function Ke(e,t){var i=Ge(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Xe(e)}function Ye(e,t,i,n){i.forEach(function(i){e(t,i,n)})}function Qe(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||r.a.event;for(var a in e={},n)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&n.preventDefault||(e[a]=n[a]));if(e.target||(e.target=e.srcElement||s.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=s.a.documentElement,u=s.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.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}});r.a.addEventListener("test",null,e),r.a.removeEventListener("test",null,e)}catch(t){}}();var Ze=["touchstart","touchmove"];function et(e,t,i){if(Array.isArray(t))return Ye(et,e,t,i);var n=Ge(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=qe()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=Qe(t);var r=n.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,i)}catch(u){ee.error(u)}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;Je&&Ze.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function tt(e,t,i){if($e(e)){var n=Ge(e);if(n.handlers){if(Array.isArray(t))return Ye(tt,e,t,i);var r=function(e,t){n.handlers[t]=[],Ke(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);Ke(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function it(e,t,i){var n=$e(e)?Ge(e):{},r=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Qe(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)it.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){var a=Ge(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 nt(e,t,i){if(Array.isArray(t))return Ye(nt,e,t,i);var n=function n(){tt(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||qe(),et(e,t,n)}function rt(e,t,i){var n=function n(){tt(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||qe(),et(e,t,n)}var at,st=Object.freeze({fixEvent:Qe,on:et,off:tt,trigger:it,one:nt,any:rt}),ot=!1,ut=function(){if(he()&&!1!==at.options.autoSetup){var e=Array.prototype.slice.call(s.a.getElementsByTagName("video")),t=Array.prototype.slice.call(s.a.getElementsByTagName("audio")),i=Array.prototype.slice.call(s.a.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(var r=0,a=n.length;r<a;r++){var o=n[r];if(!o||!o.getAttribute){lt(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&at(o)}else ot||lt(1)}};function lt(e,t){t&&(at=t),r.a.setTimeout(ut,e)}he()&&"complete"===s.a.readyState?ot=!0:nt(r.a,"load",function(){ot=!0});var ct,dt=function(e){var t=s.a.createElement("style");return t.className=e,t},ht=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},pt=function(e,t,i){t.guid||(t.guid=qe());var n=function(){return t.apply(e,arguments)};return n.guid=i?i+"_"+t.guid:t.guid,n},ft=function(e,t){var i=r.a.performance.now();return function(){var n=r.a.performance.now();n-i>=t&&(e.apply(void 0,arguments),i=n)}},mt=function(e,t,i,n){var a;void 0===n&&(n=r.a);var s=function(){var r=this,s=arguments,o=function(){a=null,o=null,i||e.apply(r,s)};!a&&i&&e.apply(r,s),n.clearTimeout(a),a=n.setTimeout(o,t)};return s.cancel=function(){n.clearTimeout(a),a=null},s},gt=function(){};gt.prototype.allowedEvents_={},gt.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},et(this,e,t),this.addEventListener=i},gt.prototype.addEventListener=gt.prototype.on,gt.prototype.off=function(e,t){tt(this,e,t)},gt.prototype.removeEventListener=gt.prototype.off,gt.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},nt(this,e,t),this.addEventListener=i},gt.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},rt(this,e,t),this.addEventListener=i},gt.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=Qe(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),it(this,e)},gt.prototype.dispatchEvent=gt.prototype.trigger,gt.prototype.queueTrigger=function(e){var t=this;ct||(ct=new Map);var i=e.type||e,n=ct.get(this);n||(n=new Map,ct.set(this,n));var a=n.get(i);n.delete(i),r.a.clearTimeout(a);var s=r.a.setTimeout(function(){0===n.size&&(n=null,ct.delete(t)),t.trigger(e)},0);n.set(i,s)};var yt=function(e){return e instanceof gt||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"===typeof e[t]})},vt=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},_t=function(e){if(!e.nodeName&&!yt(e))throw new Error("Invalid target; must be a DOM node or evented object.")},bt=function(e){if(!vt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},Tt=function(e){if("function"!==typeof e)throw new Error("Invalid listener; must be a function.")},St=function(e,t){var i,n,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(i=e.eventBusEl_,t.length>=3&&t.shift(),n=t[0],r=t[1]):(i=t[0],n=t[1],r=t[2]),_t(i),bt(n),Tt(r),{isTargetingSelf:a,target:i,type:n,listener:r=pt(e,r)}},kt=function(e,t,i,n){_t(e),e.nodeName?st[t](e,i,n):e[t](i,n)},wt={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=St(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(kt(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,kt(this,"on","dispose",l),kt(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=St(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)kt(s,"one",o,u);else{var l=function t(){e.off(s,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];u.apply(null,n)};l.guid=u.guid,kt(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=St(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)kt(s,"any",o,u);else{var l=function t(){e.off(s,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];u.apply(null,n)};l.guid=u.guid,kt(s,"any",o,l)}},off:function(e,t,i){if(!e||vt(e))tt(this.eventBusEl_,e,t);else{var n=e,r=t;_t(n),bt(r),Tt(i),i=pt(this,i),this.off("dispose",i),n.nodeName?(tt(n,r,i),tt(n,"dispose",i)):yt(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){return it(this.eventBusEl_,e,t)}};function Ct(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('TheeventBusKey"'+i+'"doesnotrefertoanelement.');e.eventBusEl_=e[i]}else e.eventBusEl_=ge("span",{className:"vjs-event-bus"});return ae(e,wt),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),r.a.setTimeout(function(){e.eventBusEl_=null},0)}),e}var Et={state:{},setState:function(e){var t,i=this;return"function"===typeof e&&(e=e()),re(e,function(e,n){i.state[n]!==e&&((t=t||{})[n]={from:i.state[n],to:e}),i.state[n]=e}),t&&yt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function At(e,t){return ae(e,Et),e.state=ae({},e.state,t),"function"===typeof e.handleStateChanged&&yt(e)&&e.on("statechanged",e.handleStateChanged),e}function Pt(e){return"string"!==typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function Lt(){for(var e={},t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach(function(t){t&&re(t,function(t,i){oe(t)?(oe(e[i])||(e[i]={}),e[i]=Lt(e[i],t)):e[i]=t})}),e}var xt=function(){function e(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.parentComponent_=null,this.options_=Lt({},this.options_),t=this.options_=Lt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+qe()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&Ct(this,{eventBusKey:this.el_?"el_":null}),At(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==t.initChildren&&this.initChildren(),this.ready(i),!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.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Xe(this.el_),this.el_=null),this.player_=null},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Lt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,i){return ge(e,t,i)},t.localize=function(e,t,i){void 0===i&&(i=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s],u=i;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(e,i){var n=t[i-1],r=n;return"undefined"===typeof n&&(r=e),r})),u},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=Pt(e),this.childNameIndex_[e]},t.addChild=function(t,i,n){var r,a;if(void 0===i&&(i={}),void 0===n&&(n=this.children_.length),"string"===typeof t){a=Pt(t);var s=i.componentClass||a;i.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!==typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,"function"===typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&Pt(r.name()))&&(this.childNameIndex_[a]=r),"function"===typeof r.el&&r.el()){var u=this.contentEl().children[n]||null;this.contentEl().insertBefore(r.el(),u)}return r},t.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,i=this.options_.children;if(i){var n,r=this.options_,a=e.getComponent("Tech");(n=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter(function(e){return!n.some(function(t){return"string"===typeof t?e===t:e===t.name})})).map(function(e){var n,r;return"string"===typeof e?r=i[n=e]||t.options_[n]||{}:(n=e.name,r=e),{name:n,opts:r}}).filter(function(t){var i=e.getComponent(t.opts.componentClass||Pt(t.name));return i&&!a.isTech(i)}).forEach(function(e){var i=e.name,n=e.opts;if(void 0!==r[i]&&(n=r[i]),!1!==n){!0===n&&(n={}),n.playerOptions=t.options_.playerOptions;var a=t.addChild(i,n);a&&(t[i]=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 je(e,t||this.contentEl())},t.$$=function(e,t){return Fe(e,t||this.contentEl())},t.hasClass=function(e){return _e(this.el_,e)},t.addClass=function(e){be(this.el_,e)},t.removeClass=function(e){Te(this.el_,e)},t.toggleClass=function(e,t){Se(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 Ce(this.el_,e)},t.setAttribute=function(e,t){Ee(this.el_,e,t)},t.removeAttribute=function(e){Ae(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,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Pt(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 r.a.getComputedStyle){var i=r.a.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(0===(t=parseFloat(t))){var n="offset"+Pt(e);t=this.el_[n]}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.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,i=null;this.on("touchstart",function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=r.a.performance.now(),e=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)e=!1;else if(i){var n=t.touches[0].pageX-i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}});var n=function(){e=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){(i=null,!0===e)&&(r.a.performance.now()-t<200&&(n.preventDefault(),this.trigger("tap")))})},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=pt(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var i=function(i){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},t.setTimeout=function(e,t){var i,n,a=this;return e=pt(this,e),i=r.a.setTimeout(function(){a.off("dispose",n),e()},t),(n=function(){return a.clearTimeout(i)}).guid="vjs-timeout-"+i,this.on("dispose",n),i},t.clearTimeout=function(e){r.a.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},t.setInterval=function(e,t){var i=this;e=pt(this,e);var n=r.a.setInterval(e,t),a=function(){return i.clearInterval(n)};return a.guid="vjs-interval-"+n,this.on("dispose",a),n},t.clearInterval=function(e){r.a.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},t.requestAnimationFrame=function(e){var t,i,n=this;return this.supportsRaf_?(e=pt(this,e),t=r.a.requestAnimationFrame(function(){n.off("dispose",i),e()}),(i=function(){return n.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",i),t):this.setTimeout(e,1e3/60)},t.cancelAnimationFrame=function(e){if(this.supportsRaf_){r.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,i){if("string"!==typeof t||!t)throw new Error('Illegalcomponentname,"'+t+'";mustbeanon-emptystring.');var n,r=e.getComponent("Tech"),a=r&&r.isTech(i),s=e===i||e.prototype.isPrototypeOf(i.prototype);if(a||!s)throw n=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegalcomponent,"'+t+'";'+n+".");t=Pt(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var u=o.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(e){return u[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,i},e.getComponent=function(t){if(t)return t=Pt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();xt.prototype.supportsRaf_="function"===typeof r.a.requestAnimationFrame&&"function"===typeof r.a.cancelAnimationFrame,xt.registerComponent("Component",xt);var It=r.a.navigator&&r.a.navigator.userAgent||"",Ot=/AppleWebKit\/([\d.]+)/i.exec(It),Ut=Ot?parseFloat(Ot.pop()):null,Dt=/iPad/i.test(It),Rt=/iPhone/i.test(It)&&!Dt,Mt=/iPod/i.test(It),Bt=Rt||Dt||Mt,Nt=function(){var e=It.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),jt=/Android/i.test(It),Ft=function(){var e=It.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),Vt=jt&&Ft<5&&Ut<537,Ht=/Firefox/i.test(It),qt=/Edge/i.test(It),zt=!qt&&(/Chrome/i.test(It)||/CriOS/i.test(It)),Wt=function(){var e=It.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Gt=function(){var e=/MSIE\s(\d+)\.\d/.exec(It),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(It)&&/rv:11.0/.test(It)&&(t=11),t}(),$t=/Safari/i.test(It)&&!zt&&!jt&&!qt,Xt=($t||Bt)&&!zt,Kt=/Windows/i.test(It),Yt=he()&&("ontouchstart"in r.a||r.a.navigator.maxTouchPoints||r.a.DocumentTouch&&r.a.document instanceof r.a.DocumentTouch),Qt=Object.freeze({IS_IPAD:Dt,IS_IPHONE:Rt,IS_IPOD:Mt,IS_IOS:Bt,IOS_VERSION:Nt,IS_ANDROID:jt,ANDROID_VERSION:Ft,IS_NATIVE_ANDROID:Vt,IS_FIREFOX:Ht,IS_EDGE:qt,IS_CHROME:zt,CHROME_VERSION:Wt,IE_VERSION:Gt,IS_SAFARI:$t,IS_ANY_SAFARI:Xt,IS_WINDOWS:Kt,TOUCH_ENABLED:Yt});function Jt(e,t,i,n){return function(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,n,i.length-1),i[n][t]}function Zt(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:Jt.bind(null,"start",0,e),end:Jt.bind(null,"end",1,e)}}function ei(e,t){return Array.isArray(e)?Zt(e):void 0===e||void 0===t?Zt():Zt([[e,t]])}function ti(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=ei(0,0));for(var a=0;a<e.length;a++)i=e.start(a),(n=e.end(a))>t&&(n=t),r+=n-i;return r/t}for(var ii,ni={prefixed:!0},ri=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ai=ri[0],si=0;si<ri.length;si++)if(ri[si][1]in s.a){ii=ri[si];break}if(ii){for(var oi=0;oi<ii.length;oi++)ni[ai[oi]]=ii[oi];ni.prefixed=ii[0]!==ai[0]}function ui(e){if(e instanceof ui)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:se(e)&&("number"===typeof e.code&&(this.code=e.code),ae(this,e)),this.message||(this.message=ui.defaultMessages[this.code]||"")}ui.prototype.code=0,ui.prototype.message="",ui.prototype.status=null,ui.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ui.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 li=0;li<ui.errorTypes.length;li++)ui[ui.errorTypes[li]]=li,ui.prototype[ui.errorTypes[li]]=li;function ci(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function di(e){ci(e)&&e.then(null,function(e){})}var hi=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,i,n){return e[i]&&(t[i]=e[i]),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}})})},pi=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=hi(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(hi))},fi=function(e,t){return e.forEach(function(e){var i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return i.addCue(e)})}),t.textTracks()},mi="vjs-modal-dialog",gi=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=ge("div",{className:mi+"-content"},{role:"document"}),n.descEl_=ge("p",{className:mi+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),ye(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}$(t,e);var i=t.prototype;return i.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"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return mi+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.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},i.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.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(e){if("boolean"===typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Be(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},i.empty=function(){this.trigger("beforemodalempty"),De(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return"undefined"!==typeof e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=s.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),h.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(h.a.isEventKey(e,"Tab")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}s.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof r.a.HTMLAnchorElement||e instanceof r.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r.a.HTMLInputElement||e instanceof r.a.HTMLSelectElement||e instanceof r.a.HTMLTextAreaElement||e instanceof r.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r.a.HTMLIFrameElement||e instanceof r.a.HTMLObjectElement||e instanceof r.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},t}(xt);gi.prototype.options_={pauseOnOpen:!0,temporary:!0},xt.registerComponent("ModalDialog",gi);var yi=function(e){function t(t){var i;void 0===t&&(t=[]),(i=e.call(this)||this).tracks_=[],Object.defineProperty(Y(i),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<t.length;n++)i.addTrack(t[n]);return i}$(t,e);var i=t.prototype;return i.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",target:this}))},i.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},i.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(gt);for(var vi in yi.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},yi.prototype.allowedEvents_)yi.prototype["on"+vi]=null;var _i=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},bi=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].enabled){_i(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,i}$(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&_i(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,_i(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(yi),Ti=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},Si=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].selected){Ti(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,Object.defineProperty(Y(i),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),i}$(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.selected&&Ti(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,Ti(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(yi),ki=function(e){function t(){return e.apply(this,arguments)||this}$(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(yi),wi=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;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,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Ci=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,i=0,n=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<n)for(i=t;i<n;i++)r.call(this,i)},t.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),Ei={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ai={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Pi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Li={disabled:"disabled",hidden:"hidden",showing:"showing"},xi=function(e){function t(t){var i;void 0===t&&(t={}),i=e.call(this)||this;var n={id:t.id||"vjs_track_"+qe(),kind:t.kind||"",label:t.label||"",language:t.language||""},r=function(e){Object.defineProperty(Y(i),e,{get:function(){return n[e]},set:function(){}})};for(var a in n)r(a);return i}return $(t,e),t}(gt),Ii=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=s.a.createElement("a");i.href=e;var n,a=""===i.host&&"file:"!==i.protocol;a&&((n=s.a.createElement("div")).innerHTML='<ahref="'+e+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),s.a.body.appendChild(n));for(var o={},u=0;u<t.length;u++)o[t[u]]=i[t[u]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=r.a.location.protocol),a&&s.a.body.removeChild(n),o},Oi=function(e){if(!e.match(/^https?:\/\//)){vart=s.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}returne},Ui=function(e){if("string"===typeofe){vart=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)returnt.pop().toLowerCase()}return""},Di=function(e){vart=r.a.location,i=Ii(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},Ri=Object.freeze({parseUrl:Ii,getAbsoluteURL:Oi,getFileExtension:Ui,isCrossOrigin:Di}),Mi=function(e,t){vari=newr.a.WebVTT.Parser(r.a,r.a.vttjs,r.a.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r.a.console&&r.a.console.groupCollapsed&&r.a.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){returnee.error(e)}),r.a.console&&r.a.console.groupEnd&&r.a.console.groupEnd()),i.flush()},Bi=function(e,t){vari={uri:e},n=Di(e);n&&(i.cors=n),f()(i,pt(this,function(e,i,n){if(e)returnee.error(e,i);if(t.loaded_=!0,"function"!==typeofr.a.WebVTT){if(t.tech_){vara,s=function(){ee.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",a)};a=function(){returnt.tech_.off("vttjserror",s),Mi(n,t)},t.tech_.one("vttjsloaded",a),t.tech_.one("vttjserror",s)}}elseMi(n,t)}))},Ni=function(e){functiont(t){vari;if(void0===t&&(t={}),!t.tech)thrownewError("A tech was not provided.");varn=Lt(t,{kind:Pi[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=Li[n.mode]||"disabled",a=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden"),(i=e.call(this,n)||this).tech_=n.tech,i.cues_=[],i.activeCues_=[];vars=newCi(i.cues_),o=newCi(i.activeCues_),u=!1,l=pt(Y(i),function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)});return"disabled"!==r&&i.tech_.ready(function(){i.tech_.on("timeupdate",l)},!0),Object.defineProperties(Y(i),{default:{get:function(){returna},set:function(){}},mode:{get:function(){returnr},set:function(e){vart=this;Li[e]&&("disabled"!==(r=e)?this.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){returnthis.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)returnnull;if(0===this.cues.length)returno;for(vare=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){varr=this.cues[i];r.startTime<=e&&r.endTime>=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(u=!1,t.length!==this.activeCues_.length)u=!0;elsefor(vara=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(u=!0);returnthis.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),n.src?(i.src=n.src,Bi(n.src,Y(i))):i.loaded_=!0,i}$(t,e);vari=t.prototype;returni.addCue=function(e){vart=e;if(r.a.vttjs&&!(einstanceofr.a.vttjs.VTTCue)){for(variint=newr.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)iint||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(varn=this.tech_.textTracks(),a=0;a<n.length;a++)n[a]!==this&&n[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},i.removeCue=function(e){for(vart=this.cues_.length;t--;){vari=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(xi);Ni.prototype.allowedEvents_={cuechange:"cuechange"};varji=function(e){functiont(t){vari;void0===t&&(t={});varn=Lt(t,{kind:Ai[t.kind]||""});i=e.call(this,n)||this;varr=!1;returnObject.defineProperty(Y(i),"enabled",{get:function(){returnr},set:function(e){"boolean"===typeofe&&e!==r&&(r=e,this.trigger("enabledchange"))}}),n.enabled&&(i.enabled=n.enabled),i.loaded_=!0,i}return$(t,e),t}(xi),Fi=function(e){functiont(t){vari;void0===t&&(t={});varn=Lt(t,{kind:Ei[t.kind]||""});i=e.call(this,n)||this;varr=!1;returnObject.defineProperty(Y(i),"selected",{get:function(){returnr},set:function(e){"boolean"===typeofe&&e!==r&&(r=e,this.trigger("selectedchange"))}}),n.selected&&(i.selected=n.selected),i}return$(t,e),t}(xi),Vi=0,Hi=2,qi=function(e){functiont(t){vari,n;void0===t&&(t={}),i=e.call(this)||this;varr=newNi(t);returni.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties(Y(i),{readyState:{get:function(){returnn}},track:{get:function(){returnr}}}),n=Vi,r.addEventListener("loadeddata",function(){n=Hi,i.trigger({type:"load",target:Y(i)})}),i}return$(t,e),t}(gt);qi.prototype.allowedEvents_={load:"load"},qi.NONE=Vi,qi.LOADING=1,qi.LOADED=Hi,qi.ERROR=3;varzi={audio:{ListClass:bi,TrackClass:ji,capitalName:"Audio"},video:{ListClass:Si,TrackClass:Fi,capitalName:"Video"},text:{ListClass:ki,TrackClass:Ni,capitalName:"Text"}};Object.keys(zi).forEach(function(e){zi[e].getterName=e+"Tracks",zi[e].privateName=e+"Tracks_"});varWi={remoteText:{ListClass:ki,TrackClass:Ni,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:wi,TrackClass:qi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Gi=Lt(zi,Wi);Wi.names=Object.keys(Wi),zi.names=Object.keys(zi),Gi.names=[].concat(Wi.names).concat(zi.names);var$i=function(e){functiont(t,i){varn;returnvoid0===t&&(t={}),void0===i&&(i=function(){}),t.reportTouchActivity=!1,(n=e.call(this,null,t,i)||this).hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),Gi.names.forEach(function(e){vari=Gi[e];t&&t[i.getterName]&&(n[i.privateName]=t[i.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===t["native"+e+"Tracks"]&&(n["featuresNative"+e+"Tracks"]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.autoRemoteTextTracks_=newGi.text.ListClass,n.initTrackListeners(),t.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}$(t,e);vari=t.prototype;returni.triggerSourceset=function(e){vart=this;this.isReady_||this.one("ready",function(){returnt.setTimeout(function(){returnt.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(pt(this,function(){vare=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){returnei(0,0)},i.bufferedPercent=function(){returnti(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(zi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.clearTracks=function(e){vart=this;(e=[].concat(e)).forEach(function(e){for(vari=t[e+"Tracks"]()||[],n=i.length;n--;){varr=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}})},i.cleanupAutoTextTracks=function(){for(vare=this.autoRemoteTextTracks_||[],t=e.length;t--;){vari=e[t];this.removeRemoteTextTrack(i)}},i.reset=function(){},i.error=function(e){returnvoid0!==e&&(this.error_=newui(e),this.trigger("error")),this.error_},i.played=function(){returnthis.hasStarted_?ei(0,0):ei()},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){vare=this;zi.names.forEach(function(t){vari=zi[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},i.addWebVttScript_=function(){vare=this;if(!r.a.WebVTT)if(s.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&oe(g.a)&&Object.keys(g.a).length>0)returnvoidthis.trigger("vttjsloaded");vart=s.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}),r.a.WebVTT=!0,this.el().parentNode.appendChild(t)}elsethis.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){vare=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){returnt.addTrack(e.track)},r=function(e){returnt.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();vara=function(){returne.trigger("texttrackchange")},s=function(){a();for(vare=0;e<t.length;e++){vari=t[e];i.removeEventListener("cuechange",a),"showing"===i.mode&&i.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",function(){i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(vare=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}})},i.addTextTrack=function(e,t,i){if(!e)thrownewError("TextTrack kind is required but was not provided");returnfunction(e,t,i,n,r){void0===r&&(r={});vara=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;vars=newGi.text.TrackClass(r);returna.addTrack(s),s}(this,e,t,i)},i.createRemoteTextTrack=function(e){vart=Lt(e,{tech:this});returnnewWi.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){vari=this;void0===e&&(e={});varn=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(ee.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_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready(function(){returni.autoRemoteTextTracks_.addTrack(n.track)}),n},i.removeRemoteTextTrack=function(e){vart=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){vare=this.options_.Promise||r.a.Promise;if(e)returne.reject()},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){returnt.canPlayType(e.type)},t.isTech=function(e){returne.prototypeinstanceoft||einstanceoft||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))thrownewError("Tech "+e+" must be a Tech");if(!t.canPlayType)thrownewError("Techs must have a static canPlayType method on them");if(!t.canPlaySource)thrownewError("Techs must have a static canPlaySource method on them");returne=Pt(e),t.techs_[e]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)returne=Pt(e),t.techs_&&t.techs_[e]?t.techs_[e]:r.a&&r.a.videojs&&r.a.videojs[e]?(ee.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.a.videojs[e]):void0},t}(xt);Gi.names.forEach(function(e){vart=Gi[e];$i.prototype[t.getterName]=function(){returnthis[t.privateName]=this[t.privateName]||newt.ListClass,this[t.privateName]}}),$i.prototype.featuresVolumeControl=!0,$i.prototype.featuresMuteControl=!0,$i.prototype.featuresFullscreenResize=!1,$i.prototype.featuresPlaybackRate=!1,$i.prototype.featuresProgressEvents=!1,$i.prototype.featuresSourceset=!1,$i.prototype.featuresTimeupdateEvents=!1,$i.prototype.featuresNativeTextTracks=!1,$i.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){varn=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(vari,n=e.sourceHandlers||[],r=0;r<n.length;r++)if(i=n[r].canPlayType(t))returni;return""},e.selectSourceHandler=function(t,i){for(varn=e.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,i))returnn[r];returnnull},e.canPlaySource=function(t,i){varn=e.selectSourceHandler(t,i);returnn?n.canHandleSource(t,i):""};["seekable","seeking","duration"].forEach(function(e){vart=this[e];"function"===typeoft&&(this[e]=function(){returnthis.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){vari=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:ee.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("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)}},xt.registerComponent("Tech",$i),$i.registerTech("Tech",$i),$i.defaultTechOrder_=[];varXi={},Ki={},Yi={};functionQi(e,t,i){e.setTimeout(function(){returnfunctione(t,i,n,r,a,s){void0===t&&(t={});void0===i&&(i=[]);void0===a&&(a=[]);void0===s&&(s=!1);varo=i,u=o[0],l=o.slice(1);if("string"===typeofu)e(t,Xi[u],n,r,a,s);elseif(u){varc=function(e,t){vari=Ki[e.id()],n=null;if(void0===i||null===i)returnn=t(e),Ki[e.id()]=[[t,n]],n;for(varr=0;r<i.length;r++){vara=i[r],s=a[0],o=a[1];s===t&&(n=o)}null===n&&(n=t(e),i.push([t,n]));returnn}(r,u);if(!c.setSource)returna.push(c),e(t,l,n,r,a,s);c.setSource(ae({},t),function(i,o){if(i)returne(t,l,n,r,a,s);a.push(c),e(o,t.type===o.type?l:Xi[o.type],n,r,a,s)})}elsel.length?e(t,l,n,r,a,s):s?n(t,a):e(t,Xi["*"],n,r,a,!0)}(t,Xi[t.type],i,e)},1)}functionJi(e,t,i,n){void0===n&&(n=null);varr="call"+Pt(i),a=e.reduce(nn(r),n),s=a===Yi,o=s?null:t[i](a);returnfunction(e,t,i,n){for(varr=e.length-1;r>=0;r--){vara=e[r];a[t]&&a[t](n,i)}}(e,i,o,s),o}varZi={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},en={setCurrentTime:1,setVolume:1},tn={play:1,pause:1};functionnn(e){returnfunction(t,i){returnt===Yi?Yi:i[e]?i[e](t):t}}varrn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},an=function(e){void0===e&&(e="");vart=Ui(e);returnrn[t.toLowerCase()]||""};functionsn(e){vart=an(e.src);return!e.type&&t&&(e.type=t),e}varon=function(e){functiont(t,i,n){varr,a=Lt({createEl:!1},i);if(r=e.call(this,t,a,n)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)t.src(i.playerOptions.sources);elsefor(vars=0,o=i.playerOptions.techOrder;s<o.length;s++){varu=Pt(o[s]),l=$i.getTech(u);if(u||(l=xt.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}returnr}return$(t,e),t}(xt);xt.registerComponent("MediaLoader",on);varun=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).emitTapEvents(),n.enable(),n}$(t,e);vari=t.prototype;returni.createEl=function(t,i,n){void0===t&&(t="div"),void0===i&&(i={}),void0===n&&(n={}),i=ae({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&ee.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=ae({role:"button"},n),this.tabIndex_=i.tabIndex;varr=e.prototype.createEl.call(this,t,i,n);returnthis.createControlTextEl(r),r},i.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},i.createControlTextEl=function(e){returnthis.controlTextEl_=ge("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},i.controlText=function(e,t){if(void0===t&&(t=this.el()),void0===e)returnthis.controlText_||"Need Text";vari=this.localize(e);this.controlText_=e,ye(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},i.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},i.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeofthis.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},i.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeofthis.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},i.handleClick=function(e){},i.handleKeyDown=function(t){h.a.isEventKey(t,"Space")||h.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(xt);xt.registerComponent("ClickableComponent",un);varln=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).update(),t.on("posterchange",pt(Y(n),n.update)),n}$(t,e);vari=t.prototype;returni.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},i.createEl=function(){returnge("div",{className:"vjs-poster",tabIndex:-1})},i.update=function(e){vart=this.player().poster();this.setSrc(t),t?this.show():this.hide()},i.setSrc=function(e){vart="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},i.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?di(this.player_.play()):this.player_.pause())},t}(un);xt.registerComponent("PosterImage",ln);varcn={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'};functiondn(e,t){vari;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)thrownewError("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}functionhn(e,t,i){try{e.style[t]=i}catch(n){return}}varpn=function(e){functiont(t,i,n){vara;a=e.call(this,t,i,n)||this;vars=pt(Y(a),a.updateDisplay);returnt.on("loadstart",pt(Y(a),a.toggleDisplay)),t.on("texttrackchange",s),t.on("loadedmetadata",pt(Y(a),a.preselectTrack)),t.ready(pt(Y(a),function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),r.a.addEventListener("orientationchange",s),t.on("dispose",function(){returnr.a.removeEventListener("orientationchange",s)});for(vare=this.options_.playerOptions.tracks||[],i=0;i<e.length;i++)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}})),a}$(t,e);vari=t.prototype;returni.preselectTrack=function(){for(vare,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){varo=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kindinn?o.kind===a.kind?i=o:i||(i=o):a&&!a.enabled?(i=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kindinn&&!t&&(t=o):e=o)}i?i.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){"function"===typeofr.a.WebVTT&&r.a.WebVTT.processCues(r.a,[],this.el_)},i.updateDisplay=function(){vare=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(vari=[],n=0;n<e.length;++n){varr=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(vara=null,s=null,o=e.length;o--;){varu=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},i.updateDisplayState=function(e){for(vart=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){vara=i[n];if(a){vars=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&hn(s.firstChild,"color",dn(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&hn(s.firstChild,"backgroundColor",dn(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?hn(s,"backgroundColor",dn(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){varo=r.a.parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=cn[t.fontFamily])}}},i.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"===typeofr.a.WebVTT&&!e.every(function(e){return!e.activeCues})){for(vart=[],i=0;i<e.length;++i)for(varn=e[i],a=0;a<n.activeCues.length;++a)t.push(n.activeCues[a]);r.a.WebVTT.processCues(r.a,t,this.el_);for(vars=0;s<e.length;++s){for(varo=e[s],u=0;u<o.activeCues.length;++u){varl=o.activeCues[u].displayState;be(l,"vjs-text-track-cue"),be(l,"vjs-text-track-cue-"+(o.language?o.language:s))}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(xt);xt.registerComponent("TextTrackDisplay",pn);varfn=function(e){functiont(){returne.apply(this,arguments)||this}return$(t,e),t.prototype.createEl=function(){vart=this.player_.isAudio(),i=this.localize(t?"Audio Player":"Video Player"),n=ge("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});returnr.appendChild(n),r},t}(xt);xt.registerComponent("LoadingSpinner",fn);varmn=function(e){functiont(){returne.apply(this,arguments)||this}$(t,e);vari=t.prototype;returni.createEl=function(e,t,i){void0===t&&(t={}),void0===i&&(i={}),t=ae({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=ae({type:"button"},i);varn=xt.prototype.createEl.call(this,"button",t,i);returnthis.createControlTextEl(n),n},i.addChild=function(e,t){void0===t&&(t={});vari=this.constructor.name;returnee.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),xt.prototype.addChild.call(this,e,t)},i.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(t){h.a.isEventKey(t,"Space")||h.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(un);xt.registerComponent("Button",mn);vargn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(e){vart=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)returndi(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());vari=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){varr=function(){returnn.focus()};ci(t)?t.then(r,function(){}):this.setTimeout(r,1)}elsethis.player_.tech(!0).focus()},i.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},i.handleMouseDown=function(e){this.mouseused_=!0},t}(mn);gn.prototype.controlText_="Play Video",xt.registerComponent("BigPlayButton",gn);varyn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).controlText(i&&i.controlText||n.localize("Close")),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(t){h.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(mn);xt.registerComponent("CloseButton",yn);varvn=function(e){functiont(t,i){varn;returnvoid0===i&&(i={}),n=e.call(this,t,i)||this,i.replay=void0===i.replay||i.replay,n.on(t,"play",n.handlePlay),n.on(t,"pause",n.handlePause),i.replay&&n.on(t,"ended",n.handleEnded),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause(),e.stopPropagation()},i.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},i.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(mn);vn.prototype.controlText_="Play",xt.registerComponent("PlayToggle",vn);var_n=function(e,t){e=e<0?0:e;vari=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),(r=r>0||s>0?r+":":"")+(n=((r||a>=10)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)},bn=_n;functionTn(e,t){returnvoid0===t&&(t=e),bn(e,t)}varSn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).throttledUpdateContent=ft(pt(Y(n),n.updateContent),25),n.on(t,"timeupdate",n.throttledUpdateContent),n}$(t,e);vari=t.prototype;returni.createEl=function(){vart=this.buildCSSClass(),i=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"\xa0</span>"});returnthis.contentEl_=ge("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},i.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=s.a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},i.formatTime_=function(e){returnTn(e)},i.updateFormattedTime_=function(e){vart=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},i.updateContent=function(e){},t}(xt);Sn.prototype.labelText_="Time",Sn.prototype.controlText_="Time",xt.registerComponent("TimeDisplay",Sn);varkn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,"ended",n.handleEnded),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(e){vart=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},i.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(Sn);kn.prototype.labelText_="Current Time",kn.prototype.controlText_="Current Time",xt.registerComponent("CurrentTimeDisplay",kn);varwn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,"durationchange",n.updateContent),n.on(t,"loadstart",n.updateContent),n.on(t,"loadedmetadata",n.throttledUpdateContent),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(e){vart=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(Sn);wn.prototype.labelText_="Duration",wn.prototype.controlText_="Duration",xt.registerComponent("DurationDisplay",wn);varCn=function(e){functiont(){returne.apply(this,arguments)||this}return$(t,e),t.prototype.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(xt);xt.registerComponent("TimeDivider",Cn);varEn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,"durationchange",n.throttledUpdateContent),n.on(t,"ended",n.handleEnded),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){vart=e.prototype.createEl.call(this);returnt.insertBefore(ge("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},i.updateContent=function(e){"number"===typeofthis.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},i.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(Sn);En.prototype.labelText_="Remaining Time",En.prototype.controlText_="Remaining Time",xt.registerComponent("RemainingTimeDisplay",En);varAn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}$(t,e);vari=t.prototype;returni.createEl=function(){vart=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});returnthis.contentEl_=ge("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"\xa0</span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},i.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(xt);xt.registerComponent("LiveDisplay",An);varPn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatus),n}$(t,e);vari=t.prototype;returni.createEl=function(){vart=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});returnthis.textEl_=ge("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},i.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"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(mn);Pn.prototype.controlText_="Seek to live, currently playing live",xt.registerComponent("SeekToLive",Pn);varLn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}$(t,e);vari=t.prototype;returni.enabled=function(){returnthis.enabled_},i.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),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)},i.disable=function(){if(this.enabled()){vare=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),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}},i.createEl=function(t,i,n){returnvoid0===i&&(i={}),void0===n&&(n={}),i.className=i.className+" vjs-slider",i=ae({tabIndex:0},i),n=ae({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},i.handleMouseDown=function(e){vart=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||zt||e.preventDefault(),Pe(),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)},i.handleMouseMove=function(e){},i.handleMouseUp=function(){vare=this.bar.el_.ownerDocument;Le(),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()},i.update=function(){if(this.el_){vare=this.getPercent(),t=this.bar;if(t){("number"!==typeofe||e!==e||e<0||e===1/0)&&(e=0);vari=(100*e).toFixed(2)+"%",n=t.el().style;returnthis.vertical()?n.height=i:n.width=i,e}}},i.calculateDistance=function(e){vart=Oe(this.el_,e);returnthis.vertical()?t.y:t.x},i.handleKeyDown=function(t){h.a.isEventKey(t,"Left")||h.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):h.a.isEventKey(t,"Right")||h.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){e.stopPropagation(),e.preventDefault()},i.vertical=function(e){if(void0===e)returnthis.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(xt);xt.registerComponent("Slider",Ln);varxn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).partEls_=[],n.on(t,"progress",n.update),n}$(t,e);vari=t.prototype;returni.createEl=function(){returne.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>'})},i.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},i.update=function(e){vart=this.player_.liveTracker,i=this.player_.buffered(),n=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,i){varn=e/t||0;returnn=100*(n>=1?1:n),i&&(n=n.toFixed(2)),n+"%"};this.el_.style.width=o(r,n),ye(s,o(r,n,!0));for(varu=0;u<i.length;u++){varl=i.start(u),c=i.end(u),d=a[u];d||(d=this.el_.appendChild(ge()),a[u]=d),d.style.left=o(l,r),d.style.width=o(c-l,r)}for(varh=a.length;h>i.length;h--)this.el_.removeChild(a[h-1]);a.length=i.length},t}(xt);xt.registerComponent("LoadProgressBar",xn);varIn=function(e){functiont(){returne.apply(this,arguments)||this}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,i){varn=xe(this.el_),r=xe(this.player_.el()),a=e.width*t;if(r&&n){vars=e.left-r.left+a,o=e.width-a+(r.right-e.right),u=n.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>n.width&&(u=n.width),this.el_.style.right="-"+u+"px",this.write(i)}},i.write=function(e){ye(this.el_,e)},i.updateTime=function(e,t,i,n){varr=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){vara,s=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){varo=r.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+Tn(u,o)}elsea=Tn(i,s);r.update(e,t,a),n&&n()})},t}(xt);xt.registerComponent("TimeTooltip",In);varOn=function(e){functiont(){returne.apply(this,arguments)||this}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(e,t){vari=this.getChild("timeTooltip");if(i){varn=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}},t}(xt);On.prototype.options_={children:[]},Bt||jt||On.prototype.options_.children.push("timeTooltip"),xt.registerComponent("PlayProgressBar",On);varUn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).update=ft(pt(Y(n),n.update),25),n}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t){vari=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,function(){i.el_.style.left=e.width*t+"px"})},t}(xt);Un.prototype.options_={children:["timeTooltip"]},xt.registerComponent("MouseTimeDisplay",Un);varDn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).setEventHandlers_(),n}$(t,e);vari=t.prototype;returni.setEventHandlers_=function(){this.update=ft(pt(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"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"ins.a&&"visibilityState"ins.a&&this.on(s.a,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(e){s.a.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},i.enableInterval_=function(){vare=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval(function(){e.requestAnimationFrame(e.update)},30)},i.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},i.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update_=function(e,t){vari=this.player_.liveTracker,n=this.player_.duration();i&&i.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Tn(e,n),Tn(n,n)],"{1} of {2}")),this.bar&&this.bar.update(xe(this.el_),t)},i.update=function(t){if(null!==this.el().offsetParent){vari=e.prototype.update.call(this);returnthis.update_(this.getCurrentTime_(),i),i}},i.getCurrentTime_=function(){returnthis.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.handleEnded=function(e){this.update_(this.player_.duration(),1)},i.getPercent=function(){vare,t=this.getCurrentTime_(),i=this.player_.liveTracker;returni&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e>=1?1:e||0},i.handleMouseDown=function(t){Ne(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},i.handleMouseMove=function(e){if(Ne(e)){vart,i=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){varr=n.seekableStart(),a=n.liveCurrentTime();if((t=r+i*n.liveWindow())>=a&&(t=a),t<=r&&(t=r+.1),t===1/0)return}else(t=i*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},i.enable=function(){e.prototype.enable.call(this);vart=this.getChild("mouseTimeDisplay");t&&t.show()},i.disable=function(){e.prototype.disable.call(this);vart=this.getChild("mouseTimeDisplay");t&&t.hide()},i.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&&di(this.player_.play())},i.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},i.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},i.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){if(h.a.isEventKey(t,"Space")||h.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);elseif(h.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);elseif(h.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());elseif(/^[0-9]$/.test(h()(t))){t.preventDefault(),t.stopPropagation();vari=10*(h.a.codes[h()(t)]-h.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*i)}elseh.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):h.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},t}(Ln);Dn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Bt||jt||Dn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),xt.registerComponent("SeekBar",Dn);varRn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).handleMouseMove=ft(pt(Y(n),n.handleMouseMove),25),n.throttledHandleMouseSeek=ft(pt(Y(n),n.handleMouseSeek),25),n.enable(),n}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(e){vart=this.getChild("seekBar");if(t){vari=t.getChild("mouseTimeDisplay"),n=t.el(),r=xe(n),a=Oe(n,e).x;a>1?a=1:a<0&&(a=0),i&&i.update(r,a)}},i.handleMouseSeek=function(e){vart=this.getChild("seekBar");t&&t.handleMouseMove(e)},i.enabled=function(){returnthis.enabled_},i.disable=function(){this.children().forEach(function(e){returne.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)},i.enable=function(){this.children().forEach(function(e){returne.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.handleMouseDown=function(e){vart=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},i.handleMouseUp=function(e){vart=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(xt);Rn.prototype.options_={children:["seekBar"]},xt.registerComponent("ProgressControl",Rn);varMn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],n.handlePictureInPictureChange),s.a.pictureInPictureEnabled||n.disable(),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},i.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},i.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(mn);Mn.prototype.controlText_="Picture-in-Picture",xt.registerComponent("PictureInPictureToggle",Mn);varBn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,"fullscreenchange",n.handleFullscreenChange),!1===s.a[t.fsApi_.fullscreenEnabled]&&n.disable(),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(mn);Bn.prototype.controlText_="Fullscreen",xt.registerComponent("FullscreenToggle",Bn);varNn=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")})},jn=function(e){functiont(){returne.apply(this,arguments)||this}return$(t,e),t.prototype.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(xt);xt.registerComponent("VolumeLevel",jn);varFn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on("slideractive",n.updateLastVolume_),n.on(t,"volumechange",n.updateARIAAttributes),t.ready(function(){returnn.updateARIAAttributes()}),n}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(t){Ne(t)&&e.prototype.handleMouseDown.call(this,t)},i.handleMouseMove=function(e){Ne(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){returnthis.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(e){vart=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},i.volumeAsPercentage_=function(){returnMath.round(100*this.player_.volume())},i.updateLastVolume_=function(){vare=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},t}(Ln);Fn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Fn.prototype.playerEvent="volumechange",xt.registerComponent("VolumeBar",Fn);varVn=function(e){functiont(t,i){varn;returnvoid0===i&&(i={}),i.vertical=i.vertical||!1,("undefined"===typeofi.volumeBar||oe(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),n=e.call(this,t,i)||this,Nn(Y(n),t),n.throttledHandleMouseMove=ft(pt(Y(n),n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}$(t,e);vari=t.prototype;returni.createEl=function(){vart="vjs-volume-horizontal";returnthis.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.handleMouseDown=function(e){vart=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)},i.handleMouseUp=function(e){vart=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)},i.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(xt);Vn.prototype.options_={children:["volumeBar"]},xt.registerComponent("VolumeControl",Vn);varHn=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")})},qn=function(e){functiont(t,i){varn;returnn=e.call(this,t,i)||this,Hn(Y(n),t),n.on(t,["loadstart","volumechange"],n.update),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){vart=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){varn=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}elsethis.player_.muted(!this.player_.muted())},i.update=function(e){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){vare=this.player_.volume(),t=3;Bt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(vari=0;i<4;i++)Te(this.el_,"vjs-vol-"+i);be(this.el_,"vjs-vol-"+t)},i.updateControlText_=function(){vare=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(mn);qn.prototype.controlText_="Mute",xt.registerComponent("MuteToggle",qn);varzn=function(e){functiont(t,i){varn;returnvoid0===i&&(i={}),"undefined"!==typeofi.inline?i.inline=i.inline:i.inline=!0,("undefined"===typeofi.volumeControl||oe(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),(n=e.call(this,t,i)||this).on(t,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}$(t,e);vari=t.prototype;returni.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.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")},i.createEl=function(){vart="vjs-volume-panel-horizontal";returnthis.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(xt);zn.prototype.options_={children:["muteToggle","volumeControl"]},xt.registerComponent("VolumePanel",zn);varWn=function(e){functiont(t,i){varn;returnn=e.call(this,t,i)||this,i&&(n.menuButton_=i.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyDown),n.boundHandleBlur_=pt(Y(n),n.handleBlur),n.boundHandleTapClick_=pt(Y(n),n.handleTapClick),n}$(t,e);vari=t.prototype;returni.addEventListenerForItem=function(e){einstanceofxt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(e){einstanceofxt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(t){"string"===typeoft&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},i.addItem=function(e){vart=this.addChild(e);t&&this.addEventListenerForItem(t)},i.createEl=function(){vart=this.options_.contentElType||"ul";this.contentEl_=ge(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");vari=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});returni.appendChild(this.contentEl_),et(i,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),i},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},i.handleBlur=function(e){vart=e.relatedTarget||s.a.activeElement;if(!this.children().some(function(e){returne.el()===t})){vari=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},i.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();vart=this.children();if(!Array.isArray(t))return;vari=t.filter(function(t){returnt.el()===e.target})[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},i.handleKeyDown=function(e){h.a.isEventKey(e,"Left")||h.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(h.a.isEventKey(e,"Right")||h.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},i.stepForward=function(){vare=0;void0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},i.stepBack=function(){vare=0;void0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},i.focus=function(e){void0===e&&(e=0);vart=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}(xt);xt.registerComponent("Menu",Wn);varGn=function(e){functiont(t,i){varn;void0===i&&(i={}),(n=e.call(this,t,i)||this).menuButton_=newmn(t,i),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");varr=mn.prototype.buildCSSClass();returnn.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"keydown",n.handleKeyDown),n.on(n.menuButton_,"mouseenter",function(){n.menu.show()}),n.on("keydown",n.handleSubmenuKeyDown),n}$(t,e);vari=t.prototype;returni.update=function(){vare=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()},i.createMenu=function(){vare=newWn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){vart=ge("li",{className:"vjs-menu-title",innerHTML:Pt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;vari=newxt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(varn=0;n<this.items.length;n++)e.addItem(this.items[n]);returne},i.createItems=function(){},i.createEl=function(){returne.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){vart="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+mn.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){vart="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},i.controlText=function(e,t){returnvoid0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},i.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(e){h.a.isEventKey(e,"Esc")||h.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),h.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(h.a.isEventKey(e,"Up")||h.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},i.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},i.handleSubmenuKeyDown=function(e){(h.a.isEventKey(e,"Esc")||h.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),h.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Bt&&fe())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(xt);xt.registerComponent("MenuButton",Gn);var$n=function(e){functiont(t,i){varn,r=i.tracks;if((n=e.call(this,t,i)||this).items.length<=1&&n.hide(),!r)returnY(n);vara=pt(Y(n),n.update);returnr.addEventListener("removetrack",a),r.addEventListener("addtrack",a),n.player_.on("ready",a),n.player_.on("dispose",function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a)}),n}return$(t,e),t}(Gn);xt.registerComponent("TrackButton",$n);varXn=["Tab","Esc","Up","Down","Right","Left"],Kn=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).selectable=i.selectable,n.isSelected_=i.selected||!1,n.multiSelectable=i.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}$(t,e);vari=t.prototype;returni.createEl=function(t,i,n){returnthis.nonIconControl=!0,e.prototype.createEl.call(this,"li",ae({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)},i.handleKeyDown=function(t){Xn.some(function(e){returnh.a.isEventKey(t,e)})||e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){this.selected(!0)},i.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}(un);xt.registerComponent("MenuItem",Kn);varYn=function(e){functiont(t,i){varn,a=i.track,o=t.textTracks();i.label=a.label||a.language||"Unknown",i.selected="showing"===a.mode,(n=e.call(this,t,i)||this).track=a,n.kinds=(i.kinds||[i.kind||n.track.kind]).filter(Boolean);varu,l=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(Y(n),t)},c=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(Y(n),t)};(t.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),n.on("dispose",function(){t.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)}),void0===o.onchange)&&n.on(["tap","click"],function(){if("object"!==typeofr.a.Event)try{u=newr.a.Event("change")}catch(e){}u||(u=s.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(u)});returnn.handleTracksChange(),n}$(t,e);vari=t.prototype;returni.handleClick=function(t){vari=this.track,n=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),n)for(varr=0;r<n.length;r++){vara=n[r];-1!==this.kinds.indexOf(a.kind)&&(a===i?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},i.handleTracksChange=function(e){vart="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){vart=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}}},i.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Kn);xt.registerComponent("TextTrackMenuItem",Yn);varQn=function(e){functiont(t,i){returni.track={player:t,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,e.call(this,t,i)||this}$(t,e);vari=t.prototype;returni.handleTracksChange=function(e){for(vart=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){vara=t[n];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},i.handleSelectedLanguageChange=function(e){for(vart=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){vara=t[n];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Yn);xt.registerComponent("OffTextTrackMenuItem",Qn);varJn=function(e){functiont(t,i){returnvoid0===i&&(i={}),i.tracks=t.textTracks(),e.call(this,t,i)||this}return$(t,e),t.prototype.createItems=function(e,t){vari;void0===e&&(e=[]),void0===t&&(t=Yn),this.label_&&(i=this.label_+" off"),e.push(newQn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;varn=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(varr=0;r<n.length;r++){vara=n[r];if(this.kinds_.indexOf(a.kind)>-1){vars=newt(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}returne},t}($n);xt.registerComponent("TextTrackButton",Jn);varZn=function(e){functiont(t,i){varn,r=i.track,a=i.cue,s=t.currentTime();returni.selectable=!0,i.multiSelectable=!1,i.label=a.text,i.selected=a.startTime<=s&&s<a.endTime,(n=e.call(this,t,i)||this).track=r,n.cue=a,r.addEventListener("cuechange",pt(Y(n),n.update)),n}$(t,e);vari=t.prototype;returni.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},i.update=function(e){vart=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(Kn);xt.registerComponent("ChaptersTrackMenuItem",Zn);varer=function(e){functiont(t,i,n){returne.call(this,t,i,n)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},i.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},i.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){vart=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";vari=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},i.findChaptersTrack=function(){for(vare=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){vari=e[t];if(i.kind===this.kind_)returni}},i.getMenuCaption=function(){returnthis.track_&&this.track_.label?this.track_.label:this.localize(Pt(this.kind_))},i.createMenu=function(){returnthis.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},i.createItems=function(){vare=[];if(!this.track_)returne;vart=this.track_.cues;if(!t)returne;for(vari=0,n=t.length;i<n;i++){varr=t[i],a=newZn(this.player_,{track:this.track_,cue:r});e.push(a)}returne},t}(Jn);er.prototype.kind_="chapters",er.prototype.controlText_="Chapters",xt.registerComponent("ChaptersButton",er);vartr=function(e){functiont(t,i,n){varr;r=e.call(this,t,i,n)||this;vara=t.textTracks(),s=pt(Y(r),r.handleTracksChange);returna.addEventListener("change",s),r.on("dispose",function(){a.removeEventListener("change",s)}),r}$(t,e);vari=t.prototype;returni.handleTracksChange=function(e){for(vart=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){vara=t[n];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Jn);tr.prototype.kind_="descriptions",tr.prototype.controlText_="Descriptions",xt.registerComponent("DescriptionsButton",tr);varir=function(e){functiont(t,i,n){returne.call(this,t,i,n)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Jn);ir.prototype.kind_="subtitles",ir.prototype.controlText_="Subtitles",xt.registerComponent("SubtitlesButton",ir);varnr=function(e){functiont(t,i){varn;returni.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",(n=e.call(this,t,i)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+i.kind+" settings dialog"),n}return$(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Yn);xt.registerComponent("CaptionSettingsMenuItem",nr);varrr=function(e){functiont(t,i,n){returne.call(this,t,i,n)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){vart=[];returnthis.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(newnr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Jn);rr.prototype.kind_="captions",rr.prototype.controlText_="Captions",xt.registerComponent("CaptionsButton",rr);varar=function(e){functiont(){returne.apply(this,arguments)||this}return$(t,e),t.prototype.createEl=function(t,i,n){varr='<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,ae({innerHTML:r},i),n)},t}(Yn);xt.registerComponent("SubsCapsMenuItem",ar);varsr=function(e){functiont(t,i){varn;returnvoid0===i&&(i={}),(n=e.call(this,t,i)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions"),n.menuButton_.controlText(Pt(n.label_)),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){vart=[];returnthis.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(newnr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,ar)},t}(Jn);sr.prototype.kinds_=["captions","subtitles"],sr.prototype.controlText_="Subtitles",xt.registerComponent("SubsCapsButton",sr);varor=function(e){functiont(t,i){varn,r=i.track,a=t.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,(n=e.call(this,t,i)||this).track=r,n.addClass("vjs-"+r.kind+"-menu-item");vars=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(Y(n),t)};returna.addEventListener("change",s),n.on("dispose",function(){a.removeEventListener("change",s)}),n}$(t,e);vari=t.prototype;returni.createEl=function(t,i,n){varr='<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,ae({innerHTML:r},i),n)},i.handleClick=function(t){vari=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(varn=0;n<i.length;n++){varr=i[n];r.enabled=r===this.track}},i.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Kn);xt.registerComponent("AudioTrackMenuItem",or);varur=function(e){functiont(t,i){returnvoid0===i&&(i={}),i.tracks=t.audioTracks(),e.call(this,t,i)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(e){void0===e&&(e=[]),this.hideThreshold_=1;for(vart=this.player_.audioTracks(),i=0;i<t.length;i++){varn=t[i];e.push(newor(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}returne},t}($n);ur.prototype.controlText_="Audio Track",xt.registerComponent("AudioTrackButton",ur);varlr=function(e){functiont(t,i){varn,r=i.rate,a=parseFloat(r,10);returni.label=r,i.selected=1===a,i.selectable=!0,i.multiSelectable=!1,(n=e.call(this,t,i)||this).label=r,n.rate=a,n.on(t,"ratechange",n.update),n}$(t,e);vari=t.prototype;returni.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Kn);lr.prototype.contentElType="button",xt.registerComponent("PlaybackRateMenuItem",lr);varcr=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).updateVisibility(),n.updateLabel(),n.on(t,"loadstart",n.updateVisibility),n.on(t,"ratechange",n.updateLabel),n}$(t,e);vari=t.prototype;returni.createEl=function(){vart=e.prototype.createEl.call(this);returnthis.labelEl_=ge("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},i.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},i.createMenu=function(){vare=newWn(this.player()),t=this.playbackRates();if(t)for(vari=t.length-1;i>=0;i--)e.addChild(newlr(this.player(),{rate:t[i]+"x"}));returne},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(e){for(vart=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>t){n=i[r];break}this.player().playbackRate(n)},i.playbackRates=function(){returnthis.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},i.playbackRateSupported=function(){returnthis.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Gn);cr.prototype.controlText_="Playback Rate",xt.registerComponent("PlaybackRateMenuButton",cr);vardr=function(e){functiont(){returne.apply(this,arguments)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){returne.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(xt);xt.registerComponent("Spacer",dr);varhr=function(e){functiont(){returne.apply(this,arguments)||this}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){vart=e.prototype.createEl.call(this,{className:this.buildCSSClass()});returnt.innerHTML="\xa0",t},t}(dr);xt.registerComponent("CustomControlSpacer",hr);varpr=function(e){functiont(){returne.apply(this,arguments)||this}return$(t,e),t.prototype.createEl=function(){returne.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(xt);pr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},xt.registerComponent("ControlBar",pr);varfr=function(e){functiont(t,i){varn;return(n=e.call(this,t,i)||this).on(t,"error",n.open),n}$(t,e);vari=t.prototype;returni.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},i.content=function(){vare=this.player().error();returne?this.localize(e.message):""},t}(gi);fr.prototype.options_=Lt(gi.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),xt.registerComponent("ErrorDisplay",fr);varmr=["#000","Black"],gr=["#00F","Blue"],yr=["#0FF","Cyan"],vr=["#0F0","Green"],_r=["#F0F","Magenta"],br=["#F00","Red"],Tr=["#FFF","White"],Sr=["#FF0","Yellow"],kr=["1","Opaque"],wr=["0.5","Semi-Transparent"],Cr=["0","Transparent"],Er={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[mr,Tr,br,vr,gr,Sr,_r,yr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[kr,wr,Cr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Tr,mr,br,vr,gr,Sr,_r,yr]},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:[kr,wr]},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:[Cr,wr,kr]}};functionAr(e,t){if(t&&(e=t(e)),e&&"none"!==e)returne}Er.windowColor.options=Er.backgroundColor.options;varPr=function(e){functiont(t,i){varn;returni.temporary=!1,(n=e.call(this,t,i)||this).updateDisplay=pt(Y(n),n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=ge("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void0===i.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),re(Er,function(e){n.on(n.$(e.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}$(t,e);vari=t.prototype;returni.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},i.createElSelect_=function(e,t,i){varn=this;void0===t&&(t=""),void0===i&&(i="label");varr=Er[e],a=r.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+i+' id="'+a+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map(function(e){vart=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},i.createElFgColor_=function(){vare="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("")},i.createElBgColor_=function(){vare="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("")},i.createElWinColor_=function(){vare="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("")},i.createElColors_=function(){returnge("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){returnge("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("")})},i.createElControls_=function(){vare=this.localize("restore all settings to the default values");returnge("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("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){returnthis.localize("Caption Settings Dialog")},i.description=function(){returnthis.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){returne.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){vare,t,i,n=this;returnt=function(e,t,i){varr,a,s=(r=n.$(t.selector),a=t.parser,Ar(r.options[r.options.selectedIndex].value,a));returnvoid0!==s&&(e[i]=s),e},void0===(i={})&&(i=0),ne(e=Er).reduce(function(i,n){returnt(i,e[n],n)},i)},i.setValues=function(e){vart=this;re(Er,function(i,n){!function(e,t,i){if(t)for(varn=0;n<e.options.length;n++)if(Ar(e.options[n].value,i)===t){e.selectedIndex=n;break}}(t.$(i.selector),e[n],i.parser)})},i.setDefaults=function(){vare=this;re(Er,function(t){vari=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=i})},i.restoreSettings=function(){vare;try{e=JSON.parse(r.a.localStorage.getItem("vjs-text-track-settings"))}catch(t){ee.warn(t)}e&&this.setValues(e)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){vare=this.getValues();try{Object.keys(e).length?r.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):r.a.localStorage.removeItem("vjs-text-track-settings")}catch(t){ee.warn(t)}}},i.updateDisplay=function(){vare=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;vare=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},t}(gi);xt.registerComponent("TextTrackSettings",Pr);varLr=function(e){functiont(t,i){varn,a=i.ResizeObserver||r.a.ResizeObserver;null===i.ResizeObserver&&(a=!1);vars=Lt({createEl:!a,reportTouchActivity:!1},i);return(n=e.call(this,t,s)||this).ResizeObserver=i.ResizeObserver||r.a.ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=mt(function(){n.resizeHandler()},100,!1,Y(n)),a?(n.resizeObserver_=newn.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(t.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){vare=n.debouncedHandler_,t=n.unloadListener_=function(){tt(this,"resize",e),tt(this,"unload",t),t=null};et(n.el_.contentWindow,"unload",t),et(n.el_.contentWindow,"resize",e)}},n.one("load",n.loadListener_)),n}$(t,e);vari=t.prototype;returni.createEl=function(){returne.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(xt);xt.registerComponent("ResizeManager",Lr);varxr=function(e){functiont(t,i){varn,r=Lt({createEl:!1},i);return(n=e.call(this,t,r)||this).reset_(),n.on(n.player_,"durationchange",n.handleDurationchange),Gt&&"hidden"ins.a&&"visibilityState"ins.a&&n.on(s.a,"visibilitychange",n.handleVisibilityChange),n}$(t,e);vari=t.prototype;returni.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s.a.hidden?this.stopTracking():this.startTracking())},i.isBehind_=function(){if(!this.timeupdateSeen_)return!1;vare=this.liveCurrentTime(),t=this.player_.currentTime(),i=this.seekableIncrement_;returne!==1/0&&e-(2*i+.07)>=t},i.trackLive_=function(){this.pastSeekEnd_=this.pastSeekEnd_;vare=this.player_.seekable();if(e&&e.length){vart=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"))}},i.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},i.startTracking=function(){vare=this;this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),this.timeupdateSeen_||(this.one(this.player_,"play",this.handlePlay),this.handleTimeupdate=function(){e.timeupdateSeen_=!0,e.handleTimeupdate=null},this.one(this.player_,"timeupdate",this.handleTimeupdate)))},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},i.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)},i.stopTracking=function(){this.isTracking()&&this.reset_()},i.seekableEnd=function(){for(vare=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));returnt.length?t.sort()[t.length-1]:1/0},i.seekableStart=function(){for(vare=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));returnt.length?t.sort()[0]:0},i.liveWindow=function(){vare=this.liveCurrentTime();returne===1/0?1/0:e-this.seekableStart()},i.isLive=function(){returnthis.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){returnthis.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){returnthis.pastSeekEnd_},i.behindLiveEdge=function(){returnthis.behindLiveEdge_},i.isTracking=function(){return"number"===typeofthis.trackingInterval_},i.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},i.dispose=function(){this.stopTracking(),e.prototype.dispose.call(this)},t}(xt);xt.registerComponent("LiveTracker",xr);varIr=function(e){vart=e.el();if(t.hasAttribute("src"))returne.triggerSourceset(t.src),!0;vari=e.$$("source"),n=[],r="";if(!i.length)return!1;for(vara=0;a<i.length;a++){vars=i[a].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},Or=Object.defineProperty({},"innerHTML",{get:function(){returnthis.cloneNode(!0).innerHTML},set:function(e){vart=s.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(vari=s.a.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);returnthis.innerText="",r.a.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Ur=function(e,t){for(vari={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);returni.enumerable=!0,i.configurable=!0,i},Dr=function(e){vart=e.el();if(!t.resetSourceWatch_){vari={},n=function(e){returnUr([e.el(),r.a.HTMLMediaElement.prototype,r.a.Element.prototype,Or],"innerHTML")}(e),a=function(i){returnfunction(){for(varn=arguments.length,r=newArray(n),a=0;a<n;a++)r[a]=arguments[a];vars=i.apply(t,r);returnIr(e),s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){t[e]&&(i[e]=t[e],t[e]=a(i[e]))}),Object.defineProperty(t,"innerHTML",Lt(n,{set:a(n.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(i).forEach(function(e){t[e]=i[e]}),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)}},Rr=Object.defineProperty({},"src",{get:function(){returnthis.hasAttribute("src")?Oi(r.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){returnr.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Mr=function(e){if(e.featuresSourceset){vart=e.el();if(!t.resetSourceset_){vari=function(e){returnUr([e.el(),r.a.HTMLMediaElement.prototype,Rr],"src")}(e),n=t.setAttribute,a=t.load;Object.defineProperty(t,"src",Lt(i,{set:function(n){varr=i.set.call(t,n);returne.triggerSourceset(t.src),r}})),t.setAttribute=function(i,r){vara=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),a},t.load=function(){vari=a.call(t);returnIr(e)||(e.triggerSourceset(""),Dr(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Ir(e)||Dr(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=a,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}}};functionBr(){vare=Q(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]);returnBr=function(){returne},e}varNr=function(e){functiont(t,i){varn;n=e.call(this,t,i)||this;varr=t.source,a=!1;if(r&&(n.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),t.enableSourceset&&n.setupSourcesetHandling_(),n.el_.hasChildNodes()){for(vars=n.el_.childNodes,o=s.length,l=[];o--;){varc=s[o];"track"===c.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(c),n.remoteTextTracks().addTrack(c.track),n.textTracks().addTrack(c.track),a||n.el_.hasAttribute("crossorigin")||!Di(c.src)||(a=!0)):l.push(c))}for(vard=0;d<l.length;d++)n.el_.removeChild(l[d])}returnn.proxyNativeTracks_(),n.featuresNativeTextTracks&&a&&ee.warn(u()(Br())),n.restoreMetadataTracksInIOSNativePlayer_(),(Yt||Rt||Vt)&&!0===t.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}$(t,e);vari=t.prototype;returni.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){Mr(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){vare,t=this.textTracks(),i=function(){e=[];for(vari=0;i<t.length;i++){varn=t[i];"metadata"===n.kind&&e.push({track:n,storedMode:n.mode})}};i(),t.addEventListener("change",i),this.on("dispose",function(){returnt.removeEventListener("change",i)});varn=functioni(){for(varn=0;n<e.length;n++){varr=e[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",i)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",i),t.removeEventListener("change",n),t.addEventListener("change",n)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",i),t.addEventListener("change",i),t.removeEventListener("change",n)})},i.overrideNative_=function(e,t){vari=this;if(t===this["featuresNative"+e+"Tracks"]){varn=e.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach(function(e){i.el()[n+"Tracks"].removeEventListener(e,i[n+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},i.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},i.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},i.proxyNativeTracksForType_=function(e){vart=this,i=zi[e],n=this.el()[i.getterName],r=this[i.getterName]();if(this["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){vara={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(vare=[],t=0;t<r.length;t++){for(vari=!1,a=0;a<n.length;a++)if(n[a]===r[t]){i=!0;break}i||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[i.getterName+"Listeners_"]=a,Object.keys(a).forEach(function(e){vari=a[e];n.addEventListener(e,i),t.on("dispose",function(t){returnn.removeEventListener(e,i)})}),this.on("loadstart",s),this.on("dispose",function(e){returnt.off("loadstart",s)})}},i.proxyNativeTracks_=function(){vare=this;zi.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},i.createEl=function(){vare=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){vari=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=s.a.createElement("video");varn=Lt({},this.options_.tag&&we(this.options_.tag));Yt&&!0===this.options_.nativeControlsForTouch||deleten.controls,ke(e,ae(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeofthis.options_.preload&&Ee(e,"preload",this.options_.preload);for(varr=["loop","muted","playsinline","autoplay"],a=0;a<r.length;a++){varo=r[a],u=this.options_[o];"undefined"!==typeofu&&(u?Ee(e,o,o):Ae(e,o),e[o]=u)}returne},i.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){vart=!1,i=function(){t=!0};this.on("loadstart",i);varn=function(){t||this.trigger("loadstart")};returnthis.on("loadedmetadata",n),voidthis.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")})}varr=["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)})}},i.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){ee(t,"Video is not ready. (Video.js)")}},i.duration=function(){vare=this;if(this.el_.duration===1/0&&jt&&zt&&0===this.el_.currentTime){returnthis.on("timeupdate",functiont(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}returnthis.el_.duration||NaN},i.width=function(){returnthis.el_.offsetWidth},i.height=function(){returnthis.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){vare=this;if("webkitDisplayingFullscreen"inthis.el_){vart=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"inthis.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)})}},i.supportsFullScreen=function(){if("function"===typeofthis.el_.webkitEnterFullScreen){vare=r.a.navigator&&r.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},i.enterFullScreen=function(){vare=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},i.exitFullScreen=function(){this.el_.webkitExitFullScreen()},i.requestPictureInPicture=function(){returnthis.el_.requestPictureInPicture()},i.src=function(e){if(void0===e)returnthis.el_.src;this.setSrc(e)},i.reset=function(){t.resetMediaElement(this.el_)},i.currentSrc=function(){returnthis.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(e){this.el_.controls=!!e},i.addTextTrack=function(t,i,n){returnthis.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},i.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)returne.prototype.createRemoteTextTrack.call(this,t);vari=s.a.createElement("track");returnt.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t.default&&(i.default=t.default),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},i.addRemoteTextTrack=function(t,i){varn=e.prototype.addRemoteTextTrack.call(this,t,i);returnthis.featuresNativeTextTracks&&this.el().appendChild(n),n},i.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(vari=this.$$("track"),n=i.length;n--;)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])},i.getVideoPlaybackQuality=function(){if("function"===typeofthis.el().getVideoPlaybackQuality)returnthis.el().getVideoPlaybackQuality();vare={};return"undefined"!==typeofthis.el().webkitDroppedFrameCount&&"undefined"!==typeofthis.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),r.a.performance&&"function"===typeofr.a.performance.now?e.creationTime=r.a.performance.now():r.a.performance&&r.a.performance.timing&&"number"===typeofr.a.performance.timing.navigationStart&&(e.creationTime=r.a.Date.now()-r.a.performance.timing.navigationStart),e},t}($i);if(he()){Nr.TEST_VID=s.a.createElement("video");varjr=s.a.createElement("track");jr.kind="captions",jr.srclang="en",jr.label="English",Nr.TEST_VID.appendChild(jr)}Nr.isSupported=function(){try{Nr.TEST_VID.volume=.5}catch(e){return!1}return!(!Nr.TEST_VID||!Nr.TEST_VID.canPlayType)},Nr.canPlayType=function(e){returnNr.TEST_VID.canPlayType(e)},Nr.canPlaySource=function(e,t){returnNr.canPlayType(e.type)},Nr.canControlVolume=function(){try{vare=Nr.TEST_VID.volume;returnNr.TEST_VID.volume=e/2+.1,e!==Nr.TEST_VID.volume}catch(t){return!1}},Nr.canMuteVolume=function(){try{vare=Nr.TEST_VID.muted;returnNr.TEST_VID.muted=!e,Nr.TEST_VID.muted?Ee(Nr.TEST_VID,"muted","muted"):Ae(Nr.TEST_VID,"muted"),e!==Nr.TEST_VID.muted}catch(t){return!1}},Nr.canControlPlaybackRate=function(){if(jt&&zt&&Wt<58)return!1;try{vare=Nr.TEST_VID.playbackRate;returnNr.TEST_VID.playbackRate=e/2+.1,e!==Nr.TEST_VID.playbackRate}catch(t){return!1}},Nr.canOverrideAttributes=function(){try{vare=function(){};Object.defineProperty(s.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(t){return!1}return!0},Nr.supportsNativeTextTracks=function(){returnXt||Bt&&zt},Nr.supportsNativeVideoTracks=function(){return!(!Nr.TEST_VID||!Nr.TEST_VID.videoTracks)},Nr.supportsNativeAudioTracks=function(){return!(!Nr.TEST_VID||!Nr.TEST_VID.audioTracks)},Nr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Nr.prototype.featuresVolumeControl=Nr.canControlVolume(),Nr.prototype.featuresMuteControl=Nr.canMuteVolume(),Nr.prototype.featuresPlaybackRate=Nr.canControlPlaybackRate(),Nr.prototype.featuresSourceset=Nr.canOverrideAttributes(),Nr.prototype.movingMediaElementInDOM=!Bt,Nr.prototype.featuresFullscreenResize=!0,Nr.prototype.featuresProgressEvents=!0,Nr.prototype.featuresTimeupdateEvents=!0,Nr.prototype.featuresNativeTextTracks=Nr.supportsNativeTextTracks(),Nr.prototype.featuresNativeVideoTracks=Nr.supportsNativeVideoTracks(),Nr.prototype.featuresNativeAudioTracks=Nr.supportsNativeAudioTracks();varFr=Nr.TEST_VID&&Nr.TEST_VID.constructor.prototype.canPlayType,Vr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;functionHr(){vare=Q(["\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 "]);returnHr=function(){returne},e}Nr.patchCanPlayType=function(){Ft>=4&&!Ht&&!zt&&(Nr.TEST_VID.constructor.prototype.canPlayType=function(e){returne&&Vr.test(e)?"maybe":Fr.call(this,e)})},Nr.unpatchCanPlayType=function(){vare=Nr.TEST_VID.constructor.prototype.canPlayType;returnNr.TEST_VID.constructor.prototype.canPlayType=Fr,e},Nr.patchCanPlayType(),Nr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeofe.load&&function(){try{e.load()}catch(t){}}()}},Nr.resetMediaElement=function(e){if(e){for(vart=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeofe.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Nr.prototype[e]=function(){returnthis.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Nr.prototype["set"+Pt(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){Nr.prototype[e]=function(){returnthis.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Nr.prototype["set"+Pt(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){Nr.prototype[e]=function(){returnthis.el_[e]()}}),$i.withSourceHandlers(Nr),Nr.nativeSourceHandler={},Nr.nativeSourceHandler.canPlayType=function(e){try{returnNr.TEST_VID.canPlayType(e)}catch(t){return""}},Nr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)returnNr.nativeSourceHandler.canPlayType(e.type);if(e.src){vari=Ui(e.src);returnNr.nativeSourceHandler.canPlayType("video/"+i)}return""},Nr.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Nr.nativeSourceHandler.dispose=function(){},Nr.registerSourceHandler(Nr.nativeSourceHandler),$i.registerTech("Html5",Nr);varqr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],zr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Wr=["tiny","xsmall","small","medium","large","xlarge","huge"],Gr={};Wr.forEach(function(e){vart="x"===e.charAt(0)?"x-"+e.substring(1):e;Gr[e]="vjs-layout-"+t});var$r={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Xr=function(e){functiont(i,n,r){vara;if(i.id=i.id||n.id||"vjs_video_"+qe(),(n=ae(t.getTagSettings(i),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"===typeofi.closest){vars=i.closest("[lang]");s&&s.getAttribute&&(n.language=s.getAttribute("lang"))}elsefor(varo=i;o&&1===o.nodeType;){if(we(o).hasOwnProperty("lang")){n.language=o.getAttribute("lang");break}o=o.parentNode}if((a=e.call(this,null,n,r)||this).boundDocumentFullscreenChange_=pt(Y(a),a.documentFullscreenChange_),a.boundFullWindowOnEscKey_=pt(Y(a),a.fullWindowOnEscKey),a.log=te(a.id_),a.fsApi_=ni,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)thrownewError("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=i,a.tagAttributes=i&&we(i),a.language(a.options_.language),n.languages){varu={};Object.getOwnPropertyNames(n.languages).forEach(function(e){u[e.toLowerCase()]=n.languages[e]}),a.languages_=u}elsea.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=n.poster||"",a.controls_=!!n.controls,i.controls=!1,i.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],i.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach(function(e){if("function"!==typeofa[e])thrownewError('plugin "'+e+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),Ct(Y(a),{eventBusKey:"el_"}),a.fluid_&&a.on("playerreset",a.updateStyleEl_);varl=Lt(a.options_);n.plugins&&Object.keys(n.plugins).forEach(function(e){a[e](n.plugins[e])}),a.options_.playerOptions=l,a.middleware_=[],a.initChildren(),a.isAudio("audio"===i.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"),Yt&&a.addClass("vjs-touch-enabled"),Bt||a.addClass("vjs-workinghover"),t.players[a.id_]=Y(a);varc=G.split(".")[0];returna.addClass("vjs-v"+c),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("stageclick",a.handleStageClick_),a.on("keydown",a.handleKeyDown),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}$(t,e);vari=t.prototype;returni.dispose=function(){vari=this;this.trigger("dispose"),this.off("dispose"),tt(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),tt(s.a,"keydown",this.boundFullWindowOnEscKey_),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),Ki[this.id()]=null,Gi.names.forEach(function(e){vart=Gi[e],n=i[t.getterName]();n&&n.off&&n.off()}),e.prototype.dispose.call(this)},i.createEl=function(){vart,i=this.tag,n=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();n?t=this.el_=i.parentNode:a||(t=this.el_=e.prototype.createEl.call(this,"div"));varo=we(i);if(a){for(t=this.el_=i,i=this.tag=s.a.createElement("video");t.children.length;)i.appendChild(t.firstChild);_e(t,"video-js")||be(t,"video-js"),t.appendChild(i),n=this.playerElIngest_=t,Object.keys(t).forEach(function(e){i[e]=t[e]})}if(i.setAttribute("tabindex","-1"),o.tabindex="-1",(Gt||zt&&Kt)&&(i.setAttribute("role","application"),o.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"ino&&deleteo.width,"height"ino&&deleteo.height,Object.getOwnPropertyNames(o).forEach(function(e){a&&"class"===e||t.setAttribute(e,o[e]),a&&i.setAttribute(e,o[e])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=t.player=this,this.addClass("vjs-paused"),!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=dt("vjs-styles-dimensions");varu=je(".vjs-styles-defaults"),l=je("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.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(varc=i.getElementsByTagName("a"),d=0;d<c.length;d++){varh=c.item(d);be(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}returni.initNetworkState_=i.networkState,i.parentNode&&!n&&i.parentNode.insertBefore(t,i),ve(i,t),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=t,t},i.width=function(e){returnthis.dimension("width",e)},i.height=function(e){returnthis.dimension("height",e)},i.dimension=function(e,t){vari=e+"_";if(void0===t)returnthis[i]||0;if(""===t)returnthis[i]=void0,voidthis.updateStyleEl_();varn=parseFloat(t);isNaN(n)?ee.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},i.fluid=function(e){if(void0===e)return!!this.fluid_;vart,i;this.fluid_=!!e,yt(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),yt(t=function(){this.on("playerreset",this.updateStyleEl_)})?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(e){if(void0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(e){if(void0===e)returnthis.aspectRatio_;if(!/^\d+\:\d+$/.test(e))thrownewError("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){vare,t,i,n=(void0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),a=n[1]/n[0];e=void0!==this.width_?this.width_:void0!==this.height_?this.height_/a:this.videoWidth()||300,t=void0!==this.height_?this.height_:e*a,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),ht(this.styleEl_,"\n ."+i+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+i+".vjs-fluid {\n padding-top: "+100*a+"%;\n }\n ")}else{vars="number"===typeofthis.width_?this.width_:this.options_.width,o="number"===typeofthis.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>=0&&(u.height=o))}},i.loadTech_=function(e,t){vari=this;this.tech_&&this.unloadTech_();varn=Pt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&($i.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;vara={source:t,autoplay:"string"!==typeofthis.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,Promise:this.options_.Promise};Gi.names.forEach(function(e){vart=Gi[e];a[t.getterName]=i[t.privateName]}),ae(a,this.options_[n]),ae(a,this.options_[r]),ae(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);vars=$i.getTech(e);if(!s)thrownewError("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=news(a),this.tech_.ready(pt(this,this.handleTechReady_),!0),fi(this.textTracksJson_||[],this.tech_),qr.forEach(function(e){i.on(i.tech_,e,i["handleTech"+Pt(e)+"_"])}),Object.keys(zr).forEach(function(e){i.on(i.tech_,e,function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+zr[e]+"_"].bind(i),event:t}):i["handleTech"+zr[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_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),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"===n&&this.tag||ve(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){vare=this;Gi.names.forEach(function(t){vari=Gi[t];e[i.privateName]=e[i.getterName]()}),this.textTracksJson_=pi(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(e){returnvoid0===e&&ee.warn(u()(Hr())),this.tech_},i.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",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_)},i.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_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.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())},i.manualAutoplay_=function(e){vart=this;if(this.tech_&&"string"===typeofe){vari,n=function(){vare=t.muted();t.muted(!0);vari=function(){t.muted(e)};t.playTerminatedQueue_.push(i);varn=t.play();if(ci(n))returnn.catch(i)};if("any"===e&&!0!==this.muted()?ci(i=this.play())&&(i=i.catch(n)):i="muted"===e&&!0!==this.muted()?n():this.play(),ci(i))returni.then(function(){t.trigger({type:"autoplay-success",autoplay:e})}).catch(function(i){t.trigger({type:"autoplay-failure",autoplay:e})})}},i.updateSourceCaches_=function(e){void0===e&&(e="");vart=e,i="";"string"!==typeoft&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)returne.cache_.source.type;vari=e.cache_.sources.filter(function(e){returne.src===t});if(i.length)returni[0].type;for(varn=e.$$("source"),r=0;r<n.length;r++){vara=n[r];if(a.type&&a.src&&a.src===t)returna.type}returnan(t)}(this,t)),this.cache_.source=Lt({},e,{src:t,type:i});for(varn=this.cache_.sources.filter(function(e){returne.src&&e.src===t}),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){varu=we(a[o]);r.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},i.handleTechSourceset_=function(e){vart=this;if(!this.changingSrc_){vari=function(e){returnt.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),!e.src){this.tech_.one(["sourceset","loadstart"],functione(i){if("sourceset"!==i.type){varn=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}t.tech_.off(["sourceset","loadstart"],e)})}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},i.hasStarted=function(e){if(void0===e)returnthis.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){returne.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){vare=this;this.addClass("vjs-waiting"),this.trigger("waiting");vart=this.currentTime();this.on("timeupdate",functioni(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",i))})},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(ee.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")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(e){Ne(e)&&this.controls_&&(this.paused()?di(this.play()):this.pause())},i.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){returnt.contains(e.target)})||void0!==this.options_&&void0!==this.options_.userActions&&void0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void0!==this.options_&&void0!==this.options_.userActions&&"function"===typeofthis.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(e){e.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(e){vart=this.el(),i=s.a[this.fsApi_.fullscreenElement]===t;!i&&t.matches?i=t.matches(":"+this.fsApi_.fullscreen):!i&&t.msMatchesSelector&&(i=t.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(i),!1===this.isFullscreen()&&tt(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed&&this.trigger("fullscreenchange")},i.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},i.handleTechError_=function(){vare=this.tech_.error();this.error(e)},i.handleTechTextData_=function(){vare=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},i.getCache=function(){returnthis.cache_},i.resetCache_=function(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},i.techCall_=function(e,t){this.ready(function(){if(einen)returnfunction(e,t,i,n){returnt[i](e.reduce(nn(i),n))}(this.middleware_,this.tech_,e,t);if(eintn)returnJi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throwee(i),i}},!0)},i.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(einZi)returnfunction(e,t,i){returne.reduceRight(nn(i),t[i]())}(this.middleware_,this.tech_,e);if(eintn)returnJi(this.middleware_,this.tech_,e);try{returnthis.tech_[e]()}catch(t){if(void0===this.tech_[e])throwee("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throwee("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throwee(t),t}}},i.play=function(){vare=this,t=this.options_.Promise||r.a.Promise;returnt?newt(function(t){e.play_(t)}):this.play_()},i.play_=function(e){vart=this;void0===e&&(e=di),this.playCallbacks_.push(e);vari=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)returnthis.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(i||!Xt&&!Bt||this.load());varn=this.techGet_("play");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},i.runPlayTerminatedQueue_=function(){vare=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},i.runPlayCallbacks_=function(e){vart=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})},i.pause=function(){this.techCall_("pause")},i.paused=function(){return!1!==this.techGet_("paused")},i.played=function(){returnthis.techGet_("played")||ei(0,0)},i.scrubbing=function(e){if("undefined"===typeofe)returnthis.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(e){return"undefined"!==typeofe?(e<0&&(e=0),voidthis.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},i.duration=function(e){if(void0===e)returnvoid0!==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"))},i.remainingTime=function(){returnthis.duration()-this.currentTime()},i.remainingTimeDisplay=function(){returnMath.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){vare=this.techGet_("buffered");returne&&e.length||(e=ei(0,0)),e},i.bufferedPercent=function(){returnti(this.buffered(),this.duration())},i.bufferedEnd=function(){vare=this.buffered(),t=this.duration(),i=e.end(e.length-1);returni>t&&(i=t),i},i.volume=function(e){vart;returnvoid0!==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)},i.muted=function(e){if(void0===e)returnthis.techGet_("muted")||!1;this.techCall_("setMuted",e)},i.defaultMuted=function(e){returnvoid0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(e){if(void0===e||0===e)returnthis.cache_.lastVolume;this.cache_.lastVolume=e},i.supportsFullScreen=function(){returnthis.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(e){returnvoid0!==e?(this.isFullscreen_=!!e,voidthis.toggleFullscreenClass_()):!!this.isFullscreen_},i.requestFullscreen=function(e){vart;this.isFullscreen(!0),this.fsApi_.requestFullscreen?(et(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void0!==e&&(t=e)),di(this.el_[this.fsApi_.requestFullscreen](t))):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},i.exitFullscreen=function(){this.isFullscreen(!1),this.fsApi_.requestFullscreen?di(s.a[this.fsApi_.exitFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},i.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=s.a.documentElement.style.overflow,et(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow="hidden",be(s.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(e){h.a.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},i.exitFullWindow=function(){this.isFullWindow=!1,tt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow=this.docOrigOverflow,Te(s.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},i.isInPictureInPicture=function(e){returnvoid0!==e?(this.isInPictureInPicture_=!!e,voidthis.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"ins.a)returnthis.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"ins.a)returns.a.exitPictureInPicture()},i.handleKeyDown=function(e){vart=this.options_.userActions;if(t&&t.hotkeys){(function(e){vart=e.tagName.toLowerCase();return"input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"===typeoft.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},i.handleHotkeys=function(e){vart=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void0===i?function(e){returnh.a.isEventKey(e,"f")}:i,r=t.muteKey,a=void0===r?function(e){returnh.a.isEventKey(e,"m")}:r,o=t.playPauseKey,u=void0===o?function(e){returnh.a.isEventKey(e,"k")||h.a.isEventKey(e,"Space")}:o;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();varl=xt.getComponent("FullscreenToggle");!1!==s.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}elseif(a.call(this,e)){e.preventDefault(),e.stopPropagation(),xt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}elseif(u.call(this,e)){e.preventDefault(),e.stopPropagation(),xt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},i.canPlayType=function(e){for(vart,i=0,n=this.options_.techOrder;i<n.length;i++){varr=n[i],a=$i.getTech(r);if(a||(a=xt.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e)))returnt}elseee.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},i.selectSource=function(e){vart,i=this,n=this.options_.techOrder.map(function(e){return[e,$i.getTech(e)]}).filter(function(e){vart=e[0],i=e[1];returni?i.isSupported():(ee.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(e,t,i){varn;returne.some(function(e){returnt.some(function(t){if(n=i(e,t))return!0})}),n},a=function(e,t){varn=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}};return(this.options_.sourceOrder?r(e,n,(t=a,function(e,i){returnt(i,e)})):r(n,e,a))||!1},i.src=function(e){vart=this;if("undefined"===typeofe)returnthis.cache_.src||"";vari=functione(t){if(Array.isArray(t)){vari=[];t.forEach(function(t){t=e(t),Array.isArray(t)?i=i.concat(t):se(t)&&i.push(t)}),t=i}elset="string"===typeoft&&t.trim()?[sn({src:t})]:se(t)&&"string"===typeoft.src&&t.src&&t.src.trim()?[sn(t)]:[];returnt}(e);i.length?(this.changingSrc_=!0,this.cache_.sources=i,this.updateSourceCaches_(i[0]),Qi(this,i[0],function(e,n){varr,a;if(t.middleware_=n,t.cache_.sources=i,t.updateSourceCaches_(e),t.src_(e))returni.length>1?t.src(i.slice(1)):(t.changingSrc_=!1,t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),voidt.triggerReady());r=n,a=t.tech_,r.forEach(function(e){returne.setTech&&e.setTech(a)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},i.src_=function(e){vart,i,n=this,r=this.selectSource([e]);return!r||(t=r.tech,i=this.techName_,Pt(t)!==Pt(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){n.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))},i.load=function(){this.techCall_("load")},i.reset=function(){vare=this,t=this.options_.Promise||r.a.Promise;this.paused()||!t?this.doReset_():di(this.play().then(function(){returne.doReset_()}))},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),yt(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);vare=this.controlBar,t=e.durationDisplay,i=e.remainingTimeDisplay;t&&t.updateContent(),i&&i.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){vare=this.currentSource(),t=[];return0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},i.currentSource=function(){returnthis.cache_.source||{}},i.currentSrc=function(){returnthis.currentSource()&&this.currentSource().src||""},i.currentType=function(){returnthis.currentSource()&&this.currentSource().type||""},i.preload=function(e){returnvoid0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},i.autoplay=function(e){if(void0===e)returnthis.options_.autoplay||!1;vart;"string"===typeofe&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t="undefined"===typeoft?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},i.playsinline=function(e){returnvoid0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},i.loop=function(e){returnvoid0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},i.poster=function(e){if(void0===e)returnthis.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){vare=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(e){if(void0===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_()))},i.usingNativeControls=function(e){if(void0===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")))},i.error=function(e){if(void0===e)returnthis.error_||null;if(this.options_.suppressNotSupportedError&&e&&e.message&&e.message===this.localize(this.options_.notSupportedMessage)){vart=function(){this.error(e)};returnthis.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),voidthis.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===e)returnthis.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=newui(e),this.addClass("vjs-error"),ee.error("(CODE:"+this.error_.code+" "+ui.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},i.reportUserActivity=function(e){this.userActivity_=!0},i.userActive=function(e){if(void0===e)returnthis.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)returnthis.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),voidthis.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")}},i.listenForUserActivity_=function(){vare,t,i,n=pt(this,this.reportUserActivity);this.on("mousedown",function(){n(),this.clearInterval(e),e=this.setInterval(n,250)}),this.on("mousemove",function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())}),this.on("mouseup",function(t){n(),this.clearInterval(e)});varr,a=this.getChild("controlBar");!a||Bt||jt||(a.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),a.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",n),this.on("keyup",n),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(r);vare=this.options_.inactivityTimeout;e<=0||(r=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},i.playbackRate=function(e){if(void0===e)returnthis.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},i.defaultPlaybackRate=function(e){returnvoid0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(e){if(void0===e)return!!this.isAudio_;this.isAudio_=!!e},i.addTextTrack=function(e,t,i){if(this.tech_)returnthis.tech_.addTextTrack(e,t,i)},i.addRemoteTextTrack=function(e,t){if(this.tech_)returnthis.tech_.addRemoteTextTrack(e,t)},i.removeRemoteTextTrack=function(e){void0===e&&(e={});vart=e.track;if(t||(t=e),this.tech_)returnthis.tech_.removeRemoteTextTrack(t)},i.getVideoPlaybackQuality=function(){returnthis.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){returnthis.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){returnthis.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(e){if(void0===e)returnthis.language_;this.language_=String(e).toLowerCase()},i.languages=function(){returnLt(t.prototype.options_.languages,this.languages_)},i.toJSON=function(){vare=Lt(this.options_),t=e.tracks;e.tracks=[];for(vari=0;i<t.length;i++){varn=t[i];(n=Lt(n)).player=void0,e.tracks[i]=n}returne},i.createModal=function(e,t){vari=this;(t=t||{}).content=e||"";varn=newgi(this,t);returnthis.addChild(n),n.on("dispose",function(){i.removeChild(n)}),n.open(),n},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(vare=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Wr.length;i++){varn=Wr[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Gr[e]),this.addClass(Gr[n]),this.breakpoint_=n;break}}},i.removeCurrentBreakpoint_=function(){vare=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},i.breakpoints=function(e){returnvoid0===e?ae(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=ae({},$r,e),this.updateCurrentBreakpoint_(),ae(this.breakpoints_))},i.responsive=function(e){returnvoid0===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):void0},i.currentBreakpoint=function(){returnthis.breakpoint_},i.currentBreakpointClass=function(){returnGr[this.breakpoint_]||""},i.loadMedia=function(e,t){vari=this;if(e&&"object"===typeofe){this.reset(),this.cache_.media=Lt(e);varn=this.cache_.media,r=n.artwork,a=n.poster,s=n.src,o=n.textTracks;!r&&a&&(this.cache_.media.artwork=[{src:a,type:an(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach(function(e){returni.addRemoteTextTrack(e,!1)}),this.ready(t)}},i.getMedia=function(){if(!this.cache_.media){vare=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};returne&&(t.poster=e,t.artwork=[{src:t.poster,type:an(t.poster)}]),t}returnLt(this.cache_.media)},t.getTagSettings=function(e){vart={sources:[],tracks:[]},i=we(e),n=i["data-setup"];if(_e(e,"vjs-fill")&&(i.fill=!0),_e(e,"vjs-fluid")&&(i.fluid=!0),null!==n){varr=c()(n||"{}"),a=r[0],s=r[1];a&&ee.error(a),ae(i,s)}if(ae(t,i),e.hasChildNodes())for(varo=e.childNodes,u=0,l=o.length;u<l;u++){vard=o[u],h=d.nodeName.toLowerCase();"source"===h?t.sources.push(we(d)):"track"===h&&t.tracks.push(we(d))}returnt},i.flexNotSupported_=function(){vare=s.a.createElement("i");return!("flexBasis"ine.style||"webkitFlexBasis"ine.style||"mozFlexBasis"ine.style||"msFlexBasis"ine.style||"msFlexOrder"ine.style)},t}(xt);Gi.names.forEach(function(e){vart=Gi[e];Xr.prototype[t.getterName]=function(){returnthis.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||newt.ListClass,this[t.privateName])}}),Xr.players={};varKr=r.a.navigator;Xr.prototype.options_={techOrder:$i.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Kr&&(Kr.languages&&Kr.languages[0]||Kr.userLanguage||Kr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){Xr.prototype[e]=function(){returnthis.techGet_(e)}}),qr.forEach(function(e){Xr.prototype["handleTech"+Pt(e)+"_"]=function(){returnthis.trigger(e)}}),xt.registerComponent("Player",Xr);varYr={},Qr=function(e){returnYr.hasOwnProperty(e)},Jr=function(e){returnQr(e)?Yr[e]:void0},Zr=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},ea=function(e,t,i){varn=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},ta=function(e,t){returnt.prototype.name=e,function(){ea(this,{name:e,plugin:t,instance:null},!0);for(vari=arguments.length,n=newArray(i),r=0;r<i;r++)n[r]=arguments[r];vara=K(t,[this].concat(n));returnthis[e]=function(){returna},ea(this,a.getEventHash()),a}},ia=function(){functione(t){if(this.constructor===e)thrownewError("Plugin must be sub-classed; not directly instantiated.");this.player=t,Ct(this),deletethis.trigger,At(this,this.constructor.defaultState),Zr(t,this.name),this.dispose=pt(this,this.dispose),t.on("dispose",this.dispose)}vart=e.prototype;returnt.version=function(){returnthis.constructor.VERSION},t.getEventHash=function(e){returnvoid0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){returnvoid0===t&&(t={}),it(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){vare=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]=ta(e,Yr[e])},e.isBasic=function(t){vari="string"===typeoft?Jr(t):t;return"function"===typeofi&&!e.prototype.isPrototypeOf(i.prototype)},e.registerPlugin=function(t,i){if("string"!==typeoft)thrownewError('Illegal plugin name, "'+t+'", must be a string, was '+typeoft+".");if(Qr(t))ee.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');elseif(Xr.prototype.hasOwnProperty(t))thrownewError('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!==typeofi)thrownewError('Illegal plugin for "'+t+'", must be a function, was '+typeofi+".");returnYr[t]=i,"plugin"!==t&&(e.isBasic(i)?Xr.prototype[t]=function(e,t){vari=function(){ea(this,{name:e,plugin:t,instance:null},!0);vari=t.apply(this,arguments);returnZr(this,e),ea(this,{name:e,plugin:t,instance:i}),i};returnObject.keys(t).forEach(function(e){i[e]=t[e]}),i}(t,i):Xr.prototype[t]=ta(t,i)),i},e.deregisterPlugin=function(e){if("plugin"===e)thrownewError("Cannot de-register base plugin.");Qr(e)&&(deleteYr[e],deleteXr.prototype[e])},e.getPlugins=function(e){vart;returnvoid0===e&&(e=Object.keys(Yr)),e.forEach(function(e){vari=Jr(e);i&&((t=t||{})[e]=i)}),t},e.getPluginVersion=function(e){vart=Jr(e);returnt&&t.VERSION||""},e}();ia.getPlugin=Jr,ia.BASE_PLUGIN_NAME="plugin",ia.registerPlugin("plugin",ia),Xr.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Xr.prototype.hasPlugin=function(e){return!!Qr(e)};varna=function(e){return0===e.indexOf("#")?e.slice(1):e};functionra(e,t,i){varn=ra.getPlayer(e);if(n)returnt&&ee.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;varr="string"===typeofe?je("#"+na(e)):e;if(!pe(r))thrownewTypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||ee.warn("The element supplied is not included in the DOM"),t=t||{},ra.hooks("beforesetup").forEach(function(e){vari=e(r,Lt(t));se(i)&&!Array.isArray(i)?t=Lt(t,i):ee.error("please return an object in beforesetup hooks")});vara=xt.getComponent("Player");returnn=newa(r,t,i),ra.hooks("setup").forEach(function(e){returne(n)}),n}if(ra.hooks_={},ra.hooks=function(e,t){returnra.hooks_[e]=ra.hooks_[e]||[],t&&(ra.hooks_[e]=ra.hooks_[e].concat(t)),ra.hooks_[e]},ra.hook=function(e,t){ra.hooks(e,t)},ra.hookOnce=function(e,t){ra.hooks(e,[].concat(t).map(function(t){returnfunctioni(){returnra.removeHook(e,i),t.apply(void0,arguments)}}))},ra.removeHook=function(e,t){vari=ra.hooks(e).indexOf(t);return!(i<=-1)&&(ra.hooks_[e]=ra.hooks_[e].slice(),ra.hooks_[e].splice(i,1),!0)},!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE&&he()){varaa=je(".vjs-styles-defaults");if(!aa){aa=dt("vjs-styles-defaults");varsa=je("head");sa&&sa.insertBefore(aa,sa.firstChild),ht(aa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}lt(1,ra),ra.VERSION=G,ra.options=Xr.prototype.options_,ra.getPlayers=function(){returnXr.players},ra.getPlayer=function(e){vart,i=Xr.players;if("string"===typeofe){varn=na(e),r=i[n];if(r)returnr;t=je("#"+n)}elset=e;if(pe(t)){vara=t,s=a.player,o=a.playerId;if(s||i[o])returns||i[o]}},ra.getAllPlayers=function(){returnObject.keys(Xr.players).map(function(e){returnXr.players[e]}).filter(Boolean)},ra.players=Xr.players,ra.getComponent=xt.getComponent,ra.registerComponent=function(e,t){$i.isTech(t)&&ee.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),xt.registerComponent.call(xt,e,t)},ra.getTech=$i.getTech,ra.registerTech=$i.registerTech,ra.use=function(e,t){Xi[e]=Xi[e]||[],Xi[e].push(t)},Object.defineProperty(ra,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ra.middleware,"TERMINATOR",{value:Yi,writeable:!1,enumerable:!0}),ra.browser=Qt,ra.TOUCH_ENABLED=Yt,ra.extend=function(e,t){void0===t&&(t={});vari=function(){e.apply(this,arguments)},n={};for(varrin"object"===typeoft?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"===typeoft&&(i=t),function(e,t){if("function"!==typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(i,e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);returni},ra.mergeOptions=Lt,ra.bind=pt,ra.registerPlugin=ia.registerPlugin,ra.deregisterPlugin=ia.deregisterPlugin,ra.plugin=function(e,t){returnee.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ia.registerPlugin(e,t)},ra.getPlugins=ia.getPlugins,ra.getPlugin=ia.getPlugin,ra.getPluginVersion=ia.getPluginVersion,ra.addLanguage=function(e,t){vari;returne=(""+e).toLowerCase(),ra.options.languages=Lt(ra.options.languages,((i={})[e]=t,i)),ra.options.languages[e]},ra.log=ee,ra.createLogger=te,ra.createTimeRange=ra.createTimeRanges=ei,ra.formatTime=Tn,ra.setFormatTime=function(e){bn=e},ra.resetFormatTime=function(){bn=_n},ra.parseUrl=Ii,ra.isCrossOrigin=Di,ra.EventTarget=gt,ra.on=et,ra.one=nt,ra.off=tt,ra.trigger=it,ra.xhr=f.a,ra.TextTrack=Ni,ra.AudioTrack=ji,ra.VideoTrack=Fi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){ra[e]=function(){returnee.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Ve[e].apply(null,arguments)}}),ra.computedStyle=ue,ra.dom=Ve,ra.url=Ri;varoa=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=v.a.buildAbsoluteURL(r.a.location.href,e)),v.a.buildAbsoluteURL(e,t))},ua=function(e,t,i){returne&&i.responseURL&&t!==i.responseURL?i.responseURL:t},la=function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")},ca=function(){functione(e,t){for(vari=0;i<t.length;i++){varn=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,i,n){returni&&e(t.prototype,i),n&&e(t,n),t}}(),da=function(e,t){if("function"!==typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)},ha=function(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeoft&&"function"!==typeoft?e:t},pa=function(){returnfunction(e,t){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnfunction(e,t){vari=[],n=!0,r=!1,a=void0;try{for(vars,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(u){r=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(r)throwa}}returni}(e,t);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),fa=ra.mergeOptions,ma=ra.EventTarget,ga=ra.log,ya=function(e,t){["AUDIO","SUBTITLES"].forEach(function(i){for(varnine.mediaGroups[i])for(varrine.mediaGroups[i][n]){vara=e.mediaGroups[i][n][r];t(a,i,n,r)}})},va=function(e,t){vari=fa(e,{}),n=i.playlists[t.uri];if(!n)returnnull;if(n.segments&&t.segments&&n.segments.length===t.segments.length&&n.endList===t.endList&&n.mediaSequence===t.mediaSequence)returnnull;varr=fa(n,t);n.segments&&(r.segments=function(e,t,i){varn=t.slice();i=i||0;for(varr=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=fa(e[a],n[a-i]);returnn}(n.segments,t.segments,t.mediaSequence-n.mediaSequence)),r.segments.forEach(function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=oa(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=oa(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=oa(t,e.map.uri))}(e,r.resolvedUri)});for(vara=0;a<i.playlists.length;a++)i.playlists[a].uri===t.uri&&(i.playlists[a]=r);returni.playlists[t.uri]=r,i},_a=function(e){for(vart=e.playlists.length;t--;){vari=e.playlists[t];e.playlists[i.uri]=i,i.resolvedUri=oa(e.uri,i.uri),i.id=t,i.attributes||(i.attributes={},ga.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},ba=function(e){ya(e,function(t){t.uri&&(t.resolvedUri=oa(e.uri,t.uri))})},Ta=function(e,t){vari=e.segments[e.segments.length-1];returnt&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)},Sa=function(e){functiont(e,i){varn=arguments.length>2&&void0!==arguments[2]?arguments[2]:{};la(this,t);varr=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=n.withCredentials,s=void0!==a&&a,o=n.handleManifestRedirects,u=void0!==o&&o;r.srcUrl=e,r.hls_=i,r.withCredentials=s,r.handleManifestRedirects=u;varl=i.options_;if(r.customTagParsers=l&&l.customTagParsers||[],r.customTagMappers=l&&l.customTagMappers||[],!r.srcUrl)thrownewError("A non-empty playlist URL is required");returnr.state="HAVE_NOTHING",r.on("mediaupdatetimeout",function(){"HAVE_METADATA"===r.state&&(r.state="HAVE_CURRENT_METADATA",r.request=r.hls_.xhr({uri:oa(r.master.uri,r.media().uri),withCredentials:r.withCredentials},function(e,t){if(r.request)returne?r.playlistRequestError(r.request,r.media().uri,"HAVE_METADATA"):voidr.haveMetadata(r.request,r.media().uri)}))}),r}returnda(t,ma),ca(t,[{key:"playlistRequestError",value:function(e,t,i){this.request=null,i&&(this.state=i),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){vari=this;this.request=null,this.state="HAVE_METADATA";varn=newE;this.customTagParsers.forEach(function(e){returnn.addParser(e)}),this.customTagMappers.forEach(function(e){returnn.addTagMapper(e)}),n.push(e.responseText),n.end(),n.manifest.uri=t,n.manifest.attributes=n.manifest.attributes||{};vara=va(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,a?(this.master=a,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=r.a.setTimeout(function(){i.trigger("mediaupdatetimeout")},Ta(this.media(),!!a))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function(){if(this.request){vare=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e,t){vari=this;if(!e)returnthis.media_;if("HAVE_NOTHING"===this.state)thrownewError("Cannot switch media playlist from "+this.state);if("string"===typeofe){if(!this.master.playlists[e])thrownewError("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(r.a.clearTimeout(this.finalRenditionTimeout),t){varn=e.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=r.a.setTimeout(this.media.bind(this,e,!1),n)}else{vara=this.state,s=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)returnthis.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(t,n){if(i.request){if(e.resolvedUri=ua(i.handleManifestRedirects,e.resolvedUri,n),t)returni.playlistRequestError(i.request,e.uri,a);i.haveMetadata(n,e.uri),"HAVE_MASTER"===a?i.trigger("loadedmetadata"):i.trigger("mediachange")}})}}}},{key:"pause",value:function(){this.stopRequest(),r.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){vart=this;r.a.clearTimeout(this.mediaUpdateTimeout);vari=this.media();if(e){varn=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout(function(){returnt.load()},n)}elsethis.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){vare=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)returne.error={status:i.status,message:"HLS playlist request error at URL: "+e.srcUrl+".",responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");varn=newE;returne.customTagParsers.forEach(function(e){returnn.addParser(e)}),e.customTagMappers.forEach(function(e){returnn.addTagMapper(e)}),n.push(i.responseText),n.end(),e.state="HAVE_MASTER",e.srcUrl=ua(e.handleManifestRedirects,e.srcUrl,i),n.manifest.uri=e.srcUrl,n.manifest.playlists?(e.master=n.manifest,_a(e.master),ba(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(n.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r.a.location.href,playlists:[{uri:e.srcUrl,id:0,resolvedUri:e.srcUrl,attributes:{}}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.haveMetadata(i,e.srcUrl),e.trigger("loadedmetadata"))}})}}]),t}(),ka=ra.createTimeRange,wa=function(e,t,i){varn,r;return"undefined"===typeoft&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(n=function(e,t){vari=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if("undefined"!==typeofr.start)return{result:r.start,precise:!0};if("undefined"!==typeofr.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if("undefined"!==typeof(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,"undefined"!==typeofr.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t)).precise?n.result:(r=function(e,t){for(vari=0,n=void0,r=t-e.mediaSequence;r<e.segments.length;r++){if("undefined"!==typeof(n=e.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,"undefined"!==typeofn.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?r.result:n.result+i},Ca=function(e,t,i){if(!e)return0;if("number"!==typeofi&&(i=0),"undefined"===typeoft){if(e.totalDuration)returne.totalDuration;if(!e.endList)returnr.a.Infinity}returnwa(e,t,i)},Ea=function(e,t,i){varn=0;if(t>i){varr=[i,t];t=r[0],i=r[1]}if(t<0){for(vara=t;a<Math.min(0,i);a++)n+=e.targetDuration;t=0}for(vars=t;s<i;s++)n+=e.segments[s].duration;returnn},Aa=function(e){if(!e.segments.length)return0;for(vart=e.segments.length-1,i=e.segments[t].duration||e.targetDuration,n=i+2*e.targetDuration;t--&&!((i+=e.segments[t].duration)>=n););returnMath.max(0,t)},Pa=function(e,t,i){if(!e||!e.segments)returnnull;if(e.endList)returnCa(e);if(null===t)returnnull;t=t||0;varn=i?Aa(e):e.segments.length;returnwa(e,e.mediaSequence+n,t)},La=function(e){returne-Math.floor(e)===0},xa=function(e,t){if(La(t))returnt+.1*e;for(vari=t.toString().split(".")[1].length,n=1;n<=i;n++){varr=Math.pow(10,n),a=t*r;if(La(a)||n===i)return(a+e)/r}},Ia=xa.bind(null,1),Oa=xa.bind(null,-1),Ua=function(e){returne.excludeUntil&&e.excludeUntil>Date.now()},Da=function(e){returne.excludeUntil&&e.excludeUntil===1/0},Ra=function(e){vart=Ua(e);return!e.disabled&&!t},Ma=function(e,t){returnt.attributes&&t.attributes[e]},Ba=function(e,t){if(1===e.playlists.length)return!0;vari=t.attributes.BANDWIDTH||Number.MAX_VALUE;return0===e.playlists.filter(function(e){return!!Ra(e)&&(e.attributes.BANDWIDTH||0)<i}).length},Na={duration:Ca,seekable:function(e,t){vari=t||0,n=Pa(e,t,!0);returnnull===n?ka():ka(i,n)},safeLiveIndex:Aa,getMediaInfoForTime:function(e,t,i,n){varr=void0,a=void0,s=e.segments.length,o=t-n;if(o<0){if(i>0)for(r=i-1;r>=0;r--)if(a=e.segments[r],(o+=Oa(a.duration))>0)return{mediaIndex:r,startTime:n-Ea(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;r<s;r++)if(a=e.segments[r],(o-=Ia(a.duration))<0)return{mediaIndex:r,startTime:n+Ea(e,i,r)};return{mediaIndex:s-1,startTime:t}},isEnabled:Ra,isDisabled:function(e){returne.disabled},isBlacklisted:Ua,isIncompatible:Da,playlistEnd:Pa,isAes:function(e){for(vart=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(vart=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:Ma,estimateSegmentRequestTime:function(e,t,i){varn=arguments.length>3&&void0!==arguments[3]?arguments[3]:0;returnMa("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:Ba},ja=ra.xhr,Fa=ra.mergeOptions,Va=function(){returnfunctione(t,i){t=Fa({timeout:45e3},t);varn=e.beforeRequest||ra.Hls.xhr.beforeRequest;if(n&&"function"===typeofn){varr=n(t);r&&(t=r)}vara=ja(t,function(e,t){varn=a.response;!e&&n&&(a.responseTime=Date.now(),a.roundTripTime=a.responseTime-a.requestTime,a.bytesReceived=n.byteLength||n.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=newError("XHR Failed with a response of: "+(a&&(n||a.responseText)))),i(e,a)}),s=a.abort;returna.abort=function(){returna.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a}},Ha=function(e){vart={};returne.byterange&&(t.Range=function(e){vart;returnt=e.offset+e.length-1,"bytes="+e.offset+"-"+t}(e.byterange)),t},qa=function(e,t){returne.start(t)+"-"+e.end(t)},za=function(e,t){vari=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Wa=function(e){returne>=32&&e<126?String.fromCharCode(e):"."},Ga=function(e){vart={};returnObject.keys(e).forEach(function(i){varn=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t},$a=function(e){vart=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Xa=function(e){returne.resolvedUri},Ka=function(e){for(vart=Array.prototype.slice.call(e),i="",n=0;n<t.length/16;n++)i+=t.slice(16*n,16*n+16).map(za).join("")+" "+t.slice(16*n,16*n+16).map(Wa).join("")+"\n";returni},Ya=Object.freeze({createTransferableMessage:Ga,initSegmentId:$a,segmentKeyId:Xa,hexDump:Ka,tagDump:function(e){vart=e.bytes;returnKa(t)},textRanges:function(e){vart="",i=void0;for(i=0;i<e.length;i++)t+=qa(e,i)+" ";returnt}}),Qa=function(e){vart=e.playlist,i=e.time,n=void0===i?void0:i,r=e.callback;if(!r)thrownewError("getProgramTime: callback must be provided");if(!t||void0===n)returnr({message:"getProgramTime: playlist and time must be provided"});vara=function(e,t){if(!t||!t.segments||0===t.segments.length)returnnull;for(vari=0,n=void0,r=0;r<t.segments.length&&!(e<=(i=(n=t.segments[r]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration));r++);vara=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)returnnull;if(e>i){if(e>i+.25*a.duration)returnnull;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(n,t);if(!a)returnr({message:"valid programTime was not found"});if("estimate"===a.type)returnr({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});vars={mediaSeconds:n},o=function(e,t){if(!t.dateTimeObject)returnnull;vari=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);returnnewDate(t.dateTimeObject.getTime()+1e3*n)}(n,a.segment);returno&&(s.programDateTime=o.toISOString()),r(null,s)},Ja=functione(t){vari=t.programTime,n=t.playlist,r=t.retryCount,a=void0===r?2:r,s=t.seekTo,o=t.pauseAfterSeek,u=void0===o||o,l=t.tech,c=t.callback;if(!c)thrownewError("seekToProgramTime: callback must be provided");if("undefined"===typeofi||!n||!s)returnc({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!l.hasStarted_)returnc({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(vart=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(n))returnc({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});vard=function(e,t){vari=void0;try{i=newDate(e)}catch(l){returnnull}if(!t||!t.segments||0===t.segments.length)returnnull;varn=t.segments[0];if(i<n.dateTimeObject)returnnull;for(varr=0;r<t.segments.length-1&&(n=t.segments[r],!(i<t.segments[r+1].dateTimeObject));r++);vara,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;returni>newDate(o.getTime()+1e3*u)?null:(i>o&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:Na.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(i,n);if(!d)returnc({message:i+" was not found in the stream"});varh=d.segment,p=function(e,t){vari=void0,n=void0;try{i=newDate(e),n=newDate(t)}catch(a){}varr=i.getTime();return(n.getTime()-r)/1e3}(h.dateTimeObject,i);if("estimate"===d.type)return0===a?c({message:i+" is not buffered yet. Try again"}):(s(d.estimatedStart+p),voidl.one("seeked",function(){e({programTime:i,playlist:n,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})}));varf=h.start+p;l.one("seeked",function(){returnc(null,l.currentTime())}),u&&l.pause(),s(f)},Za=function(e,t){vari=[],n=void0;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);returnra.createTimeRanges(i)},es=function(e,t){returnZa(e,function(e,i){returne-1/30<=t&&i+1/30>=t})},ts=function(e,t){returnZa(e,function(e){returne-1/30>=t})},is=function(e){vart=[];if(!e||!e.length)return"";for(vari=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));returnt.join(", ")},ns=function(e){for(vart=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});returnt},rs=function(e,t,i){varn=void0,r=void0;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime<=t&&r.endTime>=e&&i.removeCue(r)},as=function(e){returnisNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e},ss=function(e,t,i){varn=r.a.WebKitDataCue||r.a.VTTCue;if(t&&t.forEach(function(e){vart=e.stream;this.inbandTextTracks_[t].addCue(newn(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},e),i){vara=as(e.mediaSource_.duration);if(i.forEach(function(e){vart=e.cueTime+this.timestampOffset;!("number"!==typeoft||r.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach(function(e){vari=newn(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){returnra.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){returnra.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){returnra.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(i),this.metadataTrack_.addCue(i)},this)},e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(vars=e.metadataTrack_.cues,o=[],u=0;u<s.length;u++)s[u]&&o.push(s[u]);varl=o.reduce(function(e,t){vari=e[t.startTime]||[];returni.push(t),e[t.startTime]=i,e},{}),c=Object.keys(l).sort(function(e,t){returnNumber(e)-Number(t)});c.forEach(function(e,t){vari=l[e],n=Number(c[t+1])||a;i.forEach(function(e){e.endTime=n})})}}},os="undefined"!==typeofwindow?window:{},us="undefined"===typeofSymbol?"__target":Symbol(),ls="application/javascript",cs=os.BlobBuilder||os.WebKitBlobBuilder||os.MozBlobBuilder||os.MSBlobBuilder,ds=os.URL||os.webkitURL||ds&&ds.msURL,hs=os.Worker;functionps(e,t){returnfunction(i){varn=this;if(!t)returnnewhs(e);if(hs&&!i){varr=ys(t.toString().replace(/^function.+?{/,"").slice(0,-1));returnthis[us]=newhs(r),function(e,t){if(!e||!t)return;vari=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&ds.revokeObjectURL(e.objURL),i.call(e)}}(this[us],r),this[us]}vara={postMessage:function(e){n.onmessage&&setTimeout(function(){n.onmessage({data:e,target:a})})}};t.call(a),this.postMessage=function(e){setTimeout(function(){a.onmessage({data:e,target:n})})},this.isThisThread=!0}}if(hs){varfs,ms=ys("self.onmessage = function () {}"),gs=newUint8Array(1);try{(fs=newhs(ms)).postMessage(gs,[gs.buffer])}catch(Fo){hs=null}finally{ds.revokeObjectURL(ms),fs&&fs.terminate()}}functionys(e){try{returnds.createObjectURL(newBlob([e],{type:ls}))}catch(Fo){vart=newcs;returnt.append(e),ds.createObjectURL(t.getBlob(type))}}varvs=newps("./transmuxer-worker.worker.js",function(e,t){vari=this;!function(){vare,t,n,r,a,s,o,u,l,c,d,h,p,f,m,g,y,v,_,b,T,S,k,w,C,E,A,P,L,x,I,O,U,D,R,M,B=Math.pow(2,32)-1;!function(){vare;if(k={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"!==typeofUint8Array){for(eink)k.hasOwnProperty(e)&&(k[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);w=newUint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=newUint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=newUint8Array([0,0,0,1]),A=newUint8Array([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]),P=newUint8Array([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]),L={video:A,audio:P},O=newUint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),I=newUint8Array([0,0,0,0,0,0,0,0]),U=newUint8Array([0,0,0,0,0,0,0,0]),D=U,R=newUint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=U,x=newUint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(e){vart,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=newUint8Array(r+8),newDataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;returni},t=function(){returne(k.dinf,e(k.dref,O))},n=function(t){returne(k.esds,newUint8Array([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]))},r=function(){returne(k.ftyp,w,C,w,E)},g=function(t){returne(k.hdlr,L[t])},a=function(t){returne(k.mdat,t)},m=function(t){vari=newUint8Array([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]);returnt.samplerate&&(i[12]=t.samplerate>>>24&255,i[13]=t.samplerate>>>16&255,i[14]=t.samplerate>>>8&255,i[15]=255&t.samplerate),e(k.mdhd,i)},f=function(t){returne(k.mdia,m(t),g(t.type),o(t))},s=function(t){returne(k.mfhd,newUint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},o=function(i){returne(k.minf,"video"===i.type?e(k.vmhd,x):e(k.smhd,I),t(),v(i))},u=function(t,i){for(varn=[],r=i.length;r--;)n[r]=b(i[r]);returne.apply(null,[k.moof,s(t)].concat(n))},l=function(t){for(vari=t.length,n=[];i--;)n[i]=h(t[i]);returne.apply(null,[k.moov,d(4294967295)].concat(n).concat(c(t)))},c=function(t){for(vari=t.length,n=[];i--;)n[i]=T(t[i]);returne.apply(null,[k.mvex].concat(n))},d=function(t){vari=newUint8Array([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]);returne(k.mvhd,i)},y=function(t){vari,n,r=t.samples||[],a=newUint8Array(4+r.length);for(n=0;n<r.length;n++)i=r[n].flags,a[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;returne(k.sdtp,a)},v=function(t){returne(k.stbl,_(t),e(k.stts,M),e(k.stsc,D),e(k.stsz,R),e(k.stco,U))},function(){vart,i;_=function(n){returne(k.stsd,newUint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?t(n):i(n))},t=function(t){vari,n=t.sps||[],r=t.pps||[],a=[],s=[];for(i=0;i<n.length;i++)a.push((65280&n[i].byteLength)>>>8),a.push(255&n[i].byteLength),a=a.concat(Array.prototype.slice.call(n[i]));for(i=0;i<r.length;i++)s.push((65280&r[i].byteLength)>>>8),s.push(255&r[i].byteLength),s=s.concat(Array.prototype.slice.call(r[i]));returne(k.avc1,newUint8Array([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(k.avcC,newUint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([n.length]).concat(a).concat([r.length]).concat(s))),e(k.btrt,newUint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},i=function(t){returne(k.mp4a,newUint8Array([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]),n(t))}}(),p=function(t){vari=newUint8Array([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]);returne(k.tkhd,i)},b=function(t){vari,n,r,a,s,o;returni=e(k.tfhd,newUint8Array([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/(B+1)),o=Math.floor(t.baseMediaDecodeTime%(B+1)),n=e(k.tfdt,newUint8Array([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=S(t,92),e(k.traf,i,n,r)):(a=y(t),r=S(t,a.length+92),e(k.traf,i,n,r,a))},h=function(t){returnt.duration=t.duration||4294967295,e(k.trak,p(t),f(t))},T=function(t){vari=newUint8Array([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&&(i[i.length-1]=0),e(k.trex,i)},function(){vart,i,n;n=function(e,t){vari=0,n=0,r=0,a=0;returne.length&&(void0!==e[0].duration&&(i=1),void0!==e[0].size&&(n=2),void0!==e[0].flags&&(r=4),void0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},i=function(t,i){varr,a,s,o;for(i+=20+16*(a=t.samples||[]).length,r=n(a,i),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);returne(k.trun,newUint8Array(r))},t=function(t,i){varr,a,s,o;for(i+=20+8*(a=t.samples||[]).length,r=n(a,i),o=0;o<a.length;o++)s=a[o],r=r.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);returne(k.trun,newUint8Array(r))},S=function(e,n){return"audio"===e.type?t(e,n):i(e,n)}}();varN,j,F,V,H,q={ftyp:r,mdat:a,moof:u,moov:l,initSegment:function(e){vart,i=r(),n=l(e);return(t=newUint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}},z=function(e){returne>>>0};F=function(e){returnN(e,["moov","trak"]).reduce(function(e,t){vari,n,r,a,s;return(i=N(t,["tkhd"])[0])?(n=i[0],a=z(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=N(t,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,e[a]=z(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null},{})},V=function(e,t){vari,n,r;returni=N(t,["moof","traf"]),n=[].concat.apply([],i.map(function(t){returnN(t,["tfhd"]).map(function(i){varn,r;returnn=z(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),r=e[n]||9e4,(N(t,["tfdt"]).map(function(e){vart,i;returnt=e[0],i=z(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=z(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0]||1/0)/r})})),r=Math.min.apply(null,n),isFinite(r)?r:0},H=function(e){vart=N(e,["moov","trak"]),i=[];returnt.forEach(function(e){vart=N(e,["mdia","hdlr"]),n=N(e,["tkhd"]);t.forEach(function(e,t){varr,a,s=j(e.subarray(8,12)),o=n[t];"vide"===s&&(a=0===(r=newDataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),i.push(a))})}),i};varW={findBox:N=function(e,t){vari,n,r,a,s,o=[];if(!t.length)returnnull;for(i=0;i<e.byteLength;)n=z(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),r=j(e.subarray(i+4,i+8)),a=n>1?i+n:e.byteLength,r===t[0]&&(1===t.length?o.push(e.subarray(i+8,a)):(s=N(e.subarray(i+8,a),t.slice(1))).length&&(o=o.concat(s))),i=a;returno},parseType:j=function(e){vart="";returnt+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},timescale:F,startTime:V,videoTrackIds:H},G=function(){this.init=function(){vare={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){varn;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){vari,n,r,a;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(a=[],n=arguments.length,n=1;n<arguments.length;++n)a.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,a)}},this.dispose=function(){e={}}}};G.prototype.pipe=function(e){returnthis.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},G.prototype.push=function(e){this.trigger("data",e)},G.prototype.flush=function(e){this.trigger("done",e)};var$,X,K,Y,Q,J,Z,ee=G,te=function(e,t){vari={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};returni.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie=function(e){vart,i,n=[],r=[];for(n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));returnr.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},ne=function(e){vart,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.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++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));returnr.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},re=function(e){vart;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},ae=function(e,t){vari,n,r,a,s,o=t||0,u=[];for(i=0;i<e.length;i++)for(a=e[i],n=0;n<a.length;n++)s=a[n],o+=(r=te(s,o)).size,u.push(r);returnu},se=function(e){vart,i,n,r,a,s,o=0,u=e.byteLength,l=e.nalCount,c=newUint8Array(u+4*l),d=newDataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;returnc},oe=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],le=function(e){for(vart=[];e--;)t.push(0);returnt},ce={96000:[oe,[227,64],le(154),[56]],88200:[oe,[231],le(170),[56]],64000:[oe,[248,192],le(240),[56]],48000:[oe,[255,192],le(268),[55,148,128],le(54),[112]],44100:[oe,[255,192],le(268),[55,163,128],le(84),[112]],32000:[oe,[255,192],le(268),[55,234],le(226),[112]],24000:[oe,[255,192],le(268),[55,255,128],le(268),[111,112],le(126),[224]],16000:[oe,[255,192],le(268),[55,255,128],le(268),[111,255],le(269),[223,108],le(195),[1,192]],12000:[ue,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,253,128],le(259),[56]],11025:[ue,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,255,192],le(268),[55,175,128],le(108),[112]],8000:[ue,le(268),[3,121,16],le(47),[7]]},de=($=ce,Object.keys($).reduce(function(e,t){returne[t]=newUint8Array($[t].reduce(function(e,t){returne.concat(t)},[])),e},{}));J=function(e,t){returnX(Q(e,t))},Z=function(e,t){returnK(Y(e),t)};X=function(e){return9e4*e},K=function(e,t){returne*t},Y=function(e){returne/9e4},Q=function(e,t){returne/t};varhe=J,pe=Z,fe=function(e,t,i,n){varr,a,s,o,u=0,l=0,c=0;if(t.length&&(r=he(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(9e4/(e.samplerate/1024)),i&&n&&(u=r-Math.max(i,n),c=(l=Math.floor(u/a))*a),!(l<1||c>45e3))){for((s=de[e.samplerate])||(s=t[0].data),o=0;o<l;o++)t.splice(o,0,{data:s});e.baseMediaDecodeTime-=Math.floor(pe(c,e.samplerate))}},me=function(e,t,i){returnt.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){returne.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},ge=function(e){vart,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});returnn},ye=function(e){vart,i,n=0,r=newUint8Array(function(e){vart,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;returni}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;returnr},ve=function(e){deletee.minSegmentDts,deletee.maxSegmentDts,deletee.minSegmentPts,deletee.maxSegmentPts},_e=function(e,t){vari,n=e.minSegmentDts;returnt||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/9e4,i=Math.floor(i)),i},be=function(e,t){"number"===typeoft.pts&&(void0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeoft.dts&&(void0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Te=function(e){for(vart=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}t+=r,n=0,r=0}returni},Se=function(e){return181!==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)},ke=function(e,t){vari,n,r,a,s=[];if(!(64&t[0]))returns;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));returns},we=function(e){for(vart,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)returne;t=n-r.length,i=newUint8Array(t);vars=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];returni},Ce=4,Ee=functione(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[newIe(0,0),newIe(0,1),newIe(1,0),newIe(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)};(Ee.prototype=newee).push=function(e){vart,i,n;if("sei_rbsp"===e.nalUnitType&&(t=Te(e.escapedRBSP)).payloadType===Ce&&(i=Se(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)returnthis.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=ke(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Ee.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){returne.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)},Ee.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},Ee.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null: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)},Ee.prototype.setsChannel1Active=function(e){return4096===(30720&e.ccData)},Ee.prototype.setsChannel2Active=function(e){return6144===(30720&e.ccData)},Ee.prototype.setsTextOrXDSActive=function(e){return256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)};varAe={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},Pe=function(e){returnnull===e?"":(e=Ae[e]||e,String.fromCharCode(e))},Le=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],xe=function(){for(vare=[],t=15;t--;)e.push("");returne},Ie=functione(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){vart,i,n,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";elseif(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;elseif(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);elseif(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);elseif(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);elseif(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;elseif(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);elseif(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=xe();elseif(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=xe();elseif(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=xe()),this.mode_="paintOn",this.startPts_=e.pts;elseif(this.isSpecialCharacter(n,r))a=Pe((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;elseif(this.isExtCharacter(n,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=Pe((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;elseif(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&r)&&this.addFormatting(e.pts,["i"]),1===(1&r)&&this.addFormatting(e.pts,["u"]);elseif(this.isOffsetControlCode(n,r))this.column_+=3&r;elseif(this.isPAC(n,r)){vars=Le.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"])}elsethis.isNormalChar(n)&&(0===r&&(r=null),a=Pe(n),a+=Pe(r),this[this.mode_](e.pts,a),this.column_+=a.length)}elsethis.lastControlCode_=null}};Ie.prototype=newee,Ie.prototype.flushDisplayed=function(e){vart=this.displayed_.map(function(e){try{returne.trim()}catch(Fo){returnconsole.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_})},Ie.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=xe(),this.nonDisplayed_=xe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ie.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_},Ie.prototype.isSpecialCharacter=function(e,t){returne===this.EXT_&&t>=48&&t<=63},Ie.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ie.prototype.isMidRowCode=function(e,t){returne===this.EXT_&&t>=32&&t<=47},Ie.prototype.isOffsetControlCode=function(e,t){returne===this.OFFSET_&&t>=33&&t<=35},Ie.prototype.isPAC=function(e,t){returne>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ie.prototype.isColorPAC=function(e){returne>=64&&e<=79||e>=96&&e<=127},Ie.prototype.isNormalChar=function(e){returne>=32&&e<=127},Ie.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=xe(),this.displayed_=xe()),void0!==t&&t!==this.row_)for(vari=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ie.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);vari=t.reduce(function(e,t){returne+"<"+t+">"},"");this[this.mode_](e,i)},Ie.prototype.clearFormatting=function(e){if(this.formatting_.length){vart=this.formatting_.reverse().reduce(function(e,t){returne+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},Ie.prototype.popOn=function(e,t){vari=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ie.prototype.rollUp=function(e,t){vari=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ie.prototype.shiftRowsUp_=function(){vare;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_]=""},Ie.prototype.paintOn=function(e,t){vari=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};varOe={CaptionStream:Ee,Cea608Stream:Ie},Ue={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},De=function(e,t){vari=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;returne},Re=functione(t){vari,n;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void0===n&&(n=e.dts),e.dts=De(e.dts,n),e.pts=De(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){n=void0,i=void0}};Re.prototype=newee;varMe,Be=Re,Ne=function(e,t,i){varn,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);returnr},je=function(e,t,i){returndecodeURIComponent(Ne(e,t,i))},Fe=function(e){returne[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ve={TXXX:function(e){vart;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=je(e.data,1,t),e.value=je(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){vart;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=je(e.data,1,t),e.url=je(e.data,t+1,e.data.length);break}},PRIV:function(e){vart,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(Ne(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Me=function(e){vart,i={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},n=0,r=[],a=0;if(Me.prototype.init.call(this),this.dispatchType=Ue.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){vart,s,o,u,l;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)))i.debug&&console.log("Skipping unrecognized metadata packet");elseif(r.push(e),a+=e.data.byteLength,1===r.length&&(n=Fe(e.data.subarray(6,10)),n+=10),!(a<n)){for(t={data:newUint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<n;)t.data.set(r[0].data.subarray(0,n-l),l),l+=r[0].data.byteLength,a-=r[0].data.byteLength,r.shift();s=10,64&t.data[5]&&(s+=4,s+=Fe(t.data.subarray(10,14)),n-=Fe(t.data.subarray(16,20)));do{if((o=Fe(t.data.subarray(s+4,s+8)))<1)returnconsole.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={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=u.id,Ve[u.id]&&(Ve[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){varc=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void0===t.pts&&void0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),s+=10,s+=o}while(s<n);this.trigger("data",t)}}}).prototype=newee;varHe,qe,ze,We=Me,Ge=Be;(He=function(){vare=newUint8Array(188),t=0;He.prototype.init.call(this),this.push=function(i){varn,r=0,a=188;for(t?((n=newUint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;a<n.byteLength;)71!==n[r]||71!==n[a]?(r++,a++):(this.trigger("data",n.subarray(r,a)),r+=188,a+=188);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=newee,(qe=function(){vare,t,i,n;qe.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void0,e=function(e,n){varr=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){vari,r;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){vara=e[r],s=(31&e[r+1])<<8|e[r+2];a===Ue.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=s:a===Ue.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=s:a===Ue.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=n.programMapTable}},this.push=function(t){vari={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);elseif(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());elsevoid0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Ue.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Ue.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=newee,qe.STREAM_TYPES={h264:27,adts:15},(ze=function(){vare=this,t={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(t,i,n){varr,a,s=newUint8Array(t.size),o={type:i},u=0,l=0;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,u=0;u<t.data.length;u++)a=t.data[u],s.set(a.data,l),l+=a.data.byteLength;!function(e,t){vari;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])}(s,o),r="video"===i||o.packetLength<=t.size,(n||r)&&(t.size=0,t.data.length=0),r&&e.trigger("data",o)}};ze.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){vare,s;switch(a.streamType){caseUe.H264_STREAM_TYPE:caseUe.H264_STREAM_TYPE:e=t,s="video";break;caseUe.ADTS_STREAM_TYPE:e=i,s="audio";break;caseUe.METADATA_STREAM_TYPE:e=n,s="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&r(e,s,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){vart={type:"metadata",tracks:[]},i=a.programMapTable;null!==i.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.video,codec:"avc",type:"video"}),null!==i.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+i.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[a.type]()},this.flush=function(){r(t,"video"),r(i,"audio"),r(n,"timed-metadata"),this.trigger("done")}}).prototype=newee;var$e={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:He,TransportParseStream:qe,ElementaryStream:ze,TimestampRolloverStream:Ge,CaptionStream:Oe.CaptionStream,Cea608Stream:Oe.Cea608Stream,MetadataStream:We};for(varXeinUe)Ue.hasOwnProperty(Xe)&&($e[Xe]=Ue[Xe]);varKe,Ye=$e,Qe=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Ke=function(){vare;Ke.prototype.init.call(this),this.push=function(t){vari,n,r,a,s,o,u=0,l=0;if("audio"===t.type)for(e?(a=e,(e=newUint8Array(a.byteLength+t.data.byteLength)).set(a),e.set(t.data,a.byteLength)):e=t.data;u+5<e.length;)if(255===e[u]&&240===(246&e[u+1])){if(n=2*(1&~e[u+1]),i=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,o=9e4*(s=1024*(1+(3&e[u+6])))/Qe[(60&e[u+2])>>>2],r=u+i,e.byteLength<r)return;if(this.trigger("data",{pts:t.pts+l*o,dts:t.dts+l*o,sampleCount:s,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:Qe[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+n,r)}),e.byteLength===r)returnvoid(e=void0);l++,e=e.subarray(r)}elseu++},this.flush=function(){this.trigger("done")}}).prototype=newee;varJe,Ze,et,tt=Ke,it=function(e){vart=e.byteLength,i=0,n=0;this.length=function(){return8*t},this.bitsAvailable=function(){return8*t+n},this.loadWord=function(){varr=e.byteLength-t,a=newUint8Array(4),s=Math.min(4,t);if(0===s)thrownewError("no bytes available");a.set(e.subarray(r,r+s)),i=newDataView(a.buffer).getUint32(0),n=8*s,t-=s},this.skipBits=function(e){varr;n>e?(i<<=e,n-=e):(e-=n,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){varr=Math.min(n,e),a=i>>>32-r;return(n-=r)>0?i<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){vare;for(e=0;e<n;++e)if(0!==(i&2147483648>>>e))returni<<=e,n-=e,e;returnthis.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){vare=this.skipLeadingZeros();returnthis.readBits(e+1)-1},this.readExpGolomb=function(){vare=this.readUnsignedExpGolomb();return1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return1===this.readBits(1)},this.readUnsignedByte=function(){returnthis.readBits(8)},this.loadWord()};(Ze=function(){vare,t,i=0;Ze.prototype.init.call(this),this.push=function(n){varr;for(t?((r=newUint8Array(t.byteLength+n.data.byteLength)).set(t),r.set(n.data,t.byteLength),t=r):t=n.data;i<t.byteLength-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<t.byteLength;)switch(t[e]){case0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<t.length);i=e-2,e+=3;break;case1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")}}).prototype=newee,et={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Je=function(){vare,t,i,n,r,a,s,o=newZe;Je.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",function(s){varo={trackId:t,pts:i,dts:n,data:s};switch(31&s[0]){case5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(s.subarray(1));break;case7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(s.subarray(1)),o.config=a(o.escapedRBSP);break;case8:o.nalUnitType="pic_parameter_set_rbsp";break;case9: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){vari,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},r=function(e){for(vart,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)returne;t=n-r.length,i=newUint8Array(t);vars=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];returni},a=function(e){vart,i,n,r,a,o,u,l,c,d,h,p,f,m=0,g=0,y=0,v=0,_=1;if(i=(t=newit(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),et[i]&&(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();elseif(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),f=0;f<u;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case1:p=[1,1];break;case2:p=[12,11];break;case3:p=[10,11];break;case4:p=[16,11];break;case5:p=[40,33];break;case6:p=[24,11];break;case7:p=[20,11];break;case8:p=[32,11];break;case9:p=[80,33];break;case10:p=[18,11];break;case11:p=[15,11];break;case12:p=[64,33];break;case13:p=[160,99];break;case14:p=[4,3];break;case15:p=[3,2];break;case16:p=[2,1];break;case255:p=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}p&&(_=p[0]/p[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(l+1)-2*m-2*g)*_),height:(2-d)*(c+1)*16-2*y-2*v}}}).prototype=newee;varnt,rt={H264Stream:Je,NalByteStream:Ze},at=function(e){returne[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},st=function(e,t){vari=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?i+20:i+10},ot=function(e,t){vari=(224&e[t+5])>>5,n=e[t+4]<<3;return6144&e[t+3]|n|i};(nt=function(){vare=newUint8Array,t=0;nt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){varn,r,a,s,o=0,u=0;for(e.length?(s=e.length,(e=newUint8Array(i.byteLength+s)).set(e.subarray(0,s)),e.set(i,s)):e=i;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!==(255&e[u])||240!==(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(o=ot(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=st(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",r),u+=o}n=e.length-u,e=n>0?e.subarray(u):newUint8Array}}).prototype=newee;varut,lt,ct,dt,ht=nt,pt=rt.H264Stream,ft=at,mt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],gt=["width","height","profileIdc","levelIdc","profileCompatibility"],yt=function(e,t){vari;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},vt=function(e,t,i,n,r,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:a,baseMediaDecodeTime:e}};(lt=function(e,t){vari=[],n=0,r=0,a=0,s=1/0;t=t||{},lt.prototype.init.call(this),this.push=function(t){be(e,t),e&&mt.forEach(function(i){e[i]=t[i]}),i.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(){varo,u,l,c;0!==i.length?(o=me(i,e,r),e.baseMediaDecodeTime=_e(e,t.keepOriginalTimestamps),fe(e,o,a,s),e.samples=ge(o),l=q.mdat(ye(o)),i=[],u=q.moof(n,[e]),c=newUint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),ve(e),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=newee,(ut=function(e,t){vari,n,r=0,a=[],s=[];t=t||{},ut.prototype.init.call(this),deletee.minPTS,this.gopCache_=[],this.push=function(t){be(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],gt.forEach(function(t){e[t]=i[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(vari,n,o,u,l,c,d,h,p=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)returnthis.resetStream_(),voidthis.trigger("done","VideoSegmentStream");if(i=ie(a),(o=ne(i))[0][0].keyFrame||((n=this.getGopForFusion_(a[0],e))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=re(o)),s.length){varf;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))returnthis.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),voidthis.trigger("done","VideoSegmentStream");ve(e),o=f}be(e,o),e.samples=ae(o),l=q.mdat(se(o)),e.baseMediaDecodeTime=_e(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",vt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,p)),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),u=q.moof(r,[e]),c=newUint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){ve(e),i=void0,n=void0},this.getGopForFusion_=function(t){vari,n,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&yt(e.pps[0],a.pps[0])&&e.sps&&yt(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=a,o=i));returnn?n.gop:null},this.alignGopsAtStart_=function(e){vart,i,n,r,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=i=0;t<s.length&&i<e.length&&(n=s[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,a-=r.byteLength,o-=r.nalCount,u-=r.duration);return0===i?e:i===e.length?null:((l=e.slice(i)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){vart,i,n,r,a,o,u;for(t=s.length-1,i=e.length-1,a=null,o=!1;t>=0&&i>=0;){if(n=s[t],r=e[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?t--:(t===s.length-1&&(a=i),i--)}if(!o&&null===a)returnnull;if(0===(u=o?i:a))returne;varl=e.slice(u),c=l.reduce(function(e,t){returne.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});returnl.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}}).prototype=newee,(dt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeofe.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,dt.prototype.init.call(this),this.push=function(e){returne.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=newee,dt.prototype.flush=function(e){vart,i,n,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)returnthis.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,gt.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,mt.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=q.initSegment(this.pendingTracks),s.initSegment=newUint8Array(n.byteLength),s.initSegment.set(n),s.data=newUint8Array(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++)(i=this.pendingMetadata[r]).cueTime=i.pts,this.keepOriginalTimestamps||(i.cueTime-=o),i.cueTime/=9e4,s.metadata.push(i);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)},(ct=function(e){vart,i,n=this,r=!0;ct.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){vart={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=newYe.MetadataStream,t.aacStream=newht,t.audioTimestampRolloverStream=newYe.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=newYe.TimestampRolloverStream("timed-metadata"),t.adtsStream=newtt,t.coalesceStream=newdt(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||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=newlt(i,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(){varr={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=newYe.MetadataStream,r.packetStream=newYe.TransportPacketStream,r.parseStream=newYe.TransportParseStream,r.elementaryStream=newYe.ElementaryStream,r.videoTimestampRolloverStream=newYe.TimestampRolloverStream("video"),r.audioTimestampRolloverStream=newYe.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=newYe.TimestampRolloverStream("timed-metadata"),r.adtsStream=newtt,r.h264Stream=newpt,r.captionStream=newYe.CaptionStream,r.coalesceStream=newdt(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){vars;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?i||"audio"!==a.tracks[s].type||((i=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=newut(t,e),r.videoSegmentStream.on("timelineStartInfo",function(e){i&&(i.timelineStartInfo=e,r.audioSegmentStream.setEarliestDts(e.dts))}),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",function(e){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=newlt(i,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(n){varr=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void0,i.timelineStartInfo.pts=void0,ve(i),e.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void0,t.timelineStartInfo.pts=void0,ve(t),r.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=n)),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(r){vart=ft(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=newee;var_t,bt,Tt={Transmuxer:ct,VideoSegmentStream:ut,AudioSegmentStream:lt,AUDIO_PROPERTIES:mt,VIDEO_PROPERTIES:gt,generateVideoSegmentTimingInfo:vt},St=W.parseType,kt=function(e){returnnewDate(1e3*e-20828448e5)},wt=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]}},Ct=function(e){vart,i,n=newDataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");elseswitch(31&e[t]){case1:r.push("slice_layer_without_partitioning_rbsp");break;case5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case6:r.push("sei_rbsp");break;case7:r.push("seq_parameter_set_rbsp");break;case8:r.push("pic_parameter_set_rbsp");break;case9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}returnr},Et={avc1:function(e){vart=newDataView(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:_t(e.subarray(78,e.byteLength))}},avcC:function(e){vart,i,n,r,a=newDataView(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(n=6,r=0;r<o;r++)i=a.getUint16(n),n+=2,s.sps.push(newUint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,r=0;r<t;r++)i=a.getUint16(n),n+=2,s.pps.push(newUint8Array(e.subarray(n,n+i))),n+=i;returns},btrt:function(e){vart=newDataView(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:newUint8Array(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(vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:St(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(St(e.subarray(n,n+4))),n+=4;returni},dinf:function(e){return{boxes:_t(e)}},dref:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),dataReferences:_t(e.subarray(8))}},hdlr:function(e){vart={version:newDataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:newUint8Array(e.subarray(1,4)),handlerType:St(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}returnt.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:Ct(e)}},mdhd:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:i.getUint8(0),flags:newUint8Array(e.subarray(1,4)),language:""};return1===r.version?(n+=4,r.creationTime=kt(i.getUint32(n)),n+=8,r.modificationTime=kt(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8,r.duration=i.getUint32(n)):(r.creationTime=kt(i.getUint32(n)),n+=4,r.modificationTime=kt(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4,r.duration=i.getUint32(n)),n+=4,t=i.getUint16(n),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:_t(e)}},mfhd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:_t(e)}},mp4a:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};returne.byteLength>28&&(i.streamDescriptor=_t(e.subarray(28))[0]),i},moof:function(e){return{boxes:_t(e)}},moov:function(e){return{boxes:_t(e)}},mvex:function(e){return{boxes:_t(e)}},mvhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4))};return1===n.version?(i+=4,n.creationTime=kt(t.getUint32(i)),i+=8,n.modificationTime=kt(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8,n.duration=t.getUint32(i)):(n.creationTime=kt(t.getUint32(i)),i+=4,n.modificationTime=kt(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4,n.duration=t.getUint32(i)),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=newUint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){vart,i={version:e[0],flags:newUint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});returni},sidx:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(t=24;r;t+=12,r--)n.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&i.getUint32(t),subsegmentDuration:i.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&i.getUint32(t+8)});returnn},smhd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:_t(e)}},stco:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(t=8;r;t+=4,r--)n.chunkOffsets.push(i.getUint32(t));returnn},stsc:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),r={version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;t+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});returnr},stsd:function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleDescriptions:_t(e.subarray(8))}},stsz:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));returnn},stts:function(e){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(t=8;r;t+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});returnn},styp:function(e){returnEt.ftyp(e)},tfdt:function(e){vart={version:e[0],flags:newUint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return1===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){vart,i=newDataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:newUint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];returnt=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),u&&(n.defaultSampleFlags=i.getUint32(t)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:newUint8Array(e.subarray(1,4))};return1===n.version?(i+=4,n.creationTime=kt(t.getUint32(i)),i+=8,n.modificationTime=kt(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8,n.duration=t.getUint32(i)):(n.creationTime=kt(t.getUint32(i)),i+=4,n.modificationTime=kt(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4,n.duration=t.getUint32(i)),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=newUint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/16,n},traf:function(e){return{boxes:_t(e)}},trak:function(e){return{boxes:_t(e)}},trex:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:newUint8Array(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){vart,i={version:e[0],flags:newUint8Array(e.subarray(1,4)),samples:[]},n=newDataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:wt(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=wt(e.subarray(d,d+4)),d+=4),l&&(t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);returni},"url ":function(e){return{version:e[0],flags:newUint8Array(e.subarray(1,4))}},vmhd:function(e){vart=newDataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:newUint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:newUint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},At={inspect:_t=function(e){for(vart,i,n,r,a,s=0,o=[],u=newArrayBuffer(e.length),l=newUint8Array(u),c=0;c<e.length;++c)l[c]=e[c];for(t=newDataView(u);s<e.byteLength;)i=t.getUint32(s),n=St(e.subarray(s+4,s+8)),r=i>1?s+i:e.byteLength,(a=(Et[n]||function(e){return{data:e}})(e.subarray(s+8,r))).size=i,a.type=n,o.push(a),s=r;returno},textify:bt=function(e,t){vari;returnt=t||0,i=newArray(2*t+1).join(" "),e.map(function(e,n){returni+e.type+"\n"+Object.keys(e).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(t){varn=i+" "+t+": ",r=e[t];if(rinstanceofUint8Array||rinstanceofUint32Array){vara=Array.prototype.slice.call(newUint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);returna?1===a.length?n+"<"+a.join("").slice(1)+">":n+"<\n"+a.map(function(e){returni+" "+e}).join("\n")+"\n"+i+" >":n+"<>"}returnn+JSON.stringify(r,null,2).split("\n").map(function(e,t){return0===t?e:i+" "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+bt(e.boxes,t+1):"")}).join("\n")},parseTfdt:Et.tfdt,parseHdlr:Et.hdlr,parseTfhd:Et.tfhd,parseTrun:Et.trun,parseSidx:Et.sidx},Pt=we,Lt=Oe.CaptionStream,xt=function(e,t){for(vari=e,n=0;n<t.length;n++){varr=t[n];if(i<r.size)returnr;i-=r.size}returnnull},It=function(e,t){vari=W.findBox(e,["moof","traf"]),n=W.findBox(e,["mdat"]),r={},a=[];returnn.forEach(function(e,t){varn=i[t];a.push({mdat:e,traf:n})}),a.forEach(function(e){vari,n=e.mdat,a=e.traf,s=W.findBox(a,["tfhd"]),o=At.parseTfhd(s[0]),u=o.trackId,l=W.findBox(a,["tfdt"]),c=l.length>0?At.parseTfdt(l[0]).baseMediaDecodeTime:0,d=W.findBox(a,["trun"]);t===u&&d.length>0&&(i=function(e,t,i){varn,r,a,s,o=newDataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case6:varl=e.subarray(r+1,r+1+a),c=xt(r,t);n={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Pt(l),trackId:i},c?(n.pts=c.pts,n.dts=c.dts,s=c):(n.pts=s.pts,n.dts=s.dts),u.push(n)}returnu}(n,function(e,t,i){varn=t,r=i.defaultSampleDuration||0,a=i.defaultSampleSize||0,s=i.trackId,o=[];returne.forEach(function(e){vart=At.parseTrun(e).samples;t.forEach(function(e){void0===e.duration&&(e.duration=r),void0===e.size&&(e.size=a),e.trackId=s,e.dts=n,void0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=n+e.compositionTimeOffset,n+=e.duration}),o=o.concat(t)}),o}(d,c,o),u),r[u]||(r[u]=[]),r[u]=r[u].concat(i))}),r},Ot={generator:q,probe:W,Transmuxer:Tt.Transmuxer,AudioSegmentStream:Tt.AudioSegmentStream,VideoSegmentStream:Tt.VideoSegmentStream,CaptionParser:function(){vare,t,i,n,r,a=!1;this.isInitialized=function(){returna},this.init=function(){e=newLt,a=!0,e.on("data",function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,r.captions.push(e),r.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeoft&&0===Object.keys(t).length)&&(i!==e[0]||n!==t[i])},this.parse=function(e,a,s){varo;if(!this.isInitialized())returnnull;if(!a||!s)returnnull;if(this.isNewInit(a,s))i=a[0],n=s[i];elseif(!i||!n)returnt.push(e),null;for(;t.length>0;){varu=t.shift();this.parse(u,a,s)}returnnull!==(o=function(e,t,i){returnt?{seiNals:It(e,t)[t],timescale:i}:null}(e,i,n))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)returnnull;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())returnnull;e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())returnnull;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},Ut=function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")},Dt=function(){functione(e,t){for(vari=0;i<t.length;i++){varn=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,i,n){returni&&e(t.prototype,i),n&&e(t,n),t}}(),Rt=function(){functione(t,i){Ut(this,e),this.options=i||{},this.self=t,this.init()}returnDt(e,[{key:"init",value:function(){vare,t;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=newOt.Transmuxer(this.options),e=this.self,(t=this.transmuxer).on("data",function(t){vari=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};varn=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.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})}),t.on("videoSegmentTimingInfo",function(t){e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})})}},{key:"push",value:function(e){vart=newUint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){vart=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}();newfunction(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=newRt(e,t.data.options):(this.messageHandlers||(this.messageHandlers=newRt(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(i)}()}),_s={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},bs=function(e){returne.map(function(e){returne.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})},Ts=function(){vare,t=arguments.length>0&&void0!==arguments[0]?arguments[0]:"",i={codecCount:0};returni.codecCount=t.split(",").length,i.codecCount=i.codecCount||2,(e=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t))&&(i.videoCodec=e[2],i.videoObjectTypeIndicator=e[3]),i.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t),i.audioProfile=i.audioProfile&&i.audioProfile[2],i},Ss=function(e,t,i){returne+"/"+t+'; codecs="'+i.filter(function(e){return!!e}).join(", ")+'"'},ks=function(e,t){vari=function(e){returne.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"}(t),n=function(e){vart=e.attributes||{};returnt.CODECS?Ts(t.CODECS):_s}(t),r=t.attributes||{},a=!0,s=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&r.AUDIO){varo=e.mediaGroups.AUDIO[r.AUDIO];if(o)for(varuins=!0,a=!1,o)if(!o[u].uri&&!o[u].playlists){a=!0;break}}s&&!n.audioProfile&&(a||(n.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)returnnull;vari=e.mediaGroups.AUDIO[t];if(!i)returnnull;for(varnini){varr=i[n];if(r.default&&r.playlists)returnTs(r.playlists[0].attributes.CODECS).audioProfile}returnnull}(e,r.AUDIO)),n.audioProfile||(ra.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),n.audioProfile=_s.audioProfile));varl={};n.videoCodec&&(l.video=""+n.videoCodec+n.videoObjectTypeIndicator),n.audioProfile&&(l.audio="mp4a.40."+n.audioProfile);varc=Ss("audio",i,[l.audio]),d=Ss("video",i,[l.video]),h=Ss("video",i,[l.video,l.audio]);returns?!a&&l.video?[d,c]:a||l.video?[h,c]:[c,c]:l.video?[h]:[c]},ws=function(e){return/mp4a\.\d+.\d+/i.test(e)},Cs=function(e){return/avc1\.[\da-f]+/i.test(e)},Es=function(e,t,i){if("undefined"===typeoft||null===t||!e.length)return[];varn=Math.ceil(9e4*(t-i+3)),r=void0;for(r=0;r<e.length&&!(e[r].pts>n);r++);returne.slice(r)},As=function(e,t,i){varn=null,r=null,a=0,s=[],o=[];if(!e&&!t)returnra.createTimeRange();if(!e)returnt.buffered;if(!t)returne.buffered;if(i)returne.buffered;if(0===e.buffered.length&&0===t.buffered.length)returnra.createTimeRange();for(varu=e.buffered,l=t.buffered,c=u.length;c--;)s.push({time:u.start(c),type:"start"}),s.push({time:u.end(c),type:"end"});for(c=l.length;c--;)s.push({time:l.start(c),type:"start"}),s.push({time:l.end(c),type:"end"});for(s.sort(function(e,t){returne.time-t.time}),c=0;c<s.length;c++)"start"===s[c].type?2===++a&&(n=s[c].time):"end"===s[c].type&&1===--a&&(r=s[c].time),null!==n&&null!==r&&(o.push([n,r]),n=null,r=null);returnra.createTimeRanges(o)},Ps=function(e){functiont(e,i){la(this,t);varn=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,ra.EventTarget));n.timestampOffset_=0,n.pendingBuffers_=[],n.bufferUpdating_=!1,n.mediaSource_=e,n.codecs_=i,n.audioCodec_=null,n.videoCodec_=null,n.audioDisabled_=!1,n.appendAudioInitSegment_=!0,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=ra.browser.IE_VERSION>=11;varr={remux:!1,alignGopsAtEnd:n.safeAppend_};returnn.codecs_.forEach(function(e){ws(e)?n.audioCodec_=e:Cs(e)&&(n.videoCodec_=e)}),n.transmuxer_=newvs,n.transmuxer_.postMessage({action:"init",options:r}),n.transmuxer_.onmessage=function(e){return"data"===e.data.action?n.data_(e):"done"===e.data.action?n.done_(e):"gopInfo"===e.data.action?n.appendGopInfo_(e):"videoSegmentTimingInfo"===e.data.action?n.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo):void0},Object.defineProperty(n,"timestampOffset",{get:function(){returnthis.timestampOffset_},set:function(e){"number"===typeofe&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(n,"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(n,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(n,"buffered",{get:function(){returnAs(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),n}returnda(t,e),ca(t,[{key:"data_",value:function(e){vart=e.data.segment;t.data=newUint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=newUint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,i){varn=t.player_;if(i.captions&&i.captions.length)for(varrine.inbandTextTracks_||(e.inbandTextTracks_={}),i.captionStreams)if(!e.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});vara=n.textTracks().getTrackById(r);e.inbandTextTracks_[r]=a||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}i.metadata&&i.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"videoSegmentTimingInfo_",value:function(e){vart={start:{decode:e.start.dts/9e4,presentation:e.start.pts/9e4},end:{decode:e.end.dts/9e4,presentation:e.end.pts/9e4},baseMediaDecodeTime:e.baseMediaDecodeTime/9e4};e.prependedContentDuration&&(t.prependedContentDuration=e.prependedContentDuration/9e4),this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){vare=this,t=["audio","video"];t.forEach(function(i){if(e[i+"Codec_"]&&!e[i+"Buffer_"]){varn=null;if(e.mediaSource_[i+"Buffer_"])(n=e.mediaSource_[i+"Buffer_"]).updating=!1;else{varr=i+'/mp4;codecs="'+e[i+"Codec_"]+'"';n=function(e,t){vari=e.addSourceBuffer(t),n=Object.create(null);n.updating=!1,n.realBuffer_=i;varr=function(e){"function"===typeofi[e]?n[e]=function(){returni[e].apply(i,arguments)}:"undefined"===typeofn[e]&&Object.defineProperty(n,e,{get:function(){returni[e]},set:function(t){returni[e]=t}})};for(varaini)r(a);returnn}(e.mediaSource_.nativeMediaSource_,r),e.mediaSource_[i+"Buffer_"]=n}e[i+"Buffer_"]=n,["update","updatestart","updateend"].forEach(function(r){n.addEventListener(r,function(){if("audio"!==i||!e.audioDisabled_)return"updateend"===r&&(e[i+"Buffer_"].updating=!1),t.every(function(t){return!("audio"!==t||!e.audioDisabled_)||(i===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating)})?e.trigger(r):void0})})}})}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){vart=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Es(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,i){if(!t.length)returne;if(i)returnt.slice();for(varn=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);returne.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,i,n){for(varr=Math.ceil(9e4*(t-n)),a=Math.ceil(9e4*(i-n)),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)returns;for(varu=o+1;u--&&!(e[u].pts<=r););returnu=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),rs(e,t,this.metadataTrack_),this.inbandTextTracks_)for(variinthis.inbandTextTracks_)rs(e,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){vare={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce(function(e,t){vari=t.type,n=t.data,r=t.initSegment;returne[i].segments.push(n),e[i].bytes+=n.byteLength,e[i].initSegment=r,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[i].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);vart=!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_)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),ss(this,e.captions,e.metadata),!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){vari=0,n=void0;if(e.bytes){n=newUint8Array(e.bytes),e.segments.forEach(function(e){n.set(e,i),i+=e.byteLength});try{t.updating=!0,t.appendBuffer(n)}catch(r){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:r.message,originalError:r})}}}},{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}(ra.EventTarget),Ls=function(e){functiont(){la(this,t);vare=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=void0;for(iine.nativeMediaSource_=newr.a.MediaSource,e.nativeMediaSource_)iint.prototype||"function"!==typeofe.nativeMediaSource_[i]||(e[i]=e.nativeMediaSource_[i].bind(e.nativeMediaSource_));returne.duration_=NaN,Object.defineProperty(e,"duration",{get:function(){returnthis.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(){returnthis.duration_===1/0?ra.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(e,"readyState",{get:function(){returnthis.nativeMediaSource_.readyState}}),Object.defineProperty(e,"activeSourceBuffers",{get:function(){returnthis.activeSourceBuffers_}}),e.sourceBuffers=[],e.activeSourceBuffers_=[],e.updateActiveSourceBuffers_=function(){if(e.activeSourceBuffers_.length=0,1===e.sourceBuffers.length){vart=e.sourceBuffers[0];returnt.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,voide.activeSourceBuffers_.push(t)}for(vari=!1,n=!0,r=0;r<e.player_.audioTracks().length;r++){vara=e.player_.audioTracks()[r];if(a.enabled&&"main"!==a.kind){i=!0,n=!1;break}}e.sourceBuffers.forEach(function(t,r){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=i;elseif(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,n=!1;elseif(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=r?n:!n,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){returne.timeMapping_=t.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},e),e.on("sourceopen",function(t){vari=s.a.querySelector('[src="'+e.url_+'"]');i&&(e.player_=ra(i.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(vari=as(e.duration),n=0;n<e.sourceBuffers.length;n++){varr=e.sourceBuffers[n],a=r.metadataTrack_&&r.metadataTrack_.cues;a&&a.length&&(a[a.length-1].endTime=i)}}),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}returnda(t,e),ca(t,[{key:"addSeekableRange_",value:function(e,t){vari=void0;if(this.duration!==1/0)throw(i=newError("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){vart=void0,i=function(e){vart={type:"",parameters:{}},i=e.trim().split(";");returnt.type=i.shift().trim(),i.forEach(function(e){vari=e.trim().split("=");if(i.length>1){varn=i[0].replace(/"/g,"").trim(),r=i[1].replace(/"/g,"").trim();t.parameters[n]=r}}),t}(e);if(/^(video|audio)\/mp2t$/i.test(i.type)){varn=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(n=bs(n)).filter(function(e){returnws(e)||Cs(e)})),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),t=newPs(this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}elset=this.nativeMediaSource_.addSourceBuffer(e);returnthis.sourceBuffers.push(t),t}}]),t}(ra.EventTarget),xs=0;ra.mediaSources={};varIs=function(e,t){vari=ra.mediaSources[e];if(!i)thrownewError("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:t})},Os=function(){return!!r.a.MediaSource&&!!r.a.MediaSource.isTypeSupported&&r.a.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},Us=function(){if(this.MediaSource={open:Is,supportsNativeMediaSources:Os},Os())returnnewLs;thrownewError("Cannot use create a virtual MediaSource for this video")};Us.open=Is,Us.supportsNativeMediaSources=Os;varDs={createObjectURL:function(e){vart=void0;returneinstanceofLs?(t=r.a.URL.createObjectURL(e.nativeMediaSource_),e.url_=t,t):einstanceofLs?(t="blob:vjs-media-source/"+xs,xs++,ra.mediaSources[t]=e,t):(t=r.a.URL.createObjectURL(e),e.url_=t,t)}};ra.MediaSource=Us,ra.URL=Ds;varRs=ra.EventTarget,Ms=ra.mergeOptions,Bs=function(e,t){for(vari=void0,n=Ms(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),r=0;r<t.playlists.length;r++){vara=va(n,t.playlists[r]);a?n=a:i=!0}returnya(t,function(e,t,r,a){if(e.playlists&&e.playlists.length){vars=e.playlists[0].uri,o=va(n,e.playlists[0]);o&&((n=o).mediaGroups[t][r][a].playlists[0]=n.playlists[s],i=!1)}}),i?null:n},Ns=function(e){vart=e.byterange.offset+e.byterange.length-1;returne.uri+"-"+e.byterange.offset+"-"+t},js=function(e,t){vari,n,r={};for(varaine){vars=e[a].sidx;if(s){varo=Ns(s);if(!t[o])break;varu=t[o].sidxInfo;i=u,n=s,(Boolean(!i.map&&!n.map)||Boolean(i.map&&n.map&&i.map.byterange.offset===n.map.byterange.offset&&i.map.byterange.length===n.map.byterange.length))&&i.uri===n.uri&&i.byterange.offset===n.byterange.offset&&i.byterange.length===n.byterange.length&&(r[o]=t[o])}}returnr},Fs=function(e,t,i,n,r){vara={uri:ua(n.handleManifestRedirects,e.resolvedUri),byterange:e.byterange,playlist:t};returni(ra.mergeOptions(a,{responseType:"arraybuffer",headers:Ha(a)}),r)},Vs=function(e){functiont(e,i){varn=arguments.length>2&&void0!==arguments[2]?arguments[2]:{},r=arguments[3];la(this,t);vara=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s=n.withCredentials,o=void0!==s&&s,u=n.handleManifestRedirects,l=void0!==u&&u;if(a.hls_=i,a.withCredentials=o,a.handleManifestRedirects=l,!e)thrownewError("A non-empty playlist URL or playlist is required");returna.on("minimumUpdatePeriod",function(){a.refreshXml_()}),a.on("mediaupdatetimeout",function(){a.refreshMedia_(a.media().uri)}),a.state="HAVE_NOTHING",a.loadedPlaylists_={},"string"===typeofe?(a.srcUrl=e,a.sidxMapping_={},ha(a)):(a.setupChildLoader(r,e),a)}returnda(t,Rs),ca(t,[{key:"setupChildLoader",value:function(e,t){this.masterPlaylistLoader_=e,this.childPlaylist_=t}},{key:"dispose",value:function(){this.stopRequest(),this.loadedPlaylists_={},r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),r.a.clearTimeout(this.mediaRequest_),r.a.clearTimeout(this.mediaUpdateTimeout)}},{key:"hasPendingRequest",value:function(){returnthis.request||this.mediaRequest_}},{key:"stopRequest",value:function(){if(this.request){vare=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"sidxRequestFinished_",value:function(e,t,i,n){varr=this;returnfunction(a,s){if(r.request){if(r.request=null,a)returnr.error={status:s.status,message:"DASH playlist request error at URL: "+e.uri,response:s.response,code:2},i&&(r.state=i),r.trigger("error"),n(t,null);varo=newUint8Array(s.response),u=L.a.parseSidx(o.subarray(8));returnn(t,u)}}}},{key:"media",value:function(e){vart=this;if(!e)returnthis.media_;if("HAVE_NOTHING"===this.state)thrownewError("Cannot switch media playlist from "+this.state);vari=this.state;if("string"===typeofe){if(!this.master.playlists[e])thrownewError("Unknown playlist URI: "+e);e=this.master.playlists[e]}varn=!this.media_||e.uri!==this.media_.uri;if(n&&this.loadedPlaylists_[e.uri]&&this.loadedPlaylists_[e.uri].endList)returnthis.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(n)if(this.media_&&this.trigger("mediachanging"),e.sidx){vara=void0,s=void0;this.masterPlaylistLoader_?(a=this.masterPlaylistLoader_.master,s=this.masterPlaylistLoader_.sidxMapping_):(a=this.master,s=this.sidxMapping_);varo=Ns(e.sidx);s[o]={sidxInfo:e.sidx},this.request=Fs(e.sidx,e,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(e,a,i,function(n,r){if(!n||!r)thrownewError("failed to request sidx");s[o].sidx=r,t.haveMetadata({startingState:i,playlist:n.playlists[e.uri]})}))}elsethis.mediaRequest_=r.a.setTimeout(this.haveMetadata.bind(this,{startingState:i,playlist:e}),0)}},{key:"haveMetadata",value:function(e){vart=e.startingState,i=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.uri]=i,this.mediaRequest_=null,this.refreshMedia_(i.uri),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")}},{key:"pause",value:function(){this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(e){vart=this;r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.minimumUpdatePeriodTimeout_);vari=this.media();if(e){varn=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout(function(){returnt.load()},n)}elsethis.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){vare=Object(A.a)(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});e.uri=this.srcUrl;for(vart=0;t<e.playlists.length;t++){vari="placeholder-uri-"+t;e.playlists[t].uri=i,e.playlists[i]=e.playlists[t]}returnya(e,function(t,i,n,r){if(t.playlists&&t.playlists.length){vara="placeholder-uri-"+i+"-"+n+"-"+r;t.playlists[0].uri=a,e.playlists[a]=t.playlists[0]}}),_a(e),ba(e),e}},{key:"start",value:function(){vare=this;this.started=!0,this.masterPlaylistLoader_?this.mediaRequest_=r.a.setTimeout(this.haveMaster_.bind(this),0):this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)returne.error={status:i.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?e.masterLoaded_=Date.parse(i.responseHeaders.date):e.masterLoaded_=Date.now(),e.srcUrl=ua(e.handleManifestRedirects,e.srcUrl,i),e.syncClientServerClock_(e.onClientServerClockSync_.bind(e))}})}},{key:"syncClientServerClock_",value:function(e){vart=this,i=Object(A.b)(this.masterXml_);returnnull===i?(this.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===i.method?(this.clientOffset_=i.value-Date.now(),e()):void(this.request=this.hls_.xhr({uri:oa(this.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},function(n,r){if(t.request){if(n)returnt.clientOffset_=t.masterLoaded_-Date.now(),e();vara=void0;a="HEAD"===i.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.clientOffset_=a-Date.now(),e()}}))}},{key:"haveMaster_",value:function(){this.state="HAVE_MASTER",this.mediaRequest_=null,this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.master=this.parseMasterXml(),this.trigger("loadedplaylist"))}},{key:"onClientServerClockSync_",value:function(){vare=this;this.haveMaster_(),this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]),this.master&&this.master.minimumUpdatePeriod&&(this.minimumUpdatePeriodTimeout_=r.a.setTimeout(function(){e.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod))}},{key:"refreshXml_",value:function(){vare=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)returne.error={status:i.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=i.responseText,e.sidxMapping_=function(e,t,i,n){varr=Object(A.a)(e,{manifestUri:t,clientOffset:i}),a=js(r.playlists,n);returnya(r,function(e,t,i,r){if(e.playlists&&e.playlists.length){vars=e.playlists;a=Ms(a,js(s,n))}}),a}(e.masterXml_,e.srcUrl,e.clientOffset_,e.sidxMapping_);varn=e.parseMasterXml(),a=Bs(e.master,n);if(a){vars=Ns(e.media().sidx);if(e.sidxMapping_[s])e.master=a;else{varo=e.media();e.request=Fs(o.sidx,o,e.hls_.xhr,{handleManifestRedirects:e.handleManifestRedirects},e.sidxRequestFinished_(o,n,e.state,function(t,i){if(!t||!i)thrownewError("failed to request sidx on minimumUpdatePeriod");e.sidxMapping_[s].sidx=i,e.minimumUpdatePeriodTimeout_=r.a.setTimeout(function(){e.trigger("minimumUpdatePeriod")},e.master.minimumUpdatePeriod),e.refreshMedia_(e.media().uri)}))}}e.minimumUpdatePeriodTimeout_=r.a.setTimeout(function(){e.trigger("minimumUpdatePeriod")},e.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(e){vart=this;if(!e)thrownewError("refreshMedia_ must take a media uri");vari=void0,n=void0;this.masterPlaylistLoader_?(i=this.masterPlaylistLoader_.master,n=this.masterPlaylistLoader_.parseMasterXml()):(i=this.master,n=this.parseMasterXml());vara=Bs(i,n);a?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=a:this.master=a,this.media_=a.playlists[e]):(this.media_=n.playlists[e],this.trigger("playlistunchanged")),this.media().endList||(this.mediaUpdateTimeout=r.a.setTimeout(function(){t.trigger("mediaupdatetimeout")},Ta(this.media(),!!a))),this.trigger("loadedplaylist")}}]),t}(),Hs=function(e){returnra.log.debug?ra.log.debug.bind(ra,"VHS:",e+" >"):function(){}};functionqs(){}varzs=function(){functione(t,i,n,r){la(this,e),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=n,this.mimeType_=i,this.logger_=Hs("SourceUpdater["+n+"]["+i+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,i,r)):this.createSourceBuffer_(i,r)}returnca(e,[{key:"createSourceBuffer_",value:function(e,t){vari=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){vare=this;this.started_=!0,this.onUpdateendCallback_=function(){vart=e.pendingCallback_;e.pendingCallback_=null,e.sourceBuffer_.removing=!1,e.logger_("buffered ["+is(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){vart=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},e)}},{key:"appendBuffer",value:function(e,t){vari=this;this.processedAppend_=!0,this.queueCallback_(function(){e.videoSegmentTimingInfoCallback&&i.sourceBuffer_.addEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),i.sourceBuffer_.appendBuffer(e.bytes)},function(){e.videoSegmentTimingInfoCallback&&i.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),t()})}},{key:"buffered",value:function(){returnthis.sourceBuffer_?this.sourceBuffer_.buffered:ra.createTimeRanges()}},{key:"remove",value:function(e,t){vari=this,n=arguments.length>2&&void0!==arguments[2]?arguments[2]:qs;this.processedAppend_&&this.queueCallback_(function(){i.logger_("remove ["+e+" => "+t+"]"),i.sourceBuffer_.removing=!0,i.sourceBuffer_.remove(e,t)},n)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==qs}},{key:"timestampOffset",value:function(e){vart=this;return"undefined"!==typeofe&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=e,t.runCallback_()}),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){vare=void0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){vare=this,t=functiont(){e.sourceBuffer_&&"open"===e.mediaSource.readyState&&e.sourceBuffer_.abort(),e.sourceBuffer_.removeEventListener("updateend",t)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",t):t()}}]),e}(),Ws={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},Gs=2,$s=-101,Xs=-102,Ks=function(e){e.forEach(function(e){e.abort()})},Ys=function(e,t){returnt.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:$s,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Xs,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Gs,xhr:t}:null},Qs=function(e,t,i){varn=0,r=!1;returnfunction(a,s){if(!r)returna?(r=!0,Ks(e),i(a,s)):(n+=1)===e.length?(s.endOfAllRequests=Date.now(),s.encryptedBytes?function(e,t,i){e.addEventListener("message",functionn(r){if(r.data.source===t.requestId){e.removeEventListener("message",n);vara=r.data.decrypted;returnt.bytes=newUint8Array(a.bytes,a.byteOffset,a.byteLength),i(null,t)}});varn=void0;n=t.key.bytes.slice?t.key.bytes.slice():newUint32Array(Array.prototype.slice.call(t.key.bytes)),e.postMessage(Ga({source:t.requestId,encrypted:t.encryptedBytes,key:n,iv:t.key.iv}),[t.encryptedBytes.buffer,n.buffer])}(t,s,i):i(null,s)):void0}},Js=function(e,t){returnfunction(i){returne.stats=ra.mergeOptions(e.stats,function(e){vart=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};returni.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)}},Zs=function(e,t,i,n,r,a,s){varo=[],u=Qs(o,i,s);if(r.key&&!r.key.bytes){varl=e(ra.mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){returnfunction(i,n){varr=n.response,a=Ys(i,n);if(a)returnt(a,e);if(16!==r.byteLength)returnt({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:Gs,xhr:n},e);vars=newDataView(r);returne.key.bytes=newUint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}}(r,u));o.push(l)}if(r.map&&!r.map.bytes){varc=e(ra.mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ha(r.map)}),function(e,t,i){returnfunction(n,r){vara=r.response,s=Ys(n,r);returns?i(s,e):0===a.byteLength?i({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Gs,xhr:r},e):(e.map.bytes=newUint8Array(r.response),t&&!t.isInitialized()&&t.init(),e.map.timescales=I.a.timescale(e.map.bytes),e.map.videoTrackIds=I.a.videoTrackIds(e.map.bytes),i(null,e))}}(r,n,u));o.push(c)}vard=e(ra.mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:Ha(r)}),function(e,t,i){returnfunction(n,r){vara=r.response,s=Ys(n,r),o=void0;returns?i(s,e):0===a.byteLength?i({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Gs,xhr:r},e):(e.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),e.key?e.encryptedBytes=newUint8Array(r.response):e.bytes=newUint8Array(r.response),t&&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)),i(null,e))}}(r,n,u));returnd.addEventListener("progress",Js(r,a)),o.push(d),function(){returnKs(o)}},eo=function(e,t){vari;returne&&(i=r.a.getComputedStyle(e))?i[t]:""},to=function(e,t){vari=e.slice();e.sort(function(e,n){varr=t(e,n);return0===r?i.indexOf(e)-i.indexOf(n):r})},io=function(e,t){vari=void0,n=void0;returne.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||r.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n=n||r.a.Number.MAX_VALUE)},no=function(e){return"number"===typeofe&&isFinite(e)},ro=function(e){functiont(e){la(this,t);vari=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(!e)thrownewTypeError("Initialization settings are required");if("function"!==typeofe.currentTime)thrownewTypeError("No currentTime getter specified");if(!e.mediaSource)thrownewTypeError("No MediaSource specified");returni.bandwidth=e.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.hasPlayed_=e.hasPlayed,i.currentTime_=e.currentTime,i.seekable_=e.seekable,i.seeking_=e.seeking,i.duration_=e.duration,i.mediaSource_=e.mediaSource,i.hls_=e.hls,i.loaderType_=e.loaderType,i.startingMedia_=void0,i.segmentMetadataTrack_=e.segmentMetadataTrack,i.goalBufferLength_=e.goalBufferLength,i.sourceType_=e.sourceType,i.inbandTextTracks_=e.inbandTextTracks,i.state_="INIT",i.checkBufferTimeout_=null,i.error_=void0,i.currentTimeline_=-1,i.pendingSegment_=null,i.mimeType_=null,i.sourceUpdater_=null,i.xhrOptions_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=e.cacheEncryptionKeys,i.keyCache_={},"main"===i.loaderType_?i.captionParser_=newO.CaptionParser:i.captionParser_=null,i.decrypter_=e.decrypter,i.syncController_=e.syncController,i.syncPoint_={segmentIndex:0,time:0},i.syncController_.on("syncinfoupdate",function(){returni.trigger("syncinfoupdate")}),i.mediaSource_.addEventListener("sourceopen",function(){returni.ended_=!1}),i.fetchAtBuffer_=!1,i.logger_=Hs("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(i,"state",{get:function(){returnthis.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),i}returnda(t,e),ca(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_&&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"undefined"!==typeofe&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){returnthis.sourceUpdater_?this.sourceUpdater_.buffered():ra.createTimeRanges()}},{key:"initSegment",value:function(e){vart=arguments.length>1&&void0!==arguments[1]&&arguments[1];if(!e)returnnull;vari=$a(e),n=this.initSegments_[i];returnt&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,timescales:e.timescales,videoTrackIds:e.videoTrackIds}),n||e}},{key:"segmentKey",value:function(e){vart=arguments.length>1&&void0!==arguments[1]&&arguments[1];if(!e)returnnull;vari=Xa(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});varr={resolvedUri:(n||e).resolvedUri};returnn&&(r.bytes=n.bytes),r}},{key:"couldBeginLoading_",value:function(){returnthis.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_())returnthis.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){returnthis.state="READY",this.sourceUpdater_=newzs(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};if(e){vari=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0});varr=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_("playlist update ["+r+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())returnthis.init_();if(i&&i.uri===e.uri){vara=e.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),n&&(n.mediaIndex-=a,n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}elsenull!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){returnnull===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_&&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,i){if(this.sourceUpdater_&&this.sourceUpdater_.remove(e,t,i),rs(e,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(varninthis.inbandTextTracks_)rs(e,t,this.inbandTextTracks_[n])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.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_()));vare=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(this.isEndOfStream_(e.mediaIndex)?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&(e.timeline!==this.currentTimeline_&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment,this.captionParser_&&this.captionParser_.clearAllCaptions()),this.loadSegment_(e)))}}},{key:"isEndOfStream_",value:function(e){returnfunction(e,t,i){if(!e||!t)return!1;varn=i===e.segments.length;returne.endList&&"open"===t.readyState&&n}(arguments.length>1&&void0!==arguments[1]?arguments[1]:this.playlist_,this.mediaSource_,e)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(e,t,i,n,r,a){vars=0,o=void0;e.length&&(s=e.end(e.length-1));varu=Math.max(0,s-r);if(!t.segments.length)returnnull;if(u>=this.goalBufferLength_())returnnull;if(!n&&u>=1)returnnull;if(null===a)returni=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,i,null,!0);if(null!==i){varl=t.segments[i];returno=l&&l.end?l.end:s,this.generateSegmentInfo_(t,i+1,o,!1)}if(this.fetchAtBuffer_){varc=Na.getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}else{vard=Na.getMediaInfoForTime(t,r,a.segmentIndex,a.time);i=d.mediaIndex,o=d.startTime}returnthis.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){vart=this;if(-1===this.currentTimeline_)return0;vari=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){returne.timeline===t.currentTimeline_});returni.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,n){if(t<0||t>=e.segments.length)returnnull;varr=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;vart=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=Na.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=function(e,t){vari=arguments.length>2&&void0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;vars=function(e){vart=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,l=t.playlists.filter(function(e){return!Na.isIncompatible(e)}),c=l.filter(Na.isEnabled);c.length||(c=l.filter(function(e){return!Na.isDisabled(e)}));vard=c.filter(Na.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){vart=u.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:Na.estimateSegmentRequestTime(a,n,e)*t-s}}),h=d.filter(function(e){returne.rebufferingImpact<=0});returnto(h,function(e,t){returnio(t.playlist,e.playlist)}),h.length?h[0]:(to(d,function(e,t){returne.rebufferingImpact-t.rebufferingImpact}),d[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){varo=r-a-s.rebufferingImpact,u=.5;returna<=1/30&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u?!1:(this.bandwidth=s.playlist.attributes.BANDWIDTH*Ws.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=Zs(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){vart=function(e,t,i){varn=void0;returnn=e.length&&e.start(0)>0&&e.start(0)<t?e.start(0):t-30,Math.min(n,t-i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){vart=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){varn=t.key.iv||newUint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=n}returnt.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)returnthis.pendingSegment_=null,this.state="READY",e.code===Xs?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===$s?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,voidthis.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),voidthis.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),t.key&&this.segmentKey(t.key,!0),this.processSegmentResponse_(t)}}elsethis.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){vart=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,e.fmp4Captions&&(!function(e,t,i){for(varnini)if(!e[n]){t.trigger({type:"usage",name:"hls-608"});varr=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,e.captionStreams),function(e){vart=e.inbandTextTracks,i=e.captionArray,n=e.timestampOffset;if(i){varr=window.WebKitDataCue||window.VTTCue;i.forEach(function(e){vari=e.stream,a=e.startTime,s=e.endTime;t[i]&&(a+=n,s+=n,t[i].addCue(newr(a,s,e.text)))})}}({inbandTextTracks:this.inbandTextTracks_,captionArray:e.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){vare=this;if(this.pendingSegment_){vart=this.pendingSegment_,i=t.segment,n=this.syncController_.probeSegmentInfo(t);"undefined"===typeofthis.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});varr,a,s,o=(r=this.loaderType_,a=this.startingMedia_,s=n,"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)returnthis.error({message:o,blacklistDuration:1/0}),voidthis.trigger("error");if(t.isSyncRequest)returnthis.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"));varu=this.syncController_.mappingForTimeline(t.timeline);if(null!==u&&this.trigger({type:"segmenttimemapping",mapping:u}),this.state="APPENDING",i.map){varl=$a(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==l){varc=this.initSegment(i.map);this.sourceUpdater_.appendBuffer({bytes:c.bytes},function(){e.activeInitSegmentId_=l})}}t.byteLength=t.bytes.byteLength,"number"===typeofi.start&&"number"===typeofi.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.logger_(function(e){vart=e.segment,i=t.start,n=t.end,r=e.playlist,a=r.mediaSequence,s=r.id,o=r.segments,u=void0===o?[]:o,l=e.mediaIndex,c=e.timeline;return["appending ["+l+"] of ["+a+", "+(a+u.length)+"] from playlist ["+s+"]","["+i+" => "+n+"] in timeline ["+c+"]"].join(" ")}(t)),this.sourceUpdater_.appendBuffer({bytes:t.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,t.requestId)},this.handleUpdateEnd_.bind(this))}elsethis.state="READY"}},{key:"handleVideoSegmentTimingInfo_",value:function(e,t){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){vari=this.pendingSegment_.segment;i.videoTimingInfo||(i.videoTimingInfo={}),i.videoTimingInfo.transmuxerPrependedSeconds=t.videoSegmentTimingInfo.prependedContentDuration||0,i.videoTimingInfo.transmuxedPresentationStart=t.videoSegmentTimingInfo.start.presentation,i.videoTimingInfo.transmuxedPresentationEnd=t.videoSegmentTimingInfo.end.presentation,i.videoTimingInfo.baseMediaDecodeTime=t.videoSegmentTimingInfo.baseMediaDecodeTime}}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)returnthis.state="READY",void(this.paused()||this.monitorBuffer_());vare=this.pendingSegment_,t=e.segment,i=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():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.isEndOfStream_(e.mediaIndex+1,e.playlist)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){vart=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){vart=e.segment,i=t.start,n=t.end;if(no(i)&&no(n)){rs(i,n,this.segmentMetadataTrack_);vara=r.a.WebKitDataCue||r.a.VTTCue,s={custom:t.custom,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:i,end:n},o=newa(i,n,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}}}]),t}(ra.EventTarget),ao=function(e){returndecodeURIComponent(escape(String.fromCharCode.apply(null,e)))},so=newUint8Array("\n\n".split("").map(function(e){returne.charCodeAt(0)})),oo=function(e){functiont(e){vari=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};la(this,t);varn=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));returnn.mediaSource_=null,n.subtitlesTrack_=null,n}returnda(t,ro),ca(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)returnra.createTimeRanges();vare=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;returnra.createTimeRanges([[t,i]])}},{key:"initSegment",value:function(e){vart=arguments.length>1&&void0!==arguments[1]&&arguments[1];if(!e)returnnull;vari=$a(e),n=this.initSegments_[i];if(t&&!n&&e.bytes){varr=so.byteLength+e.bytes.byteLength,a=newUint8Array(r);a.set(e.bytes),a.set(so,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}returnn||e}},{key:"couldBeginLoading_",value:function(){returnthis.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){returnthis.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return"undefined"===typeofe?this.subtitlesTrack_:(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}},{key:"remove",value:function(e,t){rs(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){vare=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));vart=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)){returnthis.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);returne}},{key:"handleSegment_",value:function(){vare=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";vart=this.pendingSegment_,i=t.segment;if("function"!==typeofr.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){varn=void0,a=function(){e.subtitlesTrack_.tech_.off("vttjsloaded",n),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")};returnn=function(){e.subtitlesTrack_.tech_.off("vttjserror",a),e.handleSegment_()},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",n),voidthis.subtitlesTrack_.tech_.one("vttjserror",a)}i.requested=!0;try{this.parseVTTCues_(t)}catch(Fo){returnthis.error({message:Fo.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)returnthis.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=i.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_()}elsethis.state="READY"}},{key:"parseVTTCues_",value:function(e){vart=void0,i=!1;"function"===typeofr.a.TextDecoder?t=newr.a.TextDecoder("utf8"):(t=r.a.WebVTT.StringDecoder(),i=!0);varn=newr.a.WebVTT.Parser(r.a,r.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){returne.timestampmap=t},n.onparsingerror=function(e){ra.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){vara=e.segment.map.bytes;i&&(a=ao(a)),n.parse(a)}vars=e.bytes;i&&(s=ao(s)),n.parse(s),n.flush()}},{key:"updateTimeMapping_",value:function(e,t,i){varn=e.segment;if(t)if(e.cues.length){varr=e.timestampmap,a=r.MPEGTS/9e4-r.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!i.syncInfo){vars=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-n.duration)}}}elsen.empty=!0}}]),t}(),uo=function(e,t){for(vari=e.cues,n=0;n<i.length;n++){varr=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)returnr}returnnull},lo=D.a.inspect,co=[{name:"VOD",run:function(e,t,i,n,r){if(i!==1/0){return{time:0,segmentIndex:0}}returnnull}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(!e.datetimeToDisplayTime)returnnull;vara=t.segments||[],s=null,o=null;r=r||0;for(varu=0;u<a.length;u++){varl=a[u];if(l.dateTimeObject){varc=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,d=Math.abs(r-c);if(null!==o&&(0===d||o<d))break;o=d,s={time:c,segmentIndex:u}}}returns}},{name:"Segment",run:function(e,t,i,n,r){vara=t.segments||[],s=null,o=null;r=r||0;for(varu=0;u<a.length;u++){varl=a[u];if(l.timeline===n&&"undefined"!==typeofl.start){varc=Math.abs(r-l.start);if(null!==o&&o<c)break;(!s||null===o||o>=c)&&(o=c,s={time:l.start,segmentIndex:u})}}returns}},{name:"Discontinuity",run:function(e,t,i,n,r){vara=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(vars=null,o=0;o<t.discontinuityStarts.length;o++){varu=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){vard=Math.abs(r-c.time);if(null!==s&&s<d)break;(!a||null===s||s>=d)&&(s=d,a={time:c.time,segmentIndex:u})}}returna}},{name:"Playlist",run:function(e,t,i,n,r){returnt.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],ho=function(e){functiont(){la(this,t);vare=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));returne.inspectCache_=void0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=Hs("SyncController"),e}returnda(t,e),ca(t,[{key:"getSyncPoint",value:function(e,t,i,n){varr=this.runStrategies_(e,t,i,n);returnr.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)returnnull;vari=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)returnnull;varn=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});returnn.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+Ea(e,n.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,n){for(varr=[],a=0;a<co.length;a++){vars=co[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}returnr}},{key:"selectSyncPoint_",value:function(e,t){for(vari=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){vars=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}returnthis.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(vari=t.mediaSequence-e.mediaSequence-1;i>=0;i--){varn=e.segments[i];if(n&&"undefined"!==typeofn.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.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){vart=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void0}},{key:"probeSegmentInfo",value:function(e){vart=e.segment,i=e.playlist,n=void0;return(n=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,n)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),n}},{key:"probeMp4Segment_",value:function(e){vart=e.segment,i=I.a.timescale(t.map.bytes),n=I.a.startTime(i,e.bytes);returnnull!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){vart=lo(e.bytes,this.inspectCache_),i=void0,n=void0;returnt?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,n=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,n=t.audio[1].dtsTime),{start:i,end:n,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return"undefined"===typeofthis.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return"undefined"===typeofthis.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){vari=e.segment,n=this.timelines[e.timeline];if(null!==e.timestampOffset)n={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=n,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+n.time+"] [mapping: "+n.mapping+"]"),i.start=e.startOfSegment,i.end=t.end+n.mapping;else{if(!n)return!1;i.start=t.start+n.mapping,i.end=t.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){vart=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};elseif(t.discontinuityStarts&&t.discontinuityStarts.length)for(varn=0;n<t.discontinuityStarts.length;n++){varr=t.discontinuityStarts[n],a=t.discontinuitySequence+n+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){varu=void0;u=s<0?i.start-Ea(t,e.mediaIndex,r):i.end+Ea(t,e.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}}}]),t}(ra.EventTarget),po=newps("./decrypter-worker.worker.js",function(e,t){vari=this;!function(){vare=function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")},t=function(){functione(e,t){for(vari=0;i<t.length;i++){varn=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,i,n){returni&&e(t.prototype,i),n&&e(t,n),t}}(),n=function(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeoft&&"function"!==typeoft?e:t},r=function(){vare=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4],a=void0,s=void0,o=void0,u=[],l=[],c=void0,d=void0,h=void0,p=void0,f=void0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(h=(h=o^o<<1^o<<2^o<<3^o<<4)>>8^255&h^99,n[s]=h,r[h]=s,f=16843009*u[d=u[c=u[s]]]^65537*d^257*c^16843008*s,p=257*u[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][h]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);returne},a=null,s=function(){functiont(i){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()]];varn=void0,s=void0,o=void0,u=void0,l=void0,c=this._tables[0][4],d=this._tables[1],h=i.length,p=1;if(4!==h&&6!==h&&8!==h)thrownewError("Invalid aes key size");for(u=i.slice(0),l=[],this._key=[u,l],n=h;n<4*h+28;n++)o=u[n-1],(n%h===0||8===h&&n%h===4)&&(o=c[o>>>24]<<24^c[o>>16&255]<<16^c[o>>8&255]<<8^c[255&o],n%h===0&&(o=o<<8^o>>>24^p<<24,p=p<<1^283*(p>>7))),u[n]=u[n-h]^o;for(s=0;n;s++,n--)o=u[3&s?n:n-4],l[s]=n<=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]]}returnt.prototype.decrypt=function(e,t,i,n,r,a){vars=this._key[1],o=e^s[0],u=n^s[1],l=i^s[2],c=t^s[3],d=void0,h=void0,p=void0,f=s.length/4-2,m=void0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)d=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],h=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=d,u=h,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],d=o,o=u,u=l,l=c,c=d},t}(),o=function(){functiont(){e(this,t),this.listeners={}}returnt.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;vari=this.listeners[e].indexOf(t);returnthis.listeners[e].splice(i,1),i>-1},t.prototype.trigger=function(e){vart=this.listeners[e];if(t)if(2===arguments.length)for(vari=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);elsefor(varr=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}(),u=function(t){functioni(){e(this,i);varr=n(this,t.call(this,o));returnr.jobs=[],r.delay=1,r.timeout_=null,r}returnfunction(e,t){if("function"!==typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}(i,t),i.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},i}(o),l=function(e){returne<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},c=function(){functioni(t,n,r,a){e(this,i);vars=i.STEP,o=newInt32Array(t.buffer),c=newUint8Array(t.byteLength),d=0;for(this.asyncStream_=newu,this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),n,r,c)),d=s;d<o.length;d+=s)r=newUint32Array([l(o[d-4]),l(o[d-3]),l(o[d-2]),l(o[d-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(d,d+s),n,r,c));this.asyncStream_.push(function(){vare;a(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))})}returni.prototype.decryptChunk_=function(e,t,i,n){returnfunction(){varr=function(e,t,i){varn=newInt32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=news(Array.prototype.slice.call(t)),a=newUint8Array(e.byteLength),o=newInt32Array(a.buffer),u=void0,c=void0,d=void0,h=void0,p=void0,f=void0,m=void0,g=void0,y=void0;for(u=i[0],c=i[1],d=i[2],h=i[3],y=0;y<n.length;y+=4)p=l(n[y]),f=l(n[y+1]),m=l(n[y+2]),g=l(n[y+3]),r.decrypt(p,f,m,g,o,y),o[y]=l(o[y]^u),o[y+1]=l(o[y+1]^c),o[y+2]=l(o[y+2]^d),o[y+3]=l(o[y+3]^h),u=p,c=f,d=m,h=g;returna}(e,t,i);n.set(r,e.byteOffset)}},t(i,null,[{key:"STEP",get:function(){return32e3}}]),i}();newfunction(e){e.onmessage=function(t){vari=t.data,n=newUint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),r=newUint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),a=newUint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);newc(n,r,a,function(t,n){e.postMessage(function(e){vart={};returnObject.keys(e).forEach(function(i){varn=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t}({source:i.source,decrypted:n}),[n.buffer])})}}(i)}()}),fo=function(e){vart=e.default?"main":"alternative";returne.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},mo=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},go=function(e,t){t.activePlaylistLoader=e,e.load()},yo={AUDIO:function(e,t){returnfunction(){vari=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;mo(i,n);vara=n.activeTrack(),s=n.activeGroup(),o=(s.filter(function(e){returne.default})[0]||s[0]).id,u=n.tracks[o];if(a!==u){for(varlinra.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),n.tracks)n.tracks[l].enabled=n.tracks[l]===u;n.onTrackChanged()}elser({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){returnfunction(){vari=t.segmentLoaders[e],n=t.mediaTypes[e];ra.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),mo(i,n);varr=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}},vo={AUDIO:function(e,t,i){if(t){varn=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){vare=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",yo[e](e,i))}},SUBTITLES:function(e,t,i){varn=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){vare=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",yo[e](e,i))}},_o={AUDIO:function(e,t){vari=t.hls,n=t.sourceType,r=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,l=o.tracks,c=t.masterPlaylistLoader;for(vardins[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}}),s[e])for(varhinu[d]||(u[d]=[]),s[e][d]){varp=s[e][d][h],f=void0;if(f=p.resolvedUri?newSa(p.resolvedUri,i,a):p.playlists&&"dash"===n?newVs(p.playlists[0],i,a,c):null,p=ra.mergeOptions({id:h,playlistLoader:f},p),vo[e](e,p.playlistLoader,t),u[d].push(p),"undefined"===typeofl[h]){varm=newra.AudioTrack({id:h,kind:fo(p),enabled:!1,language:p.language,default:p.default,label:h});l[h]=m}}r.on("error",yo[e](e,t))},SUBTITLES:function(e,t){vari=t.tech,n=t.hls,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(varhino[e])for(varpinl[h]||(l[h]=[]),o[e][h])if(!o[e][h][p].forced){varf=o[e][h][p],m=void0;if("hls"===r?m=newSa(f.resolvedUri,n,s):"dash"===r&&(m=newVs(f.playlists[0],n,s,d)),f=ra.mergeOptions({id:p,playlistLoader:m},f),vo[e](e,f.playlistLoader,t),l[h].push(f),"undefined"===typeofc[p]){varg=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",yo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){vari=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(varoinn[e])for(varuina[o]||(a[o]=[]),n[e][o]){varl=n[e][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(ra.mergeOptions({id:u},l)),"undefined"===typeofs[u])){varc=i.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},bo={AUDIO:function(e,t){returnfunction(){vari=t.mediaTypes[e].tracks;for(varnini)if(i[n].enabled)returni[n];returnnull}},SUBTITLES:function(e,t){returnfunction(){vari=t.mediaTypes[e].tracks;for(varnini)if("showing"===i[n].mode)returni[n];returnnull}}},To=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){_o[t](t,e)});vart=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=function(e,t){returnfunction(i){varn=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=n.media();if(!a)returnnull;vars=null;returna.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,"undefined"===typeofi?s:null===i?null:s.filter(function(e){returne.id===i.id})[0]||null}}(i,e),t[i].activeTrack=bo[i](i,e),t[i].onGroupChanged=function(e,t){returnfunction(){vari=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;mo(n,a),o&&(o.playlistLoader?(n.resyncLoader(),go(o.playlistLoader,a)):u&&r.resetEverything())}}(i,e),t[i].onTrackChanged=function(e,t){returnfunction(){vari=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;mo(n,a),o&&(o.playlistLoader?u!==o.playlistLoader?(n.track&&n.track(s),n.resetEverything(),go(o.playlistLoader,a)):go(o.playlistLoader,a):r.resetEverything())}}(i,e)});vara=t.AUDIO.activeGroup(),s=(a.filter(function(e){returne.default})[0]||a[0]).id;t.AUDIO.tracks[s].enabled=!0,t.AUDIO.onTrackChanged(),i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){returnt[e].onGroupChanged()})});varo=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};for(varuinn.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),n.clearTracks("audio"),t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[u])},So=function(){vare={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:qs,activeTrack:qs,onGroupChanged:qs,onTrackChanged:qs}}),e},ko=void0,wo=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Co=function(e){returnthis.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Eo=function(e){functiont(e){la(this,t);vari=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=e.url,r=e.handleManifestRedirects,a=e.withCredentials,s=e.tech,o=e.bandwidth,u=e.externHls,l=e.useCueTags,c=e.blacklistDuration,d=e.enableLowInitialPlaylist,h=e.sourceType,p=e.seekTo,f=e.cacheEncryptionKeys;if(!n)thrownewError("A non-empty playlist URL is required");ko=u,i.withCredentials=a,i.tech_=s,i.hls_=s.hls,i.seekTo_=p,i.sourceType_=h,i.useCueTags_=l,i.blacklistDuration=c,i.enableLowInitialPlaylist=d,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:a,handleManifestRedirects:r,timeout:null},i.mediaTypes_=So(),i.mediaSource=newra.MediaSource,i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_.bind(i)),i.seekable_=ra.createTimeRanges(),i.hasPlayed_=function(){return!1},i.syncController_=newho(e),i.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=newpo,i.inbandTextTracks_={};varm={hls:i.hls_,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){returni.seekable()},seeking:function(){returni.tech_.seeking()},duration:function(){returni.mediaSource.duration},hasPlayed:function(){returni.hasPlayed_()},goalBufferLength:function(){returni.goalBufferLength()},bandwidth:o,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:f};returni.masterPlaylistLoader_="dash"===i.sourceType_?newVs(n,i.hls_,i.requestOptions_):newSa(n,i.hls_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=newro(ra.mergeOptions(m,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),e),i.audioSegmentLoader_=newro(ra.mergeOptions(m,{loaderType:"audio"}),e),i.subtitleSegmentLoader_=newoo(ra.mergeOptions(m,{loaderType:"vtt"}),e),i.setupSegmentLoaderListeners_(),wo.forEach(function(e){i[e+"_"]=Co.bind(i,e)}),i.logger_=Hs("MPC"),i.masterPlaylistLoader_.load(),i}returnda(t,e),ca(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){vare=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){vart=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;Ba(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),To({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(Fo){returnra.log.warn("Failed to create SourceBuffers",Fo),e.mediaSource.endOfStream("decode")}e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){vart=e.masterPlaylistLoader_.media();if(!t){e.excludeUnsupportedVariants_();vari=void0;returne.enableLowInitialPlaylist&&(i=e.selectInitialPlaylist()),i||(i=e.selectPlaylist()),e.initialMedia_=i,voide.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){varn=function(){vart=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))};if(e.duration()!==1/0){e.tech_.one("durationchange",functiont(){e.duration()===1/0?n():e.tech_.one("durationchange",t)})}elsen()}}),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(){vart=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;Ba(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){vart=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){vari=e.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(varaini.AUDIO)for(varsini.AUDIO[a]){i.AUDIO[a][s].uri||(n=!1)}n&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),ko.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),ko.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),r.length&&Object.keys(i.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(){vare=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){vart=e.selectPlaylist(),i=e.masterPlaylistLoader_.media(),n=e.tech_.buffered(),r=n.length?n.end(n.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!i.endList||e.duration()<Ws.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<i.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(){returnMath.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(){vare=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){vare=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything(function(){ra.browser.IE_VERSION||ra.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();vare=this.tech_.seekable();returnthis.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.seekTo_(e.end(e.length-1)):void0}}},{key:"setupFirstPlay",value:function(){vare=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_())return!1;if(!t.endList){vari=this.seekable();if(!i.length)return!1;if(ra.browser.IE_VERSION&&0===this.tech_.readyState())returnthis.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.seekTo_(i.end(0)),e.hasPlayed_=function(){return!0}}),!1;this.trigger("firstplay"),this.seekTo_(i.end(0))}returnthis.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(Fo){returnra.log.warn("Failed to create Source Buffers",Fo),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){vare=this.tech_.play();"undefined"!==typeofe&&"function"===typeofe.then&&e.then(null,function(e){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){vare=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e){this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(Fo){ra.log.warn("Failed to call media source endOfStream",Fo)}}}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;vart=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;vari=ko.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)returni-n<=.1;vara=r.end(r.length-1);returna-n<=.1&&i-a<=.1}},{key:"blacklistCurrentPlaylist",value:function(){vare,t=arguments.length>0&&void0!==arguments[0]?arguments[0]:{},i=arguments[1],n=void0;if(n=t.playlist||this.masterPlaylistLoader_.media(),i=i||t.blacklistDuration||this.blacklistDuration,!n){this.error=t;try{returnthis.mediaSource.endOfStream("network")}catch(Fo){returnthis.trigger("error")}}varr=1===this.masterPlaylistLoader_.master.playlists.filter(Ra).length,a=this.masterPlaylistLoader_.master.playlists;return1===a.length?(ra.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(r)):(r&&(ra.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),a.forEach(function(e){e.excludeUntil!==1/0&&deletee.excludeUntil}),this.tech_.trigger("retryplaylist")),n.excludeUntil=Date.now()+1e3*i,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),e=this.selectPlaylist(),ra.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(e,r))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){vart=es(this.tech_.buffered(),e);returnthis.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()),voidthis.load()):0}},{key:"duration",value:function(){returnthis.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:ko.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){returnthis.seekable_}},{key:"onSyncInfoUpdate_",value:function(){vare=void0,t=void0;if(this.masterPlaylistLoader_){vari=this.masterPlaylistLoader_.media();if(i){varn=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==n&&0!==(e=ko.Playlist.seekable(i,n)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(i,this.mediaSource.duration)))return;if(0===(t=ko.Playlist.seekable(i,n)).length)return}varr=void0,a=void0;this.seekable_&&this.seekable_.length&&(r=this.seekable_.end(0),a=this.seekable_.start(0)),t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=ra.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.seekable_&&this.seekable_.length&&this.seekable_.end(0)===r&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+is(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},{key:"updateDuration",value:function(){vare=this,t=this.mediaSource.duration,i=ko.Playlist.duration(this.masterPlaylistLoader_.media()),n=this.tech_.buffered(),r=functiont(){e.logger_("Setting duration from "+e.mediaSource.duration+" => "+i);try{e.mediaSource.duration=i}catch(Fo){ra.log.warn("Failed to set media source duration",Fo)}e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};n.length>0&&(i=Math.max(i,n.end(n.length-1))),t!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){vare=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(t){vari=e.mediaTypes_[t].groups;for(varnini)i[n].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){returnthis.masterPlaylistLoader_.master}},{key:"media",value:function(){returnthis.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){vare,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=ks(this.masterPlaylistLoader_.master,t)).length<1)returnthis.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){vart=e.length>1&&-1===e[0].indexOf(",")&&e[0]!==e[1]?newra.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){vart;e.attributes.CODECS&&r.a.MediaSource&&r.a.MediaSource.isTypeSupported&&!r.a.MediaSource.isTypeSupported('video/mp4; codecs="'+(t=e.attributes.CODECS,t.replace(/avc1\.(\d+)\.(\d+)/i,function(e){returnbs([e])[0]}))+'"')&&(e.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(e){vart=2,i=null,n=void0;e.attributes.CODECS&&(n=Ts(e.attributes.CODECS),i=n.videoCodec,t=n.codecCount),this.master().playlists.forEach(function(e){varn={codecCount:2,videoCodec:null};e.attributes.CODECS&&(n=Ts(e.attributes.CODECS)),n.codecCount!==t&&(e.excludeUntil=1/0),n.videoCodec!==i&&(e.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(e){vart=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t){vari=arguments.length>2&&void0!==arguments[2]?arguments[2]:0;if(e.segments)for(varn=i,a=void0,s=0;s<e.segments.length;s++){varo=e.segments[s];if(a||(a=uo(t,n+o.duration/2)),a){if("cueIn"ino){a.endTime=n,a.adEndTime=n,n+=o.duration,a=null;continue}if(n<a.endTime){n+=o.duration;continue}a.endTime+=o.duration}elseif("cueOut"ino&&((a=newr.a.VTTCue(n,n+o.duration,o.cueOut)).adStartTime=n,a.adEndTime=n+parseFloat(o.cueOut),t.addCue(a)),"cueOutCont"ino){varu,l,c=o.cueOutCont.split("/").map(parseFloat),d=pa(c,2);u=d[0],l=d[1],(a=newr.a.VTTCue(n,n+o.duration,"")).adStartTime=n-u,a.adEndTime=a.adStartTime+l,t.addCue(a)}n+=o.duration}}(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){vare=this.tech_.currentTime(),t=Ws.GOAL_BUFFER_LENGTH,i=Ws.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,Ws.MAX_GOAL_BUFFER_LENGTH);returnMath.min(t+e*i,n)}},{key:"bufferLowWaterLine",value:function(){vare=this.tech_.currentTime(),t=Ws.BUFFER_LOW_WATER_LINE,i=Ws.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,Ws.MAX_BUFFER_LOW_WATER_LINE);returnMath.min(t+e*i,n)}}]),t}(ra.EventTarget),Ao=functione(t,i,n){la(this,e);varr,a,s,o=t.masterPlaylistController_,u=o[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(i.attributes.RESOLUTION){varl=i.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=i.attributes.BANDWIDTH,this.id=n,this.enabled=(r=t.playlists,a=i.uri,s=u,function(e){vart=r.master.playlists[a],i=Da(t),n=Ra(t);return"undefined"===typeofe?n:(e?deletet.disabled:t.disabled=!0,e===n||i||(s(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Po=["seeking","seeked","pause","playing","error"],Lo=function(){functione(t){vari=this;la(this,e),this.tech_=t.tech,this.seekable=t.seekable,this.seekTo=t.seekTo,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Hs("PlaybackWatcher"),this.logger_("initialize");varn=function(){returni.monitorCurrentTime_()},a=function(){returni.techWaiting_()},s=function(){returni.cancelTimer_()},o=function(){returni.fixesBadSeeks_()};this.tech_.on("seekablechanged",o),this.tech_.on("waiting",a),this.tech_.on(Po,s),this.tech_.on("canplay",n),this.dispose=function(){i.logger_("dispose"),i.tech_.off("seekablechanged",o),i.tech_.off("waiting",a),i.tech_.off(Po,s),i.tech_.off("canplay",n),i.checkCurrentTimeTimeout_&&r.a.clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}returnca(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())returnthis.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){vare=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))returnthis.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(){if(!this.tech_.seeking())return!1;vare=this.seekable(),t=this.tech_.currentTime(),i=void0;this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(i=e.end(e.length-1));this.beforeSeekableWindow_(e,t)&&(i=e.start(0)+.1);return"undefined"!==typeofi&&(this.logger_("Trying to seek outside of seekable at time "+t+" with seekable range "+is(e)+". Seeking to "+i+"."),this.seekTo(i),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){vare=this.tech_.currentTime(),t=this.tech_.buffered(),i=es(t,e);returni.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.seekTo(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),voidthis.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void0}}},{key:"techWaiting_",value:function(){vare=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)){vari=e.end(e.length-1);returnthis.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.seekTo(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}varn=this.tech_.buffered(),r=ts(n,t);if(this.videoUnderflow_(r,n,t))returnthis.cancelTimer_(),this.seekTo(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){vara=r.start(0)-t;returnthis.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,i){varn=arguments.length>3&&void0!==arguments[3]&&arguments[3];if(!e.length)return!1;varr=e.end(e.length-1)+.1;return!i.endList&&n&&(r=e.end(e.length-1)+3*i.targetDuration),t>r}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,i){if(0===e.length){varn=this.gapFromVideoUnderflow_(t,i);if(n)returnthis.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+i),!0}return!1}},{key:"skipTheGap_",value:function(e){vart=this.tech_.buffered(),i=this.tech_.currentTime(),n=ts(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.seekTo(n.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(vari=function(e){if(e.length<2)returnra.createTimeRanges();for(vart=[],i=1;i<e.length;i++){varn=e.end(i-1),r=e.start(i);t.push([n,r])}returnra.createTimeRanges(t)}(e),n=0;n<i.length;n++){varr=i.start(n),a=i.end(n);if(t-r<4&&t-r>2)return{start:r,end:a}}returnnull}}]),e}(),xo={errorInterval:30,getSource:function(e){returne(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Io=function(e){!functione(t,i){varn=0,r=0,a=ra.mergeOptions(xo,i);t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})});vars=function(){r&&t.currentTime(r)},o=function(e){null!==e&&void0!==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())},u=function(){if(Date.now()-n<1e3*a.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(a.getSource&&"function"===typeofa.getSource)returnn=Date.now(),a.getSource.call(t,o);ra.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=functione(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(i){l(),e(t,i)}}(this,e)};ra.use("*",function(e){return{setSource:function(e,t){t(null,e)},setCurrentTime:function(t){returne.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.tech_.currentTime())}}});varOo={PlaylistLoader:Sa,Playlist:Na,Decrypter:W,AsyncStream:H,decrypt:z,utils:Ya,STANDARD_PLAYLIST_SELECTOR:function(){returnfunction(e,t,i,n,a){vars=e.playlists.map(function(e){vart,i;returnt=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||r.a.Number.MAX_VALUE,width:t,height:i,playlist:e}});to(s,function(e,t){returne.bandwidth-t.bandwidth});varo=(s=s.filter(function(e){return!Na.isIncompatible(e.playlist)})).filter(function(e){returnNa.isEnabled(e.playlist)});o.length||(o=s.filter(function(e){return!Na.isDisabled(e.playlist)}));varu=o.filter(function(e){returne.bandwidth*Ws.BANDWIDTH_VARIANCE<t}),l=u[u.length-1],c=u.filter(function(e){returne.bandwidth===l.bandwidth})[0];if(!1===a){vard=c||o[0]||s[0];returnd?d.playlist:null}varh=u.filter(function(e){returne.width&&e.height});to(h,function(e,t){returne.width-t.width});varp=h.filter(function(e){returne.width===i&&e.height===n});l=p[p.length-1];varf=p.filter(function(e){returne.bandwidth===l.bandwidth})[0],m=void0,g=void0,y=void0;f||(g=(m=h.filter(function(e){returne.width>i||e.height>n})).filter(function(e){returne.width===m[0].width&&e.height===m[0].height}),l=g[g.length-1],y=g.filter(function(e){returne.bandwidth===l.bandwidth})[0]);varv=y||f||c||o[0]||s[0];returnv?v.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(eo(this.tech_.el(),"width"),10),parseInt(eo(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){vare=this.playlists.master.playlists.filter(Na.isEnabled);returnto(e,function(e,t){returnio(e,t)}),e.filter(function(e){returnTs(e.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:io,comparePlaylistResolution:function(e,t){vari=void0,n=void0;returne.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||r.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||r.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:Va()};["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(Oo,e,{get:function(){returnra.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),Ws[e]},set:function(t){ra.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!==typeoft||t<0?ra.log.warn("value of Hls."+e+" must be greater than or equal to 0"):Ws[e]=t}})});varUo=function(e){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e))return"hls";return/^application\/dash\+xml/i.test(e)?"dash":null},Do=function(e,t){for(vari=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.uri){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};Oo.canPlaySource=function(){returnra.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};varRo=function(e){if("dash"===e.options_.sourceType){vart=ra.players[e.tech_.options_.playerId];if(t.eme){vari=function(e,t,i){if(!e)returne;varn={};for(varrine)n[r]={audioContentType:'audio/mp4; codecs="'+i.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+t.attributes.CODECS+'"'},t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(n[r].pssh=t.contentProtection[r].pssh),"string"===typeofe[r]&&(n[r].url=e[r]);returnra.mergeOptions(e,n)}(e.source_.keySystems,e.playlists.media(),e.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());i&&(t.currentSource().keySystems=i,t.eme.initializeMediaKeys&&t.eme.initializeMediaKeys())}}},Mo=function(){if(!window.localStorage)returnnull;vare=window.localStorage.getItem("videojs-vhs");if(!e)returnnull;try{returnJSON.parse(e)}catch(Fo){returnnull}};Oo.supportsNativeHls=function(){vare=s.a.createElement("video");if(!ra.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))})}(),Oo.supportsNativeDash=!!ra.getTech("Html5").isSupported()&&/maybe|probably/i.test(s.a.createElement("video").canPlayType("application/dash+xml")),Oo.supportsTypeNatively=function(e){return"hls"===e?Oo.supportsNativeHls:"dash"===e&&Oo.supportsNativeDash},Oo.isSupported=function(){returnra.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};varBo=ra.getComponent("Component"),No=function(e){functiont(e,i,n){la(this,t);varr=ha(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i,n.hls));if(i.options_&&i.options_.playerId){vara=ra(i.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){returnra.log.warn("player.hls is deprecated. Use player.tech().hls instead."),i.trigger({type:"usage",name:"hls-player-access"}),r},configurable:!0}),a.vhs=r,a.dash=r,r.player_=a}if(r.tech_=i,r.source_=e,r.stats={},r.setOptions_(),r.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);elseif(r.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))thrownewError("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");returnr.on(s.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){vart=s.a.fullscreenElement||s.a.webkitFullscreenElement||s.a.mozFullScreenElement||s.a.msFullscreenElement;t&&t.contains(r.tech_.el())&&r.masterPlaylistController_.smoothQualityChange_()}),r.on(r.tech_,"seeking",function(){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}returnda(t,Bo),ca(t,[{key:"setOptions_",value:function(){vare=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeofthis.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!==typeofthis.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!==typeofthis.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){vart=Mo();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"!==typeofthis.options_.bandwidth&&(this.options_.bandwidth=Ws.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ws.INITIAL_BANDWIDTH,["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(t){"undefined"!==typeofe.source_[t]&&(e.options_[t]=e.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(e,t){vari=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Oo,this.options_.sourceType=Uo(t),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e),i.setCurrentTime(e)},this.masterPlaylistController_=newEo(this.options_),this.playbackWatcher_=newLo(ra.mergeOptions(this.options_,{seekable:function(){returni.seekable()},media:function(){returni.masterPlaylistController_.media()}})),this.masterPlaylistController_.on("error",function(){ra.players[i.tech_.options_.playerId].error(i.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Oo.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Oo.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){returnthis.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){returnthis.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){returnthis.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){vare=1/(this.bandwidth||1),t=void0;returnt=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){ra.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(){returni.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){returni.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){returni.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){returni.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){returni.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){returni.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){returni.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){returni.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){returnns(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){returni.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){returni.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){returni.tech_.name_},enumerable:!0},duration:{get:function(){returni.tech_.duration()},enumerable:!0},master:{get:function(){returni.playlists.master},enumerable:!0},playerDimensions:{get:function(){returni.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){returnns(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){returnDate.now()},enumerable:!0},videoPlaybackQuality:{get:function(){returni.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!window.localStorage)return!1;vart=Mo();t=t?ra.mergeOptions(t,e):e;try{window.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(Fo){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(e){vart=e.playlists;e.representations=function(){returnt.master.playlists.filter(function(e){return!Da(e)}).map(function(t,i){returnnewAo(e,t,t.uri)})}}(i),Ro(i)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.tech_.ready(function(){returni.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(ra.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){vare=this,t=ra.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){vart,i;t=e.qualityLevels_,(i=e).representations().forEach(function(e){t.addQualityLevel(e)}),Do(t,i.playlists)}),this.playlists.on("mediachange",function(){Do(e.qualityLevels_,e.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){returnthis.masterPlaylistController_.duration()}},{key:"seekable",value:function(){returnthis.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(deletethis.player_.vhs,deletethis.player_.dash,deletethis.player_.hls),this.tech_&&this.tech_.hls&&deletethis.tech_.hls,functione(t,i,n){null===t&&(t=Function.prototype);varr=Object.getOwnPropertyDescriptor(t,i);if(void0===r){vara=Object.getPrototypeOf(t);returnnull===a?void0:e(a,i,n)}if("value"inr)returnr.value;vars=r.get;returnvoid0!==s?s.call(n):void0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(e,t){returnQa({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}},{key:"seekToProgramTime",value:function(e,t){vari=!(arguments.length>2&&void0!==arguments[2])||arguments[2],n=arguments.length>3&&void0!==arguments[3]?arguments[3]:2;returnJa({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),t}(),jo={name:"videojs-http-streaming",VERSION:"1.10.3",canHandleSource:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:{},i=ra.mergeOptions(ra.options,t);returnjo.canPlayType(e.type,i)},handleSource:function(e,t){vari=arguments.length>2&&void0!==arguments[2]?arguments[2]:{},n=ra.mergeOptions(ra.options,i);returnt.hls=newNo(e,t,n),t.hls.xhr=Va(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:{},i=ra.mergeOptions(ra.options,t).hls.overrideNative,n=Uo(e);returnn&&(!Oo.supportsTypeNatively(n)||i)?"maybe":""}};"undefined"!==typeofra.MediaSource&&"undefined"!==typeofra.URL||(ra.MediaSource=Us,ra.URL=Ds),Us.supportsNativeMediaSources()&&ra.getTech("Html5").registerSourceHandler(jo,0),ra.HlsHandler=No,ra.HlsSourceHandler=jo,ra.Hls=Oo,ra.use||ra.registerComponent("Hls",Oo),ra.options.hls=ra.options.hls||{},ra.registerPlugin?ra.registerPlugin("reloadSourceOnError",Io):ra.plugin("reloadSourceOnError",Io);t.a=ra}}]);//# sourceMappingURL=25.2d2641c2.chunk.js.map