!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t(require("global/window"),require("global/document")):"function"==typeofdefine&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(v,h){"use strict";v=v&&v.hasOwnProperty("default")?v.default:v,h=h&&h.hasOwnProperty("default")?h.default:h;vard="7.7.4",l=[],e=function(o,u){returnfunction(e,t,i){varn=u.levels[t],r=newRegExp("^("+n+")$");if("log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(o+":"),l){l.push([].concat(i));vars=l.length-1e3;l.splice(0,0<s?s:0)}if(v.console){vara=v.console[e];a||"debug"!==e||(a=v.console.info||v.console.log),a&&n&&r.test(e)&&a[Array.isArray(i)?"apply":"call"](v.console,i)}}};varp=functiont(i){functionn(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];r("log",s,t)}varr,s="info";returnr=e(i,n),n.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:s},n.level=function(e){if("string"==typeofe){if(!n.levels.hasOwnProperty(e))thrownewError('"'+e+'" in not a valid log level');s=e}returns},(n.history=function(){returnl?[].concat(l):[]}).filter=function(t){return(l||[]).filter(function(e){returnnewRegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){l&&(l.length=0)},n.history.disable=function(){null!==l&&(l.length=0,l=null)},n.history.enable=function(){null===l&&(l=[])},n.error=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("error",s,t)},n.warn=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("warn",s,t)},n.debug=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("debug",s,t)},n}("VIDEOJS"),f=p.createLogger;functiont(e,t){returne(t={exports:{}},t.exports),t.exports}varr=t(function(e){functiont(){returne.exports=t=Object.assign||function(e){for(vart=1;t<arguments.length;t++){vari=arguments[t];for(varnini)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}returne},t.apply(this,arguments)}e.exports=t}),i=Object.prototype.toString,s=function(e){returno(e)?Object.keys(e):[]};functiona(t,i){s(t).forEach(function(e){returni(t[e],e)})}functionm(i){for(vare=arguments.length,t=newArray(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];returnObject.assign?r.apply(void0,[i].concat(t)):(t.forEach(function(e){e&&a(e,function(e,t){i[t]=e})}),i)}functiono(e){return!!e&&"object"==typeofe}functionu(e){returno(e)&&"[object Object]"===i.call(e)&&e.constructor===Object}functionn(e,t){if(!e||!t)return"";if("function"!=typeofv.getComputedStyle)return"";vari=v.getComputedStyle(e);returni?i.getPropertyValue(t)||i[t]:""}functionc(e){return"string"==typeofe&&Boolean(e.trim())}functiong(e){if(0<=e.indexOf(" "))thrownewError("class has illegal whitespace characters")}functiony(){returnh===v.document}function_(e){returno(e)&&1===e.nodeType}functionb(){try{returnv.parent!==v.self}catch(e){return!0}}functionT(n){returnfunction(e,t){if(!c(e))returnh[n](null);c(t)&&(t=h.querySelector(t));vari=_(t)?t:h;returni[n]&&i[n](e)}}functionk(e,i,t,n){void0===e&&(e="div"),void0===i&&(i={}),void0===t&&(t={});varr=h.createElement(e);returnObject.getOwnPropertyNames(i).forEach(function(e){vart=i[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(p.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),r.setAttribute(e,t)):"textContent"===e?S(r,t):r[e]!==t&&(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),n&&q(r,n),r}functionS(e,t){return"undefined"==typeofe.textContent?e.innerText=t:e.textContent=t,e}functionC(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}functionE(e,t){returng(t),e.classList?e.classList.contains(t):function(e){returnnewRegExp("(^|\\s)"+e
varZa=function(e,t,i){returnt&&eo(e.prototype,t),i&&eo(e,i),e};functioneo(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)}}functionto(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)}functionio(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functionno(r,s){["AUDIO","SUBTITLES"].forEach(function(e){for(vartinr.mediaGroups[e])for(variinr.mediaGroups[e][t]){varn=r.mediaGroups[e][t][i];s(n,e,t,i)}})}functionro(e,t){vari=lo(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=lo(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),s=i;s<r;s++)n[s-i]=lo(e[s],n[s-i]);returnn}(n.segments,t.segments,t.mediaSequence-n.mediaSequence)),r.segments.forEach(function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=$a(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=$a(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=$a(t,e.map.uri))}(e,r.resolvedUri)});for(vars=0;s<i.playlists.length;s++)i.playlists[s].uri===t.uri&&(i.playlists[s]=r);returni.playlists[t.uri]=r,i}functionso(e){for(vart=e.playlists.length;t--;){vari=e.playlists[t];(e.playlists[i.uri]=i).resolvedUri=$a(e.uri,i.uri),i.id=t,i.attributes||(i.attributes={},co.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}}functionao(t){no(t,function(e){e.uri&&(e.resolvedUri=$a(t.uri,e.uri))})}functionoo(e,t){vari=e.segments[e.segments.length-1];returnt&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)}varuo=function(e,t){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnfunction(e,t){vari=[],n=!0,r=!1,s=void0;try{for(vara,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){r=!0,s=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throws}}returni}(e,t);thrownewTypeError("Invalid attempt to destructure non-iterable instance")},lo=Ir.mergeOptions,co=Ir.log,ho=(to(po,Ir.EventTarget),Za(po,[{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:500<=e.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){vari=this;this.request=null,this.state="HAVE_METADATA";varn=newVr;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||{};varr=ro(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(v.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=v.setTimeout(function(){i.trigger("mediaupdatetimeout")},oo(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),v.clearTimeout(this.mediaUpdateTimeout),v.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(i,e){varn=this;if(!i)returnthis.media_;if("HAVE_NOTHING"===this.state)thrownewError("Cannot switch media playlist from "+this.state);if("string"==typeofi){if(!this.master.playlists[i])thrownewError("Unknown playlist URI: "+i);i=this.master.playlist