!function(e,t){module.exports=t();}(commonjsGlobal,function(){varu="7.15.4",e="undefined"!=typeofglobalThis?globalThis:"undefined"!=typeofwindow?window:"undefined"!=typeofcommonjsGlobal?commonjsGlobal:"undefined"!=typeofself?self:{};functiont(e,t){returne(t={exports:{}},t.exports),t.exports}for(vari,_="undefined"!=typeofwindow?window:"undefined"!=typeofe?e:"undefined"!=typeofself?self:{},n={},a=function(e,t){returnn[e]=n[e]||[],t&&(n[e]=n[e].concat(t)),n[e]},r=function(e,t){t=a(e).indexOf(t);return!(t<=-1)&&(n[e]=n[e].slice(),n[e].splice(t,1),!0)},s="undefined"!=typeofe?e:"undefined"!=typeofwindow?window:{},o="undefined"!=typeofdocument?document:(o=s["__GLOBAL_DOCUMENT_CACHE@4"])||(s["__GLOBAL_DOCUMENT_CACHE@4"]={}),d=o,l={prefixed:!0},c=[["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"]],h=c[0],p=0;p<c.length;p++)if(c[p][1]ind){i=c[p];break}if(i){for(varf=0;f<i.length;f++)l[h[f]]=i[f];l.prefixed=i[0]!==h[0];}varm=[],g=function(a,s){returnfunction(e,t,i){varn,r=s.levels[t],t=newRegExp("^("+r+")$");"log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(a+":"),m&&(m.push([].concat(i)),n=m.length-1e3,m.splice(0,0<n?n:0)),!_.console||(n=!(n=_.console[e])&&"debug"===e?_.console.info||_.console.log:n)&&r&&t.test(e)&&n[Array.isArray(i)?"apply":"call"](_.console,i);}};vary=functiont(i){functionn(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];a("log",r,t);}varr="info",a=g(i,n);returnn.createLogger=function(e){returnt(i+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},n.level=function(e){if("string"==typeofe){if(!n.levels.hasOwnProperty(e))thrownewError('"'+e+'" in not a valid log level');r=e;}returnr},(n.history=function(){returnm?[].concat(m):[]}).filter=function(t){return(m||[]).filter(function(e){returnnewRegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){m&&(m.length=0);},n.history.disable=function(){null!==m&&(m.length=0,m=null);},n.history.enable=function(){null===m&&(m=[]);},n.error=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("error",r,t)},n.warn=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("warn",r,t)},n.debug=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("debug",r,t)},n}("VIDEOJS"),v=y.createLogger,b=t(function(e){functiont(){returne.exports=t=Object.assign||function(e){for(vart=1;t<arguments.length;t++){vari,n=arguments[t];for(iinn)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);}returne},t.apply(this,arguments)}e.exports=t;}),T=Object.prototype.toString,S=function(e){returnC(e)?Object.keys(e):[]};functionE(t,i){S(t).forEach(function(e){returni(t[e],e)});}functionk(i){for(vare=arguments.length,t=newArray(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];returnObject.assign?b.apply(void0,[i].concat(t)):(t.forEach(function(e){e&&E(e,function(e,t){i[t]=e;});}),i)}functionC(e){return!!e&&"object"==typeofe}functionw(e){returnC(e)&&"[object Object]"===T.call(e)&&e.constructor===Object}functionI(e,t){if(!e||!t)return"";if("function"!=typeof_.getComputedStyle)return"";vari;try{i=_.getComputedStyle(e);}catch(e){return""}returni?i.getPropertyValue(t)||i[t]:""}varx=_.navigator&&_.navigator.userAgent||"",A=/AppleWebKit\/([\d.]+)/i.exec(x),P=A?parseFloat(A.pop()):null,L=/iPod/i.test(x),D=(Kt=x.match(/OS (\d+)_/i))&&Kt[1]?Kt[1]:null,O=/Android/i.test(x),R=func
var$t=function(e){varn={};returne&&e.trim().split("\n").forEach(function(e){vart=e.indexOf(":"),i=e.slice(0,t).trim().toLowerCase(),t=e.slice(t+1).trim();"undefined"==typeofn[i]?n[i]=t:Array.isArray(n[i])?n[i].push(t):n[i]=[n[i],t];}),n},Jt=ei,P=ei;functionZt(e,t,i){varn=e;returnYt(t)?(i=t,"string"==typeofe&&(n={uri:e})):n=b({},t,{uri:e}),n.callback=i,n}functionei(e,t,i){returnti(t=Zt(e,t,i))}functionti(n){if("undefined"==typeofn.callback)thrownewError("callback argument missing");varr=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i));};functions(){vare=void0,e=l.response||l.responseText||function(e){try{if("document"===e.responseType)returne.responseXML;vart=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)returne.responseXML}catch(e){}returnnull}(l);if(m)try{e=JSON.parse(e);}catch(e){}returne}functiont(e){returnclearTimeout(u),(e=!(einstanceofError)?newError(""+(e||"Unknown XMLHttpRequest Error")):e).statusCode=0,a(e,g)}functione(){if(!o){clearTimeout(u);vare=n.useXDR&&void0===l.status?200:1223===l.status?204:l.status,t=g,i=null;return0!==e?(t={body:s(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(t.headers=$t(l.getAllResponseHeaders()))):i=newError("Internal XMLHttpRequest Error"),a(i,t,t.body)}}vari,o,u,l=n.xhr||null,c=(l=l||new(n.cors||n.useXDR?ei.XDomainRequest:ei.XMLHttpRequest)).url=n.uri||n.url,d=l.method=n.method||"GET",h=n.body||n.data,p=l.headers=n.headers||{},f=!!n.sync,m=!1,g={body:void0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"inn&&!1!==n.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===n.json?h:n.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(e,0);},l.onload=e,l.onerror=t,l.onprogress=function(){},l.onabort=function(){o=!0;},l.ontimeout=t,l.open(d,c,!f,n.username,n.password),f||(l.withCredentials=!!n.withCredentials),!f&&0<n.timeout&&(u=setTimeout(function(){vare;o||(o=!0,l.abort("timeout"),(e=newError("XMLHttpRequest timeout")).code="ETIMEDOUT",t(e));},n.timeout)),l.setRequestHeader)for(iinp)p.hasOwnProperty(i)&&l.setRequestHeader(i,p[i]);elseif(n.headers&&!function(e){for(vartine)if(e.hasOwnProperty(t))return;return1}(n.headers))thrownewError("Headers cannot be set on an XDomainRequest object");return"responseType"inn&&(l.responseType=n.responseType),"beforeSend"inn&&"function"==typeofn.beforeSend&&n.beforeSend(l),l.send(h||null),l}ei.XMLHttpRequest=_.XMLHttpRequest||function(){},ei.XDomainRequest="withCredentials"innewei.XMLHttpRequest?ei.XMLHttpRequest:_.XDomainRequest,function(e,t){for(vari=0;i<e.length;i++)t(e[i]);}(["get","put","post","patch","head","delete"],function(n){ei["delete"===n?"del":n]=function(e,t,i){return(t=Zt(e,t,i)).method=n.toUpperCase(),ti(t)};}),Jt.default=P;functionii(e,t){vari=new_.WebVTT.Parser(_,_.vttjs,_.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),0<n.length&&(_.console&&_.console.groupCollapsed&&_.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){returny.error(e)}),_.console&&_.console.groupEnd&&_.console.groupEnd()),i.flush();}functionni(e,n){vart={uri:e};(e=Ht(e))&&(t.cors=e),(e="use-credentials"===n.tech_.crossOrigin())&&(t.withCredentials=e),Jt(t,Xe(this,function(e,t,i){returne?y.error(e,t):(n.loaded_=!0,void("function"!=typeof_.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){return"vttjserror"!==e.type?ii(i,n):voidy.error("vttjs failed to load, stopping trying to process "+n.src)}):ii(i,n)))}));}varri=function(u){functione(e){vart;if(!(e=void0===e?{}:e).tech)thrownewError("A tech was not provided.");vare=pt(e,{kind:Gt[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Xt[e.mode]||"disabled",n=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(i=
/*! @name m3u8-parser @version 4.7.0 @license Apache-2.0 */functionlr(e){vart=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),e={};returnt[1]&&(e.length=parseInt(t[1],10)),t[2]&&(e.offset=parseInt(t[2],10)),e}functioncr(e){for(vart,i=e.split(newRegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),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]);returnn}functiondr(t){vari={};returnObject.keys(t).forEach(function(e){i[e.toLowerCase().replace(/-(\w)/g,function(e){returne[1].toUpperCase()})]=t[e];}),i}functionhr(e){vart,i,n,r,a=e.serverControl,s=e.targetDuration,o=e.partTargetDuration;a&&(t="#EXT-X-SERVER-CONTROL",i="holdBack",n="partHoldBack",r=s&&3*s,e=o&&2*o,s&&!a.hasOwnProperty(i)&&(a[i]=r,this.trigger("info",{message:t+" defaulting HOLD-BACK to targetDuration * 3 ("+r+")."})),r&&a[i]<r&&(this.trigger("warn",{message:t+" clamping HOLD-BACK ("+a[i]+") to targetDuration * 3 ("+r+")"}),a[i]=r),o&&!a.hasOwnProperty(n)&&(a[n]=3*o,this.trigger("info",{message:t+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+a[n]+")."})),o&&a[n]<e&&(this.trigger("warn",{message:t+" clamping PART-HOLD-BACK ("+a[n]+") to partTargetDuration * 2 ("+e+")."}),a[n]=e));}functionpr(e){returne&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})}functionfr(e){vare=(e=void0===e?"":e).split(","),a=[];returne.forEach(function(n){varr;n=n.trim(),Cr.forEach(function(e){vart,i=kr[e].exec(n.toLowerCase());!i||i.length<=1||(r=e,t=n.substring(0,i[1].length),i=n.replace(t,""),a.push({type:t,details:i,mediaType:e}));}),r||a.push({type:n,details:"",mediaType:"unknown"});}),a}functionmr(e){returnkr.audio.test((e=void0===e?"":e).trim().toLowerCase())}functiongr(e){if(e&&"string"==typeofe){vart=e.toLowerCase().split(",").map(function(e){returnpr(e.trim())}),i="video";1===t.length&&mr(t[0])?i="audio":1===t.length&&(n=t[0],kr.text.test((n=void0===n?"":n).trim().toLowerCase()))&&(i="application");varn="mp4";returnt.every(function(e){returnkr.mp4.test(e)})?n="mp4":t.every(function(e){returnkr.webm.test(e)})?n="webm":t.every(function(e){returnkr.ogg.test(e)})&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}}functionyr(e){returnvoid0===e&&(e=""),_.MediaSource&&_.MediaSource.isTypeSupported&&_.MediaSource.isTypeSupported(gr(e))||!1}functionvr(e){return(e=void0===e?"":e).toLowerCase().split(",").every(function(e){e=e.trim();for(vart=0;t<wr.length;t++)if(kr["muxer"+wr[t]].test(e))return!0;return!1})}function_r(e){returnxr.test(e)?"hls":Ar.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}varbr=function(t){functione(){vare=t.call(this)||this;returne.buffer="",e}returnvt(e,t),e.prototype.push=function(e){vart;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1);},e}(sr),Tr=String.fromCharCode(9),Sr=function(t){functione(){vare=t.call(this)||this;returne.customParsers=[],e.tagMappers=[],e}vt(e,t);vari=e.prototype;returni.push=function(i){varr,a,s=this;0!==(i=i.trim()).length&&("#"===i[0]?this.tagMappers.reduce(function(e,t){t=t(i);returnt===i?e:e.concat([t])},[i]).forEach(function(e){for(vart,i,n=0;n<s.customParsers.length;n++)if(s.customParsers[n].call(s,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),r=/^#EXTM3U/.exec(e))s.trigger("data",{type:"tag",tagType:"m3u"});else{if(r=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))returna={type:"tag",tagType:"inf"},r[1]&&(a.duration=parseFloat(r[1])),r[2]&&(a.title=r[2]),voids.trigger("data",a);if(r=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))returna={type:"tag",tagType:"targetduration"},r[1]&&(a.duration=parseInt(r[1],10)),voids.trigger("data",a);if(r=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))returna={type:"tag",tagType:"version"},r[1]&&(a.version=parseInt(r[1],10)),voids.trigger("data",a);if(r=/^#EXT-X-MEDIA-SEQUE
vare;n(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]));});}returnu.prototype.decryptChunk_=function(t,i,n,r){returnfunction(){vare=function(e,t,i){for(varn,r,a,s,o=newInt32Array(e.buffer,e.byteOffset,e.byteLength>>2),u=newm(Array.prototype.slice.call(t)),e=newUint8Array(e.byteLength),l=newInt32Array(e.buffer),c=i[0],d=i[1],h=i[2],p=i[3],f=0;f<o.length;f+=4)n=g(o[f]),r=g(o[f+1]),a=g(o[f+2]),s=g(o[f+3]),u.decrypt(n,r,a,s,l,f),l[f]=g(l[f]^c),l[f+1]=g(l[f+1]^d),l[f+2]=g(l[f+2]^h),l[f+3]=g(l[f+3]^p),c=n,d=r,h=a,p=s;returne}(t,i,n);r.set(e,t.byteOffset);}},t(u,null,[{key:"STEP",get:function(){return32e3}}]),u}();self.onmessage=function(e){varr=e.data,t=newUint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength),i=newUint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4),e=newUint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);newa(t,i,e,function(e,t){vari,n;self.postMessage((i={source:r.source,decrypted:t},n={},Object.keys(i).forEach(function(e){vart=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t;}),n),[t.buffer]);});};}))),Yl={AUDIO:function(s,o){returnfunction(){vare=o.segmentLoaders[s],t=o.mediaTypes[s],i=o.blacklistCurrentPlaylist;kl(e,t);varn=t.activeTrack(),e=t.activeGroup(),e=(e.filter(function(e){returne.default})[0]||e[0]).id,r=t.tracks[e];if(n!==r){for(varainir.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[a].enabled=t.tracks[a]===r;t.onTrackChanged();}elsei({message:"Problem encountered loading the default audio track."});}},SUBTITLES:function(i,n){returnfunction(){vare=n.segmentLoaders[i],t=n.mediaTypes[i];ir.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),kl(e,t);e=t.activeTrack();e&&(e.mode="disabled"),t.onTrackChanged();}}},Ql={AUDIO:function(e,t,i){varn,r,a;t&&(n=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",Yl[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",Yl[e](e,i));}},$l={AUDIO:function(e,t){vari,n,r=t.vhs,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,d=l.tracks,h=l.logger_,p=t.masterPlaylistLoader,f=Fo(p.master);for(iinu[e]&&0!==Object.keys(u[e]).length||(u[e]={main:{default:{default:!0}}},f&&(u[e].main.default.playlists=p.master.playlists)),u[e])for(varminc[i]||(c[i]=[]),u[e][i]){varg=u[e][i][m],y=void0,y=f?(h("AUDIO group '"+i+"' label '"+m+"' is a master playlist"),g.isMasterPlaylist=!0,null):"vhs-json"===a&&g.playlists?newZu(g.playlists[0],r,o):g.resolvedUri?newZu(g.resolvedUri,r,o):g.playlists&&"dash"===a?newnl(g.playlists[0],r,o,p):null,g=ir.mergeOptions({id:m,playlistLoader:y},g);Ql[e](e,g.playlistLoader,t),c[i].push(g),"undefined"==typeofd[m]&&(g=newir.AudioTrack({id:m,kind:(n=void0,n=(y=g).default?"main":"alternative",n=y.characteristics&&0<=y.characteristics.indexOf("public.accessibility.describes-video")?"main-desc":n),enabled:!1,language:g.language,default:g.default,label:m}),d[m]=g);}s.on("error",Yl[e](e,t));},SUBTITLES:function(e,t){vari,n=t.tech,r=t.vhs,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,d=l.tracks,h=t.masterPlaylistLoader;for(iinu[e])for(varpinc[i]||(c[i]=[]),u[e][i])if(!u[e][i][p].forced){varf=u[e][i][p],m=void0;if("hls"===a)m=newZu(f.resolvedUri,r,o);elseif("dash"===a){if(!f.playlists.filter(function(e){returne.excludeUntil!==1/0}).length)return;m=newnl(f.playlists[0],r,o,h);}else"vhs-json