You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
854 KiB
44 lines
854 KiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source visit the plugins github repository
|
|
*/
|
|
|
|
var As=Object.create;var Dr=Object.defineProperty,Ms=Object.defineProperties,Rs=Object.getOwnPropertyDescriptor,Cs=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertyNames,Kn=Object.getOwnPropertySymbols,Is=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Wn=(e,g,r)=>g in e?Dr(e,g,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[g]=r,rr=(e,g)=>{for(var r in g||(g={}))Yn.call(g,r)&&Wn(e,r,g[r]);if(Kn)for(var r of Kn(g))ws.call(g,r)&&Wn(e,r,g[r]);return e},Nr=(e,g)=>Ms(e,Cs(g)),zn=e=>Dr(e,"__esModule",{value:!0});var _o=typeof require!="undefined"?require:e=>{throw new Error('Dynamic require of "'+e+'" is not supported')};var sr=(e,g)=>()=>(g||e((g={exports:{}}).exports,g),g.exports),Ds=(e,g)=>{zn(e);for(var r in g)Dr(e,r,{get:g[r],enumerable:!0})},Ns=(e,g,r)=>{if(g&&typeof g=="object"||typeof g=="function")for(let t of bs(g))!Yn.call(e,t)&&t!=="default"&&Dr(e,t,{get:()=>g[t],enumerable:!(r=Rs(g,t))||r.enumerable});return e},Jt=e=>Ns(zn(Dr(e!=null?As(Is(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Bt=(e,g,r)=>new Promise((t,p)=>{var i=f=>{try{n(r.next(f))}catch(h){p(h)}},o=f=>{try{n(r.throw(f))}catch(h){p(h)}},n=f=>f.done?t(f.value):Promise.resolve(f.value).then(i,o);n((r=r.apply(e,g)).next())});var Pr=sr(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});function qn(e,g){if(g)return e;throw new Error("Unhandled discriminated union member: "+JSON.stringify(e))}Gr.assertNever=qn;Gr.default=qn});var Kr=sr((Vr,Xn)=>{(function(e,g){typeof Vr=="object"&&typeof Xn!="undefined"?g(Vr):typeof define=="function"&&define.amd?define(["exports"],g):(e=typeof globalThis!="undefined"?globalThis:e||self,g(e["@tinyfe/parseUnit"]={}))})(Vr,function(e){"use strict";let g="(v[h|w|min|max]|p[c|t|x]|[re|e|c|m]m|[l|c]h|%|in|Q|ex)",r=new RegExp(g),t=["auto","revert","unset","inherit","initial","max-content","min-content","fit-content","-webkit-fill-available"];function p(o){return r.test(i(o)[1])}function i(o,n={}){let{onlyValue:f=!1,onlyUnit:h=!1}=n;if(typeof o=="number")return f?o:h?"":[o,""];let m=[0,""];if(t.includes(o))return[o,""];o=String(o);let u=parseFloat(o),_=o.match(/[\d.\-\+]*\s*(.*)/)[1];return m=[u,_],f?u:h?_:m}e.cssUnit=g,e.cssUnitRegex=r,e.default=i,e.isCssValue=p,Object.defineProperty(e,"__esModule",{value:!0})})});var na=sr((ko,ra)=>{"use strict";ra.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,g=>`%${g.charCodeAt(0).toString(16).toUpperCase()}`)});var la=sr((Bo,oa)=>{"use strict";var aa="%[a-f0-9]{2}",ia=new RegExp(aa,"gi"),sa=new RegExp("("+aa+")+","gi");function cn(e,g){try{return decodeURIComponent(e.join(""))}catch(p){}if(e.length===1)return e;g=g||1;var r=e.slice(0,g),t=e.slice(g);return Array.prototype.concat.call([],cn(r),cn(t))}function Ps(e){try{return decodeURIComponent(e)}catch(t){for(var g=e.match(ia),r=1;r<g.length;r++)e=cn(g,r).join(""),g=e.match(ia);return e}}function Os(e){for(var g={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=sa.exec(e);r;){try{g[r[0]]=decodeURIComponent(r[0])}catch(n){var t=Ps(r[0]);t!==r[0]&&(g[r[0]]=t)}r=sa.exec(e)}g["%C2"]="\uFFFD";for(var p=Object.keys(g),i=0;i<p.length;i++){var o=p[i];e=e.replace(new RegExp(o,"g"),g[o])}return e}oa.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(g){return Os(e)}}});var fa=sr((Uo,ua)=>{"use strict";ua.exports=(e,g)=>{if(!(typeof e=="string"&&typeof g=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(g==="")return[e];let r=e.indexOf(g);return r===-1?[e]:[e.slice(0,r),e.slice(r+g.length)]}});var ca=sr((Ho,da)=>{"use strict";da.exports=function(e,g){for(var r={},t=Object.keys(e),p=Array.isArray(g),i=0;i<t.length;i++){var o=t[i],n=e[o];(p?g.indexOf(o)!==-1:g(o,n,e))&&(r[o]=n)}return r}});var zr=sr(or=>{"use strict";var Ls=na(),Fs=la(),ha=fa(),xs=ca(),ks=e=>e==null,hn=Symbol("encodeFragmentIdentifier");function Bs(e){switch(e.arrayFormat){case"index":return g=>(r,t)=>{let p=r.length;return t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,[tr(g,e),"[",p,"]"].join("")]:[...r,[tr(g,e),"[",tr(p,e),"]=",tr(t,e)].join("")]};case"bracket":return g=>(r,t)=>t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,[tr(g,e),"[]"].join("")]:[...r,[tr(g,e),"[]=",tr(t,e)].join("")];case"comma":case"separator":case"bracket-separator":{let g=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(t,p)=>p===void 0||e.skipNull&&p===null||e.skipEmptyString&&p===""?t:(p=p===null?"":p,t.length===0?[[tr(r,e),g,tr(p,e)].join("")]:[[t,tr(p,e)].join(e.arrayFormatSeparator)])}default:return g=>(r,t)=>t===void 0||e.skipNull&&t===null||e.skipEmptyString&&t===""?r:t===null?[...r,tr(g,e)]:[...r,[tr(g,e),"=",tr(t,e)].join("")]}}function Us(e){let g;switch(e.arrayFormat){case"index":return(r,t,p)=>{if(g=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!g){p[r]=t;return}p[r]===void 0&&(p[r]={}),p[r][g[1]]=t};case"bracket":return(r,t,p)=>{if(g=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!g){p[r]=t;return}if(p[r]===void 0){p[r]=[t];return}p[r]=[].concat(p[r],t)};case"comma":case"separator":return(r,t,p)=>{let i=typeof t=="string"&&t.includes(e.arrayFormatSeparator),o=typeof t=="string"&&!i&&Er(t,e).includes(e.arrayFormatSeparator);t=o?Er(t,e):t;let n=i||o?t.split(e.arrayFormatSeparator).map(f=>Er(f,e)):t===null?t:Er(t,e);p[r]=n};case"bracket-separator":return(r,t,p)=>{let i=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!i){p[r]=t&&Er(t,e);return}let o=t===null?[]:t.split(e.arrayFormatSeparator).map(n=>Er(n,e));if(p[r]===void 0){p[r]=o;return}p[r]=[].concat(p[r],o)};default:return(r,t,p)=>{if(p[r]===void 0){p[r]=t;return}p[r]=[].concat(p[r],t)}}}function ga(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function tr(e,g){return g.encode?g.strict?Ls(e):encodeURIComponent(e):e}function Er(e,g){return g.decode?Fs(e):e}function ma(e){return Array.isArray(e)?e.sort():typeof e=="object"?ma(Object.keys(e)).sort((g,r)=>Number(g)-Number(r)).map(g=>e[g]):e}function pa(e){let g=e.indexOf("#");return g!==-1&&(e=e.slice(0,g)),e}function Hs(e){let g="",r=e.indexOf("#");return r!==-1&&(g=e.slice(r)),g}function va(e){e=pa(e);let g=e.indexOf("?");return g===-1?"":e.slice(g+1)}function ya(e,g){return g.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):g.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function Ea(e,g){g=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},g),ga(g.arrayFormatSeparator);let r=Us(g),t=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return t;for(let p of e.split("&")){if(p==="")continue;let[i,o]=ha(g.decode?p.replace(/\+/g," "):p,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(g.arrayFormat)?o:Er(o,g),r(Er(i,g),o,t)}for(let p of Object.keys(t)){let i=t[p];if(typeof i=="object"&&i!==null)for(let o of Object.keys(i))i[o]=ya(i[o],g);else t[p]=ya(i,g)}return g.sort===!1?t:(g.sort===!0?Object.keys(t).sort():Object.keys(t).sort(g.sort)).reduce((p,i)=>{let o=t[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?p[i]=ma(o):p[i]=o,p},Object.create(null))}or.extract=va;or.parse=Ea;or.stringify=(e,g)=>{if(!e)return"";g=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},g),ga(g.arrayFormatSeparator);let r=o=>g.skipNull&&ks(e[o])||g.skipEmptyString&&e[o]==="",t=Bs(g),p={};for(let o of Object.keys(e))r(o)||(p[o]=e[o]);let i=Object.keys(p);return g.sort!==!1&&i.sort(g.sort),i.map(o=>{let n=e[o];return n===void 0?"":n===null?tr(o,g):Array.isArray(n)?n.length===0&&g.arrayFormat==="bracket-separator"?tr(o,g)+"[]":n.reduce(t(o),[]).join("&"):tr(o,g)+"="+tr(n,g)}).filter(o=>o.length>0).join("&")};or.parseUrl=(e,g)=>{g=Object.assign({decode:!0},g);let[r,t]=ha(e,"#");return Object.assign({url:r.split("?")[0]||"",query:Ea(va(e),g)},g&&g.parseFragmentIdentifier&&t?{fragmentIdentifier:Er(t,g)}:{})};or.stringifyUrl=(e,g)=>{g=Object.assign({encode:!0,strict:!0,[hn]:!0},g);let r=pa(e.url).split("?")[0]||"",t=or.extract(e.url),p=or.parse(t,{sort:!1}),i=Object.assign(p,e.query),o=or.stringify(i,g);o&&(o=`?${o}`);let n=Hs(e.url);return e.fragmentIdentifier&&(n=`#${g[hn]?tr(e.fragmentIdentifier,g):e.fragmentIdentifier}`),`${r}${o}${n}`};or.pick=(e,g,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[hn]:!1},r);let{url:t,query:p,fragmentIdentifier:i}=or.parseUrl(e,r);return or.stringifyUrl({url:t,query:xs(p,g),fragmentIdentifier:i},r)};or.exclude=(e,g,r)=>{let t=Array.isArray(g)?p=>!g.includes(p):(p,i)=>!g(p,i);return or.pick(e,t,r)}});var Ta=sr((Vo,_a)=>{"use strict";_a.exports=function(g,r){if(r=r.split(":")[0],g=+g,!g)return!1;switch(r){case"http":case"ws":return g!==80;case"https":case"wss":return g!==443;case"ftp":return g!==21;case"gopher":return g!==70;case"file":return!1}return g!==0}});var Ma=sr(gn=>{"use strict";var Gs=Object.prototype.hasOwnProperty,Vs;function Sa(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(g){return null}}function Aa(e){try{return encodeURIComponent(e)}catch(g){return null}}function Ks(e){for(var g=/([^=?#&]+)=?([^&]*)/g,r={},t;t=g.exec(e);){var p=Sa(t[1]),i=Sa(t[2]);p===null||i===null||p in r||(r[p]=i)}return r}function Ys(e,g){g=g||"";var r=[],t,p;typeof g!="string"&&(g="?");for(p in e)if(Gs.call(e,p)){if(t=e[p],!t&&(t===null||t===Vs||isNaN(t))&&(t=""),p=Aa(p),t=Aa(t),p===null||t===null)continue;r.push(p+"="+t)}return r.length?g+r.join("&"):""}gn.stringify=Ys;gn.parse=Ks});var Da=sr((Yo,wa)=>{"use strict";var Ra=Ta(),qr=Ma(),Ws=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,zs=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,qs=/^[a-zA-Z]:/,Xs="[\\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]",js=new RegExp("^"+Xs+"+");function mn(e){return(e||"").toString().replace(js,"")}var pn=[["#","hash"],["?","query"],function(g,r){return _r(r.protocol)?g.replace(/\\/g,"/"):g},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Ca={hash:1,query:1};function ba(e){var g;typeof window!="undefined"?g=window:typeof global!="undefined"?g=global:typeof self!="undefined"?g=self:g={};var r=g.location||{};e=e||r;var t={},p=typeof e,i;if(e.protocol==="blob:")t=new mr(unescape(e.pathname),{});else if(p==="string"){t=new mr(e,{});for(i in Ca)delete t[i]}else if(p==="object"){for(i in e)i in Ca||(t[i]=e[i]);t.slashes===void 0&&(t.slashes=Ws.test(e.href))}return t}function _r(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function Ia(e,g){e=mn(e),g=g||{};var r=zs.exec(e),t=r[1]?r[1].toLowerCase():"",p=!!r[2],i=!!r[3],o=0,n;return p?i?(n=r[2]+r[3]+r[4],o=r[2].length+r[3].length):(n=r[2]+r[4],o=r[2].length):i?(n=r[3]+r[4],o=r[3].length):n=r[4],t==="file:"?o>=2&&(n=n.slice(2)):_r(t)?n=r[4]:t?p&&(n=n.slice(2)):o>=2&&_r(g.protocol)&&(n=r[4]),{protocol:t,slashes:p||_r(t),slashesCount:o,rest:n}}function Qs(e,g){if(e==="")return g;for(var r=(g||"/").split("/").slice(0,-1).concat(e.split("/")),t=r.length,p=r[t-1],i=!1,o=0;t--;)r[t]==="."?r.splice(t,1):r[t]===".."?(r.splice(t,1),o++):o&&(t===0&&(i=!0),r.splice(t,1),o--);return i&&r.unshift(""),(p==="."||p==="..")&&r.push(""),r.join("/")}function mr(e,g,r){if(e=mn(e),!(this instanceof mr))return new mr(e,g,r);var t,p,i,o,n,f,h=pn.slice(),m=typeof g,u=this,_=0;for(m!=="object"&&m!=="string"&&(r=g,g=null),r&&typeof r!="function"&&(r=qr.parse),g=ba(g),p=Ia(e||"",g),t=!p.protocol&&!p.slashes,u.slashes=p.slashes||t&&g.slashes,u.protocol=p.protocol||g.protocol||"",e=p.rest,(p.protocol==="file:"&&(p.slashesCount!==2||qs.test(e))||!p.slashes&&(p.protocol||p.slashesCount<2||!_r(u.protocol)))&&(h[3]=[/(.*)/,"pathname"]);_<h.length;_++){if(o=h[_],typeof o=="function"){e=o(e,u);continue}i=o[0],f=o[1],i!==i?u[f]=e:typeof i=="string"?~(n=e.indexOf(i))&&(typeof o[2]=="number"?(u[f]=e.slice(0,n),e=e.slice(n+o[2])):(u[f]=e.slice(n),e=e.slice(0,n))):(n=i.exec(e))&&(u[f]=n[1],e=e.slice(0,n.index)),u[f]=u[f]||t&&o[3]&&g[f]||"",o[4]&&(u[f]=u[f].toLowerCase())}r&&(u.query=r(u.query)),t&&g.slashes&&u.pathname.charAt(0)!=="/"&&(u.pathname!==""||g.pathname!=="")&&(u.pathname=Qs(u.pathname,g.pathname)),u.pathname.charAt(0)!=="/"&&_r(u.protocol)&&(u.pathname="/"+u.pathname),Ra(u.port,u.protocol)||(u.host=u.hostname,u.port=""),u.username=u.password="",u.auth&&(o=u.auth.split(":"),u.username=o[0]||"",u.password=o[1]||""),u.origin=u.protocol!=="file:"&&_r(u.protocol)&&u.host?u.protocol+"//"+u.host:"null",u.href=u.toString()}function $s(e,g,r){var t=this;switch(e){case"query":typeof g=="string"&&g.length&&(g=(r||qr.parse)(g)),t[e]=g;break;case"port":t[e]=g,Ra(g,t.protocol)?g&&(t.host=t.hostname+":"+g):(t.host=t.hostname,t[e]="");break;case"hostname":t[e]=g,t.port&&(g+=":"+t.port),t.host=g;break;case"host":t[e]=g,/:\d+$/.test(g)?(g=g.split(":"),t.port=g.pop(),t.hostname=g.join(":")):(t.hostname=g,t.port="");break;case"protocol":t.protocol=g.toLowerCase(),t.slashes=!r;break;case"pathname":case"hash":if(g){var p=e==="pathname"?"/":"#";t[e]=g.charAt(0)!==p?p+g:g}else t[e]=g;break;default:t[e]=g}for(var i=0;i<pn.length;i++){var o=pn[i];o[4]&&(t[o[1]]=t[o[1]].toLowerCase())}return t.origin=t.protocol!=="file:"&&_r(t.protocol)&&t.host?t.protocol+"//"+t.host:"null",t.href=t.toString(),t}function Js(e){(!e||typeof e!="function")&&(e=qr.stringify);var g,r=this,t=r.protocol;t&&t.charAt(t.length-1)!==":"&&(t+=":");var p=t+(r.slashes||_r(r.protocol)?"//":"");return r.username&&(p+=r.username,r.password&&(p+=":"+r.password),p+="@"),p+=r.host+r.pathname,g=typeof r.query=="object"?e(r.query):r.query,g&&(p+=g.charAt(0)!=="?"?"?"+g:g),r.hash&&(p+=r.hash),p}mr.prototype={set:$s,toString:Js};mr.extractProtocol=Ia;mr.location=ba;mr.trimLeft=mn;mr.qs=qr;wa.exports=mr});var Pa=sr(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var eo=function(){function e(g,r){for(var t=0;t<r.length;t++){var p=r[t];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}return function(g,r,t){return r&&e(g.prototype,r),t&&e(g,t),g}}();function to(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var Na=function(){function e(g){to(this,e),this.resource=g}return eo(e,[{key:"blobToBuffer",value:function(){var r=this;return new Promise(function(t,p){var i=new FileReader;i.addEventListener("loadend",function(o){var n=o.target.result;t(new Uint8Array(n))}),i.addEventListener("error",function(){return p("Error while reading the Blob object")}),i.readAsArrayBuffer(r.resource)})}},{key:"getURL",value:function(){var r=this;return new Promise(function(t,p){return r.resource instanceof Blob?FileReader?TextDecoder?e.blobToString(r.resource,function(i){var o=`WEBVTT FILE\r
|
|
\r
|
|
`,n=o.concat(e.toVTT(i)),f=new Blob([n],{type:"text/vtt"});return r.objectURL=URL.createObjectURL(f),t(r.objectURL)},function(){r.blobToBuffer().then(function(i){var o=new TextDecoder("utf-8").decode(i),n=`WEBVTT FILE\r
|
|
\r
|
|
`,f=n.concat(e.toVTT(o)),h=new Blob([f],{type:"text/vtt"});return r.objectURL=URL.createObjectURL(h),t(r.objectURL)})}):p("No TextDecoder constructor found"):p("No FileReader constructor found"):p("Expecting resource to be a Blob but something else found.")})}},{key:"release",value:function(){URL.createObjectURL(this.objectURL)}}],[{key:"blobToString",value:function(r,t,p){var i=new FileReader;i.addEventListener("loadend",function(o){var n=o.target.result;t(n)}),i.addEventListener("error",function(){return p()}),i.readAsText(r)}},{key:"toVTT",value:function(r){return r.replace(/\{\\([ibu])\}/g,"</$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"</$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat(`\r
|
|
\r
|
|
`)}},{key:"toTypedArray",value:function(r){var t=[];return r.split("").forEach(function(p){t.push(parseInt(p.charCodeAt(),16))}),Uint8Array.from(t)}}]),e}();window.WebVTTConverter=Na;vn.default=Na});var Ua=sr((An,Mn)=>{typeof navigator=="object"&&function(e,g){typeof An=="object"&&typeof Mn!="undefined"?Mn.exports=g():typeof define=="function"&&define.amd?define("Plyr",g):(e=typeof globalThis!="undefined"?globalThis:e||self).Plyr=g()}(An,function(){"use strict";function e(S,z,F){return z in S?Object.defineProperty(S,z,{value:F,enumerable:!0,configurable:!0,writable:!0}):S[z]=F,S}function g(S,z){for(var F=0;F<z.length;F++){var q=z[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(S,q.key,q)}}function r(S,z,F){return z in S?Object.defineProperty(S,z,{value:F,enumerable:!0,configurable:!0,writable:!0}):S[z]=F,S}function t(S,z){var F=Object.keys(S);if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(S);z&&(q=q.filter(function(fe){return Object.getOwnPropertyDescriptor(S,fe).enumerable})),F.push.apply(F,q)}return F}function p(S){for(var z=1;z<arguments.length;z++){var F=arguments[z]!=null?arguments[z]:{};z%2?t(Object(F),!0).forEach(function(q){r(S,q,F[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(F)):t(Object(F)).forEach(function(q){Object.defineProperty(S,q,Object.getOwnPropertyDescriptor(F,q))})}return S}var i={addCSS:!0,thumbWidth:15,watch:!0};function o(S,z){return function(){return Array.from(document.querySelectorAll(z)).includes(this)}.call(S,z)}var n=function(S){return S!=null?S.constructor:null},f=function(S,z){return!!(S&&z&&S instanceof z)},h=function(S){return S==null},m=function(S){return n(S)===Object},u=function(S){return n(S)===String},_=function(S){return Array.isArray(S)},C=function(S){return f(S,NodeList)},k=u,R=_,P=C,w=function(S){return f(S,Element)},H=function(S){return f(S,Event)},N=function(S){return h(S)||(u(S)||_(S)||C(S))&&!S.length||m(S)&&!Object.keys(S).length};function A(S,z){if(1>z){var F=function(q){var fe="".concat(q).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return fe?Math.max(0,(fe[1]?fe[1].length:0)-(fe[2]?+fe[2]:0)):0}(z);return parseFloat(S.toFixed(F))}return Math.round(S/z)*z}var M=function(){function S(z,F){(function(q,fe){if(!(q instanceof fe))throw new TypeError("Cannot call a class as a function")})(this,S),w(z)?this.element=z:k(z)&&(this.element=document.querySelector(z)),w(this.element)&&N(this.element.rangeTouch)&&(this.config=p({},i,{},F),this.init())}return function(z,F,q){F&&g(z.prototype,F),q&&g(z,q)}(S,[{key:"init",value:function(){S.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){S.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(z){var F=this,q=z?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(fe){F.element[q](fe,function(ge){return F.set(ge)},!1)})}},{key:"get",value:function(z){if(!S.enabled||!H(z))return null;var F,q=z.target,fe=z.changedTouches[0],ge=parseFloat(q.getAttribute("min"))||0,Me=parseFloat(q.getAttribute("max"))||100,ke=parseFloat(q.getAttribute("step"))||1,$e=q.getBoundingClientRect(),gt=100/$e.width*(this.config.thumbWidth/2)/100;return 0>(F=100/$e.width*(fe.clientX-$e.left))?F=0:100<F&&(F=100),50>F?F-=(100-2*F)*gt:50<F&&(F+=2*(F-50)*gt),ge+A(F/100*(Me-ge),ke)}},{key:"set",value:function(z){S.enabled&&H(z)&&!z.target.disabled&&(z.preventDefault(),z.target.value=this.get(z),function(F,q){if(F&&q){var fe=new Event(q,{bubbles:!0});F.dispatchEvent(fe)}}(z.target,z.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(z){var F=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},q=null;if(N(z)||k(z)?q=Array.from(document.querySelectorAll(k(z)?z:'input[type="range"]')):w(z)?q=[z]:P(z)?q=Array.from(z):R(z)&&(q=z.filter(w)),N(q))return null;var fe=p({},i,{},F);if(k(z)&&fe.watch){var ge=new MutationObserver(function(Me){Array.from(Me).forEach(function(ke){Array.from(ke.addedNodes).forEach(function($e){w($e)&&o($e,z)&&new S($e,fe)})})});ge.observe(document.body,{childList:!0,subtree:!0})}return q.map(function(Me){return new S(Me,F)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),S}();let I=S=>S!=null?S.constructor:null,D=(S,z)=>Boolean(S&&z&&S instanceof z),v=S=>S==null,T=S=>I(S)===Object,W=S=>I(S)===String,O=S=>I(S)===Function,B=S=>Array.isArray(S),L=S=>D(S,NodeList),K=S=>v(S)||(W(S)||B(S)||L(S))&&!S.length||T(S)&&!Object.keys(S).length;var x=v,U=T,Y=S=>I(S)===Number&&!Number.isNaN(S),oe=W,ue=S=>I(S)===Boolean,re=O,ve=B,ce=L,se=S=>S!==null&&typeof S=="object"&&S.nodeType===1&&typeof S.style=="object"&&typeof S.ownerDocument=="object",J=S=>D(S,Event),ee=S=>D(S,KeyboardEvent),ie=S=>D(S,TextTrack)||!v(S)&&W(S.kind),me=S=>D(S,Promise)&&O(S.then),de=S=>{if(D(S,window.URL))return!0;if(!W(S))return!1;let z=S;S.startsWith("http://")&&S.startsWith("https://")||(z=`http://${S}`);try{return!K(new URL(z).hostname)}catch(F){return!1}},Q=K;let X=(()=>{let S=document.createElement("span"),z={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},F=Object.keys(z).find(q=>S.style[q]!==void 0);return!!oe(F)&&z[F]})();function j(S,z){setTimeout(()=>{try{S.hidden=!0,S.offsetHeight,S.hidden=!1}catch(F){}},z)}let le={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function G(S,z){return z.split(".").reduce((F,q)=>F&&F[q],S)}function c(S={},...z){if(!z.length)return S;let F=z.shift();return U(F)?(Object.keys(F).forEach(q=>{U(F[q])?(Object.keys(S).includes(q)||Object.assign(S,{[q]:{}}),c(S[q],F[q])):Object.assign(S,{[q]:F[q]})}),c(S,...z)):S}function E(S,z){let F=S.length?S:[S];Array.from(F).reverse().forEach((q,fe)=>{let ge=fe>0?z.cloneNode(!0):z,Me=q.parentNode,ke=q.nextSibling;ge.appendChild(q),ke?Me.insertBefore(ge,ke):Me.appendChild(ge)})}function b(S,z){se(S)&&!Q(z)&&Object.entries(z).filter(([,F])=>!x(F)).forEach(([F,q])=>S.setAttribute(F,q))}function l(S,z,F){let q=document.createElement(S);return U(z)&&b(q,z),oe(F)&&(q.innerText=F),q}function d(S,z,F,q){se(z)&&z.appendChild(l(S,F,q))}function y(S){ce(S)||ve(S)?Array.from(S).forEach(y):se(S)&&se(S.parentNode)&&S.parentNode.removeChild(S)}function V(S){if(!se(S))return;let{length:z}=S.childNodes;for(;z>0;)S.removeChild(S.lastChild),z-=1}function te(S,z){return se(z)&&se(z.parentNode)&&se(S)?(z.parentNode.replaceChild(S,z),S):null}function $(S,z){if(!oe(S)||Q(S))return{};let F={},q=c({},z);return S.split(",").forEach(fe=>{let ge=fe.trim(),Me=ge.replace(".",""),ke=ge.replace(/[[\]]/g,"").split("="),[$e]=ke,gt=ke.length>1?ke[1].replace(/["']/g,""):"";switch(ge.charAt(0)){case".":oe(q.class)?F.class=`${q.class} ${Me}`:F.class=Me;break;case"#":F.id=ge.replace("#","");break;case"[":F[$e]=gt}}),c(q,F)}function ae(S,z){if(!se(S))return;let F=z;ue(F)||(F=!S.hidden),S.hidden=F}function ne(S,z,F){if(ce(S))return Array.from(S).map(q=>ne(q,z,F));if(se(S)){let q="toggle";return F!==void 0&&(q=F?"add":"remove"),S.classList[q](z),S.classList.contains(z)}return!1}function Se(S,z){return se(S)&&S.classList.contains(z)}function Ie(S,z){let{prototype:F}=Element;return(F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.msMatchesSelector||function(){return Array.from(document.querySelectorAll(z)).includes(this)}).call(S,z)}function he(S){return this.elements.container.querySelectorAll(S)}function ye(S){return this.elements.container.querySelector(S)}function _e(S=null,z=!1){se(S)&&(S.focus({preventScroll:!0}),z&&ne(S,this.config.classNames.tabFocus))}let pe={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},De={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(S,z,F){let q=le.isIPhone&&F&&De.playsinline,fe=De[S]||z!=="html5";return{api:fe,ui:fe&&De.rangeInput&&(S!=="video"||!le.isIPhone||q)}},pip:!(le.isIPhone||!re(l("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||l("video").disablePictureInPicture)),airplay:re(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(S){if(Q(S))return!1;let[z]=S.split("/"),F=S;if(!this.isHTML5||z!==this.type)return!1;Object.keys(pe).includes(F)&&(F+=`; codecs="${pe[S]}"`);try{return Boolean(F&&this.media.canPlayType(F).replace(/no/,""))}catch(q){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{let S=document.createElement("input");return S.type="range",S.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:X!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},je=(()=>{let S=!1;try{let z=Object.defineProperty({},"passive",{get:()=>(S=!0,null)});window.addEventListener("test",null,z),window.removeEventListener("test",null,z)}catch(z){}return S})();function Fe(S,z,F,q=!1,fe=!0,ge=!1){if(!S||!("addEventListener"in S)||Q(z)||!re(F))return;let Me=z.split(" "),ke=ge;je&&(ke={passive:fe,capture:ge}),Me.forEach($e=>{this&&this.eventListeners&&q&&this.eventListeners.push({element:S,type:$e,callback:F,options:ke}),S[q?"addEventListener":"removeEventListener"]($e,F,ke)})}function Le(S,z="",F,q=!0,fe=!1){Fe.call(this,S,z,F,!0,q,fe)}function Ve(S,z="",F,q=!0,fe=!1){Fe.call(this,S,z,F,!1,q,fe)}function Ge(S,z="",F,q=!0,fe=!1){let ge=(...Me)=>{Ve(S,z,ge,q,fe),F.apply(this,Me)};Fe.call(this,S,z,ge,!0,q,fe)}function we(S,z="",F=!1,q={}){if(!se(S)||Q(z))return;let fe=new CustomEvent(z,{bubbles:F,detail:{...q,plyr:this}});S.dispatchEvent(fe)}function at(){this&&this.eventListeners&&(this.eventListeners.forEach(S=>{let{element:z,type:F,callback:q,options:fe}=S;z.removeEventListener(F,q,fe)}),this.eventListeners=[])}function Re(){return new Promise(S=>this.ready?setTimeout(S,0):Le.call(this,this.elements.container,"ready",S)).then(()=>{})}function Xe(S){me(S)&&S.then(null,()=>{})}function lt(S){return ve(S)?S.filter((z,F)=>S.indexOf(z)===F):S}function ct(S,z){return ve(S)&&S.length?S.reduce((F,q)=>Math.abs(q-z)<Math.abs(F-z)?q:F):null}function tt(S){return!(!window||!window.CSS)&&window.CSS.supports(S)}let St=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((S,[z,F])=>({...S,[z/F]:[z,F]}),{});function Ct(S){return ve(S)||oe(S)&&S.includes(":")?(ve(S)?S:S.split(":")).map(Number).every(Y):!1}function wt(S){if(!ve(S)||!S.every(Y))return null;let[z,F]=S,q=(ge,Me)=>Me===0?ge:q(Me,ge%Me),fe=q(z,F);return[z/fe,F/fe]}function We(S){let z=q=>Ct(q)?q.split(":").map(Number):null,F=z(S);if(F===null&&(F=z(this.config.ratio)),F===null&&!Q(this.embed)&&ve(this.embed.ratio)&&({ratio:F}=this.embed),F===null&&this.isHTML5){let{videoWidth:q,videoHeight:fe}=this.media;F=[q,fe]}return wt(F)}function He(S){if(!this.isVideo)return{};let{wrapper:z}=this.elements,F=We.call(this,S);if(!ve(F))return{};let[q,fe]=wt(F),ge=100/q*fe;if(tt(`aspect-ratio: ${q}/${fe}`)?z.style.aspectRatio=`${q}/${fe}`:z.style.paddingBottom=`${ge}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){let Me=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),ke=(Me-ge)/(Me/50);this.fullscreen.active?z.style.paddingBottom=null:this.media.style.transform=`translateY(-${ke}%)`}else this.isHTML5&&z.classList.add(this.config.classNames.videoFixedRatio);return{padding:ge,ratio:F}}function ze(S,z,F=.05){let q=S/z,fe=ct(Object.keys(St),q);return Math.abs(fe-q)<=F?St[fe]:[S,z]}let mt={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(S=>{let z=S.getAttribute("type");return!!Q(z)||De.mime.call(this,z)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:mt.getSources.call(this).map(S=>Number(S.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;let S=this;S.options.speed=S.config.speed.options,Q(this.config.ratio)||He.call(S),Object.defineProperty(S.media,"quality",{get(){let z=mt.getSources.call(S).find(F=>F.getAttribute("src")===S.source);return z&&Number(z.getAttribute("size"))},set(z){if(S.quality!==z){if(S.config.quality.forced&&re(S.config.quality.onChange))S.config.quality.onChange(z);else{let F=mt.getSources.call(S).find($e=>Number($e.getAttribute("size"))===z);if(!F)return;let{currentTime:q,paused:fe,preload:ge,readyState:Me,playbackRate:ke}=S.media;S.media.src=F.getAttribute("src"),(ge!=="none"||Me)&&(S.once("loadedmetadata",()=>{S.speed=ke,S.currentTime=q,fe||Xe(S.play())}),S.media.load())}we.call(S,S.media,"qualitychange",!1,{quality:z})}}})},cancelRequests(){this.isHTML5&&(y(mt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function vt(S,...z){return Q(S)?S:S.toString().replace(/{(\d+)}/g,(F,q)=>z[q].toString())}let pt=(S="",z="",F="")=>S.replace(new RegExp(z.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),F.toString()),Rt=(S="")=>S.toString().replace(/\w\S*/g,z=>z.charAt(0).toUpperCase()+z.substr(1).toLowerCase());function Ce(S=""){let z=S.toString();return z=function(F=""){let q=F.toString();return q=pt(q,"-"," "),q=pt(q,"_"," "),q=Rt(q),pt(q," ","")}(z),z.charAt(0).toLowerCase()+z.slice(1)}function Pe(S){let z=document.createElement("div");return z.appendChild(S),z.innerHTML}let Ye={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Ze={get(S="",z={}){if(Q(S)||Q(z))return"";let F=G(z.i18n,S);if(Q(F))return Object.keys(Ye).includes(S)?Ye[S]:"";let q={"{seektime}":z.seekTime,"{title}":z.title};return Object.entries(q).forEach(([fe,ge])=>{F=pt(F,fe,ge)}),F}};class ut{constructor(z){e(this,"get",F=>{if(!ut.supported||!this.enabled)return null;let q=window.localStorage.getItem(this.key);if(Q(q))return null;let fe=JSON.parse(q);return oe(F)&&F.length?fe[F]:fe}),e(this,"set",F=>{if(!ut.supported||!this.enabled||!U(F))return;let q=this.get();Q(q)&&(q={}),c(q,F),window.localStorage.setItem(this.key,JSON.stringify(q))}),this.enabled=z.config.storage.enabled,this.key=z.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;let z="___test";return window.localStorage.setItem(z,z),window.localStorage.removeItem(z),!0}catch(z){return!1}}}function Ue(S,z="text"){return new Promise((F,q)=>{try{let fe=new XMLHttpRequest;if(!("withCredentials"in fe))return;fe.addEventListener("load",()=>{if(z==="text")try{F(JSON.parse(fe.responseText))}catch(ge){F(fe.responseText)}else F(fe.response)}),fe.addEventListener("error",()=>{throw new Error(fe.status)}),fe.open("GET",S,!0),fe.responseType=z,fe.send()}catch(fe){q(fe)}})}function Je(S,z){if(!oe(S))return;let F=oe(z),q=!1,fe=()=>document.getElementById(z)!==null,ge=(Me,ke)=>{Me.innerHTML=ke,F&&fe()||document.body.insertAdjacentElement("afterbegin",Me)};if(!F||!fe()){let Me=ut.supported,ke=document.createElement("div");if(ke.setAttribute("hidden",""),F&&ke.setAttribute("id",z),Me){let $e=window.localStorage.getItem(`cache-${z}`);if(q=$e!==null,q){let gt=JSON.parse($e);ge(ke,gt.content)}}Ue(S).then($e=>{Q($e)||(Me&&window.localStorage.setItem(`cache-${z}`,JSON.stringify({content:$e})),ge(ke,$e))}).catch(()=>{})}}let ht=S=>Math.trunc(S/60/60%60,10);function Et(S=0,z=!1,F=!1){if(!Y(S))return Et(void 0,z,F);let q=$e=>`0${$e}`.slice(-2),fe=ht(S),ge=(Me=S,Math.trunc(Me/60%60,10));var Me;let ke=($e=>Math.trunc($e%60,10))(S);return fe=z||fe>0?`${fe}:`:"",`${F&&S>0?"-":""}${fe}${q(ge)}:${q(ke)}`}let rt={getIconUrl(){let S=new URL(this.config.iconUrl,window.location).host!==window.location.host||le.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:S}},findElements(){try{return this.elements.controls=ye.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:he.call(this,this.config.selectors.buttons.play),pause:ye.call(this,this.config.selectors.buttons.pause),restart:ye.call(this,this.config.selectors.buttons.restart),rewind:ye.call(this,this.config.selectors.buttons.rewind),fastForward:ye.call(this,this.config.selectors.buttons.fastForward),mute:ye.call(this,this.config.selectors.buttons.mute),pip:ye.call(this,this.config.selectors.buttons.pip),airplay:ye.call(this,this.config.selectors.buttons.airplay),settings:ye.call(this,this.config.selectors.buttons.settings),captions:ye.call(this,this.config.selectors.buttons.captions),fullscreen:ye.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ye.call(this,this.config.selectors.progress),this.elements.inputs={seek:ye.call(this,this.config.selectors.inputs.seek),volume:ye.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ye.call(this,this.config.selectors.display.buffer),currentTime:ye.call(this,this.config.selectors.display.currentTime),duration:ye.call(this,this.config.selectors.display.duration)},se(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(S){return this.debug.warn("It looks like there is a problem with your custom controls HTML",S),this.toggleNativeControls(!0),!1}},createIcon(S,z){let F="http://www.w3.org/2000/svg",q=rt.getIconUrl.call(this),fe=`${q.cors?"":q.url}#${this.config.iconPrefix}`,ge=document.createElementNS(F,"svg");b(ge,c(z,{"aria-hidden":"true",focusable:"false"}));let Me=document.createElementNS(F,"use"),ke=`${fe}-${S}`;return"href"in Me&&Me.setAttributeNS("http://www.w3.org/1999/xlink","href",ke),Me.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",ke),ge.appendChild(Me),ge},createLabel(S,z={}){let F=Ze.get(S,this.config);return l("span",{...z,class:[z.class,this.config.classNames.hidden].filter(Boolean).join(" ")},F)},createBadge(S){if(Q(S))return null;let z=l("span",{class:this.config.classNames.menu.value});return z.appendChild(l("span",{class:this.config.classNames.menu.badge},S)),z},createButton(S,z){let F=c({},z),q=Ce(S),fe={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(Me=>{Object.keys(F).includes(Me)&&(fe[Me]=F[Me],delete F[Me])}),fe.element!=="button"||Object.keys(F).includes("type")||(F.type="button"),Object.keys(F).includes("class")?F.class.split(" ").some(Me=>Me===this.config.classNames.control)||c(F,{class:`${F.class} ${this.config.classNames.control}`}):F.class=this.config.classNames.control,S){case"play":fe.toggle=!0,fe.label="play",fe.labelPressed="pause",fe.icon="play",fe.iconPressed="pause";break;case"mute":fe.toggle=!0,fe.label="mute",fe.labelPressed="unmute",fe.icon="volume",fe.iconPressed="muted";break;case"captions":fe.toggle=!0,fe.label="enableCaptions",fe.labelPressed="disableCaptions",fe.icon="captions-off",fe.iconPressed="captions-on";break;case"fullscreen":fe.toggle=!0,fe.label="enterFullscreen",fe.labelPressed="exitFullscreen",fe.icon="enter-fullscreen",fe.iconPressed="exit-fullscreen";break;case"play-large":F.class+=` ${this.config.classNames.control}--overlaid`,q="play",fe.label="play",fe.icon="play";break;default:Q(fe.label)&&(fe.label=q),Q(fe.icon)&&(fe.icon=S)}let ge=l(fe.element);return fe.toggle?(ge.appendChild(rt.createIcon.call(this,fe.iconPressed,{class:"icon--pressed"})),ge.appendChild(rt.createIcon.call(this,fe.icon,{class:"icon--not-pressed"})),ge.appendChild(rt.createLabel.call(this,fe.labelPressed,{class:"label--pressed"})),ge.appendChild(rt.createLabel.call(this,fe.label,{class:"label--not-pressed"}))):(ge.appendChild(rt.createIcon.call(this,fe.icon)),ge.appendChild(rt.createLabel.call(this,fe.label))),c(F,$(this.config.selectors.buttons[q],F)),b(ge,F),q==="play"?(ve(this.elements.buttons[q])||(this.elements.buttons[q]=[]),this.elements.buttons[q].push(ge)):this.elements.buttons[q]=ge,ge},createRange(S,z){let F=l("input",c($(this.config.selectors.inputs[S]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Ze.get(S,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},z));return this.elements.inputs[S]=F,rt.updateRangeFill.call(this,F),M.setup(F),F},createProgress(S,z){let F=l("progress",c($(this.config.selectors.display[S]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},z));if(S!=="volume"){F.appendChild(l("span",null,"0"));let q={played:"played",buffer:"buffered"}[S],fe=q?Ze.get(q,this.config):"";F.innerText=`% ${fe.toLowerCase()}`}return this.elements.display[S]=F,F},createTime(S,z){let F=$(this.config.selectors.display[S],z),q=l("div",c(F,{class:`${F.class?F.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Ze.get(S,this.config)}),"00:00");return this.elements.display[S]=q,q},bindMenuItemShortcuts(S,z){Le.call(this,S,"keydown keyup",F=>{if(![32,38,39,40].includes(F.which)||(F.preventDefault(),F.stopPropagation(),F.type==="keydown"))return;let q=Ie(S,'[role="menuitemradio"]');if(!q&&[32,39].includes(F.which))rt.showMenuPanel.call(this,z,!0);else{let fe;F.which!==32&&(F.which===40||q&&F.which===39?(fe=S.nextElementSibling,se(fe)||(fe=S.parentNode.firstElementChild)):(fe=S.previousElementSibling,se(fe)||(fe=S.parentNode.lastElementChild)),_e.call(this,fe,!0))}},!1),Le.call(this,S,"keyup",F=>{F.which===13&&rt.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:S,list:z,type:F,title:q,badge:fe=null,checked:ge=!1}){let Me=$(this.config.selectors.inputs[F]),ke=l("button",c(Me,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${Me.class?Me.class:""}`.trim(),"aria-checked":ge,value:S})),$e=l("span");$e.innerHTML=q,se(fe)&&$e.appendChild(fe),ke.appendChild($e),Object.defineProperty(ke,"checked",{enumerable:!0,get:()=>ke.getAttribute("aria-checked")==="true",set(gt){gt&&Array.from(ke.parentNode.children).filter(Nt=>Ie(Nt,'[role="menuitemradio"]')).forEach(Nt=>Nt.setAttribute("aria-checked","false")),ke.setAttribute("aria-checked",gt?"true":"false")}}),this.listeners.bind(ke,"click keyup",gt=>{if(!ee(gt)||gt.which===32){switch(gt.preventDefault(),gt.stopPropagation(),ke.checked=!0,F){case"language":this.currentTrack=Number(S);break;case"quality":this.quality=S;break;case"speed":this.speed=parseFloat(S)}rt.showMenuPanel.call(this,"home",ee(gt))}},F,!1),rt.bindMenuItemShortcuts.call(this,ke,F),z.appendChild(ke)},formatTime(S=0,z=!1){return Y(S)?Et(S,ht(this.duration)>0,z):S},updateTimeDisplay(S=null,z=0,F=!1){se(S)&&Y(z)&&(S.innerText=rt.formatTime(z,F))},updateVolume(){this.supported.ui&&(se(this.elements.inputs.volume)&&rt.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),se(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(S,z=0){se(S)&&(S.value=z,rt.updateRangeFill.call(this,S))},updateProgress(S){if(!this.supported.ui||!J(S))return;let z=0,F=(ge,Me)=>{let ke=Y(Me)?Me:0,$e=se(ge)?ge:this.elements.display.buffer;if(se($e)){$e.value=ke;let gt=$e.getElementsByTagName("span")[0];se(gt)&&(gt.childNodes[0].nodeValue=ke)}};if(S)switch(S.type){case"timeupdate":case"seeking":case"seeked":q=this.currentTime,fe=this.duration,z=q===0||fe===0||Number.isNaN(q)||Number.isNaN(fe)?0:(q/fe*100).toFixed(2),S.type==="timeupdate"&&rt.setRange.call(this,this.elements.inputs.seek,z);break;case"playing":case"progress":F(this.elements.display.buffer,100*this.buffered)}var q,fe},updateRangeFill(S){let z=J(S)?S.target:S;if(se(z)&&z.getAttribute("type")==="range"){if(Ie(z,this.config.selectors.inputs.seek)){z.setAttribute("aria-valuenow",this.currentTime);let F=rt.formatTime(this.currentTime),q=rt.formatTime(this.duration),fe=Ze.get("seekLabel",this.config);z.setAttribute("aria-valuetext",fe.replace("{currentTime}",F).replace("{duration}",q))}else if(Ie(z,this.config.selectors.inputs.volume)){let F=100*z.value;z.setAttribute("aria-valuenow",F),z.setAttribute("aria-valuetext",`${F.toFixed(1)}%`)}else z.setAttribute("aria-valuenow",z.value);le.isWebkit&&z.style.setProperty("--value",z.value/z.max*100+"%")}},updateSeekTooltip(S){if(!this.config.tooltips.seek||!se(this.elements.inputs.seek)||!se(this.elements.display.seekTooltip)||this.duration===0)return;let z=`${this.config.classNames.tooltip}--visible`,F=ge=>ne(this.elements.display.seekTooltip,z,ge);if(this.touch)return void F(!1);let q=0,fe=this.elements.progress.getBoundingClientRect();if(J(S))q=100/fe.width*(S.pageX-fe.left);else{if(!Se(this.elements.display.seekTooltip,z))return;q=parseFloat(this.elements.display.seekTooltip.style.left,10)}q<0?q=0:q>100&&(q=100),rt.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*q),this.elements.display.seekTooltip.style.left=`${q}%`,J(S)&&["mouseenter","mouseleave"].includes(S.type)&&F(S.type==="mouseenter")},timeUpdate(S){let z=!se(this.elements.display.duration)&&this.config.invertTime;rt.updateTimeDisplay.call(this,this.elements.display.currentTime,z?this.duration-this.currentTime:this.currentTime,z),S&&S.type==="timeupdate"&&this.media.seeking||rt.updateProgress.call(this,S)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ae(this.elements.display.currentTime,!0),void ae(this.elements.progress,!0);se(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);let S=se(this.elements.display.duration);!S&&this.config.displayDuration&&this.paused&&rt.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),S&&rt.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),rt.updateSeekTooltip.call(this)},toggleMenuButton(S,z){ae(this.elements.settings.buttons[S],!z)},updateSetting(S,z,F){let q=this.elements.settings.panels[S],fe=null,ge=z;if(S==="captions")fe=this.currentTrack;else{if(fe=Q(F)?this[S]:F,Q(fe)&&(fe=this.config[S].default),!Q(this.options[S])&&!this.options[S].includes(fe))return void this.debug.warn(`Unsupported value of '${fe}' for ${S}`);if(!this.config[S].options.includes(fe))return void this.debug.warn(`Disabled value of '${fe}' for ${S}`)}if(se(ge)||(ge=q&&q.querySelector('[role="menu"]')),!se(ge))return;this.elements.settings.buttons[S].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=rt.getLabel.call(this,S,fe);let Me=ge&&ge.querySelector(`[value="${fe}"]`);se(Me)&&(Me.checked=!0)},getLabel(S,z){switch(S){case"speed":return z===1?Ze.get("normal",this.config):`${z}×`;case"quality":if(Y(z)){let F=Ze.get(`qualityLabel.${z}`,this.config);return F.length?F:`${z}p`}return Rt(z);case"captions":return ft.getLabel.call(this);default:return null}},setQualityMenu(S){if(!se(this.elements.settings.panels.quality))return;let z="quality",F=this.elements.settings.panels.quality.querySelector('[role="menu"]');ve(S)&&(this.options.quality=lt(S).filter(ge=>this.config.quality.options.includes(ge)));let q=!Q(this.options.quality)&&this.options.quality.length>1;if(rt.toggleMenuButton.call(this,z,q),V(F),rt.checkMenu.call(this),!q)return;let fe=ge=>{let Me=Ze.get(`qualityBadge.${ge}`,this.config);return Me.length?rt.createBadge.call(this,Me):null};this.options.quality.sort((ge,Me)=>{let ke=this.config.quality.options;return ke.indexOf(ge)>ke.indexOf(Me)?1:-1}).forEach(ge=>{rt.createMenuItem.call(this,{value:ge,list:F,type:z,title:rt.getLabel.call(this,"quality",ge),badge:fe(ge)})}),rt.updateSetting.call(this,z,F)},setCaptionsMenu(){if(!se(this.elements.settings.panels.captions))return;let S="captions",z=this.elements.settings.panels.captions.querySelector('[role="menu"]'),F=ft.getTracks.call(this),q=Boolean(F.length);if(rt.toggleMenuButton.call(this,S,q),V(z),rt.checkMenu.call(this),!q)return;let fe=F.map((ge,Me)=>({value:Me,checked:this.captions.toggled&&this.currentTrack===Me,title:ft.getLabel.call(this,ge),badge:ge.language&&rt.createBadge.call(this,ge.language.toUpperCase()),list:z,type:"language"}));fe.unshift({value:-1,checked:!this.captions.toggled,title:Ze.get("disabled",this.config),list:z,type:"language"}),fe.forEach(rt.createMenuItem.bind(this)),rt.updateSetting.call(this,S,z)},setSpeedMenu(){if(!se(this.elements.settings.panels.speed))return;let S="speed",z=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(q=>q>=this.minimumSpeed&&q<=this.maximumSpeed);let F=!Q(this.options.speed)&&this.options.speed.length>1;rt.toggleMenuButton.call(this,S,F),V(z),rt.checkMenu.call(this),F&&(this.options.speed.forEach(q=>{rt.createMenuItem.call(this,{value:q,list:z,type:S,title:rt.getLabel.call(this,"speed",q)})}),rt.updateSetting.call(this,S,z))},checkMenu(){let{buttons:S}=this.elements.settings,z=!Q(S)&&Object.values(S).some(F=>!F.hidden);ae(this.elements.settings.menu,!z)},focusFirstMenuItem(S,z=!1){if(this.elements.settings.popup.hidden)return;let F=S;se(F)||(F=Object.values(this.elements.settings.panels).find(fe=>!fe.hidden));let q=F.querySelector('[role^="menuitem"]');_e.call(this,q,z)},toggleMenu(S){let{popup:z}=this.elements.settings,F=this.elements.buttons.settings;if(!se(z)||!se(F))return;let{hidden:q}=z,fe=q;if(ue(S))fe=S;else if(ee(S)&&S.which===27)fe=!1;else if(J(S)){let ge=re(S.composedPath)?S.composedPath()[0]:S.target,Me=z.contains(ge);if(Me||!Me&&S.target!==F&&fe)return}F.setAttribute("aria-expanded",fe),ae(z,!fe),ne(this.elements.container,this.config.classNames.menu.open,fe),fe&&ee(S)?rt.focusFirstMenuItem.call(this,null,!0):fe||q||_e.call(this,F,ee(S))},getMenuSize(S){let z=S.cloneNode(!0);z.style.position="absolute",z.style.opacity=0,z.removeAttribute("hidden"),S.parentNode.appendChild(z);let F=z.scrollWidth,q=z.scrollHeight;return y(z),{width:F,height:q}},showMenuPanel(S="",z=!1){let F=this.elements.container.querySelector(`#plyr-settings-${this.id}-${S}`);if(!se(F))return;let q=F.parentNode,fe=Array.from(q.children).find(ge=>!ge.hidden);if(De.transitions&&!De.reducedMotion){q.style.width=`${fe.scrollWidth}px`,q.style.height=`${fe.scrollHeight}px`;let ge=rt.getMenuSize.call(this,F),Me=ke=>{ke.target===q&&["width","height"].includes(ke.propertyName)&&(q.style.width="",q.style.height="",Ve.call(this,q,X,Me))};Le.call(this,q,X,Me),q.style.width=`${ge.width}px`,q.style.height=`${ge.height}px`}ae(fe,!0),ae(F,!1),rt.focusFirstMenuItem.call(this,F,z)},setDownloadUrl(){let S=this.elements.buttons.download;se(S)&&S.setAttribute("href",this.download)},create(S){let{bindMenuItemShortcuts:z,createButton:F,createProgress:q,createRange:fe,createTime:ge,setQualityMenu:Me,setSpeedMenu:ke,showMenuPanel:$e}=rt;this.elements.controls=null,ve(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(F.call(this,"play-large"));let gt=l("div",$(this.config.selectors.controls.wrapper));this.elements.controls=gt;let Nt={class:"plyr__controls__item"};return lt(ve(this.config.controls)?this.config.controls:[]).forEach(Lt=>{if(Lt==="restart"&>.appendChild(F.call(this,"restart",Nt)),Lt==="rewind"&>.appendChild(F.call(this,"rewind",Nt)),Lt==="play"&>.appendChild(F.call(this,"play",Nt)),Lt==="fast-forward"&>.appendChild(F.call(this,"fast-forward",Nt)),Lt==="progress"){let At=l("div",{class:`${Nt.class} plyr__progress__container`}),Ht=l("div",$(this.config.selectors.progress));if(Ht.appendChild(fe.call(this,"seek",{id:`plyr-seek-${S.id}`})),Ht.appendChild(q.call(this,"buffer")),this.config.tooltips.seek){let xe=l("span",{class:this.config.classNames.tooltip},"00:00");Ht.appendChild(xe),this.elements.display.seekTooltip=xe}this.elements.progress=Ht,At.appendChild(this.elements.progress),gt.appendChild(At)}if(Lt==="current-time"&>.appendChild(ge.call(this,"currentTime",Nt)),Lt==="duration"&>.appendChild(ge.call(this,"duration",Nt)),Lt==="mute"||Lt==="volume"){let{volume:At}=this.elements;if(se(At)&>.contains(At)||(At=l("div",c({},Nt,{class:`${Nt.class} plyr__volume`.trim()})),this.elements.volume=At,gt.appendChild(At)),Lt==="mute"&&At.appendChild(F.call(this,"mute")),Lt==="volume"&&!le.isIos){let Ht={max:1,step:.05,value:this.config.volume};At.appendChild(fe.call(this,"volume",c(Ht,{id:`plyr-volume-${S.id}`})))}}if(Lt==="captions"&>.appendChild(F.call(this,"captions",Nt)),Lt==="settings"&&!Q(this.config.settings)){let At=l("div",c({},Nt,{class:`${Nt.class} plyr__menu`.trim(),hidden:""}));At.appendChild(F.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${S.id}`,"aria-expanded":!1}));let Ht=l("div",{class:"plyr__menu__container",id:`plyr-settings-${S.id}`,hidden:""}),xe=l("div"),et=l("div",{id:`plyr-settings-${S.id}-home`}),Mt=l("div",{role:"menu"});et.appendChild(Mt),xe.appendChild(et),this.elements.settings.panels.home=et,this.config.settings.forEach(nt=>{let It=l("button",c($(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));z.call(this,It,nt),Le.call(this,It,"click",()=>{$e.call(this,nt,!1)});let Ft=l("span",null,Ze.get(nt,this.config)),Wt=l("span",{class:this.config.classNames.menu.value});Wt.innerHTML=S[nt],Ft.appendChild(Wt),It.appendChild(Ft),Mt.appendChild(It);let zt=l("div",{id:`plyr-settings-${S.id}-${nt}`,hidden:""}),qt=l("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});qt.appendChild(l("span",{"aria-hidden":!0},Ze.get(nt,this.config))),qt.appendChild(l("span",{class:this.config.classNames.hidden},Ze.get("menuBack",this.config))),Le.call(this,zt,"keydown",er=>{er.which===37&&(er.preventDefault(),er.stopPropagation(),$e.call(this,"home",!0))},!1),Le.call(this,qt,"click",()=>{$e.call(this,"home",!1)}),zt.appendChild(qt),zt.appendChild(l("div",{role:"menu"})),xe.appendChild(zt),this.elements.settings.buttons[nt]=It,this.elements.settings.panels[nt]=zt}),Ht.appendChild(xe),At.appendChild(Ht),gt.appendChild(At),this.elements.settings.popup=Ht,this.elements.settings.menu=At}if(Lt==="pip"&&De.pip&>.appendChild(F.call(this,"pip",Nt)),Lt==="airplay"&&De.airplay&>.appendChild(F.call(this,"airplay",Nt)),Lt==="download"){let At=c({},Nt,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(At.download="");let{download:Ht}=this.config.urls;!de(Ht)&&this.isEmbed&&c(At,{icon:`logo-${this.provider}`,label:this.provider}),gt.appendChild(F.call(this,"download",At))}Lt==="fullscreen"&>.appendChild(F.call(this,"fullscreen",Nt))}),this.isHTML5&&Me.call(this,mt.getQualityOptions.call(this)),ke.call(this),gt},inject(){if(this.config.loadSprite){let fe=rt.getIconUrl.call(this);fe.cors&&Je(fe.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let S=null;this.elements.controls=null;let z={id:this.id,seektime:this.config.seekTime,title:this.config.title},F=!0;re(this.config.controls)&&(this.config.controls=this.config.controls.call(this,z)),this.config.controls||(this.config.controls=[]),se(this.config.controls)||oe(this.config.controls)?S=this.config.controls:(S=rt.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:ft.getLabel.call(this)}),F=!1);let q;if(F&&oe(this.config.controls)&&(S=(fe=>{let ge=fe;return Object.entries(z).forEach(([Me,ke])=>{ge=pt(ge,`{${Me}}`,ke)}),ge})(S)),oe(this.config.selectors.controls.container)&&(q=document.querySelector(this.config.selectors.controls.container)),se(q)||(q=this.elements.container),q[se(S)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",S),se(this.elements.controls)||rt.findElements.call(this),!Q(this.elements.buttons)){let fe=ge=>{let Me=this.config.classNames.controlPressed;Object.defineProperty(ge,"pressed",{enumerable:!0,get:()=>Se(ge,Me),set(ke=!1){ne(ge,Me,ke)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(ge=>{ve(ge)||ce(ge)?Array.from(ge).filter(Boolean).forEach(fe):fe(ge)})}if(le.isEdge&&j(q),this.config.tooltips.controls){let{classNames:fe,selectors:ge}=this.config,Me=`${ge.controls.wrapper} ${ge.labels} .${fe.hidden}`,ke=he.call(this,Me);Array.from(ke).forEach($e=>{ne($e,this.config.classNames.hidden,!1),ne($e,this.config.classNames.tooltip,!0)})}}};function Dt(S,z=!0){let F=S;if(z){let q=document.createElement("a");q.href=F,F=q.href}try{return new URL(F)}catch(q){return null}}function kt(S){let z=new URLSearchParams;return U(S)&&Object.entries(S).forEach(([F,q])=>{z.set(F,q)}),z}let ft={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!De.textTracks)return void(ve(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&rt.setCaptionsMenu.call(this));var S,z;if(se(this.elements.captions)||(this.elements.captions=l("div",$(this.config.selectors.captions)),S=this.elements.captions,z=this.elements.wrapper,se(S)&&se(z)&&z.parentNode.insertBefore(S,z.nextSibling)),le.isIE&&window.URL){let ge=this.media.querySelectorAll("track");Array.from(ge).forEach(Me=>{let ke=Me.getAttribute("src"),$e=Dt(ke);$e!==null&&$e.hostname!==window.location.href.hostname&&["http:","https:"].includes($e.protocol)&&Ue(ke,"blob").then(gt=>{Me.setAttribute("src",window.URL.createObjectURL(gt))}).catch(()=>{y(Me)})})}let F=lt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(ge=>ge.split("-")[0])),q=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();q==="auto"&&([q]=F);let fe=this.storage.get("captions");if(ue(fe)||({active:fe}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:fe,language:q,languages:F}),this.isHTML5){let ge=this.config.captions.update?"addtrack removetrack":"removetrack";Le.call(this,this.media.textTracks,ge,ft.update.bind(this))}setTimeout(ft.update.bind(this),0)},update(){let S=ft.getTracks.call(this,!0),{active:z,language:F,meta:q,currentTrackNode:fe}=this.captions,ge=Boolean(S.find(Me=>Me.language===F));this.isHTML5&&this.isVideo&&S.filter(Me=>!q.get(Me)).forEach(Me=>{this.debug.log("Track added",Me),q.set(Me,{default:Me.mode==="showing"}),Me.mode==="showing"&&(Me.mode="hidden"),Le.call(this,Me,"cuechange",()=>ft.updateCues.call(this))}),(ge&&this.language!==F||!S.includes(fe))&&(ft.setLanguage.call(this,F),ft.toggle.call(this,z&&ge)),ne(this.elements.container,this.config.classNames.captions.enabled,!Q(S)),ve(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&rt.setCaptionsMenu.call(this)},toggle(S,z=!0){if(!this.supported.ui)return;let{toggled:F}=this.captions,q=this.config.classNames.captions.active,fe=x(S)?!F:S;if(fe!==F){if(z||(this.captions.active=fe,this.storage.set({captions:fe})),!this.language&&fe&&!z){let ge=ft.getTracks.call(this),Me=ft.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=Me.language,void ft.set.call(this,ge.indexOf(Me))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=fe),ne(this.elements.container,q,fe),this.captions.toggled=fe,rt.updateSetting.call(this,"captions"),we.call(this,this.media,fe?"captionsenabled":"captionsdisabled")}setTimeout(()=>{fe&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(S,z=!0){let F=ft.getTracks.call(this);if(S!==-1)if(Y(S))if(S in F){if(this.captions.currentTrack!==S){this.captions.currentTrack=S;let q=F[S],{language:fe}=q||{};this.captions.currentTrackNode=q,rt.updateSetting.call(this,"captions"),z||(this.captions.language=fe,this.storage.set({language:fe})),this.isVimeo&&this.embed.enableTextTrack(fe),we.call(this,this.media,"languagechange")}ft.toggle.call(this,!0,z),this.isHTML5&&this.isVideo&&ft.updateCues.call(this)}else this.debug.warn("Track not found",S);else this.debug.warn("Invalid caption argument",S);else ft.toggle.call(this,!1,z)},setLanguage(S,z=!0){if(!oe(S))return void this.debug.warn("Invalid language argument",S);let F=S.toLowerCase();this.captions.language=F;let q=ft.getTracks.call(this),fe=ft.findTrack.call(this,[F]);ft.set.call(this,q.indexOf(fe),z)},getTracks(S=!1){return Array.from((this.media||{}).textTracks||[]).filter(z=>!this.isHTML5||S||this.captions.meta.has(z)).filter(z=>["captions","subtitles"].includes(z.kind))},findTrack(S,z=!1){let F=ft.getTracks.call(this),q=Me=>Number((this.captions.meta.get(Me)||{}).default),fe=Array.from(F).sort((Me,ke)=>q(ke)-q(Me)),ge;return S.every(Me=>(ge=fe.find(ke=>ke.language===Me),!ge)),ge||(z?fe[0]:void 0)},getCurrentTrack(){return ft.getTracks.call(this)[this.currentTrack]},getLabel(S){let z=S;return!ie(z)&&De.textTracks&&this.captions.toggled&&(z=ft.getCurrentTrack.call(this)),ie(z)?Q(z.label)?Q(z.language)?Ze.get("enabled",this.config):S.language.toUpperCase():z.label:Ze.get("disabled",this.config)},updateCues(S){if(!this.supported.ui)return;if(!se(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!x(S)&&!Array.isArray(S))return void this.debug.warn("updateCues: Invalid input",S);let z=S;if(!z){let q=ft.getCurrentTrack.call(this);z=Array.from((q||{}).activeCues||[]).map(fe=>fe.getCueAsHTML()).map(Pe)}let F=z.map(q=>q.trim()).join(`
|
|
`);if(F!==this.elements.captions.innerHTML){V(this.elements.captions);let q=l("span",$(this.config.selectors.caption));q.innerHTML=F,this.elements.captions.appendChild(q),we.call(this,this.media,"cuechange")}}},Gt={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Kt="picture-in-picture",Vt="inline",Pt={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ee="audio",Z="video",Ae=()=>{};class Te{constructor(z=!1){this.enabled=window.console&&z,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Ae}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ae}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Ae}}class be{constructor(z){e(this,"onChange",()=>{if(!this.enabled)return;let F=this.player.elements.buttons.fullscreen;se(F)&&(F.pressed=this.active);let q=this.target===this.player.media?this.target:this.player.elements.container;we.call(this.player,q,this.active?"enterfullscreen":"exitfullscreen",!0)}),e(this,"toggleFallback",(F=!1)=>{if(F?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=F?"hidden":"",ne(this.target,this.player.config.classNames.fullscreen.fallback,F),le.isIos){let q=document.head.querySelector('meta[name="viewport"]'),fe="viewport-fit=cover";q||(q=document.createElement("meta"),q.setAttribute("name","viewport"));let ge=oe(q.content)&&q.content.includes(fe);F?(this.cleanupViewport=!ge,ge||(q.content+=`,${fe}`)):this.cleanupViewport&&(q.content=q.content.split(",").filter(Me=>Me.trim()!==fe).join(","))}this.onChange()}),e(this,"trapFocus",F=>{if(le.isIos||!this.active||F.key!=="Tab"||F.keyCode!==9)return;let q=document.activeElement,fe=he.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[ge]=fe,Me=fe[fe.length-1];q!==Me||F.shiftKey?q===ge&&F.shiftKey&&(Me.focus(),F.preventDefault()):(ge.focus(),F.preventDefault())}),e(this,"update",()=>{if(this.enabled){let F;F=this.forceFallback?"Fallback (forced)":be.native?"Native":"Fallback",this.player.debug.log(`${F} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),e(this,"enter",()=>{this.enabled&&(le.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!be.native||this.forceFallback?this.toggleFallback(!0):this.prefix?Q(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),e(this,"exit",()=>{if(this.enabled)if(le.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),Xe(this.player.play());else if(!be.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Q(this.prefix)){let F=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${F}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),e(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=z,this.prefix=be.prefix,this.property=be.property,this.scrollPosition={x:0,y:0},this.forceFallback=z.config.fullscreen.fallback==="force",this.player.elements.fullscreen=z.config.fullscreen.container&&function(F,q){let{prototype:fe}=Element;return(fe.closest||function(){let ge=this;do{if(Ie.matches(ge,q))return ge;ge=ge.parentElement||ge.parentNode}while(ge!==null&&ge.nodeType===1);return null}).call(F,q)}(this.player.elements.container,z.config.fullscreen.container),Le.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Le.call(this.player,this.player.elements.container,"dblclick",F=>{se(this.player.elements.controls)&&this.player.elements.controls.contains(F.target)||this.player.listeners.proxy(F,this.toggle,"fullscreen")}),Le.call(this,this.player.elements.container,"keydown",F=>this.trapFocus(F)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return be.native&&!this.forceFallback}static get prefix(){if(re(document.exitFullscreen))return"";let z="";return["webkit","moz","ms"].some(F=>!(!re(document[`${F}ExitFullscreen`])&&!re(document[`${F}CancelFullScreen`]))&&(z=F,!0)),z}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get enabled(){return(be.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!be.native||this.forceFallback)return Se(this.target,this.player.config.classNames.fullscreen.fallback);let z=this.prefix?document[`${this.prefix}${this.property}Element`]:document.fullscreenElement;return z&&z.shadowRoot?z===this.target.getRootNode().host:z===this.target}get target(){return le.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function Oe(S,z=1){return new Promise((F,q)=>{let fe=new Image,ge=()=>{delete fe.onload,delete fe.onerror,(fe.naturalWidth>=z?F:q)(fe)};Object.assign(fe,{onload:ge,onerror:ge,src:S})})}let Qe={addStyleHook(){ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(S=!1){S&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Qe.toggleNativeControls.call(this,!0);se(this.elements.controls)||(rt.inject.call(this),this.listeners.controls()),Qe.toggleNativeControls.call(this),this.isHTML5&&ft.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,rt.updateVolume.call(this),rt.timeUpdate.call(this),Qe.checkPlaying.call(this),ne(this.elements.container,this.config.classNames.pip.supported,De.pip&&this.isHTML5&&this.isVideo),ne(this.elements.container,this.config.classNames.airplay.supported,De.airplay&&this.isHTML5),ne(this.elements.container,this.config.classNames.isIos,le.isIos),ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{we.call(this,this.media,"ready")},0),Qe.setTitle.call(this),this.poster&&Qe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&rt.durationUpdate.call(this)},setTitle(){let S=Ze.get("play",this.config);if(oe(this.config.title)&&!Q(this.config.title)&&(S+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(z=>{z.setAttribute("aria-label",S)}),this.isEmbed){let z=ye.call(this,"iframe");if(!se(z))return;let F=Q(this.config.title)?"video":this.config.title,q=Ze.get("frameTitle",this.config);z.setAttribute("title",q.replace("{title}",F))}},togglePoster(S){ne(this.elements.container,this.config.classNames.posterEnabled,S)},setPoster(S,z=!0){return z&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",S),this.elements.poster.removeAttribute("hidden"),Re.call(this).then(()=>Oe(S)).catch(F=>{throw S===this.poster&&Qe.togglePoster.call(this,!1),F}).then(()=>{if(S!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${S}')`,backgroundSize:""}),Qe.togglePoster.call(this,!0),S)))},checkPlaying(S){ne(this.elements.container,this.config.classNames.playing,this.playing),ne(this.elements.container,this.config.classNames.paused,this.paused),ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(z=>{Object.assign(z,{pressed:this.playing}),z.setAttribute("aria-label",Ze.get(this.playing?"pause":"play",this.config))}),J(S)&&S.type==="timeupdate"||Qe.toggleControls.call(this)},checkLoading(S){this.loading=["stalled","waiting"].includes(S.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{ne(this.elements.container,this.config.classNames.loading,this.loading),Qe.toggleControls.call(this)},this.loading?250:0)},toggleControls(S){let{controls:z}=this.elements;if(z&&this.config.hideControls){let F=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(S||this.loading||this.paused||z.pressed||z.hover||F))}},migrateStyles(){Object.values({...this.media.style}).filter(S=>!Q(S)&&oe(S)&&S.startsWith("--plyr")).forEach(S=>{this.elements.container.style.setProperty(S,this.media.style.getPropertyValue(S)),this.media.style.removeProperty(S)}),Q(this.media.style)&&this.media.removeAttribute("style")}};class Tt{constructor(z){e(this,"firstTouch",()=>{let{player:F}=this,{elements:q}=F;F.touch=!0,ne(q.container,F.config.classNames.isTouch,!0)}),e(this,"setTabFocus",F=>{let{player:q}=this,{elements:fe}=q;if(clearTimeout(this.focusTimer),F.type==="keydown"&&F.which!==9)return;F.type==="keydown"&&(this.lastKeyDown=F.timeStamp);let ge=F.timeStamp-this.lastKeyDown<=20;(F.type!=="focus"||ge)&&((()=>{let Me=q.config.classNames.tabFocus;ne(he.call(q,`.${Me}`),Me,!1)})(),F.type!=="focusout"&&(this.focusTimer=setTimeout(()=>{let Me=document.activeElement;fe.container.contains(Me)&&ne(document.activeElement,q.config.classNames.tabFocus,!0)},10)))}),e(this,"global",(F=!0)=>{let{player:q}=this;q.config.keyboard.global&&Fe.call(q,window,"keydown keyup",this.handleKey,F,!1),Fe.call(q,document.body,"click",this.toggleMenu,F),Ge.call(q,document.body,"touchstart",this.firstTouch),Fe.call(q,document.body,"keydown focus blur focusout",this.setTabFocus,F,!1,!0)}),e(this,"container",()=>{let{player:F}=this,{config:q,elements:fe,timers:ge}=F;!q.keyboard.global&&q.keyboard.focused&&Le.call(F,fe.container,"keydown keyup",this.handleKey,!1),Le.call(F,fe.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",$e=>{let{controls:gt}=fe;gt&&$e.type==="enterfullscreen"&&(gt.pressed=!1,gt.hover=!1);let Nt=0;["touchstart","touchmove","mousemove"].includes($e.type)&&(Qe.toggleControls.call(F,!0),Nt=F.touch?3e3:2e3),clearTimeout(ge.controls),ge.controls=setTimeout(()=>Qe.toggleControls.call(F,!1),Nt)});let Me=()=>{if(!F.isVimeo||F.config.vimeo.premium)return;let $e=fe.wrapper,{active:gt}=F.fullscreen,[Nt,Lt]=We.call(F),At=tt(`aspect-ratio: ${Nt} / ${Lt}`);if(!gt)return void(At?($e.style.width=null,$e.style.height=null):($e.style.maxWidth=null,$e.style.margin=null));let[Ht,xe]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],et=Ht/xe>Nt/Lt;At?($e.style.width=et?"auto":"100%",$e.style.height=et?"100%":"auto"):($e.style.maxWidth=et?xe/Lt*Nt+"px":null,$e.style.margin=et?"0 auto":null)},ke=()=>{clearTimeout(ge.resized),ge.resized=setTimeout(Me,50)};Le.call(F,fe.container,"enterfullscreen exitfullscreen",$e=>{let{target:gt}=F.fullscreen;gt===fe.container&&(!F.isEmbed&&Q(F.config.ratio)||(Me(),($e.type==="enterfullscreen"?Le:Ve).call(F,window,"resize",ke)))})}),e(this,"media",()=>{let{player:F}=this,{elements:q}=F;if(Le.call(F,F.media,"timeupdate seeking seeked",ge=>rt.timeUpdate.call(F,ge)),Le.call(F,F.media,"durationchange loadeddata loadedmetadata",ge=>rt.durationUpdate.call(F,ge)),Le.call(F,F.media,"ended",()=>{F.isHTML5&&F.isVideo&&F.config.resetOnEnd&&(F.restart(),F.pause())}),Le.call(F,F.media,"progress playing seeking seeked",ge=>rt.updateProgress.call(F,ge)),Le.call(F,F.media,"volumechange",ge=>rt.updateVolume.call(F,ge)),Le.call(F,F.media,"playing play pause ended emptied timeupdate",ge=>Qe.checkPlaying.call(F,ge)),Le.call(F,F.media,"waiting canplay seeked playing",ge=>Qe.checkLoading.call(F,ge)),F.supported.ui&&F.config.clickToPlay&&!F.isAudio){let ge=ye.call(F,`.${F.config.classNames.video}`);if(!se(ge))return;Le.call(F,q.container,"click",Me=>{([q.container,ge].includes(Me.target)||ge.contains(Me.target))&&(F.touch&&F.config.hideControls||(F.ended?(this.proxy(Me,F.restart,"restart"),this.proxy(Me,()=>{Xe(F.play())},"play")):this.proxy(Me,()=>{Xe(F.togglePlay())},"play")))})}F.supported.ui&&F.config.disableContextMenu&&Le.call(F,q.wrapper,"contextmenu",ge=>{ge.preventDefault()},!1),Le.call(F,F.media,"volumechange",()=>{F.storage.set({volume:F.volume,muted:F.muted})}),Le.call(F,F.media,"ratechange",()=>{rt.updateSetting.call(F,"speed"),F.storage.set({speed:F.speed})}),Le.call(F,F.media,"qualitychange",ge=>{rt.updateSetting.call(F,"quality",null,ge.detail.quality)}),Le.call(F,F.media,"ready qualitychange",()=>{rt.setDownloadUrl.call(F)});let fe=F.config.events.concat(["keyup","keydown"]).join(" ");Le.call(F,F.media,fe,ge=>{let{detail:Me={}}=ge;ge.type==="error"&&(Me=F.media.error),we.call(F,q.container,ge.type,!0,Me)})}),e(this,"proxy",(F,q,fe)=>{let{player:ge}=this,Me=ge.config.listeners[fe],ke=!0;re(Me)&&(ke=Me.call(ge,F)),ke!==!1&&re(q)&&q.call(ge,F)}),e(this,"bind",(F,q,fe,ge,Me=!0)=>{let{player:ke}=this,$e=ke.config.listeners[ge],gt=re($e);Le.call(ke,F,q,Nt=>this.proxy(Nt,fe,ge),Me&&!gt)}),e(this,"controls",()=>{let{player:F}=this,{elements:q}=F,fe=le.isIE?"change":"input";if(q.buttons.play&&Array.from(q.buttons.play).forEach(ge=>{this.bind(ge,"click",()=>{Xe(F.togglePlay())},"play")}),this.bind(q.buttons.restart,"click",F.restart,"restart"),this.bind(q.buttons.rewind,"click",()=>{F.lastSeekTime=Date.now(),F.rewind()},"rewind"),this.bind(q.buttons.fastForward,"click",()=>{F.lastSeekTime=Date.now(),F.forward()},"fastForward"),this.bind(q.buttons.mute,"click",()=>{F.muted=!F.muted},"mute"),this.bind(q.buttons.captions,"click",()=>F.toggleCaptions()),this.bind(q.buttons.download,"click",()=>{we.call(F,F.media,"download")},"download"),this.bind(q.buttons.fullscreen,"click",()=>{F.fullscreen.toggle()},"fullscreen"),this.bind(q.buttons.pip,"click",()=>{F.pip="toggle"},"pip"),this.bind(q.buttons.airplay,"click",F.airplay,"airplay"),this.bind(q.buttons.settings,"click",ge=>{ge.stopPropagation(),ge.preventDefault(),rt.toggleMenu.call(F,ge)},null,!1),this.bind(q.buttons.settings,"keyup",ge=>{let Me=ge.which;[13,32].includes(Me)&&(Me!==13?(ge.preventDefault(),ge.stopPropagation(),rt.toggleMenu.call(F,ge)):rt.focusFirstMenuItem.call(F,null,!0))},null,!1),this.bind(q.settings.menu,"keydown",ge=>{ge.which===27&&rt.toggleMenu.call(F,ge)}),this.bind(q.inputs.seek,"mousedown mousemove",ge=>{let Me=q.progress.getBoundingClientRect(),ke=100/Me.width*(ge.pageX-Me.left);ge.currentTarget.setAttribute("seek-value",ke)}),this.bind(q.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",ge=>{let Me=ge.currentTarget,ke=ge.keyCode?ge.keyCode:ge.which,$e="play-on-seeked";if(ee(ge)&&ke!==39&&ke!==37)return;F.lastSeekTime=Date.now();let gt=Me.hasAttribute($e),Nt=["mouseup","touchend","keyup"].includes(ge.type);gt&&Nt?(Me.removeAttribute($e),Xe(F.play())):!Nt&&F.playing&&(Me.setAttribute($e,""),F.pause())}),le.isIos){let ge=he.call(F,'input[type="range"]');Array.from(ge).forEach(Me=>this.bind(Me,fe,ke=>j(ke.target)))}this.bind(q.inputs.seek,fe,ge=>{let Me=ge.currentTarget,ke=Me.getAttribute("seek-value");Q(ke)&&(ke=Me.value),Me.removeAttribute("seek-value"),F.currentTime=ke/Me.max*F.duration},"seek"),this.bind(q.progress,"mouseenter mouseleave mousemove",ge=>rt.updateSeekTooltip.call(F,ge)),this.bind(q.progress,"mousemove touchmove",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.startMove(ge)}),this.bind(q.progress,"mouseleave touchend click",()=>{let{previewThumbnails:ge}=F;ge&&ge.loaded&&ge.endMove(!1,!0)}),this.bind(q.progress,"mousedown touchstart",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.startScrubbing(ge)}),this.bind(q.progress,"mouseup touchend",ge=>{let{previewThumbnails:Me}=F;Me&&Me.loaded&&Me.endScrubbing(ge)}),le.isWebkit&&Array.from(he.call(F,'input[type="range"]')).forEach(ge=>{this.bind(ge,"input",Me=>rt.updateRangeFill.call(F,Me.target))}),F.config.toggleInvert&&!se(q.display.duration)&&this.bind(q.display.currentTime,"click",()=>{F.currentTime!==0&&(F.config.invertTime=!F.config.invertTime,rt.timeUpdate.call(F))}),this.bind(q.inputs.volume,fe,ge=>{F.volume=ge.target.value},"volume"),this.bind(q.controls,"mouseenter mouseleave",ge=>{q.controls.hover=!F.touch&&ge.type==="mouseenter"}),q.fullscreen&&Array.from(q.fullscreen.children).filter(ge=>!ge.contains(q.container)).forEach(ge=>{this.bind(ge,"mouseenter mouseleave",Me=>{q.controls.hover=!F.touch&&Me.type==="mouseenter"})}),this.bind(q.controls,"mousedown mouseup touchstart touchend touchcancel",ge=>{q.controls.pressed=["mousedown","touchstart"].includes(ge.type)}),this.bind(q.controls,"focusin",()=>{let{config:ge,timers:Me}=F;ne(q.controls,ge.classNames.noTransition,!0),Qe.toggleControls.call(F,!0),setTimeout(()=>{ne(q.controls,ge.classNames.noTransition,!1)},0);let ke=this.touch?3e3:4e3;clearTimeout(Me.controls),Me.controls=setTimeout(()=>Qe.toggleControls.call(F,!1),ke)}),this.bind(q.inputs.volume,"wheel",ge=>{let Me=ge.webkitDirectionInvertedFromDevice,[ke,$e]=[ge.deltaX,-ge.deltaY].map(Lt=>Me?-Lt:Lt),gt=Math.sign(Math.abs(ke)>Math.abs($e)?ke:$e);F.increaseVolume(gt/50);let{volume:Nt}=F.media;(gt===1&&Nt<1||gt===-1&&Nt>0)&&ge.preventDefault()},"volume",!1)}),this.player=z,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(z){let{player:F}=this,{elements:q}=F,fe=z.keyCode?z.keyCode:z.which,ge=z.type==="keydown",Me=ge&&fe===this.lastKey;if(!(z.altKey||z.ctrlKey||z.metaKey||z.shiftKey)&&!!Y(fe))if(ge){let ke=document.activeElement;if(se(ke)){let{editable:$e}=F.config.selectors,{seek:gt}=q.inputs;if(ke!==gt&&Ie(ke,$e)||z.which===32&&Ie(ke,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(fe)&&(z.preventDefault(),z.stopPropagation()),fe){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:Me||(F.currentTime=F.duration/10*(fe-48));break;case 32:case 75:Me||Xe(F.togglePlay());break;case 38:F.increaseVolume(.1);break;case 40:F.decreaseVolume(.1);break;case 77:Me||(F.muted=!F.muted);break;case 39:F.forward();break;case 37:F.rewind();break;case 70:F.fullscreen.toggle();break;case 67:Me||F.toggleCaptions();break;case 76:F.loop=!F.loop}fe===27&&!F.fullscreen.usingNative&&F.fullscreen.active&&F.fullscreen.toggle(),this.lastKey=fe}else this.lastKey=null}toggleMenu(z){rt.toggleMenu.call(this.player,z)}}typeof globalThis!="undefined"||typeof window!="undefined"||typeof global!="undefined"&&global;var dt=function(S,z){return S(z={exports:{}},z.exports),z.exports}(function(S,z){S.exports=function(){var F=function(){},q={},fe={},ge={};function Me(At,Ht){At=At.push?At:[At];var xe,et,Mt,nt=[],It=At.length,Ft=It;for(xe=function(Wt,zt){zt.length&&nt.push(Wt),--Ft||Ht(nt)};It--;)et=At[It],(Mt=fe[et])?xe(et,Mt):(ge[et]=ge[et]||[]).push(xe)}function ke(At,Ht){if(At){var xe=ge[At];if(fe[At]=Ht,xe)for(;xe.length;)xe[0](At,Ht),xe.splice(0,1)}}function $e(At,Ht){At.call&&(At={success:At}),Ht.length?(At.error||F)(Ht):(At.success||F)(At)}function gt(At,Ht,xe,et){var Mt,nt,It=document,Ft=xe.async,Wt=(xe.numRetries||0)+1,zt=xe.before||F,qt=At.replace(/[\?|#].*$/,""),er=At.replace(/^(css|img)!/,"");et=et||0,/(^css!|\.css$)/.test(qt)?((nt=It.createElement("link")).rel="stylesheet",nt.href=er,(Mt="hideFocus"in nt)&&nt.relList&&(Mt=0,nt.rel="preload",nt.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(qt)?(nt=It.createElement("img")).src=er:((nt=It.createElement("script")).src=At,nt.async=Ft===void 0||Ft),nt.onload=nt.onerror=nt.onbeforeload=function(dr){var cr=dr.type[0];if(Mt)try{nt.sheet.cssText.length||(cr="e")}catch(yr){yr.code!=18&&(cr="e")}if(cr=="e"){if((et+=1)<Wt)return gt(At,Ht,xe,et)}else if(nt.rel=="preload"&&nt.as=="style")return nt.rel="stylesheet";Ht(At,cr,dr.defaultPrevented)},zt(At,nt)!==!1&&It.head.appendChild(nt)}function Nt(At,Ht,xe){var et,Mt,nt=(At=At.push?At:[At]).length,It=nt,Ft=[];for(et=function(Wt,zt,qt){if(zt=="e"&&Ft.push(Wt),zt=="b"){if(!qt)return;Ft.push(Wt)}--nt||Ht(Ft)},Mt=0;Mt<It;Mt++)gt(At[Mt],et,xe)}function Lt(At,Ht,xe){var et,Mt;if(Ht&&Ht.trim&&(et=Ht),Mt=(et?xe:Ht)||{},et){if(et in q)throw"LoadJS";q[et]=!0}function nt(It,Ft){Nt(At,function(Wt){$e(Mt,Wt),It&&$e({success:It,error:Ft},Wt),ke(et,Wt)},Mt)}if(Mt.returnPromise)return new Promise(nt);nt()}return Lt.ready=function(At,Ht){return Me(At,function(xe){$e(Ht,xe)}),Lt},Lt.done=function(At){ke(At,[])},Lt.reset=function(){q={},fe={},ge={}},Lt.isDefined=function(At){return At in q},Lt}()});function st(S){return new Promise((z,F)=>{dt(S,{success:z,error:F})})}function bt(S){S&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===S&&(this.media.paused=!S,we.call(this,this.media,S?"play":"pause"))}let Yt={setup(){let S=this;ne(S.elements.wrapper,S.config.classNames.embed,!0),S.options.speed=S.config.speed.options,He.call(S),U(window.Vimeo)?Yt.ready.call(S):st(S.config.urls.vimeo.sdk).then(()=>{Yt.ready.call(S)}).catch(z=>{S.debug.warn("Vimeo SDK (player.js) failed to load",z)})},ready(){let S=this,z=S.config.vimeo,{premium:F,referrerPolicy:q,...fe}=z;F&&Object.assign(fe,{controls:!1,sidedock:!1});let ge=kt({loop:S.config.loop.active,autoplay:S.autoplay,muted:S.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...fe}),Me=S.media.getAttribute("src");Q(Me)&&(Me=S.media.getAttribute(S.config.attributes.embed.id));let ke=Q($e=Me)?null:Y(Number($e))?$e:$e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:$e;var $e;let gt=l("iframe"),Nt=vt(S.config.urls.vimeo.iframe,ke,ge);if(gt.setAttribute("src",Nt),gt.setAttribute("allowfullscreen",""),gt.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Q(q)||gt.setAttribute("referrerPolicy",q),F||!z.customControls)gt.setAttribute("data-poster",S.poster),S.media=te(gt,S.media);else{let nt=l("div",{class:S.config.classNames.embedContainer,"data-poster":S.poster});nt.appendChild(gt),S.media=te(nt,S.media)}z.customControls||Ue(vt(S.config.urls.vimeo.api,Nt)).then(nt=>{!Q(nt)&&nt.thumbnail_url&&Qe.setPoster.call(S,nt.thumbnail_url).catch(()=>{})}),S.embed=new window.Vimeo.Player(gt,{autopause:S.config.autopause,muted:S.muted}),S.media.paused=!0,S.media.currentTime=0,S.supported.ui&&S.embed.disableTextTrack(),S.media.play=()=>(bt.call(S,!0),S.embed.play()),S.media.pause=()=>(bt.call(S,!1),S.embed.pause()),S.media.stop=()=>{S.pause(),S.currentTime=0};let{currentTime:Lt}=S.media;Object.defineProperty(S.media,"currentTime",{get:()=>Lt,set(nt){let{embed:It,media:Ft,paused:Wt,volume:zt}=S,qt=Wt&&!It.hasPlayed;Ft.seeking=!0,we.call(S,Ft,"seeking"),Promise.resolve(qt&&It.setVolume(0)).then(()=>It.setCurrentTime(nt)).then(()=>qt&&It.pause()).then(()=>qt&&It.setVolume(zt)).catch(()=>{})}});let At=S.config.speed.selected;Object.defineProperty(S.media,"playbackRate",{get:()=>At,set(nt){S.embed.setPlaybackRate(nt).then(()=>{At=nt,we.call(S,S.media,"ratechange")}).catch(()=>{S.options.speed=[1]})}});let{volume:Ht}=S.config;Object.defineProperty(S.media,"volume",{get:()=>Ht,set(nt){S.embed.setVolume(nt).then(()=>{Ht=nt,we.call(S,S.media,"volumechange")})}});let{muted:xe}=S.config;Object.defineProperty(S.media,"muted",{get:()=>xe,set(nt){let It=!!ue(nt)&&nt;S.embed.setVolume(It?0:S.config.volume).then(()=>{xe=It,we.call(S,S.media,"volumechange")})}});let et,{loop:Mt}=S.config;Object.defineProperty(S.media,"loop",{get:()=>Mt,set(nt){let It=ue(nt)?nt:S.config.loop.active;S.embed.setLoop(It).then(()=>{Mt=It})}}),S.embed.getVideoUrl().then(nt=>{et=nt,rt.setDownloadUrl.call(S)}).catch(nt=>{this.debug.warn(nt)}),Object.defineProperty(S.media,"currentSrc",{get:()=>et}),Object.defineProperty(S.media,"ended",{get:()=>S.currentTime===S.duration}),Promise.all([S.embed.getVideoWidth(),S.embed.getVideoHeight()]).then(nt=>{let[It,Ft]=nt;S.embed.ratio=ze(It,Ft),He.call(this)}),S.embed.setAutopause(S.config.autopause).then(nt=>{S.config.autopause=nt}),S.embed.getVideoTitle().then(nt=>{S.config.title=nt,Qe.setTitle.call(this)}),S.embed.getCurrentTime().then(nt=>{Lt=nt,we.call(S,S.media,"timeupdate")}),S.embed.getDuration().then(nt=>{S.media.duration=nt,we.call(S,S.media,"durationchange")}),S.embed.getTextTracks().then(nt=>{S.media.textTracks=nt,ft.setup.call(S)}),S.embed.on("cuechange",({cues:nt=[]})=>{let It=nt.map(Ft=>function(Wt){let zt=document.createDocumentFragment(),qt=document.createElement("div");return zt.appendChild(qt),qt.innerHTML=Wt,zt.firstChild.innerText}(Ft.text));ft.updateCues.call(S,It)}),S.embed.on("loaded",()=>{S.embed.getPaused().then(nt=>{bt.call(S,!nt),nt||we.call(S,S.media,"playing")}),se(S.embed.element)&&S.supported.ui&&S.embed.element.setAttribute("tabindex",-1)}),S.embed.on("bufferstart",()=>{we.call(S,S.media,"waiting")}),S.embed.on("bufferend",()=>{we.call(S,S.media,"playing")}),S.embed.on("play",()=>{bt.call(S,!0),we.call(S,S.media,"playing")}),S.embed.on("pause",()=>{bt.call(S,!1)}),S.embed.on("timeupdate",nt=>{S.media.seeking=!1,Lt=nt.seconds,we.call(S,S.media,"timeupdate")}),S.embed.on("progress",nt=>{S.media.buffered=nt.percent,we.call(S,S.media,"progress"),parseInt(nt.percent,10)===1&&we.call(S,S.media,"canplaythrough"),S.embed.getDuration().then(It=>{It!==S.media.duration&&(S.media.duration=It,we.call(S,S.media,"durationchange"))})}),S.embed.on("seeked",()=>{S.media.seeking=!1,we.call(S,S.media,"seeked")}),S.embed.on("ended",()=>{S.media.paused=!0,we.call(S,S.media,"ended")}),S.embed.on("error",nt=>{S.media.error=nt,we.call(S,S.media,"error")}),z.customControls&&setTimeout(()=>Qe.build.call(S),0)}};function xt(S){S&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===S&&(this.media.paused=!S,we.call(this,this.media,S?"play":"pause"))}function Qt(S){return S.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}let Xt={setup(){if(ne(this.elements.wrapper,this.config.classNames.embed,!0),U(window.YT)&&re(window.YT.Player))Xt.ready.call(this);else{let S=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{re(S)&&S(),Xt.ready.call(this)},st(this.config.urls.youtube.sdk).catch(z=>{this.debug.warn("YouTube API failed to load",z)})}},getTitle(S){Ue(vt(this.config.urls.youtube.api,S)).then(z=>{if(U(z)){let{title:F,height:q,width:fe}=z;this.config.title=F,Qe.setTitle.call(this),this.embed.ratio=ze(fe,q)}He.call(this)}).catch(()=>{He.call(this)})},ready(){let S=this,z=S.config.youtube,F=S.media&&S.media.getAttribute("id");if(!Q(F)&&F.startsWith("youtube-"))return;let q=S.media.getAttribute("src");Q(q)&&(q=S.media.getAttribute(this.config.attributes.embed.id));let fe=Q(ge=q)?null:ge.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:ge;var ge;let Me=l("div",{id:`${S.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":z.customControls?S.poster:void 0});if(S.media=te(Me,S.media),z.customControls){let ke=$e=>`https://i.ytimg.com/vi/${fe}/${$e}default.jpg`;Oe(ke("maxres"),121).catch(()=>Oe(ke("sd"),121)).catch(()=>Oe(ke("hq"))).then($e=>Qe.setPoster.call(S,$e.src)).then($e=>{$e.includes("maxres")||(S.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}S.embed=new window.YT.Player(S.media,{videoId:fe,host:Qt(z),playerVars:c({},{autoplay:S.config.autoplay?1:0,hl:S.config.hl,controls:S.supported.ui&&z.customControls?0:1,disablekb:1,playsinline:S.config.fullscreen.iosNative?0:1,cc_load_policy:S.captions.active?1:0,cc_lang_pref:S.config.captions.language,widget_referrer:window?window.location.href:null},z),events:{onError(ke){if(!S.media.error){let $e=ke.data,gt={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[$e]||"An unknown error occured";S.media.error={code:$e,message:gt},we.call(S,S.media,"error")}},onPlaybackRateChange(ke){let $e=ke.target;S.media.playbackRate=$e.getPlaybackRate(),we.call(S,S.media,"ratechange")},onReady(ke){if(re(S.media.play))return;let $e=ke.target;Xt.getTitle.call(S,fe),S.media.play=()=>{xt.call(S,!0),$e.playVideo()},S.media.pause=()=>{xt.call(S,!1),$e.pauseVideo()},S.media.stop=()=>{$e.stopVideo()},S.media.duration=$e.getDuration(),S.media.paused=!0,S.media.currentTime=0,Object.defineProperty(S.media,"currentTime",{get:()=>Number($e.getCurrentTime()),set(At){S.paused&&!S.embed.hasPlayed&&S.embed.mute(),S.media.seeking=!0,we.call(S,S.media,"seeking"),$e.seekTo(At)}}),Object.defineProperty(S.media,"playbackRate",{get:()=>$e.getPlaybackRate(),set(At){$e.setPlaybackRate(At)}});let{volume:gt}=S.config;Object.defineProperty(S.media,"volume",{get:()=>gt,set(At){gt=At,$e.setVolume(100*gt),we.call(S,S.media,"volumechange")}});let{muted:Nt}=S.config;Object.defineProperty(S.media,"muted",{get:()=>Nt,set(At){let Ht=ue(At)?At:Nt;Nt=Ht,$e[Ht?"mute":"unMute"](),$e.setVolume(100*gt),we.call(S,S.media,"volumechange")}}),Object.defineProperty(S.media,"currentSrc",{get:()=>$e.getVideoUrl()}),Object.defineProperty(S.media,"ended",{get:()=>S.currentTime===S.duration});let Lt=$e.getAvailablePlaybackRates();S.options.speed=Lt.filter(At=>S.config.speed.options.includes(At)),S.supported.ui&&z.customControls&&S.media.setAttribute("tabindex",-1),we.call(S,S.media,"timeupdate"),we.call(S,S.media,"durationchange"),clearInterval(S.timers.buffering),S.timers.buffering=setInterval(()=>{S.media.buffered=$e.getVideoLoadedFraction(),(S.media.lastBuffered===null||S.media.lastBuffered<S.media.buffered)&&we.call(S,S.media,"progress"),S.media.lastBuffered=S.media.buffered,S.media.buffered===1&&(clearInterval(S.timers.buffering),we.call(S,S.media,"canplaythrough"))},200),z.customControls&&setTimeout(()=>Qe.build.call(S),50)},onStateChange(ke){let $e=ke.target;switch(clearInterval(S.timers.playing),S.media.seeking&&[1,2].includes(ke.data)&&(S.media.seeking=!1,we.call(S,S.media,"seeked")),ke.data){case-1:we.call(S,S.media,"timeupdate"),S.media.buffered=$e.getVideoLoadedFraction(),we.call(S,S.media,"progress");break;case 0:xt.call(S,!1),S.media.loop?($e.stopVideo(),$e.playVideo()):we.call(S,S.media,"ended");break;case 1:z.customControls&&!S.config.autoplay&&S.media.paused&&!S.embed.hasPlayed?S.media.pause():(xt.call(S,!0),we.call(S,S.media,"playing"),S.timers.playing=setInterval(()=>{we.call(S,S.media,"timeupdate")},50),S.media.duration!==$e.getDuration()&&(S.media.duration=$e.getDuration(),we.call(S,S.media,"durationchange")));break;case 2:S.muted||S.embed.unMute(),xt.call(S,!1);break;case 3:we.call(S,S.media,"waiting")}we.call(S,S.elements.container,"statechange",!1,{code:ke.data})}}})}},Ut={setup(){this.media?(ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=l("div",{class:this.config.classNames.video}),E(this.media,this.elements.wrapper),this.elements.poster=l("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?mt.setup.call(this):this.isYouTube?Xt.setup.call(this):this.isVimeo&&Yt.setup.call(this)):this.debug.warn("No media element found!")}};class Zt{constructor(z){e(this,"load",()=>{this.enabled&&(U(window.google)&&U(window.google.ima)?this.ready():st(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),e(this,"ready",()=>{var F;this.enabled||((F=this).manager&&F.manager.destroy(),F.elements.displayContainer&&F.elements.displayContainer.destroy(),F.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),e(this,"setupIMA",()=>{this.elements.container=l("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,F=>this.onAdsManagerLoaded(F),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,F=>this.onAdError(F),!1),this.requestAds()}),e(this,"requestAds",()=>{let{container:F}=this.player.elements;try{let q=new google.ima.AdsRequest;q.adTagUrl=this.tagUrl,q.linearAdSlotWidth=F.offsetWidth,q.linearAdSlotHeight=F.offsetHeight,q.nonLinearAdSlotWidth=F.offsetWidth,q.nonLinearAdSlotHeight=F.offsetHeight,q.forceNonLinearFullSlot=!1,q.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(q)}catch(q){this.onAdError(q)}}),e(this,"pollCountdown",(F=!1)=>{if(!F)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{let q=Et(Math.max(this.manager.getRemainingTime(),0)),fe=`${Ze.get("advertisement",this.player.config)} - ${q}`;this.elements.container.setAttribute("data-badge-text",fe)},100)}),e(this,"onAdsManagerLoaded",F=>{if(!this.enabled)return;let q=new google.ima.AdsRenderingSettings;q.restoreCustomPlaybackStateOnAdBreakComplete=!0,q.enablePreloading=!0,this.manager=F.getAdsManager(this.player,q),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,fe=>this.onAdError(fe)),Object.keys(google.ima.AdEvent.Type).forEach(fe=>{this.manager.addEventListener(google.ima.AdEvent.Type[fe],ge=>this.onAdEvent(ge))}),this.trigger("loaded")}),e(this,"addCuePoints",()=>{Q(this.cuePoints)||this.cuePoints.forEach(F=>{if(F!==0&&F!==-1&&F<this.player.duration){let q=this.player.elements.progress;if(se(q)){let fe=100/this.player.duration*F,ge=l("span",{class:this.player.config.classNames.cues});ge.style.left=`${fe.toString()}%`,q.appendChild(ge)}}})}),e(this,"onAdEvent",F=>{let{container:q}=this.player.elements,fe=F.getAd(),ge=F.getAdData();switch((Me=>{we.call(this.player,this.player.media,`ads${Me.replace(/_/g,"").toLowerCase()}`)})(F.type),F.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),fe.isLinear()||(fe.width=q.offsetWidth,fe.height=q.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:ge.adError&&this.player.debug.warn(`Non-fatal ad error: ${ge.adError.getMessage()}`)}}),e(this,"onAdError",F=>{this.cancel(),this.player.debug.warn("Ads error",F)}),e(this,"listeners",()=>{let{container:F}=this.player.elements,q;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{q=this.player.currentTime}),this.player.on("seeked",()=>{let fe=this.player.currentTime;Q(this.cuePoints)||this.cuePoints.forEach((ge,Me)=>{q<ge&&ge<fe&&(this.manager.discardAdBreak(),this.cuePoints.splice(Me,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(F.offsetWidth,F.offsetHeight,google.ima.ViewMode.NORMAL)})}),e(this,"play",()=>{let{container:F}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(F.offsetWidth,F.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(q){this.onAdError(q)}}).catch(()=>{})}),e(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Xe(this.player.media.play())}),e(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),e(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),e(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(F=>{this.on("loaded",F),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),e(this,"trigger",(F,...q)=>{let fe=this.events[F];ve(fe)&&fe.forEach(ge=>{re(ge)&&ge.apply(this,q)})}),e(this,"on",(F,q)=>(ve(this.events[F])||(this.events[F]=[]),this.events[F].push(q),this)),e(this,"startSafetyTimer",(F,q)=>{this.player.debug.log(`Safety timer invoked from: ${q}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},F)}),e(this,"clearSafetyTimer",F=>{x(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${F}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=z,this.config=z.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((F,q)=>{this.on("loaded",F),this.on("error",q)}),this.load()}get enabled(){let{config:z}=this;return this.player.isHTML5&&this.player.isVideo&&z.enabled&&(!Q(z.publisherId)||de(z.tagUrl))}get tagUrl(){let{config:z}=this;return de(z.tagUrl)?z.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${kt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:z.publisherId})}`}}let qe=S=>{let z=[];return S.split(/\r\n\r\n|\n\n|\r\r/).forEach(F=>{let q={};F.split(/\r\n|\n|\r/).forEach(fe=>{if(Y(q.startTime)){if(!Q(fe.trim())&&Q(q.text)){let ge=fe.trim().split("#xywh=");[q.text]=ge,ge[1]&&([q.x,q.y,q.w,q.h]=ge[1].split(","))}}else{let ge=fe.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);ge&&(q.startTime=60*Number(ge[1]||0)*60+60*Number(ge[2])+Number(ge[3])+Number(`0.${ge[4]}`),q.endTime=60*Number(ge[6]||0)*60+60*Number(ge[7])+Number(ge[8])+Number(`0.${ge[9]}`))}}),q.text&&z.push(q)}),z},ot=(S,z)=>{let F={};return S>z.width/z.height?(F.width=z.width,F.height=1/S*z.width):(F.height=z.height,F.width=S*z.height),F};class yt{constructor(z){e(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)})}),e(this,"getThumbnails",()=>new Promise(F=>{let{src:q}=this.player.config.previewThumbnails;if(Q(q))throw new Error("Missing previewThumbnails.src config attribute");let fe=()=>{this.thumbnails.sort((ge,Me)=>ge.height-Me.height),this.player.debug.log("Preview thumbnails",this.thumbnails),F()};if(re(q))q(ge=>{this.thumbnails=ge,fe()});else{let ge=(oe(q)?[q]:q).map(Me=>this.getThumbnail(Me));Promise.all(ge).then(fe)}})),e(this,"getThumbnail",F=>new Promise(q=>{Ue(F).then(fe=>{let ge={frames:qe(fe),height:null,urlPrefix:""};ge.frames[0].text.startsWith("/")||ge.frames[0].text.startsWith("http://")||ge.frames[0].text.startsWith("https://")||(ge.urlPrefix=F.substring(0,F.lastIndexOf("/")+1));let Me=new Image;Me.onload=()=>{ge.height=Me.naturalHeight,ge.width=Me.naturalWidth,this.thumbnails.push(ge),q()},Me.src=ge.urlPrefix+ge.frames[0].text})})),e(this,"startMove",F=>{if(this.loaded&&J(F)&&["touchmove","mousemove"].includes(F.type)&&this.player.media.duration){if(F.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{let q=this.player.elements.progress.getBoundingClientRect(),fe=100/q.width*(F.pageX-q.left);this.seekTime=this.player.media.duration*(fe/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=F.pageX,this.elements.thumb.time.innerText=Et(this.seekTime)}this.showImageAtCurrentTime()}}),e(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),e(this,"startScrubbing",F=>{(x(F.button)||F.button===!1||F.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),e(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Ge.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),e(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),e(this,"render",()=>{this.elements.thumb.container=l("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=l("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);let F=l("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=l("span",{},"00:00"),F.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(F),se(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=l("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),e(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),e(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();let F=this.thumbnails[0].frames.findIndex(ge=>this.seekTime>=ge.startTime&&this.seekTime<=ge.endTime),q=F>=0,fe=0;this.mouseDown||this.toggleThumbContainer(q),q&&(this.thumbnails.forEach((ge,Me)=>{this.loadedImages.includes(ge.frames[F].text)&&(fe=Me)}),F!==this.showingThumb&&(this.showingThumb=F,this.loadImage(fe)))}),e(this,"loadImage",(F=0)=>{let q=this.showingThumb,fe=this.thumbnails[F],{urlPrefix:ge}=fe,Me=fe.frames[q],ke=fe.frames[q].text,$e=ge+ke;if(this.currentImageElement&&this.currentImageElement.dataset.filename===ke)this.showImage(this.currentImageElement,Me,F,q,ke,!1),this.currentImageElement.dataset.index=q,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);let gt=new Image;gt.src=$e,gt.dataset.index=q,gt.dataset.filename=ke,this.showingThumbFilename=ke,this.player.debug.log(`Loading image: ${$e}`),gt.onload=()=>this.showImage(gt,Me,F,q,ke,!0),this.loadingImage=gt,this.removeOldImages(gt)}}),e(this,"showImage",(F,q,fe,ge,Me,ke=!0)=>{this.player.debug.log(`Showing thumb: ${Me}. num: ${ge}. qual: ${fe}. newimg: ${ke}`),this.setImageSizeAndOffset(F,q),ke&&(this.currentImageContainer.appendChild(F),this.currentImageElement=F,this.loadedImages.includes(Me)||this.loadedImages.push(Me)),this.preloadNearby(ge,!0).then(this.preloadNearby(ge,!1)).then(this.getHigherQuality(fe,F,q,Me))}),e(this,"removeOldImages",F=>{Array.from(this.currentImageContainer.children).forEach(q=>{if(q.tagName.toLowerCase()!=="img")return;let fe=this.usingSprites?500:1e3;if(q.dataset.index!==F.dataset.index&&!q.dataset.deleting){q.dataset.deleting=!0;let{currentImageContainer:ge}=this;setTimeout(()=>{ge.removeChild(q),this.player.debug.log(`Removing thumb: ${q.dataset.filename}`)},fe)}})}),e(this,"preloadNearby",(F,q=!0)=>new Promise(fe=>{setTimeout(()=>{let ge=this.thumbnails[0].frames[F].text;if(this.showingThumbFilename===ge){let Me;Me=q?this.thumbnails[0].frames.slice(F):this.thumbnails[0].frames.slice(0,F).reverse();let ke=!1;Me.forEach($e=>{let gt=$e.text;if(gt!==ge&&!this.loadedImages.includes(gt)){ke=!0,this.player.debug.log(`Preloading thumb filename: ${gt}`);let{urlPrefix:Nt}=this.thumbnails[0],Lt=Nt+gt,At=new Image;At.src=Lt,At.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${gt}`),this.loadedImages.includes(gt)||this.loadedImages.push(gt),fe()}}}),ke||fe()}},300)})),e(this,"getHigherQuality",(F,q,fe,ge)=>{if(F<this.thumbnails.length-1){let Me=q.naturalHeight;this.usingSprites&&(Me=fe.h),Me<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===ge&&(this.player.debug.log(`Showing higher quality thumb for: ${ge}`),this.loadImage(F+1))},300)}}),e(this,"toggleThumbContainer",(F=!1,q=!1)=>{let fe=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(fe,F),!F&&q&&(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"toggleScrubbingContainer",(F=!1)=>{let q=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(q,F),F||(this.showingThumb=null,this.showingThumbFilename=null)}),e(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),e(this,"setThumbContainerSizeAndPos",()=>{if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){let F=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width=`${F}px`}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){let F=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${F}px`}}else{let F=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${this.thumbContainerHeight}px`,this.elements.thumb.imageContainer.style.width=`${F}px`}this.setThumbContainerPos()}),e(this,"setThumbContainerPos",()=>{let F=this.player.elements.progress.getBoundingClientRect(),q=this.player.elements.container.getBoundingClientRect(),{container:fe}=this.elements.thumb,ge=q.left-F.left+10,Me=q.right-F.left-fe.clientWidth-10,ke=this.mousePosX-F.left-fe.clientWidth/2;ke<ge&&(ke=ge),ke>Me&&(ke=Me),fe.style.left=`${ke}px`}),e(this,"setScrubbingContainerSize",()=>{let{width:F,height:q}=ot(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${F}px`,this.elements.scrubbing.container.style.height=`${q}px`}),e(this,"setImageSizeAndOffset",(F,q)=>{if(!this.usingSprites)return;let fe=this.thumbContainerHeight/q.h;F.style.height=F.naturalHeight*fe+"px",F.style.width=F.naturalWidth*fe+"px",F.style.left=`-${q.x*fe}px`,F.style.top=`-${q.y*fe}px`}),this.player=z,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){let{height:z}=ot(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return z}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(z){this.mouseDown?this.currentScrubbingImageElement=z:this.currentThumbnailImageElement=z}}let Ke={insertElements(S,z){oe(z)?d(S,this.media,{src:z}):ve(z)&&z.forEach(F=>{d(S,this.media,F)})},change(S){G(S,"sources.length")?(mt.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],y(this.media),this.media=null,se(this.elements.container)&&this.elements.container.removeAttribute("class");let{sources:z,type:F}=S,[{provider:q=Pt.html5,src:fe}]=z,ge=q==="html5"?F:"div",Me=q==="html5"?{}:{src:fe};Object.assign(this,{provider:q,type:F,supported:De.check(F,q,this.config.playsinline),media:l(ge,Me)}),this.elements.container.appendChild(this.media),ue(S.autoplay)&&(this.config.autoplay=S.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Q(S.poster)||(this.poster=S.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Qe.addStyleHook.call(this),this.isHTML5&&Ke.insertElements.call(this,"source",z),this.config.title=S.title,Ut.setup.call(this),this.isHTML5&&Object.keys(S).includes("tracks")&&Ke.insertElements.call(this,"track",S.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.isHTML5&&this.media.load(),Q(S.previewThumbnails)||(Object.assign(this.config.previewThumbnails,S.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yt(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class it{constructor(z,F){if(e(this,"play",()=>re(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Xe(this.media.play())),this.media.play()):null),e(this,"pause",()=>this.playing&&re(this.media.pause)?this.media.pause():null),e(this,"togglePlay",ke=>(ue(ke)?ke:!this.playing)?this.play():this.pause()),e(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):re(this.media.stop)&&this.media.stop()}),e(this,"restart",()=>{this.currentTime=0}),e(this,"rewind",ke=>{this.currentTime-=Y(ke)?ke:this.config.seekTime}),e(this,"forward",ke=>{this.currentTime+=Y(ke)?ke:this.config.seekTime}),e(this,"increaseVolume",ke=>{let $e=this.media.muted?0:this.volume;this.volume=$e+(Y(ke)?ke:0)}),e(this,"decreaseVolume",ke=>{this.increaseVolume(-ke)}),e(this,"airplay",()=>{De.airplay&&this.media.webkitShowPlaybackTargetPicker()}),e(this,"toggleControls",ke=>{if(this.supported.ui&&!this.isAudio){let $e=Se(this.elements.container,this.config.classNames.hideControls),gt=ke===void 0?void 0:!ke,Nt=ne(this.elements.container,this.config.classNames.hideControls,gt);if(Nt&&ve(this.config.controls)&&this.config.controls.includes("settings")&&!Q(this.config.settings)&&rt.toggleMenu.call(this,!1),Nt!==$e){let Lt=Nt?"controlshidden":"controlsshown";we.call(this,this.media,Lt)}return!Nt}return!1}),e(this,"on",(ke,$e)=>{Le.call(this,this.elements.container,ke,$e)}),e(this,"once",(ke,$e)=>{Ge.call(this,this.elements.container,ke,$e)}),e(this,"off",(ke,$e)=>{Ve(this.elements.container,ke,$e)}),e(this,"destroy",(ke,$e=!1)=>{if(!this.ready)return;let gt=()=>{document.body.style.overflow="",this.embed=null,$e?(Object.keys(this.elements).length&&(y(this.elements.buttons.play),y(this.elements.captions),y(this.elements.controls),y(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),re(ke)&&ke()):(at.call(this),mt.cancelRequests.call(this),te(this.elements.original,this.elements.container),we.call(this,this.elements.original,"destroyed",!0),re(ke)&&ke.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Qe.toggleNativeControls.call(this,!0),gt()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&re(this.embed.destroy)&&this.embed.destroy(),gt()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(gt),setTimeout(gt,200))}),e(this,"supports",ke=>De.mime.call(this,ke)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=De.touch,this.media=z,oe(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||ce(this.media)||ve(this.media))&&(this.media=this.media[0]),this.config=c({},Gt,it.defaults,F||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(ke){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Te(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",De),x(this.media)||!se(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!De.check().api)return void this.debug.error("Setup failed: no support");let q=this.media.cloneNode(!0);q.autoplay=!1,this.elements.original=q;let fe=this.media.tagName.toLowerCase(),ge=null,Me=null;switch(fe){case"div":if(ge=this.media.querySelector("iframe"),se(ge)){if(Me=Dt(ge.getAttribute("src")),this.provider=function(ke){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(ke)?Pt.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(ke)?Pt.vimeo:null}(Me.toString()),this.elements.container=this.media,this.media=ge,this.elements.container.className="",Me.search.length){let ke=["1","true"];ke.includes(Me.searchParams.get("autoplay"))&&(this.config.autoplay=!0),ke.includes(Me.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=ke.includes(Me.searchParams.get("playsinline")),this.config.youtube.hl=Me.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Q(this.provider)||!Object.values(Pt).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Z;break;case"video":case"audio":this.type=fe,this.provider=Pt.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=De.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Tt(this),this.storage=new ut(this),this.media.plyr=this,se(this.elements.container)||(this.elements.container=l("div",{tabindex:0}),E(this.media,this.elements.container)),Qe.migrateStyles.call(this),Qe.addStyleHook.call(this),Ut.setup.call(this),this.config.debug&&Le.call(this,this.elements.container,this.config.events.join(" "),ke=>{this.debug.log(`event: ${ke.type}`)}),this.fullscreen=new be(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Zt(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Xe(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Pt.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Pt.youtube}get isVimeo(){return this.provider===Pt.vimeo}get isVideo(){return this.type===Z}get isAudio(){return this.type===Ee}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&this.currentTime===0)}get ended(){return Boolean(this.media.ended)}set currentTime(z){if(!this.duration)return;let F=Y(z)&&z>0;this.media.currentTime=F?Math.min(z,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){let{buffered:z}=this.media;return Y(z)?z:z&&z.length&&this.duration>0?z.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){let z=parseFloat(this.config.duration),F=(this.media||{}).duration,q=Y(F)&&F!==1/0?F:0;return z||q}set volume(z){let F=z;oe(F)&&(F=Number(F)),Y(F)||(F=this.storage.get("volume")),Y(F)||({volume:F}=this.config),F>1&&(F=1),F<0&&(F=0),this.config.volume=F,this.media.volume=F,!Q(z)&&this.muted&&F>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(z){let F=z;ue(F)||(F=this.storage.get("muted")),ue(F)||(F=this.config.muted),this.config.muted=F,this.media.muted=F}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(z){let F=null;Y(z)&&(F=z),Y(F)||(F=this.storage.get("speed")),Y(F)||(F=this.config.speed.selected);let{minimumSpeed:q,maximumSpeed:fe}=this;F=function(ge=0,Me=0,ke=255){return Math.min(Math.max(ge,Me),ke)}(F,q,fe),this.config.speed.selected=F,setTimeout(()=>{this.media.playbackRate=F},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(z){let F=this.config.quality,q=this.options.quality;if(!q.length)return;let fe=[!Q(z)&&Number(z),this.storage.get("quality"),F.selected,F.default].find(Y),ge=!0;if(!q.includes(fe)){let Me=ct(q,fe);this.debug.warn(`Unsupported quality option: ${fe}, using ${Me} instead`),fe=Me,ge=!1}F.selected=fe,this.media.quality=fe,ge&&this.storage.set({quality:fe})}get quality(){return this.media.quality}set loop(z){let F=ue(z)?z:this.config.loop.active;this.config.loop.active=F,this.media.loop=F}get loop(){return Boolean(this.media.loop)}set source(z){Ke.change.call(this,z)}get source(){return this.media.currentSrc}get download(){let{download:z}=this.config.urls;return de(z)?z:this.source}set download(z){de(z)&&(this.config.urls.download=z,rt.setDownloadUrl.call(this))}set poster(z){this.isVideo?Qe.setPoster.call(this,z,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;let z=wt(We.call(this));return ve(z)?z.join(":"):z}set ratio(z){this.isVideo?oe(z)&&Ct(z)?(this.config.ratio=wt(z),He.call(this)):this.debug.error(`Invalid aspect ratio specified (${z})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(z){let F=ue(z)?z:this.config.autoplay;this.config.autoplay=F}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(z){ft.toggle.call(this,z,!1)}set currentTrack(z){ft.set.call(this,z,!1)}get currentTrack(){let{toggled:z,currentTrack:F}=this.captions;return z?F:-1}set language(z){ft.setLanguage.call(this,z,!1)}get language(){return(ft.getCurrentTrack.call(this)||{}).language}set pip(z){if(!De.pip)return;let F=ue(z)?z:!this.pip;re(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(F?Kt:Vt),re(this.media.requestPictureInPicture)&&(!this.pip&&F?this.media.requestPictureInPicture():this.pip&&!F&&document.exitPictureInPicture())}get pip(){return De.pip?Q(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Kt:null}static supported(z,F,q){return De.check(z,F,q)}static loadSprite(z,F){return Je(z,F)}static setup(z,F={}){let q=null;return oe(z)?q=Array.from(document.querySelectorAll(z)):ce(z)?q=Array.from(z):ve(z)&&(q=z.filter(se)),Q(q)?null:q.map(fe=>new it(fe,F))}}var Ne;return it.defaults=(Ne=Gt,JSON.parse(JSON.stringify(Ne))),it})});var Qa=sr((Vl,ja)=>{ja.exports=function e(g,r,t){return r===void 0?function(p,i){return e(g,p,i)}:(t===void 0&&(t="0"),g-=r.toString().length,g>0?new Array(g+(/\./.test(r)?2:1)).join(t)+r:r+"")}});var Pn=sr((Kl,ei)=>{"use strict";ei.exports={fromMs:Ja,fromS:vo,toMs:Za,toS:yo};var Zr=Qa(),Dn=36e5,Nn=6e4,kr=1e3,$a="Time format error";function Ja(e,g="mm:ss"){if(typeof e!="number"||Number.isNaN(e))throw new Error("NaN error");let r=Math.abs(e),t=e<0,p=Math.floor(r/Dn),i=Math.floor(r%Dn/Nn),o=Math.floor(r%Nn/kr),n=Math.floor(r%kr);return Eo({negative:t,hours:p,minutes:i,seconds:o,miliseconds:n},g)}function vo(e,g="mm:ss"){if(typeof e!="number"||Number.isNaN(e))throw new Error("NaN error");let r=e*kr;return Ja(r,g)}function Za(e,g="mm:ss"){let r;if(["mm:ss","mm:ss.sss","hh:mm:ss","hh:mm:ss.sss"].includes(g))r=/^(-)?(?:(\d\d+):)?(\d\d):(\d\d)(\.\d+)?$/;else if(g==="hh:mm")r=/^(-)?(\d\d):(\d\d)(?::(\d\d)(?:(\.\d+))?)?$/;else throw new Error($a);let t=r.exec(e);if(!t)throw new Error;let p=t[1]==="-",i=t[2]|0,o=t[3]|0,n=t[4]|0,f=Math.floor(1e3*t[5]|0);if(o>60||n>60)throw new Error;return(p?-1:1)*(i*Dn+o*Nn+n*kr+f)}function yo(e,g="mm:ss"){let r=Za(e,g);return Math.floor(r/kr)}function Eo(e,g){let r,t,p;switch(g.toLowerCase()){case"hh:mm:ss.sss":r=!0,t=!0,p=!0;break;case"hh:mm:ss":r=!!e.miliseconds,t=!0,p=!0;break;case"hh:mm":r=!!e.miliseconds,t=r||!!e.seconds,p=!0;break;case"mm:ss":r=!!e.miliseconds,t=!0,p=!!e.hours;break;case"mm:ss.sss":r=!0,t=!0,p=!!e.hours;break;default:throw new Error($a)}let i=Zr(2,e.hours),o=Zr(2,e.minutes),n=Zr(2,e.seconds),f=Zr(3,e.miliseconds);return(e.negative?"-":"")+(p?r?`${i}:${o}:${n}.${f}`:t?`${i}:${o}:${n}`:`${i}:${o}`:r?`${o}:${n}.${f}`:`${o}:${n}`)}});Ds(exports,{default:()=>Fn});var oi=Jt(Pr()),li=Jt(require("obsidian"));var Xa=Jt(Kr());var jn=Jt(Kr()),Qn=Jt(require("obsidian"));var Yr=e=>e.hash?e.href.slice(0,-e.hash.length):e.href,Or=(e,g,r)=>{let[t,p]=(0,jn.default)(g);e.style.setProperty("--max-ratio-width",t*r+p)},Wr=(e,g)=>{let{editor:r,app:t}=g,p=r.getCursor("to");r.replaceRange(e,p,p),t.isMobile&&r.setCursor(r.offsetToPos(r.posToOffset(p)+e.length))},$n=e=>new Promise((g,r)=>{if(Qn.Platform.isDesktopApp){let t=require("https").request({hostname:"b23.tv",port:443,path:"/"+e,method:"GET"},p=>p.headers.location?g(p.headers.location):r(new Error("No redirect location found")));t.on("error",p=>r(p)),t.end()}else r(new TypeError("Calling node https in non-electron environment"))});var gr=e=>e.plugins.plugins["mx-bili-plugin"]!==void 0,Jn=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.settings.port;throw new Error("bili plugin not available")},Zn=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.portSetting;throw new Error("bili plugin not available")},ea=e=>{let g=e.plugins.plugins["mx-bili-plugin"];if(gr(e))return g.fetchPoster;throw new Error("bili plugin not available")};var ta=e=>createEl("iframe",{cls:"bili-iframe",attr:{src:e.iframe.toString(),scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:!1,sandbox:"allow-forms allow-presentation allow-same-origin allow-scripts allow-modals"}});var pr=Jt(require("obsidian")),En=Jt(zr()),xa=Jt(Da());var Zs={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"\u0430\u04A7\u0441\u0443\u0430 \u0431\u044B\u0437\u0448\u04D9\u0430"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"\u12A0\u121B\u122D\u129B"},an:{name:"Aragonese",nativeName:"aragon\xE9s"},ar:{name:"Arabic",nativeName:"\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629"},as:{name:"Assamese",nativeName:"\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE"},av:{name:"Avaric",nativeName:"\u0430\u0432\u0430\u0440 \u043C\u0430\u0446\u04C0"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"az\u0259rbaycan dili"},ba:{name:"Bashkir",nativeName:"\u0431\u0430\u0448\u04A1\u043E\u0440\u0442 \u0442\u0435\u043B\u0435"},be:{name:"Belarusian",nativeName:"\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u043C\u043E\u0432\u0430"},bg:{name:"Bulgarian",nativeName:"\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438 \u0435\u0437\u0438\u043A"},bh:{name:"Bihari",nativeName:"\u092D\u094B\u091C\u092A\u0941\u0930\u0940"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"\u09AC\u09BE\u0982\u09B2\u09BE"},bo:{name:"Tibetan",nativeName:"\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Catal\xE0"},ce:{name:"Chechen",nativeName:"\u043D\u043E\u0445\u0447\u0438\u0439\u043D \u043C\u043E\u0442\u0442"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"\u14C0\u1426\u1403\u152D\u140D\u140F\u1423"},cs:{name:"Czech",nativeName:"\u010De\u0161tina"},cu:{name:"Old Church Slavonic",nativeName:"\u0469\u0437\u044B\u043A\u044A \u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A"},cv:{name:"Chuvash",nativeName:"\u0447\u04D1\u0432\u0430\u0448 \u0447\u04D7\u043B\u0445\u0438"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"Dhivehi"},dz:{name:"Dzongkha",nativeName:"\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41"},ee:{name:"Ewe",nativeName:"E\u028Begbe"},el:{name:"Greek",nativeName:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Espa\xF1ol"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"\u0641\u0627\u0631\u0633\u06CC"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"Vakaviti"},fo:{name:"Faroese",nativeName:"f\xF8royskt"},fr:{name:"French",nativeName:"Fran\xE7ais"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"G\xE0idhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaran\xED",nativeName:"Ava\xF1e'\u1EBD"},gu:{name:"Gujarati",nativeName:"\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"\u0647\u064E\u0648\u064F\u0633\u064E"},he:{name:"Hebrew",nativeName:"\u05E2\u05D1\u05E8\u05D9\u05EA"},hi:{name:"Hindi",nativeName:"\u0939\u093F\u0928\u094D\u0926\u0940"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Krey\xF2l ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"As\u1EE5s\u1EE5 Igbo"},ii:{name:"Nuosu",nativeName:"\uA188\uA320\uA4BF Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"I\xF1upiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"\xCDslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"\u1403\u14C4\u1483\u144E\u1450\u1466"},ja:{name:"Japanese",nativeName:"\u65E5\u672C\u8A9E"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"G\u0129k\u0169y\u0169"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"\u1781\u17C1\u1798\u179A\u1797\u17B6\u179F\u17B6"},kn:{name:"Kannada",nativeName:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"},ko:{name:"Korean",nativeName:"\uD55C\uAD6D\uC5B4"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"\u0915\u0936\u094D\u092E\u0940\u0930\u0940"},ku:{name:"Kurdish",nativeName:"Kurd\xEE"},kv:{name:"Komi",nativeName:"\u043A\u043E\u043C\u0438 \u043A\u044B\u0432"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"L\xEBtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Ling\xE1la"},lo:{name:"Lao",nativeName:"\u0E9E\u0EB2\u0EAA\u0EB2"},lt:{name:"Lithuanian",nativeName:"lietuvi\u0173 kalba"},lu:{name:"Luba-Katanga",nativeName:"Tshiluba"},lv:{name:"Latvian",nativeName:"latvie\u0161u valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M\u0327aje\u013C"},mi:{name:"M\u0101ori",nativeName:"te reo M\u0101ori"},mk:{name:"Macedonian",nativeName:"\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438 \u0458\u0430\u0437\u0438\u043A"},ml:{name:"Malayalam",nativeName:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02"},mn:{name:"Mongolian",nativeName:"\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B"},mr:{name:"Marathi",nativeName:"\u092E\u0930\u093E\u0920\u0940"},ms:{name:"Malay",nativeName:"Bahasa Malaysia"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"\u1017\u1019\u102C\u1005\u102C"},na:{name:"Nauru",nativeName:"Ekakair\u0169 Naoero"},nb:{name:"Norwegian Bokm\xE5l",nativeName:"Norsk bokm\xE5l"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"\u0928\u0947\u092A\u093E\u0932\u0940"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Din\xE9 bizaad"},ny:{name:"Chichewa",nativeName:"chiChe\u0175a"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"\u0B13\u0B21\u0B3C\u0B3F\u0B06"},os:{name:"Ossetian",nativeName:"\u0438\u0440\u043E\u043D \xE6\u0432\u0437\u0430\u0433"},pa:{name:"Panjabi",nativeName:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},pi:{name:"P\u0101li",nativeName:"\u092A\u093E\u0934\u093F"},pl:{name:"Polish",nativeName:"j\u0119zyk polski"},ps:{name:"Pashto",nativeName:"\u067E\u069A\u062A\u0648"},pt:{name:"Portuguese",nativeName:"Portugu\xEAs"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Rom\xE2n\u0103"},ru:{name:"Russian",nativeName:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"\u0938\u093F\u0928\u094D\u0927\u0940"},se:{name:"Northern Sami",nativeName:"Davvis\xE1megiella"},sg:{name:"Sango",nativeName:"y\xE2ng\xE2 t\xEE s\xE4ng\xF6"},si:{name:"Sinhala",nativeName:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD"},sk:{name:"Slovak",nativeName:"sloven\u010Dina"},sl:{name:"Slovenian",nativeName:"slovenski jezik"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"\u0441\u0440\u043F\u0441\u043A\u0438 \u0458\u0435\u0437\u0438\u043A"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},te:{name:"Telugu",nativeName:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},tg:{name:"Tajik",nativeName:"\u0442\u043E\u04B7\u0438\u043A\u04E3"},th:{name:"Thai",nativeName:"\u0E44\u0E17\u0E22"},ti:{name:"Tigrinya",nativeName:"\u1275\u130D\u122D\u129B"},tk:{name:"Turkmen",nativeName:"T\xFCrkmen"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"T\xFCrk\xE7e"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"\u0442\u0430\u0442\u0430\u0440 \u0442\u0435\u043B\u0435"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5\u200E"},uk:{name:"Ukrainian",nativeName:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},ur:{name:"Urdu",nativeName:"\u0627\u0631\u062F\u0648"},uz:{name:"Uzbek",nativeName:"\u040E\u0437\u0431\u0435\u043A"},ve:{name:"Venda",nativeName:"Tshiven\u1E13a"},vi:{name:"Vietnamese",nativeName:"Ti\u1EBFng Vi\u1EC7t"},vo:{name:"Volap\xFCk",nativeName:"Volap\xFCk"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9"},yo:{name:"Yoruba",nativeName:"Yor\xF9b\xE1"},za:{name:"Zhuang",nativeName:"Sa\u026F cue\u014B\u0185"},zh:{name:"Chinese",nativeName:"\u4E2D\u6587"},zu:{name:"Zulu",nativeName:"isiZulu"}},Tr=Zs;var fr=class{static getLanguages(g=[]){return g.map(r=>({code:r,name:fr.getName(r),nativeName:fr.getNativeName(r)}))}static getName(g){return fr.validate(g)?Tr[g].name:""}static getAllNames(){return Object.values(Tr).map(g=>g.name)}static getNativeName(g){return fr.validate(g)?Tr[g].nativeName:""}static getAllNativeNames(){return Object.values(Tr).map(g=>g.nativeName)}static getCode(g){return Object.keys(Tr).find(t=>{let p=Tr[t];return p.name.toLowerCase()===g.toLowerCase()||p.nativeName.toLowerCase()===g.toLowerCase()})||""}static getAllCodes(){return Object.keys(Tr)}static validate(g){return Tr.hasOwnProperty(g)}};var Lr=Jt(require("obsidian")),Oa=Jt(Pa()),La=e=>{let{basename:g,parent:r}=e,t=r.children.filter(p=>{if(!(p instanceof Lr.TFile))return!1;let i=p.extension==="srt"||p.extension==="vtt",o=p.basename.startsWith(g);return i&&o});if(t.length>1&&(t=t.filter(p=>{let i=p.basename.slice(g.length);return i.startsWith(".")&&fr.validate(i.substring(1))})),t.length===0)return null;{let p=t.filter(i=>i.extension==="vtt").map(i=>i.basename);for(let i=t.length-1;i>=0;i--){let o=t[i];o.extension===".srt"&&p.includes(o.basename)&&t.splice(i,1)}return console.log("found subtitle(s): %o",t.map(i=>i.name)),t}},ro=(e,g)=>Bt(void 0,null,function*(){let r=yield g.read(e);return new Oa.default(new Blob([r])).getURL()}),no=(e,g)=>Bt(void 0,null,function*(){let r=new Blob([yield g.read(e)],{type:"text/vtt"});return URL.createObjectURL(r)}),Fa=(e,g)=>Bt(void 0,null,function*(){let r=new Map;for(let i of e){let o,n;if(typeof i=="string")if((n=g.getAbstractFileByPath(i))&&n instanceof Lr.TFile)o=n;else{console.warn("no subFile found for path: %s",i);continue}else o=i;o.extension==="srt"?r.set(o,yield ro(o,g)):r.set(o,yield no(o,g))}let t=[],p=[];for(let i of r.keys()){let o=i.basename.split(".").pop(),n=null,f=null;if(r.size>1){if(!o||!fr.validate(o))throw new Error("languageCode unable to parse, problem with getSubtitles()? ");n=fr.getNativeName(o),f=o}let h={kind:"captions",label:n!=null?n:"default",srcLang:f!=null?f:void 0,src:r.get(i)},m=createEl("track",{attr:{kind:"captions",label:n,srclang:f,src:r.get(i)}},u=>{navigator.language.substring(0,2)===o&&u.setAttr("default","")});p.push(m),t.push(h)}return{objUrls:[...r.values()],trackEls:p,tracks:t}}),yn=class extends Lr.MarkdownRenderChild{constructor(g,r,t){super(g);this.objectUrls=t!=null?t:[],this.player=r}unload(){this.objectUrls&&this.objectUrls.forEach(g=>URL.revokeObjectURL(g)),this.player.destroy()}};var $t;(function(t){t[t.youtube=0]="youtube",t[t.bili=1]="bili",t[t.vimeo=2]="vimeo"})($t||($t={}));var Xr=new Map([["audio",["mp3","wav","m4a","ogg","3gp","flac"]],["video",["mp4","ogv"]],["media",["webm"]]]),ao=e=>{let g=/\.[^/]+?$/,r,t;if(e instanceof URL)r=e.pathname,t=(0,En.parse)(e.search);else{let p=(0,xa.default)(e,!1);r=p.pathname,t=(0,En.parse)(p.query)}return g.test(r)?r:r==="/api"&&t.raw==="true"&&typeof t.path=="string"&&g.test(t.path)?t.path:null},_n=e=>{let g=null;if(e instanceof pr.TFile)g=e.extension;else{let t=ao(e);t&&(g=t.split(".").pop())}if(!g)return null;let r=null;for(let[t,p]of Xr)p.includes(g)&&(r=t);return r},nr=e=>Array.isArray(e.subtitles),Sr=e=>!nr(e)&&!ar(e),ar=e=>e.host!==void 0&&e.id!==void 0,vr=(...e)=>Bt(void 0,null,function*(){var p;let[g,r]=e;if(typeof g=="string")try{g=new URL(g)}catch(i){return null}let t=_n(g);if(t){if(g instanceof pr.TFile){r?r.startsWith("#")||(r="#"+r):r="";let o=La(g);return{type:t,filename:g.name,src:g.path,subtitles:o?o.map(n=>n.path):[],hash:r,updateTrackInfo:Tn,getSrcFile:Sn}}let i=(p=decodeURI(g.pathname).split("/").pop())!=null?p:"";return{type:t,filename:decodeURI(i),src:g,hash:g.hash}}else if(g instanceof pr.TFile)return null;switch(g.hostname){case"b23.tv":try{if(!pr.Platform.isDesktopApp)return null;let n=yield $n(g.pathname.split("/")[1]);g=new URL(n)}catch(n){return console.error(n),null}case"www.bilibili.com":if(g.pathname.startsWith("/video")){let n=g.pathname.replace("/video/",""),f;if(/^bv/i.test(n))f=`?bvid=${n}`;else if(/^av/i.test(n))n=n.substring(2),f=`?aid=${n}`;else return console.log(`invaild video id: ${n}`),null;let h=g.searchParams.get("p");return h&&(f+=`&page=${h}`),{host:1,id:n,src:g,iframe:new URL(`https://player.bilibili.com/player.html${f}&high_quality=1&danmaku=0`),hash:g.hash}}else return console.log("bilibili video url not supported or invalid"),null;break;case"youtube.com":case"www.youtube.com":case"youtu.be":if(g.pathname==="/watch"){let n=g.searchParams.get("v");return n?{host:0,id:n,iframe:new URL(`https://www.youtube.com/embed/${n}`),src:g,hash:g.hash}:(console.log(`invalid video id: ${g.toString()}`),null)}else if(g.host==="youtu.be")if(/^\/[^\/]+$/.test(g.pathname)){let n=g.pathname.substring(1);return{host:0,id:n,iframe:new URL(`https://www.youtube.com/embed/${n}`),src:g,hash:g.hash}}else return console.log(`invalid video id: ${g.toString()}`),null;else return console.log("youtube video url not supported or invalid"),null;break;case"vimeo.com":let i=g.pathname,o;if(o=i.match(/^\/(\d+)$/)){let n=o[1];return{host:2,id:n,iframe:new URL(`https://player.vimeo.com/video/${n}`),src:g,hash:g.hash}}else return console.log("vimeo video url not supported or invalid"),null;default:return null}}),Rr=(...e)=>{let[g,r]=e;if(nr(g)){if(!r)throw new Error("vault not provided");let{src:t,hash:p}=g,i=r.getAbstractFileByPath(t);if(i&&i instanceof pr.TFile){let o=r.getResourcePath(i);return new URL(o+p)}else throw new Error("no file found for path: "+t)}else{let{src:t}=g;return t.protocol==="file:"?new URL(t.href.replace(/^file:\/\/\//,"app://local/")):t}},jr=(e,g,r,t)=>Bt(void 0,null,function*(){if(g==="internal"){let p=e instanceof HTMLAnchorElement?e.dataset.href:e.getAttr("src");if(!p)return console.error("no linktext in internal embed: %o, escaping",e),null;let{subpath:i,path:o}=(0,pr.parseLinktext)(p),n=r.metadataCache.getFirstLinkpathDest(o,t.sourcePath);return n?vr(n,i):null}else{let p=e instanceof HTMLAnchorElement?e.href:e.getAttr("src");return p?vr(p):(console.info("fail to get embed src: %o, escaping",e),null)}});function Tn(e){return Bt(this,null,function*(){if(this.subtitles.length>0){let g=yield Fa(this.subtitles,e);return this.trackInfo=g,g}else return null})}function Sn(e){let g=e.getAbstractFileByPath(this.src);if(g&&g instanceof pr.TFile)return g;throw new Error("src file not found for path: "+this.src)}var ka=Jt(Pr());var io='<svg aria-hidden="true" focusable="false"> <svg id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"></path></svg></svg ><span class="plyr__sr-only">Play</span>',Ba=(e,g,r)=>Bt(void 0,null,function*(){let t=yield so(e),p=createDiv({cls:["placeholder","plyr plyr--full-ui plyr--video"]});return t&&(p.style.backgroundImage=`url("${t}")`),Or(p,g,16/9),p.createEl("button",{cls:"plyr__control plyr__control--overlaid",attr:{type:"button","data-plyr":"play","aria-label":"Play"}},i=>{i.innerHTML=io,i.onClickEvent(()=>Bt(void 0,null,function*(){return p.replaceWith(yield r())}))}),p}),so=e=>Bt(void 0,null,function*(){let{id:g}=e;switch(e.host){case $t.youtube:return`https://i.ytimg.com/vi/${g}/maxresdefault.jpg`;case $t.bili:return null;case $t.vimeo:return yield oo(e.src);default:(0,ka.default)(e.host)}}),oo=e=>Bt(void 0,null,function*(){let g=new URL("https://vimeo.com/api/oembed.json");return typeof e=="string"?g.searchParams.append("url",e):g.searchParams.append("url",e.href),fetch(g.href).then(r=>{if(r.ok)return r.json();throw new Error(r.statusText)}).then(r=>{var t;return(t=r.thumbnail_url)!=null?t:null}).catch(r=>(console.error(r),null))});(function(){function e(g,r,t){function p(n,f){if(!r[n]){if(!g[n]){var h=typeof require=="function"&&require;if(!f&&h)return h(n,!0);if(i)return i(n,!0);var m=new Error("Cannot find module '"+n+"'");throw m.code="MODULE_NOT_FOUND",m}var u=r[n]={exports:{}};g[n][0].call(u.exports,function(_){var C=g[n][1][_];return p(C||_)},u,u.exports,e,g,r,t)}return r[n].exports}for(var i=typeof require=="function"&&require,o=0;o<t.length;o++)p(t[o]);return p}return e})()({1:[function(e,g,r){"use strict";var t={};t.encode=function(i){for(var o=[],n=0;n<i.length;++n){var f=i.charCodeAt(n);f<128?o.push(f):f<2048?(o.push(192|f>>6),o.push(128|63&f)):f<65536?(o.push(224|f>>12),o.push(128|63&f>>6),o.push(128|63&f)):(o.push(240|f>>18),o.push(128|63&f>>12),o.push(128|63&f>>6),o.push(128|63&f))}return o},t.decode=function(i){for(var o=[],n=0;n<i.length;){var f=i[n++];f<128||(f<224?(f=(31&f)<<6,f|=63&i[n++]):f<240?(f=(15&f)<<12,f|=(63&i[n++])<<6,f|=63&i[n++]):(f=(7&f)<<18,f|=(63&i[n++])<<12,f|=(63&i[n++])<<6,f|=63&i[n++])),o.push(String.fromCharCode(f))}return o.join("")};var p={};(function(i){var o=function(u){for(var _=0,C=[],k=0|u.length/3;0<k--;){var R=(u[_]<<16)+(u[_+1]<<8)+u[_+2];_+=3,C.push(i.charAt(63&R>>18)),C.push(i.charAt(63&R>>12)),C.push(i.charAt(63&R>>6)),C.push(i.charAt(63&R))}if(u.length-_==2){var R=(u[_]<<16)+(u[_+1]<<8);C.push(i.charAt(63&R>>18)),C.push(i.charAt(63&R>>12)),C.push(i.charAt(63&R>>6)),C.push("=")}else if(u.length-_==1){var R=u[_]<<16;C.push(i.charAt(63&R>>18)),C.push(i.charAt(63&R>>12)),C.push("==")}return C.join("")},n=function(){for(var m=[],u=0;u<i.length;++u)m[i.charCodeAt(u)]=u;return m["=".charCodeAt(0)]=0,m}(),f=function(u){for(var _=0,C=[],k=0|u.length/4;0<k--;){var R=(n[u.charCodeAt(_)]<<18)+(n[u.charCodeAt(_+1)]<<12)+(n[u.charCodeAt(_+2)]<<6)+n[u.charCodeAt(_+3)];C.push(255&R>>16),C.push(255&R>>8),C.push(255&R),_+=4}return C&&(u.charAt(_-2)=="="?(C.pop(),C.pop()):u.charAt(_-1)=="="&&C.pop()),C},h={};h.encode=function(m){for(var u=[],_=0;_<m.length;++_)u.push(m.charCodeAt(_));return u},h.decode=function(m){for(var u=0;u<s.length;++u)a[u]=String.fromCharCode(a[u]);return a.join("")},p.decodeArray=function(m){var u=f(m);return new Uint8Array(u)},p.encodeASCII=function(m){var u=h.encode(m);return o(u)},p.decodeASCII=function(m){var u=f(m);return h.decode(u)},p.encode=function(m){var u=t.encode(m);return o(u)},p.decode=function(m){var u=f(m);return t.decode(u)}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),typeof r!="undefined"&&(r.decode=p.decode,r.decodeArray=p.decodeArray,r.encode=p.encode,r.encodeASCII=p.encodeASCII)},{}],2:[function(e,g,r){"use strict";(function(t){"use strict";var p={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},i=function(v){var T=v;return p.hasOwnProperty(v)&&(T=p[v]),String.fromCharCode(T)},o=15,n=32,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},h={17:2,18:4,21:6,22:8,23:10,19:13,20:15},m={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},_=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],C={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(v){this.time=v},log:function(v,T){var W=this.verboseFilter[v];this.verboseLevel>=W&&console.log(this.time+" ["+v+"] "+T)}},k=function(v){for(var T=[],W=0;W<v.length;W++)T.push(v[W].toString(16));return T},R=function(v,T,W,O,B){this.foreground=v||"white",this.underline=T||!1,this.italics=W||!1,this.background=O||"black",this.flash=B||!1};R.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(v){for(var T=["foreground","underline","italics","background","flash"],W=0;W<T.length;W++){var O=T[W];v.hasOwnProperty(O)&&(this[O]=v[O])}},isDefault:function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},equals:function(v){return this.foreground===v.foreground&&this.underline===v.underline&&this.italics===v.italics&&this.background===v.background&&this.flash===v.flash},copy:function(v){this.foreground=v.foreground,this.underline=v.underline,this.italics=v.italics,this.background=v.background,this.flash=v.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var P=function(v,T,W,O,B,L){this.uchar=v||" ",this.penState=new R(T,W,O,B,L)};P.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(v,T){this.uchar=v,this.penState.copy(T)},setPenState:function(v){this.penState.copy(v)},equals:function(v){return this.uchar===v.uchar&&this.penState.equals(v.penState)},copy:function(v){this.uchar=v.uchar,this.penState.copy(v.penState)},isEmpty:function(){return this.uchar===" "&&this.penState.isDefault()}};var w=function(){this.chars=[];for(var v=0;v<n;v++)this.chars.push(new P);this.pos=0,this.currPenState=new R};w.prototype={equals:function(v){for(var T=!0,W=0;W<n;W++)if(!this.chars[W].equals(v.chars[W])){T=!1;break}return T},copy:function(v){for(var T=0;T<n;T++)this.chars[T].copy(v.chars[T])},isEmpty:function(){for(var v=!0,T=0;T<n;T++)if(!this.chars[T].isEmpty()){v=!1;break}return v},setCursor:function(v){this.pos!==v&&(this.pos=v),this.pos<0?(C.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>n&&(C.log("ERROR","Too large cursor position "+this.pos),this.pos=n)},moveCursor:function(v){var T=this.pos+v;if(v>1)for(var W=this.pos+1;W<T+1;W++)this.chars[W].setPenState(this.currPenState);this.setCursor(T)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(v){v>=144&&this.backSpace();var T=i(v);if(this.pos>=n){C.log("ERROR","Cannot insert "+v.toString(16)+" ("+T+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},clearFromPos:function(v){var T;for(T=v;T<n;T++)this.chars[T].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var v=[],T=!0,W=0;W<n;W++){var O=this.chars[W].uchar;O!==" "&&(T=!1),v.push(O)}return T?"":v.join("")},setPenStyles:function(v){this.currPenState.setStyles(v);var T=this.chars[this.pos];T.setPenState(this.currPenState)}};var H=function(){this.rows=[];for(var v=0;v<o;v++)this.rows.push(new w);this.currRow=o-1,this.nrRollUpRows=null,this.reset()};H.prototype={reset:function(){for(var v=0;v<o;v++)this.rows[v].clear();this.currRow=o-1},equals:function(v){for(var T=!0,W=0;W<o;W++)if(!this.rows[W].equals(v.rows[W])){T=!1;break}return T},copy:function(v){for(var T=0;T<o;T++)this.rows[T].copy(v.rows[T])},isEmpty:function(){for(var v=!0,T=0;T<o;T++)if(!this.rows[T].isEmpty()){v=!1;break}return v},backSpace:function(){var v=this.rows[this.currRow];v.backSpace()},clearToEndOfRow:function(){var v=this.rows[this.currRow];v.clearToEndOfRow()},insertChar:function(v){var T=this.rows[this.currRow];T.insertChar(v)},setPen:function(v){var T=this.rows[this.currRow];T.setPenStyles(v)},moveCursor:function(v){var T=this.rows[this.currRow];T.moveCursor(v)},setCursor:function(v){C.log("INFO","setCursor: "+v);var T=this.rows[this.currRow];T.setCursor(v)},setPAC:function(v){C.log("INFO","pacData = "+JSON.stringify(v));var T=v.row-1;this.nrRollUpRows&&T<this.nrRollUpRows-1&&(T=this.nrRollUpRows-1),this.currRow=T;var W=this.rows[this.currRow];if(v.indent!==null){var O=v.indent,B=Math.max(O-1,0);W.setCursor(v.indent),v.color=W.chars[B].penState.foreground}var L={foreground:v.color,underline:v.underline,italics:v.italics,background:"black",flash:!1};this.setPen(L)},setBkgData:function(v){C.log("INFO","bkgData = "+JSON.stringify(v)),this.backSpace(),this.setPen(v),this.insertChar(32)},setRollUpRows:function(v){this.nrRollUpRows=v},rollUp:function(){if(this.nrRollUpRows===null){C.log("DEBUG","roll_up but nrRollUpRows not set yet");return}C.log("TEXT",this.getDisplayText());var v=this.currRow+1-this.nrRollUpRows,T=this.rows.splice(v,1)[0];T.clear(),this.rows.splice(this.currRow,0,T),C.log("INFO","Rolling up")},getDisplayText:function(v){v=v||!1;for(var T=[],W="",O=-1,B=0;B<o;B++){var L=this.rows[B].getTextString();L&&(O=B+1,v?T.push("Row "+O+': "'+L+'"'):T.push(L.trim()))}return T.length>0&&(v?W="["+T.join(" | ")+"]":W=T.join(`
|
|
`)),W},getTextAndFormat:function(){return this.rows}};var N=function(v,T){this.chNr=v,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new H,this.nonDisplayedMemory=new H,this.lastOutputScreen=new H,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};N.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(v){this.outputFilter=v},setPAC:function(v){this.writeScreen.setPAC(v)},setBkgData:function(v){this.writeScreen.setBkgData(v)},setMode:function(v){v!==this.mode&&(this.mode=v,C.log("INFO","MODE="+v),this.mode=="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},insertChars:function(v){for(var T=0;T<v.length;T++)this.writeScreen.insertChar(v[T]);var W=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";C.log("INFO",W+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(C.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){C.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){C.log("INFO","BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){C.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(v){C.log("INFO","RU("+v+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(v)},cc_FON:function(){C.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){C.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){C.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){C.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){C.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){C.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){C.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(C.log("INFO","EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var v=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=v,this.writeScreen=this.nonDisplayedMemory,C.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(v){C.log("INFO","TO("+v+") - Tab Offset"),this.writeScreen.moveCursor(v)},cc_MIDROW:function(v){var T={flash:!1};if(T.underline=v%2==1,T.italics=v>=46,T.italics)T.foreground="white";else{var W=Math.floor(v/2)-16,O=["white","green","blue","cyan","red","yellow","magenta"];T.foreground=O[W]}C.log("INFO","MIDROW: "+JSON.stringify(T)),this.writeScreen.setPen(T)},outputDataUpdate:function(){var v=C.time;v!==null&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(v,this.displayedMemory),this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=v:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:v),this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))}};var A=function(v,T,W){this.field=v||1,this.outputs=[T,W],this.channels=[new N(1,T),new N(2,W)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};A.prototype={getHandler:function(v){return this.channels[v].getHandler()},setHandler:function(v,T){this.channels[v].setHandler(T)},addData:function(v,T){var W,O,B,L=!1;this.lastTime=v,C.setTime(v);for(var K=0;K<T.length;K+=2){if(O=T[K]&127,B=T[K+1]&127,O>=16&&O<=31&&O===this.lastCmdA&&B===this.lastCmdB){this.lastCmdA=null,this.lastCmdB=null,C.log("DEBUG","Repeated command ("+k([O,B])+") is dropped");continue}if(O===0&&B===0){this.dataCounters.padding+=2;continue}else C.log("DATA","["+k([T[K],T[K+1]])+"] -> ("+k([O,B])+")");if(W=this.parseCmd(O,B),W||(W=this.parseMidrow(O,B)),W||(W=this.parsePAC(O,B)),W||(W=this.parseBackgroundAttributes(O,B)),!W&&(L=this.parseChars(O,B),L))if(this.currChNr&&this.currChNr>=0){var x=this.channels[this.currChNr-1];x.insertChars(L)}else C.log("WARNING","No channel found yet. TEXT-MODE?");W?this.dataCounters.cmd+=2:L?this.dataCounters.char+=2:(this.dataCounters.other+=2,C.log("WARNING","Couldn't parse cleaned data "+k([O,B])+" orig: "+k([T[K],T[K+1]])))}},parseCmd:function(v,T){var W=null,O=(v===20||v===21||v===28||v===29)&&32<=T&&T<=47,B=(v===23||v===31)&&33<=T&&T<=35;if(!(O||B))return!1;v===20||v===21||v===23?W=1:W=2;var L=this.channels[W-1];return v===20||v===21||v===28||v===29?T===32?L.cc_RCL():T===33?L.cc_BS():T===34?L.cc_AOF():T===35?L.cc_AON():T===36?L.cc_DER():T===37?L.cc_RU(2):T===38?L.cc_RU(3):T===39?L.cc_RU(4):T===40?L.cc_FON():T===41?L.cc_RDC():T===42?L.cc_TR():T===43?L.cc_RTD():T===44?L.cc_EDM():T===45?L.cc_CR():T===46?L.cc_ENM():T===47&&L.cc_EOC():L.cc_TO(T-32),this.lastCmdA=v,this.lastCmdB=T,this.currChNr=W,!0},parseMidrow:function(v,T){var W=null;if((v===17||v===25)&&32<=T&&T<=47){if(v===17?W=1:W=2,W!==this.currChNr)return C.log("ERROR","Mismatch channel in midrow parsing"),!1;var O=this.channels[W-1];return O.insertChars([32]),O.cc_MIDROW(T),C.log("DEBUG","MIDROW ("+k([v,T])+")"),this.lastCmdA=v,this.lastCmdB=T,!0}return!1},parsePAC:function(v,T){var W=null,O=null,B=(17<=v&&v<=23||25<=v&&v<=31)&&64<=T&&T<=127,L=(v===16||v===24)&&64<=T&&T<=95;if(!(B||L))return!1;W=v<=23?1:2,64<=T&&T<=95?O=W===1?f[v]:m[v]:O=W===1?h[v]:u[v];var K=this.interpretPAC(O,T),x=this.channels[W-1];return x.setPAC(K),this.lastCmdA=v,this.lastCmdB=T,this.currChNr=W,!0},interpretPAC:function(v,T){var W=T,O={color:null,italics:!1,indent:null,underline:!1,row:v};return T>95?W=T-96:W=T-64,O.underline=(W&1)==1,W<=13?O.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(W/2)]:W<=15?(O.italics=!0,O.color="white"):O.indent=Math.floor((W-16)/2)*4,O},parseChars:function(v,T){var W=null,O=null,B=null,L=null;if(v>=25?(W=2,B=v-8):(W=1,B=v),17<=B&&B<=19){var K=T;B===17?K=T+80:B===18?K=T+112:K=T+144,C.log("INFO","Special char '"+i(K)+"' in channel "+W),O=[K],this.lastCmdA=v,this.lastCmdB=T}else 32<=v&&v<=127&&(O=T===0?[v]:[v,T],this.lastCmdA=null,this.lastCmdB=null);if(O){var x=k(O);C.log("DEBUG","Char codes = "+x.join(","))}return O},parseBackgroundAttributes:function(v,T){var W,O,B,L,K=(v===16||v===24)&&32<=T&&T<=47,x=(v===23||v===31)&&45<=T&&T<=47;return K||x?(W={},v===16||v===24?(O=Math.floor((T-32)/2),W.background=_[O],T%2==1&&(W.background=W.background+"_semi")):T===45?W.background="transparent":(W.foreground="black",T===47&&(W.underline=!0)),B=v<24?1:2,L=this.channels[B-1],L.setBkgData(W),this.lastCmdA=v,this.lastCmdB=T,!0):!1},reset:function(){for(var v=0;v<this.channels.length;v++)this.channels[v]&&this.channels[v].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(v){for(var T=0;T<this.channels.length;T++)this.channels[T]&&this.channels[T].cueSplitAtTime(v)}};var M=function(v,T,W){for(var O=0,B=T,L=0,K=[],x=function(ve,ce,se,J){if(ve!==4||ce<8)return null;var ee=se.getUint8(J),ie=se.getUint16(J+1),me=se.getUint32(J+3),de=se.getUint8(J+7);return ee==181&&ie==49&&me==1195456820&&de==3};B<T+W;){if(O=v.getUint32(B),L=v.getUint8(B+4)&31,L===6)for(var U=B+5,Y=-1;U<B+4+O-1;){Y=0;for(var oe=255;oe===255;)oe=v.getUint8(U),Y+=oe,U++;var ue=0;for(oe=255;oe===255;)oe=v.getUint8(U),ue+=oe,U++;x(Y,ue,v,U)&&K.push([U,ue]),U+=ue}B+=O+4}return K},I=function(v,T){var W=T[0],O=[[],[]];W+=8;var B=v.getUint8(W)&31;W+=2;for(var L=0;L<B;L++){var K=v.getUint8(W),x=K&4,U=K&3;W++;var Y=v.getUint8(W);W++;var oe=v.getUint8(W);W++,x&&(Y&127)+(oe&127)!=0&&(U===0?(O[0].push(Y),O[0].push(oe)):U===1&&(O[1].push(Y),O[1].push(oe)))}return O};t.logger=C,t.PenState=R,t.CaptionScreen=H,t.Cea608Parser=A,t.findCea608Nalus=M,t.extractCea608DataFromRange=I})(typeof r=="undefined"?(void 0).cea608parser={}:r)},{}],3:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(p){"use strict";var i="1.2.0";p=p||{},o(),f();function o(){p.escapeMode===void 0&&(p.escapeMode=!0),p.attributePrefix===void 0&&(p.attributePrefix="_"),p.arrayAccessForm=p.arrayAccessForm||"none",p.emptyNodeForm=p.emptyNodeForm||"text",p.enableToStringFunc===void 0&&(p.enableToStringFunc=!0),p.arrayAccessFormPaths=p.arrayAccessFormPaths||[],p.skipEmptyTextNodesForObj===void 0&&(p.skipEmptyTextNodesForObj=!0),p.stripWhitespaces===void 0&&(p.stripWhitespaces=!0),p.datetimeAccessFormPaths=p.datetimeAccessFormPaths||[],p.useDoubleQuotes===void 0&&(p.useDoubleQuotes=!1),p.xmlElementsFilter=p.xmlElementsFilter||[],p.jsonPropertiesFilter=p.jsonPropertiesFilter||[],p.keepCData===void 0&&(p.keepCData=!1),p.ignoreRoot===void 0&&(p.ignoreRoot=!1)}var n={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function f(){}function h(x){var U=x.localName;return U==null&&(U=x.baseName),(U==null||U=="")&&(U=x.nodeName),U}function m(x){return x.prefix}function u(x){return typeof x=="string"?x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):x}function _(x){return x.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function C(x,U,Y,oe){for(var ue=0;ue<x.length;ue++){var re=x[ue];if(typeof re=="string"){if(re==oe)break}else if(re instanceof RegExp){if(re.test(oe))break}else if(typeof re=="function"&&re(U,Y,oe))break}return ue!=x.length}function k(x,U,Y){switch(p.arrayAccessForm){case"property":x[U]instanceof Array?x[U+"_asArray"]=x[U]:x[U+"_asArray"]=[x[U]];break}!(x[U]instanceof Array)&&p.arrayAccessFormPaths.length>0&&C(p.arrayAccessFormPaths,x,U,Y)&&(x[U]=[x[U]])}function R(x){var U=x.split(/[-T:+Z]/g),Y=new Date(U[0],U[1]-1,U[2]),oe=U[5].split(".");if(Y.setHours(U[3],U[4],oe[0]),oe.length>1&&Y.setMilliseconds(oe[1]),U[6]&&U[7]){var ue=U[6]*60+Number(U[7]),re=/\d\d-\d\d:\d\d$/.test(x)?"-":"+";ue=0+(re=="-"?-1*ue:ue),Y.setMinutes(Y.getMinutes()-ue-Y.getTimezoneOffset())}else x.indexOf("Z",x.length-1)!==-1&&(Y=new Date(Date.UTC(Y.getFullYear(),Y.getMonth(),Y.getDate(),Y.getHours(),Y.getMinutes(),Y.getSeconds(),Y.getMilliseconds())));return Y}function P(x,U,Y){if(p.datetimeAccessFormPaths.length>0){var oe=Y.split(".#")[0];return C(p.datetimeAccessFormPaths,x,U,oe)?R(x):x}else return x}function w(x,U,Y,oe){return U==n.ELEMENT_NODE&&p.xmlElementsFilter.length>0?C(p.xmlElementsFilter,x,Y,oe):!0}function H(x,U){if(x.nodeType==n.DOCUMENT_NODE){for(var Y=new Object,oe=x.childNodes,ue=0;ue<oe.length;ue++){var re=oe[ue];if(re.nodeType==n.ELEMENT_NODE)if(p.ignoreRoot)Y=H(re);else{Y={};var ve=h(re);Y[ve]=H(re)}}return Y}else if(x.nodeType==n.ELEMENT_NODE){var Y=new Object;Y.__cnt=0;for(var ce=[],oe=x.childNodes,ue=0;ue<oe.length;ue++){var re=oe[ue],ve=h(re);if(re.nodeType!=n.COMMENT_NODE){var se=U+"."+ve;if(w(Y,re.nodeType,ve,se))if(Y.__cnt++,Y[ve]==null){var J=H(re,se);if(ve!="#text"||/[^\s]/.test(J)){var ee={};ee[ve]=J,ce.push(ee)}Y[ve]=J,k(Y,ve,se)}else{Y[ve]!=null&&(Y[ve]instanceof Array||(Y[ve]=[Y[ve]],k(Y,ve,se)));var J=H(re,se);if(ve!="#text"||/[^\s]/.test(J)){var ee={};ee[ve]=J,ce.push(ee)}Y[ve][Y[ve].length]=J}}}Y.__children=ce;for(var ie=h(x),me=0;me<x.attributes.length;me++){var de=x.attributes[me];Y.__cnt++;for(var Q=de.value,X=0,j=p.matchers.length;X<j;X++){var le=p.matchers[X];le.test(de,ie)&&(Q=le.converter(de.value))}Y[p.attributePrefix+de.name]=Q}var G=m(x);return G!=null&&G!=""&&(Y.__cnt++,Y.__prefix=G),Y["#text"]!=null&&(Y.__text=Y["#text"],Y.__text instanceof Array&&(Y.__text=Y.__text.join(`
|
|
`)),p.stripWhitespaces&&(Y.__text=Y.__text.trim()),delete Y["#text"],p.arrayAccessForm=="property"&&delete Y["#text_asArray"],Y.__text=P(Y.__text,ve,U+"."+ve)),Y["#cdata-section"]!=null&&(Y.__cdata=Y["#cdata-section"],delete Y["#cdata-section"],p.arrayAccessForm=="property"&&delete Y["#cdata-section_asArray"]),Y.__cnt==0&&p.emptyNodeForm=="text"?Y="":Y.__cnt==1&&Y.__text!=null?Y=Y.__text:Y.__cnt==1&&Y.__cdata!=null&&!p.keepCData?Y=Y.__cdata:Y.__cnt>1&&Y.__text!=null&&p.skipEmptyTextNodesForObj&&(p.stripWhitespaces&&Y.__text==""||Y.__text.trim()=="")&&delete Y.__text,delete Y.__cnt,p.enableToStringFunc&&(Y.__text!=null||Y.__cdata!=null)&&(Y.toString=function(){return(this.__text!=null?this.__text:"")+(this.__cdata!=null?this.__cdata:"")}),Y}else if(x.nodeType==n.TEXT_NODE||x.nodeType==n.CDATA_SECTION_NODE)return x.nodeValue}function N(x,U,Y,oe){var ue="<"+(x!=null&&x.__prefix!=null?x.__prefix+":":"")+U;if(Y!=null)for(var re=0;re<Y.length;re++){var ve=Y[re],ce=x[ve];p.escapeMode&&(ce=u(ce)),ue+=" "+ve.substr(p.attributePrefix.length)+"=",p.useDoubleQuotes?ue+='"'+ce+'"':ue+="'"+ce+"'"}return oe?ue+="/>":ue+=">",ue}function A(x,U){return"</"+(x.__prefix!=null?x.__prefix+":":"")+U+">"}function M(x,U){return x.indexOf(U,x.length-U.length)!==-1}function I(x,U){return!!(p.arrayAccessForm=="property"&&M(U.toString(),"_asArray")||U.toString().indexOf(p.attributePrefix)==0||U.toString().indexOf("__")==0||x[U]instanceof Function)}function D(x){var U=0;if(x instanceof Object)for(var Y in x)I(x,Y)||U++;return U}function v(x,U,Y){return p.jsonPropertiesFilter.length==0||Y==""||C(p.jsonPropertiesFilter,x,U,Y)}function T(x){var U=[];if(x instanceof Object)for(var Y in x)Y.toString().indexOf("__")==-1&&Y.toString().indexOf(p.attributePrefix)==0&&U.push(Y);return U}function W(x){var U="";return x.__cdata!=null&&(U+="<![CDATA["+x.__cdata+"]]>"),x.__text!=null&&(p.escapeMode?U+=u(x.__text):U+=x.__text),U}function O(x){var U="";return x instanceof Object?U+=W(x):x!=null&&(p.escapeMode?U+=u(x):U+=x),U}function B(x,U){return x===""?U:x+"."+U}function L(x,U,Y,oe){var ue="";if(x.length==0)ue+=N(x,U,Y,!0);else for(var re=0;re<x.length;re++)ue+=N(x[re],U,T(x[re]),!1),ue+=K(x[re],B(oe,U)),ue+=A(x[re],U);return ue}function K(x,U){var Y="",oe=D(x);if(oe>0){for(var ue in x)if(!(I(x,ue)||U!=""&&!v(x,ue,B(U,ue)))){var re=x[ue],ve=T(re);if(re==null||re==null)Y+=N(re,ue,ve,!0);else if(re instanceof Object)if(re instanceof Array)Y+=L(re,ue,ve,U);else if(re instanceof Date)Y+=N(re,ue,ve,!1),Y+=re.toISOString(),Y+=A(re,ue);else{var ce=D(re);ce>0||re.__text!=null||re.__cdata!=null?(Y+=N(re,ue,ve,!1),Y+=K(re,B(U,ue)),Y+=A(re,ue)):Y+=N(re,ue,ve,!0)}else Y+=N(re,ue,ve,!1),Y+=O(re),Y+=A(re,ue)}}return Y+=O(x),Y}this.parseXmlString=function(x){var U=window.ActiveXObject||"ActiveXObject"in window;if(x===void 0)return null;var Y;if(window.DOMParser){var oe=new window.DOMParser,ue=null;try{Y=oe.parseFromString(x,"text/xml"),Y.getElementsByTagNameNS("*","parsererror").length>0&&(Y=null)}catch(re){Y=null}}else x.indexOf("<?")==0&&(x=x.substr(x.indexOf("?>")+2)),Y=new ActiveXObject("Microsoft.XMLDOM"),Y.async="false",Y.loadXML(x);return Y},this.asArray=function(x){return x===void 0||x==null?[]:x instanceof Array?x:[x]},this.toXmlDateTime=function(x){return x instanceof Date?x.toISOString():typeof x=="number"?new Date(x).toISOString():null},this.asDateTime=function(x){return typeof x=="string"?R(x):x},this.xml2json=function(x){return H(x)},this.xml_str2json=function(x){var U=this.parseXmlString(x);return U!=null?this.xml2json(U):null},this.json2xml_str=function(x){return K(x,"")},this.json2xml=function(x){var U=this.json2xml_str(x);return this.parseXmlString(U)},this.getVersion=function(){return i}}r.default=t,g.exports=r.default},{}],4:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(k){return k&&k.__esModule?k:{default:k}}var p=e(5),i=e(220),o=e(129),n=t(o),f=e(166),h=t(f),m=e(105),u=t(m),_=e(45),C=t(_);dashjs.Protection=h.default,dashjs.MetricsReporting=n.default,dashjs.MediaPlayerFactory=u.default,dashjs.Debug=C.default,dashjs.supportsMediaSource=i.supportsMediaSource,r.default=dashjs,r.MediaPlayer=p.MediaPlayer,r.Protection=h.default,r.MetricsReporting=n.default,r.MediaPlayerFactory=u.default,r.Debug=C.default,r.supportsMediaSource=i.supportsMediaSource},{"105":105,"129":129,"166":166,"220":220,"45":45,"5":5}],5:[function(e,g,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function p(k){return k&&k.__esModule?k:{default:k}}var i=e(103),o=p(i),n=e(47),f=p(n),h=e(45),m=p(h),u=e(50),_=typeof window!="undefined"&&window||t,C=_.dashjs;C||(C=_.dashjs={}),C.MediaPlayer=o.default,C.FactoryMaker=f.default,C.Debug=m.default,C.Version=(0,u.getVersionString)(),r.default=C,r.MediaPlayer=o.default,r.FactoryMaker=f.default,r.Debug=m.default}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"103":103,"45":45,"47":47,"50":50}],6:[function(e,g,r){"use strict";r.byteLength=m,r.toByteArray=_,r.fromByteArray=R;for(var t=[],p=[],i=typeof Uint8Array!="undefined"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,f=o.length;n<f;++n)t[n]=o[n],p[o.charCodeAt(n)]=n;p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63;function h(P){var w=P.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var H=P.indexOf("=");H===-1&&(H=w);var N=H===w?0:4-H%4;return[H,N]}function m(P){var w=h(P),H=w[0],N=w[1];return(H+N)*3/4-N}function u(P,w,H){return(w+H)*3/4-H}function _(P){for(var w,H=h(P),N=H[0],A=H[1],M=new i(u(P,N,A)),I=0,D=A>0?N-4:N,v=0;v<D;v+=4)w=p[P.charCodeAt(v)]<<18|p[P.charCodeAt(v+1)]<<12|p[P.charCodeAt(v+2)]<<6|p[P.charCodeAt(v+3)],M[I++]=w>>16&255,M[I++]=w>>8&255,M[I++]=w&255;return A===2&&(w=p[P.charCodeAt(v)]<<2|p[P.charCodeAt(v+1)]>>4,M[I++]=w&255),A===1&&(w=p[P.charCodeAt(v)]<<10|p[P.charCodeAt(v+1)]<<4|p[P.charCodeAt(v+2)]>>2,M[I++]=w>>8&255,M[I++]=w&255),M}function C(P){return t[P>>18&63]+t[P>>12&63]+t[P>>6&63]+t[P&63]}function k(P,w,H){for(var N,A=[],M=w;M<H;M+=3)N=(P[M]<<16&16711680)+(P[M+1]<<8&65280)+(P[M+2]&255),A.push(C(N));return A.join("")}function R(P){for(var w,H=P.length,N=H%3,A=[],M=16383,I=0,D=H-N;I<D;I+=M)A.push(k(P,I,I+M>D?D:I+M));return N===1?(w=P[H-1],A.push(t[w>>2]+t[w<<4&63]+"==")):N===2&&(w=(P[H-2]<<8)+P[H-1],A.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+"=")),A.join("")}},{}],7:[function(e,g,r){},{}],8:[function(e,g,r){"use strict";var t=e(6),p=e(13);r.Buffer=f,r.SlowBuffer=H,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,f.TYPED_ARRAY_SUPPORT=o(),!f.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var l=new Uint8Array(1);return l.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},l.foo()===42}catch(d){return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.byteOffset}});function n(l){if(l>i)throw new RangeError('The value "'+l+'" is invalid for option "size"');var d=new Uint8Array(l);return d.__proto__=f.prototype,d}function f(l,d,y){if(typeof l=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(l)}return h(l,d,y)}typeof Symbol!="undefined"&&Symbol.species!=null&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192;function h(l,d,y){if(typeof l=="string")return C(l,d);if(ArrayBuffer.isView(l))return k(l);if(l==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(E(l,ArrayBuffer)||l&&E(l.buffer,ArrayBuffer))return R(l,d,y);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var V=l.valueOf&&l.valueOf();if(V!=null&&V!==l)return f.from(V,d,y);var te=P(l);if(te)return te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return f.from(l[Symbol.toPrimitive]("string"),d,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}f.from=function(l,d,y){return h(l,d,y)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array;function m(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function u(l,d,y){return m(l),l<=0?n(l):d!==void 0?typeof y=="string"?n(l).fill(d,y):n(l).fill(d):n(l)}f.alloc=function(l,d,y){return u(l,d,y)};function _(l){return m(l),n(l<0?0:w(l)|0)}f.allocUnsafe=function(l){return _(l)},f.allocUnsafeSlow=function(l){return _(l)};function C(l,d){if((typeof d!="string"||d==="")&&(d="utf8"),!f.isEncoding(d))throw new TypeError("Unknown encoding: "+d);var y=N(l,d)|0,V=n(y),te=V.write(l,d);return te!==y&&(V=V.slice(0,te)),V}function k(l){for(var d=l.length<0?0:w(l.length)|0,y=n(d),V=0;V<d;V+=1)y[V]=l[V]&255;return y}function R(l,d,y){if(d<0||l.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<d+(y||0))throw new RangeError('"length" is outside of buffer bounds');var V;return d===void 0&&y===void 0?V=new Uint8Array(l):y===void 0?V=new Uint8Array(l,d):V=new Uint8Array(l,d,y),V.__proto__=f.prototype,V}function P(l){if(f.isBuffer(l)){var d=w(l.length)|0,y=n(d);return y.length===0||l.copy(y,0,0,d),y}if(l.length!==void 0)return typeof l.length!="number"||b(l.length)?n(0):k(l);if(l.type==="Buffer"&&Array.isArray(l.data))return k(l.data)}function w(l){if(l>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return l|0}function H(l){return+l!=l&&(l=0),f.alloc(+l)}f.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==f.prototype},f.compare=function(d,y){if(E(d,Uint8Array)&&(d=f.from(d,d.offset,d.byteLength)),E(y,Uint8Array)&&(y=f.from(y,y.offset,y.byteLength)),!f.isBuffer(d)||!f.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===y)return 0;for(var V=d.length,te=y.length,$=0,ae=Math.min(V,te);$<ae;++$)if(d[$]!==y[$]){V=d[$],te=y[$];break}return V<te?-1:te<V?1:0},f.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(d,y){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return f.alloc(0);var V;if(y===void 0)for(y=0,V=0;V<d.length;++V)y+=d[V].length;var te=f.allocUnsafe(y),$=0;for(V=0;V<d.length;++V){var ae=d[V];if(E(ae,Uint8Array)&&(ae=f.from(ae)),!f.isBuffer(ae))throw new TypeError('"list" argument must be an Array of Buffers');ae.copy(te,$),$+=ae.length}return te};function N(l,d){if(f.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||E(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);var y=l.length,V=arguments.length>2&&arguments[2]===!0;if(!V&&y===0)return 0;for(var te=!1;;)switch(d){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return X(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return G(l).length;default:if(te)return V?-1:X(l).length;d=(""+d).toLowerCase(),te=!0}}f.byteLength=N;function A(l,d,y){var V=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,d>>>=0,y<=d))return"";for(l||(l="utf8");;)switch(l){case"hex":return re(this,d,y);case"utf8":case"utf-8":return x(this,d,y);case"ascii":return oe(this,d,y);case"latin1":case"binary":return ue(this,d,y);case"base64":return K(this,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,d,y);default:if(V)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),V=!0}}f.prototype._isBuffer=!0;function M(l,d,y){var V=l[d];l[d]=l[y],l[y]=V}f.prototype.swap16=function(){var d=this.length;if(d%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var y=0;y<d;y+=2)M(this,y,y+1);return this},f.prototype.swap32=function(){var d=this.length;if(d%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var y=0;y<d;y+=4)M(this,y,y+3),M(this,y+1,y+2);return this},f.prototype.swap64=function(){var d=this.length;if(d%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var y=0;y<d;y+=8)M(this,y,y+7),M(this,y+1,y+6),M(this,y+2,y+5),M(this,y+3,y+4);return this},f.prototype.toString=function(){var d=this.length;return d===0?"":arguments.length===0?x(this,0,d):A.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(d){if(!f.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:f.compare(this,d)===0},f.prototype.inspect=function(){var d="",y=r.INSPECT_MAX_BYTES;return d=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(d+=" ... "),"<Buffer "+d+">"},f.prototype.compare=function(d,y,V,te,$){if(E(d,Uint8Array)&&(d=f.from(d,d.offset,d.byteLength)),!f.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(y===void 0&&(y=0),V===void 0&&(V=d?d.length:0),te===void 0&&(te=0),$===void 0&&($=this.length),y<0||V>d.length||te<0||$>this.length)throw new RangeError("out of range index");if(te>=$&&y>=V)return 0;if(te>=$)return-1;if(y>=V)return 1;if(y>>>=0,V>>>=0,te>>>=0,$>>>=0,this===d)return 0;for(var ae=$-te,ne=V-y,Se=Math.min(ae,ne),Ie=this.slice(te,$),he=d.slice(y,V),ye=0;ye<Se;++ye)if(Ie[ye]!==he[ye]){ae=Ie[ye],ne=he[ye];break}return ae<ne?-1:ne<ae?1:0};function I(l,d,y,V,te){if(l.length===0)return-1;if(typeof y=="string"?(V=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,b(y)&&(y=te?0:l.length-1),y<0&&(y=l.length+y),y>=l.length){if(te)return-1;y=l.length-1}else if(y<0)if(te)y=0;else return-1;if(typeof d=="string"&&(d=f.from(d,V)),f.isBuffer(d))return d.length===0?-1:D(l,d,y,V,te);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?te?Uint8Array.prototype.indexOf.call(l,d,y):Uint8Array.prototype.lastIndexOf.call(l,d,y):D(l,[d],y,V,te);throw new TypeError("val must be string, number or Buffer")}function D(l,d,y,V,te){var $=1,ae=l.length,ne=d.length;if(V!==void 0&&(V=String(V).toLowerCase(),V==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(l.length<2||d.length<2)return-1;$=2,ae/=2,ne/=2,y/=2}function Se(pe,De){return $===1?pe[De]:pe.readUInt16BE(De*$)}var Ie;if(te){var he=-1;for(Ie=y;Ie<ae;Ie++)if(Se(l,Ie)===Se(d,he===-1?0:Ie-he)){if(he===-1&&(he=Ie),Ie-he+1===ne)return he*$}else he!==-1&&(Ie-=Ie-he),he=-1}else for(y+ne>ae&&(y=ae-ne),Ie=y;Ie>=0;Ie--){for(var ye=!0,_e=0;_e<ne;_e++)if(Se(l,Ie+_e)!==Se(d,_e)){ye=!1;break}if(ye)return Ie}return-1}f.prototype.includes=function(d,y,V){return this.indexOf(d,y,V)!==-1},f.prototype.indexOf=function(d,y,V){return I(this,d,y,V,!0)},f.prototype.lastIndexOf=function(d,y,V){return I(this,d,y,V,!1)};function v(l,d,y,V){y=Number(y)||0;var te=l.length-y;V?(V=Number(V),V>te&&(V=te)):V=te;var $=d.length;V>$/2&&(V=$/2);for(var ae=0;ae<V;++ae){var ne=parseInt(d.substr(ae*2,2),16);if(b(ne))return ae;l[y+ae]=ne}return ae}function T(l,d,y,V){return c(X(d,l.length-y),l,y,V)}function W(l,d,y,V){return c(j(d),l,y,V)}function O(l,d,y,V){return W(l,d,y,V)}function B(l,d,y,V){return c(G(d),l,y,V)}function L(l,d,y,V){return c(le(d,l.length-y),l,y,V)}f.prototype.write=function(d,y,V,te){if(y===void 0)te="utf8",V=this.length,y=0;else if(V===void 0&&typeof y=="string")te=y,V=this.length,y=0;else if(isFinite(y))y=y>>>0,isFinite(V)?(V=V>>>0,te===void 0&&(te="utf8")):(te=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var $=this.length-y;if((V===void 0||V>$)&&(V=$),d.length>0&&(V<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var ae=!1;;)switch(te){case"hex":return v(this,d,y,V);case"utf8":case"utf-8":return T(this,d,y,V);case"ascii":return W(this,d,y,V);case"latin1":case"binary":return O(this,d,y,V);case"base64":return B(this,d,y,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,d,y,V);default:if(ae)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ae=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function K(l,d,y){return d===0&&y===l.length?t.fromByteArray(l):t.fromByteArray(l.slice(d,y))}function x(l,d,y){y=Math.min(l.length,y);for(var V=[],te=d;te<y;){var $=l[te],ae=null,ne=$>239?4:$>223?3:$>191?2:1;if(te+ne<=y){var Se,Ie,he,ye;switch(ne){case 1:$<128&&(ae=$);break;case 2:Se=l[te+1],(Se&192)==128&&(ye=($&31)<<6|Se&63,ye>127&&(ae=ye));break;case 3:Se=l[te+1],Ie=l[te+2],(Se&192)==128&&(Ie&192)==128&&(ye=($&15)<<12|(Se&63)<<6|Ie&63,ye>2047&&(ye<55296||ye>57343)&&(ae=ye));break;case 4:Se=l[te+1],Ie=l[te+2],he=l[te+3],(Se&192)==128&&(Ie&192)==128&&(he&192)==128&&(ye=($&15)<<18|(Se&63)<<12|(Ie&63)<<6|he&63,ye>65535&&ye<1114112&&(ae=ye))}}ae===null?(ae=65533,ne=1):ae>65535&&(ae-=65536,V.push(ae>>>10&1023|55296),ae=56320|ae&1023),V.push(ae),te+=ne}return Y(V)}var U=4096;function Y(l){var d=l.length;if(d<=U)return String.fromCharCode.apply(String,l);for(var y="",V=0;V<d;)y+=String.fromCharCode.apply(String,l.slice(V,V+=U));return y}function oe(l,d,y){var V="";y=Math.min(l.length,y);for(var te=d;te<y;++te)V+=String.fromCharCode(l[te]&127);return V}function ue(l,d,y){var V="";y=Math.min(l.length,y);for(var te=d;te<y;++te)V+=String.fromCharCode(l[te]);return V}function re(l,d,y){var V=l.length;(!d||d<0)&&(d=0),(!y||y<0||y>V)&&(y=V);for(var te="",$=d;$<y;++$)te+=Q(l[$]);return te}function ve(l,d,y){for(var V=l.slice(d,y),te="",$=0;$<V.length;$+=2)te+=String.fromCharCode(V[$]+V[$+1]*256);return te}f.prototype.slice=function(d,y){var V=this.length;d=~~d,y=y===void 0?V:~~y,d<0?(d+=V,d<0&&(d=0)):d>V&&(d=V),y<0?(y+=V,y<0&&(y=0)):y>V&&(y=V),y<d&&(y=d);var te=this.subarray(d,y);return te.__proto__=f.prototype,te};function ce(l,d,y){if(l%1!=0||l<0)throw new RangeError("offset is not uint");if(l+d>y)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d],$=1,ae=0;++ae<y&&($*=256);)te+=this[d+ae]*$;return te},f.prototype.readUIntBE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d+--y],$=1;y>0&&($*=256);)te+=this[d+--y]*$;return te},f.prototype.readUInt8=function(d,y){return d=d>>>0,y||ce(d,1,this.length),this[d]},f.prototype.readUInt16LE=function(d,y){return d=d>>>0,y||ce(d,2,this.length),this[d]|this[d+1]<<8},f.prototype.readUInt16BE=function(d,y){return d=d>>>0,y||ce(d,2,this.length),this[d]<<8|this[d+1]},f.prototype.readUInt32LE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},f.prototype.readUInt32BE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},f.prototype.readIntLE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=this[d],$=1,ae=0;++ae<y&&($*=256);)te+=this[d+ae]*$;return $*=128,te>=$&&(te-=Math.pow(2,8*y)),te},f.prototype.readIntBE=function(d,y,V){d=d>>>0,y=y>>>0,V||ce(d,y,this.length);for(var te=y,$=1,ae=this[d+--te];te>0&&($*=256);)ae+=this[d+--te]*$;return $*=128,ae>=$&&(ae-=Math.pow(2,8*y)),ae},f.prototype.readInt8=function(d,y){return d=d>>>0,y||ce(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},f.prototype.readInt16LE=function(d,y){d=d>>>0,y||ce(d,2,this.length);var V=this[d]|this[d+1]<<8;return V&32768?V|4294901760:V},f.prototype.readInt16BE=function(d,y){d=d>>>0,y||ce(d,2,this.length);var V=this[d+1]|this[d]<<8;return V&32768?V|4294901760:V},f.prototype.readInt32LE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},f.prototype.readInt32BE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},f.prototype.readFloatLE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),p.read(this,d,!0,23,4)},f.prototype.readFloatBE=function(d,y){return d=d>>>0,y||ce(d,4,this.length),p.read(this,d,!1,23,4)},f.prototype.readDoubleLE=function(d,y){return d=d>>>0,y||ce(d,8,this.length),p.read(this,d,!0,52,8)},f.prototype.readDoubleBE=function(d,y){return d=d>>>0,y||ce(d,8,this.length),p.read(this,d,!1,52,8)};function se(l,d,y,V,te,$){if(!f.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>te||d<$)throw new RangeError('"value" argument is out of bounds');if(y+V>l.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(d,y,V,te){if(d=+d,y=y>>>0,V=V>>>0,!te){var $=Math.pow(2,8*V)-1;se(this,d,y,V,$,0)}var ae=1,ne=0;for(this[y]=d&255;++ne<V&&(ae*=256);)this[y+ne]=d/ae&255;return y+V},f.prototype.writeUIntBE=function(d,y,V,te){if(d=+d,y=y>>>0,V=V>>>0,!te){var $=Math.pow(2,8*V)-1;se(this,d,y,V,$,0)}var ae=V-1,ne=1;for(this[y+ae]=d&255;--ae>=0&&(ne*=256);)this[y+ae]=d/ne&255;return y+V},f.prototype.writeUInt8=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,1,255,0),this[y]=d&255,y+1},f.prototype.writeUInt16LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,65535,0),this[y]=d&255,this[y+1]=d>>>8,y+2},f.prototype.writeUInt16BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,65535,0),this[y]=d>>>8,this[y+1]=d&255,y+2},f.prototype.writeUInt32LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,4294967295,0),this[y+3]=d>>>24,this[y+2]=d>>>16,this[y+1]=d>>>8,this[y]=d&255,y+4},f.prototype.writeUInt32BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,4294967295,0),this[y]=d>>>24,this[y+1]=d>>>16,this[y+2]=d>>>8,this[y+3]=d&255,y+4},f.prototype.writeIntLE=function(d,y,V,te){if(d=+d,y=y>>>0,!te){var $=Math.pow(2,8*V-1);se(this,d,y,V,$-1,-$)}var ae=0,ne=1,Se=0;for(this[y]=d&255;++ae<V&&(ne*=256);)d<0&&Se===0&&this[y+ae-1]!==0&&(Se=1),this[y+ae]=(d/ne>>0)-Se&255;return y+V},f.prototype.writeIntBE=function(d,y,V,te){if(d=+d,y=y>>>0,!te){var $=Math.pow(2,8*V-1);se(this,d,y,V,$-1,-$)}var ae=V-1,ne=1,Se=0;for(this[y+ae]=d&255;--ae>=0&&(ne*=256);)d<0&&Se===0&&this[y+ae+1]!==0&&(Se=1),this[y+ae]=(d/ne>>0)-Se&255;return y+V},f.prototype.writeInt8=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,1,127,-128),d<0&&(d=255+d+1),this[y]=d&255,y+1},f.prototype.writeInt16LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,32767,-32768),this[y]=d&255,this[y+1]=d>>>8,y+2},f.prototype.writeInt16BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,2,32767,-32768),this[y]=d>>>8,this[y+1]=d&255,y+2},f.prototype.writeInt32LE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,2147483647,-2147483648),this[y]=d&255,this[y+1]=d>>>8,this[y+2]=d>>>16,this[y+3]=d>>>24,y+4},f.prototype.writeInt32BE=function(d,y,V){return d=+d,y=y>>>0,V||se(this,d,y,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[y]=d>>>24,this[y+1]=d>>>16,this[y+2]=d>>>8,this[y+3]=d&255,y+4};function J(l,d,y,V,te,$){if(y+V>l.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function ee(l,d,y,V,te){return d=+d,y=y>>>0,te||J(l,d,y,4,34028234663852886e22,-34028234663852886e22),p.write(l,d,y,V,23,4),y+4}f.prototype.writeFloatLE=function(d,y,V){return ee(this,d,y,!0,V)},f.prototype.writeFloatBE=function(d,y,V){return ee(this,d,y,!1,V)};function ie(l,d,y,V,te){return d=+d,y=y>>>0,te||J(l,d,y,8,17976931348623157e292,-17976931348623157e292),p.write(l,d,y,V,52,8),y+8}f.prototype.writeDoubleLE=function(d,y,V){return ie(this,d,y,!0,V)},f.prototype.writeDoubleBE=function(d,y,V){return ie(this,d,y,!1,V)},f.prototype.copy=function(d,y,V,te){if(!f.isBuffer(d))throw new TypeError("argument should be a Buffer");if(V||(V=0),!te&&te!==0&&(te=this.length),y>=d.length&&(y=d.length),y||(y=0),te>0&&te<V&&(te=V),te===V||d.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(V<0||V>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),d.length-y<te-V&&(te=d.length-y+V);var $=te-V;if(this===d&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(y,V,te);else if(this===d&&V<y&&y<te)for(var ae=$-1;ae>=0;--ae)d[ae+y]=this[ae+V];else Uint8Array.prototype.set.call(d,this.subarray(V,te),y);return $},f.prototype.fill=function(d,y,V,te){if(typeof d=="string"){if(typeof y=="string"?(te=y,y=0,V=this.length):typeof V=="string"&&(te=V,V=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!f.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(d.length===1){var $=d.charCodeAt(0);(te==="utf8"&&$<128||te==="latin1")&&(d=$)}}else typeof d=="number"&&(d=d&255);if(y<0||this.length<y||this.length<V)throw new RangeError("Out of range index");if(V<=y)return this;y=y>>>0,V=V===void 0?this.length:V>>>0,d||(d=0);var ae;if(typeof d=="number")for(ae=y;ae<V;++ae)this[ae]=d;else{var ne=f.isBuffer(d)?d:f.from(d,te),Se=ne.length;if(Se===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(ae=0;ae<V-y;++ae)this[ae+y]=ne[ae%Se]}return this};var me=/[^+/0-9A-Za-z-_]/g;function de(l){if(l=l.split("=")[0],l=l.trim().replace(me,""),l.length<2)return"";for(;l.length%4!=0;)l=l+"=";return l}function Q(l){return l<16?"0"+l.toString(16):l.toString(16)}function X(l,d){d=d||1/0;for(var y,V=l.length,te=null,$=[],ae=0;ae<V;++ae){if(y=l.charCodeAt(ae),y>55295&&y<57344){if(!te){if(y>56319){(d-=3)>-1&&$.push(239,191,189);continue}else if(ae+1===V){(d-=3)>-1&&$.push(239,191,189);continue}te=y;continue}if(y<56320){(d-=3)>-1&&$.push(239,191,189),te=y;continue}y=(te-55296<<10|y-56320)+65536}else te&&(d-=3)>-1&&$.push(239,191,189);if(te=null,y<128){if((d-=1)<0)break;$.push(y)}else if(y<2048){if((d-=2)<0)break;$.push(y>>6|192,y&63|128)}else if(y<65536){if((d-=3)<0)break;$.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((d-=4)<0)break;$.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return $}function j(l){for(var d=[],y=0;y<l.length;++y)d.push(l.charCodeAt(y)&255);return d}function le(l,d){for(var y,V,te,$=[],ae=0;ae<l.length&&!((d-=2)<0);++ae)y=l.charCodeAt(ae),V=y>>8,te=y%256,$.push(te),$.push(V);return $}function G(l){return t.toByteArray(de(l))}function c(l,d,y,V){for(var te=0;te<V&&!(te+y>=d.length||te>=l.length);++te)d[te+y]=l[te];return te}function E(l,d){return l instanceof d||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===d.name}function b(l){return l!==l}},{"13":13,"6":6}],9:[function(e,g,r){var t={};t.parseBuffer=function(o){return new p(o).parse()},t.addBoxProcessor=function(o,n){typeof o!="string"||typeof n!="function"||(i.prototype._boxProcessors[o]=n)},t.createFile=function(){return new p},t.createBox=function(o,n,f){var h=i.create(o);return n&&n.append(h,f),h},t.createFullBox=function(o,n,f){var h=t.createBox(o,n,f);return h.version=0,h.flags=0,h},t.Utils={},t.Utils.dataViewToString=function(o,n){var f=n||"utf-8";if(typeof TextDecoder!="undefined")return new TextDecoder(f).decode(o);var h=[],m=0;if(f==="utf-8")for(;m<o.byteLength;){var u=o.getUint8(m++);u<128||(u<224?(u=(u&31)<<6,u|=o.getUint8(m++)&63):u<240?(u=(u&15)<<12,u|=(o.getUint8(m++)&63)<<6,u|=o.getUint8(m++)&63):(u=(u&7)<<18,u|=(o.getUint8(m++)&63)<<12,u|=(o.getUint8(m++)&63)<<6,u|=o.getUint8(m++)&63)),h.push(String.fromCharCode(u))}else for(;m<o.byteLength;)h.push(String.fromCharCode(o.getUint8(m++)));return h.join("")},t.Utils.utf8ToByteArray=function(o){var n,f;if(typeof TextEncoder!="undefined")n=new TextEncoder().encode(o);else for(n=[],f=0;f<o.length;++f){var h=o.charCodeAt(f);h<128?n.push(h):h<2048?(n.push(192|h>>6),n.push(128|63&h)):h<65536?(n.push(224|h>>12),n.push(128|63&h>>6),n.push(128|63&h)):(n.push(240|h>>18),n.push(128|63&h>>12),n.push(128|63&h>>6),n.push(128|63&h))}return n},t.Utils.appendBox=function(o,n,f){if(n._offset=o._cursor.offset,n._root=o._root?o._root:o,n._raw=o._raw,n._parent=o,f!==-1){if(f==null){o.boxes.push(n);return}var h=-1,m;if(typeof f=="number")h=f;else{if(typeof f=="string")m=f;else if(typeof f=="object"&&f.type)m=f.type;else{o.boxes.push(n);return}for(var u=0;u<o.boxes.length;u++)if(m===o.boxes[u].type){h=u+1;break}}o.boxes.splice(h,0,n)}},typeof r!="undefined"&&(r.parseBuffer=t.parseBuffer,r.addBoxProcessor=t.addBoxProcessor,r.createFile=t.createFile,r.createBox=t.createBox,r.createFullBox=t.createFullBox,r.Utils=t.Utils),t.Cursor=function(o){this.offset=typeof o=="undefined"?0:o};var p=function(o){this._cursor=new t.Cursor,this.boxes=[],o&&(this._raw=new DataView(o))};p.prototype.fetch=function(o){var n=this.fetchAll(o,!0);return n.length?n[0]:null},p.prototype.fetchAll=function(o,n){var f=[];return p._sweep.call(this,o,f,n),f},p.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var o=i.parse(this);if(typeof o.type=="undefined")break;this.boxes.push(o)}return this},p._sweep=function(o,n,f){this.type&&this.type==o&&n.push(this);for(var h in this.boxes){if(n.length&&f)return;p._sweep.call(this.boxes[h],o,n,f)}},p.prototype.write=function(){var o=0,n;for(n=0;n<this.boxes.length;n++)o+=this.boxes[n].getLength(!1);var f=new Uint8Array(o);for(this._rawo=new DataView(f.buffer),this.bytes=f,this._cursor.offset=0,n=0;n<this.boxes.length;n++)this.boxes[n].write();return f.buffer},p.prototype.append=function(o,n){t.Utils.appendBox(this,o,n)};var i=function(){this._cursor=new t.Cursor};i.parse=function(o){var n=new i;return n._offset=o._cursor.offset,n._root=o._root?o._root:o,n._raw=o._raw,n._parent=o,n._parseBox(),o._cursor.offset=n._raw.byteOffset+n._raw.byteLength,n},i.create=function(o){var n=new i;return n.type=o,n.boxes=[],n},i.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],i.prototype._boxProcessors={},i.prototype._procField=function(o,n,f){this._parsing?this[o]=this._readField(n,f):this._writeField(n,f,this[o])},i.prototype._procFieldArray=function(o,n,f,h){var m;if(this._parsing)for(this[o]=[],m=0;m<n;m++)this[o][m]=this._readField(f,h);else for(m=0;m<this[o].length;m++)this._writeField(f,h,this[o][m])},i.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},i.prototype._procEntries=function(o,n,f){var h;if(this._parsing)for(this[o]=[],h=0;h<n;h++)this[o].push({}),f.call(this,this[o][h]);else for(h=0;h<n;h++)f.call(this,this[o][h])},i.prototype._procSubEntries=function(o,n,f,h){var m;if(this._parsing)for(o[n]=[],m=0;m<f;m++)o[n].push({}),h.call(this,o[n][m]);else for(m=0;m<f;m++)h.call(this,o[n][m])},i.prototype._procEntryField=function(o,n,f,h){this._parsing?o[n]=this._readField(f,h):this._writeField(f,h,o[n])},i.prototype._procSubBoxes=function(o,n){var f;if(this._parsing)for(this[o]=[],f=0;f<n;f++)this[o].push(i.parse(this));else for(f=0;f<n;f++)this._rawo?this[o][f].write():this.size+=this[o][f].getLength()},i.prototype._readField=function(o,n){switch(o){case"uint":return this._readUint(n);case"int":return this._readInt(n);case"template":return this._readTemplate(n);case"string":return n===-1?this._readTerminatedString():this._readString(n);case"data":return this._readData(n);case"utf8":return this._readUTF8String();default:return-1}},i.prototype._readInt=function(o){var n=null,f=this._cursor.offset-this._raw.byteOffset;switch(o){case 8:n=this._raw.getInt8(f);break;case 16:n=this._raw.getInt16(f);break;case 32:n=this._raw.getInt32(f);break;case 64:var h=this._raw.getInt32(f),m=this._raw.getInt32(f+4);n=h*Math.pow(2,32)+m;break}return this._cursor.offset+=o>>3,n},i.prototype._readUint=function(o){var n=null,f=this._cursor.offset-this._raw.byteOffset,h,m;switch(o){case 8:n=this._raw.getUint8(f);break;case 16:n=this._raw.getUint16(f);break;case 24:h=this._raw.getUint16(f),m=this._raw.getUint8(f+2),n=(h<<8)+m;break;case 32:n=this._raw.getUint32(f);break;case 64:h=this._raw.getUint32(f),m=this._raw.getUint32(f+4),n=h*Math.pow(2,32)+m;break}return this._cursor.offset+=o>>3,n},i.prototype._readString=function(o){for(var n="",f=0;f<o;f++){var h=this._readUint(8);n+=String.fromCharCode(h)}return n},i.prototype._readTemplate=function(o){var n=this._readUint(o/2),f=this._readUint(o/2);return n+f/Math.pow(2,o/2)},i.prototype._readTerminatedString=function(){for(var o="";this._cursor.offset-this._offset<this._raw.byteLength;){var n=this._readUint(8);if(n===0)break;o+=String.fromCharCode(n)}return o},i.prototype._readData=function(o){var n=o>0?o:this._raw.byteLength-(this._cursor.offset-this._offset);if(n>0){var f=new Uint8Array(this._raw.buffer,this._cursor.offset,n);return this._cursor.offset+=n,f}else return null},i.prototype._readUTF8String=function(){var o=this._raw.byteLength-(this._cursor.offset-this._offset),n=null;return o>0&&(n=new DataView(this._raw.buffer,this._cursor.offset,o),this._cursor.offset+=o),n&&t.Utils.dataViewToString(n)},i.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength){this._root._incomplete=!0;return}switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(i.parse(this))},i.prototype.append=function(o,n){t.Utils.appendBox(this,o,n)},i.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var o=0;o<this.boxes.length;o++)this.size+=this.boxes[o].getLength();return this._data&&this._writeData(this._data),this.size},i.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var o=0;o<this.boxes.length;o++)this.boxes[o].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},i.prototype._writeInt=function(o,n){if(this._rawo){var f=this._cursor.offset-this._rawo.byteOffset;switch(o){case 8:this._rawo.setInt8(f,n);break;case 16:this._rawo.setInt16(f,n);break;case 32:this._rawo.setInt32(f,n);break;case 64:var h=Math.floor(n/Math.pow(2,32)),m=n-h*Math.pow(2,32);this._rawo.setUint32(f,h),this._rawo.setUint32(f+4,m);break}this._cursor.offset+=o>>3}else this.size+=o>>3},i.prototype._writeUint=function(o,n){if(this._rawo){var f=this._cursor.offset-this._rawo.byteOffset,h,m;switch(o){case 8:this._rawo.setUint8(f,n);break;case 16:this._rawo.setUint16(f,n);break;case 24:h=(n&16776960)>>8,m=n&255,this._rawo.setUint16(f,h),this._rawo.setUint8(f+2,m);break;case 32:this._rawo.setUint32(f,n);break;case 64:h=Math.floor(n/Math.pow(2,32)),m=n-h*Math.pow(2,32),this._rawo.setUint32(f,h),this._rawo.setUint32(f+4,m);break}this._cursor.offset+=o>>3}else this.size+=o>>3},i.prototype._writeString=function(o,n){for(var f=0;f<o;f++)this._writeUint(8,n.charCodeAt(f))},i.prototype._writeTerminatedString=function(o){if(o.length!==0){for(var n=0;n<o.length;n++)this._writeUint(8,o.charCodeAt(n));this._writeUint(8,0)}},i.prototype._writeTemplate=function(o,n){var f=Math.floor(n),h=(n-f)*Math.pow(2,o/2);this._writeUint(o/2,f),this._writeUint(o/2,h)},i.prototype._writeData=function(o){var n;if(o)if(this._rawo){if(o instanceof Array){for(var f=this._cursor.offset-this._rawo.byteOffset,n=0;n<o.length;n++)this._rawo.setInt8(f+n,o[n]);this._cursor.offset+=o.length}o instanceof Uint8Array&&(this._root.bytes.set(o,this._cursor.offset),this._cursor.offset+=o.length)}else this.size+=o.length},i.prototype._writeUTF8String=function(o){var n=t.Utils.utf8ToByteArray(o);if(this._rawo)for(var f=new DataView(this._rawo.buffer,this._cursor.offset,n.length),h=0;h<n.length;h++)f.setUint8(h,n[h]);else this.size+=n.length},i.prototype._writeField=function(o,n,f){switch(o){case"uint":this._writeUint(n,f);break;case"int":this._writeInt(n,f);break;case"template":this._writeTemplate(n,f);break;case"string":n==-1?this._writeTerminatedString(f):this._writeString(n,f);break;case"data":this._writeData(f);break;case"utf8":this._writeUTF8String(f);break;default:break}},i.prototype._boxProcessors.avc1=i.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},i.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(o){this._procEntryField(o,"segment_duration","uint",this.version===1?64:32),this._procEntryField(o,"media_time","int",this.version===1?64:32),this._procEntryField(o,"media_rate_integer","int",16),this._procEntryField(o,"media_rate_fraction","int",16)})},i.prototype._boxProcessors.emsg=function(){this._procFullBox(),this.version==1?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},i.prototype._boxProcessors.free=i.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},i.prototype._boxProcessors.ftyp=i.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var o=-1;this._parsing&&(o=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",o,"string",4)},i.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},i.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),!this._parsing&&typeof this.language=="string"&&(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode((this.language>>10&31)+96,(this.language>>5&31)+96,(this.language&31)+96)),this._procField("pre_defined","uint",16)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),this.flags&1&&this._procField("scheme_uri","string",-1)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var o=-1;this._parsing&&(o=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",o,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(o){this._parsing||(o.reference=(o.reference_type&1)<<31,o.reference|=o.referenced_size&2147483647,o.sap=(o.starts_with_SAP&1)<<31,o.sap|=(o.SAP_type&3)<<28,o.sap|=o.SAP_delta_time&268435455),this._procEntryField(o,"reference","uint",32),this._procEntryField(o,"subsegment_duration","uint",32),this._procEntryField(o,"sap","uint",32),this._parsing&&(o.reference_type=o.reference>>31&1,o.referenced_size=o.reference&2147483647,o.starts_with_SAP=o.sap>>31&1,o.SAP_type=o.sap>>28&7,o.SAP_delta_time=o.sap&268435455)})},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(o){this._procEntryField(o,"ranges_count","uint",32),this._procSubEntries(o,"ranges",o.ranges_count,function(n){this._procEntryField(n,"level","uint",8),this._procEntryField(n,"range_size","uint",24)})})},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(o){this._procEntryField(o,"sample_delta","uint",32),this._procEntryField(o,"subsample_count","uint",16),this._procSubEntries(o,"subsamples",o.subsample_count,function(n){this._procEntryField(n,"subsample_size","uint",this.version===1?32:16),this._procEntryField(n,"subsample_priority","uint",8),this._procEntryField(n,"discardable","uint",8),this._procEntryField(n,"codec_specific_parameters","uint",32)})})},i.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},i.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),this.flags&1&&this._procField("base_data_offset","uint",64),this.flags&2&&this._procField("sample_description_offset","uint",32),this.flags&8&&this._procField("default_sample_duration","uint",32),this.flags&16&&this._procField("default_sample_size","uint",32),this.flags&32&&this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(this.length_size_of_traf_num&48)<<4,this.reserved|=(this.length_size_of_trun_num&12)<<2,this.reserved|=this.length_size_of_sample_num&3),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(this.reserved&48)>>4,this.length_size_of_trun_num=(this.reserved&12)>>2,this.length_size_of_sample_num=this.reserved&3),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(o){this._procEntryField(o,"time","uint",this.version===1?64:32),this._procEntryField(o,"moof_offset","uint",this.version===1?64:32),this._procEntryField(o,"traf_number","uint",(this.length_size_of_traf_num+1)*8),this._procEntryField(o,"trun_number","uint",(this.length_size_of_trun_num+1)*8),this._procEntryField(o,"sample_number","uint",(this.length_size_of_sample_num+1)*8)})},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},i.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),this.flags&1&&this._procField("data_offset","int",32),this.flags&4&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(o){this.flags&256&&this._procEntryField(o,"sample_duration","uint",32),this.flags&512&&this._procEntryField(o,"sample_size","uint",32),this.flags&1024&&this._procEntryField(o,"sample_flags","uint",32),this.flags&2048&&this._procEntryField(o,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},{}],10:[function(e,g,r){(function(t){function p(N){return Array.isArray?Array.isArray(N):H(N)==="[object Array]"}r.isArray=p;function i(N){return typeof N=="boolean"}r.isBoolean=i;function o(N){return N===null}r.isNull=o;function n(N){return N==null}r.isNullOrUndefined=n;function f(N){return typeof N=="number"}r.isNumber=f;function h(N){return typeof N=="string"}r.isString=h;function m(N){return typeof N=="symbol"}r.isSymbol=m;function u(N){return N===void 0}r.isUndefined=u;function _(N){return H(N)==="[object RegExp]"}r.isRegExp=_;function C(N){return typeof N=="object"&&N!==null}r.isObject=C;function k(N){return H(N)==="[object Date]"}r.isDate=k;function R(N){return H(N)==="[object Error]"||N instanceof Error}r.isError=R;function P(N){return typeof N=="function"}r.isFunction=P;function w(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N=="undefined"}r.isPrimitive=w,r.isBuffer=t.isBuffer;function H(N){return Object.prototype.toString.call(N)}}).call(this,{isBuffer:e(22)})},{"22":22}],11:[function(e,g,r){var t=Object.create||v,p=Object.keys||T,i=Function.prototype.bind||W;function o(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=t(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}g.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var n=10,f;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),f=h.x===0}catch(O){f=!1}f?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(O){if(typeof O!="number"||O<0||O!==O)throw new TypeError('"defaultMaxListeners" must be a positive number');n=O}}):o.defaultMaxListeners=n,o.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||isNaN(B))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=B,this};function m(O){return O._maxListeners===void 0?o.defaultMaxListeners:O._maxListeners}o.prototype.getMaxListeners=function(){return m(this)};function u(O,B,L){if(B)O.call(L);else for(var K=O.length,x=I(O,K),U=0;U<K;++U)x[U].call(L)}function _(O,B,L,K){if(B)O.call(L,K);else for(var x=O.length,U=I(O,x),Y=0;Y<x;++Y)U[Y].call(L,K)}function C(O,B,L,K,x){if(B)O.call(L,K,x);else for(var U=O.length,Y=I(O,U),oe=0;oe<U;++oe)Y[oe].call(L,K,x)}function k(O,B,L,K,x,U){if(B)O.call(L,K,x,U);else for(var Y=O.length,oe=I(O,Y),ue=0;ue<Y;++ue)oe[ue].call(L,K,x,U)}function R(O,B,L,K){if(B)O.apply(L,K);else for(var x=O.length,U=I(O,x),Y=0;Y<x;++Y)U[Y].apply(L,K)}o.prototype.emit=function(B){var L,K,x,U,Y,oe,ue=B==="error";if(oe=this._events,oe)ue=ue&&oe.error==null;else if(!ue)return!1;if(ue){if(arguments.length>1&&(L=arguments[1]),L instanceof Error)throw L;var re=new Error('Unhandled "error" event. ('+L+")");throw re.context=L,re;return!1}if(K=oe[B],!K)return!1;var ve=typeof K=="function";switch(x=arguments.length,x){case 1:u(K,ve,this);break;case 2:_(K,ve,this,arguments[1]);break;case 3:C(K,ve,this,arguments[1],arguments[2]);break;case 4:k(K,ve,this,arguments[1],arguments[2],arguments[3]);break;default:for(U=new Array(x-1),Y=1;Y<x;Y++)U[Y-1]=arguments[Y];R(K,ve,this,U)}return!0};function P(O,B,L,K){var x,U,Y;if(typeof L!="function")throw new TypeError('"listener" argument must be a function');if(U=O._events,U?(U.newListener&&(O.emit("newListener",B,L.listener?L.listener:L),U=O._events),Y=U[B]):(U=O._events=t(null),O._eventsCount=0),!Y)Y=U[B]=L,++O._eventsCount;else if(typeof Y=="function"?Y=U[B]=K?[L,Y]:[Y,L]:K?Y.unshift(L):Y.push(L),!Y.warned&&(x=m(O),x&&x>0&&Y.length>x)){Y.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Y.length+' "'+String(B)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');oe.name="MaxListenersExceededWarning",oe.emitter=O,oe.type=B,oe.count=Y.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",oe.name,oe.message)}return O}o.prototype.addListener=function(B,L){return P(this,B,L,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(B,L){return P(this,B,L,!0)};function w(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var O=new Array(arguments.length),B=0;B<O.length;++B)O[B]=arguments[B];this.listener.apply(this.target,O)}}function H(O,B,L){var K={fired:!1,wrapFn:void 0,target:O,type:B,listener:L},x=i.call(w,K);return x.listener=L,K.wrapFn=x,x}o.prototype.once=function(B,L){if(typeof L!="function")throw new TypeError('"listener" argument must be a function');return this.on(B,H(this,B,L)),this},o.prototype.prependOnceListener=function(B,L){if(typeof L!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(B,H(this,B,L)),this},o.prototype.removeListener=function(B,L){var K,x,U,Y,oe;if(typeof L!="function")throw new TypeError('"listener" argument must be a function');if(x=this._events,!x)return this;if(K=x[B],!K)return this;if(K===L||K.listener===L)--this._eventsCount==0?this._events=t(null):(delete x[B],x.removeListener&&this.emit("removeListener",B,K.listener||L));else if(typeof K!="function"){for(U=-1,Y=K.length-1;Y>=0;Y--)if(K[Y]===L||K[Y].listener===L){oe=K[Y].listener,U=Y;break}if(U<0)return this;U===0?K.shift():M(K,U),K.length===1&&(x[B]=K[0]),x.removeListener&&this.emit("removeListener",B,oe||L)}return this},o.prototype.removeAllListeners=function(B){var L,K,x;if(K=this._events,!K)return this;if(!K.removeListener)return arguments.length===0?(this._events=t(null),this._eventsCount=0):K[B]&&(--this._eventsCount==0?this._events=t(null):delete K[B]),this;if(arguments.length===0){var U=p(K),Y;for(x=0;x<U.length;++x)Y=U[x],Y!=="removeListener"&&this.removeAllListeners(Y);return this.removeAllListeners("removeListener"),this._events=t(null),this._eventsCount=0,this}if(L=K[B],typeof L=="function")this.removeListener(B,L);else if(L)for(x=L.length-1;x>=0;x--)this.removeListener(B,L[x]);return this};function N(O,B,L){var K=O._events;if(!K)return[];var x=K[B];return x?typeof x=="function"?L?[x.listener||x]:[x]:L?D(x):I(x,x.length):[]}o.prototype.listeners=function(B){return N(this,B,!0)},o.prototype.rawListeners=function(B){return N(this,B,!1)},o.listenerCount=function(O,B){return typeof O.listenerCount=="function"?O.listenerCount(B):A.call(O,B)},o.prototype.listenerCount=A;function A(O){var B=this._events;if(B){var L=B[O];if(typeof L=="function")return 1;if(L)return L.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function M(O,B){for(var L=B,K=L+1,x=O.length;K<x;L+=1,K+=1)O[L]=O[K];O.pop()}function I(O,B){for(var L=new Array(B),K=0;K<B;++K)L[K]=O[K];return L}function D(O){for(var B=new Array(O.length),L=0;L<B.length;++L)B[L]=O[L].listener||O[L];return B}function v(O){var B=function(){};return B.prototype=O,new B}function T(O){var B=[];for(var L in O)Object.prototype.hasOwnProperty.call(O,L)&&B.push(L);return L}function W(O){var B=this;return function(){return B.apply(O,arguments)}}},{}],12:[function(e,g,r){"use strict";var t=Array.isArray,p=Object.keys,i=Object.prototype.hasOwnProperty;g.exports=function o(n,f){if(n===f)return!0;if(n&&f&&typeof n=="object"&&typeof f=="object"){var h=t(n),m=t(f),u,_,C;if(h&&m){if(_=n.length,_!=f.length)return!1;for(u=_;u--!=0;)if(!o(n[u],f[u]))return!1;return!0}if(h!=m)return!1;var k=n instanceof Date,R=f instanceof Date;if(k!=R)return!1;if(k&&R)return n.getTime()==f.getTime();var P=n instanceof RegExp,w=f instanceof RegExp;if(P!=w)return!1;if(P&&w)return n.toString()==f.toString();var H=p(n);if(_=H.length,_!==p(f).length)return!1;for(u=_;u--!=0;)if(!i.call(f,H[u]))return!1;for(u=_;u--!=0;)if(C=H[u],!o(n[C],f[C]))return!1;return!0}return n!==n&&f!==f}},{}],13:[function(e,g,r){r.read=function(t,p,i,o,n){var f,h,m=n*8-o-1,u=(1<<m)-1,_=u>>1,C=-7,k=i?n-1:0,R=i?-1:1,P=t[p+k];for(k+=R,f=P&(1<<-C)-1,P>>=-C,C+=m;C>0;f=f*256+t[p+k],k+=R,C-=8);for(h=f&(1<<-C)-1,f>>=-C,C+=o;C>0;h=h*256+t[p+k],k+=R,C-=8);if(f===0)f=1-_;else{if(f===u)return h?NaN:(P?-1:1)*(1/0);h=h+Math.pow(2,o),f=f-_}return(P?-1:1)*h*Math.pow(2,f-o)},r.write=function(t,p,i,o,n,f){var h,m,u,_=f*8-n-1,C=(1<<_)-1,k=C>>1,R=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=o?0:f-1,w=o?1:-1,H=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(m=isNaN(p)?1:0,h=C):(h=Math.floor(Math.log(p)/Math.LN2),p*(u=Math.pow(2,-h))<1&&(h--,u*=2),h+k>=1?p+=R/u:p+=R*Math.pow(2,1-k),p*u>=2&&(h++,u/=2),h+k>=C?(m=0,h=C):h+k>=1?(m=(p*u-1)*Math.pow(2,n),h=h+k):(m=p*Math.pow(2,k-1)*Math.pow(2,n),h=0));n>=8;t[i+P]=m&255,P+=w,m/=256,n-=8);for(h=h<<n|m,_+=n;_>0;t[i+P]=h&255,P+=w,h/=256,_-=8);t[i+P-w]|=H*128}},{}],14:[function(e,g,r){(function(t,p,i,o,n){t.fromXML=function(c,E,b){var l=p.parser(!0,{xmlns:!0}),d=[],y=[],V=[],te=0,$=null;l.onclosetag=function(he){if(d[0]instanceof _)for(var ye in d[0].styles)ie(d[0],d[0].styles[ye],E);else if(d[0]instanceof v||d[0]instanceof T){if(d[0].contents.length>1){var _e=[d[0].contents[0]],pe;for(pe=1;pe<d[0].contents.length;pe++)d[0].contents[pe]instanceof W&&_e[_e.length-1]instanceof W?_e[_e.length-1].text+=d[0].contents[pe].text:_e.push(d[0].contents[pe]);d[0].contents=_e}d[0]instanceof T&&d[0].contents.length===1&&d[0].contents[0]instanceof W&&(d[0].text=d[0].contents[0].text,delete d[0].contents)}else d[0]instanceof h&&(d[0].node.uri===i.ns_tt&&d[0].node.local==="metadata"?te--:te>0&&b&&"onCloseTag"in b&&b.onCloseTag());V.shift(),y.shift(),d.shift()},l.ontext=function(he){if(d[0]!==void 0)if(d[0]instanceof T||d[0]instanceof v){var ye=new W;ye.initFromText($,d[0],he,V[0],E),d[0].contents.push(ye)}else d[0]instanceof h&&te>0&&b&&"onText"in b&&b.onText(he)},l.onopentag=function(he){var ye=he.attributes["xml:space"];ye?V.unshift(ye.value):V.length===0?V.unshift("default"):V.unshift(V[0]);var _e=he.attributes["xml:lang"];if(_e?y.unshift(_e.value):y.length===0?y.unshift(""):y.unshift(y[0]),he.uri===i.ns_tt)if(he.local==="tt")$!==null&&le(E,"Two <tt> elements at ("+this.line+","+this.column+")"),$=new m,$.initFromNode(he,E),d.unshift($);else if(he.local==="head")d[0]instanceof m||le(E,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),$.head!==null&&le("Second <head> element at ("+this.line+","+this.column+")"),$.head=new u,d.unshift($.head);else if(he.local==="styling")d[0]instanceof u||le(E,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),$.head.styling!==null&&le("Second <styling> element at ("+this.line+","+this.column+")"),$.head.styling=new _,d.unshift($.head.styling);else if(he.local==="style"){var pe;d[0]instanceof _?(pe=new C,pe.initFromNode(he,E),pe.id?$.head.styling.styles[pe.id]=pe:j(E,"<style> element missing @id attribute"),d.unshift(pe)):d[0]instanceof B?(pe=new C,pe.initFromNode(he,E),de(pe.styleAttrs,d[0].styleAttrs),d.unshift(pe)):le(E,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if(he.local==="layout")d[0]instanceof u||le(E,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),$.head.layout!==null&&le(E,"Second <layout> element at "+this.line+","+this.column+")"),$.head.layout=new k,d.unshift($.head.layout);else if(he.local==="region"){d[0]instanceof k||le(E,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var De=new B;De.initFromNode($,he,E),!De.id||De.id in $.head.layout.regions?j(E,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):$.head.layout.regions[De.id]=De,d.unshift(De)}else if(he.local==="body"){d[0]instanceof m||le(E,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),$.body!==null&&le(E,"Second <body> element at "+this.line+","+this.column+")");var je=new I;je.initFromNode($,he,E),$.body=je,d.unshift(je)}else if(he.local==="div"){d[0]instanceof D||d[0]instanceof I||le(E,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var Fe=new D;Fe.initFromNode($,d[0],he,E),d[0].contents.push(Fe),d.unshift(Fe)}else if(he.local==="p"){d[0]instanceof D||le(E,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var Le=new v;Le.initFromNode($,d[0],he,E),d[0].contents.push(Le),d.unshift(Le)}else if(he.local==="span"){d[0]instanceof T||d[0]instanceof v||le(E,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var Ve=new T;Ve.initFromNode($,d[0],he,V[0],E),d[0].contents.push(Ve),d.unshift(Ve)}else if(he.local==="br"){d[0]instanceof T||d[0]instanceof v||le(E,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var Ge=new O;Ge.initFromNode($,d[0],he,E),d[0].contents.push(Ge),d.unshift(Ge)}else if(he.local==="set"){d[0]instanceof T||d[0]instanceof v||d[0]instanceof D||d[0]instanceof I||d[0]instanceof B||d[0]instanceof O||le(E,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var we=new L;we.initFromNode($,d[0],he,E),d[0].sets.push(we),d.unshift(we)}else d.unshift(new h(he));else d.unshift(new h(he));if(d[0]instanceof h){if(he.uri===i.ns_tt&&he.local==="metadata")te++;else if(te>0&&b&&"onOpenTag"in b){var at=[];for(var Re in he.attributes)at[he.attributes[Re].uri+" "+he.attributes[Re].local]={uri:he.attributes[Re].uri,local:he.attributes[Re].local,value:he.attributes[Re].value};b.onOpenTag(he.uri,he.local,at)}}},l.write(c).close(),$.head!==null?delete $.head.styling:$.head=new u,$.head.layout===null&&($.head.layout=new k);var ae=!1;for(var ne in $.head.layout.regions){ae=!0;break}if(!ae){var Se=B.prototype.createDefaultRegion();$.head.layout.regions[Se.id]=Se}for(var Ie in $.head.layout.regions)f($,$.head.layout.regions[Ie],null,null);return $.body&&f($,$.body,null,null),$};function f(c,E,b,l){var d=l&&l.timeContainer==="seq",y=0;l&&(d&&b?y=b.end:y=l.begin),E.begin=E.explicit_begin?E.explicit_begin+y:y;var V=E.begin,te=null;for(var $ in E.sets)f(c,E.sets[$],te,E),E.timeContainer==="seq"?V=E.sets[$].end:V=Math.max(V,E.sets[$].end),te=E.sets[$];if(!("contents"in E))d?V=E.begin:V=Number.POSITIVE_INFINITY;else for(var ae in E.contents)f(c,E.contents[ae],te,E),E.timeContainer==="seq"?V=E.contents[ae].end:V=Math.max(V,E.contents[ae].end),te=E.contents[ae];E.explicit_end!==null&&E.explicit_dur!==null?E.end=Math.min(E.begin+E.explicit_dur,y+E.explicit_end):E.explicit_end===null&&E.explicit_dur!==null?E.end=E.begin+E.explicit_dur:E.explicit_end!==null&&E.explicit_dur===null?E.end=y+E.explicit_end:E.end=V,delete E.explicit_begin,delete E.explicit_dur,delete E.explicit_end,c._registerEvent(E)}function h(c){this.node=c}function m(){this.events=[],this.head=null,this.body=null}m.prototype.initFromNode=function(c,E){this.cellResolution=ve(c,E);var b=ce(c,E);this.effectiveFrameRate=b.effectiveFrameRate,this.tickRate=b.tickRate,this.aspectRatio=re(c,E);var l=ue(c,i.ns_ttp,"timeBase");l!==null&&l!=="media"&&le(E,"Unsupported time base");var d=se(c,E);d===null?this.pxDimensions={h:480,w:640}:((d.h.unit!=="px"||d.w.unit!=="px")&&le(E,"Extent on TT must be in px or absent"),this.pxDimensions={h:d.h.value,w:d.w.value})},m.prototype._registerEvent=function(c){if(!(c.end<=c.begin)){var E=G(this.events,c.begin);if(E.found||this.events.splice(E.index,0,c.begin),c.end!==Number.POSITIVE_INFINITY){var b=G(this.events,c.end);b.found||this.events.splice(b.index,0,c.end)}}},m.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},m.prototype.getMediaTimeEvents=function(){return this.events};function u(){this.styling=null,this.layout=null}function _(){this.styles={}}function C(){this.id=null,this.styleAttrs=null,this.styleRefs=null}C.prototype.initFromNode=function(c,E){this.id=K(c),this.styleAttrs=oe(c,E),this.styleRefs=Y(c)};function k(){this.regions={}}function R(c){this.kind=c}function P(c){this.id=c}P.prototype.initFromNode=function(c,E,b,l){this.id=K(b)};function w(c){this.regionID=c}w.prototype.initFromNode=function(c,E,b,l){this.regionID=x(b)};function H(c){this.styleAttrs=c}H.prototype.initFromNode=function(c,E,b,l){this.styleAttrs=oe(b,l),c.head!==null&&c.head.styling!==null&&me(c.head.styling,Y(b),this.styleAttrs,l)};function N(c){this.sets=c}N.prototype.initFromNode=function(c,E,b,l){this.sets=[]};function A(c){this.contents=c}A.prototype.initFromNode=function(c,E,b,l){this.contents=[]};function M(c,E,b){this.explicit_begin=c,this.explicit_end=E,this.explicit_dur=b}M.prototype.initFromNode=function(c,E,b,l){var d=ee(c,E,b,l);this.explicit_begin=d.explicit_begin,this.explicit_end=d.explicit_end,this.explicit_dur=d.explicit_dur,this.timeContainer=U(b,l)};function I(){R.call(this,"body")}I.prototype.initFromNode=function(c,E,b){H.prototype.initFromNode.call(this,c,null,E,b),M.prototype.initFromNode.call(this,c,null,E,b),N.prototype.initFromNode.call(this,c,null,E,b),w.prototype.initFromNode.call(this,c,null,E,b),A.prototype.initFromNode.call(this,c,null,E,b)};function D(){R.call(this,"div")}D.prototype.initFromNode=function(c,E,b,l){H.prototype.initFromNode.call(this,c,E,b,l),M.prototype.initFromNode.call(this,c,E,b,l),N.prototype.initFromNode.call(this,c,E,b,l),w.prototype.initFromNode.call(this,c,E,b,l),A.prototype.initFromNode.call(this,c,E,b,l)};function v(){R.call(this,"p")}v.prototype.initFromNode=function(c,E,b,l){H.prototype.initFromNode.call(this,c,E,b,l),M.prototype.initFromNode.call(this,c,E,b,l),N.prototype.initFromNode.call(this,c,E,b,l),w.prototype.initFromNode.call(this,c,E,b,l),A.prototype.initFromNode.call(this,c,E,b,l)};function T(){R.call(this,"span")}T.prototype.initFromNode=function(c,E,b,l,d){H.prototype.initFromNode.call(this,c,E,b,d),M.prototype.initFromNode.call(this,c,E,b,d),N.prototype.initFromNode.call(this,c,E,b,d),w.prototype.initFromNode.call(this,c,E,b,d),A.prototype.initFromNode.call(this,c,E,b,d),this.space=l};function W(){R.call(this,"span")}W.prototype.initFromText=function(c,E,b,l,d){M.prototype.initFromNode.call(this,c,E,null,d),this.text=b,this.space=l};function O(){R.call(this,"br")}O.prototype.initFromNode=function(c,E,b,l){w.prototype.initFromNode.call(this,c,E,b,l),M.prototype.initFromNode.call(this,c,E,b,l)};function B(){}B.prototype.createDefaultRegion=function(){var c=new B;return P.call(c,""),H.call(c,{}),N.call(c,[]),M.call(c,0,Number.POSITIVE_INFINITY,null),c},B.prototype.initFromNode=function(c,E,b){P.prototype.initFromNode.call(this,c,null,E,b),H.prototype.initFromNode.call(this,c,null,E,b),M.prototype.initFromNode.call(this,c,null,E,b),N.prototype.initFromNode.call(this,c,null,E,b),c.head!==null&&c.head.styling!==null&&me(c.head.styling,Y(E),this.styleAttrs,b)};function L(){}L.prototype.initFromNode=function(c,E,b,l){M.prototype.initFromNode.call(this,c,E,b,l);var d=oe(b,l);this.qname=null,this.value=null;for(var y in d){if(this.qname){j(l,"More than one style specified on set");break}this.qname=y,this.value=d[y]}};function K(c){return c&&"xml:id"in c.attributes&&c.attributes["xml:id"].value||null}function x(c){return c&&"region"in c.attributes?c.attributes.region.value:""}function U(c,E){var b=c&&"timeContainer"in c.attributes?c.attributes.timeContainer.value:null;return!b||b==="par"?"par":b==="seq"?"seq":(j(E,"Illegal value of timeContainer (assuming 'par')"),"par")}function Y(c){return c&&"style"in c.attributes?c.attributes.style.value.split(" "):[]}function oe(c,E){var b={};if(c!==null)for(var l in c.attributes){var d=c.attributes[l].uri+" "+c.attributes[l].local,y=o.byQName[d];if(y!==void 0){var V=y.parse(c.attributes[l].value);V!==null?(b[d]=V,y===o.byName.zIndex&&X(E,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):j(E,"Cannot parse styling attribute "+d+" --> "+c.attributes[l].value)}}return b}function ue(c,E,b){for(var l in c.attributes)if(c.attributes[l].uri===E&&c.attributes[l].local===b)return c.attributes[l].value;return null}function re(c,E){var b=ue(c,i.ns_ittp,"aspectRatio"),l=null;if(b!==null){var d=/(\d+) (\d+)/,y=d.exec(b);if(y!==null){var V=parseInt(y[1]),te=parseInt(y[2]);V!==0&&te!==0?l=V/te:j(E,"Illegal aspectRatio values (ignoring)")}else j(E,"Malformed aspectRatio attribute (ignoring)")}return l}function ve(c,E){var b=ue(c,i.ns_ttp,"cellResolution"),l=15,d=32;if(b!==null){var y=/(\d+) (\d+)/,V=y.exec(b);V!==null?(d=parseInt(V[1]),l=parseInt(V[2])):X(E,"Malformed cellResolution value (using initial value instead)")}return{w:d,h:l}}function ce(c,E){var b=ue(c,i.ns_ttp,"frameRate"),l=30,d;if(b!==null){var y=/(\d+)/;d=y.exec(b),d!==null?l=parseInt(d[1]):X(E,"Malformed frame rate attribute (using initial value instead)")}var V=ue(c,i.ns_ttp,"frameRateMultiplier"),te=1;if(V!==null){var $=/(\d+) (\d+)/;d=$.exec(V),d!==null?te=parseInt(d[1])/parseInt(d[2]):X(E,"Malformed frame rate multiplier attribute (using initial value instead)")}var ae=te*l,ne=1,Se=ue(c,i.ns_ttp,"tickRate");if(Se===null)b!==null&&(ne=ae);else{var Ie=/(\d+)/;d=Ie.exec(Se),d!==null?ne=parseInt(d[1]):X(E,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:ae,tickRate:ne}}function se(c,E){var b=ue(c,i.ns_tts,"extent");if(b===null)return null;var l=b.split(" ");if(l.length!==2)return X(E,"Malformed extent (ignoring)"),null;var d=n.parseLength(l[0]),y=n.parseLength(l[1]);return!y||!d?(X(E,"Malformed extent values (ignoring)"),null):{h:y,w:d}}function J(c,E,b){var l=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/,d=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/,y=/^(\d+(?:\.\d+)?)f$/,V=/^(\d+(?:\.\d+)?)t$/,te=/^(\d+(?:\.\d+)?)ms$/,$=/^(\d+(?:\.\d+)?)s$/,ae=/^(\d+(?:\.\d+)?)h$/,ne=/^(\d+(?:\.\d+)?)m$/,Se,Ie=null;return(Se=y.exec(b))!==null?E!==null&&(Ie=parseFloat(Se[1])/E):(Se=V.exec(b))!==null?c!==null&&(Ie=parseFloat(Se[1])/c):(Se=te.exec(b))!==null?Ie=parseFloat(Se[1])/1e3:(Se=$.exec(b))!==null?Ie=parseFloat(Se[1]):(Se=ae.exec(b))!==null?Ie=parseFloat(Se[1])*3600:(Se=ne.exec(b))!==null?Ie=parseFloat(Se[1])*60:(Se=l.exec(b))!==null?Ie=parseInt(Se[1])*3600+parseInt(Se[2])*60+parseFloat(Se[3]):(Se=d.exec(b))!==null&&E!==null&&(Ie=parseInt(Se[1])*3600+parseInt(Se[2])*60+parseInt(Se[3])+(Se[4]===null?0:parseInt(Se[4])/E)),Ie}function ee(c,E,b,l){var d=null;b&&"begin"in b.attributes&&(d=J(c.tickRate,c.effectiveFrameRate,b.attributes.begin.value),d===null&&X(l,"Malformed begin value "+b.attributes.begin.value+" (using 0)"));var y=null;b&&"dur"in b.attributes&&(y=J(c.tickRate,c.effectiveFrameRate,b.attributes.dur.value),y===null&&X(l,"Malformed dur value "+b.attributes.dur.value+" (ignoring)"));var V=null;return b&&"end"in b.attributes&&(V=J(c.tickRate,c.effectiveFrameRate,b.attributes.end.value),V===null&&X(l,"Malformed end value (ignoring)")),{explicit_begin:d,explicit_end:V,explicit_dur:y}}function ie(c,E,b){for(;E.styleRefs.length>0;){var l=E.styleRefs.pop();if(!(l in c.styles)){j(b,"Non-existant style id referenced");continue}ie(c,c.styles[l],b),de(c.styles[l].styleAttrs,E.styleAttrs)}}function me(c,E,b,l){for(var d=E.length-1;d>=0;d--){var y=E[d];if(!(y in c.styles)){j(l,"Non-existant style id referenced");continue}de(c.styles[y].styleAttrs,b)}}function de(c,E){for(var b in c)b in E||(E[b]=c[b])}function Q(c,E){if(c&&c.info&&c.info(E))throw E}function X(c,E){if(c&&c.warn&&c.warn(E))throw E}function j(c,E){if(c&&c.error&&c.error(E))throw E}function le(c,E){throw c&&c.fatal&&c.fatal(E),E}function G(c,E){for(var b=0,l=c.length-1,d;b<=l;){d=Math.floor((b+l)/2);var y=c[d];if(y<E)b=d+1;else if(y>E)l=d-1;else return{found:!0,index:d}}return{found:!1,index:b}}})(typeof r=="undefined"?this.imscDoc={}:r,typeof sax=="undefined"?e(40):sax,typeof imscNames=="undefined"?e(18):imscNames,typeof imscStyles=="undefined"?e(19):imscStyles,typeof imscUtils=="undefined"?e(20):imscUtils)},{"18":18,"19":19,"20":20,"40":40}],15:[function(e,g,r){(function(t,p,i){t.render=function(A,M,I,D,v,T,W,O,B){var L=D||M.clientHeight,K=v||M.clientWidth;if(A.aspectRatio!==null){var x=L*A.aspectRatio;x>K?L=Math.round(K/A.aspectRatio):K=x}var U=document.createElement("div");U.style.position="relative",U.style.width=K+"px",U.style.height=L+"px",U.style.margin="auto",U.style.top=0,U.style.bottom=0,U.style.left=0,U.style.right=0,U.style.zIndex=0;var Y={h:L,w:K,regionH:null,regionW:null,imgResolver:I,displayForcedOnlyMode:T||!1,isd:A,errorHandler:W,previousISDState:O,enableRollUp:B||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null};M.appendChild(U);for(var oe in A.contents)o(Y,U,A.contents[oe]);return Y.currentISDState};function o(A,M,I){var D;if(I.kind==="region"?(D=document.createElement("div"),D.style.position="absolute"):I.kind==="body"||I.kind==="div"?D=document.createElement("div"):I.kind==="p"?D=document.createElement("p"):I.kind==="span"?D=document.createElement("span"):I.kind==="br"&&(D=document.createElement("br")),!D){N(A.errorHandler,"Error processing ISD element kind: "+I.kind);return}D.style.margin="0";for(var v in P){var T=P[v],W=I.styleAttrs[T.qname];W!==void 0&&T.map!==null&&T.map(A,D,I,W)}var O=D;if(I.kind==="region"){var B=I.styleAttrs[i.byName.writingMode.qname];B==="lrtb"||B==="lr"?(A.ipd="lr",A.bpd="tb"):B==="rltb"||B==="rl"?(A.ipd="rl",A.bpd="tb"):B==="tblr"?(A.ipd="tb",A.bpd="lr"):(B==="tbrl"||B==="tb")&&(A.ipd="tb",A.bpd="rl")}var L=I.styleAttrs[i.byName.linePadding.qname];if(L&&L>0){var K=Math.ceil(L*A.h)+"px";A.bpd==="tb"?(O.style.paddingLeft=K,O.style.paddingRight=K):(O.style.paddingTop=K,O.style.paddingBottom=K),A.lp=L}var x=I.styleAttrs[i.byName.multiRowAlign.qname];if(x&&x!=="auto"){var U=document.createElement("span");U.style.display="inline-block",U.style.textAlign=x,D.appendChild(U),O=U,A.mra=x}if(I.styleAttrs[i.byName.fillLineGap.qname]&&(A.flg=!0),I.kind==="span"&&I.text)if(A.lp||A.mra||A.flg)for(var Y="",oe=0;oe<I.text.length;oe++){Y+=I.text.charAt(oe);var ue=I.text.charCodeAt(oe);if(ue<55296||ue>56319||oe===I.text.length){var re=document.createElement("span");re.textContent=Y,D.appendChild(re),Y=""}}else D.textContent=I.text;M.appendChild(D);for(var ve in I.contents)o(A,O,I.contents[ve]);var ce=[];if((A.lp||A.mra||A.flg)&&I.kind==="p"&&(C(A,O,ce,null),A.mra&&(f(ce),A.mra=null),A.lp&&(n(ce,A.lp*A.h,A),A.lp=null),A.flg)){var se=_(O.getBoundingClientRect(),A);h(ce,se.before,se.after,A),A.flg=null}if(I.kind==="region"&&(C(A,O,ce),A.bpd==="tb"&&A.enableRollUp&&I.contents.length>0&&I.styleAttrs[i.byName.displayAlign.qname]==="after")){var J=I.id===""?"_":I.id,ee=new m(J,ce);if(A.currentISDState[ee.id]=ee,A.previousISDState&&ee.id in A.previousISDState&&A.previousISDState[ee.id].plist.length>0&&ee.plist.length>1&&ee.plist[ee.plist.length-2].text===A.previousISDState[ee.id].plist[A.previousISDState[ee.id].plist.length-1].text){var ie=D.firstElementChild,me=ee.plist[ee.plist.length-1].after-ee.plist[ee.plist.length-1].before;ie.style.bottom="-"+me+"px",ie.style.transition="transform 0.4s",ie.style.position="relative",ie.style.transform="translateY(-"+me+"px)"}}}function n(A,M,I){for(var D in A){var v=A[D].elements.length,T=A[D].elements[A[D].start_elem],W=A[D].elements[A[D].end_elem],O=Math.ceil(M)+"px",B="-"+Math.ceil(M)+"px";v!==0&&(I.ipd==="lr"?(T.node.style.borderLeftColor=T.bgcolor||"#00000000",T.node.style.borderLeftStyle="solid",T.node.style.borderLeftWidth=O,T.node.style.marginLeft=B):I.ipd==="rl"?(T.node.style.borderRightColor=T.bgcolor||"#00000000",T.node.style.borderRightStyle="solid",T.node.style.borderRightWidth=O,T.node.style.marginRight=B):I.ipd==="tb"&&(T.node.style.borderTopColor=T.bgcolor||"#00000000",T.node.style.borderTopStyle="solid",T.node.style.borderTopWidth=O,T.node.style.marginTop=B),I.ipd==="lr"?(W.node.style.borderRightColor=W.bgcolor||"#00000000",W.node.style.borderRightStyle="solid",W.node.style.borderRightWidth=O,W.node.style.marginRight=B):I.ipd==="rl"?(W.node.style.borderLeftColor=W.bgcolor||"#00000000",W.node.style.borderLeftStyle="solid",W.node.style.borderLeftWidth=O,W.node.style.marginLeft=B):I.ipd==="tb"&&(W.node.style.borderBottomColor=W.bgcolor||"#00000000",W.node.style.borderBottomStyle="solid",W.node.style.borderBottomWidth=O,W.node.style.marginBottom=B))}}function f(A){for(var M=0;M<A.length-1;M++){var I=A[M].elements.length;if(I!==0&&A[M].br===!1){var D=document.createElement("br"),v=A[M].elements[I-1].node;v.parentElement.insertBefore(D,v.nextSibling)}}}function h(A,M,I,D){for(var v=Math.sign(I-M),T=0;T<=A.length;T++){var W;T===0?W=M:T===A.length?W=I:W=(A[T].before+A[T-1].after)/2;var O,B;if(T>0)for(var L=0;L<A[T-1].elements.length;L++)A[T-1].elements[L].bgcolor!==null&&(B=A[T-1].elements[L],v*(B.after-W)<0&&(O=Math.ceil(Math.abs(W-B.after))+"px",B.node.style.backgroundColor=B.bgcolor,D.bpd==="lr"?B.node.style.paddingRight=O:D.bpd==="rl"?B.node.style.paddingLeft=O:D.bpd==="tb"&&(B.node.style.paddingBottom=O)));if(T<A.length)for(var K=0;K<A[T].elements.length;K++)B=A[T].elements[K],B.bgcolor!==null&&v*(B.before-W)>0&&(O=Math.ceil(Math.abs(B.before-W))+"px",B.node.style.backgroundColor=B.bgcolor,D.bpd==="lr"?B.node.style.paddingLeft=O:D.bpd==="rl"?B.node.style.paddingRight=O:D.bpd==="tb"&&(B.node.style.paddingTop=O))}}function m(A,M){this.id=A,this.plist=M}function u(A){for(var M=A.firstChild;M;){var I=M.nextSibling;M.nodeType===Node.ELEMENT_NODE&&M.localName==="span"&&(u(M),M.childElementCount===0&&M.textContent.length===0&&A.removeChild(M)),M=I}}function _(A,M){var I={before:null,after:null,start:null,end:null};return M.bpd==="tb"?(I.before=A.top,I.after=A.bottom,M.ipd==="lr"?(I.start=A.left,I.end=A.right):(I.start=A.right,I.end=A.left)):M.bpd==="lr"?(I.before=A.left,I.after=A.right,I.start=A.top,I.end=A.bottom):M.bpd==="rl"&&(I.before=A.right,I.after=A.left,I.start=A.top,I.end=A.bottom),I}function C(A,M,I,D){var v=M.style.backgroundColor||D;if(M.childElementCount===0)if(M.localName==="span"){var T=M.getBoundingClientRect();if(T.height===0||T.width===0)return;var W=_(T,A);if(I.length===0||!k(W.before,W.after,I[I.length-1].before,I[I.length-1].after))I.push({before:W.before,after:W.after,start:W.start,end:W.end,start_elem:0,end_elem:0,elements:[],text:"",br:!1});else{var O=Math.sign(W.after-W.before),B=Math.sign(W.end-W.start);O*(W.before-I[I.length-1].before)<0&&(I[I.length-1].before=W.before),O*(W.after-I[I.length-1].after)>0&&(I[I.length-1].after=W.after),B*(W.start-I[I.length-1].start)<0&&(I[I.length-1].start=W.start,I[I.length-1].start_elem=I[I.length-1].elements.length),B*(W.end-I[I.length-1].end)>0&&(I[I.length-1].end=W.end,I[I.length-1].end_elem=I[I.length-1].elements.length)}I[I.length-1].text+=M.textContent,I[I.length-1].elements.push({node:M,bgcolor:v,before:W.before,after:W.after})}else M.localName==="br"&&I.length!==0&&(I[I.length-1].br=!0);else for(var L=M.firstChild;L;)L.nodeType===Node.ELEMENT_NODE&&C(A,L,I,v),L=L.nextSibling}function k(A,M,I,D){return M<D&&A>I||D<=M&&I>=A}function R(A,M){this.qname=A,this.map=M}var P=[new R("http://www.w3.org/ns/ttml#styling backgroundColor",function(A,M,I,D){D[3]!==0&&(M.style.backgroundColor="rgba("+D[0].toString()+","+D[1].toString()+","+D[2].toString()+","+(D[3]/255).toString()+")")}),new R("http://www.w3.org/ns/ttml#styling color",function(A,M,I,D){M.style.color="rgba("+D[0].toString()+","+D[1].toString()+","+D[2].toString()+","+(D[3]/255).toString()+")"}),new R("http://www.w3.org/ns/ttml#styling direction",function(A,M,I,D){M.style.direction=D}),new R("http://www.w3.org/ns/ttml#styling display",function(A,M,I,D){}),new R("http://www.w3.org/ns/ttml#styling displayAlign",function(A,M,I,D){M.style.display="flex",M.style.flexDirection="column",D==="before"?M.style.justifyContent="flex-start":D==="center"?M.style.justifyContent="center":D==="after"&&(M.style.justifyContent="flex-end")}),new R("http://www.w3.org/ns/ttml#styling extent",function(A,M,I,D){A.regionH=D.h*A.h,A.regionW=D.w*A.w;var v=0,T=0,W=I.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];W&&(v=(W[0]+W[2])*A.h,T=(W[1]+W[3])*A.w),M.style.height=A.regionH-v+"px",M.style.width=A.regionW-T+"px"}),new R("http://www.w3.org/ns/ttml#styling fontFamily",function(A,M,I,D){var v=[];for(var T in D)D[T]==="monospaceSerif"?(v.push("Courier New"),v.push('"Liberation Mono"'),v.push("Courier"),v.push("monospace")):D[T]==="proportionalSansSerif"?(v.push("Arial"),v.push("Helvetica"),v.push('"Liberation Sans"'),v.push("sans-serif")):D[T]==="monospace"?v.push("monospace"):D[T]==="sansSerif"?v.push("sans-serif"):D[T]==="serif"?v.push("serif"):D[T]==="monospaceSansSerif"?(v.push("Consolas"),v.push("monospace")):D[T]==="proportionalSerif"?v.push("serif"):v.push(D[T]);M.style.fontFamily=v.join(",")}),new R("http://www.w3.org/ns/ttml#styling fontSize",function(A,M,I,D){M.style.fontSize=D*A.h+"px"}),new R("http://www.w3.org/ns/ttml#styling fontStyle",function(A,M,I,D){M.style.fontStyle=D}),new R("http://www.w3.org/ns/ttml#styling fontWeight",function(A,M,I,D){M.style.fontWeight=D}),new R("http://www.w3.org/ns/ttml#styling lineHeight",function(A,M,I,D){D==="normal"?M.style.lineHeight="normal":M.style.lineHeight=D*A.h+"px"}),new R("http://www.w3.org/ns/ttml#styling opacity",function(A,M,I,D){M.style.opacity=D}),new R("http://www.w3.org/ns/ttml#styling origin",function(A,M,I,D){M.style.top=D.h*A.h+"px",M.style.left=D.w*A.w+"px"}),new R("http://www.w3.org/ns/ttml#styling overflow",function(A,M,I,D){M.style.overflow=D}),new R("http://www.w3.org/ns/ttml#styling padding",function(A,M,I,D){var v=[];v[0]=D[0]*A.h+"px",v[1]=D[3]*A.w+"px",v[2]=D[2]*A.h+"px",v[3]=D[1]*A.w+"px",M.style.padding=v.join(" ")}),new R("http://www.w3.org/ns/ttml#styling showBackground",null),new R("http://www.w3.org/ns/ttml#styling textAlign",function(A,M,I,D){var v,T=I.styleAttrs[i.byName.direction.qname];D==="start"?v=T==="rtl"?"right":"left":D==="end"?v=T==="rtl"?"left":"right":v=D,M.style.textAlign=v}),new R("http://www.w3.org/ns/ttml#styling textDecoration",function(A,M,I,D){M.style.textDecoration=D.join(" ").replace("lineThrough","line-through")}),new R("http://www.w3.org/ns/ttml#styling textOutline",function(A,M,I,D){D==="none"?M.style.textShadow="":M.style.textShadow="rgba("+D.color[0].toString()+","+D.color[1].toString()+","+D.color[2].toString()+","+(D.color[3]/255).toString()+") 0px 0px "+D.thickness*A.h+"px"}),new R("http://www.w3.org/ns/ttml#styling unicodeBidi",function(A,M,I,D){var v;D==="bidiOverride"?v="bidi-override":v=D,M.style.unicodeBidi=v}),new R("http://www.w3.org/ns/ttml#styling visibility",function(A,M,I,D){M.style.visibility=D}),new R("http://www.w3.org/ns/ttml#styling wrapOption",function(A,M,I,D){D==="wrap"?I.space==="preserve"?M.style.whiteSpace="pre-wrap":M.style.whiteSpace="normal":I.space==="preserve"?M.style.whiteSpace="pre":M.style.whiteSpace="noWrap"}),new R("http://www.w3.org/ns/ttml#styling writingMode",function(A,M,I,D){D==="lrtb"||D==="lr"||D==="rltb"||D==="rl"?M.style.writingMode="horizontal-tb":D==="tblr"?M.style.writingMode="vertical-lr":(D==="tbrl"||D==="tb")&&(M.style.writingMode="vertical-rl")}),new R("http://www.w3.org/ns/ttml#styling zIndex",function(A,M,I,D){M.style.zIndex=D}),new R("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt backgroundImage",function(A,M,I,D){if(A.imgResolver!==null&&D!==null){var v=document.createElement("img"),T=A.imgResolver(D,v);T&&(v.src=T),v.height=A.regionH,v.width=A.regionW,M.appendChild(v)}}),new R("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(A,M,I,D){A.displayForcedOnlyMode&&D===!1&&(M.style.visibility="hidden")})],w={};for(var H in P)w[P[H].qname]=P[H];function N(A,M){if(A&&A.error&&A.error(M))throw M}})(typeof r=="undefined"?this.imscHTML={}:r,typeof imscNames=="undefined"?e(18):imscNames,typeof imscStyles=="undefined"?e(19):imscStyles)},{"18":18,"19":19}],16:[function(e,g,r){(function(t,p,i){t.generateISD=function(R,P,w){var H=new h(R),N={};for(var A in R.head.layout.regions){var M=o(R,P,R.head.layout.regions[A],R.body,null,"",R.head.layout.regions[A],w,N);M!==null&&H.contents.push(M.element)}return H};function o(R,P,w,H,N,A,M,I,D){if(P<M.begin||P>=M.end)return null;var v="regionID"in M&&M.regionID!==""?M.regionID:A;if(N!==null&&v!==w.id&&(!("contents"in M)||"contents"in M&&M.contents.length===0||v!==""))return null;var T=new m(M);for(var W in M.sets)P<M.sets[W].begin||P>=M.sets[W].end||(T.styleAttrs[M.sets[W].qname]=M.sets[W].value);var O={};for(var B in T.styleAttrs)if(O[B]=!0,B===i.byName.writingMode.qname&&!(i.byName.direction.qname in T.styleAttrs)){var L=T.styleAttrs[B];L==="lrtb"||L==="lr"?T.styleAttrs[i.byName.direction.qname]="ltr":(L==="rltb"||L==="rl")&&(T.styleAttrs[i.byName.direction.qname]="rtl")}if(N!==null)for(var K in i.all){var x=i.all[K];if(x.qname===i.byName.textDecoration.qname){var U=N.styleAttrs[x.qname],Y=T.styleAttrs[x.qname],oe=[];Y===void 0?oe=U:Y.indexOf("none")===-1?((Y.indexOf("noUnderline")===-1&&U.indexOf("underline")!==-1||Y.indexOf("underline")!==-1)&&oe.push("underline"),(Y.indexOf("noLineThrough")===-1&&U.indexOf("lineThrough")!==-1||Y.indexOf("lineThrough")!==-1)&&oe.push("lineThrough"),(Y.indexOf("noOverline")===-1&&U.indexOf("overline")!==-1||Y.indexOf("overline")!==-1)&&oe.push("overline")):oe.push("none"),T.styleAttrs[x.qname]=oe}else x.inherit&&x.qname in N.styleAttrs&&!(x.qname in T.styleAttrs)&&(T.styleAttrs[x.qname]=N.styleAttrs[x.qname])}for(var ue in i.all){var re=i.all[ue];re.qname in T.styleAttrs||(T.kind==="region"||re.inherit===!1&&re.initial!==null)&&(T.styleAttrs[re.qname]=re.parse(re.initial),O[re.qname]=!0)}for(var ve in i.all){var ce=i.all[ve];if(ce.qname in O&&ce.compute!==null){var se=ce.compute(R,N,T,T.styleAttrs[ce.qname],D);se!==null?T.styleAttrs[ce.qname]=se:C(I,"Style '"+ce.qname+"' on element '"+T.kind+"' cannot be computed")}}if(T.styleAttrs[i.byName.display.qname]==="none")return null;var J;N===null?H===null?J=[]:J=[H]:"contents"in M&&(J=M.contents);for(var ee in J){var ie=o(R,P,w,H,T,v,J[ee],I,D);ie!==null&&T.contents.push(ie.element)}for(var me in T.styleAttrs){var de=i.byQName[me];de.applies.indexOf(T.kind)===-1&&delete T.styleAttrs[me]}if(T.kind==="span"&&T.text&&T.space==="default"){var Q=T.text.replace(/\s+/g," ");T.text=Q}if(T.kind==="p"){var X=[];n(T,X);for(var j=0,le="after_br",G=0;;)if(le==="after_br")j>=X.length||X[j].kind==="br"?(le="before_br",G=j,j--):(X[j].space!=="preserve"&&(X[j].text=X[j].text.replace(/^\s+/g,"")),X[j].text.length>0?(le="looking_br",j++):X.splice(j,1));else if(le==="before_br")if(j<0||X[j].kind==="br"){if(le="after_br",j=G+1,j>=X.length)break}else if(X[j].space!=="preserve"&&(X[j].text=X[j].text.replace(/\s+$/g,"")),X[j].text.length>0){if(le="after_br",j=G+1,j>=X.length)break}else X.splice(j,1),j--;else j>=X.length||X[j].kind==="br"?(le="before_br",G=j,j--):j++;f(T)}return T.kind==="div"&&i.byName.backgroundImage.qname in T.styleAttrs||T.kind==="br"||"contents"in T&&T.contents.length>0||T.kind==="span"&&T.text!==null||T.kind==="region"&&T.styleAttrs[i.byName.showBackground.qname]==="always"?{region_id:v,element:T}:null}function n(R,P){if("contents"in R)for(var w in R.contents)n(R.contents[w],P);else P.push(R)}function f(R){if(R.kind==="br")return!1;if("text"in R)return R.text.length===0;if("contents"in R){for(var P=R.contents.length;P--;)f(R.contents[P])&&R.contents.splice(P,1);return R.contents.length===0}}function h(R){this.contents=[],this.aspectRatio=R.aspectRatio}function m(R){this.kind=R.kind||"region",R.id&&(this.id=R.id),this.styleAttrs={};for(var P in R.styleAttrs)this.styleAttrs[P]=R.styleAttrs[P];"text"in R?this.text=R.text:R.kind!=="br"&&(this.contents=[]),"space"in R&&(this.space=R.space)}function u(R,P){if(R&&R.info&&R.info(P))throw P}function _(R,P){if(R&&R.warn&&R.warn(P))throw P}function C(R,P){if(R&&R.error&&R.error(P))throw P}function k(R,P){throw R&&R.fatal&&R.fatal(P),P}})(typeof r=="undefined"?this.imscISD={}:r,typeof imscNames=="undefined"?e(18):imscNames,typeof imscStyles=="undefined"?e(19):imscStyles)},{"18":18,"19":19}],17:[function(e,g,r){r.generateISD=e(16).generateISD,r.fromXML=e(14).fromXML,r.renderHTML=e(15).render},{"14":14,"15":15,"16":16}],18:[function(e,g,r){(function(t){t.ns_tt="http://www.w3.org/ns/ttml",t.ns_tts="http://www.w3.org/ns/ttml#styling",t.ns_ttp="http://www.w3.org/ns/ttml#parameter",t.ns_xml="http://www.w3.org/XML/1998/namespace",t.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",t.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",t.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",t.ns_ebutts="urn:ebu:tt:style"})(typeof r=="undefined"?this.imscNames={}:r)},{}],19:[function(e,g,r){(function(t,p,i){function o(h,m,u,_,C,k,R,P){this.name=m,this.ns=h,this.qname=h+" "+m,this.inherit=C,this.animatable=k,this.initial=u,this.applies=_,this.parse=R,this.compute=P}t.all=[new o(p.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,i.parseColor,null),new o(p.ns_tts,"color","white",["span"],!0,!0,i.parseColor,null),new o(p.ns_tts,"direction","ltr",["p","span"],!0,!0,function(h){return h},null),new o(p.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(h){return h},null),new o(p.ns_tts,"displayAlign","before",["region"],!1,!0,function(h){return h},null),new o(p.ns_tts,"extent","auto",["tt","region"],!1,!0,function(h){if(h==="auto")return h;var m=h.split(" ");if(m.length!==2)return null;var u=i.parseLength(m[0]),_=i.parseLength(m[1]);return!_||!u?null:{h:_,w:u}},function(h,m,u,_,C){var k,R;if(_==="auto")k=1;else if(_.h.unit==="%")k=_.h.value/100;else if(_.h.unit==="px")k=_.h.value/h.pxDimensions.h;else return null;if(_==="auto")R=1;else if(_.w.unit==="%")R=_.w.value/100;else if(_.w.unit==="px")R=_.w.value/h.pxDimensions.w;else return null;return{h:k,w:R}}),new o(p.ns_tts,"fontFamily","default",["span"],!0,!0,function(h){var m=h.split(","),u=[];for(var _ in m)m[_].charAt(0)!=="'"&&m[_].charAt(0)!=='"'&&m[_]==="default"?u.push("monospaceSerif"):u.push(m[_]);return u},null),new o(p.ns_tts,"fontSize","1c",["span"],!0,!0,i.parseLength,function(h,m,u,_,C){var k;if(_.unit==="%")m!==null?k=m.styleAttrs[t.byName.fontSize.qname]*_.value/100:k=_.value/100/h.cellResolution.h;else if(_.unit==="em")m!==null?k=m.styleAttrs[t.byName.fontSize.qname]*_.value:k=_.value/h.cellResolution.h;else if(_.unit==="c")k=_.value/h.cellResolution.h;else if(_.unit==="px")k=_.value/h.pxDimensions.h;else return null;return k}),new o(p.ns_tts,"fontStyle","normal",["span"],!0,!0,function(h){return h},null),new o(p.ns_tts,"fontWeight","normal",["span"],!0,!0,function(h){return h},null),new o(p.ns_tts,"lineHeight","normal",["p"],!0,!0,function(h){return h==="normal"?h:i.parseLength(h)},function(h,m,u,_,C){var k;if(_==="normal")k=_;else if(_.unit==="%")k=u.styleAttrs[t.byName.fontSize.qname]*_.value/100;else if(_.unit==="em")k=u.styleAttrs[t.byName.fontSize.qname]*_.value;else if(_.unit==="c")k=_.value/h.cellResolution.h;else if(_.unit==="px")k=_.value/h.pxDimensions.h;else return null;return k}),new o(p.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new o(p.ns_tts,"origin","auto",["region"],!1,!0,function(h){if(h==="auto")return h;var m=h.split(" ");if(m.length!==2)return null;var u=i.parseLength(m[0]),_=i.parseLength(m[1]);return!_||!u?null:{h:_,w:u}},function(h,m,u,_,C){var k,R;if(_==="auto")k=0;else if(_.h.unit==="%")k=_.h.value/100;else if(_.h.unit==="px")k=_.h.value/h.pxDimensions.h;else return null;if(_==="auto")R=0;else if(_.w.unit==="%")R=_.w.value/100;else if(_.w.unit==="px")R=_.w.value/h.pxDimensions.w;else return null;return{h:k,w:R}}),new o(p.ns_tts,"overflow","hidden",["region"],!1,!0,function(h){return h},null),new o(p.ns_tts,"padding","0px",["region"],!1,!0,function(h){var m=h.split(" ");if(m.length>4)return null;var u=[];for(var _ in m){var C=i.parseLength(m[_]);if(!C)return null;u.push(C)}return u},function(h,m,u,_,C){var k;if(_.length===1)k=[_[0],_[0],_[0],_[0]];else if(_.length===2)k=[_[0],_[1],_[0],_[1]];else if(_.length===3)k=[_[0],_[1],_[2],_[1]];else if(_.length===4)k=[_[0],_[1],_[2],_[3]];else return null;var R=u.styleAttrs[t.byName.writingMode.qname];if(R==="lrtb"||R==="lr")k=[k[0],k[3],k[2],k[1]];else if(R==="rltb"||R==="rl")k=[k[0],k[1],k[2],k[3]];else if(R==="tblr")k=[k[3],k[0],k[1],k[2]];else if(R==="tbrl"||R==="tb")k=[k[3],k[2],k[1],k[0]];else return null;var P=[];for(var w in k)if(k[w].value===0)P[w]=0;else if(k[w].unit==="%")w==="0"||w==="2"?P[w]=u.styleAttrs[t.byName.extent.qname].h*k[w].value/100:P[w]=u.styleAttrs[t.byName.extent.qname].w*k[w].value/100;else if(k[w].unit==="em")P[w]=u.styleAttrs[t.byName.fontSize.qname]*k[w].value;else if(k[w].unit==="c")P[w]=k[w].value/h.cellResolution.h;else if(k[w].unit==="px")w==="0"||w==="2"?P[w]=k[w].value/h.pxDimensions.h:P[w]=k[w].value/h.pxDimensions.w;else return null;return P}),new o(p.ns_tts,"showBackground","always",["region"],!1,!0,function(h){return h},null),new o(p.ns_tts,"textAlign","start",["p"],!0,!0,function(h){return h},function(h,m,u,_,C){return _==="left"?"start":_==="right"?"end":_}),new o(p.ns_tts,"textDecoration","none",["span"],!0,!0,function(h){return h.split(" ")},null),new o(p.ns_tts,"textOutline","none",["span"],!0,!0,function(h){if(h==="none")return h;var m={},u=h.split(" ");if(u.length===0||u.length>2)return null;var _=i.parseColor(u[0]);if(m.color=_,_!==null&&u.shift(),u.length!==1)return null;var C=i.parseLength(u[0]);return C?(m.thickness=C,m):null},function(h,m,u,_,C){if(_==="none")return _;var k={};if(_.color===null?k.color=u.styleAttrs[t.byName.color.qname]:k.color=_.color,_.thickness.unit==="%")k.thickness=u.styleAttrs[t.byName.fontSize.qname]*_.thickness.value/100;else if(_.thickness.unit==="em")k.thickness=u.styleAttrs[t.byName.fontSize.qname]*_.thickness.value;else if(_.thickness.unit==="c")k.thickness=_.thickness.value/h.cellResolution.h;else if(_.thickness.unit==="px")k.thickness=_.thickness.value/h.pxDimensions.h;else return null;return k}),new o(p.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(h){return h},null),new o(p.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(h){return h},null),new o(p.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(h){return h},null),new o(p.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(h){return h},null),new o(p.ns_tts,"zIndex","auto",["region"],!1,!0,function(h){var m;return h==="auto"?m=h:(m=parseInt(h),isNaN(m)&&(m=null)),m},null),new o(p.ns_ebutts,"linePadding","0c",["p"],!0,!1,i.parseLength,function(h,m,u,_,C){return _.unit==="c"?_.value/h.cellResolution.h:null}),new o(p.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(h){return h},null),new o(p.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(h){return h},null),new o(p.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(h){return h==="true"},null),new o(p.ns_itts,"fillLineGap","false",["p"],!0,!0,function(h){return h==="true"},null)],t.byQName={};for(var n in t.all)t.byQName[t.all[n].qname]=t.all[n];t.byName={};for(var f in t.all)t.byName[t.all[f].name]=t.all[f]})(typeof r=="undefined"?this.imscStyles={}:r,typeof imscNames=="undefined"?e(18):imscNames,typeof imscUtils=="undefined"?e(20):imscUtils)},{"18":18,"20":20}],20:[function(e,g,r){(function(t){var p=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,i=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,o=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,n={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};t.parseColor=function(h){var m,u=null,_=n[h.toLowerCase()];return _!==void 0?u=_:(m=p.exec(h))!==null?u=[parseInt(m[1],16),parseInt(m[2],16),parseInt(m[3],16),m[4]!==void 0?parseInt(m[4],16):255]:(m=i.exec(h))!==null?u=[parseInt(m[1]),parseInt(m[2]),parseInt(m[3]),255]:(m=o.exec(h))!==null&&(u=[parseInt(m[1]),parseInt(m[2]),parseInt(m[3]),parseInt(m[4])]),u};var f=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%)$/;t.parseLength=function(h){var m,u=null;return(m=f.exec(h))!==null&&(u={value:parseFloat(m[1]),unit:m[2]}),u}})(typeof r=="undefined"?this.imscUtils={}:r)},{}],21:[function(e,g,r){typeof Object.create=="function"?g.exports=function(p,i){p.super_=i,p.prototype=Object.create(i.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})}:g.exports=function(p,i){p.super_=i;var o=function(){};o.prototype=i.prototype,p.prototype=new o,p.prototype.constructor=p}},{}],22:[function(e,g,r){g.exports=function(i){return i!=null&&(t(i)||p(i)||!!i._isBuffer)};function t(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function p(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&t(i.slice(0,0))}},{}],23:[function(e,g,r){var t={}.toString;g.exports=Array.isArray||function(p){return t.call(p)=="[object Array]"}},{}],24:[function(e,g,r){(function(t){"use strict";!t.version||t.version.indexOf("v0.")===0||t.version.indexOf("v1.")===0&&t.version.indexOf("v1.8.")!==0?g.exports={nextTick:p}:g.exports=t;function p(i,o,n,f){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var h=arguments.length,m,u;switch(h){case 0:case 1:return t.nextTick(i);case 2:return t.nextTick(function(){i.call(null,o)});case 3:return t.nextTick(function(){i.call(null,o,n)});case 4:return t.nextTick(function(){i.call(null,o,n,f)});default:for(m=new Array(h-1),u=0;u<m.length;)m[u++]=arguments[u];return t.nextTick(function(){i.apply(null,m)})}}}).call(this,e(25))},{"25":25}],25:[function(e,g,r){var t=g.exports={},p,i;function o(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?p=setTimeout:p=o}catch(H){p=o}try{typeof clearTimeout=="function"?i=clearTimeout:i=n}catch(H){i=n}})();function f(H){if(p===setTimeout)return setTimeout(H,0);if((p===o||!p)&&setTimeout)return p=setTimeout,setTimeout(H,0);try{return p(H,0)}catch(N){try{return p.call(null,H,0)}catch(A){return p.call(this,H,0)}}}function h(H){if(i===clearTimeout)return clearTimeout(H);if((i===n||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(H);try{return i(H)}catch(N){try{return i.call(null,H)}catch(A){return i.call(this,H)}}}var m=[],u=!1,_,C=-1;function k(){!u||!_||(u=!1,_.length?m=_.concat(m):C=-1,m.length&&R())}function R(){if(!u){var H=f(k);u=!0;for(var N=m.length;N;){for(_=m,m=[];++C<N;)_&&_[C].run();C=-1,N=m.length}_=null,u=!1,h(H)}}t.nextTick=function(H){var N=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)N[A-1]=arguments[A];m.push(new P(H,N)),m.length===1&&!u&&f(R)};function P(H,N){this.fun=H,this.array=N}P.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function w(){}t.on=w,t.addListener=w,t.once=w,t.off=w,t.removeListener=w,t.removeAllListeners=w,t.emit=w,t.prependListener=w,t.prependOnceListener=w,t.listeners=function(H){return[]},t.binding=function(H){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(H){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],26:[function(e,g,r){g.exports=e(27)},{"27":27}],27:[function(e,g,r){"use strict";var t=e(24),p=Object.keys||function(k){var R=[];for(var P in k)R.push(P);return R};g.exports=u;var i=e(10);i.inherits=e(21);var o=e(29),n=e(31);i.inherits(u,o);for(var f=p(n.prototype),h=0;h<f.length;h++){var m=f[h];u.prototype[m]||(u.prototype[m]=n.prototype[m])}function u(k){if(!(this instanceof u))return new u(k);o.call(this,k),n.call(this,k),k&&k.readable===!1&&(this.readable=!1),k&&k.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,k&&k.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _(){this.allowHalfOpen||this._writableState.ended||t.nextTick(C,this)}function C(k){k.end()}Object.defineProperty(u.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(k){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=k,this._writableState.destroyed=k)}}),u.prototype._destroy=function(k,R){this.push(null),this.end(),t.nextTick(R,k)}},{"10":10,"21":21,"24":24,"29":29,"31":31}],28:[function(e,g,r){"use strict";g.exports=i;var t=e(30),p=e(10);p.inherits=e(21),p.inherits(i,t);function i(o){if(!(this instanceof i))return new i(o);t.call(this,o)}i.prototype._transform=function(o,n,f){f(null,o)}},{"10":10,"21":21,"30":30}],29:[function(e,g,r){(function(t,p){"use strict";var i=e(24);g.exports=v;var o=e(23),n;v.ReadableState=D;var f=e(11).EventEmitter,h=function(G,c){return G.listeners(c).length},m=e(34),u=e(39).Buffer,_=p.Uint8Array||function(){};function C(G){return u.from(G)}function k(G){return u.isBuffer(G)||G instanceof _}var R=e(10);R.inherits=e(21);var P=e(7),w=void 0;P&&P.debuglog?w=P.debuglog("stream"):w=function(){};var H=e(32),N=e(33),A;R.inherits(v,m);var M=["error","close","destroy","pause","resume"];function I(G,c,E){if(typeof G.prependListener=="function")return G.prependListener(c,E);!G._events||!G._events[c]?G.on(c,E):o(G._events[c])?G._events[c].unshift(E):G._events[c]=[E,G._events[c]]}function D(G,c){n=n||e(27),G=G||{};var E=c instanceof n;this.objectMode=!!G.objectMode,E&&(this.objectMode=this.objectMode||!!G.readableObjectMode);var b=G.highWaterMark,l=G.readableHighWaterMark,d=this.objectMode?16:16*1024;b||b===0?this.highWaterMark=b:E&&(l||l===0)?this.highWaterMark=l:this.highWaterMark=d,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new H,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=G.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,G.encoding&&(A||(A=e(42).StringDecoder),this.decoder=new A(G.encoding),this.encoding=G.encoding)}function v(G){if(n=n||e(27),!(this instanceof v))return new v(G);this._readableState=new D(G,this),this.readable=!0,G&&(typeof G.read=="function"&&(this._read=G.read),typeof G.destroy=="function"&&(this._destroy=G.destroy)),m.call(this)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(G){!this._readableState||(this._readableState.destroyed=G)}}),v.prototype.destroy=N.destroy,v.prototype._undestroy=N.undestroy,v.prototype._destroy=function(G,c){this.push(null),c(G)},v.prototype.push=function(G,c){var E=this._readableState,b;return E.objectMode?b=!0:typeof G=="string"&&(c=c||E.defaultEncoding,c!==E.encoding&&(G=u.from(G,c),c=""),b=!0),T(this,G,c,!1,b)},v.prototype.unshift=function(G){return T(this,G,null,!0,!1)};function T(G,c,E,b,l){var d=G._readableState;if(c===null)d.reading=!1,U(G,d);else{var y;l||(y=O(d,c)),y?G.emit("error",y):d.objectMode||c&&c.length>0?(typeof c!="string"&&!d.objectMode&&Object.getPrototypeOf(c)!==u.prototype&&(c=C(c)),b?d.endEmitted?G.emit("error",new Error("stream.unshift() after end event")):W(G,d,c,!0):d.ended?G.emit("error",new Error("stream.push() after EOF")):(d.reading=!1,d.decoder&&!E?(c=d.decoder.write(c),d.objectMode||c.length!==0?W(G,d,c,!1):ue(G,d)):W(G,d,c,!1))):b||(d.reading=!1)}return B(d)}function W(G,c,E,b){c.flowing&&c.length===0&&!c.sync?(G.emit("data",E),G.read(0)):(c.length+=c.objectMode?1:E.length,b?c.buffer.unshift(E):c.buffer.push(E),c.needReadable&&Y(G)),ue(G,c)}function O(G,c){var E;return!k(c)&&typeof c!="string"&&c!==void 0&&!G.objectMode&&(E=new TypeError("Invalid non-string/buffer chunk")),E}function B(G){return!G.ended&&(G.needReadable||G.length<G.highWaterMark||G.length===0)}v.prototype.isPaused=function(){return this._readableState.flowing===!1},v.prototype.setEncoding=function(G){return A||(A=e(42).StringDecoder),this._readableState.decoder=new A(G),this._readableState.encoding=G,this};var L=8388608;function K(G){return G>=L?G=L:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G}function x(G,c){return G<=0||c.length===0&&c.ended?0:c.objectMode?1:G!==G?c.flowing&&c.length?c.buffer.head.data.length:c.length:(G>c.highWaterMark&&(c.highWaterMark=K(G)),G<=c.length?G:c.ended?c.length:(c.needReadable=!0,0))}v.prototype.read=function(G){w("read",G),G=parseInt(G,10);var c=this._readableState,E=G;if(G!==0&&(c.emittedReadable=!1),G===0&&c.needReadable&&(c.length>=c.highWaterMark||c.ended))return w("read: emitReadable",c.length,c.ended),c.length===0&&c.ended?X(this):Y(this),null;if(G=x(G,c),G===0&&c.ended)return c.length===0&&X(this),null;var b=c.needReadable;w("need readable",b),(c.length===0||c.length-G<c.highWaterMark)&&(b=!0,w("length less than watermark",b)),c.ended||c.reading?(b=!1,w("reading or ended",b)):b&&(w("do read"),c.reading=!0,c.sync=!0,c.length===0&&(c.needReadable=!0),this._read(c.highWaterMark),c.sync=!1,c.reading||(G=x(E,c)));var l;return G>0?l=ie(G,c):l=null,l===null?(c.needReadable=!0,G=0):c.length-=G,c.length===0&&(c.ended||(c.needReadable=!0),E!==G&&c.ended&&X(this)),l!==null&&this.emit("data",l),l};function U(G,c){if(!c.ended){if(c.decoder){var E=c.decoder.end();E&&E.length&&(c.buffer.push(E),c.length+=c.objectMode?1:E.length)}c.ended=!0,Y(G)}}function Y(G){var c=G._readableState;c.needReadable=!1,c.emittedReadable||(w("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?i.nextTick(oe,G):oe(G))}function oe(G){w("emit readable"),G.emit("readable"),ee(G)}function ue(G,c){c.readingMore||(c.readingMore=!0,i.nextTick(re,G,c))}function re(G,c){for(var E=c.length;!c.reading&&!c.flowing&&!c.ended&&c.length<c.highWaterMark&&(w("maybeReadMore read 0"),G.read(0),E!==c.length);)E=c.length;c.readingMore=!1}v.prototype._read=function(G){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(G,c){var E=this,b=this._readableState;switch(b.pipesCount){case 0:b.pipes=G;break;case 1:b.pipes=[b.pipes,G];break;default:b.pipes.push(G);break}b.pipesCount+=1,w("pipe count=%d opts=%j",b.pipesCount,c);var l=(!c||c.end!==!1)&&G!==t.stdout&&G!==t.stderr,d=l?V:_e;b.endEmitted?i.nextTick(d):E.once("end",d),G.on("unpipe",y);function y(pe,De){w("onunpipe"),pe===E&&De&&De.hasUnpiped===!1&&(De.hasUnpiped=!0,ae())}function V(){w("onend"),G.end()}var te=ve(E);G.on("drain",te);var $=!1;function ae(){w("cleanup"),G.removeListener("close",he),G.removeListener("finish",ye),G.removeListener("drain",te),G.removeListener("error",Ie),G.removeListener("unpipe",y),E.removeListener("end",V),E.removeListener("end",_e),E.removeListener("data",Se),$=!0,b.awaitDrain&&(!G._writableState||G._writableState.needDrain)&&te()}var ne=!1;E.on("data",Se);function Se(pe){w("ondata"),ne=!1;var De=G.write(pe);De===!1&&!ne&&((b.pipesCount===1&&b.pipes===G||b.pipesCount>1&&le(b.pipes,G)!==-1)&&!$&&(w("false write response, pause",E._readableState.awaitDrain),E._readableState.awaitDrain++,ne=!0),E.pause())}function Ie(pe){w("onerror",pe),_e(),G.removeListener("error",Ie),h(G,"error")===0&&G.emit("error",pe)}I(G,"error",Ie);function he(){G.removeListener("finish",ye),_e()}G.once("close",he);function ye(){w("onfinish"),G.removeListener("close",he),_e()}G.once("finish",ye);function _e(){w("unpipe"),E.unpipe(G)}return G.emit("pipe",E),b.flowing||(w("pipe resume"),E.resume()),G};function ve(G){return function(){var c=G._readableState;w("pipeOnDrain",c.awaitDrain),c.awaitDrain&&c.awaitDrain--,c.awaitDrain===0&&h(G,"data")&&(c.flowing=!0,ee(G))}}v.prototype.unpipe=function(G){var c=this._readableState,E={hasUnpiped:!1};if(c.pipesCount===0)return this;if(c.pipesCount===1)return G&&G!==c.pipes?this:(G||(G=c.pipes),c.pipes=null,c.pipesCount=0,c.flowing=!1,G&&G.emit("unpipe",this,E),this);if(!G){var b=c.pipes,l=c.pipesCount;c.pipes=null,c.pipesCount=0,c.flowing=!1;for(var d=0;d<l;d++)b[d].emit("unpipe",this,E);return this}var y=le(c.pipes,G);return y===-1?this:(c.pipes.splice(y,1),c.pipesCount-=1,c.pipesCount===1&&(c.pipes=c.pipes[0]),G.emit("unpipe",this,E),this)},v.prototype.on=function(G,c){var E=m.prototype.on.call(this,G,c);if(G==="data")this._readableState.flowing!==!1&&this.resume();else if(G==="readable"){var b=this._readableState;!b.endEmitted&&!b.readableListening&&(b.readableListening=b.needReadable=!0,b.emittedReadable=!1,b.reading?b.length&&Y(this):i.nextTick(ce,this))}return E},v.prototype.addListener=v.prototype.on;function ce(G){w("readable nexttick read 0"),G.read(0)}v.prototype.resume=function(){var G=this._readableState;return G.flowing||(w("resume"),G.flowing=!0,se(this,G)),this};function se(G,c){c.resumeScheduled||(c.resumeScheduled=!0,i.nextTick(J,G,c))}function J(G,c){c.reading||(w("resume read 0"),G.read(0)),c.resumeScheduled=!1,c.awaitDrain=0,G.emit("resume"),ee(G),c.flowing&&!c.reading&&G.read(0)}v.prototype.pause=function(){return w("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(w("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ee(G){var c=G._readableState;for(w("flow",c.flowing);c.flowing&&G.read()!==null;);}v.prototype.wrap=function(G){var c=this,E=this._readableState,b=!1;G.on("end",function(){if(w("wrapped end"),E.decoder&&!E.ended){var y=E.decoder.end();y&&y.length&&c.push(y)}c.push(null)}),G.on("data",function(y){if(w("wrapped data"),E.decoder&&(y=E.decoder.write(y)),!(E.objectMode&&y==null)&&!(!E.objectMode&&(!y||!y.length))){var V=c.push(y);V||(b=!0,G.pause())}});for(var l in G)this[l]===void 0&&typeof G[l]=="function"&&(this[l]=function(y){return function(){return G[y].apply(G,arguments)}}(l));for(var d=0;d<M.length;d++)G.on(M[d],this.emit.bind(this,M[d]));return this._read=function(y){w("wrapped _read",y),b&&(b=!1,G.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=ie;function ie(G,c){if(c.length===0)return null;var E;return c.objectMode?E=c.buffer.shift():!G||G>=c.length?(c.decoder?E=c.buffer.join(""):c.buffer.length===1?E=c.buffer.head.data:E=c.buffer.concat(c.length),c.buffer.clear()):E=me(G,c.buffer,c.decoder),E}function me(G,c,E){var b;return G<c.head.data.length?(b=c.head.data.slice(0,G),c.head.data=c.head.data.slice(G)):G===c.head.data.length?b=c.shift():b=E?de(G,c):Q(G,c),b}function de(G,c){var E=c.head,b=1,l=E.data;for(G-=l.length;E=E.next;){var d=E.data,y=G>d.length?d.length:G;if(y===d.length?l+=d:l+=d.slice(0,G),G-=y,G===0){y===d.length?(++b,E.next?c.head=E.next:c.head=c.tail=null):(c.head=E,E.data=d.slice(y));break}++b}return c.length-=b,l}function Q(G,c){var E=u.allocUnsafe(G),b=c.head,l=1;for(b.data.copy(E),G-=b.data.length;b=b.next;){var d=b.data,y=G>d.length?d.length:G;if(d.copy(E,E.length-G,0,y),G-=y,G===0){y===d.length?(++l,b.next?c.head=b.next:c.head=c.tail=null):(c.head=b,b.data=d.slice(y));break}++l}return c.length-=l,E}function X(G){var c=G._readableState;if(c.length>0)throw new Error('"endReadable()" called on non-empty stream');c.endEmitted||(c.ended=!0,i.nextTick(j,c,G))}function j(G,c){!G.endEmitted&&G.length===0&&(G.endEmitted=!0,c.readable=!1,c.emit("end"))}function le(G,c){for(var E=0,b=G.length;E<b;E++)if(G[E]===c)return E;return-1}}).call(this,e(25),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"10":10,"11":11,"21":21,"23":23,"24":24,"25":25,"27":27,"32":32,"33":33,"34":34,"39":39,"42":42,"7":7}],30:[function(e,g,r){"use strict";g.exports=o;var t=e(27),p=e(10);p.inherits=e(21),p.inherits(o,t);function i(h,m){var u=this._transformState;u.transforming=!1;var _=u.writecb;if(!_)return this.emit("error",new Error("write callback called multiple times"));u.writechunk=null,u.writecb=null,m!=null&&this.push(m),_(h);var C=this._readableState;C.reading=!1,(C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}function o(h){if(!(this instanceof o))return new o(h);t.call(this,h),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",n)}function n(){var h=this;typeof this._flush=="function"?this._flush(function(m,u){f(h,m,u)}):f(this,null,null)}o.prototype.push=function(h,m){return this._transformState.needTransform=!1,t.prototype.push.call(this,h,m)},o.prototype._transform=function(h,m,u){throw new Error("_transform() is not implemented")},o.prototype._write=function(h,m,u){var _=this._transformState;if(_.writecb=u,_.writechunk=h,_.writeencoding=m,!_.transforming){var C=this._readableState;(_.needTransform||C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}},o.prototype._read=function(h){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},o.prototype._destroy=function(h,m){var u=this;t.prototype._destroy.call(this,h,function(_){m(_),u.emit("close")})};function f(h,m,u){if(m)return h.emit("error",m);if(u!=null&&h.push(u),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}},{"10":10,"21":21,"27":27}],31:[function(e,g,r){(function(t,p,i){"use strict";var o=e(24);g.exports=I;function n(J,ee,ie){this.chunk=J,this.encoding=ee,this.callback=ie,this.next=null}function f(J){var ee=this;this.next=null,this.entry=null,this.finish=function(){se(ee,J)}}var h=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:o.nextTick,m;I.WritableState=A;var u=e(10);u.inherits=e(21);var _={deprecate:e(44)},C=e(34),k=e(39).Buffer,R=p.Uint8Array||function(){};function P(J){return k.from(J)}function w(J){return k.isBuffer(J)||J instanceof R}var H=e(33);u.inherits(I,C);function N(){}function A(J,ee){m=m||e(27),J=J||{};var ie=ee instanceof m;this.objectMode=!!J.objectMode,ie&&(this.objectMode=this.objectMode||!!J.writableObjectMode);var me=J.highWaterMark,de=J.writableHighWaterMark,Q=this.objectMode?16:16*1024;me||me===0?this.highWaterMark=me:ie&&(de||de===0)?this.highWaterMark=de:this.highWaterMark=Q,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var X=J.decodeStrings===!1;this.decodeStrings=!X,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(j){K(ee,j)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}A.prototype.getBuffer=function(){for(var ee=this.bufferedRequest,ie=[];ee;)ie.push(ee),ee=ee.next;return ie},function(){try{Object.defineProperty(A.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(J){}}();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(J){return M.call(this,J)?!0:this!==I?!1:J&&J._writableState instanceof A}})):M=function(J){return J instanceof this};function I(J){if(m=m||e(27),!M.call(I,this)&&!(this instanceof m))return new I(J);this._writableState=new A(J,this),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),C.call(this)}I.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(J,ee){var ie=new Error("write after end");J.emit("error",ie),o.nextTick(ee,ie)}function v(J,ee,ie,me){var de=!0,Q=!1;return ie===null?Q=new TypeError("May not write null values to stream"):typeof ie!="string"&&ie!==void 0&&!ee.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(J.emit("error",Q),o.nextTick(me,Q),de=!1),de}I.prototype.write=function(J,ee,ie){var me=this._writableState,de=!1,Q=!me.objectMode&&w(J);return Q&&!k.isBuffer(J)&&(J=P(J)),typeof ee=="function"&&(ie=ee,ee=null),Q?ee="buffer":ee||(ee=me.defaultEncoding),typeof ie!="function"&&(ie=N),me.ended?D(this,ie):(Q||v(this,me,J,ie))&&(me.pendingcb++,de=W(this,me,Q,J,ee,ie)),de},I.prototype.cork=function(){var J=this._writableState;J.corked++},I.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.finished&&!J.bufferProcessing&&J.bufferedRequest&&Y(this,J))},I.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=ee.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ee+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this};function T(J,ee,ie){return!J.objectMode&&J.decodeStrings!==!1&&typeof ee=="string"&&(ee=k.from(ee,ie)),ee}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(J,ee,ie,me,de,Q){if(!ie){var X=T(ee,me,de);me!==X&&(ie=!0,de="buffer",me=X)}var j=ee.objectMode?1:me.length;ee.length+=j;var le=ee.length<ee.highWaterMark;if(le||(ee.needDrain=!0),ee.writing||ee.corked){var G=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:me,encoding:de,isBuf:ie,callback:Q,next:null},G?G.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else O(J,ee,!1,j,me,de,Q);return le}function O(J,ee,ie,me,de,Q,X){ee.writelen=me,ee.writecb=X,ee.writing=!0,ee.sync=!0,ie?J._writev(de,ee.onwrite):J._write(de,Q,ee.onwrite),ee.sync=!1}function B(J,ee,ie,me,de){--ee.pendingcb,ie?(o.nextTick(de,me),o.nextTick(ve,J,ee),J._writableState.errorEmitted=!0,J.emit("error",me)):(de(me),J._writableState.errorEmitted=!0,J.emit("error",me),ve(J,ee))}function L(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function K(J,ee){var ie=J._writableState,me=ie.sync,de=ie.writecb;if(L(ie),ee)B(J,ie,me,ee,de);else{var Q=oe(ie);!Q&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&Y(J,ie),me?h(x,J,ie,Q,de):x(J,ie,Q,de)}}function x(J,ee,ie,me){ie||U(J,ee),ee.pendingcb--,me(),ve(J,ee)}function U(J,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,J.emit("drain"))}function Y(J,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(J._writev&&ie&&ie.next){var me=ee.bufferedRequestCount,de=new Array(me),Q=ee.corkedRequestsFree;Q.entry=ie;for(var X=0,j=!0;ie;)de[X]=ie,ie.isBuf||(j=!1),ie=ie.next,X+=1;de.allBuffers=j,O(J,ee,!0,ee.length,de,"",Q.finish),ee.pendingcb++,ee.lastBufferedRequest=null,Q.next?(ee.corkedRequestsFree=Q.next,Q.next=null):ee.corkedRequestsFree=new f(ee),ee.bufferedRequestCount=0}else{for(;ie;){var le=ie.chunk,G=ie.encoding,c=ie.callback,E=ee.objectMode?1:le.length;if(O(J,ee,!1,E,le,G,c),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}I.prototype._write=function(J,ee,ie){ie(new Error("_write() is not implemented"))},I.prototype._writev=null,I.prototype.end=function(J,ee,ie){var me=this._writableState;typeof J=="function"?(ie=J,J=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),J!=null&&this.write(J,ee),me.corked&&(me.corked=1,this.uncork()),!me.ending&&!me.finished&&ce(this,me,ie)};function oe(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function ue(J,ee){J._final(function(ie){ee.pendingcb--,ie&&J.emit("error",ie),ee.prefinished=!0,J.emit("prefinish"),ve(J,ee)})}function re(J,ee){!ee.prefinished&&!ee.finalCalled&&(typeof J._final=="function"?(ee.pendingcb++,ee.finalCalled=!0,o.nextTick(ue,J,ee)):(ee.prefinished=!0,J.emit("prefinish")))}function ve(J,ee){var ie=oe(ee);return ie&&(re(J,ee),ee.pendingcb===0&&(ee.finished=!0,J.emit("finish"))),ie}function ce(J,ee,ie){ee.ending=!0,ve(J,ee),ie&&(ee.finished?o.nextTick(ie):J.once("finish",ie)),ee.ended=!0,J.writable=!1}function se(J,ee,ie){var me=J.entry;for(J.entry=null;me;){var de=me.callback;ee.pendingcb--,de(ie),me=me.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=J:ee.corkedRequestsFree=J}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(J){!this._writableState||(this._writableState.destroyed=J)}}),I.prototype.destroy=H.destroy,I.prototype._undestroy=H.undestroy,I.prototype._destroy=function(J,ee){this.end(),ee(J)}}).call(this,e(25),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},e(43).setImmediate)},{"10":10,"21":21,"24":24,"25":25,"27":27,"33":33,"34":34,"39":39,"43":43,"44":44}],32:[function(e,g,r){"use strict";function t(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var p=e(39).Buffer,i=e(7);function o(n,f,h){n.copy(f,h)}g.exports=function(){function n(){t(this,n),this.head=null,this.tail=null,this.length=0}return n.prototype.push=function(h){var m={data:h,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length},n.prototype.unshift=function(h){var m={data:h,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length},n.prototype.shift=function(){if(this.length!==0){var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(h){if(this.length===0)return"";for(var m=this.head,u=""+m.data;m=m.next;)u+=h+m.data;return u},n.prototype.concat=function(h){if(this.length===0)return p.alloc(0);if(this.length===1)return this.head.data;for(var m=p.allocUnsafe(h>>>0),u=this.head,_=0;u;)o(u.data,m,_),_+=u.data.length,u=u.next;return m},n}(),i&&i.inspect&&i.inspect.custom&&(g.exports.prototype[i.inspect.custom]=function(){var n=i.inspect({length:this.length});return this.constructor.name+" "+n})},{"39":39,"7":7}],33:[function(e,g,r){"use strict";var t=e(24);function p(n,f){var h=this,m=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return m||u?(f?f(n):n&&(!this._writableState||!this._writableState.errorEmitted)&&t.nextTick(o,this,n),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(_){!f&&_?(t.nextTick(o,h,_),h._writableState&&(h._writableState.errorEmitted=!0)):f&&f(_)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(n,f){n.emit("error",f)}g.exports={destroy:p,undestroy:i}},{"24":24}],34:[function(e,g,r){g.exports=e(11).EventEmitter},{"11":11}],35:[function(e,g,r){g.exports=e(36).PassThrough},{"36":36}],36:[function(e,g,r){r=g.exports=e(29),r.Stream=r,r.Readable=r,r.Writable=e(31),r.Duplex=e(27),r.Transform=e(30),r.PassThrough=e(28)},{"27":27,"28":28,"29":29,"30":30,"31":31}],37:[function(e,g,r){g.exports=e(36).Transform},{"36":36}],38:[function(e,g,r){g.exports=e(31)},{"31":31}],39:[function(e,g,r){var t=e(8),p=t.Buffer;function i(n,f){for(var h in n)f[h]=n[h]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?g.exports=t:(i(t,r),r.Buffer=o);function o(n,f,h){return p(n,f,h)}i(p,o),o.from=function(n,f,h){if(typeof n=="number")throw new TypeError("Argument must not be a number");return p(n,f,h)},o.alloc=function(n,f,h){if(typeof n!="number")throw new TypeError("Argument must be a number");var m=p(n);return f!==void 0?typeof h=="string"?m.fill(f,h):m.fill(f):m.fill(0),m},o.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return p(n)},o.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(n)}},{"8":8}],40:[function(e,g,r){(function(t){(function(p){p.parser=function(c,E){return new o(c,E)},p.SAXParser=o,p.SAXStream=C,p.createStream=_,p.MAX_BUFFER_LENGTH=64*1024;var i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];p.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function o(c,E){if(!(this instanceof o))return new o(c,E);var b=this;f(b),b.q=b.c="",b.bufferCheckPosition=p.MAX_BUFFER_LENGTH,b.opt=E||{},b.opt.lowercase=b.opt.lowercase||b.opt.lowercasetags,b.looseCase=b.opt.lowercase?"toLowerCase":"toUpperCase",b.tags=[],b.closed=b.closedRoot=b.sawRoot=!1,b.tag=b.error=null,b.strict=!!c,b.noscript=!!(c||b.opt.noscript),b.state=U.BEGIN,b.strictEntities=b.opt.strictEntities,b.ENTITIES=b.strictEntities?Object.create(p.XML_ENTITIES):Object.create(p.ENTITIES),b.attribList=[],b.opt.xmlns&&(b.ns=Object.create(D)),b.trackPosition=b.opt.position!==!1,b.trackPosition&&(b.position=b.line=b.column=0),oe(b,"onready")}Object.create||(Object.create=function(c){function E(){}E.prototype=c;var b=new E;return b}),Object.keys||(Object.keys=function(c){var E=[];for(var b in c)c.hasOwnProperty(b)&&E.push(b);return E});function n(c){for(var E=Math.max(p.MAX_BUFFER_LENGTH,10),b=0,l=0,d=i.length;l<d;l++){var y=c[i[l]].length;if(y>E)switch(i[l]){case"textNode":re(c);break;case"cdata":ue(c,"oncdata",c.cdata),c.cdata="";break;case"script":ue(c,"onscript",c.script),c.script="";break;default:ce(c,"Max buffer length exceeded: "+i[l])}b=Math.max(b,y)}var V=p.MAX_BUFFER_LENGTH-b;c.bufferCheckPosition=V+c.position}function f(c){for(var E=0,b=i.length;E<b;E++)c[i[E]]=""}function h(c){re(c),c.cdata!==""&&(ue(c,"oncdata",c.cdata),c.cdata=""),c.script!==""&&(ue(c,"onscript",c.script),c.script="")}o.prototype={end:function(){se(this)},write:G,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){h(this)}};var m;try{m=e(41).Stream}catch(c){m=function(){}}var u=p.EVENTS.filter(function(c){return c!=="error"&&c!=="end"});function _(c,E){return new C(c,E)}function C(c,E){if(!(this instanceof C))return new C(c,E);m.apply(this),this._parser=new o(c,E),this.writable=!0,this.readable=!0;var b=this;this._parser.onend=function(){b.emit("end")},this._parser.onerror=function(l){b.emit("error",l),b._parser.error=null},this._decoder=null,u.forEach(function(l){Object.defineProperty(b,"on"+l,{get:function(){return b._parser["on"+l]},set:function(d){if(!d)return b.removeAllListeners(l),b._parser["on"+l]=d,d;b.on(l,d)},enumerable:!0,configurable:!1})})}C.prototype=Object.create(m.prototype,{constructor:{value:C}}),C.prototype.write=function(c){if(typeof t=="function"&&typeof t.isBuffer=="function"&&t.isBuffer(c)){if(!this._decoder){var E=e(42).StringDecoder;this._decoder=new E("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},C.prototype.end=function(c){return c&&c.length&&this.write(c),this._parser.end(),!0},C.prototype.on=function(c,E){var b=this;return!b._parser["on"+c]&&u.indexOf(c)!==-1&&(b._parser["on"+c]=function(){var l=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);l.splice(0,0,c),b.emit.apply(b,l)}),m.prototype.on.call(b,c,E)};var k=`\r
|
|
`,R="0124356789",P="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",w=`'"`,H=k+">",N="[CDATA[",A="DOCTYPE",M="http://www.w3.org/XML/1998/namespace",I="http://www.w3.org/2000/xmlns/",D={xml:M,xmlns:I};k=B(k),R=B(R),P=B(P);var v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,T=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,W=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,O=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;w=B(w),H=B(H);function B(c){return c.split("").reduce(function(E,b){return E[b]=!0,E},{})}function L(c){return Object.prototype.toString.call(c)==="[object RegExp]"}function K(c,E){return L(c)?!!E.match(c):c[E]}function x(c,E){return!K(c,E)}var U=0;p.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},p.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},p.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(p.ENTITIES).forEach(function(c){var E=p.ENTITIES[c],b=typeof E=="number"?String.fromCharCode(E):E;p.ENTITIES[c]=b});for(var Y in p.STATE)p.STATE[p.STATE[Y]]=Y;U=p.STATE;function oe(c,E,b){c[E]&&c[E](b)}function ue(c,E,b){c.textNode&&re(c),oe(c,E,b)}function re(c){c.textNode=ve(c.opt,c.textNode),c.textNode&&oe(c,"ontext",c.textNode),c.textNode=""}function ve(c,E){return c.trim&&(E=E.trim()),c.normalize&&(E=E.replace(/\s+/g," ")),E}function ce(c,E){return re(c),c.trackPosition&&(E+=`
|
|
Line: `+c.line+`
|
|
Column: `+c.column+`
|
|
Char: `+c.c),E=new Error(E),c.error=E,oe(c,"onerror",E),c}function se(c){return c.sawRoot&&!c.closedRoot&&J(c,"Unclosed root tag"),c.state!==U.BEGIN&&c.state!==U.BEGIN_WHITESPACE&&c.state!==U.TEXT&&ce(c,"Unexpected end"),re(c),c.c="",c.closed=!0,oe(c,"onend"),o.call(c,c.strict,c.opt),c}function J(c,E){if(typeof c!="object"||!(c instanceof o))throw new Error("bad call to strictFail");c.strict&&ce(c,E)}function ee(c){c.strict||(c.tagName=c.tagName[c.looseCase]());var E=c.tags[c.tags.length-1]||c,b=c.tag={name:c.tagName,attributes:{}};c.opt.xmlns&&(b.ns=E.ns),c.attribList.length=0,ue(c,"onopentagstart",b)}function ie(c,E){var b=c.indexOf(":"),l=b<0?["",c]:c.split(":"),d=l[0],y=l[1];return E&&c==="xmlns"&&(d="xmlns",y=""),{prefix:d,local:y}}function me(c){if(c.strict||(c.attribName=c.attribName[c.looseCase]()),c.attribList.indexOf(c.attribName)!==-1||c.tag.attributes.hasOwnProperty(c.attribName)){c.attribName=c.attribValue="";return}if(c.opt.xmlns){var E=ie(c.attribName,!0),b=E.prefix,l=E.local;if(b==="xmlns")if(l==="xml"&&c.attribValue!==M)J(c,"xml: prefix must be bound to "+M+`
|
|
Actual: `+c.attribValue);else if(l==="xmlns"&&c.attribValue!==I)J(c,"xmlns: prefix must be bound to "+I+`
|
|
Actual: `+c.attribValue);else{var d=c.tag,y=c.tags[c.tags.length-1]||c;d.ns===y.ns&&(d.ns=Object.create(y.ns)),d.ns[l]=c.attribValue}c.attribList.push([c.attribName,c.attribValue])}else c.tag.attributes[c.attribName]=c.attribValue,ue(c,"onattribute",{name:c.attribName,value:c.attribValue});c.attribName=c.attribValue=""}function de(c,E){if(c.opt.xmlns){var b=c.tag,l=ie(c.tagName);b.prefix=l.prefix,b.local=l.local,b.uri=b.ns[l.prefix]||"",b.prefix&&!b.uri&&(J(c,"Unbound namespace prefix: "+JSON.stringify(c.tagName)),b.uri=l.prefix);var d=c.tags[c.tags.length-1]||c;b.ns&&d.ns!==b.ns&&Object.keys(b.ns).forEach(function(_e){ue(c,"onopennamespace",{prefix:_e,uri:b.ns[_e]})});for(var y=0,V=c.attribList.length;y<V;y++){var te=c.attribList[y],$=te[0],ae=te[1],ne=ie($,!0),Se=ne.prefix,Ie=ne.local,he=Se===""?"":b.ns[Se]||"",ye={name:$,value:ae,prefix:Se,local:Ie,uri:he};Se&&Se!=="xmlns"&&!he&&(J(c,"Unbound namespace prefix: "+JSON.stringify(Se)),ye.uri=Se),c.tag.attributes[$]=ye,ue(c,"onattribute",ye)}c.attribList.length=0}c.tag.isSelfClosing=!!E,c.sawRoot=!0,c.tags.push(c.tag),ue(c,"onopentag",c.tag),E||(!c.noscript&&c.tagName.toLowerCase()==="script"?c.state=U.SCRIPT:c.state=U.TEXT,c.tag=null,c.tagName=""),c.attribName=c.attribValue="",c.attribList.length=0}function Q(c){if(!c.tagName){J(c,"Weird empty close tag."),c.textNode+="</>",c.state=U.TEXT;return}if(c.script){if(c.tagName!=="script"){c.script+="</"+c.tagName+">",c.tagName="",c.state=U.SCRIPT;return}ue(c,"onscript",c.script),c.script=""}var E=c.tags.length,b=c.tagName;c.strict||(b=b[c.looseCase]());for(var l=b;E--;){var d=c.tags[E];if(d.name!==l)J(c,"Unexpected close tag");else break}if(E<0){J(c,"Unmatched closing tag: "+c.tagName),c.textNode+="</"+c.tagName+">",c.state=U.TEXT;return}c.tagName=b;for(var y=c.tags.length;y-- >E;){var V=c.tag=c.tags.pop();c.tagName=c.tag.name,ue(c,"onclosetag",c.tagName);var te={};for(var $ in V.ns)te[$]=V.ns[$];var ae=c.tags[c.tags.length-1]||c;c.opt.xmlns&&V.ns!==ae.ns&&Object.keys(V.ns).forEach(function(ne){var Se=V.ns[ne];ue(c,"onclosenamespace",{prefix:ne,uri:Se})})}E===0&&(c.closedRoot=!0),c.tagName=c.attribValue=c.attribName="",c.attribList.length=0,c.state=U.TEXT}function X(c){var E=c.entity,b=E.toLowerCase(),l,d="";return c.ENTITIES[E]?c.ENTITIES[E]:c.ENTITIES[b]?c.ENTITIES[b]:(E=b,E.charAt(0)==="#"&&(E.charAt(1)==="x"?(E=E.slice(2),l=parseInt(E,16),d=l.toString(16)):(E=E.slice(1),l=parseInt(E,10),d=l.toString(10))),E=E.replace(/^0+/,""),d.toLowerCase()!==E?(J(c,"Invalid character entity"),"&"+c.entity+";"):String.fromCodePoint(l))}function j(c,E){E==="<"?(c.state=U.OPEN_WAKA,c.startTagPosition=c.position):x(k,E)&&(J(c,"Non-whitespace before first tag."),c.textNode=E,c.state=U.TEXT)}function le(c,E){var b="";return E<c.length&&(b=c.charAt(E)),b}function G(c){var E=this;if(this.error)throw this.error;if(E.closed)return ce(E,"Cannot write after close. Assign an onready handler.");if(c===null)return se(E);typeof c=="object"&&(c=c.toString());for(var b=0,l="";l=le(c,b++),E.c=l,!!l;)switch(E.trackPosition&&(E.position++,l===`
|
|
`?(E.line++,E.column=0):E.column++),E.state){case U.BEGIN:if(E.state=U.BEGIN_WHITESPACE,l==="\uFEFF")continue;j(E,l);continue;case U.BEGIN_WHITESPACE:j(E,l);continue;case U.TEXT:if(E.sawRoot&&!E.closedRoot){for(var d=b-1;l&&l!=="<"&&l!=="&";)l=le(c,b++),l&&E.trackPosition&&(E.position++,l===`
|
|
`?(E.line++,E.column=0):E.column++);E.textNode+=c.substring(d,b-1)}l==="<"&&!(E.sawRoot&&E.closedRoot&&!E.strict)?(E.state=U.OPEN_WAKA,E.startTagPosition=E.position):(x(k,l)&&(!E.sawRoot||E.closedRoot)&&J(E,"Text data outside of root node."),l==="&"?E.state=U.TEXT_ENTITY:E.textNode+=l);continue;case U.SCRIPT:l==="<"?E.state=U.SCRIPT_ENDING:E.script+=l;continue;case U.SCRIPT_ENDING:l==="/"?E.state=U.CLOSE_TAG:(E.script+="<"+l,E.state=U.SCRIPT);continue;case U.OPEN_WAKA:if(l==="!")E.state=U.SGML_DECL,E.sgmlDecl="";else if(!K(k,l))if(K(v,l))E.state=U.OPEN_TAG,E.tagName=l;else if(l==="/")E.state=U.CLOSE_TAG,E.tagName="";else if(l==="?")E.state=U.PROC_INST,E.procInstName=E.procInstBody="";else{if(J(E,"Unencoded <"),E.startTagPosition+1<E.position){var y=E.position-E.startTagPosition;l=new Array(y).join(" ")+l}E.textNode+="<"+l,E.state=U.TEXT}continue;case U.SGML_DECL:(E.sgmlDecl+l).toUpperCase()===N?(ue(E,"onopencdata"),E.state=U.CDATA,E.sgmlDecl="",E.cdata=""):E.sgmlDecl+l==="--"?(E.state=U.COMMENT,E.comment="",E.sgmlDecl=""):(E.sgmlDecl+l).toUpperCase()===A?(E.state=U.DOCTYPE,(E.doctype||E.sawRoot)&&J(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):l===">"?(ue(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=U.TEXT):(K(w,l)&&(E.state=U.SGML_DECL_QUOTED),E.sgmlDecl+=l);continue;case U.SGML_DECL_QUOTED:l===E.q&&(E.state=U.SGML_DECL,E.q=""),E.sgmlDecl+=l;continue;case U.DOCTYPE:l===">"?(E.state=U.TEXT,ue(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=l,l==="["?E.state=U.DOCTYPE_DTD:K(w,l)&&(E.state=U.DOCTYPE_QUOTED,E.q=l));continue;case U.DOCTYPE_QUOTED:E.doctype+=l,l===E.q&&(E.q="",E.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:E.doctype+=l,l==="]"?E.state=U.DOCTYPE:K(w,l)&&(E.state=U.DOCTYPE_DTD_QUOTED,E.q=l);continue;case U.DOCTYPE_DTD_QUOTED:E.doctype+=l,l===E.q&&(E.state=U.DOCTYPE_DTD,E.q="");continue;case U.COMMENT:l==="-"?E.state=U.COMMENT_ENDING:E.comment+=l;continue;case U.COMMENT_ENDING:l==="-"?(E.state=U.COMMENT_ENDED,E.comment=ve(E.opt,E.comment),E.comment&&ue(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+l,E.state=U.COMMENT);continue;case U.COMMENT_ENDED:l!==">"?(J(E,"Malformed comment"),E.comment+="--"+l,E.state=U.COMMENT):E.state=U.TEXT;continue;case U.CDATA:l==="]"?E.state=U.CDATA_ENDING:E.cdata+=l;continue;case U.CDATA_ENDING:l==="]"?E.state=U.CDATA_ENDING_2:(E.cdata+="]"+l,E.state=U.CDATA);continue;case U.CDATA_ENDING_2:l===">"?(E.cdata&&ue(E,"oncdata",E.cdata),ue(E,"onclosecdata"),E.cdata="",E.state=U.TEXT):l==="]"?E.cdata+="]":(E.cdata+="]]"+l,E.state=U.CDATA);continue;case U.PROC_INST:l==="?"?E.state=U.PROC_INST_ENDING:K(k,l)?E.state=U.PROC_INST_BODY:E.procInstName+=l;continue;case U.PROC_INST_BODY:if(!E.procInstBody&&K(k,l))continue;l==="?"?E.state=U.PROC_INST_ENDING:E.procInstBody+=l;continue;case U.PROC_INST_ENDING:l===">"?(ue(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=U.TEXT):(E.procInstBody+="?"+l,E.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:K(T,l)?E.tagName+=l:(ee(E),l===">"?de(E):l==="/"?E.state=U.OPEN_TAG_SLASH:(x(k,l)&&J(E,"Invalid character in tag name"),E.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:l===">"?(de(E,!0),Q(E)):(J(E,"Forward-slash in opening tag not followed by >"),E.state=U.ATTRIB);continue;case U.ATTRIB:if(K(k,l))continue;l===">"?de(E):l==="/"?E.state=U.OPEN_TAG_SLASH:K(v,l)?(E.attribName=l,E.attribValue="",E.state=U.ATTRIB_NAME):J(E,"Invalid attribute name");continue;case U.ATTRIB_NAME:l==="="?E.state=U.ATTRIB_VALUE:l===">"?(J(E,"Attribute without value"),E.attribValue=E.attribName,me(E),de(E)):K(k,l)?E.state=U.ATTRIB_NAME_SAW_WHITE:K(T,l)?E.attribName+=l:J(E,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if(l==="=")E.state=U.ATTRIB_VALUE;else{if(K(k,l))continue;J(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",ue(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",l===">"?de(E):K(v,l)?(E.attribName=l,E.state=U.ATTRIB_NAME):(J(E,"Invalid attribute name"),E.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(K(k,l))continue;K(w,l)?(E.q=l,E.state=U.ATTRIB_VALUE_QUOTED):(J(E,"Unquoted attribute value"),E.state=U.ATTRIB_VALUE_UNQUOTED,E.attribValue=l);continue;case U.ATTRIB_VALUE_QUOTED:if(l!==E.q){l==="&"?E.state=U.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=l;continue}me(E),E.q="",E.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:K(k,l)?E.state=U.ATTRIB:l===">"?de(E):l==="/"?E.state=U.OPEN_TAG_SLASH:K(v,l)?(J(E,"No whitespace between attributes"),E.attribName=l,E.attribValue="",E.state=U.ATTRIB_NAME):J(E,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(x(H,l)){l==="&"?E.state=U.ATTRIB_VALUE_ENTITY_U:E.attribValue+=l;continue}me(E),l===">"?de(E):E.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(E.tagName)l===">"?Q(E):K(T,l)?E.tagName+=l:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=U.SCRIPT):(x(k,l)&&J(E,"Invalid tagname in closing tag"),E.state=U.CLOSE_TAG_SAW_WHITE);else{if(K(k,l))continue;x(v,l)?E.script?(E.script+="</"+l,E.state=U.SCRIPT):J(E,"Invalid tagname in closing tag."):E.tagName=l}continue;case U.CLOSE_TAG_SAW_WHITE:if(K(k,l))continue;l===">"?Q(E):J(E,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var V,te;switch(E.state){case U.TEXT_ENTITY:V=U.TEXT,te="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:V=U.ATTRIB_VALUE_QUOTED,te="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:V=U.ATTRIB_VALUE_UNQUOTED,te="attribValue";break}l===";"?(E[te]+=X(E),E.entity="",E.state=V):K(E.entity.length?O:W,l)?E.entity+=l:(J(E,"Invalid character in entity name"),E[te]+="&"+E.entity+l,E.entity="",E.state=V);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&n(E),E}String.fromCodePoint||function(){var c=String.fromCharCode,E=Math.floor,b=function(){var l=16384,d=[],y,V,te=-1,$=arguments.length;if(!$)return"";for(var ae="";++te<$;){var ne=Number(arguments[te]);if(!isFinite(ne)||ne<0||ne>1114111||E(ne)!==ne)throw RangeError("Invalid code point: "+ne);ne<=65535?d.push(ne):(ne-=65536,y=(ne>>10)+55296,V=ne%1024+56320,d.push(y,V)),(te+1===$||d.length>l)&&(ae+=c.apply(null,d),d.length=0)}return ae};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:b,configurable:!0,writable:!0}):String.fromCodePoint=b}()})(typeof r=="undefined"?this.sax={}:r)}).call(this,e(8).Buffer)},{"41":41,"42":42,"8":8}],41:[function(e,g,r){g.exports=i;var t=e(11).EventEmitter,p=e(21);p(i,t),i.Readable=e(36),i.Writable=e(38),i.Duplex=e(26),i.Transform=e(37),i.PassThrough=e(35),i.Stream=i;function i(){t.call(this)}i.prototype.pipe=function(o,n){var f=this;function h(P){o.writable&&o.write(P)===!1&&f.pause&&f.pause()}f.on("data",h);function m(){f.readable&&f.resume&&f.resume()}o.on("drain",m),!o._isStdio&&(!n||n.end!==!1)&&(f.on("end",_),f.on("close",C));var u=!1;function _(){u||(u=!0,o.end())}function C(){u||(u=!0,typeof o.destroy=="function"&&o.destroy())}function k(P){if(R(),t.listenerCount(this,"error")===0)throw P}f.on("error",k),o.on("error",k);function R(){f.removeListener("data",h),o.removeListener("drain",m),f.removeListener("end",_),f.removeListener("close",C),f.removeListener("error",k),o.removeListener("error",k),f.removeListener("end",R),f.removeListener("close",R),o.removeListener("close",R)}return f.on("end",R),f.on("close",R),o.on("close",R),o.emit("pipe",f),o}},{"11":11,"21":21,"26":26,"35":35,"36":36,"37":37,"38":38}],42:[function(e,g,r){"use strict";var t=e(39).Buffer,p=t.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(A){if(!A)return"utf8";for(var M;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(M)return;A=(""+A).toLowerCase(),M=!0}}function o(A){var M=i(A);if(typeof M!="string"&&(t.isEncoding===p||!p(A)))throw new Error("Unknown encoding: "+A);return M||A}r.StringDecoder=n;function n(A){this.encoding=o(A);var M;switch(this.encoding){case"utf16le":this.text=k,this.end=R,M=4;break;case"utf8":this.fillLast=u,M=4;break;case"base64":this.text=P,this.end=w,M=3;break;default:this.write=H,this.end=N;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(M)}n.prototype.write=function(A){if(A.length===0)return"";var M,I;if(this.lastNeed){if(M=this.fillLast(A),M===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<A.length?M?M+this.text(A,I):this.text(A,I):M||""},n.prototype.end=C,n.prototype.text=_,n.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function f(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function h(A,M,I){var D=M.length-1;if(D<I)return 0;var v=f(M[D]);return v>=0?(v>0&&(A.lastNeed=v-1),v):--D<I||v===-2?0:(v=f(M[D]),v>=0?(v>0&&(A.lastNeed=v-2),v):--D<I||v===-2?0:(v=f(M[D]),v>=0?(v>0&&(v===2?v=0:A.lastNeed=v-3),v):0))}function m(A,M,I){if((M[0]&192)!=128)return A.lastNeed=0,"\uFFFD";if(A.lastNeed>1&&M.length>1){if((M[1]&192)!=128)return A.lastNeed=1,"\uFFFD";if(A.lastNeed>2&&M.length>2&&(M[2]&192)!=128)return A.lastNeed=2,"\uFFFD"}}function u(A){var M=this.lastTotal-this.lastNeed,I=m(this,A,M);if(I!==void 0)return I;if(this.lastNeed<=A.length)return A.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,M,0,A.length),this.lastNeed-=A.length}function _(A,M){var I=h(this,A,M);if(!this.lastNeed)return A.toString("utf8",M);this.lastTotal=I;var D=A.length-(I-this.lastNeed);return A.copy(this.lastChar,0,D),A.toString("utf8",M,D)}function C(A){var M=A&&A.length?this.write(A):"";return this.lastNeed?M+"\uFFFD":M}function k(A,M){if((A.length-M)%2==0){var I=A.toString("utf16le",M);if(I){var D=I.charCodeAt(I.length-1);if(D>=55296&&D<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",M,A.length-1)}function R(A){var M=A&&A.length?this.write(A):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,I)}return M}function P(A,M){var I=(A.length-M)%3;return I===0?A.toString("base64",M):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",M,A.length-I))}function w(A){var M=A&&A.length?this.write(A):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function H(A){return A.toString(this.encoding)}function N(A){return A&&A.length?this.write(A):""}},{"39":39}],43:[function(e,g,r){(function(t,p){var i=e(25).nextTick,o=Function.prototype.apply,n=Array.prototype.slice,f={},h=0;r.setTimeout=function(){return new m(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new m(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(u){u.close()};function m(u,_){this._id=u,this._clearFn=_}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(u,_){clearTimeout(u._idleTimeoutId),u._idleTimeout=_},r.unenroll=function(u){clearTimeout(u._idleTimeoutId),u._idleTimeout=-1},r._unrefActive=r.active=function(u){clearTimeout(u._idleTimeoutId);var _=u._idleTimeout;_>=0&&(u._idleTimeoutId=setTimeout(function(){u._onTimeout&&u._onTimeout()},_))},r.setImmediate=typeof t=="function"?t:function(u){var _=h++,C=arguments.length<2?!1:n.call(arguments,1);return f[_]=!0,i(function(){f[_]&&(C?u.apply(null,C):u.call(null),r.clearImmediate(_))}),_},r.clearImmediate=typeof p=="function"?p:function(u){delete f[u]}}).call(this,e(43).setImmediate,e(43).clearImmediate)},{"25":25,"43":43}],44:[function(e,g,r){(function(t){g.exports=p;function p(o,n){if(i("noDeprecation"))return o;var f=!1;function h(){if(!f){if(i("throwDeprecation"))throw new Error(n);i("traceDeprecation")?console.trace(n):console.warn(n),f=!0}return o.apply(this,arguments)}return h}function i(o){try{if(!t.localStorage)return!1}catch(f){return!1}var n=t.localStorage[o];return n==null?!1:String(n).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],45:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(H){return H&&H.__esModule?H:{default:H}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f),m=0,u=1,_=2,C=3,k=4,R=5;function P(H){H=H||{};var N=this.context,A=(0,i.default)(N).getInstance(),M=H.settings,I=[],D=void 0,v=void 0,T=void 0,W=void 0;function O(){v=!0,T=!0,W=new Date().getTime(),typeof window!="undefined"&&window.console&&(I[u]=B(window.console.error),I[_]=B(window.console.error),I[C]=B(window.console.warn),I[k]=B(window.console.info),I[R]=B(window.console.debug))}function B(ce){return ce&&ce.bind?ce.bind(window.console):window.console.log.bind(window.console)}function L(ce){return{fatal:U.bind(ce),error:Y.bind(ce),warn:oe.bind(ce),info:ue.bind(ce),debug:re.bind(ce)}}function K(ce){v=ce}function x(ce){T=ce}function U(){for(var ce=arguments.length,se=Array(ce),J=0;J<ce;J++)se[J]=arguments[J];ve.apply(void 0,[u,this].concat(se))}function Y(){for(var ce=arguments.length,se=Array(ce),J=0;J<ce;J++)se[J]=arguments[J];ve.apply(void 0,[_,this].concat(se))}function oe(){for(var ce=arguments.length,se=Array(ce),J=0;J<ce;J++)se[J]=arguments[J];ve.apply(void 0,[C,this].concat(se))}function ue(){for(var ce=arguments.length,se=Array(ce),J=0;J<ce;J++)se[J]=arguments[J];ve.apply(void 0,[k,this].concat(se))}function re(){for(var ce=arguments.length,se=Array(ce),J=0;J<ce;J++)se[J]=arguments[J];ve.apply(void 0,[R,this].concat(se))}function ve(ce,se){var J="",ee=null;v&&(ee=new Date().getTime(),J+="["+(ee-W)+"]"),T&&se&&se.getClassName&&(J+="["+se.getClassName()+"]",se.getType&&(J+="["+se.getType()+"]")),J.length>0&&(J+=" ");for(var ie=arguments.length,me=Array(ie>2?ie-2:0),de=2;de<ie;de++)me[de-2]=arguments[de];Array.apply(null,me).forEach(function(Q){J+=Q+" "}),I[ce]&&M.get().debug.logLevel>=ce&&I[ce](J),M&&M.get().debug.dispatchEvent&&A.trigger(n.default.LOG,{message:J,level:ce})}return D={getLogger:L,setLogTimestampVisible:K,setCalleeNameVisible:x},O(),D}P.__dashjs_factory_name="Debug";var w=h.default.getSingletonFactory(P);w.LOG_LEVEL_NONE=m,w.LOG_LEVEL_FATAL=u,w.LOG_LEVEL_ERROR=_,w.LOG_LEVEL_WARNING=C,w.LOG_LEVEL_INFO=k,w.LOG_LEVEL_DEBUG=R,h.default.updateSingletonFactory(P.__dashjs_factory_name,w),r.default=w,g.exports=r.default},{"46":46,"47":47,"54":54}],46:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}var p=e(47),i=t(p),o=e(104),n=t(o),f=0,h=5e3;function m(){var _={};function C(N,A,M){var I=arguments.length<=3||arguments[3]===void 0?{}:arguments[3];if(!N)throw new Error("event type cannot be null or undefined");if(!A||typeof A!="function")throw new Error("listener must be a function: "+A);var D=I.priority||f;if(!(P(N,A,M)>=0)){_[N]=_[N]||[];var v={callback:A,scope:M,priority:D};M&&M.getStreamId&&(v.streamId=M.getStreamId()),M&&M.getType&&(v.mediaType=M.getType()),I&&I.mode&&(v.mode=I.mode);var T=_[N].some(function(W,O){if(W&&D>W.priority)return _[N].splice(O,0,v),!0});T||_[N].push(v)}}function k(N,A,M){if(!(!N||!A||!_[N])){var I=P(N,A,M);I<0||(_[N][I]=null)}}function R(N){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],M=arguments.length<=2||arguments[2]===void 0?{}:arguments[2];if(!(!N||!_[N])){if(A=A||{},A.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");A.type=N,M.streamId&&(A.streamId=M.streamId),M.mediaType&&(A.mediaType=M.mediaType),_[N].filter(function(I){return!(!I||M.streamId&&I.streamId&&I.streamId!==M.streamId||M.mediaType&&I.mediaType&&I.mediaType!==M.mediaType||M.mode&&I.mode&&I.mode!==M.mode||!I.mode&&M.mode&&M.mode===n.default.EVENT_MODE_ON_RECEIVE)}).forEach(function(I){return I&&I.callback.call(I.scope,A)})}}function P(N,A,M){var I=-1;return _[N]&&_[N].some(function(D,v){if(D&&D.callback===A&&(!M||M===D.scope))return I=v,!0}),I}function w(){_={}}var H={on:C,off:k,trigger:R,reset:w};return H}m.__dashjs_factory_name="EventBus";var u=i.default.getSingletonFactory(m);u.EVENT_PRIORITY_LOW=f,u.EVENT_PRIORITY_HIGH=h,i.default.updateSingletonFactory(m.__dashjs_factory_name,u),r.default=u,g.exports=r.default},{"104":104,"47":47}],47:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){var p=void 0,i=[],o={},n={};function f(M,I,D,v){!v[M]&&I&&(v[M]={instance:I,override:D})}function h(M,I){for(var D in i){var v=i[D];if(v.context===M&&v.name===I)return v.instance}return null}function m(M,I,D){for(var v in i){var T=i[v];if(T.context===M&&T.name===I){i[v].instance=D;return}}i.push({name:I,context:M,instance:D})}function u(M){i=i.filter(function(I){return I.context!==M})}function _(M,I){return I[M]}function C(M,I,D){M in D&&(D[M]=I)}function k(M,I){C(M,I,n)}function R(M){return _(M,n)}function P(M){var I=_(M.__dashjs_factory_name,n);return I||(I=function(D){return D===void 0&&(D={}),{create:function(){return A(M,D,arguments)}}},n[M.__dashjs_factory_name]=I),I}function w(M,I){C(M,I,o)}function H(M){return _(M,o)}function N(M){var I=_(M.__dashjs_factory_name,o);return I||(I=function(D){var v=void 0;return D===void 0&&(D={}),{getInstance:function(){return v||(v=h(D,M.__dashjs_factory_name)),v||(v=A(M,D,arguments),i.push({name:M.__dashjs_factory_name,context:D,instance:v})),v}}},o[M.__dashjs_factory_name]=I),I}function A(M,I,D){var v=void 0,T=M.__dashjs_factory_name,W=I[T];if(W){var O=W.instance;if(W.override){v=M.apply({context:I},D),O=O.apply({context:I,factory:p,parent:v},D);for(var B in O)v.hasOwnProperty(B)&&(v[B]=O[B])}else return O.apply({context:I,factory:p},D)}else v=M.apply({context:I},D);return v.getClassName=function(){return T},v}return p={extend:f,getSingletonInstance:h,setSingletonInstance:m,deleteSingletonInstances:u,getSingletonFactory:N,getSingletonFactoryByName:H,updateSingletonFactory:w,getClassFactory:P,getClassFactoryByName:R,updateClassFactory:k},p}();r.default=t,g.exports=r.default},{}],48:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}function p(P,w,H){return w in P?Object.defineProperty(P,w,{value:H,enumerable:!0,configurable:!0,writable:!0}):P[w]=H,P}var i=e(47),o=t(i),n=e(49),f=t(n),h=e(45),m=t(h),u=e(112),_=t(u),C=e(255);function k(){var P,w,H=void 0,N={debug:{logLevel:m.default.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{metricsMaxListDepth:1e3,abandonLoadTimeout:1e4,liveDelayFragmentCount:NaN,liveDelay:null,scheduleWhilePaused:!0,fastSwitchEnabled:!1,flushBufferAtTrackSwitch:!1,calcSegmentAvailabilityRangeFromTimeline:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:!1,keepProtectionMediaKeys:!1,useManifestDateHeaderTimeSource:!0,useSuggestedPresentationDelay:!0,useAppendWindow:!0,manifestUpdateRetryInterval:100,stallThreshold:.5,filterUnsupportedEssentialProperties:!0,eventControllerRefreshDelay:100,utcSynchronization:{backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso&ms"}},liveCatchup:{minDrift:.02,maxDrift:0,playbackRate:.5,latencyThreshold:60,playbackBufferMin:.5,enabled:!1,mode:_.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:_.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:_.default.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:_.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,fragmentRequestTimeout:0,retryIntervals:(P={},p(P,C.HTTPRequest.MPD_TYPE,500),p(P,C.HTTPRequest.XLINK_EXPANSION_TYPE,500),p(P,C.HTTPRequest.MEDIA_SEGMENT_TYPE,1e3),p(P,C.HTTPRequest.INIT_SEGMENT_TYPE,1e3),p(P,C.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),p(P,C.HTTPRequest.INDEX_SEGMENT_TYPE,1e3),p(P,C.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),p(P,C.HTTPRequest.OTHER_TYPE,1e3),p(P,"lowLatencyReductionFactor",10),P),retryAttempts:(w={},p(w,C.HTTPRequest.MPD_TYPE,3),p(w,C.HTTPRequest.XLINK_EXPANSION_TYPE,1),p(w,C.HTTPRequest.MEDIA_SEGMENT_TYPE,3),p(w,C.HTTPRequest.INIT_SEGMENT_TYPE,3),p(w,C.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),p(w,C.HTTPRequest.INDEX_SEGMENT_TYPE,3),p(w,C.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),p(w,C.HTTPRequest.OTHER_TYPE,3),p(w,"lowLatencyMultiplyFactor",5),w),abr:{movingAverageMethod:_.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:_.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:_.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:_.default.CMCD_MODE_QUERY}}},A=f.default.clone(N);function M(T,W,O){for(var B in T)T.hasOwnProperty(B)&&W.hasOwnProperty(B)&&(typeof T[B]=="object"&&T[B]!==null?M(T[B],W[B],O.slice()+B+"."):W[B]=f.default.clone(T[B]))}function I(){return A}function D(T){typeof T=="object"&&M(T,A,"")}function v(){A=f.default.clone(N)}return H={get:I,update:D,reset:v},H}k.__dashjs_factory_name="Settings";var R=o.default.getSingletonFactory(k);r.default=R,g.exports=r.default},{"112":112,"255":255,"45":45,"47":47,"49":49}],49:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(){p(this,o)}return t(o,null,[{key:"mixin",value:function(f,h,m){var u=void 0,_={};if(f)for(var C in h)h.hasOwnProperty(C)&&(u=h[C],(!(C in f)||f[C]!==u&&(!(C in _)||_[C]!==u))&&(typeof f[C]=="object"&&f[C]!==null?f[C]=o.mixin(f[C],u,m):f[C]=m(u)));return f}},{key:"clone",value:function(f){if(!f||typeof f!="object")return f;var h=void 0;if(f instanceof Array){h=[];for(var m=0,u=f.length;m<u;++m)m in f&&h.push(o.clone(f[m]))}else h={};return o.mixin(h,f,o.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(f,h){try{var m=function(){if(!h||h.length===0)return{v:f};var u=new URL(f);return h.forEach(function(_){_.key&&_.value&&u.searchParams.set(_.key,_.value)}),{v:u.href}}();if(typeof m=="object")return m.v}catch(u){return f}}},{key:"parseHttpHeaders",value:function(f){var h={};if(!f)return h;for(var m=f.trim().split(`\r
|
|
`),u=0,_=m.length;u<_;u++){var C=m[u],k=C.indexOf(": ");k>0&&(h[C.substring(0,k)]=C.substring(k+2))}return h}},{key:"generateUuid",value:function(){var f=new Date().getTime(),h="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(m){var u=(f+Math.random()*16)%16|0;return f=Math.floor(f/16),(m=="x"?u:u&3|8).toString(16)});return h}},{key:"generateHashCode",value:function(f){var h=0;if(f.length===0)return h;for(var m=0;m<f.length;m++){var u=f.charCodeAt(m);h=(h<<5)-h+u,h|=0}return h}}]),o}();r.default=i,g.exports=r.default},{}],50:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getVersionString=p;var t="3.2.2";function p(){return t}},{}],51:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(52),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this),this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,this.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13,this.SEGMENTS_UNAVAILABLE_ERROR_CODE=14,this.SEGMENT_BASE_LOADER_ERROR_CODE=15,this.TIME_SYNC_FAILED_ERROR_CODE=16,this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,this.APPEND_ERROR_CODE=20,this.REMOVE_ERROR_CODE=21,this.DATA_UPDATE_FAILED_ERROR_CODE=22,this.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,this.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,this.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,this.DOWNLOAD_ERROR_ID_SIDX_CODE=26,this.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,this.DOWNLOAD_ERROR_ID_XLINK_CODE=29,this.MANIFEST_ERROR_ID_CODEC_CODE=30,this.MANIFEST_ERROR_ID_PARSE_CODE=31,this.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,this.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",this.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segments",this.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize time",this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",this.APPEND_ERROR_MESSAGE="chunk is not defined",this.REMOVE_ERROR_MESSAGE="buffer is not defined",this.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",this.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : "}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"52":52}],52:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(){p(this,o)}return t(o,[{key:"extend",value:function(f,h){if(!!f){var m=h?h.override:!1,u=h?h.publicOnly:!1;for(var _ in f)!f.hasOwnProperty(_)||this[_]&&!m||u&&f[_].indexOf("public_")===-1||(this[_]=f[_])}}}]),o}();r.default=i,g.exports=r.default},{}],53:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(u,_,C){var k=!0;e:for(;k;){var R=u,P=_,w=C;k=!1,R===null&&(R=Function.prototype);var H=Object.getOwnPropertyDescriptor(R,P);if(H===void 0){var N=Object.getPrototypeOf(R);if(N===null)return;u=N,_=P,C=w,k=!0,H=N=void 0;continue e}else{if("value"in H)return H.value;var A=H.get;return A===void 0?void 0:A.call(w)}}};function p(m){return m&&m.__esModule?m:{default:m}}function i(m,u){if(!(m instanceof u))throw new TypeError("Cannot call a class as a function")}function o(m,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);m.prototype=Object.create(u&&u.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(m,u):m.__proto__=u)}var n=e(55),f=p(n),h=function(m){o(u,m);function u(){i(this,u),t(Object.getPrototypeOf(u.prototype),"constructor",this).call(this),this.ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.INBAND_EVENTS="inbandEvents",this.INITIALIZATION_LOADED="initializationLoaded",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_FRAGMENT_NEEDED="initFragmentNeeded",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",this.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_PROGRESS="loadingProgress",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_ABANDONED="loadingAborted",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATE_STARTED="representationUpdateStarted",this.REPRESENTATION_UPDATE_COMPLETED="representationUpdateCompleted",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.VIDEO_CHUNK_RECEIVED="videoChunkReceived",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady",this.SEGMENTBASE_INIT_REQUEST_NEEDED="segmentBaseInitRequestNeeded",this.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED="segmentBaseSegmentsListRequestNeeded",this.SEEK_TARGET="seekTarget"}return u}(f.default);r.default=h,g.exports=r.default},{"55":55}],54:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(53),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).apply(this,arguments)}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"53":53}],55:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(){p(this,o)}return t(o,[{key:"extend",value:function(f,h){if(!!f){var m=h?h.override:!1,u=h?h.publicOnly:!1;for(var _ in f)!f.hasOwnProperty(_)||this[_]&&!m||u&&f[_].indexOf("public_")===-1||(this[_]=f[_])}}}]),o}();r.default=i,g.exports=r.default},{}],56:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(D){return D&&D.__esModule?D:{default:D}}var p=e(61),i=t(p),o=e(95),n=t(o),f=e(90),h=t(f),m=e(98),u=t(m),_=e(89),C=t(_),k=e(87),R=t(k),P=e(47),w=t(P),H=e(65),N=t(H),A=e(66),M=t(A);function I(){var D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=this.context,U="urn:dvb:dash:profile:dvb-dash:2014";function Y(){v=(0,N.default)(x).getInstance(),T=(0,M.default)(x).getInstance(),at()}function oe(){return O}function ue(){return W}function re(Ce){!Ce||(Ce.constants&&(L=Ce.constants),Ce.cea608parser&&(K=Ce.cea608parser),Ce.errHandler&&v.setConfig({errHandler:Ce.errHandler}),Ce.BASE64&&v.setConfig({BASE64:Ce.BASE64}))}function ve(Ce){if(Ce){var Pe=new n.default,Ye=Ce.adaptation.period.mpd.manifest.Period_asArray[Ce.adaptation.period.index].AdaptationSet_asArray[Ce.adaptation.index],Ze=v.getRepresentationFor(Ce.index,Ye);return Pe.id=Ce.id,Pe.quality=Ce.index,Pe.bandwidth=v.getBandwidth(Ze),Pe.DVRWindow=Ce.segmentAvailabilityRange,Pe.fragmentDuration=Ce.segmentDuration||(Ce.segments&&Ce.segments.length>0?Ce.segments[0].duration:NaN),Pe.MSETimeOffset=Ce.MSETimeOffset,Pe.mediaInfo=St(Ce.adaptation),Pe}else return null}function ce(Ce,Pe){if(W.length===0||!Ce)return null;var Ye=tt(Ce,W);if(!Ye)return null;var Ze=Ye.id;O[Ze]=O[Ze]||v.getAdaptationsForPeriod(Ye);var ut=J(Ce.index,Pe,Ce);if(!ut)return null;var Ue=v.getIndexForAdaptation(ut,W[0].mpd.manifest,Ce.index);return St(O[Ze][Ue])}function se(Ce){return v.getRolesForAdaptation(Ce).filter(function(Pe){return Pe.value===i.default.MAIN})[0]}function J(Ce,Pe,Ye){var Ze=v.getAdaptationsForType(W[0].mpd.manifest,Ce,Pe);if(!Ze||Ze.length===0)return null;if(Ze.length>1&&Ye){var ut=ie(Ye,Pe);if(B[Ye.id]&&B[Ye.id][Pe]){for(var Ue=0,Je=Ze.length;Ue<Je;Ue++)if(ee(B[Ye.id][Pe],ut[Ue]))return Ze[Ue]}for(var Ue=0,Je=Ze.length;Ue<Je;Ue++)if(se(Ze[Ue]))return Ze[Ue]}return Ze[0]}function ee(Ce,Pe){if(!Ce||!Pe)return!1;var Ye=Ce.id===Pe.id,Ze=Ce.viewpoint===Pe.viewpoint,ut=Ce.lang===Pe.lang,Ue=Ce.roles.toString()===Pe.roles.toString(),Je=Ce.accessibility.toString()===Pe.accessibility.toString(),ht=Ce.audioChannelConfiguration.toString()===Pe.audioChannelConfiguration.toString();return Ye&&Ze&&ut&&Ue&&Je&&ht}function ie(Ce,Pe,Ye){var Ze=W,ut=Ye,Ue=[],Je=void 0,ht=void 0,Et=void 0,rt=void 0,Dt=void 0,kt=void 0,ft=void 0;if(ut)ze(),Ze=$(ut);else if(W.length>0)ut=W[0].mpd.manifest;else return Ue;var Gt=tt(Ce,Ze);Gt&&(ft=Gt.id);var Kt=v.getAdaptationsForType(ut,Ce?Ce.index:null,Pe!==L.EMBEDDED_TEXT?Pe:L.VIDEO);if(!Kt||Kt.length===0)return Ue;for(O[ft]=O[ft]||v.getAdaptationsForPeriod(Gt),rt=0,kt=Kt.length;rt<kt;rt++)if(Je=Kt[rt],Et=v.getIndexForAdaptation(Je,ut,Ce.index),ht=St(O[ft][Et]),Pe===L.EMBEDDED_TEXT){var Vt=ht.accessibility.length;for(Dt=0;Dt<Vt;Dt++)if(!!ht){var Pt=ht.accessibility[Dt];if(Pt.indexOf("cea-608:")===0){var Ee=Pt.substring(8),Z=Ee.split(";");if(Z[0].substring(0,2)==="CC")for(Dt=0;Dt<Z.length;Dt++)ht||(ht=St.call(this,O[ft][Et])),Ct(ht,Z[Dt].substring(0,3),Z[Dt].substring(4)),Ue.push(ht),ht=null;else for(Dt=0;Dt<Z.length;Dt++)ht||(ht=St.call(this,O[ft][Et])),Ct(ht,"CC"+(Dt+1),Z[Dt]),Ue.push(ht),ht=null}else Pt.indexOf("cea-608")===0&&(Ct(ht,L.CC1,"eng"),Ue.push(ht),ht=null)}}else Pe===L.IMAGE?(wt(ht),Ue.push(ht),ht=null):ht&&Ue.push(ht);return Ue}function me(Ce){if(!Ce)return null;ze(),W=$(Ce),O={}}function de(Ce,Pe){var Ye=[],Ze=W;if(Ce&&(ze(),Ze=$(Ce)),Ze.length>0){(!Pe||Pe>Ze.length)&&(Pe=Ze.length);for(var ut=0;ut<Pe;ut++)Ye.push(We(Ze[ut]))}return Ye}function Q(Ce,Pe){var Ye=void 0,Ze=void 0,ut=tt(Ce,W);return Ye=Pe?Pe.id:null,W.length>0&&ut&&(Ze=Ye?v.getAdaptationForId(Ye,W[0].mpd.manifest,ut.index):v.getAdaptationForIndex(Pe?Pe.index:null,W[0].mpd.manifest,ut.index)),Ze}function X(Ce){try{return v.getEssentialPropertiesForRepresentation(Ce)}catch(Pe){return[]}}function j(Ce){return v.getRealPeriodForIndex(Ce,W[0].mpd.manifest)}function le(Ce){var Pe=void 0,Ye=ct(Ce);return Pe=v.getRepresentationsForAdaptation(Ye),Pe}function G(Ce,Pe,Ye,Ze){try{if(!Ce||!Pe||isNaN(Ye)||!Ze)return null;var ut=Ce.scheme_id_uri,Ue=Ce.value;if(!Pe[ut+"/"+Ue])return null;var Je=new R.default,ht=Ce.timescale||1,Et=Ze.adaptation.period.start,rt=Pe[ut+"/"+Ue],Dt=isNaN(Ze.presentationTimeOffset)?isNaN(rt.presentationTimeOffset)?0:rt.presentationTimeOffset:Ze.presentationTimeOffset,kt=Ce.presentation_time_delta/ht,ft=void 0;Ce.version===0?ft=Et+Ye-Dt+kt:ft=Et-Dt+kt;var Gt=Ce.event_duration,Kt=Ce.id,Vt=Ce.message_data;return Je.eventStream=rt,Je.eventStream.value=Ue,Je.eventStream.timescale=ht,Je.duration=Gt,Je.id=Kt,Je.calculatedPresentationTime=ft,Je.messageData=Vt,Je.presentationTimeDelta=kt,Je}catch(Pt){return null}}function c(Ce,Pe){var Ye=[];if(W.length>0){var Ze=W[0].mpd.manifest;Ce instanceof u.default?Ye=v.getEventsForPeriod(tt(Ce,W)):Ce instanceof h.default?Ye=v.getEventStreamForAdaptationSet(Ze,ct(Ce)):Ce instanceof n.default&&(Ye=v.getEventStreamForRepresentation(Ze,Pe))}return Ye}function E(Ce,Pe,Ye){B[Ce]=B[Ce]||{},B[Ce][Pe]=B[Ce][Pe]||{},B[Ce][Pe]=Ye}function b(Ce){return v.getIsTextTrack(Ce)}function l(){var Ce=lt();return v.getUTCTimingSources(Ce)}function d(){var Ce=W.length>0?W[0].mpd:null;return v.getSuggestedPresentationDelay(Ce)}function y(Ce){var Pe=ae(Ce);return v.getAvailabilityStartTime(Pe)}function V(Ce){var Pe=lt(Ce);return v.getIsDynamic(Pe)}function te(Ce){var Pe=lt(Ce);return v.getDuration(Pe)}function $(Ce){var Pe=ae(Ce);return v.getRegularPeriods(Pe)}function ae(Ce){var Pe=lt(Ce);return v.getMpd(Pe)}function ne(Ce){return v.getLocation(Ce)}function Se(Ce){var Pe=arguments.length<=1||arguments[1]===void 0?0:arguments[1];return v.getManifestUpdatePeriod(Ce,Pe)}function Ie(Ce){return v.getPublishTime(Ce)}function he(Ce){var Pe=v.getPatchLocation(Ce),Ye=v.getPublishTime(Ce);if(!Pe||!Ye)return null;if(Pe.hasOwnProperty("ttl")&&Ye){var Ze=parseFloat(Pe.ttl)*1e3;if(Ye.getTime()+Ze<=new Date().getTime())return null}return Pe.__text}function ye(Ce){return v.hasProfile(Ce,U)}function _e(Ce){return T.getIsPatch(Ce)}function pe(Ce){return v.getBaseURLsFromElement(Ce)}function De(){return v.getRepresentationSortFunction()}function je(Ce,Pe,Ye){return v.getCodec(Ce,Pe,Ye)}function Fe(Ce,Pe){var Ye=void 0,Ze=mt(Pe);return Ye=pt(Ze,Ce),Ye?Ye.bandwidth:null}function Le(Ce,Pe){var Ye=mt(Pe);return vt(Ye,Ce)}function Ve(Ce,Pe){var Ye=mt(Pe);return Rt(Ye,Ce)}function Ge(Ce){if(!Ce||W.length===0)return null;var Pe=W.filter(function(Ye){return Ye.id===Ce});return Pe&&Pe.length>0?Pe[0]:null}function we(Ce,Pe){return v.getIsTypeOf(Ce,Pe)}function at(){W=[],O={},B={}}function Re(Ce,Pe){var Ye=v.getId(Ce),Ze=T.getMpdId(Pe),ut=v.getPublishTime(Ce),Ue=T.getPublishTime(Pe),Je=T.getOriginalPublishTime(Pe);return!!(Ye&&Ze&&Ye==Ze&&ut&&Je&&ut.getTime()==Je.getTime()&&Ue&&ut.getTime()<Ue.getTime())}function Xe(Ce,Pe){T.getPatchOperations(Pe).forEach(function(Ye){var Ze=Ye.getMpdTarget(Ce);if(Ze!==null){var ut=Ze.name,Ue=Ze.target,Je=Ze.leaf;if(Ye.xpath.findsAttribute()){switch(Ye.action){case"add":case"replace":Ue[ut]=Ye.value;break;case"remove":delete Ue[ut];break}return}var ht=(Ue[ut+"_asArray"]||[]).indexOf(Je),Et=Ye.position==="prepend"||Ye.position==="before";if((Ye.action==="remove"||Ye.action==="replace")&&(delete Ue[ut],ht!=-1)){var rt=Ue[ut+"_asArray"];rt.splice(ht,1),rt.length>1?Ue[ut]=rt:rt.length==1?Ue[ut]=rt[0]:delete Ue[ut+"_asArray"]}(Ye.action==="add"||Ye.action==="replace")&&Object.keys(Ye.value).forEach(function(Dt){var kt=Ye.value[Dt],ft=Ue[Dt+"_asArray"]||[];if(ft.length===0&&Ue[Dt]&&ft.push(Ue[Dt]),ft.length===0)ft=kt;else{var Gt=ft.length;Dt==ut&&ht!=-1?Gt=ht+(Et?0:1)+(Ye.action=="replace"?-1:0):Gt=Et?0:ft.length,ft.splice.apply(ft,[Gt,0].concat(kt))}Ue[Dt+"_asArray"]=ft,Ue[Dt]=ft.length==1?ft[0]:ft})}})}function lt(Ce){return Ce||(W.length>0?W[0].mpd.manifest:null)}function ct(Ce){return!Ce||!Ce.streamInfo||Ce.streamInfo.id===void 0||!O[Ce.streamInfo.id]?null:O[Ce.streamInfo.id][Ce.index]}function tt(Ce,Pe){for(var Ye=Pe.length,Ze=0;Ze<Ye;Ze++){var ut=Pe[Ze];if(Ce&&Ce.id===ut.id)return ut}return null}function St(Ce){if(!Ce)return null;var Pe=new h.default,Ye=Ce.period.mpd.manifest.Period_asArray[Ce.period.index].AdaptationSet_asArray[Ce.index],Ze=void 0;return Pe.id=Ce.id,Pe.index=Ce.index,Pe.type=Ce.type,Pe.streamInfo=We(Ce.period),Pe.representationCount=v.getRepresentationCount(Ye),Pe.labels=v.getLabelsForAdaptation(Ye),Pe.lang=v.getLanguageForAdaptation(Ye),Ze=v.getViewpointForAdaptation(Ye),Pe.viewpoint=Ze?Ze.value:void 0,Pe.accessibility=v.getAccessibilityForAdaptation(Ye).map(function(ut){var Ue=ut.value,Je=Ue;return ut.schemeIdUri&&ut.schemeIdUri.search("cea-608")>=0&&typeof K!="undefined"&&(Ue?Je="cea-608:"+Ue:Je="cea-608",Pe.embeddedCaptions=!0),Je}),Pe.audioChannelConfiguration=v.getAudioChannelConfigurationForAdaptation(Ye).map(function(ut){return ut.value}),Pe.audioChannelConfiguration.length===0&&Array.isArray(Ye.Representation_asArray)&&Ye.Representation_asArray.length>0&&(Pe.audioChannelConfiguration=v.getAudioChannelConfigurationForRepresentation(Ye.Representation_asArray[0]).map(function(ut){return ut.value})),Pe.roles=v.getRolesForAdaptation(Ye).map(function(ut){return ut.value}),Pe.codec=v.getCodec(Ye),Pe.mimeType=v.getMimeType(Ye),Pe.contentProtection=v.getContentProtectionData(Ye),Pe.bitrateList=v.getBitrateListForAdaptation(Ye),Pe.contentProtection&&Pe.contentProtection.forEach(function(ut){ut.KID=v.getKID(ut)}),Pe.isText=v.getIsTextTrack(Pe.mimeType),Pe.supplementalProperties=v.getSupplementalPropperties(Ye),Pe}function Ct(Ce,Pe,Ye){Ce.id=Pe,Ce.index=100+parseInt(Pe.substring(2,3)),Ce.type=L.EMBEDDED_TEXT,Ce.codec="cea-608-in-SEI",Ce.isText=!0,Ce.isEmbedded=!0,Ce.lang=Ye,Ce.roles=["caption"]}function wt(Ce){Ce.type=L.IMAGE}function We(Ce){var Pe=new u.default,Ye=1;return Pe.id=Ce.id,Pe.index=Ce.index,Pe.start=Ce.start,Pe.duration=Ce.duration,Pe.manifestInfo=He(Ce.mpd),Pe.isLast=Ce.mpd.manifest.Period_asArray.length===1||Math.abs(Pe.start+Pe.duration-Pe.manifestInfo.duration)<Ye,Pe}function He(Ce){var Pe=new C.default;return Pe.DVRWindowSize=Ce.timeShiftBufferDepth,Pe.loadedTime=Ce.manifest.loadedTime,Pe.availableFrom=Ce.availabilityStartTime,Pe.minBufferTime=Ce.manifest.minBufferTime,Pe.maxFragmentDuration=Ce.maxSegmentDuration,Pe.duration=v.getDuration(Ce.manifest),Pe.isDynamic=v.getIsDynamic(Ce.manifest),Pe.serviceDescriptions=v.getServiceDescriptions(Ce.manifest),Pe.protocol=Ce.manifest.protocol,Pe}function ze(){if(!L)throw new Error("setConfig function has to be called previously")}function mt(Ce){return W.length>0?W[0].mpd.manifest.Period_asArray[Ce]:null}function vt(Ce,Pe){var Ye=pt(Ce,Pe,!0);return Ye!==null?Ye:-1}function pt(Ce,Pe,Ye){var Ze=void 0,ut=void 0,Ue=void 0,Je=void 0,ht=void 0,Et=void 0;if(Ce){for(ut=Ce.AdaptationSet_asArray,ht=0;ht<ut.length;ht=ht+1)for(Ze=ut[ht],Je=Ze.Representation_asArray,Et=0;Et<Je.length;Et=Et+1)if(Ue=Je[Et],Pe===Ue.id)return Ye?Et:Ue}return null}function Rt(Ce,Pe){var Ye=void 0,Ze=void 0,ut=void 0,Ue=void 0;if(!Ce||!Pe)return-1;for(Ze=Ce.AdaptationSet_asArray,Ue=0;Ue<Ze.length;Ue=Ue+1)if(Ye=Ze[Ue],ut=Ye.Representation_asArray,v.getIsTypeOf(Ye,Pe))return ut.length;return-1}return D={getBandwidthForRepresentation:Fe,getIndexForRepresentation:Le,getMaxIndexForBufferType:Ve,convertDataToRepresentationInfo:ve,getDataForMedia:ct,getStreamsInfo:de,getMediaInfoForType:ce,getAllMediaInfoForType:ie,getAdaptationForType:J,getRealAdaptation:Q,getRealPeriodByIndex:j,getEssentialPropertiesForRepresentation:X,getVoRepresentations:le,getEventsFor:c,getEvent:G,getMpd:ae,setConfig:re,updatePeriods:me,getIsTextTrack:b,getUTCTimingSources:l,getSuggestedPresentationDelay:d,getAvailabilityStartTime:y,getIsTypeOf:we,getIsDynamic:V,getDuration:te,getRegularPeriods:$,getLocation:ne,getPatchLocation:he,getManifestUpdatePeriod:Se,getPublishTime:Ie,getIsDVB:ye,getIsPatch:_e,getBaseURLsFromElement:pe,getRepresentationSortFunction:De,getCodec:je,getVoAdaptations:oe,getVoPeriods:ue,getPeriodById:Ge,setCurrentMediaInfo:E,isPatchValid:Re,applyPatchToManifest:Xe,reset:at},Y(),D}I.__dashjs_factory_name="DashAdapter",r.default=w.default.getSingletonFactory(I),g.exports=r.default},{"47":47,"61":61,"65":65,"66":66,"87":87,"89":89,"90":90,"95":95,"98":98}],57:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(C){return C&&C.__esModule?C:{default:C}}var p=e(241),i=t(p),o=e(255),n=e(47),f=t(n),h=e(81),m=e(64),u=t(m);function _(C){C=C||{};var k=this.context,R=C.eventBus,P=C.events,w=C.debug,H=C.dashConstants,N=C.urlUtils,A=C.type,M=C.streamInfo,I=C.timelineConverter,D=C.dashMetrics,v=C.baseURLController,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0;function oe(){W=w.getLogger(T),ie(),Y=(0,u.default)(k).create(C),R.on(P.INITIALIZATION_LOADED,te,T),R.on(P.SEGMENTS_LOADED,$,T),R.on(P.REPRESENTATION_UPDATE_STARTED,G,T),R.on(P.DYNAMIC_TO_STATIC,ae,T)}function ue(ne){K=ne,x=!1,Y.initialize(ne)}function re(){return M.id}function ve(){return A}function ce(){return M}function se(ne){O=ne}function J(){return O}function ee(){O=-1,B=null}function ie(){ee(),L=null,Y=null,U=null}function me(){ie(),R.off(P.INITIALIZATION_LOADED,te,T),R.off(P.SEGMENTS_LOADED,$,T),R.off(P.REPRESENTATION_UPDATE_STARTED,G,T),R.off(P.DYNAMIC_TO_STATIC,ae,T)}function de(ne,Se,Ie){var he=v.resolve(Ie.path),ye=void 0,_e=void 0;return!he||Se===he.url||!N.isRelative(Se)?ye=Se:(ye=he.url,_e=he.serviceLocation,Se&&(ye=N.resolve(Se,ye))),N.isRelative(ye)?!1:(ne.url=ye,ne.serviceLocation=_e,!0)}function Q(ne,Se,Ie){var he=new i.default,ye=Se.adaptation.period,_e=ye.start;if(he.mediaType=Ie,he.type=o.HTTPRequest.INIT_SEGMENT_TYPE,he.range=Se.range,he.availabilityStartTime=I.calcAvailabilityStartTimeFromPresentationTime(_e,ye.mpd,K),he.availabilityEndTime=I.calcAvailabilityEndTimeFromPresentationTime(_e+ye.duration,ye.mpd,K),he.quality=Se.index,he.mediaInfo=ne,he.representationId=Se.id,de(he,Se.initialization,Se))return he.url=(0,h.replaceTokenForTemplate)(he.url,"Bandwidth",Se.bandwidth),he}function X(ne,Se){if(!Se)return null;var Ie=Q(ne,Se,ve());return Ie}function j(ne){U=ne}function le(ne){I.setExpectedLiveEdge(ne),D.updateManifestUpdateInfo({presentationStartTime:ne})}function G(ne){c(ne.representation)}function c(ne){var Se=ne.hasInitialization(),Ie=ne.hasSegments();Se&&Ie?R.trigger(P.REPRESENTATION_UPDATE_COMPLETED,{representation:ne},{streamId:M.id,mediaType:A}):Y.update(ne,U,Se,Ie)}function E(ne,Se){if(Se==null)return null;var Ie=new i.default,he=Se.representation,ye=he.adaptation.period.mpd.manifest.Period_asArray[he.adaptation.period.index].AdaptationSet_asArray[he.adaptation.index].Representation_asArray[he.index].bandwidth,_e=Se.media;if(_e=(0,h.replaceTokenForTemplate)(_e,"Number",Se.replacementNumber),_e=(0,h.replaceTokenForTemplate)(_e,"Time",Se.replacementTime),_e=(0,h.replaceTokenForTemplate)(_e,"Bandwidth",ye),_e=(0,h.replaceIDForTemplate)(_e,he.id),_e=(0,h.unescapeDollarsInTemplate)(_e),Ie.mediaType=ve(),Ie.type=o.HTTPRequest.MEDIA_SEGMENT_TYPE,Ie.range=Se.mediaRange,Ie.startTime=Se.presentationStartTime,Ie.mediaStartTime=Se.mediaStartTime,Ie.duration=Se.duration,Ie.timescale=he.timescale,Ie.availabilityStartTime=Se.availabilityStartTime,Ie.availabilityEndTime=Se.availabilityEndTime,Ie.wallStartTime=Se.wallStartTime,Ie.quality=he.index,Ie.index=Se.availabilityIdx,Ie.mediaInfo=ne,Ie.adaptationIndex=he.adaptation.index,Ie.representationId=he.id,de(Ie,_e,he))return Ie}function b(ne){var Se=!1;if(!ne)return Se;if(!K)O>=ne.availableSegmentsNumber&&(Se=!0);else if(x)Se=!0;else if(B){var Ie=parseFloat((B.presentationStartTime-ne.adaptation.period.start).toFixed(5)),he=B.duration>0?Ie+1.5*B.duration:Ie,ye=ne.adaptation.period.duration;Se=he>=ye}return Se}function l(ne,Se,Ie,he){var ye=null;if(!Se||!Se.segmentInfoType)return ye;var _e=O,pe=he?he.keepIdx:!1,De=!!(he&&he.ignoreIsFinished);L!==Ie&&(L=Ie,W.debug("Getting the request for time : "+Ie));var je=Y.getSegmentByTime(Se,Ie);if(je)O=je.availabilityIdx,B=je,W.debug("Index for time "+Ie+" is "+O),ye=E(ne,je);else{var Fe=De?!1:b(Se);Fe&&(ye=new i.default,ye.action=i.default.ACTION_COMPLETE,ye.index=O-1,ye.mediaType=A,ye.mediaInfo=ne,W.debug("Signal complete in getSegmentRequestForTime"))}return pe&&_e>=0&&(O=Se.segmentInfoType===H.SEGMENT_TIMELINE&&K?O:_e),ye}function d(ne,Se){var Ie=null,he=O+1,ye=Y.getSegmentByIndex(Se,he,B?B.mediaStartTime:-1);return ye?(Ie=E(ne,ye),Ie):null}function y(ne,Se){var Ie=null;if(!Se||!Se.segmentInfoType)return null;L=null;var he=O+1;W.debug("Getting the next request at index: "+he);var ye=Y.getSegmentByIndex(Se,he,B?B.mediaStartTime:-1);if(!ye&&V(Se)&&!x)return W.debug(ve()+" No segment found at index: "+he+". Wait for next loop"),null;if(ye?(Ie=E(ne,ye),O=ye.availabilityIdx):K?O=he-1:O=he,ye)B=ye;else{var _e=b(Se,ye);_e&&(Ie=new i.default,Ie.action=i.default.ACTION_COMPLETE,Ie.index=O-1,Ie.mediaType=ve(),Ie.mediaInfo=ne,W.debug("Signal complete"))}return Ie}function V(ne){return!isFinite(ne.adaptation.period.duration)}function te(ne){var Se=ne.representation;!Se.segments||R.trigger(P.REPRESENTATION_UPDATE_COMPLETED,{representation:Se},{streamId:M.id,mediaType:A})}function $(ne){if(!ne.error){var Se=ne.segments,Ie=ne.representation,he=[],ye=0,_e=void 0,pe=void 0,De=void 0,je=void 0;for(_e=0,pe=Se?Se.length:0;_e<pe;_e++)De=Se[_e],je=(0,h.getTimeBasedSegment)(I,K,Ie,De.startTime,De.duration,De.timescale,De.media,De.mediaRange,ye),je&&(he.push(je),je=null,ye++);if(he.length>0&&(Ie.segmentAvailabilityRange={start:he[0].presentationStartTime,end:he[he.length-1].presentationStartTime},Ie.availableSegmentsNumber=he.length,Ie.segments=he,K)){var Fe=he[he.length-1],Le=Fe.presentationStartTime-8;le(Le)}!Ie.hasInitialization()||R.trigger(P.REPRESENTATION_UPDATE_COMPLETED,{representation:Ie},{streamId:M.id,mediaType:A})}}function ae(){W.debug("Dynamic stream complete"),x=!0}return T={initialize:ue,getStreamId:re,getType:ve,getStreamInfo:ce,getInitRequest:X,getRequestForSegment:E,getSegmentRequestForTime:l,getNextSegmentRequest:y,setCurrentIndex:se,getCurrentIndex:J,isMediaFinished:b,reset:me,resetIndex:ee,setMimeType:j,getNextSegmentRequestIdempotent:d},oe(),T}_.__dashjs_factory_name="DashHandler",r.default=f.default.getClassFactory(_),g.exports=r.default},{"241":241,"255":255,"47":47,"64":64,"81":81}],58:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(112),i=t(p),o=e(255),n=e(47),f=t(n),h=e(113),m=t(h),u=e(79),_=t(u),C=e(157),k=t(C),R=e(49),P=t(R),w=e(257);function H(N){N=N||{};var A=this.context,M=void 0,I=void 0,D=void 0,v=void 0,T=N.metricsModel;function W(){T=T||(0,k.default)(A).getInstance({settings:N.settings}),O()}function O(){I=!0,D=null,v=null}function B(ae){var ne=T.getMetricsFor(ae,!0);return ce(ne,m.default.TRACK_SWITCH)}function L(ae,ne,Se,Ie,he){T.addRepresentationSwitch(ae,ne,Se,Ie,he)}function K(ae){var ne=T.getMetricsFor(ae,!0);return ce(ne,m.default.BUFFER_STATE)}function x(ae){var ne=T.getMetricsFor(ae,!0),Se=ce(ne,m.default.BUFFER_LEVEL);return Se?_.default.round10(Se.level/1e3,-3):0}function U(ae,ne,Se){T.addBufferLevel(ae,ne,Se)}function Y(ae,ne,Se){T.addBufferState(ae,ne,Se)}function oe(){T.clearAllCurrentMetrics()}function ue(ae){var ne=T.getMetricsFor(ae,!0);if(!ne)return null;var Se=ne.HttpList,Ie=null,he=void 0;if(!Se||Se.length<=0)return null;for(he=Se.length-1;he>=0;){if(Se[he].responsecode){Ie=Se[he];break}he--}return Ie}function re(ae){var ne=T.getMetricsFor(ae,!0);return ne?ne.HttpList?ne.HttpList:[]:[]}function ve(ae,ne,Se){T.addRequestsQueue(ae,ne,Se)}function ce(ae,ne){if(!ae)return null;var Se=ae[ne];return!Se||Se.length===0?null:Se[Se.length-1]}function se(){var ae=T.getMetricsFor(i.default.VIDEO,!0);return ce(ae,m.default.DROPPED_FRAMES)}function J(ae){T.addDroppedFrames(i.default.VIDEO,ae)}function ee(ae){var ne=T.getMetricsFor(ae,!0);return ce(ne,m.default.SCHEDULING_INFO)}function ie(ae,ne){T.addSchedulingInfo(ae.mediaType,new Date,ae.type,ae.startTime,ae.availabilityStartTime,ae.duration,ae.quality,ae.range,ne)}function me(){var ae=T.getMetricsFor(i.default.STREAM);return ce(ae,m.default.MANIFEST_UPDATE)}function de(ae){var ne=this.getCurrentManifestUpdate();T.updateManifestUpdateInfo(ne,ae)}function Q(ae){if(ae){var ne=this.getCurrentManifestUpdate();T.addManifestUpdateStreamInfo(ne,ae.id,ae.index,ae.start,ae.duration)}}function X(ae){T.addManifestUpdate(i.default.STREAM,ae.type,ae.requestStartDate,ae.requestEndDate)}function j(ae,ne,Se,Ie,he){T.addHttpRequest(ae.mediaType,null,ae.type,ae.url,ae.quality,ne,ae.serviceLocation||null,ae.range||null,ae.requestStartDate,ae.firstByteDate,ae.requestEndDate,Se,ae.duration,Ie,he)}function le(ae,ne){if(ae){var Se=this.getCurrentManifestUpdate();T.addManifestUpdateRepresentationInfo(Se,ae.id,ae.index,ae.streamIndex,ne,ae.presentationTimeOffset,ae.startNumber,ae.fragmentInfoType)}}function G(ae){var ne=ae?T.getMetricsFor(ae,!0):T.getMetricsFor(i.default.VIDEO,!0)||T.getMetricsFor(i.default.AUDIO,!0);return ce(ne,m.default.DVR_INFO)}function c(ae,ne,Se,Ie){T.addDVRInfo(ae,ne,Se,Ie)}function E(ae){var ne={},Se=void 0,Ie=void 0,he=void 0;for(Se=re(i.default.STREAM),he=Se.length-1;he>=0;he--)if(Ie=Se[he],Ie.type===o.HTTPRequest.MPD_TYPE){ne=P.default.parseHttpHeaders(Ie._responseHeaders);break}return ne[ae]===void 0?null:ne[ae]}function b(ae,ne){var Se={},Ie=ue(ae,!0);return Ie&&(Se=P.default.parseHttpHeaders(Ie._responseHeaders)),Se[ne]===void 0?null:Se[ne]}function l(){v&&(T.addPlayList(v),v=null)}function d(ae,ne){v=new w.PlayList,v.start=new Date,v.mstart=ae,v.starttype=ne}function y(ae,ne,Se){I===!0&&(I=!1,D=new w.PlayListTrace,D.representationid=ae,D.start=new Date,D.mstart=ne,D.playbackspeed=Se!==null?Se.toString():null)}function V(ae){if(D)for(var ne in D)D[ne]=ae[ne]}function te(ae,ne){if(I===!1&&v&&D&&D.start){var Se=D.start,Ie=ae.getTime()-Se.getTime();D.duration=Ie,D.stopreason=ne,v.trace.push(D),I=!0}}function $(ae){T.addDVBErrors(ae)}return M={getCurrentRepresentationSwitch:B,getCurrentBufferState:K,getCurrentBufferLevel:x,getCurrentHttpRequest:ue,getHttpRequests:re,getCurrentDroppedFrames:se,getCurrentSchedulingInfo:ee,getCurrentDVRInfo:G,getCurrentManifestUpdate:me,getLatestFragmentRequestHeaderValueByID:b,getLatestMPDRequestHeaderValueByID:E,addRepresentationSwitch:L,addDVRInfo:c,updateManifestUpdateInfo:de,addManifestUpdateStreamInfo:Q,addManifestUpdateRepresentationInfo:le,addManifestUpdate:X,addHttpRequest:j,addSchedulingInfo:ie,addRequestsQueue:ve,addBufferLevel:U,addBufferState:Y,addDroppedFrames:J,addPlayList:l,addDVBErrors:$,createPlaylistMetrics:d,createPlaylistTraceMetrics:y,updatePlayListTraceMetrics:V,pushPlayListTraceMetrics:te,clearAllCurrentMetrics:oe},W(),M}H.__dashjs_factory_name="DashMetrics",r.default=f.default.getSingletonFactory(H),g.exports=r.default},{"112":112,"113":113,"157":157,"255":255,"257":257,"47":47,"49":49,"79":79}],59:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(96),i=t(p),o=e(239),n=t(o),f=e(47),h=t(f),m=e(241),u=t(m),_=e(163),C=t(_);function k(){var R=this.context,P=void 0,w=void 0,H=void 0,N=void 0,A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0;function U(){}function Y(){v=(0,C.default)(R).create({errHandler:H,dashMetrics:M,mediaPlayerModel:D,requestModifier:A,useFetch:I?I.get().streaming.lowLatencyEnabled:null,boxParser:N,errors:O,urlUtils:K,constants:B,dashConstants:L})}function oe(ie){ie.baseURLController&&(x=ie.baseURLController),ie.dashMetrics&&(M=ie.dashMetrics),ie.mediaPlayerModel&&(D=ie.mediaPlayerModel),ie.errHandler&&(H=ie.errHandler),ie.settings&&(I=ie.settings),ie.boxParser&&(N=ie.boxParser),ie.events&&(T=ie.events),ie.eventBus&&(W=ie.eventBus),ie.debug&&(w=ie.debug.getLogger(P)),ie.requestModifier&&(A=ie.requestModifier),ie.errors&&(O=ie.errors),ie.urlUtils&&(K=ie.urlUtils),ie.constants&&(B=ie.constants),ie.dashConstants&&(L=ie.dashConstants)}function ue(){if(!x||!x.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function re(ie,me,de,Q){ue();var X=null,j=de?x.resolve(de.path):null,le=Q||{init:!0,url:j?j.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:me};w.debug("Start searching for initialization.");var G=J(le),c=function(l){le.bytesLoaded=le.range.end,X=N.findInitRange(l),X?(de.range=X,W.trigger(T.INITIALIZATION_LOADED,{representation:de},{streamId:ie,mediaType:me})):(le.range.end=le.bytesLoaded+le.bytesToLoad,re(ie,me,de,le))},E=function(){W.trigger(T.INITIALIZATION_LOADED,{representation:de},{streamId:ie,mediaType:me})};v.load({request:G,success:c,error:E}),w.debug("Perform init search: "+le.url)}function ve(ie,me,de,Q,X,j){if(ue(),Q&&(Q.start===void 0||Q.end===void 0)){var le=Q?Q.toString().split("-"):null;Q=le?{start:parseFloat(le[0]),end:parseFloat(le[1])}:null}X=X||ee;var G=null,c=null,E=!!Q,b=de?x.resolve(de.path):null,l={init:!1,url:b?b.url:void 0,range:E?Q:{start:0,end:1500},searching:!E,bytesLoaded:j?j.bytesLoaded:0,bytesToLoad:1500,mediaType:me},d=J(l),y=function($){var ae=l.bytesToLoad,ne=$.byteLength;if(l.bytesLoaded=l.range.end-l.range.start,G=N.parse($),c=G.getBox("sidx"),!c||!c.isComplete){if(c)l.range.start=c.offset||l.range.start,l.range.end=l.range.start+(c.size||ae);else if(ne<l.bytesLoaded){X(ie,me,null,de);return}else{var Se=G.getLastBox();Se&&Se.size?(l.range.start=Se.offset+Se.size,l.range.end=l.range.start+ae):l.range.end+=ae}ve(ie,me,de,l.range,X,l)}else{var Ie=c.references,he=void 0,ye=void 0;Ie!=null&&Ie.length>0&&(he=Ie[0].reference_type===1),he?function(){w.debug("Initiate multiple SIDX load."),l.range.end=l.range.start+c.size;var _e=void 0,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=[],Ve=0,Ge=(c.offset||l.range.start)+c.size,we=function(Re,Xe,lt){lt?(Le=Le.concat(lt),Ve++,Ve>=pe&&(Le.sort(function(ct,tt){return ct.startTime-tt.startTime<0?-1:0}),X(Re,Xe,Le,de))):X(Re,Xe,null,de)};for(_e=0,pe=Ie.length;_e<pe;_e++)De=Ge,je=Ge+Ie[_e].referenced_size-1,Ge=Ge+Ie[_e].referenced_size,Fe={start:De,end:je},ve(ie,me,de,Fe,we,l)}():(w.debug("Parsing segments from SIDX. representation "+me+" - id: "+de.id+" for range : "+l.range.start+" - "+l.range.end),ye=se(c,l),X(ie,me,ye,de))}},V=function(){X(ie,me,null,de)};v.load({request:d,success:y,error:V}),w.debug("Perform SIDX load: "+l.url+" with range : "+l.range.start+" - "+l.range.end)}function ce(){v.abort(),v=null,H=null,N=null,A=null}function se(ie,me){for(var de=ie.references,Q=de.length,X=ie.timescale,j=ie.earliest_presentation_time,le=me.range.start+ie.offset+ie.first_offset+ie.size,G=[],c=void 0,E=void 0,b=void 0,l=void 0,d=0;d<Q;d++)b=de[d].subsegment_duration,l=de[d].referenced_size,c=new i.default,c.duration=b,c.startTime=j,c.timescale=X,E=le+l-1,c.mediaRange=le+"-"+E,G.push(c),j+=b,le+=l;return G}function J(ie){if(!!ie.url){var me=new u.default;return me.setInfo(ie),me}}function ee(ie,me,de,Q){W.trigger(T.SEGMENTS_LOADED,{segments:de,representation:Q,error:de?void 0:new n.default(O.SEGMENT_BASE_LOADER_ERROR_CODE,O.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:ie,mediaType:me})}return P={setConfig:oe,initialize:Y,loadInitialization:re,loadSegments:ve,reset:ce},U(),P}k.__dashjs_factory_name="SegmentBaseLoader",r.default=h.default.getSingletonFactory(k),g.exports=r.default},{"163":163,"239":239,"241":241,"47":47,"96":96}],60:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(225),i=t(p),o=e(112),n=t(o),f=e(47),h=t(f),m=e(96),u=t(m),_=e(241),C=t(_),k=e(163),R=t(k),P=e(239),w=t(P);function H(){var N=this.context,A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0;function Y(){I={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}}}function oe(){O=(0,R.default)(N).create({errHandler:D,dashMetrics:T,mediaPlayerModel:W,requestModifier:v,useFetch:B?B.get().streaming.lowLatencyEnabled:null,errors:x})}function ue(Q){if(!Q.baseURLController||!Q.dashMetrics||!Q.mediaPlayerModel||!Q.errHandler)throw new Error(n.default.MISSING_CONFIG_ERROR);U=Q.baseURLController,T=Q.dashMetrics,W=Q.mediaPlayerModel,D=Q.errHandler,B=Q.settings,K=Q.events,L=Q.eventBus,x=Q.errors,M=Q.debug.getLogger(A),v=Q.requestModifier}function re(Q){var X=[],j=(0,i.default)(N).create({data:Q}),le=void 0,G=void 0;for(j.consumeTagAndSize(I.Segment.Cues);j.moreData()&&j.consumeTagAndSize(I.Segment.Cues.CuePoint,!0);){for(le={},le.CueTime=j.parseTag(I.Segment.Cues.CuePoint.CueTime),le.CueTracks=[];j.moreData()&&j.consumeTag(I.Segment.Cues.CuePoint.CueTrackPositions,!0);){var c=j.getMatroskaCodedNum(),E=j.getPos();if(G={},G.Track=j.parseTag(I.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),G.Track===0)throw new Error("Cue track cannot be 0");G.ClusterPosition=j.parseTag(I.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),le.CueTracks.push(G),j.setPos(E+c)}if(le.CueTracks.length===0)throw new Error("Mandatory cuetrack not found");X.push(le)}if(X.length===0)throw new Error("mandatory cuepoint not found");return X}function ve(Q,X,j,le){var G=void 0,c=void 0,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0;for(c=re(Q),E=[],l=0,d=c.length;l<d;l+=1)b=new u.default,G=0,l<c.length-1?G=c[l+1].CueTime-c[l].CueTime:G=le-c[l].CueTime,b.duration=G,b.startTime=c[l].CueTime,b.timescale=1e3,y=c[l].CueTracks[0].ClusterPosition+X,l<c.length-1?V=c[l+1].CueTracks[0].ClusterPosition+X-1:V=j-1,b.mediaRange=y+"-"+V,E.push(b);return M.debug("Parsed cues: "+E.length+" cues."),E}function ce(Q,X,j,le){if(!Q||Q.byteLength===0){le(null);return}var G=(0,i.default)(N).create({data:Q}),c=void 0,E=void 0,b=void 0,l=void 0,d=j?j.split("-"):null,y=null,V={url:X,range:{start:d?parseFloat(d[0]):null,end:d?parseFloat(d[1]):null},request:y};for(M.debug("Parse EBML header: "+V.url),G.skipOverElement(I.EBML),G.consumeTag(I.Segment),b=G.getMatroskaCodedNum(),b+=G.getPos(),l=G.getPos();G.moreData()&&!G.consumeTagAndSize(I.Segment.Info,!0);)if(!(G.skipOverElement(I.Segment.SeekHead,!0)||G.skipOverElement(I.Segment.Tracks,!0)||G.skipOverElement(I.Segment.Cues,!0)||G.skipOverElement(I.Void,!0)))throw new Error("no valid top level element found");for(;c===void 0;){var te=G.getMatroskaCodedNum(!0),$=G.getMatroskaCodedNum();switch(te){case I.Segment.Info.Duration.tag:c=G[I.Segment.Info.Duration.parse]($);break;default:G.setPos(G.getPos()+$);break}}y=me(V);var ae=function(Ie){E=ve(Ie,l,b,c),le(E)},ne=function(){M.error("Download Error: Cues "+V.url),le(null)};O.load({request:y,success:ae,error:ne}),M.debug("Perform cues load: "+V.url+" bytes="+V.range.start+"-"+V.range.end)}function se(){if(!U||!U.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function J(Q,X,j,le){se();var G=null,c=j?U.resolve(j.path):null,E=j?j.range.split("-"):null,b=le||{range:{start:E?parseFloat(E[0]):null,end:E?parseFloat(E[1]):null},request:G,url:c?c.url:void 0,init:!0,mediaType:X};M.info("Start loading initialization."),G=me(b);var l=function(){L.trigger(K.INITIALIZATION_LOADED,{representation:j},{streamId:Q,mediaType:X})},d=function(){L.trigger(K.INITIALIZATION_LOADED,{representation:j},{streamId:Q,mediaType:X})};O.load({request:G,success:l,error:d}),M.debug("Perform init load: "+b.url)}function ee(Q,X,j,le,G){se();var c=null,E=j?U.resolve(j.path):null,b=E?E.url:void 0,l=8192,d={bytesLoaded:0,bytesToLoad:l,range:{start:0,end:l},request:c,url:b,init:!1,mediaType:X};G=G||ie,c=me(d),M.debug("Parsing ebml header");var y=function($){ce($,b,le,function(ae){G(Q,X,ae,j)})},V=function(){G(Q,X,null,j)};O.load({request:c,success:y,error:V})}function ie(Q,X,j,le){L.trigger(K.SEGMENTS_LOADED,{segments:j,representation:le,error:j?void 0:new w.default(x.SEGMENT_BASE_LOADER_ERROR_CODE,x.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:Q,mediaType:X})}function me(Q){var X=new C.default;return X.setInfo(Q),X}function de(){D=null,v=null}return A={setConfig:ue,initialize:oe,loadInitialization:J,loadSegments:ee,reset:de},Y(),A}H.__dashjs_factory_name="WebmSegmentBaseLoader",r.default=h.default.getSingletonFactory(H),g.exports=r.default},{"112":112,"163":163,"225":225,"239":239,"241":241,"47":47,"96":96}],61:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=function(){t(n,[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.PATCH_LOCATION="PatchLocation",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId"}}]);function n(){p(this,n),this.init()}return n}(),o=new i;r.default=o,g.exports=r.default},{}],62:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(112),i=t(p),o=e(239),n=t(o),f=e(47),h=t(f);function m(u){u=u||{};var _=u.eventBus,C=u.events,k=u.errors,R=u.abrController,P=u.dashMetrics,w=u.playbackController,H=u.timelineConverter,N=u.type,A=u.streamInfo,M=u.dashConstants,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0;function O(){oe(),_.on(C.QUALITY_CHANGE_REQUESTED,E,I),_.on(C.REPRESENTATION_UPDATE_COMPLETED,le,I),_.on(C.WALLCLOCK_TIME_UPDATED,c,I),_.on(C.MANIFEST_VALIDITY_CHANGED,b,I)}function B(){return A.id}function L(){return N}function K(){if(!R||!P||!w||!H)throw new Error(i.default.MISSING_CONFIG_ERROR)}function x(){return D}function U(){return v}function Y(){return W}function oe(){D=null,v=!0,T=[]}function ue(){_.off(C.QUALITY_CHANGE_REQUESTED,E,I),_.off(C.REPRESENTATION_UPDATE_COMPLETED,le,I),_.off(C.WALLCLOCK_TIME_UPDATED,c,I),_.off(C.MANIFEST_VALIDITY_CHANGED,b,I),oe()}function re(l,d,y,V){if(K(),Q(),T=d,W=ce(V),D=l,y!==i.default.VIDEO&&y!==i.default.AUDIO&&y!==i.default.FRAGMENTED_TEXT){X();return}me(w.getIsDynamic(),!0)}function ve(){K();var l=new Date,d=Y(),y=w.getTime()*1e3;d&&P.addRepresentationSwitch(d.adaptation.type,l,y,d.id)}function ce(l){return l==null||l>=T.length?null:T[l]}function se(l){return T.indexOf(l)}function J(){for(var l=0,d=T.length;l<d;l++){var y=T[l].segmentInfoType;if(T[l].segmentAvailabilityRange===null||!T[l].hasInitialization()||(y===M.SEGMENT_BASE||y===M.BASE_URL)&&!T[l].segments)return!1}return!0}function ee(l){H.setExpectedLiveEdge(l),P.updateManifestUpdateInfo({presentationStartTime:l})}function ie(l,d){if(l.segmentAvailabilityRange=H.calcSegmentAvailabilityRange(l,d),l.segmentAvailabilityRange.end<l.segmentAvailabilityRange.start){var y=new n.default(k.SEGMENTS_UNAVAILABLE_ERROR_CODE,k.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:l.segmentAvailabilityRange.start-l.segmentAvailabilityRange.end});X(y);return}d&&ee(l.segmentAvailabilityRange.end)}function me(l,d){K();for(var y=0,V=T.length;y<V;y++)ie(T[y],l),d&&_.trigger(C.REPRESENTATION_UPDATE_STARTED,{representation:T[y]},{streamId:A.id,mediaType:N})}function de(){T.forEach(function(l){l.segmentAvailabilityRange=null})}function Q(){v=!0,_.trigger(C.DATA_UPDATE_STARTED,{},{streamId:A.id,mediaType:N})}function X(l){v=!1,_.trigger(C.DATA_UPDATE_COMPLETED,{data:D,currentRepresentation:W,error:l},{streamId:A.id,mediaType:N})}function j(l){var d=l,y=function(){U()||(Q(),de(),me(w.getIsDynamic(),!0))};_.trigger(C.AST_IN_FUTURE,{delay:d}),setTimeout(y,d)}function le(l){if(!!U()){if(l.error){X(l.error);return}var d=l.representation,y=P.getCurrentManifestUpdate(),V=!1,te=0,$=void 0,ae=void 0,ne=void 0;if(d.adaptation.period.mpd.manifest.type===M.DYNAMIC&&!d.adaptation.period.mpd.manifest.ignorePostponeTimePeriod&&w.getStreamController().getStreams().length<=1&&(te=G(d)),te>0){j(te),ae=new n.default(k.SEGMENTS_UPDATE_FAILED_ERROR_CODE,k.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE),X(ae);return}if(y){for(var Se=0;Se<y.representationInfo.length;Se++)if($=y.representationInfo[Se],$.index===d.index&&$.mediaType===L()){V=!0;break}V||P.addManifestUpdateRepresentationInfo(d,L())}J()&&(R.setPlaybackQuality(L(),A,se(W)),P.updateManifestUpdateInfo({latency:W.segmentAvailabilityRange.end-w.getTime()}),ne=P.getCurrentRepresentationSwitch(Y().adaptation.type),ne||ve(),X())}}function G(l){try{var d=w.getStreamController(),y=d.getActiveStreamInfo(),V=l.segmentAvailabilityRange.start;y&&y.id&&y.id!==A.id&&(V=Math.min(w.getTime(),V));var te=l.segmentAvailabilityRange.end-V,$=w.getLiveDelay();return($-te)*1e3}catch(ae){return 0}}function c(l){l.isDynamic&&me(l.isDynamic)}function E(l){W=ce(l.newQuality),ve()}function b(l){if(l.newDuration){var d=Y();if(d&&d.adaptation.period){var y=d.adaptation.period;y.duration=l.newDuration}}}return I={getStreamId:B,getType:L,getData:x,isUpdating:U,updateData:re,updateRepresentation:ie,getCurrentRepresentation:Y,getRepresentationForQuality:ce,reset:ue},O(),I}m.__dashjs_factory_name="RepresentationController",r.default=h.default.getClassFactory(m),g.exports=r.default},{"112":112,"239":239,"47":47}],63:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}var p=e(47),i=t(p),o=e(59),n=t(o),f=e(60),h=t(f);function m(_){_=_||{};var C=this.context,k=_.eventBus,R=_.events,P=_.dashMetrics,w=_.mediaPlayerModel,H=_.errHandler,N=_.baseURLController,A=_.debug,M=_.boxParser,I=_.requestModifier,D=_.errors,v=void 0,T=void 0,W=void 0;function O(){T=(0,n.default)(C).getInstance(),W=(0,h.default)(C).getInstance(),T.setConfig({baseURLController:N,dashMetrics:P,mediaPlayerModel:w,errHandler:H,eventBus:k,events:R,errors:D,debug:A,boxParser:M,requestModifier:I}),W.setConfig({baseURLController:N,dashMetrics:P,mediaPlayerModel:w,errHandler:H,eventBus:k,events:R,errors:D,debug:A,requestModifier:I})}function B(Y){var oe=Y?Y.split("/")[1]:"";return oe.toLowerCase()==="webm"}function L(){k.on(R.SEGMENTBASE_INIT_REQUEST_NEEDED,K,v),k.on(R.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,x,v),T.initialize(),W.initialize()}function K(Y){B(Y.mimeType)?W.loadInitialization(Y.streamId,Y.mediaType,Y.representation):T.loadInitialization(Y.streamId,Y.mediaType,Y.representation)}function x(Y){B(Y.mimeType)?W.loadSegments(Y.streamId,Y.mediaType,Y.representation,Y.representation?Y.representation.indexRange:null,Y.callback):T.loadSegments(Y.streamId,Y.mediaType,Y.representation,Y.representation?Y.representation.indexRange:null,Y.callback)}function U(){k.off(R.SEGMENTBASE_INIT_REQUEST_NEEDED,K,v),k.off(R.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,x,v)}return v={initialize:L,reset:U},O(),v}m.__dashjs_factory_name="SegmentBaseController";var u=i.default.getSingletonFactory(m);r.default=u,g.exports=r.default},{"47":47,"59":59,"60":60}],64:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(47),i=t(p),o=e(84),n=t(o),f=e(82),h=t(f),m=e(78),u=t(m),_=e(80),C=t(_);function k(P){P=P||{};var w=this.context,H=P.events,N=P.eventBus,A=P.dashConstants,M=P.streamInfo,I=P.type,D=void 0,v=void 0;function T(){v={}}function W(x){v[A.SEGMENT_TIMELINE]=(0,n.default)(w).create(P,x),v[A.SEGMENT_TEMPLATE]=(0,h.default)(w).create(P,x),v[A.SEGMENT_LIST]=(0,u.default)(w).create(P,x),v[A.SEGMENT_BASE]=(0,C.default)(w).create(P,x)}function O(x,U,Y,oe){Y||N.trigger(H.SEGMENTBASE_INIT_REQUEST_NEEDED,{streamId:M.id,mediaType:I,mimeType:U,representation:x}),oe||N.trigger(H.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:M.id,mediaType:I,mimeType:U,representation:x})}function B(x){return x?x.segments?v[A.SEGMENT_BASE]:v[x.segmentInfoType]:null}function L(x,U,Y){var oe=B(x);return oe?oe.getSegmentByIndex(x,U,Y):null}function K(x,U){var Y=B(x);return Y?Y.getSegmentByTime(x,U):null}return D={initialize:W,update:O,getSegmentByIndex:L,getSegmentByTime:K},T(),D}k.__dashjs_factory_name="SegmentsController";var R=i.default.getClassFactory(k);r.default=R,g.exports=r.default},{"47":47,"78":78,"80":80,"82":82,"84":84}],65:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(ce){return ce&&ce.__esModule?ce:{default:ce}}var p=e(112),i=t(p),o=e(61),n=t(o),f=e(94),h=t(f),m=e(85),u=t(m),_=e(93),C=t(_),k=e(91),R=t(k),P=e(99),w=t(P),H=e(87),N=t(H),A=e(86),M=t(A),I=e(88),D=t(I),v=e(230),T=t(v),W=e(234),O=t(W),B=e(47),L=t(B),K=e(45),x=t(K),U=e(239),Y=t(U),oe=e(51),ue=t(oe),re=e(217);function ve(){var ce=void 0,se=void 0,J=void 0,ee=void 0,ie=this.context,me=(0,O.default)(ie).getInstance(),de=Number.isInteger||function(Ee){return typeof Ee=="number"&&isFinite(Ee)&&Math.floor(Ee)===Ee};function Q(){se=(0,x.default)(ie).getInstance().getLogger(ce)}function X(Ee,Z){var Ae=void 0,Te=void 0,be=void 0,Oe=void 0,Qe=void 0,Tt=void 0,dt=!1,st=!1;if(!Ee)throw new Error("adaptation is not defined");if(!Z)throw new Error("type is not defined");if(Ee.hasOwnProperty("ContentComponent_asArray")&&(Oe=Ee.ContentComponent_asArray),Qe=Z!==i.default.TEXT?new RegExp(Z):new RegExp("(vtt|ttml)"),Ee.Representation_asArray&&Ee.Representation_asArray.length&&Ee.Representation_asArray.length>0){var bt=wt(Ee.Representation_asArray[0]);if(bt&&bt.length>0&&re.THUMBNAILS_SCHEME_ID_URIS.indexOf(bt[0].schemeIdUri)>=0)return Z===i.default.IMAGE;if(Ee.Representation_asArray[0].hasOwnProperty(n.default.CODECS)&&(Tt=Ee.Representation_asArray[0].codecs,Tt.search(i.default.STPP)===0||Tt.search(i.default.WVTT)===0))return Z===i.default.FRAGMENTED_TEXT}if(Oe){if(Oe.length>1)return Z===i.default.MUXED;Oe[0]&&Oe[0].contentType===Z&&(dt=!0,st=!0)}if(Ee.hasOwnProperty(n.default.MIME_TYPE)&&(dt=Qe.test(Ee.mimeType),st=!0),!st)for(Ae=0,Te=Ee.Representation_asArray&&Ee.Representation_asArray.length?Ee.Representation_asArray.length:0;!st&&Ae<Te;)be=Ee.Representation_asArray[Ae],be.hasOwnProperty(n.default.MIME_TYPE)&&(dt=Qe.test(be.mimeType),st=!0),Ae++;return dt}function j(Ee){return X(Ee,i.default.AUDIO)}function le(Ee){return X(Ee,i.default.VIDEO)}function G(Ee){return X(Ee,i.default.FRAGMENTED_TEXT)}function c(Ee){return X(Ee,i.default.MUXED)}function E(Ee){return X(Ee,i.default.IMAGE)}function b(Ee){return Ee==="text/vtt"||Ee==="application/ttml+xml"}function l(Ee){var Z="";return Ee&&Ee.hasOwnProperty(n.default.LANG)&&(Z=Ee.lang.replace(/[^A-Za-z0-9-]/g,"")),Z}function d(Ee){return Ee&&Ee.hasOwnProperty(n.default.VIEWPOINT)?Ee.Viewpoint:null}function y(Ee){return Ee&&Ee.hasOwnProperty(n.default.ROLE_ASARRAY)?Ee.Role_asArray:[]}function V(Ee){return Ee&&Ee.hasOwnProperty(n.default.ACCESSIBILITY_ASARRAY)?Ee.Accessibility_asArray:[]}function te(Ee){return Ee&&Ee.hasOwnProperty(n.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?Ee.AudioChannelConfiguration_asArray:[]}function $(Ee){return Ee&&Ee.hasOwnProperty(n.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?Ee.AudioChannelConfiguration_asArray:[]}function ae(){return function(Ee,Z){return Ee.bandwidth-Z.bandwidth}}function ne(Ee){return Ee&&Array.isArray(Ee.Representation_asArray)&&Ee.Representation_asArray.sort(ae()),Ee}function Se(Ee,Z){return Ee&&Ee.Period_asArray&&de(Z)?Ee.Period_asArray[Z]?Ee.Period_asArray[Z].AdaptationSet_asArray:[]:[]}function Ie(Ee){return Ee&&Ee.Period_asArray?Ee.Period_asArray:[]}function he(Ee,Z){var Ae=Ie(Z);return Ae.length>0&&de(Ee)?Ae[Ee]:null}function ye(Ee,Z,Ae){var Te=Se(Z,Ae),be=void 0,Oe=void 0;for(be=0,Oe=Te.length;be<Oe;be++)if(Te[be].hasOwnProperty(n.default.ID)&&Te[be].id===Ee)return Te[be];return null}function _e(Ee,Z,Ae){var Te=Se(Z,Ae);return Te.length>0&&de(Ee)?Te[Ee]:null}function pe(Ee,Z,Ae){if(!Ee)return-1;for(var Te=Se(Z,Ae),be=0;be<Te.length;be++){var Oe=(0,T.default)(ie).getInstance();if(Oe.areEqual(Te[be],Ee))return be}return-1}function De(Ee,Z,Ae){var Te=Se(Ee,Z),be=void 0,Oe=void 0,Qe=[];for(be=0,Oe=Te.length;be<Oe;be++)X(Te[be],Ae)&&Qe.push(ne(Te[be]));return Qe}function je(Ee,Z,Ae){var Te=null;if(Ee&&Ee.Representation_asArray&&Ee.Representation_asArray.length>0){var be=de(Z)&&Z>=0&&Z<Ee.Representation_asArray.length?Ee.Representation_asArray[Z]:Ee.Representation_asArray[0];be&&(Te=be.mimeType+';codecs="'+be.codecs+'"',Ae&&be.width!==void 0&&(Te+=';width="'+be.width+'";height="'+be.height+'"'))}return Te&&(Te=Te.replace(/\sprofiles=[^;]*/g,"")),Te}function Fe(Ee){return Ee&&Ee.Representation_asArray&&Ee.Representation_asArray.length>0?Ee.Representation_asArray[0].mimeType:null}function Le(Ee){return!Ee||!Ee.hasOwnProperty(n.default.CENC_DEFAULT_KID)?null:Ee[n.default.CENC_DEFAULT_KID]}function Ve(Ee){if(!Ee||!Array.isArray(Ee.Label_asArray))return[];for(var Z=[],Ae=0;Ae<Ee.Label_asArray.length;Ae++)Z.push({lang:Ee.Label_asArray[Ae].lang,text:Ee.Label_asArray[Ae].__text||Ee.Label_asArray[Ae]});return Z}function Ge(Ee){return!Ee||!Ee.hasOwnProperty(n.default.CONTENTPROTECTION_ASARRAY)||Ee.ContentProtection_asArray.length===0?null:Ee.ContentProtection_asArray}function we(Ee){var Z=!1;return Ee&&Ee.hasOwnProperty("type")&&(Z=Ee.type===n.default.DYNAMIC),Z}function at(Ee){return Ee&&Ee[n.default.ID]||null}function Re(Ee,Z){var Ae=!1;return Ee&&Ee.profiles&&Ee.profiles.length>0&&(Ae=Ee.profiles.indexOf(Z)!==-1),Ae}function Xe(Ee){var Z=void 0;return Ee&&Ee.hasOwnProperty(n.default.MEDIA_PRESENTATION_DURATION)?Z=Ee.mediaPresentationDuration:Ee&&Ee.type=="dynamic"?Z=Number.POSITIVE_INFINITY:Z=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,Z}function lt(Ee){return Ee&&Ee.bandwidth?Ee.bandwidth:NaN}function ct(Ee){var Z=arguments.length<=1||arguments[1]===void 0?0:arguments[1],Ae=NaN;return Ee&&Ee.hasOwnProperty(n.default.MINIMUM_UPDATE_PERIOD)&&(Ae=Ee.minimumUpdatePeriod),isNaN(Ae)?Ae:Math.max(Ae-Z,1)}function tt(Ee){return Ee&&Ee.hasOwnProperty(n.default.PUBLISH_TIME)?new Date(Ee[n.default.PUBLISH_TIME]):null}function St(Ee){return Ee&&Array.isArray(Ee.Representation_asArray)?Ee.Representation_asArray.length:0}function Ct(Ee){var Z=ne(Ee),Ae=Z&&Array.isArray(Z.Representation_asArray)?Z.Representation_asArray:[];return Ae.map(function(Te){return{bandwidth:Te.bandwidth,width:Te.width||0,height:Te.height||0,scanType:Te.scanType||null,id:Te.id||null}})}function wt(Ee){return!Ee||!Ee.EssentialProperty_asArray||!Ee.EssentialProperty_asArray.length?null:Ee.EssentialProperty_asArray.map(function(Z){return{schemeIdUri:Z.schemeIdUri,value:Z.value}})}function We(Ee,Z){return Z&&Z.Representation_asArray&&Z.Representation_asArray.length>0&&de(Ee)?Z.Representation_asArray[Ee]:null}function He(Ee){if(Ee&&Ee.period&&de(Ee.period.index)){var Z=Ee.period.mpd.manifest.Period_asArray[Ee.period.index];if(Z&&Z.AdaptationSet_asArray&&de(Ee.index))return ne(Z.AdaptationSet_asArray[Ee.index])}}function ze(Ee){var Z=[],Ae=He(Ee),Te=void 0,be=void 0;if(Ae&&Ae.Representation_asArray){if(Ee&&Ee.period&&de(Ee.period.index)){var Oe=rt(Ee.period.mpd.manifest);Oe&&(be=Oe[0])}for(var Qe=0,Tt=Ae.Representation_asArray.length;Qe<Tt;++Qe){var dt=Ae.Representation_asArray[Qe],st=new h.default;if(st.index=Qe,st.adaptation=Ee,dt.hasOwnProperty(n.default.ID)&&(st.id=dt.id),dt.hasOwnProperty(n.default.CODECS)&&(st.codecs=dt.codecs),dt.hasOwnProperty(n.default.CODEC_PRIVATE_DATA)&&(st.codecPrivateData=dt.codecPrivateData),dt.hasOwnProperty(n.default.BANDWITH)&&(st.bandwidth=dt.bandwidth),dt.hasOwnProperty(n.default.WIDTH)&&(st.width=dt.width),dt.hasOwnProperty(n.default.HEIGHT)&&(st.height=dt.height),dt.hasOwnProperty(n.default.SCAN_TYPE)&&(st.scanType=dt.scanType),dt.hasOwnProperty(n.default.MAX_PLAYOUT_RATE)&&(st.maxPlayoutRate=dt.maxPlayoutRate),dt.hasOwnProperty(n.default.SEGMENT_BASE)?(Te=dt.SegmentBase,st.segmentInfoType=n.default.SEGMENT_BASE):dt.hasOwnProperty(n.default.SEGMENT_LIST)?(Te=dt.SegmentList,Te.hasOwnProperty(n.default.SEGMENT_TIMELINE)?st.segmentInfoType=n.default.SEGMENT_TIMELINE:st.segmentInfoType=n.default.SEGMENT_LIST):dt.hasOwnProperty(n.default.SEGMENT_TEMPLATE)?(Te=dt.SegmentTemplate,Te.hasOwnProperty(n.default.SEGMENT_TIMELINE)?st.segmentInfoType=n.default.SEGMENT_TIMELINE:st.segmentInfoType=n.default.SEGMENT_TEMPLATE,Te.hasOwnProperty(n.default.INITIALIZATION_MINUS)&&(st.initialization=Te.initialization.split("$Bandwidth$").join(dt.bandwidth).split("$RepresentationID$").join(dt.id))):st.segmentInfoType=n.default.BASE_URL,st.essentialProperties=wt(dt),Te){if(Te.hasOwnProperty(n.default.INITIALIZATION)){var bt=Te.Initialization;bt.hasOwnProperty(n.default.SOURCE_URL)&&(st.initialization=bt.sourceURL),bt.hasOwnProperty(n.default.RANGE)&&(st.range=bt.range)}else dt.hasOwnProperty(n.default.MIME_TYPE)&&b(dt.mimeType)&&(st.range=0);Te.hasOwnProperty(n.default.TIMESCALE)&&(st.timescale=Te.timescale),Te.hasOwnProperty(n.default.DURATION)?st.segmentDuration=Te.duration/st.timescale:dt.hasOwnProperty(n.default.SEGMENT_TEMPLATE)&&(Te=dt.SegmentTemplate,Te.hasOwnProperty(n.default.SEGMENT_TIMELINE)&&(st.segmentDuration=mt(Te.SegmentTimeline)/st.timescale)),Te.hasOwnProperty(n.default.MEDIA)&&(st.media=Te.media),Te.hasOwnProperty(n.default.START_NUMBER)&&(st.startNumber=Te.startNumber),Te.hasOwnProperty(n.default.INDEX_RANGE)&&(st.indexRange=Te.indexRange),Te.hasOwnProperty(n.default.PRESENTATION_TIME_OFFSET)&&(st.presentationTimeOffset=Te.presentationTimeOffset/st.timescale),Te.hasOwnProperty(n.default.AVAILABILITY_TIME_OFFSET)?st.availabilityTimeOffset=Te.availabilityTimeOffset:be&&be.availabilityTimeOffset!==void 0&&(st.availabilityTimeOffset=be.availabilityTimeOffset),Te.hasOwnProperty(n.default.AVAILABILITY_TIME_COMPLETE)?st.availabilityTimeComplete=Te.availabilityTimeComplete!=="false":be&&be.availabilityTimeComplete!==void 0&&(st.availabilityTimeComplete=be.availabilityTimeComplete)}st.MSETimeOffset=vt(st),st.path=[Ee.period.index,Ee.index,Qe],Z.push(st)}}return Z}function mt(Ee){var Z=Ee.S_asArray[0],Ae=Ee.S_asArray[1];return Z.hasOwnProperty("d")?Z.d:Ae.t-Z.t}function vt(Ee){var Z=Ee.presentationTimeOffset,Ae=Ee.adaptation.period.start;return Ae-Z}function pt(Ee){var Z=Ee&&de(Ee.index)?Ee.mpd.manifest.Period_asArray[Ee.index]:null,Ae=[],Te=void 0,be=void 0,Oe=void 0;if(Z&&Z.AdaptationSet_asArray)for(Oe=0;Oe<Z.AdaptationSet_asArray.length;Oe++)be=Z.AdaptationSet_asArray[Oe],Te=new u.default,be.hasOwnProperty(n.default.ID)&&(Te.id=be.id),Te.index=Oe,Te.period=Ee,c(be)?Te.type=i.default.MUXED:j(be)?Te.type=i.default.AUDIO:le(be)?Te.type=i.default.VIDEO:G(be)?Te.type=i.default.FRAGMENTED_TEXT:E(be)?Te.type=i.default.IMAGE:Te.type=i.default.TEXT,Ae.push(Te);return Ae}function Rt(Ee){var Z=Ee?we(Ee.manifest):!1,Ae=[],Te=null,be=null,Oe=null,Qe=null,Tt=void 0,dt=void 0;for(dt=0,Tt=Ee&&Ee.manifest&&Ee.manifest.Period_asArray?Ee.manifest.Period_asArray.length:0;dt<Tt;dt++)be=Ee.manifest.Period_asArray[dt],be.hasOwnProperty(n.default.START)?(Qe=new C.default,Qe.start=be.start):Te!==null&&Te.hasOwnProperty(n.default.DURATION)&&Oe!==null?(Qe=new C.default,Qe.start=parseFloat((Oe.start+Oe.duration).toFixed(5))):dt===0&&!Z&&(Qe=new C.default,Qe.start=0),Oe!==null&&isNaN(Oe.duration)&&(Qe!==null?Oe.duration=parseFloat((Qe.start-Oe.start).toFixed(5)):se.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),Qe!==null&&(Qe.id=Ce(be,dt),Qe.index=dt,Qe.mpd=Ee,be.hasOwnProperty(n.default.DURATION)&&(Qe.duration=be.duration),Ae.push(Qe),Te=be,Oe=Qe),be=null,Qe=null;return Ae.length===0||Oe!==null&&isNaN(Oe.duration)&&(Oe.duration=parseFloat((Ze(Oe)-Oe.start).toFixed(5))),Ae}function Ce(Ee,Z){if(!Ee)throw new Error("Period cannot be null or undefined");var Ae=C.default.DEFAULT_ID+"_"+Z;return Ee.hasOwnProperty(n.default.ID)&&Ee.id.length>0&&Ee.id!=="__proto__"&&(Ae=Ee.id),Ae}function Pe(Ee){var Z=new R.default;return Ee&&(Z.manifest=Ee,Ee.hasOwnProperty(n.default.AVAILABILITY_START_TIME)?Z.availabilityStartTime=new Date(Ee.availabilityStartTime.getTime()):Ee.loadedTime&&(Z.availabilityStartTime=new Date(Ee.loadedTime.getTime())),Ee.hasOwnProperty(n.default.AVAILABILITY_END_TIME)&&(Z.availabilityEndTime=new Date(Ee.availabilityEndTime.getTime())),Ee.hasOwnProperty(n.default.MINIMUM_UPDATE_PERIOD)&&(Z.minimumUpdatePeriod=Ee.minimumUpdatePeriod),Ee.hasOwnProperty(n.default.MEDIA_PRESENTATION_DURATION)&&(Z.mediaPresentationDuration=Ee.mediaPresentationDuration),Ee.hasOwnProperty(n.default.SUGGESTED_PRESENTATION_DELAY)&&(Z.suggestedPresentationDelay=Ee.suggestedPresentationDelay),Ee.hasOwnProperty(n.default.TIMESHIFT_BUFFER_DEPTH)&&(Z.timeShiftBufferDepth=Ee.timeShiftBufferDepth),Ee.hasOwnProperty(n.default.MAX_SEGMENT_DURATION)&&(Z.maxSegmentDuration=Ee.maxSegmentDuration),Ee.hasOwnProperty(n.default.PUBLISH_TIME)&&(Z.publishTime=new Date(Ee.publishTime))),Z}function Ye(){if(!J||!J.hasOwnProperty("error"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function Ze(Ee){Ye();var Z=we(Ee.mpd.manifest),Ae=void 0;return Ee.mpd.manifest.mediaPresentationDuration?Ae=Ee.mpd.manifest.mediaPresentationDuration:Ee.duration?Ae=Ee.duration:Z?Ae=Number.POSITIVE_INFINITY:J.error(new Y.default(ue.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",Ee)),Ae}function ut(Ee){var Z=Ee&&Ee.mpd&&Ee.mpd.manifest?Ee.mpd.manifest:null,Ae=Z?Z.Period_asArray:null,Te=Ae&&Ee&&de(Ee.index)?Ae[Ee.index].EventStream_asArray:null,be=[],Oe=void 0,Qe=void 0;if(Te)for(Oe=0;Oe<Te.length;Oe++){var Tt=new D.default;if(Tt.period=Ee,Tt.timescale=1,Te[Oe].hasOwnProperty(i.default.SCHEME_ID_URI))Tt.schemeIdUri=Te[Oe][i.default.SCHEME_ID_URI];else throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(Te[Oe].hasOwnProperty(n.default.TIMESCALE)&&(Tt.timescale=Te[Oe][n.default.TIMESCALE]),Te[Oe].hasOwnProperty(n.default.VALUE)&&(Tt.value=Te[Oe][n.default.VALUE]),Te[Oe].hasOwnProperty(n.default.PRESENTATION_TIME_OFFSET)&&(Tt.presentationTimeOffset=Te[Oe][n.default.PRESENTATION_TIME_OFFSET]),Qe=0;Te[Oe].Event_asArray&&Qe<Te[Oe].Event_asArray.length;Qe++){var dt=Te[Oe].Event_asArray[Qe],st=new N.default;if(st.presentationTime=0,st.eventStream=Tt,dt.hasOwnProperty(n.default.PRESENTATION_TIME)){st.presentationTime=dt.presentationTime;var bt=Tt.presentationTimeOffset?Tt.presentationTimeOffset/Tt.timescale:0;st.calculatedPresentationTime=st.presentationTime/Tt.timescale+Ee.start-bt}dt.hasOwnProperty(n.default.DURATION)&&(st.duration=dt.duration/Tt.timescale),dt.hasOwnProperty(n.default.ID)&&(st.id=dt.id),dt.Signal&&dt.Signal.Binary?st.messageData=ee.decodeArray(dt.Signal.Binary.toString()):st.messageData=dt.messageData||dt.__text,be.push(st)}}return be}function Ue(Ee,Z){var Ae=[],Te=void 0;if(!Ee)return Ae;for(Te=0;Te<Ee.length;Te++){var be=new D.default;if(be.timescale=1,be.representation=Z,Ee[Te].hasOwnProperty(i.default.SCHEME_ID_URI))be.schemeIdUri=Ee[Te].schemeIdUri;else throw new Error("Invalid EventStream. SchemeIdUri has to be set");Ee[Te].hasOwnProperty(n.default.TIMESCALE)&&(be.timescale=Ee[Te].timescale),Ee[Te].hasOwnProperty(n.default.VALUE)&&(be.value=Ee[Te].value),Ae.push(be)}return Ae}function Je(Ee,Z){var Ae=void 0,Te=void 0,be=void 0;return Ee&&Ee.Period_asArray&&Z&&Z.period&&de(Z.period.index)&&(Te=Ee.Period_asArray[Z.period.index],Te&&Te.AdaptationSet_asArray&&de(Z.index)&&(be=Te.AdaptationSet_asArray[Z.index],be&&(Ae=be.InbandEventStream_asArray))),Ue(Ae,null)}function ht(Ee,Z){var Ae=void 0,Te=void 0,be=void 0,Oe=void 0;return Ee&&Ee.Period_asArray&&Z&&Z.adaptation&&Z.adaptation.period&&de(Z.adaptation.period.index)&&(Te=Ee.Period_asArray[Z.adaptation.period.index],Te&&Te.AdaptationSet_asArray&&de(Z.adaptation.index)&&(be=Te.AdaptationSet_asArray[Z.adaptation.index],be&&be.Representation_asArray&&de(Z.index)&&(Oe=be.Representation_asArray[Z.index],Oe&&(Ae=Oe.InbandEventStream_asArray)))),Ue(Ae,Z)}function Et(Ee){var Z=we(Ee),Ae=Ee?Ee.hasOwnProperty(n.default.AVAILABILITY_START_TIME):!1,Te=Ee?Ee.UTCTiming_asArray:null,be=[];return(Z||Ae)&&Te&&Te.forEach(function(Oe){var Qe=new w.default;if(Oe.hasOwnProperty(i.default.SCHEME_ID_URI))Qe.schemeIdUri=Oe.schemeIdUri;else return;if(Oe.hasOwnProperty(n.default.VALUE))Qe.value=Oe.value.toString();else return;be.push(Qe)}),be}function rt(Ee){var Z=[],Ae=Ee.BaseURL_asArray||[Ee.baseUri],Te=!1;return Ae.some(function(be){if(be){var Oe=new M.default,Qe=be.__text||be;return me.isRelative(Qe)&&(Te=!0,Ee.baseUri&&(Qe=me.resolve(Qe,Ee.baseUri))),Oe.url=Qe,be.hasOwnProperty(n.default.SERVICE_LOCATION)&&be.serviceLocation.length?Oe.serviceLocation=be.serviceLocation:Oe.serviceLocation=Qe,be.hasOwnProperty(n.default.DVB_PRIORITY)&&(Oe.dvb_priority=be[n.default.DVB_PRIORITY]),be.hasOwnProperty(n.default.DVB_WEIGHT)&&(Oe.dvb_weight=be[n.default.DVB_WEIGHT]),be.hasOwnProperty(n.default.AVAILABILITY_TIME_OFFSET)&&(Oe.availabilityTimeOffset=be[n.default.AVAILABILITY_TIME_OFFSET]),be.hasOwnProperty(n.default.AVAILABILITY_TIME_COMPLETE)&&(Oe.availabilityTimeComplete=be[n.default.AVAILABILITY_TIME_COMPLETE]!=="false"),Z.push(Oe),Te}}),Z}function Dt(Ee){if(Ee&&Ee.hasOwnProperty(i.default.LOCATION))return Ee.Location=Ee.Location_asArray[0],Ee.Location}function kt(Ee){if(Ee&&Ee.hasOwnProperty(n.default.PATCH_LOCATION))return Ee.PatchLocation=Ee.PatchLocation_asArray[0],Ee.PatchLocation}function ft(Ee){return Ee&&Ee.hasOwnProperty(n.default.SUGGESTED_PRESENTATION_DELAY)?Ee.suggestedPresentationDelay:null}function Gt(Ee){return Ee&&Ee.hasOwnProperty(n.default.AVAILABILITY_START_TIME)&&Ee.availabilityStartTime!==null?Ee.availabilityStartTime.getTime():null}function Kt(Ee){var Z=[];if(Ee&&Ee.hasOwnProperty(n.default.SERVICE_DESCRIPTION)){var Ae=!0,Te=!1,be=void 0;try{for(var Oe=Ee.ServiceDescription_asArray[Symbol.iterator](),Qe;!(Ae=(Qe=Oe.next()).done);Ae=!0){var Tt=Qe.value,dt=void 0,st=void 0,bt=void 0,Yt=void 0;for(var xt in Tt)Tt.hasOwnProperty(xt)&&(xt===n.default.ID?dt=Tt[xt]:xt===n.default.SERVICE_DESCRIPTION_SCOPE?st=Tt[xt].schemeIdUri:xt===n.default.SERVICE_DESCRIPTION_LATENCY?bt={target:Tt[xt].target,max:Tt[xt].max,min:Tt[xt].min}:xt===n.default.SERVICE_DESCRIPTION_PLAYBACK_RATE&&(Yt={max:Tt[xt].max,min:Tt[xt].min}));st===i.default.SERVICE_DESCRIPTION_LL_SCHEME&&(bt||Yt)&&Z.push({id:dt,schemeIdUri:st,latency:bt,playbackRate:Yt})}}catch(Qt){Te=!0,be=Qt}finally{try{!Ae&&Oe.return&&Oe.return()}finally{if(Te)throw be}}}return Z}function Vt(Ee){var Z={};if(Ee&&Ee.hasOwnProperty(n.default.SUPPLEMENTAL_PROPERTY)){var Ae=!0,Te=!1,be=void 0;try{for(var Oe=Ee.SupplementalProperty_asArray[Symbol.iterator](),Qe;!(Ae=(Qe=Oe.next()).done);Ae=!0){var Tt=Qe.value;Tt.hasOwnProperty(i.default.SCHEME_ID_URI)&&Tt.hasOwnProperty(n.default.VALUE)&&(Z[Tt[i.default.SCHEME_ID_URI]]=Tt[n.default.VALUE])}}catch(dt){Te=!0,be=dt}finally{try{!Ae&&Oe.return&&Oe.return()}finally{if(Te)throw be}}}return Z}function Pt(Ee){!Ee||(Ee.errHandler&&(J=Ee.errHandler),Ee.BASE64&&(ee=Ee.BASE64))}return ce={getIsTypeOf:X,getIsTextTrack:b,getLanguageForAdaptation:l,getViewpointForAdaptation:d,getRolesForAdaptation:y,getAccessibilityForAdaptation:V,getAudioChannelConfigurationForAdaptation:te,getAudioChannelConfigurationForRepresentation:$,getAdaptationForIndex:_e,getIndexForAdaptation:pe,getAdaptationForId:ye,getAdaptationsForType:De,getRealPeriods:Ie,getRealPeriodForIndex:he,getCodec:je,getMimeType:Fe,getKID:Le,getLabelsForAdaptation:Ve,getContentProtectionData:Ge,getIsDynamic:we,getId:at,hasProfile:Re,getDuration:Xe,getBandwidth:lt,getManifestUpdatePeriod:ct,getPublishTime:tt,getRepresentationCount:St,getBitrateListForAdaptation:Ct,getRepresentationFor:We,getRepresentationsForAdaptation:ze,getAdaptationsForPeriod:pt,getRegularPeriods:Rt,getMpd:Pe,getEventsForPeriod:ut,getEssentialPropertiesForRepresentation:wt,getEventStreamForAdaptationSet:Je,getEventStreamForRepresentation:ht,getUTCTimingSources:Et,getBaseURLsFromElement:rt,getRepresentationSortFunction:ae,getLocation:Dt,getPatchLocation:kt,getSuggestedPresentationDelay:ft,getAvailabilityStartTime:Gt,getServiceDescriptions:Kt,getSupplementalPropperties:Vt,setConfig:Pt},Q(),ce}ve.__dashjs_factory_name="DashManifestModel",r.default=L.default.getSingletonFactory(ve),g.exports=r.default},{"112":112,"217":217,"230":230,"234":234,"239":239,"45":45,"47":47,"51":51,"61":61,"85":85,"86":86,"87":87,"88":88,"91":91,"93":93,"94":94,"99":99}],66:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(61),i=t(p),o=e(47),n=t(o),f=e(45),h=t(f),m=e(97),u=t(m),_=e(92),C=t(_);function k(){var R=void 0,P=void 0,w=this.context;function H(){P=(0,h.default)(w).getInstance().getLogger(R)}function N(v){return v&&v.hasOwnProperty(i.default.ORIGINAL_MPD_ID)||!1}function A(v){return v&&v.hasOwnProperty(i.default.PUBLISH_TIME)?new Date(v[i.default.PUBLISH_TIME]):null}function M(v){return v&&v.hasOwnProperty(i.default.ORIGINAL_PUBLISH_TIME)?new Date(v[i.default.ORIGINAL_PUBLISH_TIME]):null}function I(v){return v&&v[i.default.ORIGINAL_MPD_ID]||null}function D(v){return v?(v.__children||[]).map(function(T){var W=Object.keys(T)[0];if(W!=="add"&&W!=="remove"&&W!=="replace")return P.warn("Ignoring node of invalid action: "+W),null;var O=T[W],B=O.sel;if(W==="add"&&O.type){if(!O.type.startsWith("@"))return P.warn("Ignoring add action for prefixed namespace declaration: "+O.type+"="+O.__text),null;B=B+"/"+O.type}var L=new u.default(B);if(!L.isValid())return P.warn("Ignoring action with invalid selector: "+W+" - "+B),null;var K=null;L.findsAttribute()?K=O.__text||"":W!=="remove"&&(K=O.__children.reduce(function(U,Y){var oe=Object.keys(Y)[0];return oe!=="#text"&&(U[oe]=U[oe]||[],U[oe].push(Y[oe])),U},{}));var x=new C.default(W,L,K);return W==="add"&&(x.position=O.pos),x}).filter(function(T){return!!T}):[]}return R={getIsPatch:N,getPublishTime:A,getOriginalPublishTime:M,getMpdId:I,getPatchOperations:D},H(),R}k.__dashjs_factory_name="PatchManifestModel",r.default=n.default.getSingletonFactory(k),g.exports=r.default},{"45":45,"47":47,"61":61,"92":92,"97":97}],67:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(D){return D&&D.__esModule?D:{default:D}}var p=e(47),i=t(p),o=e(77),n=t(o),f=e(3),h=t(f),m=e(76),u=t(m),_=e(74),C=t(_),k=e(73),R=t(k),P=e(75),w=t(P),H=e(70),N=t(H),A=e(71),M=t(A);function I(D){D=D||{};var v=this.context,T=D.debug,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0;function x(){O=T.getLogger(W),B=[new C.default,new R.default,new w.default,new u.default],L=new h.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:B}),K=(0,n.default)(v).create({adaptationset:new N.default,period:new M.default})}function U(){return B}function Y(){return K}function oe(ue){var re=void 0,ve=window.performance.now();if(re=L.xml_str2json(ue),!re)throw new Error("parsing the manifest failed");var ce=window.performance.now();re.Patch?(re=re.Patch,re.add_asArray&&re.add_asArray.forEach(function(J){return K.run(J)}),re.replace_asArray&&re.replace_asArray.forEach(function(J){return K.run(J)})):(re=re.MPD,K.run(re));var se=window.performance.now();return O.info("Parsing complete: ( xml2json: "+(ce-ve).toPrecision(3)+"ms, objectiron: "+(se-ce).toPrecision(3)+"ms, total: "+((se-ve)/1e3).toPrecision(3)+"s)"),re.protocol="DASH",re}return W={parse:oe,getMatchers:U,getIron:Y},x(),W}I.__dashjs_factory_name="DashParser",r.default=i.default.getClassFactory(I),g.exports=r.default},{"3":3,"47":47,"70":70,"71":71,"73":73,"74":74,"75":75,"76":76,"77":77}],68:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n){p(this,o);var f=function(m){return m&&m.length&&m.charAt(0)===m.charAt(0).toUpperCase()};this._name=n,this._merge=f(n)}return t(o,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),o}();r.default=i,g.exports=r.default},{}],69:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function h(m,u){for(var _=0;_<u.length;_++){var C=u[_];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,u,_){return u&&h(m.prototype,u),_&&h(m,_),m}}();function p(h){return h&&h.__esModule?h:{default:h}}function i(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}var o=e(68),n=p(o),f=function(){function h(m,u,_){var C=this;i(this,h),this._name=m||"",this._properties=[],this._children=_||[],Array.isArray(u)&&u.forEach(function(k){C._properties.push(new n.default(k))})}return t(h,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),h}();r.default=f,g.exports=r.default},{"68":68}],70:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(C,k,R){var P=!0;e:for(;P;){var w=C,H=k,N=R;P=!1,w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,H);if(A===void 0){var M=Object.getPrototypeOf(w);if(M===null)return;C=M,k=H,R=N,P=!0,A=M=void 0;continue e}else{if("value"in A)return A.value;var I=A.get;return I===void 0?void 0:I.call(N)}}};function p(_){return _&&_.__esModule?_:{default:_}}function i(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function o(_,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);_.prototype=Object.create(C&&C.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(_,C):_.__proto__=C)}var n=e(69),f=p(n),h=e(61),m=p(h),u=function(_){o(C,_);function C(){i(this,C);var k=[m.default.PROFILES,m.default.WIDTH,m.default.HEIGHT,m.default.SAR,m.default.FRAMERATE,m.default.AUDIO_SAMPLING_RATE,m.default.MIME_TYPE,m.default.SEGMENT_PROFILES,m.default.CODECS,m.default.MAXIMUM_SAP_PERIOD,m.default.START_WITH_SAP,m.default.MAX_PLAYOUT_RATE,m.default.CODING_DEPENDENCY,m.default.SCAN_TYPE,m.default.FRAME_PACKING,m.default.AUDIO_CHANNEL_CONFIGURATION,m.default.CONTENT_PROTECTION,m.default.ESSENTIAL_PROPERTY,m.default.SUPPLEMENTAL_PROPERTY,m.default.INBAND_EVENT_STREAM];t(Object.getPrototypeOf(C.prototype),"constructor",this).call(this,m.default.ADAPTATION_SET,k,[new f.default(m.default.REPRESENTATION,k,[new f.default(m.default.SUB_REPRESENTATION,k)])])}return C}(f.default);r.default=u,g.exports=r.default},{"61":61,"69":69}],71:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(C,k,R){var P=!0;e:for(;P;){var w=C,H=k,N=R;P=!1,w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,H);if(A===void 0){var M=Object.getPrototypeOf(w);if(M===null)return;C=M,k=H,R=N,P=!0,A=M=void 0;continue e}else{if("value"in A)return A.value;var I=A.get;return I===void 0?void 0:I.call(N)}}};function p(_){return _&&_.__esModule?_:{default:_}}function i(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function o(_,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);_.prototype=Object.create(C&&C.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(_,C):_.__proto__=C)}var n=e(69),f=p(n),h=e(61),m=p(h),u=function(_){o(C,_);function C(){i(this,C);var k=[m.default.SEGMENT_BASE,m.default.SEGMENT_TEMPLATE,m.default.SEGMENT_LIST];t(Object.getPrototypeOf(C.prototype),"constructor",this).call(this,m.default.PERIOD,k,[new f.default(m.default.ADAPTATION_SET,k,[new f.default(m.default.REPRESENTATION,k)])])}return C}(f.default);r.default=u,g.exports=r.default},{"61":61,"69":69}],72:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n,f){p(this,o),this._test=n,this._converter=f}return t(o,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),o}();r.default=i,g.exports=r.default},{}],73:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(R,P,w){var H=!0;e:for(;H;){var N=R,A=P,M=w;H=!1,N===null&&(N=Function.prototype);var I=Object.getOwnPropertyDescriptor(N,A);if(I===void 0){var D=Object.getPrototypeOf(N);if(D===null)return;R=D,P=A,w=M,H=!0,I=D=void 0;continue e}else{if("value"in I)return I.value;var v=I.get;return v===void 0?void 0:v.call(M)}}};function p(k){return k&&k.__esModule?k:{default:k}}function i(k,R){if(!(k instanceof R))throw new TypeError("Cannot call a class as a function")}function o(k,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);k.prototype=Object.create(R&&R.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(k,R):k.__proto__=R)}var n=e(72),f=p(n),h=60,m=60,u=1e3,_=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,C=function(k){o(R,k);function R(){i(this,R),t(Object.getPrototypeOf(R.prototype),"constructor",this).call(this,function(P){return _.test(P.value)},function(P){var w=_.exec(P),H=void 0;if(H=Date.UTC(parseInt(w[1],10),parseInt(w[2],10)-1,parseInt(w[3],10),parseInt(w[4],10),parseInt(w[5],10),w[6]&&parseInt(w[6],10)||0,w[7]&&parseFloat(w[7])*u||0),w[9]&&w[10]){var N=parseInt(w[9],10)*m+parseInt(w[10],10);H+=(w[8]==="+"?-1:1)*N*h*u}return new Date(H)})}return R}(f.default);r.default=C,g.exports=r.default},{"72":72}],74:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(M,I,D){var v=!0;e:for(;v;){var T=M,W=I,O=D;v=!1,T===null&&(T=Function.prototype);var B=Object.getOwnPropertyDescriptor(T,W);if(B===void 0){var L=Object.getPrototypeOf(T);if(L===null)return;M=L,I=W,D=O,v=!0,B=L=void 0;continue e}else{if("value"in B)return B.value;var K=B.get;return K===void 0?void 0:K.call(O)}}};function p(A){return A&&A.__esModule?A:{default:A}}function i(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function o(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var n=e(72),f=p(n),h=e(112),m=p(h),u=e(61),_=p(u),C=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,k=365*24*60*60,R=30*24*60*60,P=24*60*60,w=60*60,H=60,N=function(A){o(M,A);function M(){i(this,M),t(Object.getPrototypeOf(M.prototype),"constructor",this).call(this,function(I){for(var D=[_.default.MIN_BUFFER_TIME,_.default.MEDIA_PRESENTATION_DURATION,_.default.MINIMUM_UPDATE_PERIOD,_.default.TIMESHIFT_BUFFER_DEPTH,_.default.MAX_SEGMENT_DURATION,_.default.MAX_SUBSEGMENT_DURATION,_.default.SUGGESTED_PRESENTATION_DELAY,_.default.START,m.default.START_TIME,_.default.DURATION],v=D.length,T=0;T<v;T++)if(I.nodeName===D[T])return C.test(I.value);return!1},function(I){var D=C.exec(I),v=parseFloat(D[3]||0)*k+parseFloat(D[5]||0)*R+parseFloat(D[7]||0)*P+parseFloat(D[9]||0)*w+parseFloat(D[11]||0)*H+parseFloat(D[13]||0);return D[1]!==void 0&&(v=-v),v})}return M}(f.default);r.default=N,g.exports=r.default},{"112":112,"61":61,"72":72}],75:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(72),f=p(n),h=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,m=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this,function(C){return h.test(C.value)},function(C){return parseFloat(C)})}return _}(f.default);r.default=m,g.exports=r.default},{"72":72}],76:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(k,R,P){var w=!0;e:for(;w;){var H=k,N=R,A=P;w=!1,H===null&&(H=Function.prototype);var M=Object.getOwnPropertyDescriptor(H,N);if(M===void 0){var I=Object.getPrototypeOf(H);if(I===null)return;k=I,R=N,P=A,w=!0,M=I=void 0;continue e}else{if("value"in M)return M.value;var D=M.get;return D===void 0?void 0:D.call(A)}}};function p(C){return C&&C.__esModule?C:{default:C}}function i(C,k,R){return k in C?Object.defineProperty(C,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):C[k]=R,C}function o(C,k){if(!(C instanceof k))throw new TypeError("Cannot call a class as a function")}function n(C,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);C.prototype=Object.create(k&&k.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(C,k):C.__proto__=k)}var f=e(72),h=p(f),m=e(61),u=p(m),_=function(C){n(k,C);function k(){o(this,k),t(Object.getPrototypeOf(k.prototype),"constructor",this).call(this,function(R,P){var w,H=(w={},i(w,u.default.MPD,[u.default.ID,u.default.PROFILES]),i(w,u.default.PERIOD,[u.default.ID]),i(w,u.default.BASE_URL,[u.default.SERVICE_LOCATION,u.default.BYTE_RANGE]),i(w,u.default.SEGMENT_BASE,[u.default.INDEX_RANGE]),i(w,u.default.INITIALIZATION,[u.default.RANGE]),i(w,u.default.REPRESENTATION_INDEX,[u.default.RANGE]),i(w,u.default.SEGMENT_LIST,[u.default.INDEX_RANGE]),i(w,u.default.BITSTREAM_SWITCHING,[u.default.RANGE]),i(w,u.default.SEGMENT_URL,[u.default.MEDIA_RANGE,u.default.INDEX_RANGE]),i(w,u.default.SEGMENT_TEMPLATE,[u.default.INDEX_RANGE,u.default.MEDIA,u.default.INDEX,u.default.INITIALIZATION_MINUS,u.default.BITSTREAM_SWITCHING_MINUS]),i(w,u.default.ASSET_IDENTIFIER,[u.default.VALUE,u.default.ID]),i(w,u.default.EVENT_STREAM,[u.default.VALUE]),i(w,u.default.ADAPTATION_SET,[u.default.PROFILES,u.default.MIME_TYPE,u.default.SEGMENT_PROFILES,u.default.CODECS,u.default.CONTENT_TYPE]),i(w,u.default.FRAME_PACKING,[u.default.VALUE,u.default.ID]),i(w,u.default.AUDIO_CHANNEL_CONFIGURATION,[u.default.VALUE,u.default.ID]),i(w,u.default.CONTENT_PROTECTION,[u.default.VALUE,u.default.ID]),i(w,u.default.ESSENTIAL_PROPERTY,[u.default.VALUE,u.default.ID]),i(w,u.default.SUPPLEMENTAL_PROPERTY,[u.default.VALUE,u.default.ID]),i(w,u.default.INBAND_EVENT_STREAM,[u.default.VALUE,u.default.ID]),i(w,u.default.ACCESSIBILITY,[u.default.VALUE,u.default.ID]),i(w,u.default.ROLE,[u.default.VALUE,u.default.ID]),i(w,u.default.RATING,[u.default.VALUE,u.default.ID]),i(w,u.default.VIEWPOINT,[u.default.VALUE,u.default.ID]),i(w,u.default.CONTENT_COMPONENT,[u.default.CONTENT_TYPE]),i(w,u.default.REPRESENTATION,[u.default.ID,u.default.DEPENDENCY_ID,u.default.MEDIA_STREAM_STRUCTURE_ID]),i(w,u.default.SUBSET,[u.default.ID]),i(w,u.default.METRICS,[u.default.METRICS_MINUS]),i(w,u.default.REPORTING,[u.default.VALUE,u.default.ID]),w);if(H.hasOwnProperty(P)){var N=H[P];return N!==void 0?N.indexOf(R.name)>=0:!1}return!1},function(R){return String(R)})}return k}(h.default);r.default=_,g.exports=r.default},{"61":61,"72":72}],77:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(f){return f&&f.__esModule?f:{default:f}}var p=e(47),i=t(p);function o(f){function h(C,k){for(var R in C)k.hasOwnProperty(R)||(k[R]=C[R])}function m(C,k,R){for(var P=0,w=C.length;P<w;++P){var H=C[P];if(k[H.name])if(R[H.name]){if(H.merge){var N=k[H.name],A=R[H.name];typeof N=="object"&&typeof A=="object"?h(N,A):R[H.name]=N+A}}else R[H.name]=k[H.name]}}function u(C,k){for(var R=0,P=C.children.length;R<P;++R){var w=C.children[R],H=k[w.name+"_asArray"];if(H)for(var N=0,A=H.length;N<A;++N){var M=H[N];m(C.properties,k,M),u(w,M)}}}function _(C){if(C===null||typeof C!="object")return C;if(C.Period_asArray&&"period"in f)for(var k=f.period,R=C.Period_asArray,P=0,w=R.length;P<w;++P){var H=R[P];if(u(k,H),"adaptationset"in f){var N=H.AdaptationSet_asArray;if(N)for(var A=f.adaptationset,M=0,I=N.length;M<I;++M)u(A,N[M])}}return C}return{run:_}}o.__dashjs_factory_name="ObjectIron";var n=i.default.getClassFactory(o);r.default=n,g.exports=r.default},{"47":47}],78:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(112),n=t(o),f=e(81);function h(u,_){u=u||{};var C=u.timelineConverter,k=void 0;function R(){if(!C||!C.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function P(H,N){if(R(),!H)return null;var A=H.adaptation.period.mpd.manifest.Period_asArray[H.adaptation.period.index].AdaptationSet_asArray[H.adaptation.index].Representation_asArray[H.index].SegmentList,M=A.SegmentURL_asArray.length,I=H&&!isNaN(H.startNumber)?H.startNumber:1,D=Math.max(I-1,0),v=Math.max(N-D,0),T=null;if(v<M){var W=A.SegmentURL_asArray[v];T=(0,f.getIndexBasedSegment)(C,_,H,N),T&&(T.replacementTime=(I+N-1)*H.segmentDuration,T.media=W.media?W.media:"",T.mediaRange=W.mediaRange,T.index=N,T.indexRange=W.indexRange)}return H.availableSegmentsNumber=M,T}function w(H,N){if(R(),!H)return null;var A=H.segmentDuration;if(isNaN(A))return null;var M=C.calcPeriodRelativeTimeFromMpdRelativeTime(H,N),I=Math.floor(M/A);return P(H,I)}return k={getSegmentByIndex:P,getSegmentByTime:w},k}h.__dashjs_factory_name="ListSegmentsGetter";var m=i.default.getClassFactory(h);r.default=m,g.exports=r.default},{"112":112,"47":47,"81":81}],79:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=function(){function n(){p(this,n)}return t(n,null,[{key:"round10",value:function(h,m){return o("round",h,m)}}]),n}();r.default=i;function o(n,f,h){return typeof h=="undefined"||+h==0?Math[n](f):(f=+f,h=+h,f===null||isNaN(f)||!(typeof h=="number"&&h%1==0)?NaN:(f=f.toString().split("e"),f=Math[n](+(f[0]+"e"+(f[1]?+f[1]-h:-h))),f=f.toString().split("e"),+(f[0]+"e"+(f[1]?+f[1]+h:h))))}g.exports=r.default},{}],80:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(112),n=t(o);function f(m){m=m||{};var u=m.timelineConverter,_=void 0;function C(){if(!u||!u.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function k(w,H){if(C(),!w)return null;var N=w.segments?w.segments.length:-1,A=void 0;if(H<N&&(A=w.segments[H],A&&A.availabilityIdx===H))return A;for(var M=0;M<N;M++)if(A=w.segments[M],A&&A.availabilityIdx===H)return A;return null}function R(w,H){C();var N=P(w,H);return k(w,N)}function P(w,H){if(!w)return-1;var N=w.segments,A=N?N.length:null,M=-1,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0;if(N&&A>0){for(W=0;W<A;W++)if(D=N[W],v=D.presentationStartTime,T=D.duration,I=T/2,H+I>=v&&H-I<v+T){M=D.availabilityIdx;break}}return M}return _={getSegmentByIndex:k,getSegmentByTime:R},_}f.__dashjs_factory_name="SegmentBaseGetter";var h=i.default.getClassFactory(f);r.default=h,g.exports=r.default},{"112":112,"47":47}],81:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.unescapeDollarsInTemplate=f,r.replaceIDForTemplate=h,r.replaceTokenForTemplate=m,r.getIndexBasedSegment=C,r.getTimeBasedSegment=k;function t(R){return R&&R.__esModule?R:{default:R}}var p=e(96),i=t(p);function o(R,P){for(;R.length<P;)R="0"+R;return R}function n(R,P){return R.representation.startNumber+P}function f(R){return R&&R.split("$$").join("$")}function h(R,P){if(!P||!R||R.indexOf("$RepresentationID$")===-1)return R;var w=P.toString();return R.split("$RepresentationID$").join(w)}function m(R,P,w){var H="%0",N=void 0,A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=P.length,W=H.length;if(!R)return R;for(;;){if(N=R.indexOf("$"+P),N<0||(A=R.indexOf("$",N+T),A<0))return R;if(M=R.indexOf(H,N+T),M>N&&M<A)switch(I=R.charAt(A-1),D=parseInt(R.substring(M+W,A-1),10),I){case"d":case"i":case"u":v=o(w.toString(),D);break;case"x":v=o(w.toString(16),D);break;case"X":v=o(w.toString(16),D).toUpperCase();break;case"o":v=o(w.toString(8),D);break;default:return R}else v=w;R=R.substring(0,N)+v+R.substring(A+1)}}function u(R,P,w,H,N,A,M,I,D){var v=new i.default;return v.representation=R,v.duration=P,v.presentationStartTime=w,v.mediaStartTime=H,v.availabilityStartTime=N,v.availabilityEndTime=A.calcAvailabilityEndTimeFromPresentationTime(M,R.adaptation.period.mpd,I),v.wallStartTime=A.calcWallTimeForSegment(v,I),v.replacementNumber=n(v,D),v.availabilityIdx=D,v}function _(R,P,w,H){var N=R.getPeriodEnd(P,H),A=R.calcPeriodRelativeTimeFromMpdRelativeTime(P,N),M=R.calcPeriodRelativeTimeFromMpdRelativeTime(P,w.presentationStartTime);if(M>=A)if(H){if(P.segmentAvailabilityRange&&w.presentationStartTime>=P.segmentAvailabilityRange.end)return!1}else return!1;return!0}function C(R,P,w,H){var N=void 0,A=void 0,M=void 0;N=w.segmentDuration,isNaN(N)&&(N=w.adaptation.period.duration),A=parseFloat((w.adaptation.period.start+H*N).toFixed(5)),M=parseFloat((A+N).toFixed(5));var I=u(w,N,A,R.calcMediaTimeFromPresentationTime(A,w),R.calcAvailabilityStartTimeFromPresentationTime(A,w.adaptation.period.mpd,P),R,M,P,H);return _(R,w,I,P)?I:null}function k(R,P,w,H,N,A,M,I,D,v){var T=H/A,W=Math.min(N/A,w.adaptation.period.mpd.maxSegmentDuration),O=void 0,B=void 0,L=void 0;return O=R.calcPresentationTimeFromMediaTime(T,w),B=O+W,L=u(w,W,O,T,w.adaptation.period.mpd.manifest.loadedTime,R,B,P,D),_(R,w,L,P)?(L.replacementTime=v||H,M=m(M,"Number",L.replacementNumber),M=m(M,"Time",L.replacementTime),L.media=M,L.mediaRange=I,L):null}},{"96":96}],82:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(112),n=t(o),f=e(81);function h(u,_){u=u||{};var C=u.timelineConverter,k=void 0;function R(){if(!C||!C.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function P(H,N){if(R(),!H)return null;var A=H.adaptation.period.mpd.manifest.Period_asArray[H.adaptation.period.index].AdaptationSet_asArray[H.adaptation.index].Representation_asArray[H.index].SegmentTemplate;N=Math.max(N,0);var M=(0,f.getIndexBasedSegment)(C,_,H,N);if(M){M.replacementTime=Math.round((N-1)*H.segmentDuration*H.timescale,10);var I=A.media;I=(0,f.replaceTokenForTemplate)(I,"Number",M.replacementNumber),I=(0,f.replaceTokenForTemplate)(I,"Time",M.replacementTime),M.media=I}var D=H.segmentDuration,v=H.segmentAvailabilityRange;return isNaN(D)?H.availableSegmentsNumber=1:H.availableSegmentsNumber=Math.ceil((v.end-v.start)/D),M}function w(H,N){if(R(),!H)return null;var A=H.segmentDuration;if(isNaN(A))return null;var M=C.calcPeriodRelativeTimeFromMpdRelativeTime(H,N),I=Math.floor(M/A);return P(H,I)}return k={getSegmentByIndex:P,getSegmentByTime:w},k}h.__dashjs_factory_name="TemplateSegmentsGetter";var m=i.default.getClassFactory(h);r.default=m,g.exports=r.default},{"112":112,"47":47,"81":81}],83:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(w){return w&&w.__esModule?w:{default:w}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f),m=e(61),u=t(m),_=e(65),C=t(_),k=e(48),R=t(k);function P(){var w=this.context,H=(0,i.default)(w).getInstance(),N=(0,R.default)(w).getInstance(),A=void 0,M=void 0,I=void 0,D=void 0,v=void 0;function T(){M=(0,C.default)(w).getInstance(),de()}function W(){me(),H.on(n.default.UPDATE_TIME_SYNC_OFFSET,ie,this)}function O(){return I}function B(Q){I=Q}function L(){return v}function K(Q){v=Q}function x(Q,X,j,le){var G=NaN;return le?j&&X.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?G=new Date(X.availabilityStartTime.getTime()+(Q+X.timeShiftBufferDepth)*1e3):G=X.availabilityEndTime:j?G=new Date(X.availabilityStartTime.getTime()+(Q-I)*1e3):G=X.availabilityStartTime,G}function U(Q,X,j){return x.call(this,Q,X,j)}function Y(Q,X,j){return x.call(this,Q,X,j,!0)}function oe(Q,X){return(Q.getTime()-X.mpd.availabilityStartTime.getTime()+I*1e3)/1e3}function ue(Q,X){var j=X.adaptation.period.start,le=X.presentationTimeOffset;return Q+(j-le)}function re(Q,X){var j=X.adaptation.period.start,le=X.presentationTimeOffset;return Q-j+le}function ve(Q,X){var j=void 0,le=void 0,G=void 0;return X&&(j=Q.representation.adaptation.period.mpd.suggestedPresentationDelay,le=Q.presentationStartTime+j,G=new Date(Q.availabilityStartTime.getTime()+le*1e3)),G}function ce(Q,X){var j=Q.adaptation.period,le={start:j.start,end:j.start+j.duration};if(!X)return le;if(!D&&Q.segmentAvailabilityRange)return Q.segmentAvailabilityRange;var G=Q.segmentDuration||(Q.segments&&Q.segments.length?Q.segments[Q.segments.length-1].duration:0);if(Q.segmentInfoType===u.default.SEGMENT_TIMELINE&&N.get().streaming.calcSegmentAvailabilityRangeFromTimeline)return se(Q);var c=oe(new Date,j),E=j.start+j.duration;le.start=Math.max(c-j.mpd.timeShiftBufferDepth,j.start);var b=Q.availabilityTimeOffset!==void 0&&Q.availabilityTimeOffset<G?G-Q.availabilityTimeOffset:G;return le.end=c>=E&&c-b<E?E:c-b,le}function se(Q){var X=Q.adaptation.period.mpd.manifest.Period_asArray[Q.adaptation.period.index].AdaptationSet_asArray[Q.adaptation.index],j=M.getRepresentationFor(Q.index,X),le=j.SegmentTemplate.SegmentTimeline,G=j.SegmentTemplate.timescale,c=le.S_asArray,E={start:0,end:0},b=0,l=void 0,d=void 0,y=void 0,V=void 0;for(E.start=ue(c[0].t/G,Q),y=0,V=c.length;y<V;y++)l=c[y],d=0,l.hasOwnProperty("r")&&(d=l.r),b+=l.d/G*(1+d);return E.end=E.start+b,E}function J(Q,X){var j=Q.adaptation.period;if(!X)return j.start+j.duration;if(!D&&Q.segmentAvailabilityRange)return Q.segmentAvailabilityRange;var le=Q.segmentDuration||(Q.segments&&Q.segments.length?Q.segments[Q.segments.length-1].duration:0),G=oe(new Date,j),c=j.start+j.duration,E=Q.availabilityTimeOffset!==void 0&&Q.availabilityTimeOffset<le?le-Q.availabilityTimeOffset:le;return Math.min(G-E,c)}function ee(Q,X){var j=Q.adaptation.period.start;return X-j}function ie(Q){Q.offset!==void 0&&(B(Q.offset/1e3),D=!0)}function me(){I=0,D=!1,v=NaN}function de(){H.off(n.default.UPDATE_TIME_SYNC_OFFSET,ie,this),me()}return A={initialize:W,getClientTimeOffset:O,setClientTimeOffset:B,getExpectedLiveEdge:L,setExpectedLiveEdge:K,calcAvailabilityStartTimeFromPresentationTime:U,calcAvailabilityEndTimeFromPresentationTime:Y,calcPresentationTimeFromWallTime:oe,calcPresentationTimeFromMediaTime:ue,calcPeriodRelativeTimeFromMpdRelativeTime:ee,calcMediaTimeFromPresentationTime:re,calcSegmentAvailabilityRange:ce,getPeriodEnd:J,calcWallTimeForSegment:ve,reset:de},T(),A}P.__dashjs_factory_name="TimelineConverter",r.default=h.default.getSingletonFactory(P),g.exports=r.default},{"46":46,"47":47,"48":48,"54":54,"61":61,"65":65}],84:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(112),n=t(o),f=e(81);function h(u,_){u=u||{};var C=u.timelineConverter,k=void 0;function R(){if(!C||!C.hasOwnProperty("calcMediaTimeFromPresentationTime")||!C.hasOwnProperty("calcSegmentAvailabilityRange"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function P(N,A){var M=N.adaptation.period.mpd.manifest.Period_asArray[N.adaptation.period.index].AdaptationSet_asArray[N.adaptation.index].Representation_asArray[N.index].SegmentTemplate||N.adaptation.period.mpd.manifest.Period_asArray[N.adaptation.period.index].AdaptationSet_asArray[N.adaptation.index].Representation_asArray[N.index].SegmentList,I=M.SegmentTimeline,D=M.SegmentURL_asArray,v=0,T=0,W=-1,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0;ue=N.timescale,O=I.S_asArray;var re=!1;for(L=0,K=O.length;L<K&&!re;L++){if(B=O[L],U=0,B.hasOwnProperty("r")&&(U=B.r),B.hasOwnProperty("t")&&(v=B.t,T=v/ue),U<0){if(oe=O[L+1],oe&&oe.hasOwnProperty("t"))Y=oe.t/ue;else{var ve=N.segmentAvailabilityRange?N.segmentAvailabilityRange.end:C.calcSegmentAvailabilityRange(N,_).end;Y=C.calcMediaTimeFromPresentationTime(ve,N),N.segmentDuration=B.d/ue}U=Math.ceil((Y-T)/(B.d/ue))-1}for(x=0;x<=U&&!re;x++)W++,re=A(v,T,M,D,B,ue,W,L),re&&(N.segmentDuration=B.d/ue,(x<U-1||L<K-1)&&W++),v+=B.d,T=v/ue}N.availableSegmentsNumber=W}function w(N,A,M){if(R(),!N)return null;var I=null,D=!1;return P(N,function(v,T,W,O,B,L,K,x){if(D||M<0){var U=W.media,Y=B.mediaRange;return O&&(U=O[x].media||"",Y=O[x].mediaRange),I=(0,f.getTimeBasedSegment)(C,_,N,v,B.d,L,U,Y,K,B.tManifest),!0}else T>=M-B.d*.5/L&&(D=!0);return!1}),I}function H(N,A){if(R(),!N)return null;A===void 0&&(A=null);var M=null,I=C.calcMediaTimeFromPresentationTime(A,N);return P(N,function(D,v,T,W,O,B,L,K){if(I<v+O.d/B){var x=T.media,U=O.mediaRange;return W&&(x=W[K].media||"",U=W[K].mediaRange),M=(0,f.getTimeBasedSegment)(C,_,N,D,O.d,B,x,U,L,O.tManifest),!0}return!1}),M}return k={getSegmentByIndex:w,getSegmentByTime:H},k}h.__dashjs_factory_name="TimelineSegmentsGetter";var m=i.default.getClassFactory(h);r.default=m,g.exports=r.default},{"112":112,"47":47,"81":81}],85:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.period=null,this.index=-1,this.type=null};r.default=p,g.exports=r.default},{}],86:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var p=1,i=1,o=function n(f,h,m,u){t(this,n),this.url=f||"",this.serviceLocation=h||f||"",this.dvb_priority=m||p,this.dvb_weight=u||i,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0};o.DEFAULT_DVB_PRIORITY=p,o.DEFAULT_DVB_WEIGHT=i,r.default=o,g.exports=r.default},{}],87:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};r.default=p,g.exports=r.default},{}],88:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0};r.default=p,g.exports=r.default},{}],89:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};r.default=p,g.exports=r.default},{}],90:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null};r.default=p,g.exports=r.default},{}],91:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.publishTime=null,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN};r.default=p,g.exports=r.default},{}],92:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n,f,h){p(this,o),this.action=n,this.xpath=f,this.value=h,this.position=null}return t(o,[{key:"getMpdTarget",value:function(f){var h=this.action==="remove"||this.action==="replace"||this.position==="before"||this.position==="after";return this.xpath.getMpdTarget(f,h)}}]),o}();r.default=i,g.exports=r.default},{}],93:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};p.DEFAULT_ID="defaultId",r.default=p,g.exports=r.default},{}],94:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function h(m,u){for(var _=0;_<u.length;_++){var C=u[_];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}return function(m,u,_){return u&&h(m.prototype,u),_&&h(m,_),m}}();function p(h){return h&&h.__esModule?h:{default:h}}function i(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}var o=e(61),n=p(o),f=function(){function h(){i(this,h),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}return t(h,[{key:"hasInitialization",value:function(){return this.initialization!==null||this.range!==null}},{key:"hasSegments",value:function(){return this.segmentInfoType!==n.default.BASE_URL&&this.segmentInfoType!==n.default.SEGMENT_BASE&&!this.indexRange}}]),h}();r.default=f,g.exports=r.default},{"61":61}],95:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};r.default=p,g.exports=r.default},{}],96:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null};r.default=p,g.exports=r.default},{}],97:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n){var f=this;p(this,o),this.valid=n[0]=="/",this.path=n.split("/").filter(function(h){return h.length!==0}).map(function(h){var m={name:h},u=h.indexOf("[");if(u!=-1){m.name=h.substring(0,u);var _=h.substring(u+1,h.length-1);f.valid=f.valid&&_.indexOf("[")==-1;var C=_.indexOf("=");C!=-1?(m.attribute={name:_.substring(1,C),value:_.substring(C+1)},["'",'"'].indexOf(m.attribute.value[0])!=-1&&(m.attribute.value=m.attribute.value.substring(1,m.attribute.value.length-1))):m.position=parseInt(_,10)-1}return m})}return t(o,[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){return this.path[this.path.length-1].name.startsWith("@")}},{key:"getMpdTarget",value:function(f,h){for(var m=null,u=f,_=1,C="MPD";_<this.path.length&&u!==null;){m=u;var k=this.path[_];if(C=k.name,_!==this.path.length-1||!C.startsWith("@")){var R=m[C+"_asArray"]||[];R.length===0&&m[C]&&R.push(m[C]),k.position?u=R[k.position]||null:k.attribute?function(){var P=k.attribute;u=R.filter(function(w){return w[P.name]==P.value})[0]||null}():u=R[0]||null}_++}return u===null?null:C.startsWith("@")?{name:C.substring(1),leaf:u,target:u}:{name:C,leaf:u,target:h?m:u}}}]),o}();r.default=i,g.exports=r.default},{}],98:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0};r.default=p,g.exports=r.default},{}],99:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.schemeIdUri="",this.value=""};r.default=p,g.exports=r.default},{}],100:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(112),i=t(p),o=e(163),n=t(o),f=e(242),h=t(f),m=e(239),u=t(m),_=e(47),C=t(_);function k(R){R=R||{};var P=this.context,w=R.eventBus,H=R.events,N=R.urlUtils,A=R.errors,M=void 0,I=void 0;function D(){I=(0,n.default)(P).create({errHandler:R.errHandler,errors:A,dashMetrics:R.dashMetrics,mediaPlayerModel:R.mediaPlayerModel,requestModifier:R.requestModifier,useFetch:R.settings.get().streaming.lowLatencyEnabled,urlUtils:N,constants:i.default,boxParser:R.boxParser,dashConstants:R.dashConstants,requestTimeout:R.settings.get().streaming.fragmentRequestTimeout})}function v(B){var L=function(U){w.trigger(H.CHECK_FOR_EXISTENCE_COMPLETED,{request:B,exists:U})};if(B){var K=new h.default(B.url);I.load({request:K,success:function(){L(!0)},error:function(){L(!1)}})}else L(!1)}function T(B){var L=function(x,U){w.trigger(H.LOADING_COMPLETED,{request:B,response:x||null,error:U||null,sender:M})};B?I.load({request:B,progress:function(x){w.trigger(H.LOADING_PROGRESS,{request:B,stream:x.stream}),x.data&&w.trigger(H.LOADING_DATA_PROGRESS,{request:B,response:x.data||null,error:null,sender:M})},success:function(x){L(x)},error:function(x,U,Y){L(void 0,new u.default(A.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,Y,U))},abort:function(x){x&&w.trigger(H.LOADING_ABANDONED,{mediaType:x.mediaType,request:x,sender:M})}}):L(void 0,new u.default(A.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,A.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))}function W(){I&&I.abort()}function O(){I&&(I.abort(),I=null)}return M={checkForExistence:v,load:T,abort:W,reset:O},D(),M}k.__dashjs_factory_name="FragmentLoader",r.default=C.default.getClassFactory(k),g.exports=r.default},{"112":112,"163":163,"239":239,"242":242,"47":47}],101:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(x){return x&&x.__esModule?x:{default:x}}var p=e(112),i=t(p),o=e(61),n=t(o),f=e(128),h=t(f),m=e(163),u=t(m),_=e(234),C=t(_),k=e(246),R=t(k),P=e(239),w=t(P),H=e(255),N=e(46),A=t(N),M=e(54),I=t(M),D=e(51),v=t(D),T=e(47),W=t(T),O=e(67),B=t(O);function L(x){x=x||{};var U=this.context,Y=x.debug,oe=(0,A.default)(U).getInstance(),ue=(0,C.default)(U).getInstance(),re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=x.mssHandler,ie=x.errHandler;function me(){ve=Y.getLogger(re),oe.on(I.default.XLINK_READY,de,re),ce=(0,u.default)(U).create({errHandler:x.errHandler,dashMetrics:x.dashMetrics,mediaPlayerModel:x.mediaPlayerModel,requestModifier:x.requestModifier,useFetch:x.settings.get().streaming.lowLatencyEnabled,urlUtils:ue,constants:i.default,dashConstants:n.default,errors:v.default}),se=(0,h.default)(U).create({errHandler:ie,dashMetrics:x.dashMetrics,mediaPlayerModel:x.mediaPlayerModel,requestModifier:x.requestModifier,settings:x.settings}),J=null}function de(le){oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:le.manifest})}function Q(le){var G=null;return le.indexOf("SmoothStreamingMedia")>-1?(ee&&(G=ee.createMssParser(),ee.registerEvents()),G):le.indexOf("MPD")>-1||le.indexOf("Patch")>-1?(0,B.default)(U).create({debug:Y}):G}function X(le){var G=new R.default(le,H.HTTPRequest.MPD_TYPE);ce.load({request:G,success:function(E,b,l){if(!!se){var d=void 0,y=void 0,V=void 0;if(l&&l!==le?(y=ue.parseBaseUrl(l),d=l):(ue.isRelative(le)&&(le=ue.resolve(le,window.location.href)),y=ue.parseBaseUrl(le)),b=="No Content"){oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:null});return}if(J===null&&(J=Q(E)),J===null){oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new w.default(v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(""+le))});return}se.setMatchers(J.getMatchers()),se.setIron(J.getIron());try{V=J.parse(E)}catch(te){oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new w.default(v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(""+le))});return}V?(V.url=d||le,V.originalUrl||(V.originalUrl=V.url),V.hasOwnProperty(i.default.LOCATION)&&(y=ue.parseBaseUrl(V.Location_asArray[0]),ve.debug("BaseURI set by Location to: "+y)),V.baseUri=y,V.loadedTime=new Date,se.resolveManifestOnLoad(V),oe.trigger(I.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:E})):oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new w.default(v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,v.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(""+le))})}},error:function(E,b,l){oe.trigger(I.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new w.default(v.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,v.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(le+", "+l))})}})}function j(){oe.off(I.default.XLINK_READY,de,re),ee&&ee.reset(),se&&(se.reset(),se=null),ce&&(ce.abort(),ce=null)}return re={load:X,reset:j},me(),re}L.__dashjs_factory_name="ManifestLoader";var K=W.default.getClassFactory(L);r.default=K,g.exports=r.default},{"112":112,"128":128,"163":163,"234":234,"239":239,"246":246,"255":255,"46":46,"47":47,"51":51,"54":54,"61":61,"67":67}],102:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f),m=e(45),u=t(m),_=e(51),C=t(_),k=e(61),R=t(k),P=e(234),w=t(P);function H(){var N=this.context,A=(0,i.default)(N).getInstance(),M=(0,w.default)(N).getInstance(),I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0;function oe(){D=(0,u.default)(N).getInstance().getLogger(I)}function ue(G){!G||(G.manifestModel&&(K=G.manifestModel),G.adapter&&(x=G.adapter),G.manifestLoader&&(L=G.manifestLoader),G.errHandler&&(U=G.errHandler),G.settings&&(Y=G.settings))}function re(){ce(),A.on(n.default.STREAMS_COMPOSED,le,this),A.on(n.default.PLAYBACK_STARTED,X,this),A.on(n.default.PLAYBACK_PAUSED,j,this),A.on(n.default.INTERNAL_MANIFEST_LOADED,Q,this)}function ve(G){me(G)}function ce(){v=NaN,B=!1,W=!0,O=!1,J()}function se(){A.off(n.default.PLAYBACK_STARTED,X,this),A.off(n.default.PLAYBACK_PAUSED,j,this),A.off(n.default.STREAMS_COMPOSED,le,this),A.off(n.default.INTERNAL_MANIFEST_LOADED,Q,this),ce()}function J(){T!==null&&(clearTimeout(T),T=null)}function ee(G){J(),!O&&(isNaN(G)&&!isNaN(v)&&(G=v*1e3),isNaN(G)||(D.debug("Refresh manifest in "+G+" milliseconds."),T=setTimeout(de,G)))}function ie(){var G=arguments.length<=0||arguments[0]===void 0?!1:arguments[0];B=!0;var c=K.getValue(),E=c.url,b=x.getPatchLocation(c),l=x.getLocation(c);b&&!G?E=b:l&&(E=l),M.isRelative(E)&&(E=M.resolve(E,c.url)),L.load(E)}function me(G){if(!G)G=K.getValue(),G.loadedTime=new Date;else if(x.getIsPatch(G)){var c=G;G=K.getValue();var E=x.isPatchValid(G,c),b=E;if(E){var l=x.getPublishTime(G);b=x.applyPatchToManifest(G,c);var d=x.getPublishTime(G);b=l.getTime()!=d.getTime()}if(!b){D.debug("Patch provided is invalid, performing full manifest refresh"),ie(!0);return}G.loadedTime=new Date}if(K.getValue()&&K.getValue().type===R.default.DYNAMIC&&G.type===R.default.STATIC){A.trigger(n.default.DYNAMIC_TO_STATIC),B=!1,O=!0;return}K.setValue(G);var y=new Date,V=(y.getTime()-G.loadedTime.getTime())/1e3;v=x.getManifestUpdatePeriod(G,V),v*1e3>2147483647&&(v=2147483647/1e3),A.trigger(n.default.MANIFEST_UPDATED,{manifest:G}),D.info("Manifest has been refreshed at "+y+"["+y.getTime()/1e3+"] "),W||ee()}function de(){if(!W){if(B){ee(Y.get().streaming.manifestUpdateRetryInterval);return}ie()}}function Q(G){G.error?G.error.code===C.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&U.error(G.error):me(G.manifest)}function X(){W=!1,ee()}function j(){W=!Y.get().streaming.scheduleWhilePaused,W&&J()}function le(){B=!1}return I={initialize:re,setManifest:ve,refreshManifest:ie,setConfig:ue,reset:se},oe(),I}H.__dashjs_factory_name="ManifestUpdater",r.default=h.default.getClassFactory(H),g.exports=r.default},{"234":234,"45":45,"46":46,"47":47,"51":51,"54":54,"61":61}],103:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}var p=e(2),i=t(p),o=e(112),n=t(o),f=e(61),h=t(f),m=e(113),u=t(m),_=e(124),C=t(_),k=e(126),R=t(k),P=e(121),w=t(P),H=e(122),N=t(H),A=e(116),M=t(A),I=e(101),D=t(I),v=e(226),T=t(v),W=e(220),O=t(W),B=e(221),L=t(B),K=e(215),x=t(K),U=e(231),Y=t(U),oe=e(213),ue=t(oe),re=e(158),ve=t(re),ce=e(155),se=t(ce),J=e(156),ee=t(J),ie=e(115),me=t(ie),de=e(162),Q=t(de),X=e(159),j=t(X),le=e(153),G=t(le),c=e(223),E=t(c),b=e(45),l=t(b),d=e(51),y=t(d),V=e(46),te=t(V),$=e(54),ae=t($),ne=e(104),Se=t(ne),Ie=e(47),he=t(Ie),ye=e(48),_e=t(ye),pe=e(50),De=e(63),je=t(De),Fe=e(56),Le=t(Fe),Ve=e(58),Ge=t(Ve),we=e(83),at=t(we),Re=e(255),Xe=e(1),lt=t(Xe),ct=e(9),tt=t(ct),St=e(239),Ct=t(St),wt=e(232),We=e(102),He=t(We),ze=e(234),mt=t(ze),vt=e(219),pt=t(vt);function Rt(){var Pe="You must first call initialize() and set a source before calling this method",Ye="You must first call initialize() and set a valid source and view before calling this method",Ze="You must first call attachView() to set the video element before calling this method",ut="You must first call attachSource() with a valid source before calling this method",Ue="MediaPlayer not initialized!",Je=this.context,ht=(0,te.default)(Je).getInstance(),Et=(0,_e.default)(Je).getInstance(),rt=(0,l.default)(Je).getInstance({settings:Et}),Dt=void 0,kt=void 0,ft=void 0,Gt=void 0,Kt=void 0,Vt=void 0,Pt=void 0,Ee=void 0,Z=void 0,Ae=void 0,Te=void 0,be=void 0,Oe=void 0,Qe=void 0,Tt=void 0,dt=void 0,st=void 0,bt=void 0,Yt=void 0,xt=void 0,Qt=void 0,Xt=void 0,Ut=void 0,Zt=void 0,qe=void 0,ot=void 0,yt=void 0,Ke=void 0,it=void 0,Ne=void 0,S=void 0,z=void 0,F=void 0,q=void 0,fe=void 0,ge=void 0;function Me(){kt=rt.getLogger(Dt),Kt=!1,Pt=!1,Vt=!1,Ee=!0,Oe=null,dt=null,Gt=null,st=null,F=null,ae.default.extend(Se.default),bt=(0,ee.default)(Je).getInstance(),it=(0,j.default)(Je).getInstance(),S=(0,ve.default)(Je).getInstance(),q=[],fe=[],ge=[]}function ke(Be){!Be||(Be.capabilities&&(Qt=Be.capabilities),Be.capabilitiesFilter&&(Xt=Be.capabilitiesFilter),Be.streamController&&(Ut=Be.streamController),Be.gapController&&(Zt=Be.gapController),Be.playbackController&&(qe=Be.playbackController),Be.mediaPlayerModel&&(bt=Be.mediaPlayerModel),Be.abrController&&(Z=Be.abrController),Be.schemeLoaderFactory&&(Ae=Be.schemeLoaderFactory),Be.mediaController&&(be=Be.mediaController),Be.settings&&(Et=Be.settings))}function $e(Be,_t,Ot){if(Qt||(Qt=(0,O.default)(Je).getInstance()),Yt=(0,T.default)(Je).getInstance(),!Qt.supportsMediaSource()){Yt.error(new Ct.default(y.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,y.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE));return}Kt||(Kt=!0,Te=(0,at.default)(Je).getInstance(),Z||(Z=(0,me.default)(Je).getInstance(),Z.setConfig({settings:Et})),Ae||(Ae=(0,Q.default)(Je).getInstance()),qe||(qe=(0,C.default)(Je).getInstance()),be||(be=(0,N.default)(Je).getInstance()),Ut||(Ut=(0,R.default)(Je).getInstance()),Zt||(Zt=(0,w.default)(Je).getInstance()),Xt||(Xt=(0,L.default)(Je).getInstance()),st=(0,Le.default)(Je).getInstance(),yt=(0,se.default)(Je).getInstance(),Ke=(0,G.default)(Je).getInstance(),ot=(0,Ge.default)(Je).getInstance({settings:Et}),Ne=(0,ue.default)(Je).getInstance(),z=(0,E.default)(Je).getInstance({settings:Et}),st.setConfig({constants:n.default,cea608parser:i.default,errHandler:Yt,BASE64:lt.default}),xt||(xt=(0,M.default)(Je).create()),xt.setConfig({adapter:st}),F=(0,je.default)(Je).getInstance({dashMetrics:ot,mediaPlayerModel:bt,errHandler:Yt,baseURLController:xt,events:ae.default,eventBus:ht,debug:rt,boxParser:(0,pt.default)(Je).getInstance(),requestModifier:(0,Y.default)(Je).getInstance(),errors:y.default}),F.initialize(),be.setConfig({domStorage:z,settings:Et}),Bn(),kn(Ot!==void 0?Ot:!0),Gn(),Be&&sn(Be),_t&&ln(_t),kt.info("[dash.js "+xe()+"] MediaPlayer has been initialized"))}function gt(){ln(null),sn(null),Gt=null,Oe&&(Oe.reset(),Oe=null),Qe&&(Qe.reset(),Qe=null),F.reset(),Et.reset(),dt&&(dt.reset(),dt=null)}function Nt(){gt(),q=[],fe=[],ge=[],he.default.deleteSingletonInstances(Je)}function Lt(){return!!ft&&!!it.getElement()}function At(Be,_t,Ot,jt){ht.on(Be,_t,Ot,jt)}function Ht(Be,_t,Ot){ht.off(Be,_t,Ot)}function xe(){return(0,pe.getVersionString)()}function et(){return rt}function Mt(){if(it.getElement()||Vt)return!1;if(ft)dn();else throw ut}function nt(){if(!Pt)throw Ye;(!Ee||Ft()&&Pt)&&qe.play()}function It(){if(!Pt)throw Ye;qe.pause()}function Ft(){if(!Pt)throw Ye;return qe.isPaused()}function Wt(Be){if(!Pt)throw Ye;if((0,wt.checkParameterType)(Be,"number"),isNaN(Be))throw n.default.BAD_ARGUMENT_ERROR;var _t=qe.getIsDynamic()?rn(Be):Be;qe.seek(_t)}function zt(){if(!Pt)throw Ye;return qe.isSeeking()}function qt(){if(!Pt)throw Ye;return qe.getIsDynamic()}function er(Be){hr().playbackRate=Be}function dr(){return hr().playbackRate}function cr(Be){(0,wt.checkParameterType)(Be,"boolean"),hr().muted=Be}function yr(){return hr().muted}function tn(Be){if(typeof Be!="number"||isNaN(Be)||Be<0||Be>1)throw n.default.BAD_ARGUMENT_ERROR;hr().volume=Be}function di(){return hr().volume}function ci(Be){var _t=[n.default.VIDEO,n.default.AUDIO,n.default.FRAGMENTED_TEXT];if(Be)if(_t.indexOf(Be)!==-1){var Ot=an().getCurrentBufferLevel(Be);return Ot||NaN}else return kt.warn("getBufferLength requested for invalid type"),NaN;else{var Ot=_t.map(function(jt){return Un(jt).length>0?an().getCurrentBufferLevel(jt):Number.MAX_VALUE}).reduce(function(jt,ur){return Math.min(jt,ur)});return Ot===Number.MAX_VALUE?NaN:Ot}}function hi(){var Be=ot.getCurrentDVRInfo();return Be?Be.manifestInfo.DVRWindowSize:0}function rn(Be){var _t=ot.getCurrentDVRInfo();if(!_t)return 0;var Ot=qe.getLiveDelay(),jt=_t.range.start+Be;return jt>_t.range.end-Ot&&(jt=_t.range.end-Ot),jt}function nn(Be){if(!Pt)throw Ye;var _t=hr().currentTime;if(Be!==void 0)_t=Ut.getTimeRelativeToStreamId(_t,Be);else if(qe.getIsDynamic()){var Ot=ot.getCurrentDVRInfo();_t=Ot===null||_t===0?0:Math.max(0,_t-Ot.range.start)}return _t}function xn(){if(!Pt)throw Ye;var Be=hr().duration;if(qe.getIsDynamic()){var _t=ot.getCurrentDVRInfo();Be=_t?_t.range.end-_t.range.start:0}return Be}function gi(){if(!Pt)throw Ye;return nn()<0?NaN:Vn(nn())}function mi(){if(!Pt)throw Ye;return Vn(xn())}function pi(Be){if(!Vt)throw Pe;return Z.getTopBitrateInfoFor(Be)}function vi(Be){if(!Vt)throw Pe;if(Be===n.default.IMAGE){var _t=Hr();if(!_t)return-1;var Ot=_t.getThumbnailController();return Ot?Ot.getCurrentTrackIndex():-1}return Z.getQualityFor(Be)}function yi(Be,_t){if(!Vt)throw Pe;if(Be===n.default.IMAGE){var Ot=Hr();if(!Ot)return;var jt=Ot.getThumbnailController();jt&&jt.setTrackByIndex(_t)}Z.setPlaybackQuality(Be,Ut.getActiveStreamInfo(),_t)}function Ei(){Z.setElementSize(),Z.setWindowResizeEventCalled(!0)}function kn(Be){(0,wt.checkParameterType)(Be,"boolean"),Ee=Be}function _i(){return Ee}function Ti(){if(!Kt)throw Ue;return Pt?qe.getCurrentLiveLatency():NaN}function Si(Be,_t,Ot){bt.addABRCustomRule(Be,_t,Ot)}function Ai(Be){bt.removeABRCustomRule(Be)}function Mi(){bt.removeABRCustomRule()}function Ri(Be,_t){bt.addUTCTimingSource(Be,_t)}function Ci(Be,_t){bt.removeUTCTimingSource(Be,_t)}function bi(){bt.clearDefaultUTCTimingSources()}function Bn(){bt.restoreDefaultUTCTimingSources()}function Ii(Be){var _t=Z.getThroughputHistory();return _t?_t.getAverageThroughput(Be):0}function wi(Be,_t){bt.setXHRWithCredentialsForType(Be,_t)}function Di(Be){return bt.getXHRWithCredentialsForType(Be)}function Ni(){return Gn()}function an(){return ot}function Pi(Be){kt.warn('setTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use setInitialMediaSettingsFor("fragmentedText", { lang: lang }) instead'),Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.setTextDefaultLanguage(Be)}function Oi(){return kt.warn('getTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use getInitialMediaSettingsFor("fragmentedText").lang instead'),Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.getTextDefaultLanguage()}function Li(Be){Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.setTextDefaultEnabled(Be)}function Fi(){return Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.getTextDefaultEnabled()}function xi(Be){Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.enableText(Be)}function ki(Be){Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.enableForcedTextStreaming(Be)}function Bi(){return Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.isTextEnabled()}function Ui(Be){if(!Pt)throw Ye;Ne===void 0&&(Ne=(0,ue.default)(Je).getInstance()),Ne.setTextTrack(Be)}function Hi(){var Be=NaN;return Ne&&(Be=Ne.getCurrentTrackIdx()),Be}function Gi(Be){var _t=(0,x.default)(Je).getInstance();_t.setConfig({videoModel:it}),_t.initialize(),_t.setDisplayCConTop(Be)}function hr(){if(!it.getElement())throw Ze;return it.getElement()}function sn(Be){if(!Kt)throw Ue;it.setElement(Be),Be&&(fn(),_s(),Ts(),Ut&&Ut.switchToVideoElement()),Pt&&Hn(),dn()}function Vi(){return it?it.getTTMLRenderingDiv():null}function Ki(Be){if(!it.getElement())throw Ze;it.setTTMLRenderingDiv(Be)}function Yi(Be){if(!Vt)throw Pe;var _t=Hr();return _t?_t.getBitrateListFor(Be):[]}function Wi(Be){if(!Vt)throw Pe;return st.getStreamsInfo(Be)}function Un(Be){if(!Vt)throw Pe;var _t=Ut.getActiveStreamInfo();return be.getTracksFor(Be,_t)}function zi(Be,_t,Ot){if(!Vt)throw Pe;return Ot=Ot||st.getStreamsInfo(_t,1)[0],Ot?st.getAllMediaInfoForType(Ot,Be,_t):[]}function qi(Be){if(!Vt)throw Pe;var _t=Ut.getActiveStreamInfo();return be.getCurrentTrackFor(Be,_t)}function Xi(Be,_t){if(!Kt)throw Ue;be.setInitialSettings(Be,_t),Be===n.default.FRAGMENTED_TEXT&&Ne.setInitialSettings(_t)}function ji(Be){if(!Kt)throw Ue;return be.getInitialSettings(Be)}function Qi(Be){if(!Vt)throw Pe;be.setTrack(Be)}function $i(Be){if(!Kt)throw Ue;return be.getSwitchMode(Be)}function Ji(Be,_t){if(!Kt)throw Ue;be.setSwitchMode(Be,_t)}function Zi(Be){if(!Kt)throw Ue;be.setSelectionModeForInitialTrack(Be)}function es(){if(!Kt)throw Ue;return be.getSelectionModeForInitialTrack()}function ts(){return fn()}function rs(Be){Oe=Be}function ns(Be){Gt=Be,Ut&&Ut.setProtectionData(Gt)}function as(Be){q.push(Be),Oe&&Oe.setLicenseRequestFilters(q)}function is(Be){fe.push(Be),Oe&&Oe.setLicenseResponseFilters(fe)}function ss(Be){on(q,Be),Oe&&Oe.setLicenseRequestFilters(q)}function os(Be){on(fe,Be),Oe&&Oe.setLicenseResponseFilters(fe)}function ls(Be){ge.push(Be),Xt&&Xt.setCustomCapabilitiesFilters(ge)}function us(Be){on(ge,Be),Xt&&Xt.setCustomCapabilitiesFilters(ge)}function on(Be,_t){var Ot=-1;Be.some(function(jt,ur){if(jt===_t)return Ot=ur,!0}),!(Ot<0)&&Be.splice(Ot,1)}function fs(Be,_t){if(typeof _t=="function"){if(Be<0){_t(null);return}var Ot=qe.getIsDynamic()?rn(Be):Be,jt=Ut.getStreamForTime(Ot);if(jt===null){_t(null);return}var ur=jt.getThumbnailController();if(!ur){_t(null);return}var wr=Ut.getTimeRelativeToStreamId(Ot,jt.getId());return ur.provide(wr,_t)}}function ds(Be,_t){var Ot=un(),jt=this,ur=function wr(Mr){Mr.error?_t(null,Mr.error):_t(Mr.manifest),ht.off(ae.default.INTERNAL_MANIFEST_LOADED,wr,jt),Ot.reset()};ht.on(ae.default.INTERNAL_MANIFEST_LOADED,ur,jt),S.initialize(Be),Ot.load(Be)}function cs(){if(!ft)throw ut;return ft}function ln(Be){if(!Kt)throw Ue;typeof Be=="string"&&S.initialize(Be),ft=Be,(Vt||Pt)&&Hn(),Lt()&&dn()}function hs(){return Et.get()}function gs(Be){Et.update(Be)}function ms(){Et.reset()}function ps(Be,_t,Ot){var jt=arguments.length<=3||arguments[3]===void 0?!1:arguments[3],ur=new Date(Be*1e3),wr=ur.toLocaleDateString(_t),Mr=ur.toLocaleTimeString(_t,{hour12:Ot});return jt?Mr+" "+wr:Mr}function vs(Be){Be=Math.max(Be,0);var _t=Math.floor(Be/3600),Ot=Math.floor(Be%3600/60),jt=Math.floor(Be%3600%60);return(_t===0?"":_t<10?"0"+_t.toString()+":":_t.toString()+":")+(Ot<10?"0"+Ot.toString():Ot.toString())+":"+(jt<10?"0"+jt.toString():jt.toString())}function ys(Be,_t,Ot){he.default.extend(Be,_t,Ot,Je)}function Hr(){if(!Vt)throw Pe;var Be=Ut.getActiveStreamInfo();return Be?Ut.getStreamById(Be.id):null}function Hn(){Pt=!1,Vt=!1,st.reset(),Ut.reset(),Zt.reset(),qe.reset(),Z.reset(),be.reset(),Ne.reset(),Oe&&(Et.get().streaming.keepProtectionMediaKeys?Oe.stop():(Oe.reset(),Oe=null,fn())),Ke.reset()}function Es(){var Be=un();Ut||(Ut=(0,R.default)(Je).getInstance()),Xt.setConfig({capabilities:Qt,adapter:st,settings:Et}),Xt.setCustomCapabilitiesFilters(ge),Ut.setConfig({capabilities:Qt,capabilitiesFilter:Xt,manifestLoader:Be,manifestModel:yt,mediaPlayerModel:bt,protectionController:Oe,adapter:st,dashMetrics:ot,errHandler:Yt,timelineConverter:Te,videoModel:it,playbackController:qe,abrController:Z,mediaController:be,textController:Ne,settings:Et,baseURLController:xt}),Zt.setConfig({settings:Et,playbackController:qe,streamController:Ut,videoModel:it,timelineConverter:Te,adapter:st}),qe.setConfig({streamController:Ut,dashMetrics:ot,mediaPlayerModel:bt,adapter:st,videoModel:it,timelineConverter:Te,uriFragmentModel:S,settings:Et}),Z.setConfig({streamController:Ut,domStorage:z,mediaPlayerModel:bt,dashMetrics:ot,adapter:st,videoModel:it,settings:Et}),Ne.setConfig({errHandler:Yt,manifestModel:yt,adapter:st,mediaController:be,streamController:Ut,videoModel:it}),Ke.setConfig({abrController:Z,dashMetrics:ot,playbackController:qe}),Ut.initialize(Ee,Gt),Zt.initialize(),Ke.initialize()}function un(){return(0,D.default)(Je).create({debug:rt,errHandler:Yt,dashMetrics:ot,mediaPlayerModel:bt,requestModifier:(0,Y.default)(Je).getInstance(),mssHandler:Tt,settings:Et})}function fn(){if(Oe)return Oe;var Be=dashjs.Protection;if(typeof Be=="function"){var _t=Be(Je).create();return ae.default.extend(Be.events),Se.default.extend(Be.events,{publicOnly:!0}),y.default.extend(Be.errors),Qt||(Qt=(0,O.default)(Je).getInstance()),Oe=_t.createProtectionSystem({debug:rt,errHandler:Yt,videoModel:it,capabilities:Qt,eventBus:ht,events:ae.default,BASE64:lt.default,constants:n.default,cmcdModel:Ke,settings:Et}),Oe&&(Oe.setLicenseRequestFilters(q),Oe.setLicenseResponseFilters(fe)),Oe}return null}function _s(){if(!Qe){var Be=dashjs.MetricsReporting;if(typeof Be=="function"){var _t=Be(Je).create();Qe=_t.createMetricsReporting({debug:rt,eventBus:ht,mediaElement:hr(),adapter:st,dashMetrics:ot,events:ae.default,constants:n.default,metricsConstants:u.default})}}}function Ts(){if(!Tt){var Be=dashjs.MssHandler;typeof Be=="function"&&(y.default.extend(Be.errors),Tt=Be(Je).create({eventBus:ht,mediaPlayerModel:bt,dashMetrics:ot,manifestModel:yt,playbackController:qe,streamController:Ut,protectionController:Oe,baseURLController:xt,errHandler:Yt,events:ae.default,constants:n.default,debug:rt,initSegmentType:Re.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:lt.default,ISOBoxer:tt.default,settings:Et}))}}function Gn(){if(!Kt)throw Ue;if(dt)return dt;var Be=dashjs.OfflineController;if(typeof Be=="function"){ae.default.extend(Be.events),Se.default.extend(Be.events,{publicOnly:!0}),y.default.extend(Be.errors);var _t=un(),Ot=(0,He.default)(Je).create();return Ot.setConfig({manifestModel:yt,adapter:st,manifestLoader:_t,errHandler:Yt}),dt=Be(Je).create({debug:rt,manifestUpdater:Ot,baseURLController:xt,manifestLoader:_t,manifestModel:yt,mediaPlayerModel:bt,abrController:Z,playbackController:qe,adapter:st,errHandler:Yt,dashMetrics:ot,timelineConverter:Te,schemeLoaderFactory:Ae,eventBus:ht,events:ae.default,errors:y.default,constants:n.default,settings:Et,dashConstants:h.default,urlUtils:(0,mt.default)(Je).getInstance()}),dt}return null}function Vn(Be){var _t=ot.getCurrentDVRInfo(),Ot=void 0,jt=void 0;return _t?(Ot=_t.manifestInfo.availableFrom.getTime()/1e3,jt=Be+(Ot+_t.range.start),jt):0}function dn(){dt&&dt.resetRecords(),!Vt&&ft&&(Vt=!0,kt.info("Streaming Initialized"),Es(),typeof ft=="string"?Ut.load(ft):Ut.loadWithManifest(ft)),!Pt&&Lt()&&(Pt=!0,kt.info("Playback Initialized"))}function Ss(){return st}return Dt={initialize:$e,setConfig:ke,on:At,off:Ht,extend:ys,attachView:sn,attachSource:ln,isReady:Lt,preload:Mt,play:nt,isPaused:Ft,pause:It,isSeeking:zt,isDynamic:qt,seek:Wt,setPlaybackRate:er,getPlaybackRate:dr,setMute:cr,isMuted:yr,setVolume:tn,getVolume:di,time:nn,duration:xn,timeAsUTC:gi,durationAsUTC:mi,getActiveStream:Hr,getDVRWindowSize:hi,getDVRSeekOffset:rn,convertToTimeCode:vs,formatUTC:ps,getVersion:xe,getDebug:et,getBufferLength:ci,getTTMLRenderingDiv:Vi,getVideoElement:hr,getSource:cs,getCurrentLiveLatency:Ti,getTopBitrateInfoFor:pi,setAutoPlay:kn,getAutoPlay:_i,getDashMetrics:an,getQualityFor:vi,setQualityFor:yi,updatePortalSize:Ei,setTextDefaultLanguage:Pi,getTextDefaultLanguage:Oi,setTextDefaultEnabled:Li,getTextDefaultEnabled:Fi,enableText:xi,enableForcedTextStreaming:ki,isTextEnabled:Bi,setTextTrack:Ui,getBitrateInfoListFor:Yi,getStreamsFromManifest:Wi,getTracksFor:Un,getTracksForTypeFromManifest:zi,getCurrentTrackFor:qi,setInitialMediaSettingsFor:Xi,getInitialMediaSettingsFor:ji,setCurrentTrack:Qi,getTrackSwitchModeFor:$i,setTrackSwitchModeFor:Ji,setSelectionModeForInitialTrack:Zi,getSelectionModeForInitialTrack:es,addABRCustomRule:Si,removeABRCustomRule:Ai,removeAllABRCustomRule:Mi,getAverageThroughput:Ii,retrieveManifest:ds,addUTCTimingSource:Ri,removeUTCTimingSource:Ci,clearDefaultUTCTimingSources:bi,restoreDefaultUTCTimingSources:Bn,setXHRWithCredentialsForType:wi,getXHRWithCredentialsForType:Di,getProtectionController:ts,attachProtectionController:rs,setProtectionData:ns,registerLicenseRequestFilter:as,registerLicenseResponseFilter:is,unregisterLicenseRequestFilter:ss,unregisterLicenseResponseFilter:os,registerCustomCapabilitiesFilter:ls,unregisterCustomCapabilitiesFilter:us,displayCaptionsOnTop:Gi,attachTTMLRenderingDiv:Ki,getCurrentTextTrackIndex:Hi,provideThumbnail:fs,getDashAdapter:Ss,getOfflineController:Ni,getSettings:hs,updateSettings:gs,resetSettings:ms,reset:gt,destroy:Nt},Me(),Dt}Rt.__dashjs_factory_name="MediaPlayer";var Ce=he.default.getClassFactory(Rt);Ce.events=Se.default,Ce.errors=y.default,he.default.updateClassFactory(Rt.__dashjs_factory_name,Ce),r.default=Ce,g.exports=r.default},{"1":1,"101":101,"102":102,"104":104,"112":112,"113":113,"115":115,"116":116,"121":121,"122":122,"124":124,"126":126,"153":153,"155":155,"156":156,"158":158,"159":159,"162":162,"2":2,"213":213,"215":215,"219":219,"220":220,"221":221,"223":223,"226":226,"231":231,"232":232,"234":234,"239":239,"255":255,"45":45,"46":46,"47":47,"48":48,"50":50,"51":51,"54":54,"56":56,"58":58,"61":61,"63":63,"83":83,"9":9}],104:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(55),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astInFuture",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.DYNAMIC_TO_STATIC="dynamicToStatic",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.SOURCE_INITIALIZED="sourceInitialized",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_UPDATED="streamUpdated",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_SEEK_ASKED="playbackSeekAsked",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",this.GAP_CAUSED_SEEK_TO_PERIOD_END="gapCausedSeekToPeriodEnd",this.GAP_CAUSED_INTERNAL_SEEK="gapCausedInternalSeek",this.EVENT_MODE_ON_START="eventModeOnStart",this.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",this.CONFORMANCE_VIOLATION="conformanceViolation"}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"55":55}],105:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}var p=e(103),i=t(p);function o(){var _="application/dash+xml",C=void 0;function k(w,H,N){if(!w||!/^VIDEO$/i.test(w.nodeName))return null;if(w._dashjs_player)return w._dashjs_player;var A=void 0,M=w.id||w.name||"video element";if(H=H||[].slice.call(w.querySelectorAll("source")).filter(function(I){return I.type==_})[0],!H&&w.src)H=document.createElement("source"),H.src=w.src;else if(!H&&!w.src)return null;return N=N||{},A=(0,i.default)(N).create(),A.initialize(w,H.src,w.autoplay),C||(C=A.getDebug().getLogger()),C.debug("Converted "+M+" to dash.js player and added content: "+H.src),w._dashjs_player=A,A}function R(w,H){var N=[];w=w||"[data-dashjs-player]",H=H||document;for(var A=H.querySelectorAll(w),M=0;M<A.length;M++){var I=k(A[M],null);N.push(I)}for(var D=H.querySelectorAll('source[type="'+_+'"]'),M=0;M<D.length;M++){var v=P(D[M]),I=k(v,null);N.push(I)}return N}function P(w){var H=!0;e:for(;H;){var N=w;if(H=!1,/^VIDEO$/i.test(N.nodeName))return N;w=N.parentNode,H=!0;continue e}}return{create:k,createAll:R}}var n=o(),f=void 0;function h(){window.removeEventListener("load",h),n.createAll()}function m(){window.dashjs&&(window.clearInterval(f),n.createAll())}var u=typeof window!="undefined"&&window&&window.dashjs&&window.dashjs.skipAutoCreate;!u&&typeof window!="undefined"&&window&&window.addEventListener&&(window.document.readyState==="complete"?window.dashjs?n.createAll():f=window.setInterval(m,500):window.addEventListener("load",h)),r.default=n,g.exports=r.default},{"103":103}],106:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(45),i=t(p),o=e(47),n=t(o);function f(m){var u=this.context,_=void 0,C=void 0,k=void 0,R=[],P=m;function w(){C=(0,i.default)(u).getInstance().getLogger(_)}function H(){R=[],k=null,P=null}function N(L){L.segmentType!=="InitializationSegment"?(R.push(L),R.sort(function(K,x){return K.start-x.start}),k=null):k=L,C.debug("PreBufferSink appended chunk s: "+L.start+"; e: "+L.end),P&&P({chunk:L})}function A(L,K){R=R.filter(function(x){return!((isNaN(K)||x.start<K)&&(isNaN(L)||x.end>L))})}function M(){}function I(){for(var L=[],K=0;K<R.length;K++){var x=R[K];L.length===0||x.start>L[L.length-1].end?L.push({start:x.start,end:x.end}):L[L.length-1].end=x.end}var U={start:function(oe){return L[oe].start},end:function(oe){return L[oe].end}};return Object.defineProperty(U,"length",{get:function(){return L.length}}),U}function D(){return!1}function v(){}function T(){return this}function W(L,K){var x=O(L,K);return k&&(x.push(k),k=null),A(L,K),x}function O(L,K){return R.filter(function(x){return(isNaN(K)||x.start<K)&&(isNaN(L)||x.end>L)})}function B(L){L()}return _={getAllBufferRanges:I,append:N,remove:A,abort:M,discharge:W,reset:H,updateTimestampOffset:v,hasDiscontinuitiesAfter:D,waitForUpdateEnd:B,getBuffer:T},w(),_}f.__dashjs_factory_name="PreBufferSink";var h=n.default.getClassFactory(f);r.default=h,g.exports=r.default},{"45":45,"47":47}],107:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(M){return M&&M.__esModule?M:{default:M}}var p=e(45),i=t(p),o=e(239),n=t(o),f=e(46),h=t(f),m=e(54),u=t(m),_=e(47),C=t(_),k=e(213),R=t(k),P=e(51),w=t(P),H=.1;function N(M,I,D,v){var T=this.context,W=(0,h.default)(T).getInstance(),O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=[],oe=[],ue=D;function re(){L=(0,i.default)(T).getInstance().getLogger(O),x=!1,B=I.type;var y=I.codec;try{if(y.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");K=v||M.addSourceBuffer(y),K.changeType&&v&&(L.debug("Doing period transition with changeType"),K.changeType(y)),de();var V=50;if(typeof K.addEventListener=="function")try{K.addEventListener("updateend",b,!1),K.addEventListener("error",l,!1),K.addEventListener("abort",l,!1)}catch($){U=setInterval(E,V)}else U=setInterval(E,V)}catch($){if(I.isText||y.indexOf('codecs="stpp')!==-1||y.indexOf('codecs="wvtt')!==-1){var te=(0,R.default)(T).getInstance();K=te.getTextSourceBuffer()}else throw $}}function ve(){return B}function ce(y){if(K){if(typeof K.removeEventListener=="function"&&(K.removeEventListener("updateend",b,!1),K.removeEventListener("error",l,!1),K.removeEventListener("abort",l,!1)),clearInterval(U),Y=[],!y){try{(!K.getClassName||K.getClassName()!=="TextSourceBuffer")&&(L.debug("Removing sourcebuffer from media source"),M.removeSourceBuffer(K))}catch(V){L.error("Failed to remove source buffer from media source.")}K=null}x=!1}oe=[],ue=null}function se(){return K}function J(){try{return K.buffered}catch(y){return L.error("getAllBufferRanges exception: "+y.message),null}}function ee(y){try{var V=J();if(V&&V.length>1){for(var te=0,$=V.length;te<$;te++)if(te>0&&y<V.start(te)&&V.start(te)>V.end(te-1)+H)return!0}}catch(ae){L.error("hasDiscontinuities exception: "+ae.message)}return!1}function ie(y){if(!y){ue({chunk:y,error:new n.default(w.default.APPEND_ERROR_CODE,w.default.APPEND_ERROR_MESSAGE)});return}oe.push(y),x||d(X.bind(this))}function me(y){K.timestampOffset!==y&&!isNaN(y)&&d(function(){y<0&&(y+=.001),K.timestampOffset=y})}function de(y){!K||d(function(){try{var V=M.duration,te=0;y&&!isNaN(y.start)&&!isNaN(y.duration)&&isFinite(y.duration)&&(V=y.start+y.duration),y&&!isNaN(y.start)&&(te=y.start),K.appendWindowStart=0,K.appendWindowEnd=V,K.appendWindowStart=te,L.debug("Updated append window. Set start to "+K.appendWindowStart+" and end to "+K.appendWindowEnd)}catch($){L.warn("Failed to set append window")}})}function Q(y,V,te){var $=this;d(function(){try{y>=0&&V>y&&(te||M.readyState!=="ended")&&K.remove(y,V),d(function(){W.trigger(u.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:$,from:y,to:V,unintended:!1})})}catch(ae){W.trigger(u.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:$,from:y,to:V,unintended:!1,error:new n.default(ae.code,ae.message)})}})}function X(){var y=this,V=this;oe.length>0&&function(){x=!0;var te=oe[0];oe.splice(0,1);var $=[],ae=function(){var Se=J();j(V,$,Se,te),oe.length>0?X.call(this):(x=!1,ue&&ue({chunk:te}))};try{te.bytes.length===0?ae.call(y):($=J(),K.appendBuffer?K.appendBuffer(te.bytes):K.append(te.bytes,te),d(ae.bind(y)))}catch(ne){L.fatal('SourceBuffer append failed "'+ne+'"'),oe.length>0?X():x=!1,ue&&ue({chunk:te,error:new n.default(ne.code,ne.message)})}}()}function j(y,V,te,$){V&&V.length>0&&V.length<te.length&&le(V,$)&&W.trigger(u.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:y,from:te.end(te.length-2),to:te.start(te.length-1),unintended:!0})}function le(y,V){for(var te=0;te<y.length;te++){var $=Math.round(y.start(te)),ae=Math.round(y.end(te));if(ae===V.start||$===V.end||V.start>=$&&V.end<=ae)return!0}return!1}function G(){try{(M.readyState==="open"||K.setTextTrack&&M.readyState==="ended")&&K.abort()}catch(y){L.error('SourceBuffer append abort failed: "'+y+'"')}oe=[]}function c(){if(Y.length>0){var y=Y.shift();K.updating?d(y):(y(),c())}}function E(){K.updating||c()}function b(){K.updating||c()}function l(){L.error("SourceBufferSink error")}function d(y){Y.push(y),K.updating||c()}return O={getType:ve,getAllBufferRanges:J,getBuffer:se,append:ie,remove:Q,abort:G,reset:ce,updateTimestampOffset:me,hasDiscontinuitiesAfter:ee,waitForUpdateEnd:d,updateAppendWindow:de},re(),O}N.__dashjs_factory_name="SourceBufferSink";var A=C.default.getClassFactory(N);r.default=A,g.exports=r.default},{"213":213,"239":239,"45":45,"46":46,"47":47,"51":51,"54":54}],108:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(x){return x&&x.__esModule?x:{default:x}}var p=e(112),i=t(p),o=e(61),n=t(o),f=e(109),h=t(f),m=e(120),u=t(m),_=e(216),C=t(_),k=e(46),R=t(k),P=e(54),w=t(P),H=e(45),N=t(H),A=e(51),M=t(A),I=e(47),D=t(I),v=e(239),T=t(v),W=e(219),O=t(W),B=e(234),L=t(B);function K(x){x=x||{};var U=this.context,Y=(0,R.default)(U).getInstance(),oe=(0,L.default)(U).getInstance(),ue=x.manifestModel,re=x.mediaPlayerModel,ve=x.manifestUpdater,ce=x.adapter,se=x.capabilities,J=x.capabilitiesFilter,ee=x.errHandler,ie=x.timelineConverter,me=x.dashMetrics,de=x.abrController,Q=x.playbackController,X=x.eventController,j=x.mediaController,le=x.textController,G=x.protectionController,c=x.videoModel,E=x.settings,b=x.streamInfo,l=void 0,d=void 0,y=void 0,V=void 0,te=void 0,$=void 0,ae=void 0,ne=void 0,Se=void 0,Ie=void 0,he=void 0,ye=void 0,_e=void 0,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=void 0;function Ve(){je=(0,N.default)(U).getInstance(),d=je.getLogger(l),wt(),pe=(0,O.default)(U).getInstance(),he=(0,u.default)(U).create({streamInfo:b,mediaPlayerModel:re,dashMetrics:me,errHandler:ee,settings:E,boxParser:pe,dashConstants:n.default,urlUtils:oe})}function Ge(){we(),Re(),Y.trigger(w.default.STREAM_UPDATED,{streamInfo:b})}function we(){Y.on(w.default.BUFFERING_COMPLETED,Te,l),Y.on(w.default.DATA_UPDATE_COMPLETED,be,l),Y.on(w.default.INBAND_EVENTS,Oe,l)}function at(){Y.off(w.default.DATA_UPDATE_COMPLETED,be,l),Y.off(w.default.BUFFERING_COMPLETED,Te,l),Y.off(w.default.INBAND_EVENTS,Oe,l)}function Re(){G&&(Y.on(w.default.KEY_ERROR,Et,l),Y.on(w.default.SERVER_CERTIFICATE_UPDATED,Et,l),Y.on(w.default.LICENSE_REQUEST_COMPLETE,Et,l),Y.on(w.default.KEY_SYSTEM_SELECTED,Et,l),Y.on(w.default.KEY_SESSION_CREATED,Et,l),Y.on(w.default.KEY_STATUSES_CHANGED,Et,l))}function Xe(){G&&(Y.off(w.default.KEY_ERROR,Et,l),Y.off(w.default.SERVER_CERTIFICATE_UPDATED,Et,l),Y.off(w.default.LICENSE_REQUEST_COMPLETE,Et,l),Y.off(w.default.KEY_SYSTEM_SELECTED,Et,l),Y.off(w.default.KEY_SESSION_CREATED,Et,l),Y.off(w.default.KEY_STATUSES_CHANGED,Et,l))}function lt(){return b?b.id:null}function ct(qe,ot){if(!te){var yt=void 0;return Y.on(w.default.CURRENT_TRACK_CHANGED,Dt,l),Ut()?(Pt(),yt=ot):yt=Vt(qe,ot),te=!0,yt}return ot}function tt(qe){for(var ot=y?y.length:0,yt=!1,Ke=0;Ke<ot;Ke++){var it=y[Ke].getFragmentModel();it.removeExecutedRequestsBeforeTime(vt()+He()),y[Ke].reset(yt,qe)}y=[],te=!1,$=!1,Xt(!1),Y.off(w.default.CURRENT_TRACK_CHANGED,Dt,l)}function St(){return te}function Ct(qe){for(var ot=0;ot<y.length;)rt(y[ot].getMediaInfo())?(y[ot].setMediaSource(qe),ot++):(y[ot].reset(),y.splice(ot,1));for(var ot=0;ot<y.length;ot++)y[ot].dischargePreBuffer();if(y.length===0){var yt="No streams to play.";ee.error(new T.default(M.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,yt+"nostreams",ue.getValue())),d.fatal(yt)}}function wt(){tt(),V=!1,ae=!1,ne=!1,Se={},Ie=!1,De=!1,Fe=!1}function We(){Q&&Q.pause(),he&&(he.reset(),he=null),b=null,wt(),at(),Xe(),Xt(!1)}function He(){return b?b.duration:NaN}function ze(){return Fe}function mt(qe){Fe=qe}function vt(){return b?b.start:NaN}function pt(){return De}function Rt(qe){De=qe}function Ce(){if(!b.manifestInfo.isDynamic)return NaN;for(var qe=0;qe<y.length;qe++)if(y[qe].getType()===i.default.AUDIO||y[qe].getType()===i.default.VIDEO)return y[qe].getLiveStartTime();return NaN}function Pe(){return b?b.id:null}function Ye(){return b}function Ze(){return ne}function ut(){return ae}function Ue(){return ye}function Je(){if(!c||!de||!de.hasOwnProperty("getBitrateList")||!ce||!ce.hasOwnProperty("getAllMediaInfoForType")||!ce.hasOwnProperty("getEventsFor"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function ht(qe){if(Je(),qe===i.default.IMAGE)return ye?ye.getBitrateList():[];var ot=Z(qe);return de.getBitrateList(ot)}function Et(qe){qe.error&&(ee.error(qe.error),d.fatal(qe.error.message),We())}function rt(qe){var ot=qe?qe.type:null,yt=void 0,Ke=void 0;if(ot===i.default.MUXED)return Ke="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",d.fatal(Ke),ee.error(new T.default(M.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,Ke,ue.getValue())),!1;if(ot===i.default.TEXT||ot===i.default.FRAGMENTED_TEXT||ot===i.default.EMBEDDED_TEXT||ot===i.default.IMAGE)return!0;if(yt=qe.codec,d.debug(ot+" codec: "+yt),!!qe.contentProtection&&!se.supportsEncryptedMedia())ee.error(new T.default(M.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,M.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));else if(!se.supportsCodec(yt))return Ke=ot+"Codec ("+yt+") is not supported.",d.error(Ke),!1;return!0}function Dt(qe){if(!(!b||qe.newMediaInfo.streamInfo.id!==b.id)){var ot=qe.newMediaInfo,yt=ue.getValue();ce.setCurrentMediaInfo(b.id,ot.type,ot);var Ke=Qe(ot);if(!!Ke){var it=Q.getTime();d.info("Stream - Process track changed at current time "+it),d.debug("Stream - Update stream controller"),yt.refreshManifestOnSwitchTrack?(d.debug("Stream - Refreshing manifest for switch track"),Le=qe,ve.refreshManifest()):(Ke.selectMediaInfo(ot),ot.type!==i.default.FRAGMENTED_TEXT?(de.updateTopQualityIndex(ot),Ke.switchTrackAsked(),Ke.getFragmentModel().abortRequests()):(Ke.getScheduleController().setSeekTarget(it),Ke.setBufferingTime(it),Ke.resetIndexHandler()))}}}function kt(qe,ot,yt,Ke){var it=he.getModel(qe?qe.type:null),Ne=(0,h.default)(U).create({streamInfo:b,type:qe?qe.type:null,mimeType:qe?qe.mimeType:null,timelineConverter:ie,adapter:ce,manifestModel:ue,mediaPlayerModel:re,fragmentModel:it,dashMetrics:x.dashMetrics,baseURLController:x.baseURLController,abrController:de,playbackController:Q,mediaController:j,textController:le,errHandler:ee,settings:E,boxParser:pe});if(Ne.initialize(yt,ae),de.updateTopQualityIndex(qe),Ke?(Ne.setBuffer(Ke.buffer),Ne.setBufferingTime(Ke.currentTime),y[Ke.replaceIdx]=Ne):y.push(Ne),!(Ke&&Ke.ignoreMediaInfo))if(qe&&(qe.type===i.default.TEXT||qe.type===i.default.FRAGMENTED_TEXT)){for(var S=void 0,z=0;z<ot.length;z++)ot[z].index===qe.index&&(S=z),Ne.addMediaInfo(ot[z]);Ne.selectMediaInfo(ot[S])}else Ne.addMediaInfo(qe,!0)}function ft(qe,ot){var yt=ce.getAllMediaInfoForType(b,qe),Ke=null,it=void 0;if(!yt||yt.length===0){d.info("No "+qe+" data.");return}qe===i.default.VIDEO&&(ae=!0),qe===i.default.AUDIO&&(ne=!0);for(var Ne=0,S=yt.length;Ne<S;Ne++)if(Ke=yt[Ne],qe===i.default.EMBEDDED_TEXT)le.addEmbeddedTrack(Ke);else{if(!rt(Ke))continue;j.addTrack(Ke)}if(!(qe===i.default.EMBEDDED_TEXT||j.getTracksFor(qe,b).length===0)){if(qe===i.default.IMAGE){ye=(0,C.default)(U).create({streamInfo:b,adapter:ce,baseURLController:x.baseURLController,timelineConverter:x.timelineConverter,debug:je,eventBus:Y,events:w.default,dashConstants:n.default});return}j.checkInitialMediaSettingsForType(qe,b),it=j.getCurrentTrackFor(qe,b),Y.trigger(w.default.STREAM_INITIALIZING,{streamInfo:b,mediaInfo:Ke}),kt(it,yt,ot)}}function Gt(){if(X){var qe=ce.getEventsFor(b);X.addInlineEvents(qe)}}function Kt(qe){X&&X.addInbandEvents(qe)}function Vt(qe,ot){Je();var yt=c.getElement();Gt(),Ie=!0,J.filterUnsupportedFeaturesOfPeriod(b),(!yt||yt&&/^VIDEO$/i.test(yt.nodeName))&&ft(i.default.VIDEO,qe),ft(i.default.AUDIO,qe),ft(i.default.TEXT,qe),ft(i.default.FRAGMENTED_TEXT,qe),ft(i.default.EMBEDDED_TEXT,qe),ft(i.default.MUXED,qe),ft(i.default.IMAGE,qe);var Ke=Ae(ot);if($=!0,Ie=!1,y.length===0){var it="No streams to play.";ee.error(new T.default(M.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,it,ue.getValue())),d.fatal(it)}else Ee();return Ke}function Pt(){if(Ie=!0,Je(),J.filterUnsupportedFeaturesOfPeriod(b),$=!0,Ie=!1,y.length===0){var qe="No streams to play.";ee.error(new T.default(M.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,qe,ue.getValue())),d.debug(qe)}else Ee()}function Ee(){for(var qe=y.length,ot=!!Se.audio||!!Se.video,yt=ot?new T.default(M.default.DATA_UPDATE_FAILED_ERROR_CODE,M.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,Ke=0;Ke<qe;Ke++)if(y[Ke].isUpdating()||Ie)return;if(!!$){if(G){G.clearMediaInfoArrayByStreamId(Pe());for(var Ke=0;Ke<qe&&y[Ke];Ke++){var it=y[Ke].getType();if(it===i.default.AUDIO||it===i.default.VIDEO||it===i.default.FRAGMENTED_TEXT){var Ne=y[Ke].getMediaInfo();Ne&&G.initializeForMedia(Ne)}}}yt?ee.error(yt):V||(V=!0,Y.trigger(w.default.STREAM_INITIALIZED,{streamInfo:b,liveStartTime:_e?NaN:Ce()}));for(var Ke=0;Ke<qe&&y[Ke];Ke++)y[Ke].getScheduleController().start()}}function Z(qe){for(var ot=null,yt=0;yt<y.length;yt++)if(ot=y[yt],ot.getType()===qe)return ot.getMediaInfo();return null}function Ae(qe){for(var ot={},yt=0,Ke=y.length;yt<Ke;yt++){var it=y[yt].createBuffer(qe);it&&(ot[y[yt].getType()]=it.getBuffer())}return ot}function Te(){var qe=Tt(),ot=qe.length;if(ot===0){d.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined");return}for(var yt=0;yt<ot;yt++)if(!qe[yt].isBufferingCompleted()&&(qe[yt].getType()===i.default.AUDIO||qe[yt].getType()===i.default.VIDEO)){d.warn("onBufferingCompleted - One streamProcessor has finished but",qe[yt].getType(),"one is not buffering completed");return}d.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),Y.trigger(w.default.STREAM_BUFFERING_COMPLETED,{streamInfo:b})}function be(qe){Se[qe.mediaType]=qe.error,Ee()}function Oe(qe){Kt(qe.events)}function Qe(qe){if(!qe)return null;var ot=Tt();return ot.filter(function(yt){return yt.getType()===qe.type})[0]}function Tt(){for(var qe=[],ot=void 0,yt=void 0,Ke=0;Ke<y.length;Ke++)yt=y[Ke],ot=yt.getType(),(ot===i.default.AUDIO||ot===i.default.VIDEO||ot===i.default.FRAGMENTED_TEXT||ot===i.default.TEXT)&&qe.push(yt);return qe}function dt(qe){d.info("Manifest updated... updating data system wide."),te=!1,Ie=!0,b=qe,Y.trigger(w.default.STREAM_UPDATED,{streamInfo:b}),X&&Gt(),J.filterUnsupportedFeaturesOfPeriod(b);for(var ot=0,yt=y.length;ot<yt;ot++){var Ke=y[ot];Ke.updateStreamInfo(b);var it=ce.getMediaInfoForType(b,Ke.getType());it&&(de.updateTopQualityIndex(it),Ke.addMediaInfo(it,!0))}if(Le){var it=Le.newMediaInfo;if(it.type!==i.default.FRAGMENTED_TEXT){var Ne=Qe(Le.oldMediaInfo);if(!Ne)return;Ne.switchTrackAsked(),Le=void 0}}Ie=!1,Ee()}function st(qe){var ot=arguments.length<=1||arguments[1]===void 0?null:arguments[1];return Qt(qe,i.default.VIDEO,ot)&&Qt(qe,i.default.AUDIO,ot)}function bt(qe){var ot=arguments.length<=1||arguments[1]===void 0?null:arguments[1];return Yt(qe,i.default.VIDEO,ot)&&Yt(qe,i.default.AUDIO,ot)}function Yt(qe,ot){var yt=arguments.length<=2||arguments[2]===void 0?null:arguments[2];if(!qe)return!1;var Ke=qe.getStreamInfo(),it=yt?yt.getStreamInfo():Ye();if(!Ke||!it)return!1;var Ne=ce.getAdaptationForType(Ke.index,ot,Ke),S=ce.getAdaptationForType(it.index,ot,it);return!Ne||!S?!Ne&&!S:!(!xt(S)&&xt(Ne))}function xt(qe){return qe?!!(qe.ContentProtection||qe.Representation&&qe.Representation.length>0&&qe.Representation[0].ContentProtection):!1}function Qt(qe,ot){var yt=arguments.length<=2||arguments[2]===void 0?null:arguments[2];if(!qe||!qe.hasOwnProperty("getStreamInfo"))return!1;var Ke=qe.getStreamInfo(),it=yt?yt.getStreamInfo():Ye();if(!Ke||!it)return!1;var Ne=ce.getAdaptationForType(Ke.index,ot,Ke),S=ce.getAdaptationForType(it.index,ot,it);if(!Ne||!S)return!Ne&&!S;var z=Ne&&S&&Ne.mimeType===S.mimeType,F=S.Representation_asArray.map(function(Me){return Me.codecs}),q=Ne.Representation_asArray.map(function(Me){return Me.codecs}),fe=q.some(function(Me){return F.indexOf(Me)>-1}),ge=q.some(function(Me){return F.some(function(ke){return se.codecRootCompatibleWithCodec(ke,Me)})});return fe||ge&&z}function Xt(qe){_e=qe}function Ut(){return _e}function Zt(qe,ot){if(!Ut()){Gt(),ft(i.default.VIDEO,qe),ft(i.default.AUDIO,qe),ft(i.default.TEXT,qe),ft(i.default.FRAGMENTED_TEXT,qe),ft(i.default.EMBEDDED_TEXT,qe),ft(i.default.MUXED,qe),ft(i.default.IMAGE,qe),Ae(ot),Y.on(w.default.CURRENT_TRACK_CHANGED,Dt,l);for(var yt=0;yt<y.length&&y[yt];yt++)y[yt].getScheduleController().start();Xt(!0)}}return l={initialize:Ge,getStreamId:lt,activate:ct,deactivate:tt,isActive:St,getDuration:He,getStartTime:vt,getId:Pe,getStreamInfo:Ye,getHasAudioTrack:Ze,getHasVideoTrack:ut,preload:Zt,getThumbnailController:Ue,getBitrateListFor:ht,updateData:dt,reset:We,getProcessors:Tt,setMediaSource:Ct,isMediaCodecCompatible:st,isProtectionCompatible:bt,getPreloaded:Ut,getPreloadingScheduled:pt,setPreloadingScheduled:Rt,getIsEndedEventSignaled:ze,setIsEndedEventSignaled:mt},Ve(),l}K.__dashjs_factory_name="Stream",r.default=D.default.getClassFactory(K),g.exports=r.default},{"109":109,"112":112,"120":120,"216":216,"219":219,"234":234,"239":239,"45":45,"46":46,"47":47,"51":51,"54":54,"61":61}],109:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(j){return j&&j.__esModule?j:{default:j}}var p=e(112),i=t(p),o=e(61),n=t(o),f=e(113),h=t(f),m=e(154),u=t(m),_=e(118),C=t(_),k=e(212),R=t(k),P=e(125),w=t(P),H=e(62),N=t(H),A=e(229),M=t(A),I=e(47),D=t(I),v=e(232),T=e(46),W=t(T),O=e(54),B=t(O),L=e(57),K=t(L),x=e(51),U=t(x),Y=e(239),oe=t(Y),ue=e(45),re=t(ue),ve=e(231),ce=t(ve),se=e(234),J=t(se),ee=e(219),ie=t(ee),me=e(241),de=t(me),Q=e(257);function X(j){j=j||{};var le=this.context,G=(0,W.default)(le).getInstance(),c=j.streamInfo,E=j.type,b=j.errHandler,l=j.mimeType,d=j.timelineConverter,y=j.adapter,V=j.manifestModel,te=j.mediaPlayerModel,$=j.fragmentModel,ae=j.abrController,ne=j.playbackController,Se=j.mediaController,Ie=j.textController,he=j.dashMetrics,ye=j.settings,_e=j.boxParser,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=void 0,Ve=void 0,Ge=void 0,we=void 0,at=void 0,Re=void 0,Xe=void 0,lt=void 0;function ct(){De=(0,re.default)(le).getInstance().getLogger(pe),wt(),G.on(B.default.DATA_UPDATE_COMPLETED,ze,pe,{priority:W.default.EVENT_PRIORITY_HIGH}),G.on(B.default.QUALITY_CHANGE_REQUESTED,mt,pe),G.on(B.default.INIT_FRAGMENT_NEEDED,Te,pe),G.on(B.default.MEDIA_FRAGMENT_NEEDED,be,pe),G.on(B.default.MEDIA_FRAGMENT_LOADED,Tt,pe),G.on(B.default.BUFFER_LEVEL_UPDATED,vt,pe),G.on(B.default.BUFFER_LEVEL_STATE_CHANGED,pt,pe),G.on(B.default.BUFFER_CLEARED,Rt,pe),G.on(B.default.QUOTA_EXCEEDED,Ce,pe),G.on(B.default.SEEK_TARGET,Xt,pe)}function tt(Ke,it){Re=(0,K.default)(le).create({streamInfo:c,type:E,timelineConverter:d,dashMetrics:he,mediaPlayerModel:te,baseURLController:j.baseURLController,errHandler:b,settings:ye,boxParser:_e,events:B.default,eventBus:G,errors:U.default,debug:(0,re.default)(le).getInstance(),requestModifier:(0,ce.default)(le).getInstance(),dashConstants:n.default,constants:i.default,urlUtils:(0,J.default)(le).getInstance()}),je=c.manifestInfo.isDynamic,je&&(at=(0,M.default)(le).create({timelineConverter:d})),Re.initialize(je),ae.registerStreamType(E,pe),we=(0,N.default)(le).create({streamInfo:c,type:E,abrController:ae,dashMetrics:he,playbackController:ne,timelineConverter:d,dashConstants:n.default,events:B.default,eventBus:G,errors:U.default}),Ve=Yt(E),Ve&&Ve.initialize(Ke),Ge=(0,w.default)(le).create({streamInfo:c,type:E,mimeType:l,adapter:y,dashMetrics:he,mediaPlayerModel:te,fragmentModel:$,abrController:ae,playbackController:ne,textController:Ie,mediaController:Se,bufferController:Ve,settings:ye}),Ge.initialize(it),Xe=0,lt=!1}function St(){return c.id}function Ct(){return E}function wt(){Le=[],Fe=null,Xe=0}function We(Ke,it){Re&&Re.reset(),Ve&&(Ve.reset(Ke,it),Ve=null),Ge&&(Ge.reset(),Ge=null),we&&(we.reset(),we=null),at&&(at.reset(),at=null),ae&&!it&&ae.unRegisterStreamType(E),G.off(B.default.DATA_UPDATE_COMPLETED,ze,pe),G.off(B.default.QUALITY_CHANGE_REQUESTED,mt,pe),G.off(B.default.INIT_FRAGMENT_NEEDED,Te,pe),G.off(B.default.MEDIA_FRAGMENT_NEEDED,be,pe),G.off(B.default.MEDIA_FRAGMENT_LOADED,Tt,pe),G.off(B.default.BUFFER_LEVEL_UPDATED,vt,pe),G.off(B.default.BUFFER_LEVEL_STATE_CHANGED,pt,pe),G.off(B.default.BUFFER_CLEARED,Rt,pe),G.off(B.default.SEEK_TARGET,Xt,pe),wt(),E=null,c=null}function He(){return we?we.isUpdating():!1}function ze(Ke){if(Ke.error||Ge.setCurrentRepresentation(y.convertDataToRepresentationInfo(Ke.currentRepresentation)),!Ke.error||Ke.error.code===U.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE){var it=ne.getStreamController().getActiveStreamInfo().id;it===c.id&&Pe()}}function mt(Ke){var it=Ee(Ke.newQuality);Ge.setCurrentRepresentation(it),he.pushPlayListTraceMetrics(new Date,Q.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),he.createPlaylistTraceMetrics(it.id,ne.getTime()*1e3,ne.getPlaybackRate())}function vt(Ke){he.addBufferLevel(E,new Date,Ke.bufferLevel*1e3);var it=ne.getStreamController().getActiveStreamInfo().id;!V.getValue().doNotUpdateDVRWindowOnBufferUpdated&&c.id===it&&Pe()}function pt(Ke){he.addBufferState(E,Ke.state,Ge.getBufferTarget()),Ke.state===h.default.BUFFER_EMPTY&&!ne.isSeeking()&&he.pushPlayListTraceMetrics(new Date,Q.PlayListTrace.REBUFFERING_REASON)}function Rt(Ke){$.syncExecutedRequestsWithBufferedRange(Ve.getBuffer().getAllBufferRanges(),c.duration),Ke.from>ne.getTime()&&(Xe=Ke.from,lt=!0)}function Ce(Ke){Xe=Ke.quotaExceededTime,lt=!0}function Pe(){var Ke=c.manifestInfo,it=Ke.isDynamic,Ne=d.calcSegmentAvailabilityRange(we.getCurrentRepresentation(),it);he.addDVRInfo(Ct(),ne.getTime(),Ke,Ne)}function Ye(){return we}function Ze(){return Ve?Ve.getBuffer():null}function ut(Ke){Ve.setBuffer(Ke)}function Ue(){return Ve}function Je(){return $}function ht(Ke){c=Ke,ye.get().streaming.useAppendWindow&&Ve.updateAppendWindow()}function Et(){return c}function rt(Ke){Ke!==Fe&&(!Ke||!Fe||Ke.type===Fe.type)&&(Fe=Ke);var it=y.getRealAdaptation(c,Fe),Ne=y.getVoRepresentations(Fe);if(we){var S=we.getData(),z=ae.getTopQualityIndexFor(E,c.id),F=ae.getMinAllowedIndexFor(E),q=void 0,fe=void 0,ge=null;(S===null||S.id!=it.id)&&E!==i.default.FRAGMENTED_TEXT?(fe=ae.getThroughputHistory().getAverageThroughput(E),ge=fe||ae.getInitialBitrateFor(E),q=ae.getQualityForBitrate(Fe,ge)):q=ae.getQualityFor(E),F!==void 0&&q<F&&(q=F),q>z&&(q=z),Re.setMimeType(Fe?Fe.mimeType:null),we.updateData(it,Ne,E,q)}}function Dt(Ke,it){Le.indexOf(Ke)===-1&&Le.push(Ke),it&&this.selectMediaInfo(Ke)}function kt(){return Le}function ft(){return Fe}function Gt(){return Ve.getMediaSource()}function Kt(Ke){Ve.setMediaSource(Ke,kt())}function Vt(){Ve.dischargePreBuffer()}function Pt(){return Ge}function Ee(Ke){var it=void 0;return Ke!==void 0?((0,v.checkInteger)(Ke),it=we?we.getRepresentationForQuality(Ke):null):it=we?we.getCurrentRepresentation():null,y.convertDataToRepresentationInfo(it)}function Z(){return Ve?Ve.getIsBufferingCompleted():!1}function Ae(){return Ve?Ve.getBufferLevel():0}function Te(Ke){if(!!Ke.sender&&!(y.getIsTextTrack(l)&&!Ie.isTextEnabled())&&Ve&&Ke.representationId&&!Ve.appendInitSegment(Ke.representationId)){var it=Re?Re.getInitRequest(ft(),we.getCurrentRepresentation()):null;Ge.processInitRequest(it)}}function be(Ke){var it=void 0;Ve.getIsPruningInProgress()||(it=Qe(Ke.seekTarget,Ke.replacement),it&&(Ge.setSeekTarget(NaN),Ke.replacement||(isNaN(it.startTime+it.duration)||(Xe=it.startTime+it.duration),it.delayLoadingTime=new Date().getTime()+Ge.getTimeToLoadDelay(),Ge.setTimeToLoadDelay(0)))),Ge.processMediaRequest(it)}function Oe(){var Ke=Ee(),it=we&&Ke?we.getRepresentationForQuality(Ke.quality):null,Ne=Re.getNextSegmentRequestIdempotent(ft(),it);return Ne}function Qe(Ke,it){var Ne=Ee(),S=!isNaN(Ke),z=ne.getNormalizedTime(),F=S?Ke:Xe,q=!1,fe=void 0;if(isNaN(F)||Ct()===i.default.FRAGMENTED_TEXT&&!Ie.isTextEnabled())return null;if(Ve){var ge=Ve.getRangeAt(F),Me=Ve.getRangeAt(z);if((ge!==null||Me!==null)&&!S&&(!ge||Me&&Me.start!=ge.start&&Me.end!=ge.end)){var ke=Ve.getBuffer().hasDiscontinuitiesAfter(z);ke&&Ct()!==i.default.FRAGMENTED_TEXT&&($.removeExecutedRequestsAfterTime(Me.end),q=!0)}}if(it)F=it.startTime+it.duration/2,fe=ot(Ne,F,{timeThreshold:0,ignoreIsFinished:!0});else{var $e=S||lt||q;for(fe=ot(Ne,$e?F:void 0,{keepIdx:!$e}),lt=!1;fe&&fe.action!==de.default.ACTION_COMPLETE&&$.isFragmentLoaded(fe);)fe=ot(Ne)}return fe}function Tt(Ke){var it=Ke.chunk,Ne=it.bytes,S=it.quality,z=Ee(S),F=we&&z?we.getRepresentationForQuality(z.quality):null,q=y.getEventsFor(z.mediaInfo),fe=y.getEventsFor(z,F);if(q&&q.length>0||fe&&fe.length>0){var ge=$.getRequests({state:u.default.FRAGMENT_MODEL_EXECUTED,quality:S,index:it.index})[0],Me=dt(Ne,ge,q,fe);G.trigger(B.default.INBAND_EVENTS,{events:Me},{streamId:c.id})}}function dt(Ke,it,Ne,S){try{for(var z={},F=[],q=Ne.concat(S),fe=0,ge=q.length;fe<ge;fe++)z[q[fe].schemeIdUri+"/"+q[fe].value]=q[fe];var Me=(0,ie.default)(le).getInstance().parse(Ke),ke=Me.getBoxes("emsg");if(!ke||ke.length===0)return F;for(var $e=Me.getBox("sidx"),gt=$e&&!isNaN($e.earliest_presentation_time)&&!isNaN($e.timescale)?$e.earliest_presentation_time/$e.timescale:it&&!isNaN(it.mediaStartTime)?it.mediaStartTime:0,Nt=Math.max(gt,0),Lt=we.getCurrentRepresentation(),fe=0,ge=ke.length;fe<ge;fe++){var At=y.getEvent(ke[fe],z,Nt,Lt);At&&F.push(At)}return F}catch(Ht){return[]}}function st(Ke){return Ze()||Ve?Ve.createBuffer(Le,Ke):null}function bt(){Ge.switchTrackAsked()}function Yt(Ke){var it=null;return Ke?(Ke===i.default.VIDEO||Ke===i.default.AUDIO?it=(0,C.default)(le).create({streamInfo:c,type:Ke,mediaPlayerModel:te,manifestModel:V,fragmentModel:$,errHandler:b,mediaController:Se,representationController:we,adapter:y,textController:Ie,abrController:ae,playbackController:ne,settings:ye}):it=(0,R.default)(le).create({streamInfo:c,type:Ke,mimeType:l,mediaPlayerModel:te,manifestModel:V,fragmentModel:$,errHandler:b,mediaController:Se,representationController:we,adapter:y,textController:Ie,abrController:ae,playbackController:ne,settings:ye}),it):(b.error(new oe.default(U.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,U.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}function xt(){if(!je)return NaN;if(!at)return NaN;var Ke=NaN,it=Ee(),Ne=at.getLiveEdge(it);if(isNaN(Ne))return NaN;var S=Qt(Ne,it);return S&&(ye.get().streaming.lowLatencyEnabled?Ke=S.duration<te.getLiveDelay()?S.startTime:S.startTime+S.duration-te.getLiveDelay():Ke=S.startTime),Ke}function Qt(Ke,it){try{var Ne=null,S=ne.getLiveDelay(),z=isNaN(c.manifestInfo.DVRWindowSize)?S:c.manifestInfo.DVRWindowSize,F=.1*z,q=void 0;if(!isFinite(z)||ot(it,Ke-z+F,{ignoreIsFinished:!0}))for(;!Ne&&S<=z;)q=Ke-S,Ne=ot(it,q,{ignoreIsFinished:!0}),Ne||(S+=1);return Ne&&ne.setLiveDelay(S,!0),De.debug("live edge: "+Ke+", live delay: "+S+", live target: "+q),Ne}catch(fe){return null}}function Xt(Ke){Xe=Ke.time,Ge.setSeekTarget(Ke.time)}function Ut(Ke){Xe=Ke}function Zt(){Re&&Re.resetIndex()}function qe(Ke){(0,v.checkInteger)(Ke);var it=we?we.getRepresentationForQuality(Ke):null;return Re?Re.getInitRequest(ft(),it):null}function ot(Ke,it,Ne){var S=null;if(Re){var z=we&&Ke?we.getRepresentationForQuality(Ke.quality):null;it!==void 0&&Ne!==void 0?S=Re.getSegmentRequestForTime(ft(),z,it,Ne):S=Re.getNextSegmentRequest(ft(),z)}return S}function yt(Ke,it){he.pushPlayListTraceMetrics(Ke,it)}return pe={initialize:tt,getStreamId:St,getType:Ct,isUpdating:He,getBufferController:Ue,getFragmentModel:Je,getScheduleController:Pt,getRepresentationController:Ye,getRepresentationInfo:Ee,getBufferLevel:Ae,isBufferingCompleted:Z,createBuffer:st,updateStreamInfo:ht,getStreamInfo:Et,selectMediaInfo:rt,addMediaInfo:Dt,getLiveStartTime:xt,switchTrackAsked:bt,getMediaInfoArr:kt,getMediaInfo:ft,getMediaSource:Gt,setMediaSource:Kt,dischargePreBuffer:Vt,getBuffer:Ze,setBuffer:ut,setBufferingTime:Ut,resetIndexHandler:Zt,getInitRequest:qe,getFragmentRequest:ot,finalisePlayList:yt,probeNextRequest:Oe,reset:We},ct(),pe}X.__dashjs_factory_name="StreamProcessor",r.default=D.default.getClassFactory(X),g.exports=r.default},{"112":112,"113":113,"118":118,"125":125,"154":154,"212":212,"219":219,"229":229,"231":231,"232":232,"234":234,"239":239,"241":241,"257":257,"45":45,"46":46,"47":47,"51":51,"54":54,"57":57,"61":61,"62":62}],110:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(A){return A&&A.__esModule?A:{default:A}}var p=e(239),i=t(p),o=e(163),n=t(o),f=e(255),h=e(246),m=t(h),u=e(46),_=t(u),C=e(54),k=t(C),R=e(47),P=t(R),w=e(51),H=t(w);function N(A){A=A||{};var M="urn:mpeg:dash:resolve-to-zero:2013",I=this.context,D=(0,_.default)(I).getInstance(),v=(0,n.default)(I).create({errHandler:A.errHandler,dashMetrics:A.dashMetrics,mediaPlayerModel:A.mediaPlayerModel,requestModifier:A.requestModifier,useFetch:A.settings?A.settings.get().streaming.lowLatencyEnabled:null,errors:H.default}),T=void 0;function W(B,L,K){var x=function(oe,ue){L.resolved=!0,L.resolvedContent=oe||null,D.trigger(k.default.XLINK_ELEMENT_LOADED,{element:L,resolveObject:K,error:oe||ue?null:new i.default(H.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,H.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+B)})};if(B===M)x(null,!0);else{var U=new m.default(B,f.HTTPRequest.XLINK_EXPANSION_TYPE);v.load({request:U,success:function(oe){x(oe)},error:function(){x(null)}})}}function O(){v&&(v.abort(),v=null)}return T={load:W,reset:O},T}N.__dashjs_factory_name="XlinkLoader",r.default=P.default.getClassFactory(N),g.exports=r.default},{"163":163,"239":239,"246":246,"255":255,"46":46,"47":47,"51":51,"54":54}],111:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'}}},g.exports=r.default},{}],112:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=function(){t(n,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability"}}]);function n(){p(this,n),this.init()}return n}(),o=new i;r.default=o,g.exports=r.default},{}],113:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=function(){t(n,[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors"}}]);function n(){p(this,n),this.init()}return n}(),o=new i;r.default=o,g.exports=r.default},{}],114:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=function(){t(n,[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready"}}]);function n(){p(this,n),this.init()}return n}(),o=new i;r.default=o,g.exports=r.default},{}],115:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(se){return se&&se.__esModule?se:{default:se}}var p=e(196),i=t(p),o=e(112),n=t(o),f=e(113),h=t(f),m=e(238),u=t(m),_=e(154),C=t(_),k=e(46),R=t(k),P=e(54),w=t(P),H=e(47),N=t(H),A=e(192),M=t(A),I=e(193),D=t(I),v=e(194),T=t(v),W=e(191),O=t(W),B=e(195),L=t(B),K=e(45),x=t(K),U=e(255),Y=e(232),oe=1e3,ue=100,re=0;function ve(){var se=this.context,J=(0,x.default)(se).getInstance(),ee=(0,R.default)(se).getInstance(),ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0,te=void 0,$=void 0,ae=void 0,ne=void 0,Se=void 0,Ie=void 0,he=void 0,ye=void 0,_e=void 0,pe=void 0;function De(){me=J.getLogger(ie),Ve()}function je(Z,Ae){ae[Z]=ae[Z]||(0,T.default)(se).create(),le[Z]=Ae,G[Z]=G[Z]||{},G[Z].state=h.default.ALLOW_LOAD,Ie[Z]=!1,he[Z]=!1,ye[Z]=!1,ee.on(w.default.LOADING_PROGRESS,Ee,ie),Z===n.default.VIDEO&&(ee.on(w.default.QUALITY_CHANGE_RENDERED,Re,ie),ne=ne||(0,O.default)(se).create(),Vt()),ee.on(w.default.METRIC_ADDED,Xe,ie),ee.on(w.default.PERIOD_SWITCH_COMPLETED,Le,ie),Se=Se||(0,L.default)(se).create({settings:pe})}function Fe(Z){delete le[Z]}function Le(){de=(0,i.default)(se).create({dashMetrics:_e,mediaPlayerModel:V,settings:pe}),de.initialize()}function Ve(){X={},j={},G={},le={},ae={},Ie={},he={},ye={},E===void 0&&(E=!1),$=void 0,ne=void 0,Se=void 0,clearTimeout(c),c=null}function Ge(){Ve(),ee.off(w.default.LOADING_PROGRESS,Ee,ie),ee.off(w.default.QUALITY_CHANGE_RENDERED,Re,ie),ee.off(w.default.METRIC_ADDED,Xe,ie),ee.off(w.default.PERIOD_SWITCH_COMPLETED,Le,ie),de&&de.reset()}function we(Z){!Z||(Z.streamController&&(Q=Z.streamController),Z.domStorage&&(te=Z.domStorage),Z.mediaPlayerModel&&(V=Z.mediaPlayerModel),Z.dashMetrics&&(_e=Z.dashMetrics),Z.adapter&&(d=Z.adapter),Z.videoModel&&(y=Z.videoModel),Z.settings&&(pe=Z.settings))}function at(){if(!te||!te.hasOwnProperty("getSavedBitrateSettings"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function Re(Z){Z.mediaType===n.default.VIDEO&&($!==void 0&&ne.push($,y.getPlaybackQuality()),$=Z.newQuality)}function Xe(Z){Z.metric===h.default.HTTP_REQUEST&&Z.value&&Z.value.type===U.HTTPRequest.MEDIA_SEGMENT_TYPE&&(Z.mediaType===n.default.AUDIO||Z.mediaType===n.default.VIDEO)&&Se.push(Z.mediaType,Z.value,pe.get().streaming.abr.useDeadTimeLatency),Z.metric===h.default.BUFFER_LEVEL&&(Z.mediaType===n.default.AUDIO||Z.mediaType===n.default.VIDEO)&&Pe(Z.mediaType,.001*Z.value.level)}function lt(Z,Ae){var Te=void 0;return X[Ae]=X[Ae]||{},X[Ae].hasOwnProperty(Z)||(X[Ae][Z]=0),Te=ft(X[Ae][Z],Z),Te=Gt(Te,Z,X[Ae][Z]),Te=Pt(Te,Z),Te}function ct(Z){if(Z&&le&&le[Z]){var Ae=le[Z].getStreamInfo();if(Ae&&Ae.id){var Te=lt(Z,Ae.id),be=Ce(le[Z].getMediaInfo());return be[Te]?be[Te]:null}}return null}function tt(Z){if(at(),Z===n.default.TEXT||Z===n.default.FRAGMENTED_TEXT)return NaN;var Ae=te.getSavedBitrateSettings(Z),Te=pe.get().streaming.abr.initialBitrate[Z],be=pe.get().streaming.abr.initialRepresentationRatio[Z];if(Te===-1)if(be>-1){var Oe=d.getAdaptationForType(0,Z).Representation;if(Array.isArray(Oe)){var Qe=Math.max(Math.round(Oe.length*be)-1,0);Te=Oe[Qe].bandwidth}else Te=0}else isNaN(Ae)?Te=Z===n.default.VIDEO?oe:ue:Te=Ae;return Te}function St(Z){return pe.get().streaming.abr.maxBitrate[Z]}function Ct(Z){return pe.get().streaming.abr.minBitrate[Z]}function wt(Z){var Ae=St(Z);if(Ae>-1)return Rt(le[Z].getMediaInfo(),Ae)}function We(Z){var Ae=Ct(Z);if(Ae>-1){var Te=le[Z].getMediaInfo(),be=Ce(Te),Oe=Rt(Te,Ae);return be[Oe]&&Oe<be.length-1&&be[Oe].bitrate<Ae*1e3&&Oe++,Oe}else return}function He(Z){if(Z&&le&&le[Z]){var Ae=le[Z].getStreamInfo(),Te=Ae?Ae.id:null,be=rt(Z),Oe=(0,M.default)(se).create({abrController:ie,streamProcessor:le[Z],currentValue:be,switchHistory:ae[Z],droppedFramesHistory:ne,useBufferOccupancyABR:Ze(Z),useL2AABR:ut(Z),useLoLPABR:Ue(Z),videoModel:y});if(ne){var Qe=y.getPlaybackQuality();Qe&&ne.push($,Qe)}if(pe.get().streaming.abr.autoSwitchBitrate[Z]){var Tt=We(Z),dt=lt(Z,Te),st=de.getMaxQuality(Oe),bt=st.quality;if(Tt!==void 0&&(bt>D.default.NO_CHANGE?bt:be)<Tt&&(bt=Tt),bt>dt&&(bt=dt),ae[Z].push({oldValue:be,newValue:bt}),bt>D.default.NO_CHANGE&&bt!=be)(G[Z].state===h.default.ALLOW_LOAD||bt>be)&&mt(Z,be,bt,dt,st.reason);else if(pe.get().debug.logLevel===x.default.LOG_LEVEL_DEBUG){var Yt=_e.getCurrentBufferLevel(Z,!0);me.debug("["+Z+"] stay on "+be+"/"+dt+" (buffer: "+Yt+")")}}}}function ze(Z,Ae,Te,be){var Oe=Ae.id,Qe=rt(Z);(0,Y.checkInteger)(Te);var Tt=lt(Z,Oe);Te!==Qe&&Te>=0&&Te<=Tt&&mt(Z,Qe,Te,Tt,be)}function mt(Z,Ae,Te,be,Oe){if(Z&&le[Z]){var Qe=le[Z].getStreamInfo(),Tt=Qe?Qe.id:null;if(pe.get().debug.logLevel===x.default.LOG_LEVEL_DEBUG){var dt=_e.getCurrentBufferLevel(Z);me.info("["+Z+"] switch from "+Ae+" to "+Te+"/"+be+" (buffer: "+dt+") "+(Oe?JSON.stringify(Oe):"."))}Dt(Z,Tt,Te),ee.trigger(w.default.QUALITY_CHANGE_REQUESTED,{oldQuality:Ae,newQuality:Te,reason:Oe},{streamId:Qe.id,mediaType:Z});var st=Se.getAverageThroughput(Z);isNaN(st)||te.setSavedBitrateSettings(Z,st)}}function vt(Z,Ae){G[Z].state=Ae}function pt(Z){return G[Z]?G[Z].state:null}function Rt(Z,Ae,Te){var be=Z&&Z.type?le[Z.type].getRepresentationInfo():null;if(pe.get().streaming.abr.useDeadTimeLatency&&Te&&be&&be.fragmentDuration){Te=Te/1e3;var Oe=be.fragmentDuration;if(Te>Oe)return 0;var Qe=Te/Oe;Ae=Ae*(1-Qe)}for(var Tt=Ce(Z),dt=Tt.length-1;dt>=0;dt--){var st=Tt[dt];if(Ae*1e3>=st.bitrate)return dt}return re}function Ce(Z){var Ae=[];if(!Z||!Z.bitrateList)return Ae;for(var Te=Z.bitrateList,be=Z.type,Oe=void 0,Qe=0,Tt=Te.length;Qe<Tt;Qe++)Oe=new u.default,Oe.mediaType=be,Oe.qualityIndex=Qe,Oe.bitrate=Te[Qe].bandwidth,Oe.width=Te[Qe].width,Oe.height=Te[Qe].height,Oe.scanType=Te[Qe].scanType,Ae.push(Oe);return Ae}function Pe(Z,Ae){var Te=pe.get().streaming.abr.ABRStrategy;if(Te===n.default.ABR_STRATEGY_L2A){Ie[Z]=!1,ye[Z]=!1,he[Z]=!0;return}if(Te===n.default.ABR_STRATEGY_LoLP){Ie[Z]=!1,ye[Z]=!0,he[Z]=!1;return}else if(Te===n.default.ABR_STRATEGY_BOLA){Ie[Z]=!0,ye[Z]=!1,he[Z]=!1;return}else if(Te===n.default.ABR_STRATEGY_THROUGHPUT){Ie[Z]=!1,ye[Z]=!1,he[Z]=!1;return}Ye(Z,Ae)}function Ye(Z,Ae){var Te=V.getStableBufferTime(),be=Te,Oe=.5*Te,Qe=Ie[Z],Tt=Ae>(Qe?Oe:be);Ie[Z]=Tt,Tt!==Qe&&(Tt?me.info("["+Z+"] switching from throughput to buffer occupancy ABR rule (buffer: "+Ae.toFixed(3)+")."):me.info("["+Z+"] switching from buffer occupancy to throughput ABR rule (buffer: "+Ae.toFixed(3)+")."))}function Ze(Z){return Ie[Z]}function ut(Z){return he[Z]}function Ue(Z){return ye[Z]}function Je(){return Se}function ht(Z){var Ae=Z.type,Te=Z.streamInfo.id,be=Z.representationCount-1;return kt(Ae,Te,be),be}function Et(Z){var Ae=Z?Z.id:null,Te=rt(n.default.AUDIO),be=rt(n.default.VIDEO),Oe=Te===lt(n.default.AUDIO,Ae)&&be===lt(n.default.VIDEO,Ae);return Oe}function rt(Z){if(Z&&le[Z]){var Ae=le[Z].getStreamInfo(),Te=Ae?Ae.id:null,be=void 0;if(Te)return j[Te]=j[Te]||{},j[Te].hasOwnProperty(Z)||(j[Te][Z]=re),be=j[Te][Z],be}return re}function Dt(Z,Ae,Te){j[Ae]=j[Ae]||{},j[Ae][Z]=Te}function kt(Z,Ae,Te){X[Ae]=X[Ae]||{},X[Ae][Z]=Te}function ft(Z,Ae){var Te=Z;if(!le[Ae])return Te;var be=We(Ae);be!==void 0&&(Te=Math.max(Z,be));var Oe=wt(Ae);return Oe!==void 0&&(Te=Math.min(Te,Oe)),Te}function Gt(Z,Ae,Te){var be=pe.get().streaming.abr.maxRepresentationRatio[Ae];return isNaN(be)||be>=1||be<0?Z:Math.min(Z,Math.round(Te*be))}function Kt(Z){E=Z}function Vt(){if(y){var Z=pe.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio"),Ae=Z?window.devicePixelRatio:1;b=y.getClientWidth()*Ae,l=y.getClientHeight()*Ae}}function Pt(Z,Ae){if(Ae!==n.default.VIDEO||!pe.get().streaming.abr.limitBitrateByPortal||!le[Ae])return Z;E||Vt();var Te=d.getAdaptationForType(0,Ae).Representation,be=Z;if(b>0&&l>0){for(;be>0&&Te[be]&&b<Te[be].width&&b-Te[be-1].width<Te[be].width-b;)be=be-1;for(;be<Te.length-1&&Te[be].width===Te[be+1].width;)be=be+1}return be}function Ee(Z){var Ae=Z.request.mediaType;if(pe.get().streaming.abr.autoSwitchBitrate[Ae]){var Te=le[Ae];if(!Te)return;var be=(0,M.default)(se).create({abrController:ie,streamProcessor:Te,currentRequest:Z.request,useBufferOccupancyABR:Ze(Ae),useL2AABR:ut(Ae),useLoLPABR:Ue(Ae),videoModel:y}),Oe=de.shouldAbandonFragment(be);if(Oe.quality>D.default.NO_CHANGE){var Qe=Te.getFragmentModel(),Tt=Qe.getRequests({state:C.default.FRAGMENT_MODEL_LOADING,index:Z.request.index})[0];Tt&&(Qe.abortRequests(),vt(Ae,h.default.ABANDON_LOAD),ae[Ae].reset(),ae[Ae].push({oldValue:rt(Ae),newValue:Oe.quality,confidence:1,reason:Oe.reason}),ze(Ae,Q.getActiveStreamInfo(),Oe.quality,Oe.reason),clearTimeout(c),c=setTimeout(function(){vt(Ae,h.default.ALLOW_LOAD),c=null},pe.get().streaming.abandonLoadTimeout))}}}return ie={isPlayingAtTopQuality:Et,updateTopQualityIndex:ht,getThroughputHistory:Je,getBitrateList:Ce,getQualityForBitrate:Rt,getTopBitrateInfoFor:ct,getMaxAllowedIndexFor:wt,getMinAllowedIndexFor:We,getInitialBitrateFor:tt,getQualityFor:rt,getAbandonmentStateFor:pt,setPlaybackQuality:ze,checkPlaybackQuality:He,getTopQualityIndexFor:lt,setElementSize:Vt,setWindowResizeEventCalled:Kt,createAbrRulesCollection:Le,registerStreamType:je,unRegisterStreamType:Fe,setConfig:we,reset:Ge},De(),ie}ve.__dashjs_factory_name="AbrController";var ce=N.default.getSingletonFactory(ve);ce.QUALITY_DEFAULT=re,N.default.updateSingletonFactory(ve.__dashjs_factory_name,ce),r.default=ce,g.exports=r.default},{"112":112,"113":113,"154":154,"191":191,"192":192,"193":193,"194":194,"195":195,"196":196,"232":232,"238":238,"255":255,"45":45,"46":46,"47":47,"54":54}],116:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(152),i=t(p),o=e(218),n=t(o),f=e(234),h=t(f),m=e(86),u=t(m),_=e(47),C=t(_),k=e(46),R=t(k),P=e(54),w=t(P);function H(){var N=void 0,A=void 0,M=this.context,I=(0,R.default)(M).getInstance(),D=(0,h.default)(M).getInstance(),v=void 0,T=void 0;function W(Y){v.invalidateSelectedIndexes(Y.entry)}function O(){v=(0,i.default)(M).create(),T=(0,n.default)(M).create(),I.on(w.default.SERVICE_LOCATION_BLACKLIST_CHANGED,W,N)}function B(Y){Y.baseURLTreeModel&&(v=Y.baseURLTreeModel),Y.baseURLSelector&&(T=Y.baseURLSelector),Y.adapter&&(A=Y.adapter)}function L(Y){v.update(Y),T.chooseSelector(A.getIsDVB(Y))}function K(Y){var oe=v.getForPath(Y),ue=oe.reduce(function(re,ve){var ce=T.select(ve);if(ce)D.isRelative(ce.url)?re.url=D.resolve(ce.url,re.url):(re.url=ce.url,re.serviceLocation=ce.serviceLocation),re.availabilityTimeOffset=ce.availabilityTimeOffset,re.availabilityTimeComplete=ce.availabilityTimeComplete;else return new u.default;return re},new u.default);if(!D.isRelative(ue.url))return ue}function x(){v.reset(),T.reset()}function U(Y){v.setConfig({adapter:A}),L(Y)}return N={reset:x,initialize:U,resolve:K,setConfig:B},O(),N}H.__dashjs_factory_name="BaseURLController",r.default=C.default.getClassFactory(H),g.exports=r.default},{"152":152,"218":218,"234":234,"46":46,"47":47,"54":54,"86":86}],117:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(47),i=t(p),o=e(46),n=t(o);function f(h){h=h||{};var m=void 0,u=[],_=(0,n.default)(this.context).getInstance(),C=h.updateEventName,k=h.addBlacklistEventName;function R(A){return!u.length||!A||!A.length?!1:u.indexOf(A)!==-1}function P(A){u.indexOf(A)===-1&&(u.push(A),_.trigger(C,{entry:A}))}function w(A){P(A.entry)}function H(){k&&_.on(k,w,m)}function N(){u=[]}return m={add:P,contains:R,reset:N},H(),m}f.__dashjs_factory_name="BlackListController",r.default=i.default.getClassFactory(f),g.exports=r.default},{"46":46,"47":47}],118:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(ve){return ve&&ve.__esModule?ve:{default:ve}}var p=e(112),i=t(p),o=e(113),n=t(o),f=e(154),h=t(f),m=e(107),u=t(m),_=e(106),C=t(_),k=e(115),R=t(k),P=e(46),w=t(P),H=e(54),N=t(H),A=e(47),M=t(A),I=e(45),D=t(I),v=e(227),T=t(v),W=e(239),O=t(W),B=e(51),L=t(B),K=e(255),x=.1,U=.5,Y=.01,oe=22,ue="BufferController";function re(ve){ve=ve||{};var ce=this.context,se=(0,w.default)(ce).getInstance(),J=ve.errHandler,ee=ve.fragmentModel,ie=ve.representationController,me=ve.mediaController,de=ve.adapter,Q=ve.textController,X=ve.abrController,j=ve.playbackController,le=ve.streamInfo,G=ve.type,c=ve.settings,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0,te=void 0,$=void 0,ae=void 0,ne=void 0,Se=void 0,Ie=void 0,he=void 0,ye=void 0,_e=void 0,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=void 0,Ve=void 0,Ge=void 0,we=void 0;function at(){b=(0,D.default)(ce).getInstance().getLogger(E),je=(0,T.default)(ce).getInstance(),Ke()}function Re(){return ue}function Xe(Ne){xt(Ne),l=X.getQualityFor(G),se.on(N.default.DATA_UPDATE_COMPLETED,be,this),se.on(N.default.INIT_FRAGMENT_LOADED,wt,this),se.on(N.default.MEDIA_FRAGMENT_LOADED,He,this),se.on(N.default.QUALITY_CHANGE_REQUESTED,Rt,this),se.on(N.default.STREAM_COMPLETED,Oe,this),se.on(N.default.PLAYBACK_PLAYING,ht,this),se.on(N.default.PLAYBACK_PROGRESS,Ue,this),se.on(N.default.PLAYBACK_TIME_UPDATED,Ue,this),se.on(N.default.PLAYBACK_RATE_CHANGED,dt,this),se.on(N.default.PLAYBACK_SEEKING,Ce,this),se.on(N.default.PLAYBACK_SEEKED,Pe,this),se.on(N.default.PLAYBACK_STALLED,Je,this),se.on(N.default.WALLCLOCK_TIME_UPDATED,Tt,this),se.on(N.default.CURRENT_TRACK_CHANGED,Qe,this,{priority:w.default.EVENT_PRIORITY_HIGH}),se.on(N.default.SOURCEBUFFER_REMOVE_COMPLETED,Z,this)}function lt(){return le.id}function ct(){return G}function tt(Ne){return de.convertDataToRepresentationInfo(ie.getRepresentationForQuality(Ne))}function St(Ne,S){if(!je||!Ne)return null;var z=Ne[0];if(te)try{S&&S[G]?ne=(0,u.default)(ce).create(te,z,vt.bind(this),S[G]):ne=(0,u.default)(ce).create(te,z,vt.bind(this),null),c.get().streaming.useAppendWindow&&ne.updateAppendWindow(le),typeof ne.getBuffer().initialize=="function"&&ne.getBuffer().initialize(G,le,Ne,ee)}catch(F){b.fatal("Caught error on create SourceBuffer: "+F),J.error(new O.default(L.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,L.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+G))}else ne=(0,C.default)(ce).create(vt.bind(this));return Ae(tt(l)),ne}function Ct(){if(ne&&Se&&typeof Se.discharge=="function"){var Ne=Se.getAllBufferRanges();if(Ne.length>0){for(var S="Beginning "+G+"PreBuffer discharge, adding buffer for:",z=0;z<Ne.length;z++)S+=" start: "+Ne.start(z)+", end: "+Ne.end(z)+";";b.debug(S)}else b.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");Ie=[];for(var F=Se.discharge(),q=null,fe=0;fe<F.length;fe++){var ge=F[fe];if(ge.segmentType!=="InitializationSegment"){var Me=je.extract(ge.streamId,ge.representationId);Me&&q!==Me&&(Ie.push(Me),ne.append(Me),q=Me)}Ie.push(ge),ne.append(ge)}Se.reset(),Se=null}}function wt(Ne){b.info("Init fragment finished loading saving to",G+"'s init cache"),je.save(Ne.chunk),b.debug("Append Init fragment",G," with representationId:",Ne.chunk.representationId," and quality:",Ne.chunk.quality,", data size:",Ne.chunk.bytes.byteLength),ze(Ne.chunk)}function We(Ne){var S=je.extract(le.id,Ne);return S?(b.info("Append Init fragment",G," with representationId:",S.representationId," and quality:",S.quality,", data size:",S.bytes.byteLength),ze(S),!0):!1}function He(Ne){var S=Ne.chunk;if(Ge){we=S;var z=ne&&ne.getAllBufferRanges();z&&z.length>0&&j.getTimeToStreamEnd()>c.get().streaming.stallThreshold&&(b.debug("Clearing buffer because track changed - "+(z.end(z.length-1)+U)),Pt([{start:0,end:z.end(z.length-1)+U,force:!0}]))}else ze(S)}function ze(Ne){ne.append(Ne),Ne.mediaInfo.type===i.default.VIDEO&&yt(N.default.VIDEO_CHUNK_RECEIVED,{chunk:Ne})}function mt(Ne){if(Ne&&Ne.length>0)for(var S=0,z=Ne.length;S<z;S++)b.debug("Buffered range: "+Ne.start(S)+" - "+Ne.end(S)+", currentTime = ",j.getTime())}function vt(Ne){if(Ne.error){if(Ne.error.code===oe&&(De=!0,V=qe()*.8,b.warn("Quota exceeded, Critical Buffer: "+V),V>0)){var S=Math.max(.2*V,1),z=V-S,F=Math.min(c.get().streaming.bufferTimeAtTopQuality,z*.9),q=Math.min(c.get().streaming.bufferTimeAtTopQualityLongForm,z*.9),fe={streaming:{bufferToKeep:parseFloat(S.toFixed(5)),bufferTimeAtTopQuality:parseFloat(F.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(q.toFixed(5))}};c.update(fe)}(Ne.error.code===oe||!ot())&&(b.warn("Clearing playback buffer to overcome quota exceed situation"),yt(N.default.QUOTA_EXCEEDED,{criticalBufferLevel:V,quotaExceededTime:Ne.chunk.start}),Pt(Vt()));return}De=!1,ye=Ne.chunk,ye&&!isNaN(ye.index)&&($=Math.max(ye.index,$),kt());var ge=ne.getAllBufferRanges();if(ye.segmentType===K.HTTPRequest.MEDIA_SEGMENT_TYPE)mt(ge),Ue(),pt();else if(Ge){var Me=j.getTime();b.debug("AppendToBuffer seek target should be "+Me),yt(N.default.SEEK_TARGET,{time:Me})}var ke=!1;Ie&&(Ie.indexOf(ye)>0&&(ke=!0),Ie=null),ye&&!ke&&yt(ye.endFragment?N.default.BYTES_APPENDED_END_FRAGMENT:N.default.BYTES_APPENDED,{quality:ye.quality,startTime:ye.start,index:ye.index,bufferedRanges:ge,mediaType:G})}function pt(){if(!(G!==i.default.AUDIO&&G!==i.default.VIDEO)&&!isNaN(Fe)){var Ne=j.getTime(),S=Et(Fe,0);if(!(Ne===Fe&&S)){var z=ie.getCurrentRepresentation().segmentDuration;S=Et(Fe,z),!!S&&(Math.abs(Ne-Fe)>z?Fe<=S.end&&(j.seek(Math.max(Fe,S.start),!1,!0),Fe=NaN):Ne<S.start&&(j.seek(S.start,!1,!0),Fe=NaN))}}}function Rt(Ne){l!==Ne.newQuality&&(Ae(this.getRepresentationInfo(Ne.newQuality)),l=Ne.newQuality)}function Ce(Ne){!ne||(Fe=Ne.seekTime,d&&(Le=!0,d=!1,ae=Number.POSITIVE_INFINITY),G!==i.default.FRAGMENTED_TEXT?Ye():Ue())}function Pe(){Fe=NaN}function Ye(){!ne||ne.waitForUpdateEnd(function(){var Ne=Ze();(!Ne||Ne.length===0)&&Ue(),Pt(Ne)})}function Ze(){if(!!ne){var Ne=[],S=ne.getAllBufferRanges();if(!S||S.length===0)return Ne;var z=j.getTime(),F=S.end(S.length-1)+U,q=ee.getRequests({state:h.default.FRAGMENT_MODEL_EXECUTED,time:z,threshold:Y})[0];if(!q)b.debug("getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -",F),Ne.push({start:0,end:F});else{var fe={start:0,end:q.startTime-c.get().streaming.stallThreshold},ge=ee.getRequests({state:h.default.FRAGMENT_MODEL_EXECUTED,time:q.startTime-q.duration/2,threshold:Y})[0];ge&&ge.startTime!=q.startTime&&(fe.end=ge.startTime),fe.start<fe.end&&fe.end>S.start(0)&&Ne.push(fe);var Me={start:q.startTime+q.duration+c.get().streaming.stallThreshold,end:F},ke=ee.getRequests({state:h.default.FRAGMENT_MODEL_EXECUTED,time:q.startTime+q.duration+c.get().streaming.stallThreshold,threshold:Y})[0];ke&&ke.startTime!==q.startTime&&(Me.start=ke.startTime+ke.duration+c.get().streaming.stallThreshold),Me.start<Me.end&&Me.start<F&&Ne.push(Me)}return Ne}}function ut(){return isNaN(Fe)?j.getTime():Fe}function Ue(){(!Ge||G===i.default.FRAGMENTED_TEXT&&Q.isTextEnabled())&&Dt()}function Je(){ft()}function ht(){Fe=NaN,ft()}function Et(Ne,S){var z=ne.getAllBufferRanges(),F=0,q=0,fe=null,ge=null,Me=0,ke=void 0,$e=void 0,gt=isNaN(S)?.15:S;if(z!=null){for($e=0,ke=z.length;$e<ke;$e++)if(F=z.start($e),q=z.end($e),fe===null)Me=Math.abs(F-Ne),(Ne>=F&&Ne<q||Me<=gt)&&(fe=F,ge=q);else if(Me=F-ge,Me<=gt)ge=q;else break;if(fe!==null)return{start:fe,end:ge}}return null}function rt(Ne,S){var z=void 0,F=void 0;return c.get().streaming.jumpGaps&&(S=c.get().streaming.smallGapLimit),z=Et(Ne,S),z===null?F=0:F=z.end-Ne,F}function Dt(){j&&(y=rt(ut()||0),yt(N.default.BUFFER_LEVEL_UPDATED,{bufferLevel:y}),ft())}function kt(){var Ne=$>=ae-1;Ne&&!d&&ne.discharge===void 0&&(d=!0,b.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for "+G),yt(N.default.BUFFERING_COMPLETED))}function ft(){G!==i.default.AUDIO&&G!==i.default.VIDEO||(Le&&!d&&y>0&&j&&j.getTimeToStreamEnd()-y<x&&(Le=!1,d=!0,b.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED for type "+G),yt(N.default.BUFFERING_COMPLETED)),(!c.get().streaming.lowLatencyEnabled&&y<c.get().streaming.stallThreshold||y===0)&&!d?Gt(n.default.BUFFER_EMPTY):(d||y>=le.manifestInfo.minBufferTime)&&Gt(n.default.BUFFER_LOADED))}function Gt(Ne){he===Ne||Ne===n.default.BUFFER_EMPTY&&j.getTime()===0||G===i.default.FRAGMENTED_TEXT&&!Q.isTextEnabled()||(he=Ne,yt(N.default.BUFFER_LEVEL_STATE_CHANGED,{state:Ne}),yt(Ne===n.default.BUFFER_LOADED?N.default.BUFFER_LOADED:N.default.BUFFER_EMPTY),b.debug(Ne===n.default.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function Kt(){!ne||G===i.default.FRAGMENTED_TEXT||d||Pt(Vt())}function Vt(){var Ne=[],S=ne.getAllBufferRanges();if(!S||S.length===0)return Ne;var z=j.getTime(),F=Math.max(0,z-c.get().streaming.bufferToKeep),q=ee.getRequests({state:h.default.FRAGMENT_MODEL_EXECUTED,time:z,threshold:Y})[0];if(q)F=Math.min(q.startTime,F);else if(z===0&&j.getIsDynamic())return[];if(S.start(0)<=F){for(var fe={start:0,end:F},ge=0;ge<S.length&&S.end(ge)<=F;ge++)fe.end=S.end(ge);fe.start<fe.end&&Ne.push(fe)}return Ne}function Pt(Ne){!Ne||!ne||Ne.length===0||(Ve.push.apply(Ve,Ne),!pe&&Ee())}function Ee(){if(Ve.length===0||!ne){b.debug("Nothing to prune, halt pruning"),Ve=[],pe=!1;return}var Ne=ne.getBuffer();if(!Ne||!Ne.buffered||Ne.buffered.length===0){b.debug("SourceBuffer is empty (or does not exist), halt pruning"),Ve=[],pe=!1;return}var S=Ve.shift();b.debug("Removing buffer from:",S.start,"to",S.end),pe=!0;var z=j.getTime();z<S.end&&(d=!1,$=0),ne.remove(S.start,S.end,S.force)}function Z(Ne){if(ne===Ne.buffer){b.debug("onRemoved buffer from:",Ne.from,"to",Ne.to);var S=ne.getAllBufferRanges();mt(S),Ve.length===0&&(pe=!1),Ne.unintended&&(b.warn("Detected unintended removal from:",Ne.from,"to",Ne.to,"setting index handler time to",Ne.from),yt(N.default.SEEK_TARGET,{time:Ne.from,mediaType:G,streamId:le.id})),pe?Ee():(Ge?(Ge=!1,we&&ze(we)):Dt(),yt(N.default.BUFFER_CLEARED,{from:Ne.from,to:Ne.to,unintended:Ne.unintended,hasEnoughSpaceToAppend:ot(),quotaExceeded:De}))}}function Ae(Ne){!Ne||Ne.MSETimeOffset===void 0||ne&&ne.updateTimestampOffset&&ne.updateTimestampOffset(Ne.MSETimeOffset)}function Te(){ne&&!d&&ne.updateAppendWindow(le)}function be(Ne){Ne.error||d||Ae(Ne.currentRepresentation)}function Oe(Ne){ae=Ne.request.index,kt()}function Qe(Ne){if(!(Ne.newMediaInfo.streamInfo.id!==le.id||Ne.newMediaInfo.type!==G)){var S=ne&&ne.getAllBufferRanges();!S||(b.info("Track change asked"),me.getSwitchMode(G)===i.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&S&&S.length>0&&j.getTimeToStreamEnd()>c.get().streaming.stallThreshold&&(d=!1,ae=Number.POSITIVE_INFINITY))}}function Tt(){_e++;var Ne=_e*(c.get().streaming.wallclockTimeUpdateInterval/1e3);Ne>=c.get().streaming.bufferPruningInterval&&(_e=0,Kt())}function dt(){ft()}function st(){return ne}function bt(Ne){ne=Ne}function Yt(){return y}function xt(Ne,S){te=Ne,ne&&S&&typeof ne.discharge=="function"&&(Se=ne,St(S))}function Qt(){return te}function Xt(){Ge=!0}function Ut(){return d}function Zt(){return pe}function qe(){var Ne=ne.getAllBufferRanges(),S=0,z=void 0,F=void 0;if(!Ne)return S;for(F=0,z=Ne.length;F<z;F++)S+=Ne.end(F)-Ne.start(F);return S}function ot(){var Ne=qe();return Ne<V}function yt(Ne,S){var z=S||{};se.trigger(Ne,z,{streamId:le.id,mediaType:G})}function Ke(Ne,S){V=Number.POSITIVE_INFINITY,he=void 0,l=R.default.QUALITY_DEFAULT,ae=Number.POSITIVE_INFINITY,$=0,ye=null,d=!1,pe=!1,De=!1,Le=!1,y=0,_e=0,Ve=[],Fe=NaN,ne&&(Ne||ne.abort(),ne.reset(S),ne=null),Ge=!1}function it(Ne,S){se.off(N.default.DATA_UPDATE_COMPLETED,be,this),se.off(N.default.INIT_FRAGMENT_LOADED,wt,this),se.off(N.default.MEDIA_FRAGMENT_LOADED,He,this),se.off(N.default.QUALITY_CHANGE_REQUESTED,Rt,this),se.off(N.default.STREAM_COMPLETED,Oe,this),se.off(N.default.PLAYBACK_PLAYING,ht,this),se.off(N.default.PLAYBACK_PROGRESS,Ue,this),se.off(N.default.PLAYBACK_TIME_UPDATED,Ue,this),se.off(N.default.PLAYBACK_RATE_CHANGED,dt,this),se.off(N.default.PLAYBACK_SEEKING,Ce,this),se.off(N.default.PLAYBACK_SEEKED,Pe,this),se.off(N.default.PLAYBACK_STALLED,Je,this),se.off(N.default.WALLCLOCK_TIME_UPDATED,Tt,this),se.off(N.default.CURRENT_TRACK_CHANGED,Qe,this),se.off(N.default.SOURCEBUFFER_REMOVE_COMPLETED,Z,this),Ke(Ne,S)}return E={initialize:Xe,getStreamId:lt,getType:ct,getBufferControllerType:Re,getRepresentationInfo:tt,createBuffer:St,dischargePreBuffer:Ct,getBuffer:st,setBuffer:bt,getBufferLevel:Yt,getRangeAt:Et,setMediaSource:xt,getMediaSource:Qt,appendInitSegment:We,replaceBuffer:Xt,getIsBufferingCompleted:Ut,getIsPruningInProgress:Zt,reset:it,updateAppendWindow:Te},at(),E}re.__dashjs_factory_name=ue,r.default=M.default.getClassFactory(re),g.exports=r.default},{"106":106,"107":107,"112":112,"113":113,"115":115,"154":154,"227":227,"239":239,"255":255,"45":45,"46":46,"47":47,"51":51,"54":54}],119:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(46),h=t(f),m=e(104),u=t(m),_=e(164),C=t(_);function k(){var R="urn:mpeg:dash:event:2012",P=1,w="urn:mpeg:dash:event:callback:2015",H=1,N=300,A={DISCARDED:"discarded",UPDATED:"updated",ADDED:"added"},M=this.context,I=(0,h.default)(M).getInstance(),D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0;function oe(){v=(0,n.default)(M).getInstance().getLogger(D),re()}function ue(){if(!L||!K)throw new Error("setConfig function has to be called previously")}function re(){Y=!1,T={},W={},O=null,U=!1,B=Date.now()/1e3}function ve(){try{O!==null&&Y&&(clearInterval(O),O=null,Y=!1,de())}catch($){throw $}}function ce(){try{ue(),v.debug("Start Event Controller");var $=x.get().streaming.eventControllerRefreshDelay;!Y&&!isNaN($)&&(Y=!0,O=setInterval(me,$))}catch(ae){throw ae}}function se($){try{if(ue(),$)for(var ae=0;ae<$.length;ae++){var ne=$[ae],Se=ee(ne,T,!0);Se===A.ADDED?(v.debug("Added inline event with id "+ne.id),c(ne,$,u.default.EVENT_MODE_ON_RECEIVE)):Se===A.UPDATED&&v.debug("Updated inline event with id "+ne.id)}v.debug("Added "+$.length+" inline events")}catch(Ie){throw Ie}}function J($){try{ue();for(var ae=0;ae<$.length;ae++){var ne=$[ae],Se=ee(ne,W,!1);Se===A.ADDED?(ne.eventStream.schemeIdUri===R&&W[ne.id]===void 0&&ie(ne),v.debug("Added inband event with id "+ne.id),c(ne,$,u.default.EVENT_MODE_ON_RECEIVE)):v.debug("Inband event with scheme_id_uri "+ne.eventStream.schemeIdUri+", value "+ne.eventStream.value+" and id "+ne.id+" was ignored because it has been added before.")}me()}catch(Ie){throw Ie}}function ee($,ae){var ne=arguments.length<=2||arguments[2]===void 0?!1:arguments[2],Se=$.eventStream.schemeIdUri,Ie=$.eventStream.value,he=$.id,ye=A.DISCARDED;ae[Se]||(ae[Se]=[]);var _e=ae[Se].findIndex(function(pe){return(!Ie||pe.eventStream.value&&pe.eventStream.value===Ie)&&pe.id===he});return _e===-1?(ae[Se].push($),ye=A.ADDED):ne&&(ae[Se][_e]=$,ye=A.UPDATED),ye}function ie($){try{if($.eventStream.value==P){var ae=$.calculatedPresentationTime,ne=void 0;$.calculatedPresentationTime==4294967295?ne=NaN:ne=$.calculatedPresentationTime+$.duration,I.trigger(u.default.MANIFEST_VALIDITY_CHANGED,{id:$.id,validUntil:ae,newDuration:ne,newManifestValidAfter:NaN},{mode:u.default.EVENT_MODE_ON_START})}}catch(Se){}}function me(){try{if(!U){U=!0;var $=K.getTime(),ae=$-B;ae=B>0?Math.max(0,ae):0,Q(W,ae,$),Q(T,ae,$),B=$,U=!1}}catch(ne){U=!1}}function de(){try{X(W),X(T)}catch($){}}function Q($,ae,ne){try{var Se=function(he){if(he!==void 0){var ye=isNaN(he.duration)?0:he.duration;he.calculatedPresentationTime<=ne&&he.calculatedPresentationTime+ae+ye>=ne?c(he,$,u.default.EVENT_MODE_ON_START):(le(ne,ye+ae,he.calculatedPresentationTime)||G(he))&&(v.debug("Deleting event "+he.id+" as it is expired or invalid"),E($,he))}};j($,Se)}catch(Ie){}}function X($){try{(function(){var ae=K.getTime(),ne=function(Ie){var he=Ie.eventStream&&Ie.eventStream.period&&!isNaN(Ie.eventStream.period.duration)?Ie.eventStream.period.duration:NaN,ye=Ie.eventStream&&Ie.eventStream.period&&!isNaN(Ie.eventStream.period.start)?Ie.eventStream.period.start:NaN;if(!(isNaN(he)||isNaN(ye))){var _e=Ie.calculatedPresentationTime;Math.abs(_e-ae)<N&&c(Ie,$,u.default.EVENT_MODE_ON_START)}};j($,ne())})()}catch(ae){}}function j($,ae){try{if($)for(var ne=Object.keys($),Se=0;Se<ne.length;Se++){var Ie=$[ne[Se]];Ie.forEach(function(he){he!==void 0&&ae(he)})}}catch(he){}}function le($,ae,ne){try{return $-ae>ne}catch(Se){return!1}}function G($){try{var ae=$.eventStream.period.start+$.eventStream.period.duration;return $.calculatedPresentationTime>ae}catch(ne){return!1}}function c($,ae,ne){try{var Se=K.getTime(),Ie=$.id;if(ne===u.default.EVENT_MODE_ON_RECEIVE){v.debug("Received event "+Ie),I.trigger($.eventStream.schemeIdUri,{event:$},{mode:ne});return}$.eventStream.schemeIdUri===R&&$.eventStream.value===P?($.duration!==0||$.presentationTimeDelta!==0)&&(v.debug("Starting manifest refresh event "+Ie+" at "+Se),E(ae,$),b()):$.eventStream.schemeIdUri===w&&$.eventStream.value===H?(v.debug("Starting callback event "+Ie+" at "+Se),E(ae,$),l($.messageData)):(v.debug("Starting event "+Ie+" at "+Se),E(ae,$),I.trigger($.eventStream.schemeIdUri,{event:$},{mode:ne}))}catch(he){}}function E($,ae){var ne=ae.eventStream.schemeIdUri,Se=ae.eventStream.value,Ie=ae.id;$[ne]=$[ne].filter(function(he){return Se&&he.eventStream.value&&he.eventStream.value!==Se||he.id!==Ie}),$[ne].length===0&&delete $[ne]}function b(){try{ue(),L.refreshManifest()}catch($){}}function l($){try{var ae=(0,C.default)(M).create({});ae.load({method:"get",url:$,request:{responseType:"arraybuffer"}})}catch(ne){throw ne}}function d($){try{if(!$)return;$.manifestUpdater&&(L=$.manifestUpdater),$.playbackController&&(K=$.playbackController),$.settings&&(x=$.settings)}catch(ae){throw ae}}function y(){return T}function V(){return W}function te(){ve(),re()}return D={addInlineEvents:se,addInbandEvents:J,getInbandEvents:V,getInlineEvents:y,start:ce,setConfig:d,reset:te},oe(),D}k.__dashjs_factory_name="EventController",r.default=i.default.getSingletonFactory(k),g.exports=r.default},{"104":104,"164":164,"45":45,"46":46,"47":47}],120:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(T){return T&&T.__esModule?T:{default:T}}var p=e(112),i=t(p),o=e(240),n=t(o),f=e(154),h=t(f),m=e(100),u=t(m),_=e(231),C=t(_),k=e(46),R=t(k),P=e(54),w=t(P),H=e(51),N=t(H),A=e(47),M=t(A),I=e(45),D=t(I);function v(T){T=T||{};var W=this.context,O=(0,R.default)(W).getInstance(),B=T.errHandler,L=T.mediaPlayerModel,K=T.dashMetrics,x=(0,D.default)(W).getInstance(),U=T.streamInfo,Y=void 0,oe=void 0,ue=void 0;function re(){oe=x.getLogger(Y),se(),O.on(w.default.FRAGMENT_LOADING_COMPLETED,ie,Y),O.on(w.default.FRAGMENT_LOADING_PROGRESS,ie,Y)}function ve(){return U.id}function ce(me){var de=ue[me];return de||(de=(0,h.default)(W).create({streamInfo:U,type:me,dashMetrics:K,fragmentLoader:(0,u.default)(W).create({dashMetrics:K,mediaPlayerModel:L,errHandler:B,requestModifier:(0,C.default)(W).getInstance(),settings:T.settings,boxParser:T.boxParser,eventBus:O,events:w.default,errors:N.default,dashConstants:T.dashConstants,urlUtils:T.urlUtils}),debug:x,eventBus:O,events:w.default}),ue[me]=de),de}function se(){for(var me in ue)ue[me].reset();ue={}}function J(){O.off(w.default.FRAGMENT_LOADING_COMPLETED,ie,this),O.off(w.default.FRAGMENT_LOADING_PROGRESS,ie,this),se()}function ee(me,de,Q,X){var j=new n.default;return j.streamId=Q,j.mediaInfo=de.mediaInfo,j.segmentType=de.type,j.start=de.startTime,j.duration=de.duration,j.end=j.start+j.duration,j.bytes=me,j.index=de.index,j.quality=de.quality,j.representationId=de.representationId,j.endFragment=X,j}function ie(me){if(!!me.sender){var de=me.request,Q=me.response,X=de.isInitializationRequest(),j=de.mediaInfo.streamInfo;if(me.error&&(de.mediaType===i.default.AUDIO||de.mediaType===i.default.VIDEO||de.mediaType===i.default.FRAGMENTED_TEXT)&&O.trigger(w.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:me.request.serviceLocation}),!Q||!j){oe.warn("No "+de.mediaType+" bytes to push or stream is inactive.");return}var le=ee(Q,de,U.id,me.type!==w.default.FRAGMENT_LOADING_PROGRESS);O.trigger(X?w.default.INIT_FRAGMENT_LOADED:w.default.MEDIA_FRAGMENT_LOADED,{chunk:le,request:de},{streamId:j.id,mediaType:de.mediaType})}}return Y={getStreamId:ve,getModel:ce,reset:J},re(),Y}v.__dashjs_factory_name="FragmentController",r.default=M.default.getClassFactory(v),g.exports=r.default},{"100":100,"112":112,"154":154,"231":231,"240":240,"45":45,"46":46,"47":47,"51":51,"54":54}],121:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(54),h=t(f),m=e(46),u=t(m),_=100,C=30,k=.1;function R(){var P=this.context,w=(0,u.default)(P).getInstance(),H=void 0,N=void 0,A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0;function x(){re()}function U(){K=(0,n.default)(P).getInstance().getLogger(H),Y()}function Y(){de(),ve(),oe()}function oe(){I=null,D=NaN,M=0,L=null}function ue(X){!X||(X.settings&&(A=X.settings),X.playbackController&&(v=X.playbackController),X.streamController&&(T=X.streamController),X.videoModel&&(W=X.videoModel),X.timelineConverter&&(O=X.timelineConverter),X.adapter&&(B=X.adapter))}function re(){w.on(h.default.WALLCLOCK_TIME_UPDATED,J,this),w.on(h.default.PLAYBACK_SEEKING,se,this),w.on(h.default.BYTES_APPENDED_END_FRAGMENT,ce,H)}function ve(){w.off(h.default.WALLCLOCK_TIME_UPDATED,J,this),w.off(h.default.PLAYBACK_SEEKING,se,this),w.off(h.default.BYTES_APPENDED_END_FRAGMENT,ce,H)}function ce(){I||me()}function se(){L&&(clearTimeout(L),L=null)}function J(){if(!!ee()&&(M++,M>=C)){var X=v.getTime();N===X?Q(X,!0):(N=X,D=NaN),M=0}}function ee(){return A.get().streaming.jumpGaps&&T.getActiveStreamProcessors().length>0&&(!v.isSeeking()||T.hasStreamFinishedBuffering(T.getActiveStream()))&&!v.isPaused()&&!T.getIsStreamSwitchInProgress()&&!T.getHasMediaOrIntialisationError()}function ie(X,j){try{if(!X||X.length<=1&&j>0)return NaN;for(var le=NaN,G=0;isNaN(le)&&G<X.length;){var c=G>0?X.end(G-1):0;j<X.start(G)&&c-j<k&&(le=G),G+=1}return le}catch(E){return null}}function me(){try{I||(K.debug("Starting the gap controller"),I=setInterval(function(){if(!!ee()){var X=v.getTime();Q(X)}},_))}catch(X){}}function de(){K.debug("Stopping the gap controller"),I&&(clearInterval(I),I=null)}function Q(X){var j=arguments.length<=1||arguments[1]===void 0?!1:arguments[1],le=A.get().streaming.smallGapLimit,G=A.get().streaming.jumpLargeGaps,c=W.getBufferRange(),E=void 0,b=NaN,l=!1;if(E=ie(c,X),!isNaN(E)){var d=c.start(E),y=d-X;y>0&&(y<=le||G)&&(b=d)}var V=v.getTimeToStreamEnd();isNaN(b)&&j&&isFinite(V)&&!isNaN(V)&&V<le&&(b=parseFloat(v.getStreamEndTime().toFixed(5)),l=!0),b>0&&D!==b&&b>X&&!L&&function(){var te=b-X;l?(K.warn("Jumping to end of stream because of gap from "+X+" to "+b+". Gap duration: "+te),w.trigger(h.default.GAP_CAUSED_SEEK_TO_PERIOD_END,{seekTime:b,duration:te})):function(){var $=v.getIsDynamic(),ae=E>0?c.end(E-1):X,ne=$?te*1e3:0;L=window.setTimeout(function(){v.seek(b,!0,!0),K.warn("Jumping gap starting at "+ae+" and ending at "+b+". Jumping by: "+te),w.trigger(h.default.GAP_CAUSED_INTERNAL_SEEK,{seekTime:b,duration:te}),L=null},ne)}(),D=b}()}return H={reset:Y,setConfig:ue,initialize:x},U(),H}R.__dashjs_factory_name="GapController",r.default=i.default.getSingletonFactory(R),g.exports=r.default},{"45":45,"46":46,"47":47,"54":54}],122:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(112),i=t(p),o=e(54),n=t(o),f=e(46),h=t(f),m=e(47),u=t(m),_=e(45),C=t(_);function k(){var P=this.context,w=(0,h.default)(P).getInstance(),H=void 0,N=void 0,A=void 0,M=void 0,I=void 0,D=void 0,v=[i.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,i.default.TRACK_SWITCH_MODE_NEVER_REPLACE],T=[i.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,i.default.TRACK_SELECTION_MODE_FIRST_TRACK,i.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY,i.default.TRACK_SELECTION_MODE_WIDEST_RANGE];function W(){N=(0,C.default)(P).getInstance().getLogger(H),me()}function O(b,l){var d=oe(b),y=L(b,l),V=[];d||(d=D.getSavedMediaSettings(b),Y(b,d)),!(!y||y.length===0)&&(d&&y.forEach(function(te){Q(d,te)&&V.push(te)}),V.length===0?U(this.selectInitialTrack(b,y),!0):V.length>1?U(this.selectInitialTrack(b,V)):U(V[0]))}function B(b){if(!!b){var l=b.type;if(!!J(l)){var d=b.streamInfo.id;A[d]||(A[d]=E());for(var y=A[d][l].list,V=0,te=y.length;V<te;++V)if(ee(y[V],b))return;y.push(b);var $=oe(l);$&&Q($,b)&&!K(l,b.streamInfo)&&U(b)}}}function L(b,l){if(!b||!l)return[];var d=l.id;return!A[d]||!A[d][b]?[]:A[d][b].list}function K(b,l){return!b||!l||l&&!A[l.id]?null:A[l.id][b].current}function x(b){if(!b)return!1;var l=b.type,d=b.streamInfo.id;return A[d]&&A[d][l]&&ee(A[d][l].current,b)}function U(b,l){if(!(!b||!b.streamInfo)){var d=b.type,y=b.streamInfo,V=y.id,te=K(d,y);if(!(!A[V]||!A[V][d]||ee(b,te))&&(A[V][d].current=b,A[V][d].current&&!(l&&d===i.default.FRAGMENTED_TEXT)&&w.trigger(n.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:te,newMediaInfo:b,switchMode:ve(d)}),!l)){var $=de(b);if(!$||!A[V][d].storeLastSettings)return;$.roles&&($.role=$.roles[0],delete $.roles),$.accessibility&&($.accessibility=$.accessibility[0]),$.audioChannelConfiguration&&($.audioChannelConfiguration=$.audioChannelConfiguration[0]),D.setSavedMediaSettings(d,$)}}}function Y(b,l){!b||!l||(I[b]=l)}function oe(b){return b?I[b]:null}function ue(){D.setSavedMediaSettings(i.default.FRAGMENTED_TEXT,null)}function re(b,l){N.warn("deprecated: Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead");var d=v.indexOf(l)!==-1;if(!d){N.warn("Track switch mode is not supported: "+l);return}var y={};y[b]=l,M.update({streaming:{trackSwitchMode:y}})}function ve(b){return M.get().streaming.trackSwitchMode[b]}function ce(b){N.warn("deprecated: Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead");var l=T.indexOf(b)!==-1;if(!l){N.warn("Track selection mode is not supported: "+b);return}M.update({streaming:{selectionModeForInitialTrack:b}})}function se(){return M.get().streaming.selectionModeForInitialTrack}function J(b){return b===i.default.AUDIO||b===i.default.VIDEO||b===i.default.TEXT||b===i.default.FRAGMENTED_TEXT||b===i.default.IMAGE}function ee(b,l){if(!b&&!l)return!0;if(!b||!l)return!1;var d=b.id===l.id,y=b.viewpoint===l.viewpoint,V=b.lang===l.lang,te=b.roles.toString()===l.roles.toString(),$=b.accessibility.toString()===l.accessibility.toString(),ae=b.audioChannelConfiguration.toString()===l.audioChannelConfiguration.toString();return d&&y&&V&&te&&$&&ae}function ie(b){!b||(b.domStorage&&(D=b.domStorage),b.settings&&(M=b.settings))}function me(){A={},X()}function de(b){var l={lang:b.lang,viewpoint:b.viewpoint,roles:b.roles,accessibility:b.accessibility,audioChannelConfiguration:b.audioChannelConfiguration},d=l.lang||l.viewpoint||l.role&&l.role.length>0||l.accessibility&&l.accessibility.length>0||l.audioChannelConfiguration&&l.audioChannelConfiguration.length>0;return d?l:null}function Q(b,l){var d=!b.lang||l.lang.match(b.lang),y=b.index===void 0||b.index===null||l.index===b.index,V=!b.viewpoint||b.viewpoint===l.viewpoint,te=!b.role||!!l.roles.filter(function(ne){return ne===b.role})[0],$=!b.accessibility||!!l.accessibility.filter(function(ne){return ne===b.accessibility})[0],ae=!b.audioChannelConfiguration||!!l.audioChannelConfiguration.filter(function(ne){return ne===b.audioChannelConfiguration})[0];return d&&y&&V&&te&&$&&ae}function X(){I={audio:null,video:null,fragmentedText:null}}function j(b){var l=0,d=[],y=void 0;return b.forEach(function(V){y=Math.max.apply(Math,V.bitrateList.map(function(te){return te.bandwidth})),y>l?(l=y,d=[V]):y===l&&d.push(V)}),d}function le(b){var l=1/0,d=[],y=void 0;return b.forEach(function(V){var te=V.bitrateList.reduce(function($,ae){var ne=Math.max(1,ae.width*ae.height),Se=ae.bandwidth/ne;return $+Se},0);y=te/V.bitrateList.length,y<l?(l=y,d=[V]):y===l&&d.push(V)}),d}function G(b){var l=0,d=[],y=void 0;return b.forEach(function(V){y=V.representationCount,y>l?(l=y,d=[V]):y===l&&d.push(V)}),d}function c(b,l){if(b===i.default.FRAGMENTED_TEXT)return l[0];var d=se(),y=[];switch(d){case i.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:y=j(l),y.length>1&&(y=G(y));break;case i.default.TRACK_SELECTION_MODE_FIRST_TRACK:y.push(l[0]);break;case i.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:y=le(l),y.length>1&&(y=j(y));break;case i.default.TRACK_SELECTION_MODE_WIDEST_RANGE:y=G(l),y.length>1&&(y=j(l));break;default:N.warn("Track selection mode is not supported: "+d);break}return y[0]}function E(){return{audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}}}return H={checkInitialMediaSettingsForType:O,addTrack:B,getTracksFor:L,getCurrentTrackFor:K,isCurrentTrack:x,setTrack:U,setInitialSettings:Y,getInitialSettings:oe,setSwitchMode:re,getSwitchMode:ve,selectInitialTrack:c,getTracksWithHighestBitrate:j,getTracksWithHighestEfficiency:le,getTracksWithWidestRange:G,setSelectionModeForInitialTrack:ce,getSelectionModeForInitialTrack:se,isMultiTrackSupportedByType:J,isTracksEqual:ee,matchSettings:Q,saveTextSettingsDisabled:ue,setConfig:ie,reset:me},W(),H}k.__dashjs_factory_name="MediaController";var R=u.default.getSingletonFactory(k);u.default.updateSingletonFactory(k.__dashjs_factory_name,R),r.default=R,g.exports=r.default},{"112":112,"45":45,"46":46,"47":47,"54":54}],123:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(47),i=t(p),o=e(45),n=t(o);function f(){var h=void 0,m=void 0,u=this.context;function _(){m=(0,n.default)(u).getInstance().getLogger(h)}function C(){var A="WebKitMediaSource"in window,M="MediaSource"in window;return M?new MediaSource:A?new WebKitMediaSource:null}function k(A,M){var I=window.URL.createObjectURL(A);return M.setSource(I),I}function R(A){A.setSource(null)}function P(A,M){!A||A.readyState!=="open"||M===null&&isNaN(M)||A.duration!==M&&(N(A)?setTimeout(P.bind(null,A,M),50):(m.info("Set MediaSource duration:"+M),A.duration=M))}function w(A,M,I){A&&typeof A.setLiveSeekableRange=="function"&&typeof A.clearLiveSeekableRange=="function"&&A.readyState==="open"&&M>=0&&M<I&&(A.clearLiveSeekableRange(),A.setLiveSeekableRange(M,I))}function H(A){if(!(!A||A.readyState!=="open")){for(var M=A.sourceBuffers,I=0;I<M.length;I++)if(M[I].updating||M[I].buffered.length===0)return;m.info("call to mediaSource endOfStream"),A.endOfStream()}}function N(A){for(var M=A.sourceBuffers,I=0;I<M.length;I++)if(M[I].updating)return!0;return!1}return h={createMediaSource:C,attachMediaSource:k,detachMediaSource:R,setDuration:P,setSeekable:w,signalEndOfStream:H},_(),h}f.__dashjs_factory_name="MediaSourceController",r.default=i.default.getSingletonFactory(f),g.exports=r.default},{"45":45,"47":47}],124:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(H){return H&&H.__esModule?H:{default:H}}var p=e(112),i=t(p),o=e(113),n=t(o),f=e(46),h=t(f),m=e(54),u=t(m),_=e(47),C=t(_),k=e(45),R=t(k),P=500;function w(){var H=this.context,N=(0,h.default)(H).getInstance(),A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0;function de(){M=(0,R.default)(H).getInstance().getLogger(A),pe()}function Q(Z,Ae,Te){x=Z,Pt(),U=x.manifestInfo.isDynamic,se=!1,J=!1,O=Ae===!0,B=Te,ce=!1;var be=typeof navigator!="undefined"?navigator.userAgent.toLowerCase():"",Oe=/safari/.test(be)&&!/chrome/.test(be);ee=Oe?.25:.02,N.on(u.default.STREAM_INITIALIZED,X,this),N.on(u.default.DATA_UPDATE_COMPLETED,we,this),N.on(u.default.LOADING_PROGRESS,kt,this),N.on(u.default.BUFFER_LEVEL_STATE_CHANGED,ft,this),N.on(u.default.PLAYBACK_PROGRESS,Ce,this),N.on(u.default.PLAYBACK_TIME_UPDATED,Ce,this),N.on(u.default.PLAYBACK_ENDED,vt,this,{priority:h.default.EVENT_PRIORITY_HIGH}),N.on(u.default.STREAM_INITIALIZING,Kt,this),oe&&(oe=!1,G())}function X(Z){if(!(O&&isNaN(B))){var Ae=B;if(isNaN(Ae))if(U){Ae=Z.liveStartTime;var Te=D.getCurrentDVRInfo(),be=Te?Te.range:null;if(be){var Oe=je(!0);isNaN(Oe)||(M.info("Start time from URI parameters: "+Oe),Ae=Math.max(Math.min(Ae,Oe),be.start))}}else{Ae=x.start;var Oe=je(!1);!isNaN(Oe)&&Oe<Ae+x.duration&&(M.info("Start time from URI parameters: "+Oe),Ae=Math.max(Ae,Oe))}!isNaN(Ae)&&Ae!==T.getTime()&&(N.trigger(u.default.PLAYBACK_SEEKING,{seekTime:Ae}),l(Ae,!1,!0))}}function j(){return parseFloat((le()-y()).toFixed(5))}function le(){return x.start+x.duration}function G(){x&&T&&T.getElement()?T.play():oe=!0}function c(){return x&&T?T.isPaused():null}function E(){x&&T&&T.pause()}function b(){return x&&T?T.isSeeking():null}function l(Z,Ae,Te){if(!(!x||!T)){var be=isNaN(ve)?T.getTime():ve;Z!==be&&(ce=Te===!0,ce||(ve=Z,N.trigger(u.default.PLAYBACK_SEEK_ASKED)),M.info("Requesting seek to time: "+Z+(ce?" (internal)":"")),T.setCurrentTime(Z,Ae))}}function d(){var Z=D.getCurrentDVRInfo(),Ae=Z?Z.range:null;l(Ae.end-Y.getLiveDelay(),!0,!1)}function y(){return x&&T?T.getTime():null}function V(){var Z=y();if(U&&!isNaN(re)){var Ae=re/1e3;Z>Ae&&(Z-=Ae)}return Z}function te(){return x&&T?T.getPlaybackRate():null}function $(){return x&&T?T.getPlayedRanges():null}function ae(){return x&&T?T.getEnded():null}function ne(){return U}function Se(){return I}function Ie(Z,Ae,Te){var be=void 0,Oe=void 0,Qe=void 0,Tt=10,dt=4,st=4,bt=!isNaN(Z)&&isFinite(Z)?Z:NaN,Yt=v.getSuggestedPresentationDelay();if(me.get().streaming.lowLatencyEnabled?be=0:Y.getLiveDelay()?be=Y.getLiveDelay():me.get().streaming.liveDelayFragmentCount!==null&&!isNaN(me.get().streaming.liveDelayFragmentCount)&&!isNaN(bt)?be=bt*me.get().streaming.liveDelayFragmentCount:me.get().streaming.useSuggestedPresentationDelay===!0&&Yt!==null&&!isNaN(Yt)&&Yt>0?be=Yt:isNaN(bt)?be=isNaN(Te)?x.manifestInfo.minBufferTime*dt:Te*dt:be=bt*st,Qe=v.getAvailabilityStartTime(),Qe!==null&&(re=Qe),Ae>0){var xt=Math.max(Ae-Tt,Ae/2);Oe=Math.min(be,xt)}else Oe=be;return K=Oe,Oe}function he(){return K}function ye(Z){var Ae=arguments.length<=1||arguments[1]===void 0?!1:arguments[1];Ae&&Z<K||(K=Z)}function _e(){if(!U||isNaN(re))return NaN;var Z=V();if(isNaN(Z)||Z===0)return 0;var Ae=new Date().getTime()+W.getClientTimeOffset()*1e3;return Math.max(((Ae-re-Z*1e3)/1e3).toFixed(3),0)}function pe(){oe=!1,O=!1,B=NaN,K=0,re=0,ve=NaN,T&&(N.off(u.default.STREAM_INITIALIZED,X,this),N.off(u.default.DATA_UPDATE_COMPLETED,we,this),N.off(u.default.BUFFER_LEVEL_STATE_CHANGED,ft,this),N.off(u.default.LOADING_PROGRESS,kt,this),N.off(u.default.PLAYBACK_PROGRESS,Ce,this),N.off(u.default.PLAYBACK_TIME_UPDATED,Ce,this),N.off(u.default.PLAYBACK_ENDED,vt,this),N.off(u.default.STREAM_INITIALIZING,Kt,this),Ve(),Ee()),L=null,T=null,x=null,U=null}function De(Z){!Z||(Z.streamController&&(I=Z.streamController),Z.dashMetrics&&(D=Z.dashMetrics),Z.mediaPlayerModel&&(Y=Z.mediaPlayerModel),Z.adapter&&(v=Z.adapter),Z.videoModel&&(T=Z.videoModel),Z.timelineConverter&&(W=Z.timelineConverter),Z.uriFragmentModel&&(ie=Z.uriFragmentModel),Z.settings&&(me=Z.settings))}function je(Z){var Ae=ie.getURIFragmentData();if(!Ae||!Ae.t)return NaN;var Te=I.getStreams()[0],be=Te.getStreamInfo().start;Ae.t=Ae.t.split(",")[0];var Oe=Ae.t.indexOf("posix:")!==-1?Ae.t.substring(6)==="now"?Date.now()/1e3:parseInt(Ae.t.substring(6)):NaN,Qe=Z&&!isNaN(Oe)?Oe-re/1e3:parseInt(Ae.t)+be;return Qe}function Fe(Z,Ae){var Te=D.getCurrentDVRInfo(Ae),be=Te?Te.range:null,Oe=void 0;return be?(M.debug("Checking DVR window for at "+Z+" with DVR window range "+be.start+" - "+be.end),Z>be.end?Oe=Math.max(be.end-K,be.start):Z>0&&Z+.25<be.start&&Math.abs(Z-be.start)<31536e4?Oe=be.start:Oe=Z,Oe):NaN}function Le(){if(L===null){var Z=function(){Rt()};L=setInterval(Z,me.get().streaming.wallclockTimeUpdateInterval)}}function Ve(){clearInterval(L),L=null}function Ge(Z){if(!(c()||!U||T.getReadyState()===0)){var Ae=V(),Te=Fe(Ae,Z),be=!isNaN(Te)&&Te!==Ae;be&&!b()&&(M.debug("UpdateCurrentTime: Seek to actual time: "+Te+" from currentTime: "+Ae),l(Te))}}function we(Z){if(!Z.error){var Ae=v.convertDataToRepresentationInfo(Z.currentRepresentation),Te=Ae?Ae.mediaInfo.streamInfo:null;Te===null||x.id!==Te.id||(x=Te,Ge())}}function at(){N.trigger(u.default.CAN_PLAY)}function Re(){M.info("Native video element event: play"),Ge(),Le(),N.trigger(u.default.PLAYBACK_STARTED,{startTime:y()})}function Xe(){M.info("Native video element event: waiting"),N.trigger(u.default.PLAYBACK_WAITING,{playingTime:y()})}function lt(){M.info("Native video element event: playing"),N.trigger(u.default.PLAYBACK_PLAYING,{playingTime:y()})}function ct(){M.info("Native video element event: pause"),N.trigger(u.default.PLAYBACK_PAUSED,{ended:ae()})}function tt(){if(ce){ce=!1;return}var Z=y();!isNaN(ve)&&ve!==Z&&(Z=ve),ve=NaN,M.info("Seeking to: "+Z),Le(),N.trigger(u.default.PLAYBACK_SEEKING,{seekTime:Z})}function St(){M.info("Native video element event: seeked"),N.trigger(u.default.PLAYBACK_SEEKED)}function Ct(){x&&N.trigger(u.default.PLAYBACK_TIME_UPDATED,{timeToEnd:j(),time:y()})}function wt(){var Z=Date.now();(!ue||Z>ue+P)&&(ue=Z,Ct())}function We(){N.trigger(u.default.PLAYBACK_PROGRESS)}function He(){var Z=te();M.info("Native video element event: ratechange: ",Z),N.trigger(u.default.PLAYBACK_RATE_CHANGED,{playbackRate:Z})}function ze(){M.info("Native video element event: loadedmetadata"),N.trigger(u.default.PLAYBACK_METADATA_LOADED),Le()}function mt(){M.info("Native video element event: ended"),E(),Ve();var Z=I?I.getActiveStreamInfo():null;!Z||N.trigger(u.default.PLAYBACK_ENDED,{isLast:Z.isLast})}function vt(Z){if(L&&Z.isLast){M.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var Ae=Z.seekTime?Z.seekTime:le();T.setCurrentTime(Ae),E(),Ve()}}function pt(Z){var Ae=Z.target||Z.srcElement;N.trigger(u.default.PLAYBACK_ERROR,{error:Ae.error})}function Rt(){N.trigger(u.default.WALLCLOCK_TIME_UPDATED,{isDynamic:U,time:new Date}),ne()&&c()&&wt()}function Ce(){U&&Pe()&&me.get().streaming.liveCatchup.playbackRate>0&&!c()&&!b()&&(ut()?ht():Dt())}function Pe(){return me.get().streaming.liveCatchup.enabled||me.get().streaming.lowLatencyEnabled}function Ye(){var Z=null;return I.getActiveStreamProcessors().forEach(function(Ae){var Te=Ae.getBufferLevel();Z===null?Z=Te:Z=Math.min(Z,Te)}),Z}function Ze(){var Z=me.get().streaming.liveCatchup.playbackBufferMin;return me.get().streaming.liveCatchup.mode===i.default.LIVE_CATCHUP_MODE_LOLP&&Z!==null&&!isNaN(Z)?i.default.LIVE_CATCHUP_MODE_LOLP:i.default.LIVE_CATCHUP_MODE_DEFAULT}function ut(){try{if(Pe()&&me.get().streaming.liveCatchup.playbackRate>0&&y()>0){var Z=Ze(),Ae=_e(),Te=Y.getLiveDelay(),be=Y.getLiveCatchupLatencyThreshold(),Oe=me.get().streaming.liveCatchup.minDrift;if(Z===i.default.LIVE_CATCHUP_MODE_LOLP){var Qe=Ye(),Tt=me.get().streaming.liveCatchup.playbackBufferMin;return Je(Ae,Te,Oe,Qe,Tt,be)}else return Ue(Ae,Te,be,Oe)}}catch(dt){return!1}}function Ue(Z,Ae,Te,be){try{var Oe=Math.abs(Z-Ae);return Oe>be&&(isNaN(Te)||Z<=Te)}catch(Qe){return!1}}function Je(Z,Ae,Te,be,Oe,Qe){try{var Tt=Math.abs(Z-Ae);return(isNaN(Qe)||Z<=Qe)&&(Tt>Te||be<Oe)}catch(dt){return!1}}function ht(){if(T){var Z=void 0,Ae=T.getPlaybackRate(),Te=me.get().streaming.liveCatchup.playbackRate,be=_e(),Oe=Y.getLiveDelay(),Qe=Ye();if(Ze()===i.default.LIVE_CATCHUP_MODE_LOLP){var Tt=me.get().streaming.liveCatchup.minDrift,dt=me.get().streaming.liveCatchup.playbackBufferMin;Z=rt(Te,be,Oe,Tt,dt,Qe,Ae)}else Z=Et(Te,be,Oe,Qe,Ae);var st=Z.newRate;st&&T.setPlaybackRate(st);var bt=be-Oe;me.get().streaming.liveCatchup.maxDrift>0&&!se&&bt>me.get().streaming.liveCatchup.maxDrift?(M.info("Low Latency catchup mechanism. Latency too high, doing a seek to live point"),se=!0,d()):se=!1}}function Et(Z,Ae,Te,be,Oe){var Qe=Z,Tt=Ae-Te,dt=Tt*5,st=Qe*2/(1+Math.pow(Math.E,-dt)),bt=1-Qe+st;return J&&(be>Te/2?J=!1:Tt>0&&(bt=1)),Math.abs(Oe-bt)<=ee&&(bt=null),{newRate:bt}}function rt(Z,Ae,Te,be,Oe,Qe,Tt){var dt=Z,st=void 0;if(Qe<Oe){var bt=Qe-Oe,Yt=bt*5,xt=dt*2/(1+Math.pow(Math.E,-Yt));st=1-dt+xt,M.debug("[LoL+ playback control_buffer-based] bufferLevel: "+Qe+", newRate: "+st)}else{var Qt=.02;if(Math.abs(Ae-Te)<=Qt*Te)st=1;else{var Xt=Ae-Te,Yt=Xt*5,xt=dt*2/(1+Math.pow(Math.E,-Yt));st=1-dt+xt}M.debug("[LoL+ playback control_latency-based] latency: "+Ae+", newRate: "+st)}return J&&Qe>Te/2&&(J=!1),Math.abs(Tt-st)<=ee&&(st=null),{newRate:st}}function Dt(){T&&T.setPlaybackRate(1)}function kt(Z){if(Z.stream===!1&&me.get().streaming.lowLatencyEnabled&&!isNaN(Z.request.duration)){var Ae=1.2*Z.request.duration;if(Ae>Y.getLiveDelay()){M.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",Ae.toFixed(2));var Te={streaming:{liveDelay:Ae}};me.update(Te)}}}function ft(Z){Z.streamId===x.id&&(Pe()?Z.state===n.default.BUFFER_EMPTY&&!b()&&(J||(J=!0,Dt())):T.setStallState(Z.mediaType,Z.state===n.default.BUFFER_EMPTY))}function Gt(Z){N.trigger(u.default.PLAYBACK_STALLED,{e:Z})}function Kt(Z){Vt(Z.streamInfo,Z.mediaInfo)}function Vt(Z,Ae){if(Z&&Z.manifestInfo&&Z.manifestInfo.serviceDescriptions){for(var Te=void 0,be=0;be<Z.manifestInfo.serviceDescriptions.length;be++){var Oe=Z.manifestInfo.serviceDescriptions[be];if(Oe.schemeIdUri===i.default.SERVICE_DESCRIPTION_LL_SCHEME){Te=Oe;break}}Te&&Ae&&Ae.supplementalProperties&&Ae.supplementalProperties[i.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]==="true"&&(Te.latency&&Te.latency.target>0&&(M.debug("Apply LL properties coming from service description. Target Latency (ms):",Te.latency.target),me.update({streaming:{lowLatencyEnabled:!0,liveDelay:Te.latency.target/1e3,liveCatchup:{minDrift:Te.latency.max>Te.latency.target?(Te.latency.max-Te.latency.target)/1e3:void 0}}})),Te.playbackRate&&Te.playbackRate.max>1&&(M.debug("Apply LL properties coming from service description. Max PlaybackRate:",Te.playbackRate.max),me.update({streaming:{lowLatencyEnabled:!0,liveCatchup:{playbackRate:Te.playbackRate.max-1}}})))}}function Pt(){T.addEventListener("canplay",at),T.addEventListener("play",Re),T.addEventListener("waiting",Xe),T.addEventListener("playing",lt),T.addEventListener("pause",ct),T.addEventListener("error",pt),T.addEventListener("seeking",tt),T.addEventListener("seeked",St),T.addEventListener("timeupdate",Ct),T.addEventListener("progress",We),T.addEventListener("ratechange",He),T.addEventListener("loadedmetadata",ze),T.addEventListener("stalled",Gt),T.addEventListener("ended",mt)}function Ee(){T.removeEventListener("canplay",at),T.removeEventListener("play",Re),T.removeEventListener("waiting",Xe),T.removeEventListener("playing",lt),T.removeEventListener("pause",ct),T.removeEventListener("error",pt),T.removeEventListener("seeking",tt),T.removeEventListener("seeked",St),T.removeEventListener("timeupdate",Ct),T.removeEventListener("progress",We),T.removeEventListener("ratechange",He),T.removeEventListener("loadedmetadata",ze),T.removeEventListener("stalled",Gt),T.removeEventListener("ended",mt)}return A={initialize:Q,setConfig:De,getStartTimeFromUriParameters:je,getTimeToStreamEnd:j,getTime:y,getNormalizedTime:V,getPlaybackRate:te,getPlayedRanges:$,getEnded:ae,getIsDynamic:ne,getStreamController:Se,computeAndSetLiveDelay:Ie,getLiveDelay:he,setLiveDelay:ye,getCurrentLiveLatency:_e,play:G,isPaused:c,pause:E,isSeeking:b,getStreamEndTime:le,seek:l,updateCurrentTime:Ge,reset:pe},de(),A}w.__dashjs_factory_name="PlaybackController",r.default=C.default.getSingletonFactory(w),g.exports=r.default},{"112":112,"113":113,"45":45,"46":46,"47":47,"54":54}],125:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(M){return M&&M.__esModule?M:{default:M}}var p=e(112),i=t(p),o=e(113),n=t(o),f=e(209),h=t(f),m=e(154),u=t(m),_=e(46),C=t(_),k=e(54),R=t(k),P=e(47),w=t(P),H=e(45),N=t(H);function A(M){M=M||{};var I=this.context,D=(0,C.default)(I).getInstance(),v=M.adapter,T=M.dashMetrics,W=M.mediaPlayerModel,O=M.fragmentModel,B=M.abrController,L=M.playbackController,K=M.textController,x=M.type,U=M.mimeType,Y=M.mediaController,oe=M.bufferController,ue=M.settings,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0;function te(){ce=(0,N.default)(I).getInstance().getLogger(re),Ye(),ve=M.streamInfo}function $(Ue){X=Ue,j=(0,h.default)(I).create({abrController:B,dashMetrics:T,mediaPlayerModel:W,textController:K,settings:ue}),D.on(R.default.DATA_UPDATE_STARTED,St,this),D.on(R.default.FRAGMENT_LOADING_COMPLETED,Xe,this),D.on(R.default.STREAM_COMPLETED,Re,this),D.on(R.default.BUFFER_CLEARED,wt,this),D.on(R.default.BYTES_APPENDED_END_FRAGMENT,ct,this),D.on(R.default.QUOTA_EXCEEDED,We,this),D.on(R.default.PLAYBACK_SEEKING,mt,this),D.on(R.default.PLAYBACK_STARTED,ze,this),D.on(R.default.PLAYBACK_RATE_CHANGED,vt,this),D.on(R.default.PLAYBACK_TIME_UPDATED,lt,this),D.on(R.default.URL_RESOLUTION_FAILED,He,this),D.on(R.default.FRAGMENT_LOADING_ABANDONED,tt,this),D.on(R.default.BUFFERING_COMPLETED,Ct,this)}function ae(){return x}function ne(){return ve.id}function Se(Ue){se=Ue}function Ie(){return ee===!1}function he(){!ve||Ie()||!se||oe.getIsBufferingCompleted()||(ce.debug("Schedule Controller starts"),ee=!1,T.createPlaylistTraceMetrics(se.id,L.getTime()*1e3,L.getPlaybackRate()),J&&(J=!1),je(0))}function ye(){ee||(ce.debug("Schedule Controller stops"),ce.debug(x+" Schedule Controller stops"),ee=!0,clearTimeout(de))}function _e(Ue,Je){G[Je]=G[Je]||{};var ht=B.getTopQualityIndexFor(Ue,Je);return G[Je][Ue]!=ht?(ce.info("Top quality "+Ue+" index has changed from "+G[Je][Ue]+" to "+ht),G[Je][Ue]=ht,!0):!1}function pe(){if(!!ve){if(ee||ie||L.isPaused()&&!ue.get().streaming.scheduleWhilePaused||(x===i.default.FRAGMENTED_TEXT||x===i.default.TEXT)&&!K.isTextEnabled()||oe.getIsBufferingCompleted()){ye();return}De();var Ue=E.length>0,Je=c?c.quality:NaN;if(l||isNaN(Je)||b||Ue||_e(x,ve.id)||j.execute(x,se,X)){var ht=function(){if((se.quality!==Je||b)&&!l)b?(ce.debug("Switch track for "+x+", representation id = "+se.id),l=Y.getSwitchMode(x)===i.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,l&&oe.replaceBuffer&&oe.replaceBuffer(),b=!1):ce.debug("Quality has changed, get init request for representationid = "+se.id),D.trigger(R.default.INIT_FRAGMENT_NEEDED,{representationId:se.id,sender:re},{streamId:ve.id,mediaType:x}),y=!1;else{var rt=E.shift();rt&&rt.isInitializationRequest()?(D.trigger(R.default.INIT_FRAGMENT_NEEDED,{representationId:rt.representationId,sender:re},{streamId:ve.id,mediaType:x}),y=!1):(D.trigger(R.default.MEDIA_FRAGMENT_NEEDED,{seekTarget:Q,replacement:rt},{streamId:ve.id,mediaType:x}),y=!0)}};Fe(!0),!Ue&&y&&B.checkPlaybackQuality(x),ht()}else je(500)}}function De(){if(!!isNaN(Q)&&!!c){var Ue=L.getTime(),Je=1.5;if(isNaN(c.fragmentDuration)){var ht=T.getCurrentSchedulingInfo(se.mediaInfo.type);Je=ht?ht.duration*1.5:1.5}var Et=O.getRequests({state:u.default.FRAGMENT_MODEL_EXECUTED,time:Ue+Je,threshold:0})[0];if(Et&&E.indexOf(Et)===-1&&!v.getIsTextTrack(U)){var rt=ue.get().streaming.fastSwitchEnabled,Dt=oe.getBufferLevel(),kt=B.getAbandonmentStateFor(x),ft=!Y.isCurrentTrack(Et.mediaInfo)&&Y.getSwitchMode(Et.mediaInfo.type)===i.default.TRACK_SWITCH_MODE_NEVER_REPLACE,Gt=Et.quality<c.quality;rt&&(ft||Gt)&&Dt>=Je&&kt!==n.default.ABANDON_LOAD?(we(Et),V=!0,ce.debug("Reloading outdated fragment at index: ",Et.index)):Et.quality>c.quality&&!l&&pt(L.getTime()+Dt)}}}function je(Ue){clearTimeout(de),de=setTimeout(pe,Ue)}function Fe(Ue){ie!==Ue?ie=Ue:ce.debug("isFragmentProcessingInProgress is already equal to",Ue)}function Le(Ue){Ue&&(Fe(!0),O.executeRequest(Ue))}function Ve(Ue){Ue?(ce.debug("Next fragment request url is "+Ue.url),O.executeRequest(Ue)):(L.getIsDynamic()&&ce.debug("Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling."),Fe(!1),je(ue.get().streaming.lowLatencyEnabled?100:500))}function Ge(){b=!0}function we(Ue){E.push(Ue)}function at(Ue){if(L&&O){var Je=O.getRequests({state:u.default.FRAGMENT_MODEL_EXECUTED,time:L.getTime(),threshold:0})[0];Je&&L.getTime()>=Je.startTime&&((!le.mediaInfo||Je.mediaInfo.type===le.mediaInfo.type&&Je.mediaInfo.id!==le.mediaInfo.id)&&Ue&&D.trigger(R.default.TRACK_CHANGE_RENDERED,{mediaType:x,oldMediaInfo:le.mediaInfo,newMediaInfo:Je.mediaInfo}),(Je.quality!==le.quality||Je.adaptationIndex!==le.adaptationIndex)&&Ue&&D.trigger(R.default.QUALITY_CHANGE_RENDERED,{mediaType:x,oldQuality:le.quality,newQuality:Je.quality}),le={mediaInfo:Je.mediaInfo,quality:Je.quality,adaptationIndex:Je.adaptationIndex})}}function Re(){ye(),Fe(!1),ce.info("Stream "+ve.id+" is complete")}function Xe(Ue){Ue.request.mediaInfo.streamInfo.id!==ve.id||Ue.request.mediaType!==x||(ce.info("OnFragmentLoadingCompleted - Url:",Ue.request?Ue.request.url:"undefined",Ue.request.range?", Range:"+Ue.request.range:""),v.getIsTextTrack(U)&&Fe(!1),Ue.error&&Ue.request.serviceLocation&&!ee&&(we(Ue.request),Fe(!1),je(0)),l&&(d=Ue.request))}function lt(){at(!0)}function ct(Ue){if(l&&!isNaN(Ue.startTime)&&(l=!1,O.addExecutedRequest(d)),Fe(!1),isNaN(Ue.index)&&(c=oe.getRepresentationInfo(Ue.quality),ce.info("["+x+"] lastInitializedRepresentationInfo changed to "+Ue.quality)),V&&!isNaN(Ue.startTime)){var Je=L.getTime(),ht=Ue.startTime+se.fragmentDuration,Et=se.fragmentDuration*1.5;Je+Et>=ht?je(0):je((ht-(Je+Et))*1e3),V=!1}else je(0)}function tt(Ue){ce.info("onFragmentLoadingAbandoned request: "+Ue.request.url+" has been aborted"),!L.isSeeking()&&!b&&(ce.info("onFragmentLoadingAbandoned request: "+Ue.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),we(Ue.request)),Fe(!1),je(0)}function St(){}function Ct(){ye()}function wt(Ue){l&&ue.get().streaming.flushBufferAtTrackSwitch&&L.seek(L.getTime()+.001,!1,!0),Ue.hasEnoughSpaceToAppend&&Ue.quotaExceeded&&he()}function We(){ye(),Fe(!1)}function He(){O.abortRequests(),ye()}function ze(){(ee||!ue.get().streaming.scheduleWhilePaused)&&he()}function mt(Ue){if(!!ve){pt(Ue.seekTime),Rt(0),ee&&he();var Je=se&&se.DVRWindow&&L?se.DVRWindow.end-L.getTime():NaN;T.updateManifestUpdateInfo({latency:Je}),ie?O.abortRequests():je(0)}}function vt(Ue){T.updatePlayListTraceMetrics({playbackspeed:Ue.playbackRate.toString()})}function pt(Ue){Q=Ue}function Rt(Ue){me=Ue}function Ce(){return me}function Pe(){return j.getBufferTarget(x,se,X)}function Ye(){y=!0,ie=!1,me=0,Q=NaN,J=!0,c=void 0,le={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},G={},E=[],ee=!0,b=!1,l=!1,d=null,V=!1}function Ze(){D.off(R.default.DATA_UPDATE_STARTED,St,this),D.off(R.default.FRAGMENT_LOADING_COMPLETED,Xe,this),D.off(R.default.STREAM_COMPLETED,Re,this),D.off(R.default.BUFFER_CLEARED,wt,this),D.off(R.default.BYTES_APPENDED_END_FRAGMENT,ct,this),D.off(R.default.QUOTA_EXCEEDED,We,this),D.off(R.default.PLAYBACK_SEEKING,mt,this),D.off(R.default.PLAYBACK_STARTED,ze,this),D.off(R.default.PLAYBACK_RATE_CHANGED,vt,this),D.off(R.default.PLAYBACK_TIME_UPDATED,lt,this),D.off(R.default.URL_RESOLUTION_FAILED,He,this),D.off(R.default.FRAGMENT_LOADING_ABANDONED,tt,this),D.off(R.default.BUFFERING_COMPLETED,Ct,this),ye(),at(!1),Ye(),ve=null}function ut(){return L}return re={initialize:$,getType:ae,getStreamId:ne,setCurrentRepresentation:Se,setSeekTarget:pt,setTimeToLoadDelay:Rt,getTimeToLoadDelay:Ce,switchTrackAsked:Ge,isStarted:Ie,start:he,stop:ye,reset:Ze,getBufferTarget:Pe,processInitRequest:Le,processMediaRequest:Ve,getPlaybackController:ut},te(),re}A.__dashjs_factory_name="ScheduleController",r.default=w.default.getClassFactory(A),g.exports=r.default},{"112":112,"113":113,"154":154,"209":209,"45":45,"46":46,"47":47,"54":54}],126:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(me){return me&&me.__esModule?me:{default:me}}function p(me){if(Array.isArray(me)){for(var de=0,Q=Array(me.length);de<me.length;de++)Q[de]=me[de];return Q}else return Array.from(me)}var i=e(112),o=t(i),n=e(113),f=t(n),h=e(108),m=t(h),u=e(102),_=t(u),C=e(46),k=t(C),R=e(54),P=t(R),w=e(47),H=t(w),N=e(257),A=e(45),M=t(A),I=e(227),D=t(I),v=e(234),T=t(v),W=e(104),O=t(W),B=e(127),L=t(B),K=e(123),x=t(K),U=e(239),Y=t(U),oe=e(51),ue=t(oe),re=e(119),ve=t(re),ce=e(111),se=t(ce),J=200,ee=500;function ie(){var me=this.context,de=(0,k.default)(me).getInstance(),Q=void 0,X=void 0,j=void 0,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0,te=void 0,$=void 0,ae=void 0,ne=void 0,Se=void 0,Ie=void 0,he=void 0,ye=void 0,_e=void 0,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=void 0,Ve=void 0,Ge=void 0,we=void 0,at=void 0,Re=void 0,Xe=void 0,lt=void 0,ct=void 0,tt=void 0,St=void 0,Ct=void 0,wt=void 0,We=void 0,He=void 0,ze=void 0,mt=void 0;function vt(){X=(0,M.default)(me).getInstance().getLogger(Q),y=(0,L.default)(me).getInstance(),d=(0,x.default)(me).getInstance(),Se=(0,D.default)(me).getInstance(),Ie=(0,T.default)(me).getInstance(),Nt()}function pt(xe,et){q(),Fe=xe,je=et,ye.initialize(),G=(0,_.default)(me).create(),G.setConfig({manifestModel:E,adapter:b,manifestLoader:c,errHandler:he,settings:ze}),G.initialize(),ae=(0,ve.default)(me).getInstance(),ae.setConfig({manifestUpdater:G,playbackController:Re,settings:ze}),ae.start(),y.setConfig({dashMetrics:l,baseURLController:V,settings:ze}),y.initialize(),Rt()}function Rt(){de.on(P.default.PLAYBACK_TIME_UPDATED,Pe,Q),de.on(P.default.PLAYBACK_SEEKING,Ye,Q),de.on(P.default.GAP_CAUSED_SEEK_TO_PERIOD_END,Ze,Q),de.on(P.default.PLAYBACK_ERROR,it,Q),de.on(P.default.PLAYBACK_STARTED,ut,Q),de.on(P.default.PLAYBACK_PAUSED,Ue,Q),de.on(P.default.PLAYBACK_ENDED,Ae,Q,{priority:k.default.EVENT_PRIORITY_HIGH}),de.on(P.default.MANIFEST_UPDATED,Zt,Q),de.on(P.default.STREAM_BUFFERING_COMPLETED,ft,Q),de.on(P.default.MANIFEST_VALIDITY_CHANGED,ke,Q),de.on(P.default.TIME_SYNCHRONIZATION_COMPLETED,Ut,Q),de.on(O.default.METRIC_ADDED,At,Q)}function Ce(){de.off(P.default.PLAYBACK_TIME_UPDATED,Pe,Q),de.off(P.default.PLAYBACK_SEEKING,Ye,Q),de.off(P.default.GAP_CAUSED_SEEK_TO_PERIOD_END,Ze,Q),de.off(P.default.PLAYBACK_ERROR,it,Q),de.off(P.default.PLAYBACK_STARTED,ut,Q),de.off(P.default.PLAYBACK_PAUSED,Ue,Q),de.off(P.default.PLAYBACK_ENDED,Ae,Q),de.off(P.default.MANIFEST_UPDATED,Zt,Q),de.off(P.default.STREAM_BUFFERING_COMPLETED,ft,Q),de.off(P.default.MANIFEST_VALIDITY_CHANGED,ke,Q),de.off(P.default.TIME_SYNCHRONIZATION_COMPLETED,Ut,Q),de.off(O.default.METRIC_ADDED,At,Q)}function Pe(){if(qe()){var xe=at.getPlaybackQuality();xe&&l.addDroppedFrames(xe)}}function Ye(xe){var et=Pt(xe.seekTime);et===pe&&We&&We.length>0&&We.forEach(function(Mt){Mt.deactivate(!0)}),et&&et!==pe?(yt(N.PlayListTrace.END_OF_PERIOD_STOP_REASON),Oe(et,pe,xe.seekTime)):yt(N.PlayListTrace.USER_REQUEST_STOP_REASON),Ke(N.PlayList.SEEK_START_REASON)}function Ze(xe){var et=Te();yt(N.PlayListTrace.END_OF_PERIOD_STOP_REASON),Oe(et,pe,xe.seekTime),Ke(N.PlayList.SEEK_START_REASON)}function ut(){X.debug("[onPlaybackStarted]"),ct?(ct=!1,Ke(N.PlayList.INITIAL_PLAYOUT_START_REASON)):lt&&(lt=!1,Ke(N.PlayList.RESUME_FROM_PAUSE_START_REASON))}function Ue(xe){X.debug("[onPlaybackPaused]"),xe.ended||(lt=!0,yt(N.PlayListTrace.USER_REQUEST_STOP_REASON))}function Je(){St||(St=setInterval(function(){!Le&&Re.getTimeToStreamEnd()<=0&&de.trigger(P.default.PLAYBACK_ENDED,{isLast:Ne().isLast})},J))}function ht(){St&&(clearInterval(St),St=null)}function Et(){Ct||(Ct=setInterval(function(){Dt()},ee))}function rt(){clearInterval(Ct),Ct=null}function Dt(){if(!(!pe||!kt(pe)))for(var xe=be(pe),et=0,Mt=function(){var nt=xe[et],It=et===0?pe:xe[et-1];if(!nt.getPreloadingScheduled()&&kt(It)&&we){var Ft=[o.default.VIDEO,o.default.AUDIO],Wt=!0;Ft.forEach(function(zt){var qt=b.getMediaInfoForType(nt.getStreamInfo(),zt),er=b.getVoRepresentations(qt);er.forEach(function(dr){var cr=b.getIsDynamic(),yr=ye.calcSegmentAvailabilityRange(dr,cr);yr.end<yr.start&&(Wt=!1)})}),Wt&&Kt(nt,It)}et+=1};et<xe.length;)Mt()}function kt(xe){try{if(!xe)return!1;var et=xe.getProcessors().filter(function(nt){return nt.getType()===o.default.AUDIO||nt.getType()===o.default.VIDEO});if(!et||et.length===0)return!1;var Mt=et.filter(function(nt){return!nt.isBufferingCompleted()});return Mt&&Mt.length===0}catch(nt){return!1}}function ft(){var xe=Ne().isLast;we&&xe&&(X.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),d.signalEndOfStream(we))}function Gt(xe,et){try{return ze.get().streaming.reuseExistingSourceBuffers&&et.isProtectionCompatible(xe,et)&&(He||et.isMediaCodecCompatible(xe,et))&&!Vt(xe)}catch(Mt){return!1}}function Kt(xe){var et=arguments.length<=1||arguments[1]===void 0?null:arguments[1];if(we&&!xe.getPreloaded()){var Mt=Gt(xe,et);Mt&&(xe.setPreloadingScheduled(!0),X.info("[onStreamCanLoadNext] Preloading next stream with id "+xe.getId()),tt=!0,xe.preload(we,wt),We.push(xe),xe.getProcessors().forEach(function(nt){nt.setBufferingTime(xe.getStartTime())}))}}function Vt(xe){try{var et=xe.getStreamInfo(),Mt=b.getAdaptationForType(et.index,o.default.FRAGMENTED_TEXT,et);return Mt?Mt.codecs.indexOf("stpp")!==-1||Mt.codecs.indexOf("wvtt")!==-1:!1}catch(nt){return!1}}function Pt(xe){if(isNaN(xe))return null;var et=0,Mt=null,nt=_e.length;nt>0&&(et+=_e[0].getStartTime());for(var It=0;It<nt;It++)if(Mt=_e[It],et=parseFloat((et+Mt.getDuration()).toFixed(5)),xe<et)return Mt;return null}function Ee(xe,et){for(var Mt=null,nt=0,It=0,Ft=null,Wt=0;Wt<_e.length;Wt++){if(Mt=_e[Wt],It=Mt.getStartTime(),Ft=Mt.getDuration(),Number.isFinite(It)&&(nt=It),Mt.getId()===et)return xe-nt;Number.isFinite(Ft)&&(nt+=Ft)}return null}function Z(){return pe?pe.getProcessors():[]}function Ae(xe){if(!pe.getIsEndedEventSignaled()){pe.setIsEndedEventSignaled(!0);var et=Te();et?(X.debug("StreamController onEnded, found next stream with id "+et.getStreamInfo().id),Oe(et,pe,NaN)):(X.debug("StreamController no next stream found"),pe.setIsEndedEventSignaled(!1)),yt(et?N.PlayListTrace.END_OF_PERIOD_STOP_REASON:N.PlayListTrace.END_OF_CONTENT_STOP_REASON),tt=!1}xe&&xe.isLast&&ht()}function Te(){var xe=arguments.length<=0||arguments[0]===void 0?null:arguments[0],et=xe||pe||null;if(et){for(var Mt=et.getStreamInfo().start,nt=et.getStreamInfo().duration,It=parseFloat((Mt+nt).toFixed(5)),Ft=0,Wt=-1,zt=NaN;Ft<_e.length;){var qt=_e[Ft],er=qt.getStreamInfo().start-It;er>=0&&(isNaN(zt)||er<zt)&&(zt=er,Wt=Ft),Ft+=1}return Wt>=0?_e[Wt]:null}return null}function be(xe){try{var et=xe||pe||null;if(et){var Mt=function(){var nt=et.getStreamInfo().start;return{v:_e.filter(function(It){return It.getStreamInfo().start>nt})}}();if(typeof Mt=="object")return Mt.v}}catch(nt){return[]}}function Oe(xe,et,Mt){if(!(Le||!xe||et===xe&&xe.isActive())){Le=!0,de.trigger(P.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:et?et.getStreamInfo():null,toStreamInfo:xe.getStreamInfo()});var nt=!1;et&&(nt=Gt(xe,et),et.deactivate(nt)),Mt=isNaN(Mt)?!nt&&et?xe.getStreamInfo().start:NaN:Mt,X.info("Switch to stream "+xe.getId()+". Seektime is "+Mt+", current playback time is "+Re.getTime()),X.info("Seamless period switch is set to "+nt),pe=xe,We=We.filter(function(It){return It.getId()!==pe.getId()}),Re.initialize(Ne(),!!et,Mt),at.getElement()?Tt(Mt,et===null,!1,nt):st(Mt,nt),tt=!1}}function Qe(xe){pe&&(Re.initialize(Ne()),Tt(xe,!1,!0,!1))}function Tt(xe,et,Mt,nt){var It=void 0;function Ft(){!we||we.readyState!=="open"||(X.debug("MediaSource is open!"),window.URL.revokeObjectURL(It),we.removeEventListener("sourceopen",Ft),we.removeEventListener("webkitsourceopen",Ft),bt(),et||de.trigger(P.default.SOURCE_INITIALIZED),Mt?pe.setMediaSource(we):st(xe,nt))}we?nt?(st(xe,nt),et||de.trigger(P.default.SOURCE_INITIALIZED)):(d.detachMediaSource(at),we.addEventListener("sourceopen",Ft,!1),we.addEventListener("webkitsourceopen",Ft,!1),It=d.attachMediaSource(we,at),X.debug("MediaSource attached to element. Waiting on open...")):(we=d.createMediaSource(),we.addEventListener("sourceopen",Ft,!1),we.addEventListener("webkitsourceopen",Ft,!1),It=d.attachMediaSource(we,at),X.debug("MediaSource attached to element. Waiting on open..."))}function dt(){return pe}function st(xe,et){if(wt=pe.activate(we,et?wt:void 0),wt){var Mt=Object.keys(wt);Mt.length>0&&wt[Mt[0]].changeType&&(He=!0)}ct||isNaN(xe)||(xe===Re.getTime()?de.trigger(P.default.SEEK_TARGET,{time:xe},{streamId:pe.getId()}):Re.seek(xe)),(Fe||!ct)&&Re.play(),Le=!1,de.trigger(P.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ne()})}function bt(xe){var et=xe||Ne().manifestInfo.duration;d.setDuration(we,et)}function Yt(xe){for(var et=0,Mt=_e.length;et<Mt;et++)if(_e[et].getId()===xe.id)return _e[et];return null}function xt(){try{(function(){var xe=b.getStreamsInfo();if(xe.length===0)throw new Error("There are no streams");l.updateManifestUpdateInfo({currentTime:Re.getTime(),buffered:at.getBufferRange(),presentationStartTime:xe[0].start,clientTimeOffset:ye.getClientTimeOffset()}),_e.length>0&&(_e=_e.filter(function(dr){var cr=xe.filter(function(tn){return tn.id===dr.getId()}).length>0,yr=cr||dr.getId()===pe.getId();return yr||X.debug("Removing stream "+dr.getId()),yr}));for(var et=0,Mt=xe.length;et<Mt;et++){var nt=xe[et],It=Yt(nt);It?It.updateData(nt):(It=(0,m.default)(me).create({manifestModel:E,mediaPlayerModel:Xe,dashMetrics:l,manifestUpdater:G,adapter:b,timelineConverter:ye,capabilities:j,capabilitiesFilter:le,errHandler:he,baseURLController:V,abrController:te,playbackController:Re,eventController:ae,mediaController:$,textController:ne,protectionController:De,videoModel:at,streamInfo:nt,settings:ze}),_e.push(It),It.initialize()),l.addManifestUpdateStreamInfo(nt)}if(!pe){if(b.getIsDynamic()&&_e.length){var Ft=xe[0].manifestInfo,Wt=Xt(xe,Ft);Re.computeAndSetLiveDelay(Wt,Ft.DVRWindowSize,Ft.minBufferTime)}var zt=null,qt=Re.getStartTimeFromUriParameters(b.getIsDynamic());zt=Pt(qt),!zt&&b.getIsDynamic()&&_e.length&&(X.debug("Dynamic stream: Trying to find the correct starting period"),zt=Qt());var er=zt!==null?zt:_e[0];Oe(er,null,NaN),Je(),Et()}de.trigger(P.default.STREAMS_COMPOSED)})()}catch(xe){he.error(new Y.default(ue.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,xe.message+"nostreamscomposed",E.getValue())),Ge=!0,Lt()}}function Qt(){try{var xe=ye.calcPresentationTimeFromWallTime(new Date,b.getRegularPeriods()[0]),et=Re.getLiveDelay(),Mt=xe-et;return Pt(Mt)}catch(nt){return null}}function Xt(xe,et){try{var Mt=NaN;return et&&!isNaN(et.maxFragmentDuration)&&isFinite(et.maxFragmentDuration)?et.maxFragmentDuration:(xe&&xe.length===1&&function(){var nt=xe[0],It=[o.default.VIDEO,o.default.AUDIO,o.default.FRAGMENTED_TEXT],Ft=It.reduce(function(Wt,zt){var qt=b.getMediaInfoForType(nt,zt);return qt&&Wt.push(qt),Wt},[]).reduce(function(Wt,zt){var qt=b.getVoRepresentations(zt);return qt&&qt.length>0&&qt.forEach(function(er){er&&Wt.push(er)}),Wt},[]).reduce(function(Wt,zt){var qt=b.convertDataToRepresentationInfo(zt);return qt&&qt.fragmentDuration&&!isNaN(qt.fragmentDuration)&&Wt.push(qt.fragmentDuration),Wt},[]);Mt=Math.max.apply(Math,p(Ft))}(),isFinite(Mt)?Mt:NaN)}catch(nt){return NaN}}function Ut(){var xe=E.getValue();De&&(de.trigger(P.default.PROTECTION_CREATED,{controller:De,manifest:xe}),De.setMediaElement(at.getElement()),je&&De.setProtectionData(je)),xt()}function Zt(xe){xe.error?(Ge=!0,Lt()):function(){var et=xe.manifest;b.updatePeriods(et);var Mt=b.getUTCTimingSources();b.getIsDynamic()&&(!Mt||Mt.length===0)&&de.trigger(O.default.CONFORMANCE_VIOLATION,{level:se.default.LEVELS.WARNING,event:se.default.EVENTS.NO_UTC_TIMING_ELEMENT});var nt=b.getIsDynamic()?Mt.concat(Xe.getUTCTimingSources()):Mt,It=Ie.isHTTPS(xe.manifest.url);nt.forEach(function(Ft){Ft.value.replace(/.*?:\/\//g,"")===Xe.getDefaultUtcTimingSource().value.replace(/.*?:\/\//g,"")&&(Ft.value=Ft.value.replace(It?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),It?"https://":"http://"),X.debug("Matching default timing source protocol to manifest protocol: ",Ft.value))}),V.initialize(et),y.attemptSync(nt)}()}function qe(){return pe?pe.getHasVideoTrack():!1}function ot(){return pe?pe.getHasAudioTrack():!1}function yt(xe,et){et=et||new Date,Z().forEach(function(Mt){Mt.finalisePlayList(et,xe)}),l.addPlayList()}function Ke(xe){l.createPlaylistMetrics(Re.getTime()*1e3,xe)}function it(xe){if(!!xe.error){var et="";switch(xe.error.code){case 1:et="MEDIA_ERR_ABORTED";break;case 2:et="MEDIA_ERR_NETWORK";break;case 3:et="MEDIA_ERR_DECODE";break;case 4:et="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:et="MEDIA_ERR_ENCRYPTED";break;default:et="UNKNOWN";break}Ve=!0,xe.error.message&&(et+=" ("+xe.error.message+")"),xe.error.msExtendedCode&&(et+=" (0x"+(xe.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),X.fatal("Video Element Error: "+et),xe.error&&X.fatal(xe.error),he.error(new Y.default(xe.error.code,et)),Lt()}}function Ne(){return pe?pe.getStreamInfo():null}function S(){return Le}function z(){return Ve||Ge}function F(xe){return _e.filter(function(et){return et.getId()===xe})[0]}function q(){if(!c||!c.hasOwnProperty("load")||!ye||!ye.hasOwnProperty("initialize")||!ye.hasOwnProperty("reset")||!ye.hasOwnProperty("getClientTimeOffset")||!E||!he||!l||!Re)throw new Error(o.default.MISSING_CONFIG_ERROR)}function fe(){if(!G||!G.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}function ge(xe){q(),c.load(xe)}function Me(xe){fe(),G.setManifest(xe)}function ke(xe){isNaN(xe.newDuration)||bt(xe.newDuration)}function $e(xe){!xe||(xe.capabilities&&(j=xe.capabilities),xe.capabilitiesFilter&&(le=xe.capabilitiesFilter),xe.manifestLoader&&(c=xe.manifestLoader),xe.manifestModel&&(E=xe.manifestModel),xe.mediaPlayerModel&&(Xe=xe.mediaPlayerModel),xe.protectionController&&(De=xe.protectionController),xe.adapter&&(b=xe.adapter),xe.dashMetrics&&(l=xe.dashMetrics),xe.errHandler&&(he=xe.errHandler),xe.timelineConverter&&(ye=xe.timelineConverter),xe.videoModel&&(at=xe.videoModel),xe.playbackController&&(Re=xe.playbackController),xe.abrController&&(te=xe.abrController),xe.mediaController&&($=xe.mediaController),xe.textController&&(ne=xe.textController),xe.settings&&(ze=xe.settings),xe.baseURLController&&(V=xe.baseURLController))}function gt(xe){je=xe}function Nt(){_e=[],De=null,Le=!1,pe=null,Ve=!1,Ge=!1,ct=!0,lt=!1,Fe=!0,St=null,tt=!1,Ct=null,mt=!1,We=[]}function Lt(){q(),y.reset(),yt(Ve||Ge?N.PlayListTrace.FAILURE_STOP_REASON:N.PlayListTrace.USER_REQUEST_STOP_REASON);for(var xe=0,et=_e?_e.length:0;xe<et;xe++){var Mt=_e[xe];Mt.reset(Ve)}Ce(),V.reset(),G.reset(),ae.reset(),l.clearAllCurrentMetrics(),E.setValue(null),c.reset(),ye.reset(),Se.reset(),we&&(d.detachMediaSource(at),we=null),at=null,De&&(De.setMediaElement(null),De=null,je=null,E.getValue()&&de.trigger(P.default.PROTECTION_DESTROYED,{data:E.getValue().url})),ht(),rt(),de.trigger(P.default.STREAM_TEARDOWN_COMPLETE),Nt()}function At(xe){if(xe.metric===f.default.DVR_INFO){var et=ot()?o.default.AUDIO:o.default.VIDEO;xe.mediaType===et&&d.setSeekable(we,xe.value.range.start,xe.value.range.end)}}function Ht(){return _e}return Q={initialize:pt,getActiveStreamInfo:Ne,hasVideoTrack:qe,hasAudioTrack:ot,switchToVideoElement:Qe,getStreamById:F,getStreamForTime:Pt,getTimeRelativeToStreamId:Ee,load:ge,loadWithManifest:Me,getActiveStreamProcessors:Z,setConfig:$e,setProtectionData:gt,getIsStreamSwitchInProgress:S,getHasMediaOrIntialisationError:z,hasStreamFinishedBuffering:kt,getStreams:Ht,getActiveStream:dt,reset:Lt},vt(),Q}ie.__dashjs_factory_name="StreamController",r.default=H.default.getSingletonFactory(ie),g.exports=r.default},{"102":102,"104":104,"108":108,"111":111,"112":112,"113":113,"119":119,"123":123,"127":127,"227":227,"234":234,"239":239,"257":257,"45":45,"46":46,"47":47,"51":51,"54":54}],127:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(L){return L&&L.__esModule?L:{default:L}}var p=e(239),i=t(p),o=e(255),n=e(46),f=t(n),h=e(54),m=t(h),u=e(51),_=t(u),C=e(47),k=t(C),R=e(45),P=t(R),w=e(234),H=t(w),N=5e3,A=100,M=2,I=2,D=30,v=30,T=600,W=2;function O(){var L=this.context,K=(0,f.default)(L).getInstance(),x=(0,H.default)(L).getInstance(),U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0;function j(){Y=(0,P.default)(L).getInstance().getLogger(U),K.on(m.default.ATTEMPT_BACKGROUND_SYNC,b,U)}function le(Ge){!Ge||(Ge.dashMetrics&&(ce=Ge.dashMetrics),Ge.baseURLController&&(X=Ge.baseURLController),Ge.settings&&(re=Ge.settings))}function G(){se=[],J=[],ee=null,ie=null,de=null,me=NaN,oe=!1,ue=!1,Q=re.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function c(){G(),ve={"urn:mpeg:dash:utc:http-head:2014":_e,"urn:mpeg:dash:utc:http-xsdate:2014":ye.bind(null,ae),"urn:mpeg:dash:utc:http-iso:2014":ye.bind(null,ne),"urn:mpeg:dash:utc:direct:2014":he,"urn:mpeg:dash:utc:http-head:2012":_e,"urn:mpeg:dash:utc:http-xsdate:2012":ye.bind(null,ae),"urn:mpeg:dash:utc:http-iso:2012":ye.bind(null,ne),"urn:mpeg:dash:utc:direct:2012":he,"urn:mpeg:dash:utc:http-ntp:2014":Ie,"urn:mpeg:dash:utc:ntp:2014":Ie,"urn:mpeg:dash:utc:sntp:2014":Ie}}function E(Ge){if(J=Ge,!oe){if(!V()){K.trigger(m.default.TIME_SYNCHRONIZATION_COMPLETED);return}oe=!0,d()}}function b(){if(!(oe||ue||!de||!de.value||!de.schemeIdUri||isNaN(me)||isNaN(re.get().streaming.utcSynchronization.backgroundAttempts))&&!(ie&&(Date.now()-ie)/1e3<v)){se=[],ue=!0;var Ge=isNaN(re.get().streaming.utcSynchronization.backgroundAttempts)?I:re.get().streaming.utcSynchronization.backgroundAttempts;l(Ge)}}function l(Ge){try{var we=function(){if(Ge<=0)return Fe(),{v:void 0};var at=Date.now();ve[de.schemeIdUri](de.value,function(Re){var Xe=Date.now(),lt=y(at,Xe,Re);se.push(lt),l(Ge-1)},function(){Fe()})}();if(typeof we=="object")return we.v}catch(at){Fe()}}function d(){var Ge=arguments.length<=0||arguments[0]===void 0?null:arguments[0],we=Ge||0;if(!J||J.length===0||we>=J.length){te();return}var at=J[we];at?ve.hasOwnProperty(at.schemeIdUri)?function(){var Re=new Date().getTime();ve[at.schemeIdUri](at.value,function(Xe){var lt=new Date().getTime(),ct=y(Re,lt,Xe);de=at,te(ct)},function(){d(we+1)})}():d(we+1):te()}function y(Ge,we,at){var Re=we-(we-Ge)/2;return at-Re}function V(){try{var Ge=isNaN(Q)?D:Q;return!ee||!Ge||isNaN(Ge)?!0:(Date.now()-ee)/1e3>=Ge}catch(we){return!0}}function te(){var Ge=arguments.length<=0||arguments[0]===void 0?NaN:arguments[0],we=isNaN(Ge);we&&re.get().streaming.useManifestDateHeaderTimeSource?pe():De(we,Ge)}function $(Ge){var we=60,at=60,Re=1e3,Xe=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/,lt=void 0,ct=void 0,tt=Xe.exec(Ge);return lt=Date.UTC(parseInt(tt[1],10),parseInt(tt[2],10)-1,parseInt(tt[3],10),parseInt(tt[4],10),parseInt(tt[5],10),tt[6]&&(parseInt(tt[6],10)||0),tt[7]&&parseFloat(tt[7])*Re||0),tt[9]&&tt[10]&&(ct=parseInt(tt[9],10)*at+parseInt(tt[10],10),lt+=(tt[8]==="+"?-1:1)*ct*we*Re),new Date(lt).getTime()}function ae(Ge){var we=Date.parse(Ge);return isNaN(we)&&(we=$(Ge)),we}function ne(Ge){return Date.parse(Ge)}function Se(Ge){return Date.parse(Ge)}function Ie(Ge,we,at){at()}function he(Ge,we,at){var Re=ae(Ge);if(!isNaN(Re)){we(Re);return}at()}function ye(Ge,we,at,Re,Xe){var lt=void 0,ct=void 0,tt=!1,St=new XMLHttpRequest,Ct=Xe?o.HTTPRequest.HEAD:o.HTTPRequest.GET,wt=we.match(/\S+/g);if(we=wt.shift(),lt=function(){tt||(tt=!0,wt.length?ye(Ge,wt.join(" "),at,Re,Xe):Re())},ct=function(){var He=void 0,ze=void 0;St.status===200&&(He=Xe?St.getResponseHeader("Date"):St.response,ze=Ge(He),isNaN(ze)||(at(ze),tt=!0))},x.isRelative(we)){var We=X.resolve();We&&(we=x.resolve(we,We.url))}St.open(Ct,we),St.timeout=N||0,St.onload=ct,St.onloadend=lt,St.send()}function _e(Ge,we,at){ye(Se,Ge,we,at,!0)}function pe(){var Ge=ce.getLatestMPDRequestHeaderValueByID("Date"),we=Ge!==null?new Date(Ge).getTime():Number.NaN;if(isNaN(we))De(!0);else{var at=we-Date.now();De(!1,at)}}function De(Ge,we){if(!isNaN(me)&&!isNaN(we)&&!Ge&&je(we),!Ge&&!isNaN(we)){ee=Date.now(),oe=!1;var at=isNaN(me);me=we,at&&b(),Y.debug("Completed UTC sync. Setting client - server offset to "+we)}Ge&&(de=null),K.trigger(m.default.UPDATE_TIME_SYNC_OFFSET,{offset:we,error:Ge?new i.default(_.default.TIME_SYNC_FAILED_ERROR_CODE,_.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null}),K.trigger(m.default.TIME_SYNCHRONIZATION_COMPLETED)}function je(Ge){try{var we=Le(Ge),at=isNaN(Q)?D:Q,Re=isNaN(re.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?M:re.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,Xe=isNaN(re.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?T:re.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,lt=isNaN(re.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?W:re.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts,ct=void 0;we?(ct=Math.min(at*Re,Xe),Y.debug("Increasing timeBetweenSyncAttempts to "+ct)):(ct=Math.max(at/Re,lt),Y.debug("Decreasing timeBetweenSyncAttempts to "+ct)),Q=ct}catch(tt){}}function Fe(){if(!(!se||se.length===0)){var Ge=se.reduce(function(we,at){return we+at},0)/se.length;Le(Ge)?Y.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(Y.debug("Completed background UTC sync. Setting client - server offset to "+Ge),me=Ge,K.trigger(m.default.UPDATE_TIME_SYNC_OFFSET,{offset:me})),ue=!1,ie=Date.now()}}function Le(Ge){try{if(isNaN(me))return!0;var we=re.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(re.get().streaming.utcSynchronization.maximumAllowedDrift)?re.get().streaming.utcSynchronization.maximumAllowedDrift:A,at=me-we,Re=me+we;return Ge>=at&&Ge<=Re}catch(Xe){return!0}}function Ve(){G(),K.off(m.default.ATTEMPT_BACKGROUND_SYNC,b,U)}return U={initialize:c,attemptSync:E,setConfig:le,reset:Ve},j(),U}O.__dashjs_factory_name="TimeSyncController";var B=k.default.getSingletonFactory(O);B.HTTP_TIMEOUT_MS=N,k.default.updateSingletonFactory(O.__dashjs_factory_name,B),r.default=B,g.exports=r.default},{"234":234,"239":239,"255":255,"45":45,"46":46,"47":47,"51":51,"54":54}],128:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(I){return I&&I.__esModule?I:{default:I}}var p=e(110),i=t(p),o=e(46),n=t(o),f=e(54),h=t(f),m=e(47),u=t(m),_=e(3),C=t(_),k=e(234),R=t(k),P=e(61),w=t(P),H="onLoad",N="onActuate",A="urn:mpeg:dash:resolve-to-zero:2013";function M(I){I=I||{};var D=this.context,v=(0,n.default)(D).getInstance(),T=(0,R.default)(D).getInstance(),W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0;function U(){v.on(h.default.XLINK_ELEMENT_LOADED,ce,W),x=(0,i.default)(D).create({errHandler:I.errHandler,dashMetrics:I.dashMetrics,mediaPlayerModel:I.mediaPlayerModel,requestModifier:I.requestModifier,settings:I.settings})}function Y(Q){Q&&(O=Q)}function oe(Q){Q&&(B=Q)}function ue(Q){var X=void 0;K=new C.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:O}),L=Q,L.Period_asArray?(X=J(L.Period_asArray,L,w.default.PERIOD,H),ve(X,w.default.PERIOD,H)):v.trigger(h.default.XLINK_READY,{manifest:L})}function re(){v.off(h.default.XLINK_ELEMENT_LOADED,ce,W),x&&(x.reset(),x=null)}function ve(Q,X,j){var le={},G=void 0,c=void 0;le.elements=Q,le.type=X,le.resolveType=j,le.elements.length===0&&se(le);for(var E=0;E<le.elements.length;E++)G=le.elements[E],T.isHTTPURL(G.url)?c=G.url:c=G.originalContent.BaseURL+G.url,x.load(c,G,le)}function ce(Q){var X=void 0,j=void 0,le="<response>",G="</response>",c="";if(X=Q.element,j=Q.resolveObject,X.resolvedContent){var E=0;X.resolvedContent.indexOf("<?xml")===0&&(E=X.resolvedContent.indexOf("?>")+2),c=X.resolvedContent.substr(0,E)+le+X.resolvedContent.substr(E)+G,X.resolvedContent=K.xml_str2json(c)}me(j)&&se(j)}function se(Q){var X=[],j=void 0,le=void 0;if(ee(Q),Q.resolveType===N&&v.trigger(h.default.XLINK_READY,{manifest:L}),Q.resolveType===H)switch(Q.type){case w.default.PERIOD:for(j=0;j<L[w.default.PERIOD+"_asArray"].length;j++)le=L[w.default.PERIOD+"_asArray"][j],le.hasOwnProperty(w.default.ADAPTATION_SET+"_asArray")&&(X=X.concat(J(le[w.default.ADAPTATION_SET+"_asArray"],le,w.default.ADAPTATION_SET,H))),le.hasOwnProperty(w.default.EVENT_STREAM+"_asArray")&&(X=X.concat(J(le[w.default.EVENT_STREAM+"_asArray"],le,w.default.EVENT_STREAM,H)));ve(X,w.default.ADAPTATION_SET,H);break;case w.default.ADAPTATION_SET:v.trigger(h.default.XLINK_READY,{manifest:L});break}}function J(Q,X,j,le){var G=[],c=void 0,E=void 0,b=void 0;for(E=Q.length-1;E>=0;E--)c=Q[E],c.hasOwnProperty("xlink:href")&&c["xlink:href"]===A&&Q.splice(E,1);for(E=0;E<Q.length;E++)c=Q[E],c.hasOwnProperty("xlink:href")&&c.hasOwnProperty("xlink:actuate")&&c["xlink:actuate"]===le&&(b=ie(c["xlink:href"],X,j,E,le,c),G.push(b));return G}function ee(Q){var X=[],j=void 0,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0;for(c=Q.elements.length-1;c>=0;c--){if(j=Q.elements[c],le=j.type+"_asArray",!j.resolvedContent||de())delete j.originalContent["xlink:actuate"],delete j.originalContent["xlink:href"],X.push(j.originalContent);else if(j.resolvedContent)for(E=0;E<j.resolvedContent[le].length;E++)G=j.resolvedContent[le][E],X.push(G);for(j.parentElement[le].splice(j.index,1),b=0;b<X.length;b++)j.parentElement[le].splice(j.index+b,0,X[b]);X=[]}Q.elements.length>0&&B.run(L)}function ie(Q,X,j,le,G,c){return{url:Q,parentElement:X,type:j,index:le,resolveType:G,originalContent:c,resolvedContent:null,resolved:!1}}function me(Q){var X=void 0,j=void 0;for(X=0;X<Q.elements.length;X++)if(j=Q.elements[X],j.resolved===!1)return!1;return!0}function de(){return!1}return W={resolveManifestOnLoad:ue,setMatchers:Y,setIron:oe,reset:re},U(),W}M.__dashjs_factory_name="XlinkController",r.default=u.default.getClassFactory(M),g.exports=r.default},{"110":110,"234":234,"3":3,"46":46,"47":47,"54":54,"61":61}],129:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(143),i=t(p),o=e(130),n=t(o),f=e(131),h=t(f),m=e(136),u=t(m),_=e(141),C=t(_);function k(){var P=this.context,w=void 0,H=void 0;function N(I){return H=(0,i.default)(P).getInstance({eventBus:I.eventBus,dashMetrics:I.dashMetrics,metricsConstants:I.metricsConstants,events:I.events}),(0,h.default)(P).create(I)}function A(){return(0,C.default)(P).getInstance()}function M(){return(0,u.default)(P).getInstance()}return w={createMetricsReporting:N,getReportingFactory:A,getMetricsHandlerFactory:M},w}k.__dashjs_factory_name="MetricsReporting";var R=dashjs.FactoryMaker.getClassFactory(k);R.events=n.default,dashjs.FactoryMaker.updateClassFactory(k.__dashjs_factory_name,R),r.default=R,g.exports=r.default},{"130":130,"131":131,"136":136,"141":141,"143":143}],130:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(55),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",this.CMCD_DATA_GENERATED="cmcdDataGenerated"}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"55":55}],131:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(132),i=t(p),o=e(145),n=t(o),f=e(130),h=t(f);function m(u){u=u||{};var _=void 0,C={},k=this.context,R=u.eventBus,P=u.events;function w(M){if(!M.error){var I=Object.keys(C),D=(0,n.default)(k).getInstance({adapter:u.adapter,constants:u.constants}).getMetrics(M.manifest);D.forEach(function(v){var T=JSON.stringify(v);if(C.hasOwnProperty(T))I.splice(T,1);else try{var W=(0,i.default)(k).create(u);W.initialize(v),C[T]=W}catch(O){}}),I.forEach(function(v){C[v].reset(),delete C[v]}),R.trigger(h.default.METRICS_INITIALISATION_COMPLETE)}}function H(){Object.keys(C).forEach(function(M){C[M].reset()}),C={}}function N(){R.on(P.MANIFEST_UPDATED,w,_),R.on(P.STREAM_TEARDOWN_COMPLETE,H,_)}function A(){R.off(P.MANIFEST_UPDATED,w,_),R.off(P.STREAM_TEARDOWN_COMPLETE,H,_)}return _={reset:A},N(),_}m.__dashjs_factory_name="MetricsCollectionController",r.default=dashjs.FactoryMaker.getClassFactory(m),g.exports=r.default},{"130":130,"132":132,"145":145}],132:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(134),i=t(p),o=e(135),n=t(o),f=e(133),h=t(f);function m(u){u=u||{};var _=void 0,C=void 0,k=void 0,R=void 0,P=this.context;function w(N){try{k=(0,i.default)(P).create({mediaElement:u.mediaElement}),k.initialize(N.Range),C=(0,n.default)(P).create({debug:u.debug,metricsConstants:u.metricsConstants}),C.initialize(N.Reporting,k),_=(0,h.default)(P).create({debug:u.debug,eventBus:u.eventBus,metricsConstants:u.metricsConstants,events:u.events}),_.initialize(N.metrics,C)}catch(A){throw H(),A}}function H(){_&&_.reset(),C&&C.reset(),k&&k.reset()}return R={initialize:w,reset:H},R}m.__dashjs_factory_name="MetricsController",r.default=dashjs.FactoryMaker.getClassFactory(m),g.exports=r.default},{"133":133,"134":134,"135":135}],133:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(136),i=t(p);function o(n){n=n||{};var f=[],h=void 0,m=this.context,u=n.eventBus,_=n.events,C=(0,i.default)(m).getInstance({debug:n.debug,eventBus:n.eventBus,metricsConstants:n.metricsConstants});function k(w){f.forEach(function(H){H.handleNewMetric(w.metric,w.value,w.mediaType)})}function R(w,H){w.split(",").forEach(function(N,A,M){var I=void 0;if(N.indexOf("(")!==-1&&N.indexOf(")")===-1){var D=M[A+1];D&&D.indexOf("(")===-1&&D.indexOf(")")!==-1&&(N+=","+D,delete M[A+1])}I=C.create(N,H),I&&f.push(I)}),u.on(_.METRIC_ADDED,k,h),u.on(_.METRIC_UPDATED,k,h)}function P(){u.off(_.METRIC_ADDED,k,h),u.off(_.METRIC_UPDATED,k,h),f.forEach(function(w){return w.reset()}),f=[]}return h={initialize:R,reset:P},h}o.__dashjs_factory_name="MetricsHandlersController",r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"136":136}],134:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(222),i=t(p);function o(n){n=n||{};var f=!1,h=this.context,m=void 0,u=void 0,_=n.mediaElement;function C(w){w&&w.length&&(w.forEach(function(H){var N=H.starttime,A=N+H.duration;u.add(N,A)}),f=!!w[0]._useWallClockTime)}function k(){u.clear()}function R(){u=(0,i.default)(h).create()}function P(){var w=u.length,H=void 0;if(!w)return!0;H=f?new Date().getTime()/1e3:_.currentTime;for(var N=0;N<w;N+=1){var A=u.start(N),M=u.end(N);if(A<=H&&H<M)return!0}return!1}return m={initialize:C,reset:k,isEnabled:P},R(),m}o.__dashjs_factory_name="RangeController",r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"222":222}],135:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(141),i=t(p);function o(n){var f=[],h=void 0,m=(0,i.default)(this.context).getInstance(n);function u(k,R){k.some(function(P){var w=m.create(P,R);if(w)return f.push(w),!0})}function _(){f.forEach(function(k){return k.reset()}),f=[]}function C(k,R){f.forEach(function(P){return P.report(k,R)})}return h={initialize:u,reset:_,report:C},h}o.__dashjs_factory_name="ReportingController",r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"141":141}],136:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(C){return C&&C.__esModule?C:{default:C}}var p=e(137),i=t(p),o=e(138),n=t(o),f=e(140),h=t(f),m=e(139),u=t(m);function _(C){C=C||{};var k=void 0,R=C.debug?C.debug.getLogger(k):{},P=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,w=this.context,H={BufferLevel:i.default,DVBErrors:n.default,HttpList:h.default,PlayList:u.default,RepSwitchList:u.default,TcpList:u.default};function N(I,D){var v=I.match(P),T;if(!!v){try{T=H[v[1]](w).create({eventBus:C.eventBus,metricsConstants:C.metricsConstants}),T.initialize(v[1],D,v[3],v[5])}catch(W){T=null,R.error("MetricsHandlerFactory: Could not create handler for type "+v[1]+" with args "+v[3]+", "+v[5]+" ("+W.message+")")}return T}}function A(I,D){H[I]=D}function M(I){delete H[I]}return k={create:N,register:A,unregister:M},k}_.__dashjs_factory_name="MetricsHandlerFactory",r.default=dashjs.FactoryMaker.getSingletonFactory(_),g.exports=r.default},{"137":137,"138":138,"139":139,"140":140}],137:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(144),i=t(p);function o(n){n=n||{};var f=void 0,h=void 0,m=void 0,u=void 0,_=void 0,C=void 0,k=this.context,R=(0,i.default)(k).getInstance(),P=[],w=n.metricsConstants;function H(){try{return Object.keys(P).map(function(D){return P[D]}).reduce(function(D,v){return D.level<v.level?D:v})}catch(D){return}}function N(){var D=H();D&&C!==D.t&&(C=D.t,h.report(u,D))}function A(D,v,T){v&&(m=R.validateN(T),h=v,u=R.reconstructFullMetricName(D,T),_=setInterval(N,m))}function M(){clearInterval(_),_=null,m=0,h=null,C=null}function I(D,v,T){D===w.BUFFER_LEVEL&&(P[T]=v)}return f={initialize:A,reset:M,handleNewMetric:I},f}o.__dashjs_factory_name="BufferLevelHandler",r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"144":144}],138:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(130),i=t(p);function o(n){n=n||{};var f=void 0,h=void 0,m=n.eventBus,u=n.metricsConstants;function _(){m.off(i.default.METRICS_INITIALISATION_COMPLETE,_,this),m.trigger(i.default.BECAME_REPORTING_PLAYER)}function C(P,w){w&&(h=w,m.on(i.default.METRICS_INITIALISATION_COMPLETE,_,this))}function k(){h=null}function R(P,w){P===u.DVB_ERRORS&&h&&h.report(P,w)}return f={initialize:C,reset:k,handleNewMetric:R},f}r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"130":130}],139:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){var p=void 0,i=void 0,o=void 0;function n(m,u){i=m,o=u}function f(){o=null,i=void 0}function h(m,u){m===i&&o&&o.report(i,u)}return p={initialize:n,reset:f,handleNewMetric:h},p}t.__dashjs_factory_name="GenericMetricHandler",r.default=dashjs.FactoryMaker.getClassFactory(t),g.exports=r.default},{}],140:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(144),i=t(p);function o(n){n=n||{};var f=void 0,h=void 0,m=void 0,u=void 0,_=void 0,C=void 0,k=[],R=(0,i.default)(this.context).getInstance(),P=n.metricsConstants;function w(){var M=k;M.length&&h&&h.report(_,M),k=[]}function H(M,I,D,v){I&&(m=R.validateN(D),h=I,v&&v.length&&(u=v),_=R.reconstructFullMetricName(M,D,v),C=setInterval(w,m))}function N(){clearInterval(C),C=null,m=null,u=null,k=[],h=null}function A(M,I){M===P.HTTP_REQUEST&&(!u||u===I.type)&&k.push(I)}return f={initialize:H,reset:N,handleNewMetric:A},f}o.__dashjs_factory_name="HttpListHandler",r.default=dashjs.FactoryMaker.getClassFactory(o),g.exports=r.default},{"144":144}],141:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(142),i=t(p);function o(n){n=n||{};var f={"urn:dvb:dash:reporting:2014":i.default},h=this.context,m=void 0,u=n.debug?n.debug.getLogger(m):{},_=n.metricsConstants;function C(P,w){var H=void 0;try{H=f[P.schemeIdUri](h).create({metricsConstants:_}),H.initialize(P,w)}catch(N){H=null,u.error("ReportingFactory: could not create Reporting with schemeIdUri "+P.schemeIdUri+" ("+N.message+")")}return H}function k(P,w){f[P]=w}function R(P){delete f[P]}return m={create:C,register:k,unregister:R},m}o.__dashjs_factory_name="ReportingFactory",r.default=dashjs.FactoryMaker.getSingletonFactory(o),g.exports=r.default},{"142":142}],142:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(146),i=t(p),o=e(147),n=t(o);function f(h){h=h||{};var m=void 0,u=this.context,_=void 0,C=void 0,k=void 0,R=void 0,P=void 0,w=void 0,H=!0,N=!0,A=[],M=h.metricsConstants;function I(){_=(0,i.default)(u).getInstance(),C=(0,n.default)(u).getInstance(),W()}function D(B,L,K){var x=new XMLHttpRequest,U=function(){var oe=A.indexOf(x);oe!==-1&&(A.splice(oe,1),x.status>=200&&x.status<300?L&&L():K&&K())};A.push(x);try{x.open("GET",B),x.onloadend=U,x.onerror=U,x.send()}catch(Y){x.onerror()}}function v(B,L){Array.isArray(L)||(L=[L]),R&&w.isEnabled()&&L.forEach(function(K){var x=_.serialise(K);H&&B!==M.DVB_ERRORS&&(x="metricname="+B+"&"+x),x=P+"?"+x,D(x,null,function(){R=!1})})}function T(B,L){var K=void 0;if(w=L,P=B.dvb_reportingUrl,!P)throw new Error("required parameter missing (dvb:reportingUrl)");k||(K=B.dvb_probability,K&&(K===1e3||K/1e3>=C.random())&&(R=!0),k=!0)}function W(){k=!1,R=!1,P=null,w=null}function O(){N||(A.forEach(function(B){return B.abort()}),A=[]),W()}return m={report:v,initialize:T,reset:O},I(),m}f.__dashjs_factory_name="DVBReporting",r.default=dashjs.FactoryMaker.getClassFactory(f),g.exports=r.default},{"146":146,"147":147}],143:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(148),i=t(p),o=e(130),n=t(o);function f(h){h=h||{};var m=void 0,u=void 0,_=h.eventBus,C=h.dashMetrics,k=h.metricsConstants,R=h.events;function P(T){var W=new i.default;if(!!u){for(var O in T)T.hasOwnProperty(O)&&(W[O]=T[O]);W.mpdurl||(W.mpdurl=u.originalUrl||u.url),W.terror||(W.terror=new Date),C.addDVBErrors(W)}}function w(T){T.error||(u=T.manifest)}function H(T){P({errorcode:i.default.BASE_URL_CHANGED,servicelocation:T.entry})}function N(){P({errorcode:i.default.BECAME_REPORTER})}function A(T){(T.responsecode===0||T.responsecode>=400||T.responsecode<100||T.responsecode>=600)&&P({errorcode:T.responsecode||i.default.CONNECTION_ERROR,url:T.url,terror:T.tresponse,servicelocation:T._serviceLocation})}function M(T){switch(T.metric){case k.HTTP_REQUEST:A(T.value);break;default:break}}function I(T){var W=T.error?T.error.code:0,O=void 0;switch(W){case MediaError.MEDIA_ERR_NETWORK:O=i.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:O=i.default.CORRUPT_MEDIA_OTHER;break;default:return}P({errorcode:O})}function D(){_.on(R.MANIFEST_UPDATED,w,m),_.on(R.SERVICE_LOCATION_BLACKLIST_CHANGED,H,m),_.on(R.METRIC_ADDED,M,m),_.on(R.METRIC_UPDATED,M,m),_.on(R.PLAYBACK_ERROR,I,m),_.on(n.default.BECAME_REPORTING_PLAYER,N,m)}function v(){_.off(R.MANIFEST_UPDATED,w,m),_.off(R.SERVICE_LOCATION_BLACKLIST_CHANGED,H,m),_.off(R.METRIC_ADDED,M,m),_.off(R.METRIC_UPDATED,M,m),_.off(R.PLAYBACK_ERROR,I,m),_.off(n.default.BECAME_REPORTING_PLAYER,N,m)}return m={initialise:D,reset:v},D(),m}f.__dashjs_factory_name="DVBErrorsTranslator",r.default=dashjs.FactoryMaker.getSingletonFactory(f),g.exports=r.default},{"130":130,"148":148}],144:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){return{reconstructFullMetricName:function(i,o,n){var f=i;return o&&(f+="("+o,n&&n.length&&(f+=","+n),f+=")"),f},validateN:function(i){if(!i)throw new Error("missing n");if(isNaN(i))throw new Error("n is NaN");if(i<0)throw new Error("n must be positive");return i}}}t.__dashjs_factory_name="HandlerHelpers",r.default=dashjs.FactoryMaker.getSingletonFactory(t),g.exports=r.default},{}],145:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(149),i=t(p),o=e(150),n=t(o),f=e(151),h=t(f);function m(u){u=u||{};var _=void 0,C=u.adapter,k=u.constants;function R(w,H,N){var A=void 0,M=void 0,I=0;return H?I=C.getAvailabilityStartTime(w)/1e3:(A=C.getRegularPeriods(w),A.length&&(I=A[0].start)),M=I,N&&N.hasOwnProperty(k.START_TIME)&&(M+=N.starttime),M}function P(w){var H=[];return w&&w.Metrics_asArray&&w.Metrics_asArray.forEach(function(N){var A=new i.default,M=C.getIsDynamic(w);if(N.hasOwnProperty("metrics"))A.metrics=N.metrics;else return;if(N.Range_asArray&&N.Range_asArray.forEach(function(I){var D=new n.default;D.starttime=R(w,M,I),I.hasOwnProperty("duration")?D.duration=I.duration:D.duration=C.getDuration(w),D._useWallClockTime=M,A.Range.push(D)}),N.Reporting_asArray)N.Reporting_asArray.forEach(function(I){var D=new h.default;if(I.hasOwnProperty(k.SCHEME_ID_URI))D.schemeIdUri=I.schemeIdUri;else return;I.hasOwnProperty("value")&&(D.value=I.value),I.hasOwnProperty(k.DVB_REPORTING_URL)&&(D.dvb_reportingUrl=I[k.DVB_REPORTING_URL]),I.hasOwnProperty(k.DVB_PROBABILITY)&&(D.dvb_probability=I[k.DVB_PROBABILITY]),A.Reporting.push(D)});else return;H.push(A)}),H}return _={getMetrics:P},_}m.__dashjs_factory_name="ManifestParsing",r.default=dashjs.FactoryMaker.getSingletonFactory(m),g.exports=r.default},{"149":149,"150":150,"151":151}],146:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){function p(i){var o=[],n=[],f=void 0,h=void 0;for(f in i)if(i.hasOwnProperty(f)&&f.indexOf("_")!==0){if(h=i[f],h==null&&(h=""),Array.isArray(h)){if(!h.length)continue;n=[],h.forEach(function(m){var u=Object.prototype.toString.call(m).slice(8,-1)!=="Object";n.push(u?m:p(m))}),h=n.map(encodeURIComponent).join(",")}else typeof h=="string"?h=encodeURIComponent(h):h instanceof Date?h=h.toISOString():typeof h=="number"&&(h=Math.round(h));o.push(f+"="+h)}return o.join("&")}return{serialise:p}}t.__dashjs_factory_name="MetricSerialiser",r.default=dashjs.FactoryMaker.getSingletonFactory(t),g.exports=r.default},{}],147:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){var p=window.crypto||window.msCrypto,i=Uint32Array,o=Math.pow(2,i.BYTES_PER_ELEMENT*8)-1,n=10,f=void 0,h=void 0,m=void 0;function u(){p&&(f||(f=new i(n)),p.getRandomValues(f),h=0)}function _(C,k){var R=void 0;return C||(C=0),k||(k=1),p?(h===f.length&&u(),R=f[h]/o,h+=1):R=Math.random(),R*(k-C)+C}return m={random:_},u(),m}t.__dashjs_factory_name="RNG",r.default=dashjs.FactoryMaker.getSingletonFactory(t),g.exports=r.default},{}],148:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};p.SSL_CONNECTION_FAILED_PREFIX="SSL",p.DNS_RESOLUTION_FAILED="C00",p.HOST_UNREACHABLE="C01",p.CONNECTION_REFUSED="C02",p.CONNECTION_ERROR="C03",p.CORRUPT_MEDIA_ISOBMFF="M00",p.CORRUPT_MEDIA_OTHER="M01",p.BASE_URL_CHANGED="F00",p.BECAME_REPORTER="S00",r.default=p,g.exports=r.default},{}],149:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.metrics="",this.Range=[],this.Reporting=[]};r.default=p,g.exports=r.default},{}],150:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1};r.default=p,g.exports=r.default},{}],151:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var p=1e3,i=function o(){t(this,o),this.schemeIdUri="",this.value="",this.dvb_reportingUrl="",this.dvb_probability=p};r.default=i,g.exports=r.default},{}],152:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}function p(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}var i=e(230),o=t(i),n=e(47),f=t(n),h=NaN,m=function _(C,k){p(this,_),this.data={baseUrls:C||null,selectedIdx:k||h},this.children=[]};function u(){var _=void 0,C=void 0,k=void 0,R=this.context,P=(0,o.default)(R).getInstance();function w(){T()}function H(O){O.adapter&&(k=O.adapter)}function N(){if(!k||!k.hasOwnProperty("getBaseURLsFromElement")||!k.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}function A(O,B,L){var K=k.getBaseURLsFromElement(L);O[B]?P.areEqual(K,O[B].data.baseUrls)||(O[B].data.baseUrls=K,O[B].data.selectedIdx=h):O[B]=new m(K)}function M(O){N();var B=k.getBaseURLsFromElement(O);P.areEqual(B,C.data.baseUrls)||(C.data.baseUrls=B,C.data.selectedIdx=h),O&&O.Period_asArray&&O.Period_asArray.forEach(function(L,K){A(C.children,K,L),L.AdaptationSet_asArray&&L.AdaptationSet_asArray.forEach(function(x,U){A(C.children[K].children,U,x),x.Representation_asArray&&x.Representation_asArray.sort(k.getRepresentationSortFunction()).forEach(function(Y,oe){A(C.children[K].children[U].children,oe,Y)})})})}function I(O,B){var L=B||C;O(L.data),L.children&&L.children.forEach(function(K){return I(O,K)})}function D(O){I(function(B){isNaN(B.selectedIdx)||O===B.baseUrls[B.selectedIdx].serviceLocation&&(B.selectedIdx=h)})}function v(O){M(O)}function T(){C=new m}function W(O){var B=C,L=[B.data];return O&&O.forEach(function(K){B=B.children[K],B&&L.push(B.data)}),L.filter(function(K){return K.baseUrls.length})}return _={reset:T,update:v,getForPath:W,invalidateSelectedIndexes:D,setConfig:H},w(),_}u.__dashjs_factory_name="BaseURLTreeModel",r.default=f.default.getClassFactory(u),g.exports=r.default},{"230":230,"47":47}],153:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(K){return K&&K.__esModule?K:{default:K}}var p=e(46),i=t(p),o=e(104),n=t(o),f=e(130),h=t(f),m=e(47),u=t(m),_=e(45),C=t(_),k=e(48),R=t(k),P=e(112),w=t(P),H=e(255),N=e(65),A=t(N),M=e(49),I=t(M),D="CMCD",v=1,T={MANIFEST:"m",AUDIO:"a",VIDEO:"v",INIT:"i",CAPTION:"c",ISOBMFF_TEXT_TRACK:"tt",ENCRYPTION_KEY:"k",OTHER:"o"},W={DASH:"d",MSS:"s"},O={VOD:"v",LIVE:"l"},B=5;function L(){var K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=this.context,ie=(0,i.default)(ee).getInstance(),me=(0,R.default)(ee).getInstance();function de(){K=(0,C.default)(ee).getInstance().getLogger(U),x=(0,A.default)(ee).getInstance(),j()}function Q(){ie.on(n.default.PLAYBACK_RATE_CHANGED,De,U),ie.on(n.default.MANIFEST_LOADED,je,U),ie.on(n.default.BUFFER_LEVEL_STATE_CHANGED,Fe,U),ie.on(n.default.PLAYBACK_SEEKED,Le,U),ie.on(n.default.PERIOD_SWITCH_COMPLETED,le,U)}function X(Re){!Re||(Re.abrController&&(oe=Re.abrController),Re.dashMetrics&&(ue=Re.dashMetrics),Re.playbackController&&(re=Re.playbackController))}function j(){Y={pr:1,nor:null,st:null,sf:null,sid:""+I.default.generateUuid(),cid:null},se={},ce={},J={},G()}function le(){G()}function G(){if(!!re){var Re=re.getStreamController();if(!!Re&&typeof Re.getActiveStream=="function"){var Xe=Re.getActiveStream();!Xe||(ve=Xe.getProcessors())}}}function c(Re){try{if(me.get().streaming.cmcd&&me.get().streaming.cmcd.enabled){var Xe=l(Re),lt=Ve(Xe);return ie.trigger(h.default.CMCD_DATA_GENERATED,{url:Re.url,mediaType:Re.mediaType,cmcdData:Xe,cmcdString:lt}),{key:D,value:lt}}return null}catch(ct){return null}}function E(Re,Xe){var lt={},ct=!0,tt=!1,St=void 0;try{for(var Ct=Xe[Symbol.iterator](),wt;!(ct=(wt=Ct.next()).done);ct=!0){var We=wt.value;Re[We]&&(lt[We]=Re[We])}}catch(He){tt=!0,St=He}finally{try{!ct&&Ct.return&&Ct.return()}finally{if(tt)throw St}}return lt}function b(Re){try{if(me.get().streaming.cmcd&&me.get().streaming.cmcd.enabled){var Xe=l(Re),lt=E(Xe,["br","d","ot","tb"]),ct=E(Xe,["bl","dl","mtp","nor","nrr","su"]),tt=E(Xe,["bs","rtp"]),St=E(Xe,["cid","pr","sf","sid","st","v"]),Ct={"CMCD-Object":Ve(lt),"CMCD-Request":Ve(ct),"CMCD-Status":Ve(tt),"CMCD-Session":Ve(St)};return ie.trigger(h.default.CMCD_DATA_GENERATED,{url:Re.url,mediaType:Re.mediaType,cmcdData:Xe}),Ct}return null}catch(wt){return null}}function l(Re){try{var Xe=null;return Re.type===H.HTTPRequest.MPD_TYPE?y(Re):Re.type===H.HTTPRequest.MEDIA_SEGMENT_TYPE?(te(Re.mediaType),V(Re)):Re.type===H.HTTPRequest.INIT_SEGMENT_TYPE?$(Re):Re.type===H.HTTPRequest.OTHER_TYPE||Re.type===H.HTTPRequest.XLINK_EXPANSION_TYPE?ae(Re):Re.type===H.HTTPRequest.LICENSE?d(Re):Xe}catch(lt){return null}}function d(Re){var Xe=ne(Re);return Xe.ot=T.ENCRYPTION_KEY,Xe}function y(){var Re=ne();return Re.ot=""+T.MANIFEST,Re}function V(Re){var Xe=ne(),lt=Se(Re),ct=he(Re),tt=ye(Re.mediaType),St=_e(Re.mediaType),Ct=pe(Re.mediaType),wt=Ie(Re.mediaType),We=Y.pr,He=Ge(Re.mediaType),ze=void 0;Re.mediaType===w.default.VIDEO&&(ze=T.VIDEO),Re.mediaType===w.default.AUDIO&&(ze=T.AUDIO),Re.mediaType===w.default.FRAGMENTED_TEXT&&(Re.mediaInfo.mimeType==="application/mp4"?ze=T.ISOBMFF_TEXT_TRACK:ze=T.CAPTION);var mt=me.get().streaming.cmcd.rtp;if(mt||(mt=we(Re)),Xe.rtp=mt,He)if(Re.url!==He.url){var vt=new URL(He.url);Xe.nor=vt.pathname}else He.range&&(Xe.nrr=He.range);return lt&&(Xe.br=lt),ze&&(Xe.ot=ze),isNaN(ct)||(Xe.d=ct),isNaN(tt)||(Xe.mtp=tt),isNaN(St)||(Xe.dl=St),isNaN(Ct)||(Xe.bl=Ct),isNaN(wt)||(Xe.tb=wt),!isNaN(We)&&We!==1&&(Xe.pr=We),se[Re.mediaType]&&(Xe.bs=!0,se[Re.mediaType]=!1),(ce[Re.mediaType]||!J[Re.mediaType])&&(Xe.su=!0,ce[Re.mediaType]=!1,J[Re.mediaType]=!0),Xe}function te(Re){J.hasOwnProperty(Re)||(J[Re]=!1),ce.hasOwnProperty(Re)||(ce[Re]=!1),se.hasOwnProperty(Re)||(se[Re]=!1)}function $(){var Re=ne();return Re.ot=""+T.INIT,Re.su=!0,Re}function ae(){var Re=ne();return Re.ot=""+T.OTHER,Re}function ne(){var Re={},Xe=me.get().streaming.cmcd.cid?me.get().streaming.cmcd.cid:Y.cid;return Re.v=v,Re.sid=me.get().streaming.cmcd.sid?me.get().streaming.cmcd.sid:Y.sid,Re.sid=""+Re.sid,Xe&&(Re.cid=""+Xe),!isNaN(Y.pr)&&Y.pr!==1&&Y.pr!==null&&(Re.pr=Y.pr),Y.st&&(Re.st=Y.st),Y.sf&&(Re.sf=Y.sf),Re}function Se(Re){try{var Xe=Re.quality,lt=Re.mediaInfo.bitrateList;return parseInt(lt[Xe].bandwidth/1e3)}catch(ct){return null}}function Ie(Re){try{var Xe=oe.getTopBitrateInfoFor(Re);return Math.round(Xe.bitrate/1e3)}catch(lt){return null}}function he(Re){try{return isNaN(Re.duration)?null:Math.round(Re.duration*1e3)}catch(Xe){return null}}function ye(Re){try{return parseInt(oe.getThroughputHistory().getSafeAverageThroughput(Re)/100)*100}catch(Xe){return null}}function _e(Re){try{var Xe=Y.pr,lt=ue.getCurrentBufferLevel(Re);return!isNaN(Xe)&&!isNaN(lt)?parseInt(lt/Xe*10)*100:null}catch(ct){return null}}function pe(Re){try{var Xe=ue.getCurrentBufferLevel(Re);return isNaN(Xe)?null:parseInt(Xe*10)*100}catch(lt){return null}}function De(Re){try{Y.pr=Re.playbackRate}catch(Xe){}}function je(Re){try{var Xe=x.getIsDynamic(Re.data),lt=Xe?""+O.LIVE:""+O.VOD,ct=Re.protocol&&Re.protocol==="MSS"?""+W.MSS:""+W.DASH;Y.st=""+lt,Y.sf=""+ct}catch(tt){}}function Fe(Re){try{Re.state&&Re.mediaType&&Re.state===n.default.BUFFER_EMPTY&&(se[Re.mediaType]||(se[Re.mediaType]=!0),ce[Re.mediaType]||(ce[Re.mediaType]=!0))}catch(Xe){}}function Le(){for(var Re in se)se.hasOwnProperty(Re)&&(se[Re]=!0);for(var Re in ce)ce.hasOwnProperty(Re)&&(ce[Re]=!0)}function Ve(Re){try{var Xe=function(){if(!Re)return{v:null};var lt=Object.keys(Re).sort(function(St,Ct){return St.localeCompare(Ct)}),ct=lt.length,tt=lt.reduce(function(St,Ct,wt){if(Ct==="v"&&Re[Ct]===1)return St;if(typeof Re[Ct]=="string"&&(Ct!=="ot"||Ct!=="sf"||Ct!=="st")){var We=Re[Ct].replace(/"/g,'"');St+=Ct+'="'+We+'"'}else St+=Ct+"="+Re[Ct];return wt<ct-1&&(St+=","),St},"");return tt=tt.replace(/=true/g,""),{v:tt}}();if(typeof Xe=="object")return Xe.v}catch(lt){return null}}function Ge(Re){if(!(!ve||ve.length===0)){var Xe=!0,lt=!1,ct=void 0;try{for(var tt=ve[Symbol.iterator](),St;!(Xe=(St=tt.next()).done);Xe=!0){var Ct=St.value;if(Ct.getType()===Re)return Ct.probeNextRequest()}}catch(wt){lt=!0,ct=wt}finally{try{!Xe&&tt.return&&tt.return()}finally{if(lt)throw ct}}}}function we(Re){var Xe=re.getPlaybackRate();Xe||(Xe=1);var lt=Re.quality,ct=Re.mediaType,tt=Re.mediaInfo,St=Re.duration,Ct=pe(ct);Ct===0&&(Ct=500);var wt=tt.bitrateList[lt].bandwidth,We=wt*St/1e3,He=Ct/Xe/1e3,ze=We/He,mt=me.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(me.get().streaming.cmcd.rtpSafetyFactor)?me.get().streaming.cmcd.rtpSafetyFactor:B,vt=ze*mt,pt=(parseInt(vt/100)+1)*100;return pt}function at(){ie.off(n.default.PLAYBACK_RATE_CHANGED,De,this),ie.off(n.default.MANIFEST_LOADED,je,this),ie.off(n.default.BUFFER_LEVEL_STATE_CHANGED,Fe,U),ie.off(n.default.PLAYBACK_SEEKED,Le,U),j()}return U={getQueryParameter:c,getHeaderParameters:b,setConfig:X,reset:at,initialize:Q},de(),U}L.__dashjs_factory_name="CmcdModel",r.default=u.default.getSingletonFactory(L),g.exports=r.default},{"104":104,"112":112,"130":130,"255":255,"45":45,"46":46,"47":47,"48":48,"49":49,"65":65}],154:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(k){return k&&k.__esModule?k:{default:k}}var p=e(47),i=t(p),o=e(241),n=t(o),f="loading",h="executed",m="canceled",u="failed";function _(k){k=k||{};var R=k.eventBus,P=k.events,w=k.dashMetrics,H=k.fragmentLoader,N=k.debug,A=k.streamInfo,M=k.type,I=void 0,D=void 0,v=void 0,T=void 0;function W(){D=N.getLogger(I),j(),R.on(P.LOADING_COMPLETED,de,I),R.on(P.LOADING_DATA_PROGRESS,Q,I),R.on(P.LOADING_ABANDONED,X,I)}function O(){return A.id}function B(){return M}function L(c){var E=function(V,te){return V.action===n.default.ACTION_COMPLETE&&V.action===te.action},b=function(V,te){return!isNaN(V.index)&&V.startTime===te.startTime&&V.adaptationIndex===te.adaptationIndex&&V.type===te.type},l=function(V,te){return isNaN(V.index)&&isNaN(te.index)&&V.quality===te.quality},d=function(V){var te=!1;return V.some(function($){if(b(c,$)||l(c,$)||E(c,$))return te=!0,te}),te};return c?d(v):!1}function K(c){var E=!1,b=0,l=void 0;if(E=L(c),!E)for(b=0;b<T.length;b++)l=T[b],c.url===l.url&&c.startTime===l.startTime&&(E=!0);return E}function x(c){var E=c?c.state instanceof Array?c.state:[c.state]:[],b=[];return E.forEach(function(l){var d=ie(l);b=b.concat(ee(d,c))}),b}function U(c){return isNaN(c.duration)?.25:Math.min(c.duration/8,.5)}function Y(c){v=v.filter(function(E){var b=U(E);return isNaN(E.startTime)||(c!==void 0?E.startTime>=c-b:!1)})}function oe(c){v=v.filter(function(E){return isNaN(E.startTime)||(c!==void 0?E.startTime<c:!1)})}function ue(c,E){E<=c+.5||(v=v.filter(function(b){var l=U(b);return isNaN(b.startTime)||b.startTime>=E-l||isNaN(b.duration)||b.startTime+b.duration<=c+l}))}function re(c,E){if(!c||c.length===0){Y();return}for(var b=0,l=0,d=c.length;l<d;l++)ue(b,c.start(l)),b=c.end(l);E>0&&ue(b,E)}function ve(){D.debug("abort requests"),H.abort(),T=[]}function ce(c){switch(c.action){case n.default.ACTION_COMPLETE:v.push(c),me(c,h),D.debug("STREAM_COMPLETED"),R.trigger(P.STREAM_COMPLETED,{request:c},{streamId:c.mediaInfo.streamInfo.id,mediaType:c.mediaType});break;case n.default.ACTION_DOWNLOAD:me(c,f),T.push(c),se(c);break;default:D.warn("Unknown request action.")}}function se(c){R.trigger(P.FRAGMENT_LOADING_STARTED,{request:c},{streamId:A.id,mediaType:M}),H.load(c)}function J(c,E,b){for(var l=c.length-1,d=l;d>=0;d--){var y=c[d],V=y.startTime,te=V+y.duration;if(b=isNaN(b)?U(y):b,!isNaN(V)&&!isNaN(te)&&E+b>=V&&E-b<te||isNaN(V)&&isNaN(E))return y}return null}function ee(c,E){return E.hasOwnProperty("time")?[J(c,E.time,E.threshold)]:c.filter(function(b){for(var l in E)if(l!=="state"&&E.hasOwnProperty(l)&&b[l]!=E[l])return!1;return!0})}function ie(c){var E=void 0;switch(c){case f:E=T;break;case h:E=v;break;default:E=[]}return E}function me(c,E){w.addSchedulingInfo(c,E),w.addRequestsQueue(c.mediaType,T,v)}function de(c){c.sender===H&&(T.splice(T.indexOf(c.request),1),c.response&&!c.error&&v.push(c.request),me(c.request,c.error?u:h),R.trigger(P.FRAGMENT_LOADING_COMPLETED,{request:c.request,response:c.response,error:c.error,sender:this},{streamId:A.id,mediaType:M}))}function Q(c){c.sender===H&&R.trigger(P.FRAGMENT_LOADING_PROGRESS,{request:c.request,response:c.response,error:c.error,sender:this},{streamId:A.id,mediaType:M})}function X(c){c.sender===H&&R.trigger(P.FRAGMENT_LOADING_ABANDONED,{request:c.request},{streamId:A.id,mediaType:M})}function j(){v=[],T=[]}function le(){R.off(P.LOADING_COMPLETED,de,this),R.off(P.LOADING_DATA_PROGRESS,Q,this),R.off(P.LOADING_ABANDONED,X,this),H&&H.reset(),j()}function G(c){v.push(c)}return I={getStreamId:O,getType:B,getRequests:x,isFragmentLoaded:L,isFragmentLoadedOrPending:K,removeExecutedRequestsBeforeTime:Y,removeExecutedRequestsAfterTime:oe,syncExecutedRequestsWithBufferedRange:re,abortRequests:ve,executeRequest:ce,reset:le,addExecutedRequest:G},W(),I}_.__dashjs_factory_name="FragmentModel";var C=i.default.getClassFactory(_);C.FRAGMENT_MODEL_LOADING=f,C.FRAGMENT_MODEL_EXECUTED=h,C.FRAGMENT_MODEL_CANCELED=m,C.FRAGMENT_MODEL_FAILED=u,i.default.updateClassFactory(_.__dashjs_factory_name,C),r.default=C,g.exports=r.default},{"241":241,"47":47}],155:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f);function m(){var u=this.context,_=(0,i.default)(u).getInstance(),C=void 0,k=void 0;function R(){return k}function P(w){k=w,w&&_.trigger(n.default.MANIFEST_LOADED,{data:w})}return C={getValue:R,setValue:P},C}m.__dashjs_factory_name="ManifestModel",r.default=h.default.getSingletonFactory(m),g.exports=r.default},{"46":46,"47":47,"54":54}],156:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(v){return v&&v.__esModule?v:{default:v}}var p=e(99),i=t(p),o=e(47),n=t(o),f=e(112),h=t(f),m=e(196),u=t(m),_=e(48),C=t(_),k=e(232),R=12,P=20,w=3,H=10,N=5,A=4,M=5,I=!1;function D(){var v=void 0,T=void 0,W=void 0,O=void 0,B=this.context,L=(0,C.default)(B).getInstance();function K(){T=[],W={default:I},O=[]}function x(G){var c=void 0;for(c=0;c<O.length;c++)if(O[c].rulename===G)return c;return-1}function U(){return O}function Y(G,c,E){if(typeof G!="string"||G!==u.default.ABANDON_FRAGMENT_RULES&&G!==u.default.QUALITY_SWITCH_RULES||typeof c!="string")throw h.default.BAD_ARGUMENT_ERROR;var b=x(c);b===-1?O.push({type:G,rulename:c,rule:E}):(O[b].type=G,O[b].rule=E)}function oe(G){if(G){var c=x(G);c!==-1&&O.splice(c,1)}else O=[]}function ue(){if(L.get().streaming.lowLatencyEnabled)return ce()*.6;var G=L.get().streaming.stableBufferTime;return G>-1?G:L.get().streaming.fastSwitchEnabled?P:R}function re(G){var c=isNaN(L.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?N:L.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return L.get().streaming.lowLatencyEnabled?L.get().streaming.retryAttempts[G]*c:L.get().streaming.retryAttempts[G]}function ve(G){var c=isNaN(L.get().streaming.retryIntervals.lowLatencyReductionFactor)?H:L.get().streaming.retryIntervals.lowLatencyReductionFactor;return L.get().streaming.lowLatencyEnabled?L.get().streaming.retryIntervals[G]/c:L.get().streaming.retryIntervals[G]}function ce(){return L.get().streaming.lowLatencyEnabled?L.get().streaming.liveDelay||w:L.get().streaming.liveDelay}function se(){try{var G=L.get().streaming.liveCatchup.latencyThreshold,c=ce();if(G!==null&&!isNaN(G))return Math.max(G,c);var E=L.get().streaming.liveCatchup.minDrift,b=!isNaN(c)&&c?isNaN(E)?ce():L.get().streaming.liveCatchup.minDrift+ce():NaN;return b&&!isNaN(b)?Math.max(b*A,M):NaN}catch(l){return NaN}}function J(G,c){ie(G,c);var E=new i.default;E.schemeIdUri=G,E.value=c,T.push(E)}function ee(){return T}function ie(G,c){(0,k.checkParameterType)(G,"string"),(0,k.checkParameterType)(c,"string"),T.forEach(function(E,b){E.schemeIdUri===G&&E.value===c&&T.splice(b,1)})}function me(){T=[]}function de(){var G=L.get().streaming.utcSynchronization.defaultTimingSource;J(G.scheme,G.value)}function Q(G,c){G?W[G]=!!c:Object.keys(W).forEach(function(E){Q(E,c)})}function X(G){var c=W[G];return c===void 0?W.default:c}function j(){return L.get().streaming.utcSynchronization.defaultTimingSource}function le(){}return v={getABRCustomRules:U,addABRCustomRule:Y,removeABRCustomRule:oe,getStableBufferTime:ue,getRetryAttemptsForType:re,getRetryIntervalsForType:ve,getLiveDelay:ce,getLiveCatchupLatencyThreshold:se,addUTCTimingSource:J,removeUTCTimingSource:ie,getUTCTimingSources:ee,clearDefaultUTCTimingSources:me,restoreDefaultUTCTimingSources:de,setXHRWithCredentialsForType:Q,getXHRWithCredentialsForType:X,getDefaultUtcTimingSource:j,reset:le},K(),v}D.__dashjs_factory_name="MediaPlayerModel",r.default=n.default.getSingletonFactory(D),g.exports=r.default},{"112":112,"196":196,"232":232,"47":47,"48":48,"99":99}],157:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(Y){return Y&&Y.__esModule?Y:{default:Y}}var p=e(112),i=t(p),o=e(113),n=t(o),f=e(245),h=t(f),m=e(255),u=e(258),_=t(u),C=e(251),k=t(C),R=e(252),P=t(R),w=e(253),H=t(w),N=e(254),A=t(N),M=e(256),I=e(260),D=t(I),v=e(46),T=t(v),W=e(259),O=t(W),B=e(54),L=t(B),K=e(47),x=t(K);function U(Y){Y=Y||{};var oe=Y.settings,ue=this.context,re=(0,T.default)(ue).getInstance(),ve=void 0,ce=void 0;function se(){ce={}}function J(){re.trigger(L.default.METRICS_CHANGED)}function ee(ye){re.trigger(L.default.METRIC_CHANGED,{mediaType:ye}),J()}function ie(ye,_e,pe){re.trigger(L.default.METRIC_UPDATED,{mediaType:ye,metric:_e,value:pe}),ee(ye)}function me(ye,_e,pe){re.trigger(L.default.METRIC_ADDED,{mediaType:ye,metric:_e,value:pe}),ee(ye)}function de(ye){delete ce[ye],ee(ye)}function Q(){ce={},J()}function X(ye,_e){var pe=null;return ye&&(ce.hasOwnProperty(ye)?pe=ce[ye]:_e||(pe=new h.default,ce[ye]=pe)),pe}function j(ye,_e,pe){var De=X(ye);De!==null&&(De[_e].push(pe),De[_e].length>oe.get().streaming.metricsMaxListDepth&&De[_e].shift())}function le(ye,_e,pe,De){var je=new m.HTTPRequestTrace;return je.s=_e,je.d=pe,je.b=De,ye.trace.push(je),ye.interval||(ye.interval=0),ye.interval+=pe,je}function G(ye,_e,pe,De,je,Fe,Le,Ve,Ge,we,at,Re,Xe,lt,ct){var tt=new m.HTTPRequest;Fe&&Fe!==De&&(G(ye,null,pe,De,je,null,null,Ve,Ge,null,null,null,Xe,null,null),tt.actualurl=Fe),tt.tcpid=_e,tt.type=pe,tt.url=De,tt.range=Ve,tt.trequest=Ge,tt.tresponse=we,tt.responsecode=Re,tt._tfinish=at,tt._stream=ye,tt._mediaduration=Xe,tt._quality=je,tt._responseHeaders=lt,tt._serviceLocation=Le,ct?ct.forEach(function(St){le(tt,St.s,St.d,St.b)}):(delete tt.interval,delete tt.trace),E(ye,n.default.HTTP_REQUEST,tt)}function c(ye,_e,pe,De,je){var Fe=new _.default;Fe.t=_e,Fe.mt=pe,Fe.to=De,je?Fe.lto=je:delete Fe.lto,E(ye,n.default.TRACK_SWITCH,Fe)}function E(ye,_e,pe){j(ye,_e,pe),me(ye,_e,pe)}function b(ye,_e,pe){var De=new k.default;De.t=_e,De.level=pe,E(ye,n.default.BUFFER_LEVEL,De)}function l(ye,_e,pe){var De=new P.default;De.target=pe,De.state=_e,E(ye,n.default.BUFFER_STATE,De)}function d(ye,_e,pe,De){var je=new H.default;je.time=_e,je.range=De,je.manifestInfo=pe,E(ye,n.default.DVR_INFO,je)}function y(ye,_e){var pe=new A.default,De=X(ye).DroppedFrames;!_e||(pe.time=_e.creationTime,pe.droppedFrames=_e.droppedVideoFrames,!(De.length>0&&De[De.length-1]==pe)&&E(ye,n.default.DROPPED_FRAMES,pe))}function V(ye,_e,pe,De,je,Fe,Le,Ve,Ge){var we=new D.default;we.mediaType=ye,we.t=_e,we.type=pe,we.startTime=De,we.availabilityStartTime=je,we.duration=Fe,we.quality=Le,we.range=Ve,we.state=Ge,E(ye,n.default.SCHEDULING_INFO,we)}function te(ye,_e,pe){var De=new O.default;De.loadingRequests=_e,De.executedRequests=pe,X(ye).RequestsQueue=De,me(ye,n.default.REQUESTS_QUEUE,De)}function $(ye,_e,pe,De,je,Fe,Le,Ve,Ge,we){var at=new M.ManifestUpdate;at.mediaType=ye,at.type=_e,at.requestTime=pe,at.fetchTime=De,at.availabilityStartTime=je,at.presentationStartTime=Fe,at.clientTimeOffset=Le,at.currentTime=Ve,at.buffered=Ge,at.latency=we,j(i.default.STREAM,n.default.MANIFEST_UPDATE,at),me(ye,n.default.MANIFEST_UPDATE,at)}function ae(ye,_e){if(ye){for(var pe in _e)ye[pe]=_e[pe];ie(ye.mediaType,n.default.MANIFEST_UPDATE,ye)}}function ne(ye,_e,pe,De,je){if(ye){var Fe=new M.ManifestUpdateStreamInfo;Fe.id=_e,Fe.index=pe,Fe.start=De,Fe.duration=je,ye.streamInfo.push(Fe),ie(ye.mediaType,n.default.MANIFEST_UPDATE_STREAM_INFO,ye)}}function Se(ye,_e,pe,De,je,Fe,Le,Ve){if(ye&&ye.representationInfo){var Ge=new M.ManifestUpdateRepresentationInfo;Ge.id=_e,Ge.index=pe,Ge.streamIndex=De,Ge.mediaType=je,Ge.startNumber=Le,Ge.fragmentInfoType=Ve,Ge.presentationTimeOffset=Fe,ye.representationInfo.push(Ge),ie(ye.mediaType,n.default.MANIFEST_UPDATE_TRACK_INFO,ye)}}function Ie(ye){ye.trace&&Array.isArray(ye.trace)?ye.trace.forEach(function(_e){_e.hasOwnProperty("subreplevel")&&!_e.subreplevel&&delete _e.subreplevel}):delete ye.trace,E(i.default.STREAM,n.default.PLAY_LIST,ye)}function he(ye){E(i.default.STREAM,n.default.DVB_ERRORS,ye)}return ve={clearCurrentMetricsForType:de,clearAllCurrentMetrics:Q,getMetricsFor:X,addHttpRequest:G,addRepresentationSwitch:c,addBufferLevel:b,addBufferState:l,addDVRInfo:d,addDroppedFrames:y,addSchedulingInfo:V,addRequestsQueue:te,addManifestUpdate:$,updateManifestUpdateInfo:ae,addManifestUpdateStreamInfo:ne,addManifestUpdateRepresentationInfo:Se,addPlayList:Ie,addDVBErrors:he},se(),ve}U.__dashjs_factory_name="MetricsModel",r.default=x.default.getSingletonFactory(U),g.exports=r.default},{"112":112,"113":113,"245":245,"251":251,"252":252,"253":253,"254":254,"255":255,"256":256,"258":258,"259":259,"260":260,"46":46,"47":47,"54":54}],158:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(250),i=t(p),o=e(47),n=t(o);function f(){var h=void 0,m=void 0;function u(C){if(m=new i.default,!C)return null;var k=C.indexOf("#");if(k!==-1)for(var R=C.substr(k+1).split("&"),P=0,w=R.length;P<w;++P){var H=R[P],N=H.indexOf("=");if(N!==-1){var A=H.substring(0,N);m.hasOwnProperty(A)&&(m[A]=H.substr(N+1))}}}function _(){return m}return h={initialize:u,getURIFragmentData:_},h}f.__dashjs_factory_name="URIFragmentModel",r.default=n.default.getSingletonFactory(f),g.exports=r.default},{"250":250,"47":47}],159:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(C){return C&&C.__esModule?C:{default:C}}var p=e(47),i=t(p),o=e(46),n=t(o),f=e(54),h=t(f),m=e(45),u=t(m);function _(){var C=void 0,k=void 0,R=void 0,P=void 0,w=void 0,H="element is not video or audio DOM type!",N=this.context,A=(0,n.default)(N).getInstance(),M=[];function I(){k=(0,u.default)(N).getInstance().getLogger(C)}function D(){A.on(h.default.PLAYBACK_PLAYING,J,this)}function v(){A.off(h.default.PLAYBACK_PLAYING,J,this)}function T(){R&&(R.playbackRate=w||1,R.removeEventListener("canplay",T))}function W(_e){!R||(R.readyState<=2&&_e>0?R.addEventListener("canplay",T):R.playbackRate=_e)}function O(_e,pe){if(R){if(R.currentTime==_e)return;try{_e=pe?B(_e):_e,R.currentTime=_e}catch(De){R.readyState===0&&De.code===De.INVALID_STATE_ERR&&setTimeout(function(){R.currentTime=_e},400)}}}function B(_e){var pe=l(),De=_e,je=9999999999;if(pe)for(var Fe=0;Fe<pe.length;Fe++){var Le=pe.start(Fe),Ve=pe.end(Fe),Ge=Math.abs(Le-_e),we=Math.abs(Ve-_e);if(_e>=Le&&_e<=Ve)return _e;Ge<je&&(je=Ge,De=Le),we<je&&(je=we,De=Ve)}return De}function L(){return R}function K(_e){if(_e==null||_e&&/^(VIDEO|AUDIO)$/i.test(_e.nodeName))R=_e,R&&(R.preload="auto");else throw H}function x(_e){R&&(_e?R.src=_e:(R.removeAttribute("src"),R.load()))}function U(){return R?R.src:null}function Y(){return P}function oe(_e){P=_e,P.style.position="absolute",P.style.display="flex",P.style.overflow="hidden",P.style.pointerEvents="none",P.style.top=0,P.style.left=0}function ue(_e,pe){se(_e,pe)}function re(){return M.length>0}function ve(_e){var pe=void 0;_e===null||!R||R.seeking||M.indexOf(_e)!==-1||(M.push(_e),R&&M.length===1&&(pe=document.createEvent("Event"),pe.initEvent("waiting",!0,!1),w=R.playbackRate,W(0),R.dispatchEvent(pe)))}function ce(_e){var pe=M.indexOf(_e),De=void 0;_e!==null&&(pe!==-1&&M.splice(pe,1),R&&re()===!1&&R.playbackRate===0&&(W(w||1),R.paused||(De=document.createEvent("Event"),De.initEvent("playing",!0,!1),R.dispatchEvent(De))))}function se(_e,pe){pe?ve(_e):ce(_e)}function J(){if(R&&re()&&R.playbackRate===0){var _e=document.createEvent("Event");_e.initEvent("waiting",!0,!1),R.dispatchEvent(_e)}}function ee(){if(!R)return null;var _e="webkitDroppedFrameCount"in R&&"webkitDecodedFrameCount"in R,pe="getVideoPlaybackQuality"in R,De=null;return pe?De=R.getVideoPlaybackQuality():_e&&(De={droppedVideoFrames:R.webkitDroppedFrameCount,totalVideoFrames:R.webkitDroppedFrameCount+R.webkitDecodedFrameCount,creationTime:new Date}),De}function ie(){if(R){R.autoplay=!0;var _e=R.play();_e&&_e.catch&&typeof Promise!="undefined"&&_e.catch(function(pe){pe.name==="NotAllowedError"&&A.trigger(h.default.PLAYBACK_NOT_ALLOWED),k.warn("Caught pending play exception - continuing ("+pe+")")})}}function me(){return R?R.paused:null}function de(){R&&(R.pause(),R.autoplay=!1)}function Q(){return R?R.seeking:null}function X(){return R?R.currentTime:null}function j(){return R?R.playbackRate:null}function le(){return R?R.played:null}function G(){return R?R.ended:null}function c(_e,pe){R&&R.addEventListener(_e,pe)}function E(_e,pe){R&&R.removeEventListener(_e,pe)}function b(){return R?R.readyState:NaN}function l(){return R?R.buffered:null}function d(){return R?R.clientWidth:NaN}function y(){return R?R.clientHeight:NaN}function V(){return R?R.videoWidth:NaN}function te(){return R?R.videoHeight:NaN}function $(){var _e=R.parentNode.host||R.parentNode;return _e?R.getBoundingClientRect().top-_e.getBoundingClientRect().top:NaN}function ae(){var _e=R.parentNode.host||R.parentNode;return _e?R.getBoundingClientRect().left-_e.getBoundingClientRect().left:NaN}function ne(){return R?R.textTracks:[]}function Se(_e,pe,De,je,Fe){if(R){for(var Le=0;Le<R.textTracks.length;Le++)if(R.textTracks[Le].kind===_e&&(pe?R.textTracks[Le].label==pe:!0)&&R.textTracks[Le].language===De&&R.textTracks[Le].isTTML===je&&R.textTracks[Le].isEmbedded===Fe)return R.textTracks[Le]}return null}function Ie(_e,pe,De,je,Fe){if(!R)return null;var Le=Se(_e,pe,De,je,Fe);return Le||(Le=R.addTextTrack(_e,pe,De),Le.isEmbedded=Fe,Le.isTTML=je),Le}function he(_e){R&&(R.appendChild(_e),_e.isTTML!==void 0&&(R.textTracks[R.textTracks.length-1].isTTML=_e.isTTML,R.textTracks[R.textTracks.length-1].isEmbedded=_e.isEmbedded))}function ye(_e){R&&R.removeChild(_e)}return C={initialize:D,setCurrentTime:O,play:ie,isPaused:me,pause:de,isStalled:re,isSeeking:Q,getTime:X,getPlaybackRate:j,setPlaybackRate:W,getPlayedRanges:le,getEnded:G,setStallState:ue,getElement:L,setElement:K,setSource:x,getSource:U,getTTMLRenderingDiv:Y,setTTMLRenderingDiv:oe,getPlaybackQuality:ee,addEventListener:c,removeEventListener:E,getReadyState:b,getBufferRange:l,getClientWidth:d,getClientHeight:y,getTextTracks:ne,getTextTrack:Se,addTextTrack:Ie,appendChild:he,removeChild:ye,getVideoWidth:V,getVideoHeight:te,getVideoRelativeOffsetTop:$,getVideoRelativeOffsetLeft:ae,reset:v},I(),C}_.__dashjs_factory_name="VideoModel",r.default=i.default.getSingletonFactory(_),g.exports=r.default},{"45":45,"46":46,"47":47,"54":54}],160:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}var p=e(47),i=t(p),o=e(48),n=t(o),f=e(112),h=t(f);function m(_){_=_||{};var C=this.context,k=_.requestModifier,R=_.boxParser,P=(0,n.default)(C).getInstance(),w=void 0;function H(T){var W=new Date,O=T.request,B=new Headers;if(O.range&&B.append("Range","bytes="+O.range),T.headers)for(var L in T.headers){var K=T.headers[L];K&&B.append(L,K)}O.requestStartDate||(O.requestStartDate=W),k&&k.modifyRequestHeader({setRequestHeader:function(oe,ue){B.append(oe,ue)}});var x=void 0;typeof window.AbortController=="function"&&(x=new AbortController,T.abortController=x,x.signal.onabort=T.onabort);var U={method:T.method,headers:B,credentials:T.withCredentials?"include":void 0,signal:x?x.signal:void 0};fetch(T.url,U).then(function(Y){T.response||(T.response={}),T.response.status=Y.status,T.response.statusText=Y.statusText,T.response.responseURL=Y.url,Y.ok||T.onerror();var oe="",ue=!0,re=!1,ve=void 0;try{for(var ce=Y.headers.keys()[Symbol.iterator](),se;!(ue=(se=ce.next()).done);ue=!0){var J=se.value;oe+=J+": "+Y.headers.get(J)+`\r
|
|
`}}catch(b){re=!0,ve=b}finally{try{!ue&&ce.return&&ce.return()}finally{if(re)throw ve}}if(T.response.responseHeaders=oe,!Y.body)return Y.arrayBuffer().then(function(b){T.response.response=b;var l={loaded:b.byteLength,total:b.byteLength,stream:!1};T.progress(l),T.onload(),T.onend()});var ee=parseInt(Y.headers.get("Content-Length"),10),ie=0,me=!1,de=new Uint8Array,Q=0;T.reader=Y.body.getReader();var X=[],j=[],le=[],G=!0,c=P.get().streaming.abr.fetchThroughputCalculationMode,E=function b(l){var d=l.value,y=l.done;if(y){de&&(T.progress({loaded:ie,total:isNaN(ee)?ie:ee,lengthComputable:!0,time:I(c,j,le,X,ie),stream:!0}),T.response.response=de.buffer),T.onload(),T.onend();return}if(d&&d.length>0){if(de=A(de,d),ie+=d.length,X.push({ts:Date.now(),bytes:d.length}),c===h.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&G){var V=R.findLastTopIsoBoxCompleted(["moof"],de,Q);V.found&&(G=!1,j.push({ts:performance.now(),bytes:d.length}))}var te=R.findLastTopIsoBoxCompleted(["moov","mdat"],de,Q);if(te.found){var $=te.lastCompletedOffset+te.size;c===h.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&(G=!0,le.push({ts:performance.now(),bytes:de.length}));var ae=void 0;$===de.length?(ae=de,de=new Uint8Array):(ae=new Uint8Array(de.subarray(0,$)),de=de.subarray($)),T.progress({data:ae.buffer,lengthComputable:!1,noTrace:!0}),Q=0}else Q=te.lastCompletedOffset,me||(T.progress({lengthComputable:!1,noTrace:!0}),me=!0)}N(T,b)};N(T,E)}).catch(function(Y){T.onerror&&T.onerror(Y)})}function N(T,W){T.reader.read().then(W).catch(function(O){T.onerror&&T.response.status===200&&T.onerror(O)})}function A(T,W){if(T.length===0)return W;var O=new Uint8Array(T.length+W.length);return O.set(T),O.set(W,T.length),O}function M(T){if(T.abortController)T.abortController.abort();else if(T.reader)try{T.reader.cancel(),T.onabort()}catch(W){}}function I(T,W,O,B,L){switch(T){case h.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING:return D(W,O);case h.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA:return v(B,L);default:return v(B,L)}}function D(T,W){try{var O=void 0,B=void 0;O=T.filter(function(U,Y){return Y>0&&Y<T.length-1}),B=W.filter(function(U,Y){return Y>0&&Y<W.length-1});var L=0;if(O.length>1){for(var K=0;K<O.length;K++)if(O[K]&&B[K]){var x=B[K].ts-O[K].ts;L+=x}return L}return null}catch(U){return null}}function v(T,W){try{if(T=T.filter(function(B){return B.bytes>W/4/T.length}),T.length>1){var O=function(){var B=0,L=(T[T.length-1].ts-T[0].ts)/T.length;return T.forEach(function(K,x){var U=T[x+1];if(U){var Y=U.ts-K.ts;B+=Y<L?Y:0}}),{v:B}}();if(typeof O=="object")return O.v}return null}catch(B){return null}}return w={load:H,abort:M,calculateDownloadedTime:I},w}m.__dashjs_factory_name="FetchLoader";var u=i.default.getClassFactory(m);r.default=u,g.exports=r.default},{"112":112,"47":47,"48":48}],161:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(K){return K&&K.__esModule?K:{default:K}}function p(K,x,U){return x in K?Object.defineProperty(K,x,{value:U,enumerable:!0,configurable:!0,writable:!0}):K[x]=U,K}var i=e(164),o=t(i),n=e(160),f=t(n),h=e(255),m=e(47),u=t(m),_=e(239),C=t(_),k=e(153),R=t(k),P=e(49),w=t(P),H=e(45),N=t(H),A=e(46),M=t(A),I=e(54),D=t(I),v=e(48),T=t(v),W=e(112),O=t(W);function B(K){K=K||{};var x=this.context,U=K.errHandler,Y=K.dashMetrics,oe=K.mediaPlayerModel,ue=K.requestModifier,re=K.boxParser,ve=K.useFetch||!1,ce=K.errors,se=K.requestTimeout||0,J=(0,M.default)(x).getInstance(),ee=(0,T.default)(x).getInstance(),ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0,le=void 0;function G(){var d;le=(0,N.default)(x).getInstance().getLogger(ie),me=[],de=[],Q=[],j=(0,R.default)(x).getInstance(),X=(d={},p(d,h.HTTPRequest.MPD_TYPE,ce.DOWNLOAD_ERROR_ID_MANIFEST_CODE),p(d,h.HTTPRequest.XLINK_EXPANSION_TYPE,ce.DOWNLOAD_ERROR_ID_XLINK_CODE),p(d,h.HTTPRequest.INIT_SEGMENT_TYPE,ce.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),p(d,h.HTTPRequest.MEDIA_SEGMENT_TYPE,ce.DOWNLOAD_ERROR_ID_CONTENT_CODE),p(d,h.HTTPRequest.INDEX_SEGMENT_TYPE,ce.DOWNLOAD_ERROR_ID_CONTENT_CODE),p(d,h.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,ce.DOWNLOAD_ERROR_ID_CONTENT_CODE),p(d,h.HTTPRequest.OTHER_TYPE,ce.DOWNLOAD_ERROR_ID_CONTENT_CODE),d)}function c(d,y){var V=d.request,te=[],$=!0,ae=!0,ne=new Date,Se=ne,Ie=0,he=void 0;if(!ue||!Y||!U)throw new Error("config object is not correct or missing");var ye=function(tt){ae=!1,V.requestStartDate=ne,V.requestEndDate=new Date,V.firstByteDate=V.firstByteDate||ne,V.checkExistenceOnly||(Y.addHttpRequest(V,he.response?he.response.responseURL:null,he.response?he.response.status:null,he.response&&he.response.getAllResponseHeaders?he.response.getAllResponseHeaders():he.response?he.response.responseHeaders:[],tt?te:null),V.type===h.HTTPRequest.MPD_TYPE&&Y.addManifestUpdate(V))},_e=function(){if(me.indexOf(he)!==-1&&(me.splice(me.indexOf(he),1),ae))if(ye(!1),y>0)(function(){try{if(ee.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&V.type===h.HTTPRequest.MEDIA_SEGMENT_TYPE){var tt=oe.getRetryAttemptsForType(h.HTTPRequest.MEDIA_SEGMENT_TYPE);tt===y&&J.trigger(D.default.ATTEMPT_BACKGROUND_SYNC)}}catch(Ct){}y--;var St={config:d};Q.push(St),St.timeout=setTimeout(function(){Q.indexOf(St)!==-1&&(Q.splice(Q.indexOf(St),1),c(d,y))},oe.getRetryIntervalsForType(V.type))})();else{if(V.type===h.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;U.error(new C.default(X[V.type],V.url+" is not available",{request:V,response:he.response})),d.error&&d.error(V,"error",he.response.statusText),d.complete&&d.complete(V,he.response.statusText)}},pe=function(tt){var St=new Date;$&&($=!1,(!tt.lengthComputable||tt.lengthComputable&&tt.total!==tt.loaded)&&(V.firstByteDate=St)),tt.lengthComputable&&(V.bytesLoaded=tt.loaded,V.bytesTotal=tt.total),tt.noTrace||(te.push({s:Se,d:tt.time?tt.time:St.getTime()-Se.getTime(),b:[tt.loaded?tt.loaded-Ie:0]}),Se=St,Ie=tt.loaded),d.progress&&tt&&d.progress(tt)},De=function(){he.response.status>=200&&he.response.status<=299&&(ye(!0),d.success&&d.success(he.response.response,he.response.statusText,he.response.responseURL),d.complete&&d.complete(V,he.response.statusText))},je=function(){d.abort&&d.abort(V)},Fe=function(tt){var St=void 0;if(tt.lengthComputable){var Ct=tt.loaded/tt.total*100;St="Request timeout: loaded: "+tt.loaded+", out of: "+tt.total+" : "+Ct.toFixed(3)+"% Completed"}else St="Request timeout: non-computable download size";le.warn(St)},Le=void 0;ve&&window.fetch&&V.responseType==="arraybuffer"&&V.type===h.HTTPRequest.MEDIA_SEGMENT_TYPE?Le=(0,f.default)(x).create({requestModifier:ue,boxParser:re}):Le=(0,o.default)(x).create({requestModifier:ue});var Ve=null,Ge=ue.modifyRequestURL(V.url);if(ee.get().streaming.cmcd&&ee.get().streaming.cmcd.enabled){var we=ee.get().streaming.cmcd.mode;if(we===O.default.CMCD_MODE_QUERY){var at=E(V);Ge=w.default.addAditionalQueryParameterToUrl(Ge,at)}else we===O.default.CMCD_MODE_HEADER&&(Ve=j.getHeaderParameters(V))}var Re=V.checkExistenceOnly?h.HTTPRequest.HEAD:h.HTTPRequest.GET,Xe=oe.getXHRWithCredentialsForType(V.type);he={url:Ge,method:Re,withCredentials:Xe,request:V,onload:De,onend:_e,onerror:_e,progress:pe,onabort:je,ontimeout:Fe,loader:Le,timeout:se,headers:Ve};var lt=new Date().getTime();isNaN(V.delayLoadingTime)||lt>=V.delayLoadingTime?(me.push(he),Le.load(he)):function(){var ct={httpRequest:he};de.push(ct),ct.delayTimeout=setTimeout(function(){if(de.indexOf(ct)!==-1){de.splice(de.indexOf(ct),1);try{ne=new Date,Se=ne,me.push(ct.httpRequest),Le.load(ct.httpRequest)}catch(tt){ct.httpRequest.onerror()}}},V.delayLoadingTime-lt)}()}function E(d){try{var y=[],V=j.getQueryParameter(d);return V&&y.push(V),y}catch(te){return[]}}function b(d){d.request?c(d,oe.getRetryAttemptsForType(d.request.type)):d.error&&d.error(d.request,"error")}function l(){Q.forEach(function(d){clearTimeout(d.timeout),d.config.request&&d.config.abort&&d.config.abort(d.config.request)}),Q=[],de.forEach(function(d){return clearTimeout(d.delayTimeout)}),de=[],me.forEach(function(d){d.request.type!==h.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(d.onloadend=d.onerror=d.onprogress=void 0,d.loader.abort(d))}),me=[]}return ie={load:b,abort:l},G(),ie}B.__dashjs_factory_name="HTTPLoader";var L=u.default.getClassFactory(B);r.default=L,g.exports=r.default},{"112":112,"153":153,"160":160,"164":164,"239":239,"255":255,"45":45,"46":46,"47":47,"48":48,"49":49,"54":54}],162:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(161),n=t(o);function f(){var m=void 0,u=void 0;function _(H,N){u[H]=N}function C(H){u[H]&&delete u[H]}function k(){u={}}function R(H){for(var N in u)if(u.hasOwnProperty(N)&&H.startsWith(N))return u[N];return n.default}function P(){k()}function w(){P()}return w(),m={getLoader:R,registerLoader:_,unregisterLoader:C,unregisterAllLoader:k,reset:P},m}f.__dashjs_factory_name="SchemeLoaderFactory";var h=i.default.getSingletonFactory(f);r.default=h,g.exports=r.default},{"161":161,"47":47}],163:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(162),n=t(o);function f(m){m=m||{};var u=this.context,_=void 0,C=void 0,k=void 0;C=(0,n.default)(u).getInstance();function R(w){var H=C.getLoader(w&&w.request?w.request.url:null);k=H(u).create({errHandler:m.errHandler,mediaPlayerModel:m.mediaPlayerModel,requestModifier:m.requestModifier,useFetch:m.useFetch||null,dashMetrics:m.dashMetrics,boxParser:m.boxParser?m.boxParser:null,constants:m.constants?m.constants:null,dashConstants:m.dashConstants?m.dashConstants:null,urlUtils:m.urlUtils?m.urlUtils:null,requestTimeout:isNaN(m.requestTimeout)?0:m.requestTimeout,errors:m.errors}),k.load(w)}function P(){k&&k.abort()}return _={load:R,abort:P},_}f.__dashjs_factory_name="URLLoader";var h=i.default.getClassFactory(f);r.default=h,g.exports=r.default},{"162":162,"47":47}],164:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(f){return f&&f.__esModule?f:{default:f}}var p=e(47),i=t(p);function o(f){f=f||{};var h=f.requestModifier,m=void 0;function u(C){var k=new Date,R=C.request,P=new XMLHttpRequest;if(P.open(C.method,C.url,!0),R.responseType&&(P.responseType=R.responseType),R.range&&P.setRequestHeader("Range","bytes="+R.range),R.requestStartDate||(R.requestStartDate=k),h&&(P=h.modifyRequestHeader(P)),C.headers)for(var w in C.headers){var H=C.headers[w];H&&P.setRequestHeader(w,H)}P.withCredentials=C.withCredentials,P.onload=C.onload,P.onloadend=C.onend,P.onerror=C.onerror,P.onprogress=C.progress,P.onabort=C.onabort,P.ontimeout=C.ontimeout,P.timeout=C.timeout,P.send(),C.response=P}function _(C){var k=C.response;k.onloadend=k.onerror=k.onprogress=void 0,k.abort()}return m={load:u,abort:_},m}o.__dashjs_factory_name="XHRLoader";var n=i.default.getClassFactory(o);r.default=n,g.exports=r.default},{"47":47}],165:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(){p(this,o)}return t(o,null,[{key:"findCencContentProtection",value:function(f){for(var h=null,m=0;m<f.length;++m){var u=f[m];u.schemeIdUri.toLowerCase()==="urn:mpeg:dash:mp4protection:2011"&&(u.value.toLowerCase()==="cenc"||u.value.toLowerCase()==="cbcs")&&(h=u)}return h}},{key:"getPSSHData",value:function(f){var h=8,m=new DataView(f),u=m.getUint8(h);return h+=20,u>0&&(h+=4+16*m.getUint32(h)),h+=4,f.slice(h)}},{key:"getPSSHForKeySystem",value:function(f,h){var m=o.parsePSSHList(h);return f&&m.hasOwnProperty(f.uuid.toLowerCase())?m[f.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(f,h){return"pssh"in f?(f.pssh.__text=f.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),h.decodeArray(f.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(f){if(f==null)return[];for(var h=new DataView(f.buffer||f),m=!1,u={},_=0;!m;){var C=void 0,k=void 0,R=void 0,P=void 0,w=void 0,H=_;if(_>=h.buffer.byteLength)break;if(C=h.getUint32(_),k=_+C,_+=4,h.getUint32(_)!==1886614376){_=k;continue}if(_+=4,R=h.getUint8(_),R!==0&&R!==1){_=k;continue}_++,_+=3,P="";var N=void 0,A=void 0;for(N=0;N<4;N++)A=h.getUint8(_+N).toString(16),P+=A.length===1?"0"+A:A;for(_+=4,P+="-",N=0;N<2;N++)A=h.getUint8(_+N).toString(16),P+=A.length===1?"0"+A:A;for(_+=2,P+="-",N=0;N<2;N++)A=h.getUint8(_+N).toString(16),P+=A.length===1?"0"+A:A;for(_+=2,P+="-",N=0;N<2;N++)A=h.getUint8(_+N).toString(16),P+=A.length===1?"0"+A:A;for(_+=2,P+="-",N=0;N<6;N++)A=h.getUint8(_+N).toString(16),P+=A.length===1?"0"+A:A;_+=6,P=P.toLowerCase(),w=h.getUint32(_),_+=4,u[P]=h.buffer.slice(H,k),_=k}return u}}]),o}();r.default=i,g.exports=r.default},{}],166:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(I){return I&&I.__esModule?I:{default:I}}var p=e(168),i=t(p),o=e(169),n=t(o),f=e(167),h=t(f),m=e(174),u=t(m),_=e(176),C=t(_),k=e(177),R=t(k),P=e(175),w=t(P),H=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],N=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function A(){var I=void 0,D=this.context;function v(O){var B=null,L=(0,n.default)(D).getInstance();L.setConfig({debug:O.debug,BASE64:O.BASE64}),L.initialize();var K=T(O);return!B&&K&&(B=(0,i.default)(D).create({protectionModel:K,protectionKeyController:L,eventBus:O.eventBus,debug:O.debug,events:O.events,BASE64:O.BASE64,constants:O.constants,cmcdModel:O.cmcdModel,settings:O.settings}),O.capabilities.setEncryptedMediaSupported(!0)),B}function T(O){var B=O.debug,L=B.getLogger(I),K=O.eventBus,x=O.errHandler,U=O.videoModel?O.videoModel.getElement():null;return(!U||U.onencrypted!==void 0)&&(!U||U.mediaKeys!==void 0)?(L.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,C.default)(D).create({debug:B,eventBus:K,events:O.events})):W(U,N)?(L.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,R.default)(D).create({debug:B,eventBus:K,events:O.events,api:W(U,N)})):W(U,H)?(L.info("EME detected on this user agent! (ProtectionModel_01b)"),(0,w.default)(D).create({debug:B,eventBus:K,errHandler:x,events:O.events,api:W(U,H)})):(L.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null)}function W(O,B){for(var L=0;L<B.length;L++){var K=B[L];if(typeof O[K[Object.keys(K)[0]]]=="function")return K}return null}return I={createProtectionSystem:v},I}A.__dashjs_factory_name="Protection";var M=dashjs.FactoryMaker.getClassFactory(A);M.events=h.default,M.errors=u.default,dashjs.FactoryMaker.updateClassFactory(A.__dashjs_factory_name,M),r.default=M,g.exports=r.default},{"167":167,"168":168,"169":169,"174":174,"175":175,"176":176,"177":177}],167:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(55),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",this.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.LICENSE_REQUEST_SENDING="public_licenseRequestSending",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected"}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"55":55}],168:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(L){return L&&L.__esModule?L:{default:L}}var p=e(165),i=t(p),o=e(189),n=t(o),f=e(186),h=t(f),m=e(174),u=t(m),_=e(239),C=t(_),k=e(187),R=t(k),P=e(188),w=t(P),H=e(255),N=e(49),A=t(N),M=e(112),I=t(M),D=5,v=500,T=3,W=1e3,O=8e3;function B(L){L=L||{};var K=L.protectionKeyController,x=L.protectionModel,U=L.eventBus,Y=L.events,oe=L.debug,ue=L.BASE64,re=L.constants,ve=[],ce=L.cmcdModel,se=L.settings,J=void 0,ee=void 0,ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0,le=void 0,G=void 0;function c(){ee=oe.getLogger(J),ie=[],me=[],Q="temporary",X="",le=[],G=[]}function E(){if(!U||!U.hasOwnProperty("on")||!K||!K.hasOwnProperty("getSupportedKeySystemsFromContentProtection"))throw new Error("Missing config parameter(s)")}function b(We){if(!We)throw new Error("mediaInfo can not be null or undefined");E(),U.on(Y.INTERNAL_KEY_MESSAGE,Re,this),U.on(Y.INTERNAL_KEY_STATUS_CHANGED,at,this),me.push(We);var He=K.getSupportedKeySystemsFromContentProtection(We.contentProtection);He&&He.length>0&&Le(He,!0)}function l(We){me=me.filter(function(He){return He.streamInfo.id!==We})}function d(We){return E(),K.getSupportedKeySystemsFromContentProtection(We)}function y(We,He){var ze=i.default.getPSSHForKeySystem(j,We),mt=De(j);if(ze){if(V(ze))return;try{x.createKeySession(ze,mt,Fe(j),He)}catch(vt){U.trigger(Y.KEY_SESSION_CREATED,{data:null,error:new C.default(u.default.KEY_SESSION_CREATED_ERROR_CODE,u.default.KEY_SESSION_CREATED_ERROR_MESSAGE+vt.message)})}}else We?x.createKeySession(We,mt,Fe(j),He):U.trigger(Y.KEY_SESSION_CREATED,{data:null,error:new C.default(u.default.KEY_SESSION_CREATED_ERROR_CODE,u.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(j?j.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function V(We){if(!We)return!1;try{for(var He=x.getAllInitData(),ze=0;ze<He.length;ze++)if(K.initDataEquals(We,He[ze]))return ee.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(mt){return!1}}function te(We,He){E(),x.loadKeySession(We,He,Fe(j))}function $(We){E(),x.removeKeySession(We)}function ae(We){E(),x.closeKeySession(We)}function ne(We){E(),x.setServerCertificate(We)}function Se(We){E(),We?(x.setMediaElement(We),U.on(Y.NEED_KEY,lt,this)):We===null&&(x.setMediaElement(We),U.off(Y.NEED_KEY,lt,this))}function Ie(We){Q=We}function he(We){X=We}function ye(We){de=We,K.setProtectionData(We)}function _e(){x&&x.stop()}function pe(){E(),le=[],G=[],U.off(Y.INTERNAL_KEY_MESSAGE,Re,this),U.off(Y.INTERNAL_KEY_STATUS_CHANGED,at,this),Se(null),j=void 0,x&&(x.reset(),x=null),ve.forEach(function(We){return clearTimeout(We)}),ve=[],me=[]}function De(We){var He=null;if(We){var ze=We.systemString;de&&(He=ze in de?de[ze]:null)}return He}function je(We){var He=De(We),ze=[],mt=[],vt=He&&He.audioRobustness&&He.audioRobustness.length>0?He.audioRobustness:X,pt=He&&He.videoRobustness&&He.videoRobustness.length>0?He.videoRobustness:X,Rt=Fe(We),Ce=He&&He.distinctiveIdentifier?He.distinctiveIdentifier:"optional",Pe=He&&He.persistentState?He.persistentState:Rt==="temporary"?"optional":"required";return me.forEach(function(Ye){Ye.type===re.AUDIO?ze.push(new n.default(Ye.codec,vt)):Ye.type===re.VIDEO&&mt.push(new n.default(Ye.codec,pt))}),new h.default(ze,mt,Ce,Pe,[Rt])}function Fe(We){var He=De(We),ze=He&&He.sessionType?He.sessionType:Q;return ze}function Le(We,He){We=We.sort(function(ze,mt){var vt=de&&de[ze.ks.systemString]&&de[ze.ks.systemString].priority>=0?de[ze.ks.systemString].priority:We.length,pt=de&&de[mt.ks.systemString]&&de[mt.ks.systemString].priority>=0?de[mt.ks.systemString].priority:We.length;return vt-pt}),j===void 0?Ge(We,He):j?Ve(We,He):ie.push(We)}function Ve(We,He){var ze=this,mt=[],vt=We.findIndex(function(Ce){return Ce.ks===j});if(!(vt===-1||!We[vt].initData)){var pt=i.default.getPSSHForKeySystem(j,We[vt].initData);if(!V(pt)){mt.push({ks:We[vt].ks,configs:[je(j)]});var Rt=function Ce(Pe){if(U.off(Y.KEY_SYSTEM_ACCESS_COMPLETE,Ce,ze),Pe.error)He||U.trigger(Y.KEY_SYSTEM_SELECTED,{error:new C.default(u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+Pe.error)});else{ee.info("DRM: KeySystem Access Granted"),U.trigger(Y.KEY_SYSTEM_SELECTED,{data:Pe.data});var Ye=De(j);if(K.isClearKey(j)&&Ye&&Ye.hasOwnProperty("clearkeys")){var Ze={kids:Object.keys(Ye.clearkeys)};We[vt].initData=new TextEncoder().encode(JSON.stringify(Ze))}We[vt].sessionId?te(We[vt].sessionId,We[vt].initData):We[vt].initData&&y(We[vt].initData,We[vt].cdmData)}};U.on(Y.KEY_SYSTEM_ACCESS_COMPLETE,Rt,ze),x.requestKeySystemAccess(mt)}}}function Ge(We,He){var ze=this,mt=[],vt=void 0;j=null,ie.push(We);for(var pt=0;pt<We.length;pt++)mt.push({ks:We[pt].ks,configs:[je(We[pt].ks)]});var Rt=void 0,Ce=function Ye(Ze){U.off(Y.KEY_SYSTEM_ACCESS_COMPLETE,Ye,ze),Ze.error?(j=void 0,U.off(Y.INTERNAL_KEY_SYSTEM_SELECTED,Pe,ze),He||U.trigger(Y.KEY_SYSTEM_SELECTED,{data:null,error:new C.default(u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+Ze.error)})):(Rt=Ze.data,ee.info("DRM: KeySystem Access Granted ("+Rt.keySystem.systemString+")! Selecting key system..."),x.selectKeySystem(Rt))},Pe=function Ye(Ze){if(U.off(Y.INTERNAL_KEY_SYSTEM_SELECTED,Ye,ze),U.off(Y.KEY_SYSTEM_ACCESS_COMPLETE,Ce,ze),Ze.error)j=void 0,He||U.trigger(Y.KEY_SYSTEM_SELECTED,{data:null,error:new C.default(u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,u.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+Ze.error)});else{if(!x)return;j=x.getKeySystem(),U.trigger(Y.KEY_SYSTEM_SELECTED,{data:Rt});var ut=De(j);ut&&ut.serverCertificate&&ut.serverCertificate.length>0&&x.setServerCertificate(ue.decodeArray(ut.serverCertificate).buffer);for(var Ue=0;Ue<ie.length;Ue++)for(vt=0;vt<ie[Ue].length;vt++)if(j===ie[Ue][vt].ks){if(K.isClearKey(j)&&ut&&ut.hasOwnProperty("clearkeys")){var Je={kids:Object.keys(ut.clearkeys)};ie[Ue][vt].initData=new TextEncoder().encode(JSON.stringify(Je))}ie[Ue][vt].sessionId?te(ie[Ue][vt].sessionId,ie[Ue][vt].initData):ie[Ue][vt].initData!==null&&y(ie[Ue][vt].initData,ie[Ue][vt].cdmData);break}}};U.on(Y.INTERNAL_KEY_SYSTEM_SELECTED,Pe,ze),U.on(Y.KEY_SYSTEM_ACCESS_COMPLETE,Ce,ze),x.requestKeySystemAccess(mt)}function we(We,He){U.trigger(Y.LICENSE_REQUEST_COMPLETE,{data:We,error:He})}function at(We){We.error?U.trigger(Y.KEY_STATUSES_CHANGED,{data:null,error:We.error}):ee.debug("DRM: key status = "+We.status)}function Re(We){ee.debug("DRM: onKeyMessage");var He=We.data;U.trigger(Y.KEY_MESSAGE,{data:He});var ze=He.messageType?He.messageType:"license-request",mt=He.message,vt=He.sessionToken,pt=De(j),Rt=j?j.systemString:null,Ce=K.getLicenseServer(j,pt,ze),Pe={sessionToken:vt,messageType:ze};if(!mt||mt.byteLength===0){we(Pe,new C.default(u.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE));return}if(!Ce){ee.debug("DRM: License server request not required for this message (type = "+We.data.messageType+"). Session ID = "+vt.getSessionID()),we(Pe);return}if(K.isClearKey(j)){var Ye=K.processClearKeyLicenseRequest(j,pt,mt);if(Ye){ee.debug("DRM: ClearKey license request handled by application!"),we(Pe),x.updateKeySession(vt,Ye);return}}var Ze=null;if(pt&&pt.serverURL){var ut=pt.serverURL;typeof ut=="string"&&ut!==""?Ze=ut:typeof ut=="object"&&ut.hasOwnProperty(ze)&&(Ze=ut[ze])}else if(pt&&pt.laURL&&pt.laURL!=="")Ze=pt.laURL;else if(K.isClearKey(j))Ze=j.getLicenseServerUrlFromMediaInfo(me);else{var Ue=i.default.getPSSHData(vt.initData);Ze=j.getLicenseServerURLFromInitData(Ue),Ze||(Ze=We.data.laURL)}if(Ze=Ce.getServerURLFromMessage(Ze,mt,ze),!Ze){we(Pe,new C.default(u.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));return}var Je={},ht=!1,Et=function(Te){if(Te)for(var be in Te)be.toLowerCase()==="authorization"&&(ht=!0),Je[be]=Te[be]};pt&&Et(pt.httpRequestHeaders),Et(j.getRequestHeadersFromMessage(mt)),pt&&typeof pt.withCredentials=="boolean"&&(ht=pt.withCredentials);var rt=function(Te,be,Oe,Qe){var Tt=Te.response?Ce.getErrorResponse(Te.response,Oe,Qe):"NONE";we(be,new C.default(u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Oe+' update, XHR complete. status is "'+Te.statusText+'" ('+Te.status+"), readyState is "+Te.readyState+". Response is "+Tt))},Dt=function(Te){!x||(Te.status===200?function(){var be=new w.default(Te.responseURL,A.default.parseHttpHeaders(Te.getAllResponseHeaders?Te.getAllResponseHeaders():null),Te.response);wt(G,be).then(function(){var Oe=Ce.getLicenseMessage(be.data,Rt,ze);Oe!==null?(we(Pe),x.updateKeySession(vt,Oe)):rt(Te,Pe,Rt,ze)})}():rt(Te,Pe,Rt,ze))},kt=function(Te){we(Pe,new C.default(u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Rt+' update, XHR aborted. status is "'+Te.statusText+'" ('+Te.status+"), readyState is "+Te.readyState))},ft=function(Te){we(Pe,new C.default(u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Rt+' update, XHR error. status is "'+Te.statusText+'" ('+Te.status+"), readyState is "+Te.readyState))},Gt=j.getLicenseRequestFromMessage(mt),Kt=Ce.getHTTPMethod(ze),Vt=Ce.getResponseType(Rt,ze),Pt=pt&&!isNaN(pt.httpTimeout)?pt.httpTimeout:O,Ee=vt.getSessionID()||null,Z=new R.default(Ze,Kt,Vt,Je,ht,ze,Ee,Gt);wt(le,Z).then(function(){Xe(Z,T,Pt,Dt,kt,ft)})}function Xe(We,He,ze,mt,vt,pt){var Rt=new XMLHttpRequest;if(se.get().streaming.cmcd&&se.get().streaming.cmcd.enabled){var Ce=se.get().streaming.cmcd.mode;if(Ce===I.default.CMCD_MODE_QUERY){var Pe=ce.getQueryParameter({url:We.url,type:H.HTTPRequest.LICENSE});Pe&&(We.url=A.default.addAditionalQueryParameterToUrl(We.url,[Pe]))}}Rt.open(We.method,We.url,!0),Rt.responseType=We.responseType,Rt.withCredentials=We.withCredentials,ze>0&&(Rt.timeout=ze);for(var Ye in We.headers)Rt.setRequestHeader(Ye,We.headers[Ye]);if(se.get().streaming.cmcd&&se.get().streaming.cmcd.enabled){var Ce=se.get().streaming.cmcd.mode;if(Ce===I.default.CMCD_MODE_HEADER){var Ze=ce.getHeaderParameters({url:We.url,type:H.HTTPRequest.LICENSE});if(Ze)for(var ut in Ze){var Ue=Ze[ut];Ue&&Rt.setRequestHeader(ut,Ue)}}}var Je=function(){He--,setTimeout(function(){Xe(We,He,ze,mt,vt,pt)},W)};Rt.onload=function(){this.status===200||He<=0?mt(this):(ee.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+He),Je())},Rt.ontimeout=Rt.onerror=function(){He<=0?pt(this):(ee.warn("License request network request failed . Retrying it... Pending retries: "+He),Je())},Rt.onabort=function(){vt(this)},U.trigger(Y.LICENSE_REQUEST_SENDING,{url:We.url,headers:We.headers,payload:We.data,sessionId:We.sessionId}),Rt.send(We.data)}function lt(We,He){if(ee.debug("DRM: onNeedKey"),We.key.initDataType!=="cenc"){ee.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+We.key.initDataType);return}if(me.length===0&&(ee.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),He=typeof He=="undefined"?1:He+1,He<D)){ve.push(setTimeout(function(){lt(We,He)},v));return}var ze=We.key.initData;if(ArrayBuffer.isView(ze)&&(ze=ze.buffer),j){var mt=i.default.getPSSHForKeySystem(j,ze);if(mt&&V(mt))return}ee.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(ze)));var vt=K.getSupportedKeySystems(ze,de);if(vt.length===0){ee.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");return}Le(vt,!1)}function ct(){return K?K.getKeySystems():[]}function tt(We){K&&K.setKeySystems(We)}function St(We){le=We}function Ct(We){G=We}function wt(We,He){return We?We.reduce(function(ze,mt){return ze.then(function(){return mt(He)})},Promise.resolve()):Promise.resolve()}return J={initializeForMedia:b,clearMediaInfoArrayByStreamId:l,createKeySession:y,loadKeySession:te,removeKeySession:$,closeKeySession:ae,setServerCertificate:ne,setMediaElement:Se,setSessionType:Ie,setRobustnessLevel:he,setProtectionData:ye,getSupportedKeySystemsFromContentProtection:d,getKeySystems:ct,setKeySystems:tt,setLicenseRequestFilters:St,setLicenseResponseFilters:Ct,stop:_e,reset:pe},c(),J}B.__dashjs_factory_name="ProtectionController",r.default=dashjs.FactoryMaker.getClassFactory(B),g.exports=r.default},{"112":112,"165":165,"174":174,"186":186,"187":187,"188":188,"189":189,"239":239,"255":255,"49":49}],169:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(T){return T&&T.__esModule?T:{default:T}}var p=e(165),i=t(p),o=e(170),n=t(o),f=e(172),h=t(f),m=e(173),u=t(m),_=e(171),C=t(_),k=e(179),R=t(k),P=e(180),w=t(P),H=e(181),N=t(H),A=e(178),M=t(A),I=e(114),D=t(I);function v(){var T=this.context,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0;function Y(Q){!Q||(Q.debug&&(O=Q.debug,B=O.getLogger(W)),Q.BASE64&&(K=Q.BASE64))}function oe(){L=[];var Q=void 0;Q=(0,C.default)(T).getInstance({BASE64:K}),L.push(Q),Q=(0,u.default)(T).getInstance({BASE64:K}),L.push(Q),Q=(0,n.default)(T).getInstance({BASE64:K}),L.push(Q),x=Q,Q=(0,h.default)(T).getInstance({BASE64:K,debug:O}),L.push(Q),U=Q}function ue(){return L}function re(Q){L=Q}function ve(Q){for(var X=0;X<L.length;X++)if(L[X].systemString===Q)return L[X];return null}function ce(Q){return Q===x||Q===U}function se(Q,X){if(Q.byteLength===X.byteLength){for(var j=new Uint8Array(Q),le=new Uint8Array(X),G=0;G<j.length;G++)if(j[G]!==le[G])return!1;return!0}return!1}function J(Q){var X=void 0,j=void 0,le=void 0,G=void 0,c=[];if(Q){var E=i.default.findCencContentProtection(Q);for(le=0;le<L.length;++le)for(j=L[le],G=0;G<Q.length;++G)if(X=Q[G],X.schemeIdUri.toLowerCase()===j.schemeIdURI){var b=j.getInitData(X,E);c.push({ks:L[le],initData:b,cdmData:j.getCDMData(),sessionId:j.getSessionId(X)})}}return c}function ee(Q,X){for(var j=[],le=i.default.parsePSSHList(Q),G=void 0,c=void 0,E=void 0,b=0;b<L.length;++b)G=L[b],c=G.systemString,E=X?c in X:!0,G.uuid in le&&E&&j.push({ks:G,initData:le[G.uuid],cdmData:G.getCDMData(),sessionId:G.getSessionId()});return j}function ie(Q,X,j){if(j==="license-release"||j==="individualization-request")return null;var le=null;return X&&X.hasOwnProperty("drmtoday")?le=(0,R.default)(T).getInstance({BASE64:K}):Q.systemString===D.default.WIDEVINE_KEYSTEM_STRING?le=(0,N.default)(T).getInstance():Q.systemString===D.default.PLAYREADY_KEYSTEM_STRING?le=(0,w.default)(T).getInstance():Q.systemString===D.default.CLEARKEY_KEYSTEM_STRING&&(le=(0,M.default)(T).getInstance()),le}function me(Q,X,j){try{return Q.getClearKeysFromProtectionData(X,j)}catch(le){return B.error("Failed to retrieve clearkeys from ProtectionData"),null}}function de(Q){for(var X=function(c){var E=null;return Q&&(E=c in Q?Q[c]:null),E},j=0;j<L.length;j++){var le=L[j];le.hasOwnProperty("init")&&le.init(X(le.systemString))}}return W={initialize:oe,setProtectionData:de,isClearKey:ce,initDataEquals:se,getKeySystems:ue,setKeySystems:re,getKeySystemBySystemString:ve,getSupportedKeySystemsFromContentProtection:J,getSupportedKeySystems:ee,getLicenseServer:ie,processClearKeyLicenseRequest:me,setConfig:Y},W}v.__dashjs_factory_name="ProtectionKeyController",r.default=dashjs.FactoryMaker.getSingletonFactory(v),g.exports=r.default},{"114":114,"165":165,"170":170,"171":171,"172":172,"173":173,"178":178,"179":179,"180":180,"181":181}],170:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(184),i=t(p),o=e(182),n=t(o),f=e(165),h=t(f),m=e(114),u=t(m),_="e2719d58-a985-b3c9-781a-b030af78d30e",C=u.default.CLEARKEY_KEYSTEM_STRING,k="urn:uuid:"+_;function R(P){P=P||{};var w=void 0,H=P.BASE64,N={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]};function A(L,K){var x=null;if(L){for(var U=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(K))),Y=[],oe=0;oe<U.kids.length;oe++){var ue=U.kids[oe],re=L.clearkeys&&L.clearkeys.hasOwnProperty(ue)?L.clearkeys[ue]:null;if(!re)throw new Error("DRM: ClearKey keyID ("+ue+") is not known!");Y.push(new i.default(ue,re))}x=new n.default(Y)}return x}function M(L,K){try{var x=h.default.parseInitDataFromContentProtection(L,H);if(!x&&K){var U=I(K["cenc:default_KID"]),Y={kids:[U]};x=new TextEncoder().encode(JSON.stringify(Y))}return x}catch(oe){return null}}function I(L){try{var K=L.replace(/-/g,"");return K=btoa(K.match(/\w{2}/g).map(function(x){return String.fromCharCode(parseInt(x,16))}).join("")),K.replace(/=/g,"")}catch(x){return null}}function D(){return{"Content-Type":"application/json"}}function v(L){return JSON.parse(String.fromCharCode.apply(null,new Uint8Array(L)))}function T(){return null}function W(L){try{if(!L||L.length===0)return null;for(var K=0,x=null;K<L.length&&!x;){var U=L[K];if(U&&U.contentProtection&&U.contentProtection.length>0){var Y=U.contentProtection.filter(function(J){return J.schemeIdUri&&J.schemeIdUri===k});if(Y&&Y.length>0)for(var oe=0;oe<Y.length&&!x;){for(var ue=Y[oe],re=0;re<N.attributes.length&&!x;){for(var ve=0,ce=N.attributes[re];ve<N.prefixes.length&&!x;){var se=N.prefixes[ve];ue[ce]&&ue[ce].__prefix&&ue[ce].__prefix===se&&ue[ce].__text&&(x=ue[ce].__text),ve+=1}re+=1}oe+=1}}K+=1}return x}catch(J){return null}}function O(){return null}function B(){return null}return w={uuid:_,schemeIdURI:k,systemString:C,getInitData:M,getRequestHeadersFromMessage:D,getLicenseRequestFromMessage:v,getLicenseServerURLFromInitData:T,getCDMData:O,getSessionId:B,getLicenseServerUrlFromMediaInfo:W,getClearKeysFromProtectionData:A},w}R.__dashjs_factory_name="KeySystemClearKey",r.default=dashjs.FactoryMaker.getSingletonFactory(R),g.exports=r.default},{"114":114,"165":165,"182":182,"184":184}],171:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(k){return k&&k.__esModule?k:{default:k}}var p=e(165),i=t(p),o=e(114),n=t(o),f="9a04f079-9840-4286-ab92-e65be0885f95",h=n.default.PLAYREADY_KEYSTEM_STRING,m="urn:uuid:"+f,u='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>',_=void 0;function C(k){k=k||{};var R=void 0,P="utf-16",w=k.BASE64;function H(){if(!w||!w.hasOwnProperty("decodeArray")||!w.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}function N(O){var B=void 0,L=void 0,K={},x=new DOMParser,U=P==="utf-16"?new Uint16Array(O):new Uint8Array(O);B=String.fromCharCode.apply(null,U),L=x.parseFromString(B,"application/xml");for(var Y=L.getElementsByTagName("name"),oe=L.getElementsByTagName("value"),ue=0;ue<Y.length;ue++)K[Y[ue].childNodes[0].nodeValue]=oe[ue].childNodes[0].nodeValue;return K.hasOwnProperty("Content")&&(K["Content-Type"]=K.Content,delete K.Content),K.hasOwnProperty("Content-Type")||(K["Content-Type"]="text/xml; charset=utf-8"),K}function A(O){var B=null,L=new DOMParser,K=P==="utf-16"?new Uint16Array(O):new Uint8Array(O);H();var x=String.fromCharCode.apply(null,K),U=L.parseFromString(x,"application/xml");if(U.getElementsByTagName("PlayReadyKeyMessage")[0]){var Y=U.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;Y&&(B=w.decode(Y))}else return O;return B}function M(O){if(O)for(var B=new DataView(O),L=B.getUint16(4,!0),K=6,x=new DOMParser,U=0;U<L;U++){var Y=B.getUint16(K,!0);K+=2;var oe=B.getUint16(K,!0);if(K+=2,Y!==1){K+=oe;continue}var ue=O.slice(K,K+oe),re=String.fromCharCode.apply(null,new Uint16Array(ue)),ve=x.parseFromString(re,"application/xml");if(ve.getElementsByTagName("LA_URL")[0]){var ce=ve.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(ce)return ce}if(ve.getElementsByTagName("LUI_URL")[0]){var se=ve.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(se)return se}}return null}function I(O){var B=new Uint8Array([112,115,115,104,0,0,0,0]),L=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),K=0,x=null,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0;if(H(),!O)return null;if("pssh"in O)return i.default.parseInitDataFromContentProtection(O,w);if("pro"in O)x=w.decodeArray(O.pro.__text);else if("prheader"in O)x=w.decodeArray(O.prheader.__text);else return null;return U=x.length,Y=4+B.length+L.length+4+U,oe=new ArrayBuffer(Y),ue=new Uint8Array(oe),re=new DataView(oe),re.setUint32(K,Y),K+=4,ue.set(B,K),K+=B.length,ue.set(L,K),K+=L.length,re.setUint32(K,U),K+=4,ue.set(x,K),K+=U,ue.buffer}function D(O){if(O!=="utf-8"&&O!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');P=O}function v(O){O&&(_=O)}function T(){var O=void 0,B=void 0,L=void 0,K=void 0;if(H(),_&&_.cdmData){for(O=[],K=0;K<_.cdmData.length;++K)O.push(_.cdmData.charCodeAt(K)),O.push(0);for(O=String.fromCharCode.apply(null,O),O=w.encode(O),B=u.replace("%CUSTOMDATA%",O),L=[],K=0;K<B.length;++K)L.push(B.charCodeAt(K)),L.push(0);return new Uint8Array(L).buffer}return null}function W(O){return _&&_.sessionId?_.sessionId:O&&O.sessionId?O.sessionId:null}return R={uuid:f,schemeIdURI:m,systemString:h,getInitData:I,getRequestHeadersFromMessage:N,getLicenseRequestFromMessage:A,getLicenseServerURLFromInitData:M,getCDMData:T,getSessionId:W,setPlayReadyMessageFormat:D,init:v},R}C.__dashjs_factory_name="KeySystemPlayReady",r.default=dashjs.FactoryMaker.getSingletonFactory(C),g.exports=r.default},{"114":114,"165":165}],172:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(184),i=t(p),o=e(182),n=t(o),f=e(165),h=t(f),m=e(114),u=t(m),_="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",C=u.default.CLEARKEY_KEYSTEM_STRING,k="urn:uuid:"+_;function R(P){var w=void 0,H=P.BASE64,N=P.debug.getLogger(w);function A(O,B){var L=null;if(O){for(var K=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(B))),x=[],U=0;U<K.kids.length;U++){var Y=K.kids[U],oe=O.clearkeys&&O.clearkeys.hasOwnProperty(Y)?O.clearkeys[Y]:null;if(!oe)throw new Error("DRM: ClearKey keyID ("+Y+") is not known!");x.push(new i.default(Y,oe))}L=new n.default(x),N.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return L}function M(O){return h.default.parseInitDataFromContentProtection(O,H)}function I(){return null}function D(O){return new Uint8Array(O)}function v(){return null}function T(){return null}function W(){return null}return w={uuid:_,schemeIdURI:k,systemString:C,getInitData:M,getRequestHeadersFromMessage:I,getLicenseRequestFromMessage:D,getLicenseServerURLFromInitData:v,getCDMData:T,getSessionId:W,getClearKeysFromProtectionData:A},w}R.__dashjs_factory_name="KeySystemW3CClearKey",r.default=dashjs.FactoryMaker.getSingletonFactory(R),g.exports=r.default},{"114":114,"165":165,"182":182,"184":184}],173:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(_){return _&&_.__esModule?_:{default:_}}var p=e(165),i=t(p),o=e(114),n=t(o),f="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",h=n.default.WIDEVINE_KEYSTEM_STRING,m="urn:uuid:"+f;function u(_){_=_||{};var C=void 0,k=null,R=_.BASE64;function P(D){D&&(k=D)}function w(D){return i.default.parseInitDataFromContentProtection(D,R)}function H(){return null}function N(D){return new Uint8Array(D)}function A(){return null}function M(){return null}function I(D){return k&&k.sessionId?k.sessionId:D&&D.sessionId?D.sessionId:null}return C={uuid:f,schemeIdURI:m,systemString:h,init:P,getInitData:w,getRequestHeadersFromMessage:H,getLicenseRequestFromMessage:N,getLicenseServerURLFromInitData:A,getCDMData:M,getSessionId:I},C}u.__dashjs_factory_name="KeySystemWidevine",r.default=dashjs.FactoryMaker.getSingletonFactory(u),g.exports=r.default},{"114":114,"165":165}],174:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(_,C,k){var R=!0;e:for(;R;){var P=_,w=C,H=k;R=!1,P===null&&(P=Function.prototype);var N=Object.getOwnPropertyDescriptor(P,w);if(N===void 0){var A=Object.getPrototypeOf(P);if(A===null)return;_=A,C=w,k=H,R=!0,N=A=void 0;continue e}else{if("value"in N)return N.value;var M=N.get;return M===void 0?void 0:M.call(H)}}};function p(u){return u&&u.__esModule?u:{default:u}}function i(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}function o(u,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);u.prototype=Object.create(_&&_.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(u,_):u.__proto__=_)}var n=e(52),f=p(n),h=function(u){o(_,u);function _(){i(this,_),t(Object.getPrototypeOf(_.prototype),"constructor",this).call(this),this.MEDIA_KEYERR_CODE=100,this.MEDIA_KEYERR_UNKNOWN_CODE=101,this.MEDIA_KEYERR_CLIENT_CODE=102,this.MEDIA_KEYERR_SERVICE_CODE=103,this.MEDIA_KEYERR_OUTPUT_CODE=104,this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,this.MEDIA_KEYERR_DOMAIN_CODE=106,this.MEDIA_KEY_MESSAGE_ERROR_CODE=107,this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,this.KEY_SESSION_CREATED_ERROR_CODE=113,this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,this.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",this.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",this.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",this.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",this.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",this.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --"}return _}(f.default),m=new h;r.default=m,g.exports=r.default},{"52":52}],175:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(169),i=t(p),o=e(190),n=t(o),f=e(239),h=t(f),m=e(183),u=t(m),_=e(186),C=t(_),k=e(185),R=t(k),P=e(174),w=t(P);function H(N){N=N||{};var A=this.context,M=N.eventBus,I=N.events,D=N.debug,v=N.api,T=N.errHandler,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0;function ue(){O=D.getLogger(W),B=null,L=null,x=[],U=[],K=(0,i.default)(A).getInstance(),oe=le()}function re(){B&&c();for(var E=0;E<U.length;E++)de(U[E]);M.trigger(I.TEARDOWN_COMPLETE)}function ve(){return L}function ce(){for(var E=[],b=0;b<x.length;b++)E.push(x[b].initData);for(var b=0;b<U.length;b++)E.push(U[b].initData);return E}function se(E){var b=B;b||(b=document.createElement("video"));for(var l=!1,d=0;d<E.length;d++)for(var y=E[d].ks.systemString,V=E[d].configs,te=null,$=null,ae=0;ae<V.length;ae++){var ne=V[ae].videoCapabilities;if(ne&&ne.length!==0){$=[];for(var Se=0;Se<ne.length;Se++)b.canPlayType(ne[Se].contentType,y)!==""&&$.push(ne[Se])}if(!(!te&&!$||te&&te.length===0||$&&$.length===0)){l=!0;var Ie=new C.default(te,$),he=K.getKeySystemBySystemString(y);M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{data:new R.default(he,Ie)});break}}l||M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function J(E){L=E.keySystem,M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED)}function ee(E){if(B!==E){if(B){c();for(var b=0;b<U.length;b++)de(U[b]);U=[]}B=E,B&&(B.addEventListener(v.keyerror,oe),B.addEventListener(v.needkey,oe),B.addEventListener(v.keymessage,oe),B.addEventListener(v.keyadded,oe),M.trigger(I.VIDEO_ELEMENT_SELECTED))}}function ie(E){if(!L)throw new Error("Can not create sessions until you have selected a key system");if(Y||U.length===0){var b={sessionID:null,initData:E,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return x.push(b),B[v.generateKeyRequest](L.systemString,new Uint8Array(E)),b}else throw new Error("Multiple sessions not allowed!")}function me(E,b){var l=E.sessionID;if(!K.isClearKey(L))B[v.addKey](L.systemString,new Uint8Array(b),new Uint8Array(E.initData),l);else for(var d=0;d<b.keyPairs.length;d++)B[v.addKey](L.systemString,b.keyPairs[d].key,b.keyPairs[d].keyID,l)}function de(E){try{B[v.cancelKeyRequest](L.systemString,E.sessionID)}catch(b){M.trigger(I.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+E.sessionID+") "+b.message})}}function Q(){}function X(){}function j(){}function le(){return{handleEvent:function(b){var l=null;switch(b.type){case v.needkey:var d=ArrayBuffer.isView(b.initData)?b.initData.buffer:b.initData;M.trigger(I.NEED_KEY,{key:new n.default(d,"cenc")});break;case v.keyerror:if(l=G(U,b.sessionId),l||(l=G(x,b.sessionId)),l){var y=w.default.MEDIA_KEYERR_CODE,V="";switch(b.errorCode.code){case 1:y=w.default.MEDIA_KEYERR_UNKNOWN_CODE,V+="MEDIA_KEYERR_UNKNOWN - "+w.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:y=w.default.MEDIA_KEYERR_CLIENT_CODE,V+="MEDIA_KEYERR_CLIENT - "+w.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:y=w.default.MEDIA_KEYERR_SERVICE_CODE,V+="MEDIA_KEYERR_SERVICE - "+w.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:y=w.default.MEDIA_KEYERR_OUTPUT_CODE,V+="MEDIA_KEYERR_OUTPUT - "+w.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:y=w.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,V+="MEDIA_KEYERR_HARDWARECHANGE - "+w.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:y=w.default.MEDIA_KEYERR_DOMAIN_CODE,V+="MEDIA_KEYERR_DOMAIN - "+w.default.MEDIA_KEYERR_DOMAIN_MESSAGE;break}V+=" System Code = "+b.systemCode,M.trigger(I.KEY_ERROR,{data:new h.default(y,V,l)})}else O.error("No session token found for key error");break;case v.keyadded:l=G(U,b.sessionId),l||(l=G(x,b.sessionId)),l?(O.debug("DRM: Key added."),M.trigger(I.KEY_ADDED,{data:l})):O.debug("No session token found for key added");break;case v.keymessage:if(Y=b.sessionId!==null&&b.sessionId!==void 0,Y?(l=G(U,b.sessionId),!l&&x.length>0&&(l=x.shift(),U.push(l),l.sessionID=b.sessionId,M.trigger(I.KEY_SESSION_CREATED,{data:l}))):x.length>0&&(l=x.shift(),U.push(l),x.length!==0&&T.error(new h.default(w.default.MEDIA_KEY_MESSAGE_ERROR_CODE,w.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),l){var te=ArrayBuffer.isView(b.message)?b.message.buffer:b.message;l.keyMessage=te,M.trigger(I.INTERNAL_KEY_MESSAGE,{data:new u.default(l,te,b.defaultURL)})}else O.warn("No session token found for key message");break}}}}function G(E,b){if(!b||!E)return null;for(var l=E.length,d=0;d<l;d++)if(E[d].sessionID==b)return E[d];return null}function c(){B.removeEventListener(v.keyerror,oe),B.removeEventListener(v.needkey,oe),B.removeEventListener(v.keymessage,oe),B.removeEventListener(v.keyadded,oe)}return W={getAllInitData:ce,requestKeySystemAccess:se,getKeySystem:ve,selectKeySystem:J,setMediaElement:ee,createKeySession:ie,updateKeySession:me,closeKeySession:de,setServerCertificate:Q,loadKeySession:X,removeKeySession:j,stop:re,reset:re},ue(),W}H.__dashjs_factory_name="ProtectionModel_01b",r.default=dashjs.FactoryMaker.getClassFactory(H),g.exports=r.default},{"169":169,"174":174,"183":183,"185":185,"186":186,"190":190,"239":239}],176:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(169),i=t(p),o=e(190),n=t(o),f=e(174),h=t(f),m=e(239),u=t(m),_=e(183),C=t(_),k=e(185),R=t(k),P=e(114),w=t(P);function H(N){N=N||{};var A=this.context,M=N.eventBus,I=N.events,D=N.debug,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0;function U(){T=D.getLogger(v),W=null,O=null,B=null,L=[],x=(0,i.default)(A).getInstance(),K=le()}function Y(){var b=L.length,l=void 0;b!==0?function(){for(var d=function(te){G(te),L.length===0&&(O?(O.removeEventListener("encrypted",K),O.setMediaKeys(null).then(function(){M.trigger(I.TEARDOWN_COMPLETE)})):M.trigger(I.TEARDOWN_COMPLETE))},y=0;y<b;y++)l=L[y],function(V){l.session.closed.then(function(){d(V)}),j(l).catch(function(){d(V)})}(l)}():M.trigger(I.TEARDOWN_COMPLETE)}function oe(){for(var b=void 0,l=0;l<L.length;l++)b=L[l],b.getUsable()||j(b).catch(function(){G(b)})}function ue(){return W}function re(){for(var b=[],l=0;l<L.length;l++)L[l].initData&&b.push(L[l].initData);return b}function ve(b){X(b,0)}function ce(b){b.mksa.createMediaKeys().then(function(l){W=b.keySystem,B=l,O?O.setMediaKeys(B).then(function(){M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED)}):M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED)}).catch(function(){M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+b.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})}function se(b){O!==b&&(O&&(O.removeEventListener("encrypted",K),O.setMediaKeys&&O.setMediaKeys(null)),O=b,O&&(O.addEventListener("encrypted",K),O.setMediaKeys&&B&&O.setMediaKeys(B)))}function J(b){if(!W||!B)throw new Error("Can not set server certificate until you have selected a key system");B.setServerCertificate(b).then(function(){T.info("DRM: License server certificate successfully updated."),M.trigger(I.SERVER_CERTIFICATE_UPDATED)}).catch(function(l){M.trigger(I.SERVER_CERTIFICATE_UPDATED,{error:new u.default(h.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,h.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+l.name)})})}function ee(b,l,d){if(!W||!B)throw new Error("Can not create sessions until you have selected a key system");var y=B.createSession(d),V=E(y,b,d),te=this.getKeySystem(),$=te.systemString===w.default.CLEARKEY_KEYSTEM_STRING&&(b||l&&l.clearkeys)?"keyids":"cenc";y.generateRequest($,b).then(function(){T.debug("DRM: Session created. SessionID = "+V.getSessionID()),M.trigger(I.KEY_SESSION_CREATED,{data:V})}).catch(function(ae){G(V),M.trigger(I.KEY_SESSION_CREATED,{data:null,error:new u.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+ae.name)})})}function ie(b,l){var d=b.session;x.isClearKey(W)&&(l=l.toJWK()),d.update(l).catch(function(y){M.trigger(I.KEY_ERROR,{data:new u.default(h.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+y.name,b)})})}function me(b,l,d){if(!W||!B)throw new Error("Can not load sessions until you have selected a key system");for(var y=0;y<L.length;y++)if(b===L[y].sessionId){T.warn("DRM: Ignoring session ID because we have already seen it!");return}var V=B.createSession(d),te=E(V,l,d,b);V.load(b).then(function($){$?(T.debug("DRM: Session loaded. SessionID = "+te.getSessionID()),M.trigger(I.KEY_SESSION_CREATED,{data:te})):(G(te),M.trigger(I.KEY_SESSION_CREATED,{data:null,error:new u.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+b+")")}))}).catch(function($){G(te),M.trigger(I.KEY_SESSION_CREATED,{data:null,error:new u.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+b+")! "+$.name)})})}function de(b){var l=b.session;l.remove().then(function(){T.debug("DRM: Session removed. SessionID = "+b.getSessionID()),M.trigger(I.KEY_SESSION_REMOVED,{data:b.getSessionID()})},function(d){M.trigger(I.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+b.getSessionID()+"). "+d.name})})}function Q(b){j(b).catch(function(l){G(b),M.trigger(I.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+b.getSessionID()+") "+l.name})})}function X(b,l){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Insecure origins are not allowed"});return}(function(d){var y=b[d].ks,V=b[d].configs,te=y.systemString;te===w.default.PLAYREADY_KEYSTEM_STRING&&V[0].persistentState==="required"&&(te+=".recommendation"),navigator.requestMediaKeySystemAccess(te,V).then(function($){var ae=typeof $.getConfiguration=="function"?$.getConfiguration():null,ne=new R.default(y,ae);ne.mksa=$,M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{data:ne})}).catch(function($){++d<b.length?X(b,d):M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! "+$.message})})})(l)}function j(b){var l=b.session;return l.removeEventListener("keystatuseschange",b),l.removeEventListener("message",b),l.close()}function le(){return{handleEvent:function(l){switch(l.type){case"encrypted":if(l.initData){var d=ArrayBuffer.isView(l.initData)?l.initData.buffer:l.initData;M.trigger(I.NEED_KEY,{key:new n.default(d,l.initDataType)})}break}}}}function G(b){for(var l=0;l<L.length;l++)if(L[l]===b){L.splice(l,1);break}}function c(b){var l=void 0,d=void 0;return b&&b.length>0&&(b[0]&&(typeof b[0]=="string"?l=b[0]:d=b[0]),b[1]&&(typeof b[1]=="string"?l=b[1]:d=b[1])),{status:l,keyId:d}}function E(b,l,d,y){var V={session:b,initData:l,sessionId:y,handleEvent:function($){switch($.type){case"keystatuseschange":M.trigger(I.KEY_STATUSES_CHANGED,{data:this}),$.target.keyStatuses.forEach(function(){var ne=c(arguments);switch(ne.status){case"expired":M.trigger(I.INTERNAL_KEY_STATUS_CHANGED,{error:new u.default(h.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,h.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});break;default:M.trigger(I.INTERNAL_KEY_STATUS_CHANGED,ne);break}});break;case"message":var ae=ArrayBuffer.isView($.message)?$.message.buffer:$.message;M.trigger(I.INTERNAL_KEY_MESSAGE,{data:new C.default(this,ae,void 0,$.messageType)});break}},getSessionID:function(){return b.sessionId},getExpirationTime:function(){return b.expiration},getKeyStatuses:function(){return b.keyStatuses},getUsable:function(){var $=!1;return b.keyStatuses.forEach(function(){var ae=c(arguments);ae.status==="usable"&&($=!0)}),$},getSessionType:function(){return d}};return b.addEventListener("keystatuseschange",V),b.addEventListener("message",V),b.closed.then(function(){G(V),T.debug("DRM: Session closed. SessionID = "+V.getSessionID()),M.trigger(I.KEY_SESSION_CLOSED,{data:V.getSessionID()})}),L.push(V),V}return v={getAllInitData:re,requestKeySystemAccess:ve,getKeySystem:ue,selectKeySystem:ce,setMediaElement:se,setServerCertificate:J,createKeySession:ee,updateKeySession:ie,loadKeySession:me,removeKeySession:de,closeKeySession:Q,stop:oe,reset:Y},U(),v}H.__dashjs_factory_name="ProtectionModel_21Jan2015",r.default=dashjs.FactoryMaker.getClassFactory(H),g.exports=r.default},{"114":114,"169":169,"174":174,"183":183,"185":185,"190":190,"239":239}],177:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(169),i=t(p),o=e(190),n=t(o),f=e(239),h=t(f),m=e(174),u=t(m),_=e(183),C=t(_),k=e(186),R=t(k),P=e(185),w=t(P);function H(N){N=N||{};var A=this.context,M=N.eventBus,I=N.events,D=N.debug,v=N.api,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0;function oe(){W=D.getLogger(T),O=null,B=null,L=null,K=null,x=[],Y=(0,i.default)(A).getInstance(),U=j()}function ue(){try{for(var c=0;c<x.length;c++)me(x[c]);O&&O.removeEventListener(v.needkey,U),M.trigger(I.TEARDOWN_COMPLETE)}catch(E){M.trigger(I.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+E.message})}}function re(){return B}function ve(){for(var c=[],E=0;E<x.length;E++)c.push(x[E].initData);return c}function ce(c){for(var E=!1,b=0;b<c.length;b++)for(var l=c[b].ks.systemString,d=c[b].configs,y=null,V=null,te=0;te<d.length;te++){var $=d[te].audioCapabilities,ae=d[te].videoCapabilities;if($&&$.length!==0){y=[];for(var ne=0;ne<$.length;ne++)window[v.MediaKeys].isTypeSupported(l,$[ne].contentType)&&y.push($[ne])}if(ae&&ae.length!==0){V=[];for(var Se=0;Se<ae.length;Se++)window[v.MediaKeys].isTypeSupported(l,ae[Se].contentType)&&V.push(ae[Se])}if(!(!y&&!V||y&&y.length===0||V&&V.length===0)){E=!0;var Ie=new R.default(y,V),he=Y.getKeySystemBySystemString(l);M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{data:new w.default(he,Ie)});break}}E||M.trigger(I.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function se(c){try{L=c.mediaKeys=new window[v.MediaKeys](c.keySystem.systemString),B=c.keySystem,K=c,O&&le(),M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED)}catch(E){M.trigger(I.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+B.systemString+")! Could not create MediaKeys -- TODO"})}}function J(c){O!==c&&(O&&O.removeEventListener(v.needkey,U),O=c,O&&(O.addEventListener(v.needkey,U),L&&le()))}function ee(c,E,b,l){if(!B||!L||!K)throw new Error("Can not create sessions until you have selected a key system");var d=null;if(K.ksConfiguration.videoCapabilities&&K.ksConfiguration.videoCapabilities.length>0&&(d=K.ksConfiguration.videoCapabilities[0]),d===null&&K.ksConfiguration.audioCapabilities&&K.ksConfiguration.audioCapabilities.length>0&&(d=K.ksConfiguration.audioCapabilities[0]),d===null)throw new Error("Can not create sessions for unknown content types.");var y=d.contentType,V=L.createSession(y,new Uint8Array(c),l?new Uint8Array(l):null),te=G(V,c);V.addEventListener(v.error,te),V.addEventListener(v.message,te),V.addEventListener(v.ready,te),V.addEventListener(v.close,te),x.push(te),W.debug("DRM: Session created. SessionID = "+te.getSessionID()),M.trigger(I.KEY_SESSION_CREATED,{data:te})}function ie(c,E){var b=c.session;Y.isClearKey(B)?b.update(new Uint8Array(E.toJWK())):b.update(new Uint8Array(E))}function me(c){var E=c.session;E.removeEventListener(v.error,c),E.removeEventListener(v.message,c),E.removeEventListener(v.ready,c),E.removeEventListener(v.close,c);for(var b=0;b<x.length;b++)if(x[b]===c){x.splice(b,1);break}E[v.release]()}function de(){}function Q(){}function X(){}function j(){return{handleEvent:function(E){switch(E.type){case v.needkey:if(E.initData){var b=ArrayBuffer.isView(E.initData)?E.initData.buffer:E.initData;M.trigger(I.NEED_KEY,{key:new n.default(b,"cenc")})}break}}}}function le(){var c=null,E=function(){O.removeEventListener("loadedmetadata",c),O[v.setMediaKeys](L),M.trigger(I.VIDEO_ELEMENT_SELECTED)};O.readyState>=1?E():(c=E.bind(this),O.addEventListener("loadedmetadata",c))}function G(c,E){return{session:c,initData:E,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(l){switch(l.type){case v.error:var d="KeyError";M.trigger(I.KEY_ERROR,{data:new h.default(u.default.MEDIA_KEYERR_CODE,d,this)});break;case v.message:var y=ArrayBuffer.isView(l.message)?l.message.buffer:l.message;M.trigger(I.INTERNAL_KEY_MESSAGE,{data:new C.default(this,y,l.destinationURL)});break;case v.ready:W.debug("DRM: Key added."),M.trigger(I.KEY_ADDED);break;case v.close:W.debug("DRM: Session closed. SessionID = "+this.getSessionID()),M.trigger(I.KEY_SESSION_CLOSED,{data:this.getSessionID()});break}}}}return T={getAllInitData:ve,requestKeySystemAccess:ce,getKeySystem:re,selectKeySystem:se,setMediaElement:J,createKeySession:ee,updateKeySession:ie,closeKeySession:me,setServerCertificate:de,loadKeySession:Q,removeKeySession:X,stop:ue,reset:ue},oe(),T}H.__dashjs_factory_name="ProtectionModel_3Feb2014",r.default=dashjs.FactoryMaker.getClassFactory(H),g.exports=r.default},{"169":169,"174":174,"183":183,"185":185,"186":186,"190":190,"239":239}],178:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(184),i=t(p),o=e(182),n=t(o);function f(){var h=void 0;function m(R){return R}function u(){return"POST"}function _(){return"json"}function C(R){if(!R.hasOwnProperty("keys"))return null;for(var P=[],w=0;w<R.keys.length;w++){var H=R.keys[w],N=H.kid.replace(/=/g,""),A=H.k.replace(/=/g,"");P.push(new i.default(N,A))}return new n.default(P)}function k(R){return String.fromCharCode.apply(null,new Uint8Array(R))}return h={getServerURLFromMessage:m,getHTTPMethod:u,getResponseType:_,getLicenseMessage:C,getErrorResponse:k},h}f.__dashjs_factory_name="ClearKey",r.default=dashjs.FactoryMaker.getSingletonFactory(f),g.exports=r.default},{"182":182,"184":184}],179:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(114),i=t(p);function o(n){n=n||{};var f=n.BASE64,h={};h[i.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(H){return f.decodeArray(H.license)},getErrorResponse:function(H){return H}},h[i.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(H){return H},getErrorResponse:function(H){return String.fromCharCode.apply(null,new Uint8Array(H))}};var m=void 0;function u(){if(!f||!f.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}function _(w){return w}function C(){return"POST"}function k(w){return h[w].responseType}function R(w,H){return u(),h[H].getLicenseMessage(w)}function P(w,H){return h[H].getErrorResponse(w)}return m={getServerURLFromMessage:_,getHTTPMethod:C,getResponseType:k,getLicenseMessage:R,getErrorResponse:P},m}o.__dashjs_factory_name="DRMToday",r.default=dashjs.FactoryMaker.getSingletonFactory(o),g.exports=r.default},{"114":114}],180:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){var p=void 0,i="http://schemas.xmlsoap.org/soap/envelope/";function o(k){var R=String.fromCharCode.apply(null,new Uint8Array(k)),P=decodeURIComponent(escape(R));return P}function n(k){if(window.DOMParser){var R=o(k),P=new window.DOMParser,w=P.parseFromString(R,"text/xml"),H=w?w.getElementsByTagNameNS(i,"Envelope")[0]:null,N=H?H.getElementsByTagNameNS(i,"Body")[0]:null,A=N?N.getElementsByTagNameNS(i,"Fault")[0]:null;if(A)return null}return k}function f(k){var R="",P="",w="",H=-1,N=-1;if(window.DOMParser){var A=o(k),M=new window.DOMParser,I=M.parseFromString(A,"text/xml"),D=I?I.getElementsByTagNameNS(i,"Envelope")[0]:null,v=D?D.getElementsByTagNameNS(i,"Body")[0]:null,T=v?v.getElementsByTagNameNS(i,"Fault")[0]:null,W=T?T.getElementsByTagName("detail")[0]:null,O=W?W.getElementsByTagName("Exception")[0]:null,B=null;if(T===null)return A;B=T.getElementsByTagName("faultstring")[0].firstChild,R=B?B.nodeValue:null,O!==null&&(B=O.getElementsByTagName("StatusCode")[0],P=B?B.firstChild.nodeValue:null,B=O.getElementsByTagName("Message")[0],w=B?B.firstChild.nodeValue:null,H=w?w.lastIndexOf("[")+1:-1,N=w?w.indexOf("]"):-1,w=w?w.substring(H,N):"")}var L="code: "+P+", name: "+R;return w&&(L+=", message: "+w),L}function h(k){return k}function m(){return"POST"}function u(){return"arraybuffer"}function _(k){return n.call(this,k)}function C(k){return f.call(this,k)}return p={getServerURLFromMessage:h,getHTTPMethod:m,getResponseType:u,getLicenseMessage:_,getErrorResponse:C},p}t.__dashjs_factory_name="PlayReady",r.default=dashjs.FactoryMaker.getSingletonFactory(t),g.exports=r.default},{}],181:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(){var p=void 0;function i(m){return m}function o(){return"POST"}function n(){return"arraybuffer"}function f(m){return m}function h(m){return String.fromCharCode.apply(null,new Uint8Array(m))}return p={getServerURLFromMessage:i,getHTTPMethod:o,getResponseType:n,getLicenseMessage:f,getErrorResponse:h},p}t.__dashjs_factory_name="Widevine",r.default=dashjs.FactoryMaker.getSingletonFactory(t),g.exports=r.default},{}],182:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n,f){if(p(this,o),f&&f!=="persistent"&&f!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=n,this.type=f}return t(o,[{key:"toJWK",value:function(){var f=void 0,h=this.keyPairs.length,m={keys:[]};for(f=0;f<h;f++){var u={kty:"oct",alg:"A128KW",kid:this.keyPairs[f].keyID,k:this.keyPairs[f].key};m.keys.push(u)}this.type&&(m.type=this.type);var _=JSON.stringify(m),C=_.length,k=new ArrayBuffer(C),R=new Uint8Array(k);for(f=0;f<C;f++)R[f]=_.charCodeAt(f);return k}}]),o}();r.default=i,g.exports=r.default},{}],183:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f,h){t(this,i),this.sessionToken=o,this.message=n,this.defaultURL=f,this.messageType=h||"license-request"};r.default=p,g.exports=r.default},{}],184:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n){t(this,i),this.keyID=o,this.key=n};r.default=p,g.exports=r.default},{}],185:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n){t(this,i),this.keySystem=o,this.ksConfiguration=n};r.default=p,g.exports=r.default},{}],186:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f,h,m){t(this,i),this.initDataTypes=["cenc"],o&&o.length&&(this.audioCapabilities=o),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=f,this.persistentState=h,this.sessionTypes=m};r.default=p,g.exports=r.default},{}],187:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f,h,m,u,_,C){t(this,i),this.url=o,this.method=n,this.responseType=f,this.headers=h,this.withCredentials=m,this.messageType=u,this.sessionId=_,this.data=C};r.default=p,g.exports=r.default},{}],188:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f){t(this,i),this.url=o,this.headers=n,this.data=f};r.default=p,g.exports=r.default},{}],189:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n){t(this,i),this.contentType=o,this.robustness=n};r.default=p,g.exports=r.default},{}],190:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n){t(this,i),this.initData=o,this.initDataType=n};r.default=p,g.exports=r.default},{}],191:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(f){return f&&f.__esModule?f:{default:f}}var p=e(47),i=t(p);function o(){var f=[],h=0,m=0;function u(k,R){var P=R&&R.droppedVideoFrames?R.droppedVideoFrames:0,w=R&&R.totalVideoFrames?R.totalVideoFrames:0,H=P-h;h=P;var N=w-m;m=w,isNaN(k)||(f[k]?(f[k].droppedVideoFrames+=H,f[k].totalVideoFrames+=N):f[k]={droppedVideoFrames:H,totalVideoFrames:N})}function _(){return f}function C(k){f=[],h=k.droppedVideoFrames,m=k.totalVideoFrames}return{push:u,getFrameHistory:_,reset:C}}o.__dashjs_factory_name="DroppedFramesHistory";var n=i.default.getClassFactory(o);r.default=n,g.exports=r.default},{"47":47}],192:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(n){n=n||{};var f=void 0,h=n.abrController,m=n.switchHistory,u=n.droppedFramesHistory,_=n.currentRequest,C=n.useBufferOccupancyABR,k=n.useL2AABR,R=n.useLoLPABR,P=n.streamProcessor?n.streamProcessor.getScheduleController():null,w=n.streamProcessor?n.streamProcessor.getRepresentationInfo():null,H=n.videoModel?n.videoModel:null;function N(){var U=M();return U?U.type:null}function A(){var U=M();return U?U.streamInfo:null}function M(){return w?w.mediaInfo:null}function I(){return w}function D(){return P}function v(){return h}function T(){return m}function W(){return H}function O(){return u}function B(){return _}function L(){return C}function K(){return k}function x(){return R}return f={getMediaType:N,getMediaInfo:M,getDroppedFramesHistory:O,getCurrentRequest:B,getSwitchHistory:T,getStreamInfo:A,getScheduleController:D,getAbrController:v,getRepresentationInfo:I,useBufferOccupancyABR:L,useL2AABR:K,useLoLPABR:x,getVideoModel:W},f}o.__dashjs_factory_name="RulesContext",r.default=i.default.getClassFactory(o),g.exports=r.default},{"47":47}],193:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=-1,n={DEFAULT:.5,STRONG:1,WEAK:0};function f(m,u,_){var C=void 0,k=void 0,R=void 0,P=void 0;function w(H){var N=n.DEFAULT;return(H===n.DEFAULT||H===n.STRONG||H===n.WEAK)&&(N=H),N}return k=m===void 0?o:m,R=w(_),P=u===void 0?null:u,C={quality:k,reason:P,priority:R},C}f.__dashjs_factory_name="SwitchRequest";var h=i.default.getClassFactory(f);h.NO_CHANGE=o,h.PRIORITY=n,i.default.updateClassFactory(f.__dashjs_factory_name,h),r.default=h,g.exports=r.default},{"47":47}],194:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(193),n=t(o),f=8;function h(){var u=[],_=[];function C(P){P.newValue===n.default.NO_CHANGE&&(P.newValue=P.oldValue),u[P.oldValue]||(u[P.oldValue]={noDrops:0,drops:0,dropSize:0});var w=P.newValue-P.oldValue,H=w<0?1:0,N=H?-w:0,A=H?0:1;if(u[P.oldValue].drops+=H,u[P.oldValue].dropSize+=N,u[P.oldValue].noDrops+=A,_.push({idx:P.oldValue,noDrop:A,drop:H,dropSize:N}),_.length>f){var M=_.shift();u[M.idx].drops-=M.drop,u[M.idx].dropSize-=M.dropSize,u[M.idx].noDrops-=M.noDrop}}function k(){return u}function R(){u=[],_=[]}return{push:C,getSwitchRequests:k,reset:R}}h.__dashjs_factory_name="SwitchRequestHistory";var m=i.default.getClassFactory(h);r.default=m,g.exports=r.default},{"193":193,"47":47}],195:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(112),i=t(p),o=e(47),n=t(o);function f(h){h=h||{};var m=20,u=3,_=4,C=4,k=1.3,R=1.3,P=8,w=3,H=2,N=1,A=h.settings,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0;function W(){T={throughputHalfLife:{fast:w,slow:P},latencyHalfLife:{fast:N,slow:H}},se()}function O(ee,ie,me){if(ee===i.default.VIDEO)return me<A.get().streaming.cacheLoadThresholds[i.default.VIDEO];if(ee===i.default.AUDIO)return me<A.get().streaming.cacheLoadThresholds[i.default.AUDIO]}function B(ee,ie,me){if(!(!ie.trace||!ie.trace.length)){var de=ie.tresponse.getTime()-ie.trequest.getTime()||1,Q=ie._tfinish.getTime()-ie.tresponse.getTime()||1,X=ie.trace.reduce(function(G,c){return G+c.b[0]},0),j=void 0;A.get().streaming.lowLatencyEnabled?j=ie.trace.reduce(function(G,c){return G+c.d},0):j=me?Q:de+Q;var le=Math.round(8*X/j);if(ve(ee),O(ee,de,Q)){if(M[ee].length>0&&!M[ee].hasCachedEntries)return;M[ee].hasCachedEntries=!0}else M[ee]&&M[ee].hasCachedEntries&&ce(ee);M[ee].push(le),M[ee].length>m&&M[ee].shift(),I[ee].push(de),I[ee].length>m&&I[ee].shift(),L(D[ee],le,.001*Q,T.throughputHalfLife),L(v[ee],de,1,T.latencyHalfLife)}}function L(ee,ie,me,de){var Q=Math.pow(.5,me/de.fast);ee.fastEstimate=(1-Q)*ie+Q*ee.fastEstimate;var X=Math.pow(.5,me/de.slow);ee.slowEstimate=(1-X)*ie+X*ee.slowEstimate,ee.totalWeight+=me}function K(ee,ie,me){var de=void 0,Q=void 0;if(ee?(de=M[ie],Q=me?u:_):(de=I[ie],Q=C),!de)Q=0;else if(Q>=de.length)Q=de.length;else if(ee)for(var X=1;X<Q;++X){var j=de[de.length-X]/de[de.length-X-1];if((j>=R||j<=1/k)&&(Q+=1,Q===de.length))break}return Q}function x(ee,ie,me){return A.get().streaming.abr.movingAverageMethod!==i.default.MOVING_AVERAGE_SLIDING_WINDOW?Y(ee,ie):U(ee,ie,me)}function U(ee,ie,me){var de=K(ee,ie,me),Q=ee?M:I,X=Q[ie];return de===0||!X||X.length===0?NaN:(X=X.slice(-de),X.reduce(function(j,le){return j+le})/X.length)}function Y(ee,ie){var me=ee?T.throughputHalfLife:T.latencyHalfLife,de=ee?D[ie]:v[ie];if(!de||de.totalWeight<=0)return NaN;var Q=de.fastEstimate/(1-Math.pow(.5,de.totalWeight/me.fast)),X=de.slowEstimate/(1-Math.pow(.5,de.totalWeight/me.slow));return ee?Math.min(Q,X):Math.max(Q,X)}function oe(ee,ie){return x(!0,ee,ie)}function ue(ee,ie){var me=oe(ee,ie);return isNaN(me)||(me*=A.get().streaming.abr.bandwidthSafetyFactor),me}function re(ee){return x(!1,ee)}function ve(ee){M[ee]=M[ee]||[],I[ee]=I[ee]||[],D[ee]=D[ee]||{fastEstimate:0,slowEstimate:0,totalWeight:0},v[ee]=v[ee]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function ce(ee){delete M[ee],delete I[ee],delete D[ee],delete v[ee],ve(ee)}function se(){M={},I={},D={},v={}}var J={push:B,getAverageThroughput:oe,getSafeAverageThroughput:ue,getAverageLatency:re,reset:se};return W(),J}f.__dashjs_factory_name="ThroughputHistory",r.default=n.default.getClassFactory(f),g.exports=r.default},{"112":112,"47":47}],196:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(K){return K&&K.__esModule?K:{default:K}}var p=e(203),i=t(p),o=e(200),n=t(o),f=e(197),h=t(f),m=e(199),u=t(m),_=e(202),C=t(_),k=e(198),R=t(k),P=e(201),w=t(P),H=e(206),N=t(H),A=e(47),M=t(A),I=e(193),D=t(I),v=e(112),T=t(v),W="qualitySwitchRules",O="abandonFragmentRules";function B(K){K=K||{};var x=this.context,U=K.mediaPlayerModel,Y=K.dashMetrics,oe=K.settings,ue=void 0,re=void 0,ve=void 0;function ce(){re=[],ve=[],oe.get().streaming.abr.useDefaultABRRules&&(oe.get().streaming.abr.ABRStrategy===T.default.ABR_STRATEGY_L2A?re.push((0,w.default)(x).create({dashMetrics:Y,mediaPlayerModel:U,settings:oe})):oe.get().streaming.abr.ABRStrategy===T.default.ABR_STRATEGY_LoLP?re.push((0,N.default)(x).create({dashMetrics:Y})):(re.push((0,R.default)(x).create({dashMetrics:Y,mediaPlayerModel:U,settings:oe})),re.push((0,i.default)(x).create({dashMetrics:Y})),re.push((0,n.default)(x).create({dashMetrics:Y})),re.push((0,C.default)(x).create()),re.push((0,u.default)(x).create()),ve.push((0,h.default)(x).create({dashMetrics:Y,mediaPlayerModel:U,settings:oe}))));var Q=U.getABRCustomRules();Q.forEach(function(X){X.type===W&&re.push(X.rule(x).create()),X.type===O&&ve.push(X.rule(x).create())})}function se(Q){return Q.filter(function(X){return X.quality>D.default.NO_CHANGE})}function J(Q){var X={},j=null,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0;if(Q.length!==0){for(X[D.default.PRIORITY.STRONG]={quality:D.default.NO_CHANGE,reason:null},X[D.default.PRIORITY.WEAK]={quality:D.default.NO_CHANGE,reason:null},X[D.default.PRIORITY.DEFAULT]={quality:D.default.NO_CHANGE,reason:null},le=0,G=Q.length;le<G;le+=1)c=Q[le],c.quality!==D.default.NO_CHANGE&&(X[c.priority].quality===D.default.NO_CHANGE||X[c.priority].quality>c.quality)&&(X[c.priority].quality=c.quality,X[c.priority].reason=c.reason||null);return X[D.default.PRIORITY.WEAK].quality!==D.default.NO_CHANGE&&(j=X[D.default.PRIORITY.WEAK]),X[D.default.PRIORITY.DEFAULT].quality!==D.default.NO_CHANGE&&(j=X[D.default.PRIORITY.DEFAULT]),X[D.default.PRIORITY.STRONG].quality!==D.default.NO_CHANGE&&(j=X[D.default.PRIORITY.STRONG]),j&&(E=j.quality,b=j.reason),(0,D.default)(x).create(E,b)}}function ee(Q){var X=re.map(function(G){return G.getMaxIndex(Q)}),j=se(X),le=J(j);return le||(0,D.default)(x).create()}function ie(Q){var X=ve.map(function(G){return G.shouldAbandon(Q)}),j=se(X),le=J(j);return le||(0,D.default)(x).create()}function me(){[re,ve].forEach(function(Q){Q&&Q.length&&Q.forEach(function(X){return X.reset&&X.reset()})}),re=[],ve=[]}function de(){return re}return ue={initialize:ce,reset:me,getMaxQuality:ee,getMinSwitchRequest:J,shouldAbandonFragment:ie,getQualitySwitchRules:de},ue}B.__dashjs_factory_name="ABRRulesCollection";var L=M.default.getClassFactory(B);L.QUALITY_SWITCH_RULES=W,L.ABANDON_FRAGMENT_RULES=O,M.default.updateSingletonFactory(B.__dashjs_factory_name,L),r.default=L,g.exports=r.default},{"112":112,"193":193,"197":197,"198":198,"199":199,"200":200,"201":201,"202":202,"203":203,"206":206,"47":47}],197:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(193),i=t(p),o=e(47),n=t(o),f=e(45),h=t(f);function m(u){u=u||{};var _=1.8,C=500,k=5,R=this.context,P=u.mediaPlayerModel,w=u.dashMetrics,H=u.settings,N=void 0,A=void 0,M=void 0,I=void 0,D=void 0;function v(){A=(0,h.default)(R).getInstance().getLogger(N),B()}function T(L,K){M[L]=M[L]||{},M[L][K]=M[L][K]||{}}function W(L,K){D[L]=D[L]||[],D[L].push(K)}function O(L){var K=(0,i.default)(R).create(i.default.NO_CHANGE,{name:m.__dashjs_factory_name});if(!L||!L.hasOwnProperty("getMediaInfo")||!L.hasOwnProperty("getMediaType")||!L.hasOwnProperty("getCurrentRequest")||!L.hasOwnProperty("getRepresentationInfo")||!L.hasOwnProperty("getAbrController"))return K;var x=L.getMediaInfo(),U=L.getMediaType(),Y=L.getCurrentRequest();if(!isNaN(Y.index)){T(U,Y.index);var oe=P.getStableBufferTime(),ue=w.getCurrentBufferLevel(U);if(ue>oe)return K;var re=M[U][Y.index];if(re===null||Y.firstByteDate===null||I.hasOwnProperty(re.id))return K;if(re.firstByteTime===void 0&&(D[U]=[],re.firstByteTime=Y.firstByteDate.getTime(),re.segmentDuration=Y.duration,re.bytesTotal=Y.bytesTotal,re.id=Y.index),re.bytesLoaded=Y.bytesLoaded,re.elapsedTime=new Date().getTime()-re.firstByteTime,re.bytesLoaded>0&&re.elapsedTime>0&&W(U,Math.round(re.bytesLoaded*8/re.elapsedTime)),D[U].length>=k&&re.elapsedTime>C&&re.bytesLoaded<re.bytesTotal){var ve=D[U].reduce(function(Q,X){return Q+X},0);if(re.measuredBandwidthInKbps=Math.round(ve/D[U].length),re.estimatedTimeOfDownload=+(re.bytesTotal*8/re.measuredBandwidthInKbps/1e3).toFixed(2),re.estimatedTimeOfDownload<re.segmentDuration*_||L.getRepresentationInfo().quality===0)return K;if(!I.hasOwnProperty(re.id)){var ce=L.getAbrController(),se=re.bytesTotal-re.bytesLoaded,J=ce.getBitrateList(x),ee=ce.getQualityForBitrate(x,re.measuredBandwidthInKbps*H.get().streaming.abr.bandwidthSafetyFactor),ie=ce.getMinAllowedIndexFor(U),me=ie!==void 0?Math.max(ie,ee):ee,de=re.bytesTotal*J[me].bitrate/J[ce.getQualityFor(U)].bitrate;se>de&&(K.quality=me,K.reason.throughput=re.measuredBandwidthInKbps,K.reason.fragmentID=re.id,I[re.id]=re,A.debug("["+U+"] frag id",re.id," is asking to abandon and switch to quality to ",me," measured bandwidth was",re.measuredBandwidthInKbps),delete M[U][re.id])}}else re.bytesLoaded===re.bytesTotal&&delete M[U][re.id]}return K}function B(){M={},I={},D=[]}return N={shouldAbandon:O,reset:B},v(),N}m.__dashjs_factory_name="AbandonRequestsRule",r.default=n.default.getClassFactory(m),g.exports=r.default},{"193":193,"45":45,"47":47}],198:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(v){return v&&v.__esModule?v:{default:v}}var p=e(113),i=t(p),o=e(193),n=t(o),f=e(47),h=t(f),m=e(255),u=e(46),_=t(u),C=e(54),k=t(C),R=e(45),P=t(R),w=0,H=1,N=2,A=10,M=2,I=.99;function D(v){v=v||{};var T=this.context,W=v.dashMetrics,O=v.mediaPlayerModel,B=(0,_.default)(T).getInstance(),L=void 0,K=void 0,x=void 0;function U(){K=(0,P.default)(T).getInstance().getLogger(L),E(),B.on(k.default.BUFFER_EMPTY,me,L),B.on(k.default.PLAYBACK_SEEKING,de,L),B.on(k.default.MEDIA_FRAGMENT_LOADED,Q,L),B.on(k.default.METRIC_ADDED,X,L),B.on(k.default.QUALITY_CHANGE_REQUESTED,le,L),B.on(k.default.FRAGMENT_LOADING_ABANDONED,G,L)}function Y(l){return l.map(function(d){return Math.log(d)})}function oe(l,d,y){var V=y.reduce(function(ne,Se,Ie){return Se>y[ne]?Ie:ne},0);if(V===0)return null;var te=Math.max(l,A+M*d.length),$=(y[V]-1)/(te/A-1),ae=A/$;return{gp:$,Vp:ae}}function ue(l){var d={},y=l.getMediaInfo(),V=y.bitrateList.map(function(ne){return ne.bandwidth}),te=Y(V);te=te.map(function(ne){return ne-te[0]+1});var $=O.getStableBufferTime(),ae=oe($,V,te);return ae?(d.state=H,d.bitrates=V,d.utilities=te,d.stableBufferTime=$,d.Vp=ae.Vp,d.gp=ae.gp,d.lastQuality=0,re(d)):d.state=w,d}function re(l){l.placeholderBuffer=0,l.mostAdvancedSegmentStart=NaN,l.lastSegmentWasReplacement=!1,l.lastSegmentStart=NaN,l.lastSegmentDurationS=NaN,l.lastSegmentRequestTimeMs=NaN,l.lastSegmentFinishTimeMs=NaN}function ve(l,d){var y=O.getStableBufferTime();if(l.stableBufferTime!==y){var V=oe(y,l.bitrates,l.utilities);if(V.Vp!==l.Vp||V.gp!==l.gp){var te=W.getCurrentBufferLevel(d),$=te+l.placeholderBuffer;$-=A,$*=V.Vp/l.Vp,$+=A,l.stableBufferTime=y,l.Vp=V.Vp,l.gp=V.gp,l.placeholderBuffer=Math.max(0,$-te)}}}function ce(l){var d=l.getMediaType(),y=x[d];return y?y.state!==w&&ve(y,d):(y=ue(l),x[d]=y),y}function se(l,d){for(var y=l.bitrates.length,V=NaN,te=NaN,$=0;$<y;++$){var ae=(l.Vp*(l.utilities[$]+l.gp)-d)/l.bitrates[$];(isNaN(te)||ae>=te)&&(te=ae,V=$)}return V}function J(l,d){return l.Vp*(l.utilities[d]+l.gp)}function ee(l,d){for(var y=l.bitrates[d],V=l.utilities[d],te=0,$=d-1;$>=0;--$)if(l.utilities[$]<l.utilities[d]){var ae=l.bitrates[$],ne=l.utilities[$],Se=l.Vp*(l.gp+(y*ne-ae*V)/(y-ae));te=Math.max(te,Se)}return te}function ie(l,d){var y=Date.now();if(isNaN(l.lastSegmentFinishTimeMs)){if(!isNaN(l.lastCallTimeMs)){var V=.001*(y-l.lastCallTimeMs);l.placeholderBuffer+=Math.max(0,V)}}else{var V=.001*(y-l.lastSegmentFinishTimeMs);l.placeholderBuffer+=Math.max(0,V)}l.lastCallTimeMs=y,l.lastSegmentStart=NaN,l.lastSegmentRequestTimeMs=NaN,l.lastSegmentFinishTimeMs=NaN,ve(l,d)}function me(){for(var l in x)x.hasOwnProperty(l)&&x[l].state===N&&(x[l].placeholderBuffer=0)}function de(){for(var l in x)if(x.hasOwnProperty(l)){var d=x[l];d.state!==w&&(d.state=H,re(d))}}function Q(l){if(l&&l.chunk&&l.chunk.mediaInfo){var d=x[l.chunk.mediaInfo.type];if(d&&d.state!==w){var y=l.chunk.start;isNaN(d.mostAdvancedSegmentStart)||y>d.mostAdvancedSegmentStart?(d.mostAdvancedSegmentStart=y,d.lastSegmentWasReplacement=!1):d.lastSegmentWasReplacement=!0,d.lastSegmentStart=y,d.lastSegmentDurationS=l.chunk.duration,d.lastQuality=l.chunk.quality,j(d,l.chunk.mediaInfo.type)}}}function X(l){if(l&&l.metric===i.default.HTTP_REQUEST&&l.value&&l.value.type===m.HTTPRequest.MEDIA_SEGMENT_TYPE&&l.value.trace&&l.value.trace.length){var d=x[l.mediaType];d&&d.state!==w&&(d.lastSegmentRequestTimeMs=l.value.trequest.getTime(),d.lastSegmentFinishTimeMs=l.value._tfinish.getTime(),j(d,l.mediaType))}}function j(l,d){if(!isNaN(l.lastSegmentStart)&&!isNaN(l.lastSegmentRequestTimeMs)&&!isNaN(l.placeholderBuffer)){if(l.placeholderBuffer*=I,!isNaN(l.lastSegmentFinishTimeMs)){var y=W.getCurrentBufferLevel(d),V=y+.001*(l.lastSegmentFinishTimeMs-l.lastSegmentRequestTimeMs),te=J(l,l.lastQuality),$=Math.max(0,te-V);l.placeholderBuffer=Math.min($,l.placeholderBuffer)}l.lastSegmentWasReplacement&&!isNaN(l.lastSegmentDurationS)&&(l.placeholderBuffer+=l.lastSegmentDurationS),l.lastSegmentStart=NaN,l.lastSegmentRequestTimeMs=NaN}}function le(l){if(l){var d=x[l.mediaType];d&&d.state!==w&&(d.abrQuality=l.newQuality)}}function G(l){if(l){var d=x[l.mediaType];if(d&&d.state!==w){var y=W.getCurrentBufferLevel(l.mediaType),V=void 0;d.abrQuality>0?V=ee(d,d.abrQuality):V=A;var te=Math.max(0,V-y);d.placeholderBuffer=Math.min(d.placeholderBuffer,te)}}}function c(l){var d=(0,n.default)(T).create();if(!l||!l.hasOwnProperty("getMediaInfo")||!l.hasOwnProperty("getMediaType")||!l.hasOwnProperty("getScheduleController")||!l.hasOwnProperty("getStreamInfo")||!l.hasOwnProperty("getAbrController")||!l.hasOwnProperty("useBufferOccupancyABR"))return d;var y=l.getMediaInfo(),V=l.getMediaType(),te=l.getScheduleController(),$=l.getStreamInfo(),ae=l.getAbrController(),ne=ae.getThroughputHistory(),Se=$?$.id:null,Ie=$&&$.manifestInfo&&$.manifestInfo.isDynamic,he=l.useBufferOccupancyABR();if(d.reason=d.reason||{},!he)return d;te.setTimeToLoadDelay(0);var ye=ce(l);if(ye.state===w)return d;var _e=W.getCurrentBufferLevel(V),pe=ne.getAverageThroughput(V,Ie),De=ne.getSafeAverageThroughput(V,Ie),je=ne.getAverageLatency(V),Fe=void 0;if(d.reason.state=ye.state,d.reason.throughput=pe,d.reason.latency=je,isNaN(pe))return d;switch(ye.state){case H:Fe=ae.getQualityForBitrate(y,De,je),d.quality=Fe,d.reason.throughput=De,ye.placeholderBuffer=Math.max(0,ee(ye,Fe)-_e),ye.lastQuality=Fe,!isNaN(ye.lastSegmentDurationS)&&_e>=ye.lastSegmentDurationS&&(ye.state=N);break;case N:ie(ye,V),Fe=se(ye,_e+ye.placeholderBuffer);var Le=ae.getQualityForBitrate(y,De,je);Fe>ye.lastQuality&&Fe>Le&&(Fe=Math.max(Le,ye.lastQuality));var Ve=Math.max(0,_e+ye.placeholderBuffer-J(ye,Fe));Ve<=ye.placeholderBuffer?(ye.placeholderBuffer-=Ve,Ve=0):(Ve-=ye.placeholderBuffer,ye.placeholderBuffer=0,Fe<ae.getTopQualityIndexFor(V,Se)?te.setTimeToLoadDelay(1e3*Ve):Ve=0),d.quality=Fe,d.reason.throughput=pe,d.reason.latency=je,d.reason.bufferLevel=_e,d.reason.placeholderBuffer=ye.placeholderBuffer,d.reason.delay=Ve,ye.lastQuality=Fe;break;default:K.debug("BOLA ABR rule invoked in bad state."),d.quality=ae.getQualityForBitrate(y,De,je),d.reason.state=ye.state,d.reason.throughput=De,d.reason.latency=je,ye.state=H,re(ye)}return d}function E(){x={}}function b(){E(),B.off(k.default.BUFFER_EMPTY,me,L),B.off(k.default.PLAYBACK_SEEKING,de,L),B.off(k.default.MEDIA_FRAGMENT_LOADED,Q,L),B.off(k.default.METRIC_ADDED,X,L),B.off(k.default.QUALITY_CHANGE_REQUESTED,le,L),B.off(k.default.FRAGMENT_LOADING_ABANDONED,G,L)}return L={getMaxIndex:c,reset:b},U(),L}D.__dashjs_factory_name="BolaRule",r.default=h.default.getClassFactory(D),g.exports=r.default},{"113":113,"193":193,"255":255,"45":45,"46":46,"47":47,"54":54}],199:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(193),n=t(o),f=e(45),h=t(f);function m(){var u=this.context,_=void 0,C=void 0,k=.15,R=375;function P(){C=(0,h.default)(u).getInstance().getLogger(_)}function w(H){var N=(0,n.default)(u).create();if(!H||!H.hasOwnProperty("getDroppedFramesHistory"))return N;var A=H.getDroppedFramesHistory();if(A){for(var M=A.getFrameHistory(),I=0,D=0,v=n.default.NO_CHANGE,T=1;T<M.length;T++)if(M[T]&&(I=M[T].droppedVideoFrames,D=M[T].totalVideoFrames,D>R&&I/D>k)){v=T-1,C.debug("index: "+v+" Dropped Frames: "+I+" Total Frames: "+D);break}return(0,n.default)(u).create(v,{droppedFrames:I})}return N}return _={getMaxIndex:w},P(),_}m.__dashjs_factory_name="DroppedFramesRule",r.default=i.default.getClassFactory(m),g.exports=r.default},{"193":193,"45":45,"47":47}],200:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f),m=e(45),u=t(m),_=e(193),C=t(_),k=e(112),R=t(k),P=e(113),w=t(P);function H(N){N=N||{};var A=.5,M=2,I=this.context,D=(0,i.default)(I).getInstance(),v=N.dashMetrics,T=void 0,W=void 0,O=void 0;function B(){W=(0,u.default)(I).getInstance().getLogger(T),U(),D.on(n.default.PLAYBACK_SEEKING,Y,T),D.on(n.default.BYTES_APPENDED_END_FRAGMENT,oe,T)}function L(){if(!v||!v.hasOwnProperty("getCurrentBufferLevel")||!v.hasOwnProperty("getCurrentBufferState"))throw new Error(R.default.MISSING_CONFIG_ERROR)}function K(re){var ve=(0,C.default)(I).create();if(!re||!re.hasOwnProperty("getMediaType"))return ve;L();var ce=re.getMediaType(),se=v.getCurrentBufferState(ce),J=re.getRepresentationInfo(),ee=J.fragmentDuration;if(x(ce)||!ee)return ve;if(se&&se.state===w.default.BUFFER_EMPTY)W.debug("["+ce+"] Switch to index 0; buffer is empty."),ve.quality=0,ve.reason="InsufficientBufferRule: Buffer is empty";else{var ie=re.getMediaInfo(),me=re.getAbrController(),de=me.getThroughputHistory(),Q=v.getCurrentBufferLevel(ce),X=de.getAverageThroughput(ce),j=de.getAverageLatency(ce),le=X*(Q/ee)*A;ve.quality=me.getQualityForBitrate(ie,le,j),ve.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return ve}function x(re){return O[re].ignoreCount>0}function U(){O={},O[R.default.VIDEO]={ignoreCount:M},O[R.default.AUDIO]={ignoreCount:M}}function Y(){U()}function oe(re){!isNaN(re.startTime)&&(re.mediaType===R.default.AUDIO||re.mediaType===R.default.VIDEO)&&O[re.mediaType].ignoreCount>0&&O[re.mediaType].ignoreCount--}function ue(){U(),D.off(n.default.PLAYBACK_SEEKING,Y,T),D.off(n.default.BYTES_APPENDED_END_FRAGMENT,oe,T)}return T={getMaxIndex:K,reset:ue},B(),T}H.__dashjs_factory_name="InsufficientBufferRule",r.default=h.default.getClassFactory(H),g.exports=r.default},{"112":112,"113":113,"193":193,"45":45,"46":46,"47":47,"54":54}],201:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(D){return D&&D.__esModule?D:{default:D}}var p=e(113),i=t(p),o=e(193),n=t(o),f=e(47),h=t(f),m=e(255),u=e(46),_=t(u),C=e(54),k=t(C),R=e(45),P=t(R),w=e(112),H=t(w),N=0,A=1,M=2;function I(D){D=D||{};var v=this.context,T=D.dashMetrics,W=(0,_.default)(v).getInstance(),O=void 0,B=void 0,L=void 0,K=void 0;function x(){K=(0,P.default)(v).getInstance().getLogger(O),de(),W.on(k.default.PLAYBACK_SEEKING,re,O),W.on(k.default.MEDIA_FRAGMENT_LOADED,ve,O),W.on(k.default.METRIC_ADDED,ce,O),W.on(k.default.QUALITY_CHANGE_REQUESTED,J,O)}function U(X){var j={},le=X.getMediaInfo(),G=le.bitrateList.map(function(c){return c.bandwidth/1e3});return j.state=A,j.bitrates=G,j.lastQuality=0,Y(le),oe(j),j}function Y(X){!X||!X.type||(L[X.type]={},L[X.type].w=[],L[X.type].prev_w=[],L[X.type].Q=0,L[X.type].segment_request_start_s=0,L[X.type].segment_download_finish_s=0,L[X.type].B_target=1.5)}function oe(X){X.placeholderBuffer=0,X.mostAdvancedSegmentStart=NaN,X.lastSegmentWasReplacement=!1,X.lastSegmentStart=NaN,X.lastSegmentDurationS=NaN,X.lastSegmentRequestTimeMs=NaN,X.lastSegmentFinishTimeMs=NaN}function ue(X){var j=X.getMediaType(),le=B[j];return le||(le=U(X),B[j]=le),le}function re(){for(var X in B)if(B.hasOwnProperty(X)){var j=B[X];j.state!==N&&(j.state=A,oe(j))}}function ve(X){if(X&&X.chunk&&X.chunk.mediaInfo){var j=B[X.chunk.mediaInfo.type],le=L[X.chunk.mediaInfo.type];if(j&&j.state!==N){var G=X.chunk.start;isNaN(j.mostAdvancedSegmentStart)||G>j.mostAdvancedSegmentStart?(j.mostAdvancedSegmentStart=G,j.lastSegmentWasReplacement=!1):j.lastSegmentWasReplacement=!0,j.lastSegmentStart=G,j.lastSegmentDurationS=X.chunk.duration,j.lastQuality=X.chunk.quality,se(j,le)}}}function ce(X){if(X&&X.metric===i.default.HTTP_REQUEST&&X.value&&X.value.type===m.HTTPRequest.MEDIA_SEGMENT_TYPE&&X.value.trace&&X.value.trace.length){var j=B[X.mediaType],le=L[X.mediaType];j&&j.state!==N&&(j.lastSegmentRequestTimeMs=X.value.trequest.getTime(),j.lastSegmentFinishTimeMs=X.value._tfinish.getTime(),se(j,le))}}function se(X,j){!isNaN(X.lastSegmentStart)&&!isNaN(X.lastSegmentRequestTimeMs)&&(j.segment_request_start_s=.001*X.lastSegmentRequestTimeMs,j.segment_download_finish_s=.001*X.lastSegmentFinishTimeMs,X.lastSegmentStart=NaN,X.lastSegmentRequestTimeMs=NaN)}function J(X){if(X&&X.mediaType){var j=B[X.mediaType];j&&j.state!==N&&(j.abrQuality=X.newQuality)}}function ee(X,j){if(X.length!==j.length)return-1;for(var le=0,G=0;G<X.length;G++)le=le+X[G]*j[G];return le}function ie(X){for(var j=X.length,le=!1,G=[],c=0;c<j;++c)G[c]=X[c];for(var E=X.sort(function(y,V){return V-y}),b=0,l=0,d=[],c=0;c<j-1;++c)if(b=b+E[c],l=(b-1)/(c+1),l>=E[c+1]){le=!0;break}le||(l=(b+E[j-1]-1)/j);for(var c=0;c<j;++c)d[c]=Math.max(G[c]-l,0);return d}function me(X){var j=(0,n.default)(v).create(),le=4,G=Math.pow(le,.99),c=Math.max(Math.pow(le,1),G*Math.sqrt(le)),E=X.getMediaInfo(),b=X.getMediaType(),l=E.bitrateList.map(function(tt){return tt.bandwidth}),d=l.length,y=X.getScheduleController(),V=X.getStreamInfo(),te=X.getAbrController(),$=te.getThroughputHistory(),ae=V&&V.manifestInfo&&V.manifestInfo.isDynamic,ne=X.useL2AABR(),Se=T.getCurrentBufferLevel(b,!0),Ie=$.getSafeAverageThroughput(b,ae),he=$.getAverageThroughput(b,ae),ye=2,_e=$.getAverageLatency(b),pe=X.getVideoModel(),De=void 0,je=pe.getPlaybackRate();if(!X||!X.hasOwnProperty("getMediaInfo")||!X.hasOwnProperty("getMediaType")||!X.hasOwnProperty("getScheduleController")||!X.hasOwnProperty("getStreamInfo")||!X.hasOwnProperty("getAbrController")||!X.hasOwnProperty("useL2AABR")||(j.reason=j.reason||{},!ne||b===H.default.AUDIO))return j;y.setTimeToLoadDelay(0);var Fe=ue(X);if(Fe.state===N)return j;var Le=L[b];if(!Le||(j.reason.state=Fe.state,j.reason.throughput=he,j.reason.latency=_e,isNaN(he)))return j;switch(Fe.state){case A:if(De=te.getQualityForBitrate(E,Ie,_e),j.quality=De,j.reason.throughput=Ie,Fe.lastQuality=De,!isNaN(Fe.lastSegmentDurationS)&&Se>=Le.B_target){Fe.state=M,Le.Q=G;for(var Ve=0;Ve<d;++Ve)Ve===Fe.lastQuality?Le.prev_w[Ve]=1:Le.prev_w[Ve]=0}break;case M:var Ge=[],we=T.getCurrentHttpRequest(b).trace.reduce(function(tt,St){return tt+St.d},0),at=T.getCurrentHttpRequest(b).trace.reduce(function(tt,St){return tt+St.b[0]},0),Re=Math.round(8*at/we);Re<1&&(Re=1);for(var Xe=Fe.lastSegmentDurationS,lt=1,Ve=0;Ve<d;++Ve)l[Ve]=l[Ve]/1e3,je*l[Ve]>Re&&(lt=-1),Le.w[Ve]=Le.prev_w[Ve]+lt*(Xe/(2*c))*((Le.Q+G)*(je*l[Ve]/Re));Le.w=ie(Le.w);for(var Ve=0;Ve<d;++Ve)Ge[Ve]=Le.w[Ve]-Le.prev_w[Ve],Le.prev_w[Ve]=Le.w[Ve];Le.Q=Math.max(0,Le.Q-Xe+Xe*je*((ee(l,Le.prev_w)+ee(l,Ge))/Re));for(var ct=[],Ve=0;Ve<d;++Ve)ct[Ve]=Math.abs(l[Ve]-ee(Le.w,l));De=ct.indexOf(Math.min.apply(Math,ct)),De>Fe.lastQuality&&l[Fe.lastQuality+1]<=Re&&(De=Fe.lastQuality+1),l[De]>=Re&&(Le.Q=ye*Math.max(G,Le.Q)),j.quality=De,j.reason.throughput=he,j.reason.latency=_e,j.reason.bufferLevel=Se,Fe.lastQuality=j.quality;break;default:K.debug("L2A ABR rule invoked in bad state."),j.quality=te.getQualityForBitrate(E,Ie,_e),j.reason.state=Fe.state,j.reason.throughput=Ie,j.reason.latency=_e,Fe.state=A,oe(Fe)}return j}function de(){B={},L={}}function Q(){de(),W.off(k.default.PLAYBACK_SEEKING,re,O),W.off(k.default.MEDIA_FRAGMENT_LOADED,ve,O),W.off(k.default.METRIC_ADDED,ce,O),W.off(k.default.QUALITY_CHANGE_REQUESTED,J,O)}return O={getMaxIndex:me,reset:Q},x(),O}I.__dashjs_factory_name="L2ARule",r.default=h.default.getClassFactory(I),g.exports=r.default},{"112":112,"113":113,"193":193,"255":255,"45":45,"46":46,"47":47,"54":54}],202:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(193),h=t(f);function m(){var u=this.context,_=void 0,C=void 0,k=.075,R=6;function P(){C=(0,n.default)(u).getInstance().getLogger(_)}function w(H){for(var N=H?H.getSwitchHistory():null,A=N?N.getSwitchRequests():[],M=0,I=0,D=0,v=(0,h.default)(u).create(),T=0;T<A.length;T++)if(A[T]!==void 0&&(M+=A[T].drops,I+=A[T].noDrops,D+=A[T].dropSize,M+I>=R&&M/I>k)){v.quality=T>0&&A[T].drops>0?T-1:T,v.reason={index:v.quality,drops:M,noDrops:I,dropSize:D},C.debug("Switch history rule index: "+v.quality+" samples: "+(M+I)+" drops: "+M);break}return v}return _={getMaxIndex:w},P(),_}m.__dashjs_factory_name="SwitchHistoryRule",r.default=i.default.getClassFactory(m),g.exports=r.default},{"193":193,"45":45,"47":47}],203:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(193),h=t(f),m=e(112),u=t(m),_=e(113),C=t(_);function k(R){R=R||{};var P=this.context,w=R.dashMetrics,H=void 0,N=void 0;function A(){N=(0,n.default)(P).getInstance().getLogger(H)}function M(){if(!w||!w.hasOwnProperty("getCurrentBufferState"))throw new Error(u.default.MISSING_CONFIG_ERROR)}function I(v){var T=(0,h.default)(P).create();if(!v||!v.hasOwnProperty("getMediaInfo")||!v.hasOwnProperty("getMediaType")||!v.hasOwnProperty("useBufferOccupancyABR")||!v.hasOwnProperty("getAbrController")||!v.hasOwnProperty("getScheduleController"))return T;M();var W=v.getMediaInfo(),O=v.getMediaType(),B=w.getCurrentBufferState(O),L=v.getScheduleController(),K=v.getAbrController(),x=v.getStreamInfo(),U=x&&x.manifestInfo?x.manifestInfo.isDynamic:null,Y=K.getThroughputHistory(),oe=Y.getSafeAverageThroughput(O,U),ue=Y.getAverageLatency(O),re=v.useBufferOccupancyABR();return isNaN(oe)||!B||re||K.getAbandonmentStateFor(O)!==C.default.ABANDON_LOAD&&(B.state===C.default.BUFFER_LOADED||U)&&(T.quality=K.getQualityForBitrate(W,oe,ue),L.setTimeToLoadDelay(0),N.debug("["+O+"] requesting switch to index: ",T.quality,"Average throughput",Math.round(oe),"kbps"),T.reason={throughput:oe,latency:ue}),T}function D(){}return H={getMaxIndex:I,reset:D},A(),H}k.__dashjs_factory_name="ThroughputRule",r.default=i.default.getClassFactory(k),g.exports=r.default},{"112":112,"113":113,"193":193,"45":45,"47":47}],204:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(45),n=t(o),f={MANUAL:"manual_weight_selection",RANDOM:"random_weight_selection",DYNAMIC:"dynamic_weight_selection"};function h(){var m=this.context,u=void 0,_=void 0,C=void 0,k=void 0,R=void 0,P=void 0,w=void 0,H=void 0,N=void 0,A=void 0;function M(){_=(0,n.default)(m).getInstance().getLogger(u),D()}function I(){D()}function D(){C=null,k=1,R=100,P=0,w=null,H=null,N=null,A=f.DYNAMIC}function v(){var se=0;if(C)for(var J=0;J<C.length;J++){var ee=C[J];ee.state.throughput>se&&(se=ee.state.throughput)}return se}function T(se){var J=se.map(function(ee){return Math.pow(ee,2)}).reduce(function(ee,ie){return ee+ie});return Math.sqrt(J)}function W(se,J,ee){var ie=se.map(function(de,Q){return ee[Q]*Math.pow(de-J[Q],2)}).reduce(function(de,Q){return de+Q}),me=ie<0?-1:1;return me*Math.sqrt(Math.abs(ie))}function O(se,J){var ee=[se.state.throughput,se.state.latency,se.state.rebuffer,se.state.switch],ie=[J.state.throughput,J.state.latency,J.state.rebuffer,J.state.switch];return W(ee,ie,[1,1,1,1])}function B(se,J,ee){for(var ie=0;ie<J.length;ie++){var me=J[ie],de=.1,Q=O(me,se),X=Math.exp(-1*Math.pow(Q,2)/(2*Math.pow(de,2)));L(me,ee,X)}}function L(se,J,ee){var ie=se.state,me=[.01,.01,.01,.01];ie.throughput=ie.throughput+(J[0]-ie.throughput)*me[0]*ee,ie.latency=ie.latency+(J[1]-ie.latency)*me[1]*ee,ie.rebuffer=ie.rebuffer+(J[2]-ie.rebuffer)*me[2]*ee,ie.switch=ie.switch+(J[3]-ie.switch)*me[3]*ee}function K(se,J){var ee=0,ie=se;if(C)for(var me=0;me<C.length;me++){var de=C[me];de.bitrate<se.bitrate&&de.bitrate>ee&&J>de.bitrate&&(ee=de.bitrate,ie=de)}return ie}function x(se,J,ee,ie,me,de,Q){var X=ee,j=ie,le=J,G=re(se),c=J/k;c>1&&(c=v()),ee=ee/R;var E=0,b=0,l=0,d=1e4;_.debug("getNextQuality called throughput:"+c+" latency:"+ee+" bufferSize:"+ie+" currentQualityIndex:"+de+" playbackRate:"+me);var y=G[de],V=y.bitrate*Q.getSegmentDuration()/le,te=Math.max(0,V-j);if(j-V<Q.getMinBuffer())return _.debug("Buffer is low for bitrate= "+y.bitrate+" downloadTime="+V+" currentBuffer="+j+" rebuffer="+te),K(y,le).qualityIndex;switch(A){case f.MANUAL:U();break;case f.RANDOM:Y(G);break;case f.DYNAMIC:oe(Q,G,X,j,te,le,me);break;default:oe(Q,G,X,j,te,le,me)}for(var $=null,ae=null,ne=null,Se=null,Ie=0;Ie<G.length;Ie++){var he=G[Ie],ye=he.state,_e=[ye.throughput,ye.latency,ye.rebuffer,ye.switch],pe=H.slice(),De=Q.getNextBufferWithBitrate(he.bitrate,j,le),je=De<Q.getMinBuffer();je&&_.debug("Buffer is low for bitrate="+he.bitrate+" downloadTime="+V+" currentBuffer="+j+" nextBuffer="+De),(he.bitrate>J-d||je)&&he.bitrate!==P&&(pe[0]=100);var Fe=W(_e,[c,E,b,l],pe);($===null||Fe<$)&&($=Fe,ae=he.qualityIndex,ne=he,Se=pe)}var Le=Math.abs(y.bitrate-ne.bitrate)/k;return B(y,G,[c,ee,te,Le]),B(ne,G,[c,E,b,Le]),ae}function U(){var se=.4,J=.4,ee=.4,ie=.4;H=[se,J,ee,ie]}function Y(se){H=ue(se.length,4)}function oe(se,J,ee,ie,me,de,Q){H||(H=N[N.length-1]);var X=se.findWeightVector(J,ee,ie,me,de,Q);X!==null&&X!==-1&&(H=X)}function ue(se,J){for(var ee=[],ie=Math.sqrt(2/se),me=0;me<J;me++)ee.push(Math.random()*ie);return H=ee,H}function re(se){return C||function(){C=[];var J=se.bitrateList,ee=[];P=J[0].bandwidth,J.forEach(function(de){ee.push(de.bandwidth),de.bandwidth<P&&(P=de.bandwidth)}),k=T(ee);for(var ie=0;ie<J.length;ie++){var me={qualityIndex:ie,bitrate:J[ie].bandwidth,state:{throughput:J[ie].bandwidth/k,latency:0,rebuffer:0,switch:0}};C.push(me),me.bitrate===P&&(w=me)}N=ce(C)}(),C}function ve(se){for(var J=[],ee=0;ee<se;ee++){var ie=[Math.random()*v(),Math.random(),Math.random(),Math.random()];J.push(ie)}return J}function ce(se){var J=[],ee=ve(Math.pow(se.length,2));J.push(ee[0]);for(var ie=[1,1,1,1],me=1;me<se.length;me++){for(var de=null,Q=null,X=0;X<ee.length;X++){for(var j=ee[X],le=null,G=0;G<J.length;G++){var c=W(j,J[G],ie);(le===null||c<le)&&(le=c)}(Q===null||le>Q)&&(de=j,Q=le)}J.push(de)}for(var E=null,b=null,X=0;X<J.length;X++){for(var c=0,G=0;G<J.length;G++)X!==G&&(c+=W(J[X],J[G],ie));(E===null||c>E)&&(E=c,b=X)}var l=[];for(l.push(J[b]),J.splice(b,1);J.length>0;){for(var le=null,d=null,X=0;X<J.length;X++){var c=W(l[0],J[X],ie);(le===null||c<le)&&(le=c,d=X)}l.push(J[d]),J.splice(d,1)}return l}return u={getNextQuality:x,reset:I},M(),u}h.__dashjs_factory_name="LearningAbrController",r.default=i.default.getClassFactory(h),g.exports=r.default},{"45":45,"47":47}],205:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(47),i=t(p),o=e(208),n=t(o);function f(){var h=void 0,m=void 0,u=void 0,_=void 0,C=void 0;function k(){R()}function R(){m=null,u=null,_=null,C=null}function P(D,v,T){m=w("segment",D,v,T),u=D,_=v,C=T}function w(D,v,T,W){var O=new n.default;return O.type=D,v?O.weights.bitrateReward=v:O.weights.bitrateReward=1,O.weights.bitrateSwitchPenalty=1,T?O.weights.rebufferPenalty=T:O.weights.rebufferPenalty=1e3,O.weights.latencyPenalty=[],O.weights.latencyPenalty.push({threshold:1.1,penalty:W*.05}),O.weights.latencyPenalty.push({threshold:1e8,penalty:T*.1}),W?O.weights.playbackSpeedPenalty=W:O.weights.playbackSpeedPenalty=200,O}function H(D,v,T,W){m&&N(D,v,T,W,m)}function N(D,v,T,W,O){O.bitrateWSum+=O.weights.bitrateReward*D,O.lastBitrate&&(O.bitrateSwitchWSum+=O.weights.bitrateSwitchPenalty*Math.abs(D-O.lastBitrate)),O.lastBitrate=D,O.rebufferWSum+=O.weights.rebufferPenalty*v;for(var B=0;B<O.weights.latencyPenalty.length;B++){var L=O.weights.latencyPenalty[B];if(T<=L.threshold){O.latencyWSum+=L.penalty*T;break}}O.playbackSpeedWSum+=O.weights.playbackSpeedPenalty*Math.abs(1-W),O.totalQoe=O.bitrateWSum-O.bitrateSwitchWSum-O.rebufferWSum-O.latencyWSum-O.playbackSpeedWSum}function A(){return m}function M(D,v,T,W){var O=null;return u&&_&&C&&(O=w("segment",u,_,C)),O?(N(D,v,T,W,O),O.totalQoe):0}function I(){R()}return h={setupPerSegmentQoe:P,logSegmentMetrics:H,getPerSegmentQoe:A,calculateSingleUseQoe:M,reset:I},k(),h}f.__dashjs_factory_name="LoLpQoeEvaluator",r.default=i.default.getClassFactory(f),g.exports=r.default},{"208":208,"47":47}],206:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(D){return D&&D.__esModule?D:{default:D}}var p=e(45),i=t(p),o=e(47),n=t(o),f=e(204),h=t(f),m=e(205),u=t(m),_=e(193),C=t(_),k=e(113),R=t(k),P=e(207),w=t(P),H=e(112),N=t(H),A=1.5,M=.3;function I(D){D=D||{};var v=D.dashMetrics,T=this.context,W=void 0,O=void 0,B=void 0,L=void 0;function K(){W=(0,i.default)(T).getInstance().getLogger(O),B=(0,h.default)(T).create(),L=(0,u.default)(T).create()}function x(oe){try{var ue=(0,C.default)(T).create(),re=oe.getMediaInfo().type,ve=oe.getAbrController(),ce=oe.getStreamInfo(),se=ve.getQualityFor(re,ce),J=oe.getMediaInfo(),ee=v.getCurrentBufferState(re),ie=oe.getScheduleController(),me=v.getCurrentBufferLevel(re,!0),de=ce&&ce.manifestInfo?ce.manifestInfo.isDynamic:null,Q=ie.getPlaybackController(),X=Q.getCurrentLiveLatency();if(!oe.useLoLPABR()||re===N.default.AUDIO)return ue;X||(X=0);var j=Q.getPlaybackRate(),le=ve.getThroughputHistory(),G=le.getSafeAverageThroughput(re,de);if(W.debug("Throughput "+Math.round(G)+" kbps"),isNaN(G)||!ee||ve.getAbandonmentStateFor(re)===R.default.ABANDON_LOAD)return ue;for(var c=J.bitrateList,E=oe.getRepresentationInfo().fragmentDuration,b=c[0].bandwidth/1e3,l=c[c.length-1].bandwidth/1e3,d=0;d<c.length;d++){var y=c[d].bandwidth/1e3;y>l?l=y:y<b&&(b=y)}var V=c[se].bandwidth,te=V/1e3,$=v.getCurrentHttpRequest(re,!0),ae=($.tresponse.getTime()-$.trequest.getTime())/1e3,ne=ae>E?ae-E:0;L.setupPerSegmentQoe(E,l,b),L.logSegmentMetrics(te,ne,X,j);var Se=(0,w.default)(T).create({targetLatency:A,bufferMin:M,segmentDuration:E,qoeEvaluator:L});return ue.quality=B.getNextQuality(J,G*1e3,X,me,j,se,Se),ue.reason={throughput:G,latency:X},ue.priority=C.default.PRIORITY.STRONG,ie.setTimeToLoadDelay(0),ue.quality!==se&&console.log("[TgcLearningRule]["+re+"] requesting switch to index: ",ue.quality,"Average throughput",Math.round(G),"kbps"),ue}catch(Ie){throw Ie}}function U(){B.reset(),L.reset()}function Y(){U()}return O={getMaxIndex:x,reset:Y},K(),O}I.__dashjs_factory_name="LoLPRule",r.default=n.default.getClassFactory(I),g.exports=r.default},{"112":112,"113":113,"193":193,"204":204,"205":205,"207":207,"45":45,"47":47}],207:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(n){var f=n.targetLatency,h=n.bufferMin,m=n.segmentDuration,u=n.qoeEvaluator,_=void 0,C=void 0,k=void 0,R=void 0,P=void 0;function w(){H()}function H(){C=[.2,.4,.6,.8,1],k=4,R=M(C,k),P=0}function N(W,O,B,L,K,x){var U=null,Y=null,oe=null,ue=Math.abs(O-P);return W.forEach(function(re){R.forEach(function(ve){var ce={throughput:ve[0],latency:ve[1],buffer:ve[2],switch:ve[3]},se=re.bitrate*m/K,J=T(B,se),ee=Math.max(1e-5,se-J),ie=void 0;ce.buffer===0?ie=10:ie=1/ce.buffer;var me=ie*ee;ce.latency===0?ie=10:ie=1/ce.latency;var de=ie*re.state.latency,Q=u.calculateSingleUseQoe(re.bitrate,me,de,x);(U===null||Q>U)&&A(O,J,ue)&&(U=Q,Y=ve,oe=re.bitrate)})}),Y===null&&oe===null&&(Y=-1),P=O,Y}function A(W,O,B){return W>f+B?!1:O>=h}function M(W,O){var B=W.map(function(K){return[K]}),L=function(x,U,Y){var oe=!0;e:for(;oe;){var ue=x,re=U,ve=Y;if(oe=!1,ve===re)return ue;for(var ce=ue.length,se=0;se<ce;se++)for(var J=ue.shift(),ee=0;ee<W.length;ee++)ue.push(J.concat(W[ee]));x=ue,U=re,Y=ve+1,oe=!0,ce=se=J=ee=void 0;continue e}};return L(B,O,1)}function I(){return h}function D(){return m}function v(W,O,B){var L=W*m/B;return T(O,L)}function T(W,O){var B=D(),L=void 0;return O>B?L=W-B:L=W+B-O,L}return _={getMinBuffer:I,getSegmentDuration:D,getNextBufferWithBitrate:v,getNextBuffer:T,findWeightVector:N},w(),_}o.__dashjs_factory_name="LoLpWeightSelector",r.default=i.default.getClassFactory(o),g.exports=r.default},{"47":47}],208:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0};r.default=p,g.exports=r.default},{}],209:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(112),i=t(p),o=e(47),n=t(o),f=e(113),h=t(f);function m(u){u=u||{};var _=u.dashMetrics,C=u.mediaPlayerModel,k=u.textController,R=u.abrController,P=u.settings;function w(){}function H(M,I,D){if(!M||!I)return!0;var v=_.getCurrentBufferLevel(M);return v<N(M,I,D)}function N(M,I,D){var v=NaN;if(!M||!I)return v;if(M===i.default.FRAGMENTED_TEXT)if(k.isTextEnabled())if(isNaN(I.fragmentDuration)){var T=_.getCurrentSchedulingInfo(h.default.SCHEDULING_INFO);v=T?T.duration:0}else v=I.fragmentDuration;else v=0;else if(M===i.default.AUDIO&&D){var W=_.getCurrentBufferLevel(i.default.VIDEO);isNaN(I.fragmentDuration)?v=W:v=Math.max(W,I.fragmentDuration)}else{var O=I.mediaInfo.streamInfo;if(R.isPlayingAtTopQuality(O)){var B=O.manifestInfo.duration>=P.get().streaming.longFormContentDurationThreshold;v=B?P.get().streaming.bufferTimeAtTopQualityLongForm:P.get().streaming.bufferTimeAtTopQuality}else v=C.getStableBufferTime()}return v}var A={execute:H,getBufferTarget:N};return w(),A}m.__dashjs_factory_name="BufferLevelRule",r.default=n.default.getClassFactory(m),g.exports=r.default},{"112":112,"113":113,"47":47}],210:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(){var n=0,f=void 0;function h(P){for(var w="",H=0;H<P.length;++H){var N=P[H];w+=N.uchar}var A=w.length,M=w.replace(/^\s+/,"").length;return A-M}function m(P){return"left: "+P.x*3.125+"%; top: "+P.y1*6.66+"%; width: "+(100-P.x*3.125)+"%; height: "+Math.max(P.y2-1-P.y1,1)*6.66+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function u(P){return P==="red"?"rgb(255, 0, 0)":P==="green"?"rgb(0, 255, 0)":P==="blue"?"rgb(0, 0, 255)":P==="cyan"?"rgb(0, 255, 255)":P==="magenta"?"rgb(255, 0, 255)":P==="yellow"?"rgb(255, 255, 0)":P==="white"?"rgb(255, 255, 255)":P==="black"?"rgb(0, 0, 0)":P}function _(P,w){var H=P.videoHeight/15;return w?"font-size: "+H+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(w.foreground?u(w.foreground):"rgb(255, 255, 255)")+"; font-style: "+(w.italics?"italic":"normal")+"; text-decoration: "+(w.underline?"underline":"none")+"; white-space: pre; background-color: "+(w.background?u(w.background):"transparent")+";":"font-size: "+H+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function C(P){return P.replace(/^\s+/g,"")}function k(P){return P.replace(/\s+$/g,"")}function R(P,w,H,N){var A=null,M=null,I=!1,D=-1,v={start:w,end:H,spans:[]},T="style_cea608_white_black",W={},O={},B=[],L=void 0,K=void 0;for(L=0;L<15;++L){var x=N.rows[L],U="",Y=null;if(x.isEmpty()===!1){var oe=h(x.chars);A===null&&(A={x:oe,y1:L,y2:L+1,p:[]}),oe!==D&&I&&(A.p.push(v),v={start:w,end:H,spans:[]},A.y2=L,A.name="region_"+A.x+"_"+A.y1+"_"+A.y2,W.hasOwnProperty(A.name)===!1?(B.push(A),W[A.name]=A):(M=W[A.name],M.p.contat(A.p)),A={x:oe,y1:L,y2:L+1,p:[]});for(var ue=0;ue<x.chars.length;++ue){var re=x.chars[ue],ve=re.penState;if(Y===null||!ve.equals(Y)){U.trim().length>0&&(v.spans.push({name:T,line:U,row:L}),U="");var ce="style_cea608_"+ve.foreground+"_"+ve.background;ve.underline&&(ce+="_underline"),ve.italics&&(ce+="_italics"),O.hasOwnProperty(ce)||(O[ce]=JSON.parse(JSON.stringify(ve))),Y=ve,T=ce}U+=re.uchar}U.trim().length>0&&v.spans.push({name:T,line:U,row:L}),I=!0,D=oe}else I=!1,D=-1,A&&(A.p.push(v),v={start:w,end:H,spans:[]},A.y2=L,A.name="region_"+A.x+"_"+A.y1+"_"+A.y2,W.hasOwnProperty(A.name)===!1?(B.push(A),W[A.name]=A):(M=W[A.name],M.p.contat(A.p)),A=null)}A&&(A.p.push(v),A.y2=L+1,A.name="region_"+A.x+"_"+A.y1+"_"+A.y2,W.hasOwnProperty(A.name)===!1?(B.push(A),W[A.name]=A):(M=W[A.name],M.p.contat(A.p)),A=null);var se=[];for(L=0;L<B.length;++L){var J=B[L],ee="sub_cea608_"+n++,ie=document.createElement("div");ie.id=ee;var me=m(J);ie.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+me;var de=document.createElement("div");de.className="paragraph bodyStyle",de.style.cssText=_(P);var Q=document.createElement("div");Q.className="cueUniWrapper",Q.style.cssText="unicode-bidi: normal; direction: ltr;";for(var X=0;X<J.p.length;++X){var j=J.p[X],le=0;for(K=0;K<j.spans.length;++K){var G=j.spans[K];if(G.line.length>0){if(K!==0&&le!=G.row){var c=document.createElement("br");c.className="lineBreak",Q.appendChild(c)}var E=!1;le===G.row&&(E=!0),le=G.row;var b=O[G.name],l=document.createElement("span");l.className="spanPadding "+G.name+" customSpanColor",l.style.cssText=_(P,b),K!==0&&E?K===j.spans.length-1?l.textContent=k(G.line):l.textContent=G.line:j.spans.length>1&&K<j.spans.length-1&&G.row===j.spans[K+1].row?l.textContent=C(G.line):l.textContent=G.line.trim(),Q.appendChild(l)}}}de.appendChild(Q),ie.appendChild(de);var d={bodyStyle:["%",90]};for(var y in O)O.hasOwnProperty(y)&&(d[y]=["%",90]);se.push({type:"html",start:w,end:H,cueHTMLElement:ie,cueID:ee,cellResolution:[32,15],isFromCEA608:!0,fontSize:d,lineHeight:{},linePadding:{}})}return se}return f={createHTMLCaptionsFromScreen:R},f}o.__dashjs_factory_name="EmbeddedTextHtmlRender",r.default=i.default.getSingletonFactory(o),g.exports=r.default},{"47":47}],211:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(v){return v&&v.__esModule?v:{default:v}}var p=e(112),i=t(p),o=e(46),n=t(o),f=e(54),h=t(f),m=e(47),u=t(m),_=e(227),C=t(_),k=e(107),R=t(k),P=e(213),w=t(P),H=e(239),N=t(H),A=e(51),M=t(A),I="NotFragmentedTextBufferController";function D(v){v=v||{};var T=this.context,W=(0,n.default)(T).getInstance(),O=(0,w.default)(T).getInstance(),B=v.errHandler,L=v.streamInfo,K=v.type,x=v.mimeType,U=v.fragmentModel,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0;function se(){ue=!1,re=null,oe=!1,W.on(h.default.DATA_UPDATE_COMPLETED,l,Y),W.on(h.default.INIT_FRAGMENT_LOADED,y,Y)}function J(){return I}function ee($){X($),ce=(0,C.default)(T).getInstance()}function ie($){var ae=$[0];try{if(ve=(0,R.default)(T).create(re,ae),!ue){var ne=ve.getBuffer();ne.hasOwnProperty(i.default.INITIALIZE)&&ne.initialize(x,L,$,U),ue=!0}return ve}catch(Se){if(ae&&(ae.isText||ae.codec.indexOf('codecs="stpp')!==-1||ae.codec.indexOf('codecs="wvtt')!==-1))try{ve=O.getTextSourceBuffer()}catch(Ie){B.error(new N.default(M.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,M.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+K+" : "+Ie.message))}else B.error(new N.default(M.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,M.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+K))}}function me(){return L.id}function de(){return K}function Q(){return ve}function X($){re=$}function j(){return re}function le(){return!1}function G(){}function c(){return 0}function E(){return oe}function b($){W.off(h.default.DATA_UPDATE_COMPLETED,l,Y),W.off(h.default.INIT_FRAGMENT_LOADED,y,Y),!$&&ve&&(ve.abort(),ve.reset(),ve=null)}function l($){ce.extract(L.id,$.currentRepresentation.id)===null&&(oe=!1,W.trigger(h.default.INIT_FRAGMENT_NEEDED,{representationId:$.currentRepresentation.id,sender:Y},{streamId:L.id,mediaType:K}))}function d($){return ce.extract(L.id,$)!==null}function y($){!$.chunk.bytes||(ce.save($.chunk),ve.append($.chunk),oe=!0,W.trigger(h.default.STREAM_COMPLETED,{request:$.request},{streamId:L.id,mediaType:K}))}function V(){return null}function te($){ve.timestampOffset!==$&&!isNaN($)&&(ve.timestampOffset=$)}return Y={getBufferControllerType:J,initialize:ee,createBuffer:ie,getStreamId:me,getType:de,getBuffer:Q,getBufferLevel:c,setMediaSource:X,getMediaSource:j,getIsBufferingCompleted:E,getIsPruningInProgress:le,dischargePreBuffer:G,appendInitSegment:d,getRangeAt:V,reset:b,updateTimestampOffset:te},se(),Y}D.__dashjs_factory_name=I,r.default=u.default.getClassFactory(D),g.exports=r.default},{"107":107,"112":112,"213":213,"227":227,"239":239,"46":46,"47":47,"51":51,"54":54}],212:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(C){return C&&C.__esModule?C:{default:C}}var p=e(112),i=t(p),o=e(47),n=t(o),f=e(118),h=t(f),m=e(211),u=t(m);function _(C){C=C||{};var k=this.context,R=void 0,P=void 0;function w(){C.type===i.default.FRAGMENTED_TEXT?R=(0,h.default)(k).create({streamInfo:C.streamInfo,type:C.type,mediaPlayerModel:C.mediaPlayerModel,manifestModel:C.manifestModel,fragmentModel:C.fragmentModel,errHandler:C.errHandler,mediaController:C.mediaController,representationController:C.representationController,adapter:C.adapter,textController:C.textController,abrController:C.abrController,playbackController:C.playbackController,settings:C.settings}):R=(0,u.default)(k).create({streamInfo:C.streamInfo,type:C.type,mimeType:C.mimeType,fragmentModel:C.fragmentModel,errHandler:C.errHandler})}function H(){return R.getBufferControllerType()}function N(re,ve){return R.initialize(re,ve)}function A(re,ve){return R.createBuffer(re,ve)}function M(){return R.getType()}function I(){return R.getBuffer()}function D(re){R.setBuffer(re)}function v(){return R.getMediaSource()}function T(re){R.setMediaSource(re)}function W(){return R.getBufferLevel()}function O(re){R.reset(re)}function B(){return R.getIsBufferingCompleted()}function L(re){R.appendInitSegment(re)}function K(){return R.getIsPruningInProgress()}function x(){return R.dischargePreBuffer()}function U(re){return R.getRangeAt(re)}function Y(re){var ve=I();ve.timestampOffset!==re&&!isNaN(re)&&(ve.timestampOffset=re)}function oe(){R.updateAppendWindow()}function ue(re){return R.getRepresentationInfo(re)}return P={getBufferControllerType:H,initialize:N,createBuffer:A,getType:M,getBuffer:I,setBuffer:D,getBufferLevel:W,setMediaSource:T,getMediaSource:v,getIsBufferingCompleted:B,getIsPruningInProgress:K,dischargePreBuffer:x,appendInitSegment:L,getRangeAt:U,reset:O,updateTimestampOffset:Y,updateAppendWindow:oe,getRepresentationInfo:ue},w(),P}_.__dashjs_factory_name="TextBufferController",r.default=n.default.getClassFactory(_),g.exports=r.default},{"112":112,"118":118,"211":211,"47":47}],213:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(I){return I&&I.__esModule?I:{default:I}}var p=e(112),i=t(p),o=e(47),n=t(o),f=e(214),h=t(f),m=e(215),u=t(m),_=e(235),C=t(_),k=e(233),R=t(k),P=e(46),w=t(P),H=e(54),N=t(H),A=e(232);function M(){var I=this.context,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0;function de(){ue=null,ve=-1,J=!1,ee=!1,re=!1,ie=!1,x=(0,u.default)(I).getInstance(),U=(0,C.default)(I).getInstance(),Y=(0,R.default)(I).getInstance(),v=(0,h.default)(I).getInstance(),oe=(0,w.default)(I).getInstance(),x.initialize(),oe.on(N.default.TEXT_TRACKS_QUEUE_INITIALIZED,y,D),oe.on(N.default.CURRENT_TRACK_CHANGED,V,D),oe.on(N.default.PERIOD_SWITCH_STARTED,Q,D),oe.on(N.default.STREAM_COMPLETED,X,D),oe.on(N.default.PERIOD_SWITCH_COMPLETED,j,D),ye()}function Q(pe){me===void 0&&pe.fromStreamInfo!==null&&(me=this.getCurrentTrackIdx())}function X(){me===void 0&&(me=this.getCurrentTrackIdx())}function j(){me!==void 0&&(this.setTextTrack(me),me=void 0)}function le(pe){!pe||(pe.errHandler&&(T=pe.errHandler),pe.adapter&&(W=pe.adapter),pe.manifestModel&&(O=pe.manifestModel),pe.mediaController&&(B=pe.mediaController),pe.videoModel&&(L=pe.videoModel),pe.streamController&&(K=pe.streamController),pe.textTracks&&(x=pe.textTracks),pe.vttParser&&(U=pe.vttParser),pe.ttmlParser&&(Y=pe.ttmlParser),v.setConfig({errHandler:T,adapter:W,manifestModel:O,mediaController:B,videoModel:L,streamController:K,textTracks:x,vttParser:U,ttmlParser:Y}))}function G(){return v}function c(){return se}function E(pe){v.addEmbeddedTrack(pe)}function b(pe){(0,A.checkParameterType)(pe,"string"),ue||(ue={}),ue.lang=pe,re=!0}function l(pe){ue=pe,re=!0}function d(){return ue&&ue.lang||""}function y(pe){var De=this,je=pe.tracks,Fe=pe.index;ue&&je.some(function(Le,Ve){if(B.matchSettings(ue,Le))return De.setTextTrack(Ve),Fe=Ve,!0}),(ce===!1||ce===void 0&&!ue||ie)&&this.setTextTrack(-1),ve=Fe,oe.trigger(N.default.TEXT_TRACKS_ADDED,{enabled:ne(),index:Fe,tracks:je}),ee=!0}function V(pe){if(!re&&pe&&pe.newMediaInfo){var De=pe.newMediaInfo;De.type===i.default.FRAGMENTED_TEXT&&(ue={lang:De.lang,role:De.roles[0],accessibility:De.accessibility[0]})}}function te(pe){(0,A.checkParameterType)(pe,"boolean"),ce=pe,ce?se=!1:this.setTextTrack(-1)}function $(){return ce===void 0?!1:ce}function ae(pe){(0,A.checkParameterType)(pe,"boolean"),!ce&&pe&&(ce=!0),ne()!==pe&&(pe&&this.setTextTrack(ve),pe||(ve=this.getCurrentTrackIdx(),ee?this.setTextTrack(-1):ie=!0))}function ne(){var pe=!0;return se&&!J&&(pe=!1),pe}function Se(pe){(0,A.checkParameterType)(pe,"boolean"),J=pe}function Ie(pe){var De=v.getConfig(),je=De.fragmentModel,Fe=De.fragmentedTracks,Le=De.videoModel,Ve=void 0,Ge=void 0;se=pe===-1;var we=x.getCurrentTrackIdx();if(we!==pe){se&&B&&B.saveTextSettingsDisabled(),x.setModeForTrackIdx(we,i.default.TEXT_HIDDEN),x.setCurrentTrackIdx(pe),x.setModeForTrackIdx(pe,i.default.TEXT_SHOWING);var at=x.getCurrentTrackInfo();if(at&&at.isFragmented&&!at.isEmbedded)for(var Re=0;Re<Fe.length;Re++){var Xe=Fe[Re];if(at.lang===Xe.lang&&at.index===Xe.index&&(Xe.id?at.id===Xe.id:at.id===Xe.index)){var lt=B.getCurrentTrackFor(i.default.FRAGMENTED_TEXT,K.getActiveStreamInfo());if(Xe!==lt)je.abortRequests(),je.removeExecutedRequestsBeforeTime(),v.remove(),x.deleteCuesFromTrackIdx(we),B.setTrack(Xe),v.setCurrentFragmentedTrackIdx(Re);else if(we===-1){for(var ct=K.getActiveStreamProcessors(),tt=0;tt<ct.length;tt++)if(ct[tt].getType()===i.default.FRAGMENTED_TEXT){Ge=ct[tt];break}Ge.setBufferingTime(Le.getTime()),Ge.getScheduleController().start()}}}else if(at&&!at.isFragmented){for(var ct=K.getActiveStreamProcessors(),Re=0;Re<ct.length;Re++)if(ct[Re].getType()===i.default.TEXT){Ge=ct[Re],Ve=Ge.getMediaInfoArr();break}if(Ge&&Ve){for(var Re=0;Re<Ve.length;Re++)if(Ve[Re].index===at.index&&Ve[Re].lang===at.lang){Ge.selectMediaInfo(Ve[Re]);break}}}}}function he(){return x.getCurrentTrackIdx()}function ye(){se=!0,ee=!1,ie=!1}function _e(){ye(),v.resetEmbedded(),v.reset()}return D={setConfig:le,getTextSourceBuffer:G,getAllTracksAreDisabled:c,addEmbeddedTrack:E,getTextDefaultLanguage:d,setTextDefaultLanguage:b,setTextDefaultEnabled:te,getTextDefaultEnabled:$,setInitialSettings:l,enableText:ae,isTextEnabled:ne,setTextTrack:Ie,getCurrentTrackIdx:he,enableForcedTextStreaming:Se,reset:_e},de(),D}M.__dashjs_factory_name="TextController",r.default=n.default.getSingletonFactory(M),g.exports=r.default},{"112":112,"214":214,"215":215,"232":232,"233":233,"235":235,"46":46,"47":47,"54":54}],214:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(oe){return oe&&oe.__esModule?oe:{default:oe}}var p=e(112),i=t(p),o=e(255),n=e(247),f=t(n),h=e(219),m=t(h),u=e(222),_=t(u),C=e(47),k=t(C),R=e(45),P=t(R),w=e(215),H=t(w),N=e(210),A=t(N),M=e(9),I=t(M),D=e(2),v=t(D),T=e(46),W=t(T),O=e(54),B=t(O),L=e(239),K=t(L),x=e(51),U=t(x);function Y(){var oe=this.context,ue=(0,W.default)(oe).getInstance(),re=!1,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0,le=void 0,G=void 0,c=void 0,E=void 0,b=void 0,l=void 0,d=void 0,y=void 0,V=void 0,te=void 0,$=void 0,ae=void 0,ne=void 0,Se=void 0,Ie=void 0;function he(){ce=(0,P.default)(oe).getInstance().getLogger(ve),_e()}function ye(){G=null,E=NaN,b=[],y=null,c=!1}function _e(){ye(),j=[],de=null}function pe(He,ze,mt,vt){re||Ve(),le.setConfig({videoModel:l}),le.initialize(),se||(se=(0,m.default)(oe).getInstance()),De(He,ze,mt,vt)}function De(He,ze,mt,vt){var pt=!ee.getIsTextTrack(He);if(j=j.concat(mt),pt){G=vt,ve.buffered=(0,_.default)(oe).create(),b=me.getTracksFor(i.default.FRAGMENTED_TEXT,ze);for(var Rt=me.getCurrentTrackFor(i.default.FRAGMENTED_TEXT,ze),Ce=0;Ce<b.length;Ce++)if(b[Ce]===Rt){Xe(Ce);break}}for(var Ce=0;Ce<j.length;Ce++)lt(null,j[Ce])}function je(){le.deleteAllTextTracks(),ye(),se=null,j=[]}function Fe(){_e(),d=null,l=null,le=null}function Le(He){var ze=He.chunk;ze.mediaInfo.embeddedCaptions&&ct(ze.bytes,ze)}function Ve(){te=[],le=(0,H.default)(oe).getInstance(),le.setConfig({videoModel:l}),le.initialize(),se=(0,m.default)(oe).getInstance(),V=null,$=0,ne=[],ae=null,re=!0,Se=(0,A.default)(oe).getInstance();var He=d.getActiveStreamProcessors();for(var ze in He)if(He[ze].getType()==="video"){Ie=He[ze].getRepresentationInfo().MSETimeOffset;break}ue.on(B.default.VIDEO_CHUNK_RECEIVED,Le,this),ue.on(B.default.BUFFER_CLEARED,We,this)}function Ge(){ue.off(B.default.VIDEO_CHUNK_RECEIVED,Le,this),ue.off(B.default.BUFFER_CLEARED,We,this),le&&le.deleteAllTextTracks(),re=!1,te=[],ne=[null,null],ae=null}function we(He){if(re||Ve(),He)if(He.id===i.default.CC1||He.id===i.default.CC3){for(var ze=0;ze<te.length;ze++)if(te[ze].id===He.id)return;te.push(He)}else ce.warn("Embedded track "+He.id+" not supported!")}function at(He){!He||(He.errHandler&&(J=He.errHandler),He.adapter&&(ee=He.adapter),He.manifestModel&&(ie=He.manifestModel),He.mediaController&&(me=He.mediaController),He.videoModel&&(l=He.videoModel),He.streamController&&(d=He.streamController),He.textTracks&&(le=He.textTracks),He.vttParser&&(Q=He.vttParser),He.ttmlParser&&(X=He.ttmlParser))}function Re(){var He={fragmentModel:G,fragmentedTracks:b,videoModel:l};return He}function Xe(He){V=He}function lt(He,ze){var mt=new f.default,vt={subtitle:"subtitles",caption:"captions"},pt=function(){var Ye=ze.roles.length>0?vt[ze.roles[0]]:vt.caption;return Ye=Ye===vt.caption||Ye===vt.subtitle?Ye:vt.caption,Ye},Rt=function(){var Ye=!1;return ze.codec&&ze.codec.search(i.default.STPP)>=0&&(Ye=!0),ze.mimeType&&ze.mimeType.search(i.default.TTML)>=0&&(Ye=!0),Ye};mt.captionData=He,mt.lang=ze.lang,mt.labels=ze.labels,mt.id=ze.id?ze.id:ze.index,mt.index=ze.index,mt.isTTML=Rt(),mt.defaultTrack=St(ze),mt.isFragmented=!ee.getIsTextTrack(ze.mimeType),mt.isEmbedded=!!ze.isEmbedded,mt.kind=pt(),mt.roles=ze.roles,mt.accessibility=ze.accessibility;var Ce=(j?j.length:0)+te.length;le.addTextTrack(mt,Ce)}function ct(He,ze){var mt=void 0,vt=void 0,pt=void 0,Rt=void 0,Ce=void 0,Pe=void 0,Ye=void 0,Ze=ze.mediaInfo,ut=Ze.type,Ue=Ze.mimeType,Je=Ze.codec||Ue;if(!Je){ce.error("No text type defined");return}if(ut===i.default.FRAGMENTED_TEXT)if(!c&&ze.segmentType==="InitializationSegment")c=!0,E=se.getMediaTimescaleFromMoov(He);else{if(!c)return;if(Pe=se.getSamplesInfo(He),vt=Pe.sampleList,y===null&&vt.length>0&&(y=vt[0].cts-ze.start*E),Je.search(i.default.STPP)>=0)for(de=de!==null?de:Ct(Je),pt=0;pt<vt.length;pt++){var ht=vt[pt],Et=ht.cts,rt=Et-y;this.buffered.add(rt/E,(rt+ht.duration)/E);var Dt=new DataView(He,ht.offset,ht.subSizes[0]);Ye=I.default.Utils.dataViewToString(Dt,i.default.UTF8);var kt=[],ft=ht.offset+ht.subSizes[0];for(Rt=1;Rt<ht.subSizes.length;Rt++){var Gt=new Uint8Array(He,ft,ht.subSizes[Rt]),Kt=String.fromCharCode.apply(null,Gt);kt.push(Kt),ft+=ht.subSizes[Rt]}try{var Vt=ie.getValue(),Pt=Vt.ttmlTimeIsRelative?Et/E:0;mt=de.parse(Ye,Pt,Et/E,(Et+ht.duration)/E,kt),le.addCaptions(V,y/E,mt)}catch(qe){G.removeExecutedRequestsBeforeTime(),this.remove(),ce.error("TTML parser error: "+qe.message)}}else{var Ee=[];for(pt=0;pt<vt.length;pt++){var ht=vt[pt];ht.cts-=y,this.buffered.add(ht.cts/E,(ht.cts+ht.duration)/E);var Z=He.slice(ht.offset,ht.offset+ht.size),Ae=I.default.parseBuffer(Z);for(Rt=0;Rt<Ae.boxes.length;Rt++){var Te=Ae.boxes[Rt];if(ce.debug("VTT box1: "+Te.type),Te.type!=="vtte"&&Te.type==="vttc")for(ce.debug("VTT vttc boxes.length = "+Te.boxes.length),Ce=0;Ce<Te.boxes.length;Ce++){var be=Te.boxes[Ce];if(ce.debug("VTT box2: "+be.type),be.type==="payl"){var Oe=be.cue_text;ce.debug("VTT cue_text = "+Oe);var Qe=ht.cts/E,Tt=(ht.cts+ht.duration)/E;Ee.push({start:Qe,end:Tt,data:Oe,styles:{}}),ce.debug("VTT "+Qe+"-"+Tt+" : "+Oe)}}}}Ee.length>0&&le.addCaptions(V,0,Ee)}}else if(ut===i.default.TEXT){var Dt=new DataView(He,0,He.byteLength);Ye=I.default.Utils.dataViewToString(Dt,i.default.UTF8);try{mt=Ct(Je).parse(Ye,0),le.addCaptions(le.getCurrentTrackIdx(),0,mt)}catch(ot){J.error(new K.default(U.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,U.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+ot.message,Ye))}}else if(ut===i.default.VIDEO)if(ze.segmentType===o.HTTPRequest.INIT_SEGMENT_TYPE){if($===0)for($=se.getMediaTimescaleFromMoov(He),pt=0;pt<te.length;pt++)lt(null,te[pt])}else{if($===0){ce.warn("CEA-608: No timescale for embeddedTextTrack yet");return}var dt=function(ot,yt){function Ke(it,Ne,S){var z=null;if(l.getTTMLRenderingDiv())z=Se.createHTMLCaptionsFromScreen(l.getElement(),it,Ne,S);else{var F=S.getDisplayText();z=[{start:it,end:Ne,data:F,styles:{}}]}z&&le.addCaptions(yt,0,z)}return Ke};Pe=se.getSamplesInfo(He);var st=Pe.lastSequenceNumber;if(!ne[0]&&!ne[1]){var bt=void 0,Yt=void 0,xt=void 0;for(pt=0;pt<te.length;pt++){if(te[pt].id===i.default.CC1?(bt=0,xt=le.getTrackIdxForId(i.default.CC1)):te[pt].id===i.default.CC3&&(bt=1,xt=le.getTrackIdxForId(i.default.CC3)),xt===-1){ce.warn("CEA-608: data before track is ready.");return}Yt=dt(this,xt),ne[pt]=new v.default.Cea608Parser(pt+1,{newCue:Yt},null)}}if($){if(ae!==null&&st!==ae+Pe.numSequences)for(pt=0;pt<ne.length;pt++)ne[pt]&&ne[pt].reset();for(var Qt=tt(He,Pe.sampleList),Xt=0;Xt<ne.length;Xt++){var Ut=Qt.fields[Xt],Zt=ne[Xt];if(Zt)for(pt=0;pt<Ut.length;pt++)Zt.addData(Ut[pt][0]/$,Ut[pt][1])}ae=st}}}function tt(He,ze){if(ze.length===0)return null;for(var mt={splits:[],fields:[[],[]]},vt=new DataView(He),pt=0;pt<ze.length;pt++)for(var Rt=ze[pt],Ce=v.default.findCea608Nalus(vt,Rt.offset,Rt.size),Pe=null,Ye=0,Ze=0;Ze<Ce.length;Ze++)for(var ut=v.default.extractCea608DataFromRange(vt,Ce[Ze]),Ue=0;Ue<2;Ue++)ut[Ue].length>0&&(Rt.cts!==Pe?Ye=0:Ye+=1,mt.fields[Ue].push([Rt.cts+Ie*$,ut[Ue],Ye]),Pe=Rt.cts);return mt.fields.forEach(function(ht){ht.sort(function(Et,rt){return Et[0]===rt[0]?Et[2]-rt[2]:Et[0]-rt[0]})}),mt}function St(He){var ze=!1;return te.length>1&&He.isEmbedded?ze=He.id&&He.id===i.default.CC1:te.length===1?He.id&&typeof He.id=="string"&&He.id.substring(0,2)==="CC"&&(ze=!0):te.length===0&&(ze=He.index===j[0].index),ze}function Ct(He){var ze=void 0;return He.search(i.default.VTT)>=0?ze=Q:(He.search(i.default.TTML)>=0||He.search(i.default.STPP)>=0)&&(ze=X),ze}function wt(He,ze){He===void 0&&He===ze&&(He=this.buffered.start(0),ze=this.buffered.end(this.buffered.length-1)),this.buffered.remove(He,ze)}function We(He){te.forEach(function(ze){var mt=le.getTrackIdxForId(ze.id);mt>=0&&le.deleteCuesFromTrackIdx(mt,He.from,He.to)})}return ve={initialize:pe,append:ct,abort:je,addEmbeddedTrack:we,resetEmbedded:Ge,setConfig:at,getConfig:Re,setCurrentFragmentedTrackIdx:Xe,remove:wt,reset:Fe},he(),ve}Y.__dashjs_factory_name="TextSourceBuffer",r.default=k.default.getSingletonFactory(Y),g.exports=r.default},{"112":112,"2":2,"210":210,"215":215,"219":219,"222":222,"239":239,"247":247,"255":255,"45":45,"46":46,"47":47,"51":51,"54":54,"9":9}],215:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(w){return w&&w.__esModule?w:{default:w}}var p=e(112),i=t(p),o=e(46),n=t(o),f=e(54),h=t(f),m=e(47),u=t(m),_=e(45),C=t(_),k=e(17),R=e(232);function P(){var w=this.context,H=(0,n.default)(w).getInstance(),N=void 0,A=void 0,M=void 0,I=void 0,D=void 0,v=void 0,T=void 0,W=void 0,O=void 0,B=void 0,L=void 0,K=void 0,x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0;function ve(){A=(0,C.default)(w).getInstance().getLogger(N)}function ce(){typeof window=="undefined"||typeof navigator=="undefined"||(M=window.VTTCue||window.TextTrackCue,D=[],v=[],T=-1,W=0,O=0,B=0,L=0,K=null,x=null,Y=!1,ue=2147483647,oe=null,document.fullscreenElement!==void 0?U="fullscreenElement":document.webkitIsFullScreen!==void 0?U="webkitIsFullScreen":document.msFullscreenElement?U="msFullscreenElement":document.mozFullScreen&&(U="mozFullScreen"))}function se(he){var ye=D[he].kind,_e=D[he].id!==void 0?D[he].id:D[he].lang,pe=D[he].lang,De=D[he].isTTML,je=D[he].isEmbedded,Fe=I.addTextTrack(ye,_e,pe,De,je);return Fe}function J(he){(0,R.checkParameterType)(he,"boolean"),Y=he,!(!K||document[U])&&(K.style.zIndex=he?ue:null)}function ee(he,ye){var _e=this;if(D.length===ye){A.error("Trying to add too many tracks.");return}D.push(he),D.length===ye&&function(){D.sort(function(Le,Ve){return Le.index-Ve.index}),K=I.getTTMLRenderingDiv();for(var pe=-1,De=0;De<D.length;De++){var je=se.call(_e,De);v.push(je),D[De].defaultTrack&&(je.default=!0,pe=De);var Fe=j(De);Fe&&(Fe.mode=i.default.TEXT_SHOWING,K&&(D[De].isTTML||D[De].isEmbedded)?Fe.renderingType="html":Fe.renderingType="default"),_e.addCaptions(De,0,D[De].captionData),H.trigger(h.default.TEXT_TRACK_ADDED)}c.call(_e,pe),pe>=0&&function(){var Le=function we(){var at=j(pe);at&&me.call(this,at,!0),H.off(h.default.PLAYBACK_METADATA_LOADED,we,this)};H.on(h.default.PLAYBACK_METADATA_LOADED,Le,_e);for(var Ve=0;Ve<D.length;Ve++){var Ge=j(Ve);Ge&&(Ge.mode=Ve===pe?i.default.TEXT_SHOWING:i.default.TEXT_HIDDEN)}}(),H.trigger(h.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:T,tracks:D})}()}function ie(he,ye,_e,pe,De,je){var Fe=he/ye,Le=_e/pe,Ve=0,Ge=0;Fe>Le?(Ge=ye,Ve=Ge/pe*_e):(Ve=he,Ge=Ve/_e*pe);var we=0,at=0,Re=0,Xe=0,lt=Ve/Ge;return lt>De?(Xe=Ge,Re=Ge*De):(Re=Ve,Xe=Ve/De),we=(he-Re)/2,at=(ye-Xe)/2,je?{x:we+Re*.1,y:at+Xe*.1,w:Re*.8,h:Xe*.8}:{x:we,y:at,w:Re,h:Xe}}function me(he,ye){var _e=I.getClientWidth(),pe=I.getClientHeight(),De=I.getVideoWidth(),je=I.getVideoHeight(),Fe=I.getVideoRelativeOffsetTop(),Le=I.getVideoRelativeOffsetLeft();if(De!==0&&je!==0){var Ve=De/je,Ge=!1;he.isFromCEA608&&(Ve=3.5/3,Ge=!0);var we=ie.call(this,_e,pe,De,je,Ve,Ge),at=we.w,Re=we.h,Xe=we.x,lt=we.y;if(at!=B||Re!=L||Xe!=W||lt!=O||ye){if(W=Xe+Le,O=lt+Fe,B=at,L=Re,K){var ct=K.style;ct&&(ct.left=W+"px",ct.top=O+"px",ct.width=B+"px",ct.height=L+"px",ct.zIndex=U&&document[U]||Y?ue:null,H.trigger(h.default.CAPTION_CONTAINER_RESIZE))}var tt=he.activeCues;if(tt)for(var St=tt.length,Ct=0;Ct<St;++Ct){var wt=tt[Ct];wt.scaleCue(wt)}}}}function de(he){var ye=B,_e=L,pe=void 0,De=void 0,je=void 0,Fe=void 0,Le=void 0;if(he.cellResolution){var Ve=[ye/he.cellResolution[0],_e/he.cellResolution[1]];if(he.linePadding){for(pe in he.linePadding)if(he.linePadding.hasOwnProperty(pe)){var Ge=he.linePadding[pe];De=(Ge*Ve[0]).toString();for(var we=document.getElementsByClassName("spanPadding"),at=0;at<we.length;at++)we[at].style.cssText=we[at].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+De),we[at].style.cssText=we[at].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+De)}}if(he.fontSize){for(pe in he.fontSize)if(he.fontSize.hasOwnProperty(pe)){he.fontSize[pe][0]==="%"?je=he.fontSize[pe][1]/100:he.fontSize[pe][0]==="c"&&(je=he.fontSize[pe][1]),De=(je*Ve[1]).toString(),pe!=="defaultFontSize"?Le=document.getElementsByClassName(pe):Le=document.getElementsByClassName("paragraph");for(var Re=0;Re<Le.length;Re++)Le[Re].style.cssText=Le[Re].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+De)}if(he.lineHeight){for(pe in he.lineHeight)if(he.lineHeight.hasOwnProperty(pe)){he.lineHeight[pe][0]==="%"?Fe=he.lineHeight[pe][1]/100:he.fontSize[pe][0]==="c"&&(Fe=he.lineHeight[pe][1]),De=(Fe*Ve[1]).toString(),Le=document.getElementsByClassName(pe);for(var Xe=0;Xe<Le.length;Xe++)Le[Xe].style.cssText=Le[Xe].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+De)}}}}if(he.isd){var lt=document.getElementById(he.cueID);lt&&K.removeChild(lt),Q(he)}}function Q(he){if(K){var ye=document.createElement("div");K.appendChild(ye),oe=(0,k.renderHTML)(he.isd,ye,function(_e){var pe=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,De=/^#(.*)$/;if(pe.test(_e)){var je=pe.exec(_e),Fe=parseInt(je[4],10)-1,Le=btoa(he.images[Fe]),Ve="data:image/png;base64,"+Le;return Ve}else if(De.test(_e)){var je=De.exec(_e),Fe=je[1],Ve="data:image/png;base64,"+he.embeddedImages[Fe];return Ve}else return null},K.clientHeight,K.clientWidth,!1,function(_e){A.info("renderCaption :",_e)},oe,!0),ye.id=he.cueID,H.trigger(h.default.CAPTION_RENDERED,{captionDiv:ye,currentTrackIdx:T})}}function X(he,ye,_e){var pe=j(he),De=this;if(!!pe&&!(!Array.isArray(_e)||_e.length===0))for(var je=0;je<_e.length;je++){var Fe=void 0,Le=_e[je];pe.cellResolution=Le.cellResolution,pe.isFromCEA608=Le.isFromCEA608,Le.type==="html"&&K?(Fe=new M(Le.start-ye,Le.end-ye,""),Fe.cueHTMLElement=Le.cueHTMLElement,Fe.isd=Le.isd,Fe.images=Le.images,Fe.embeddedImages=Le.embeddedImages,Fe.cueID=Le.cueID,Fe.scaleCue=de.bind(De),Fe.cellResolution=Le.cellResolution,Fe.lineHeight=Le.lineHeight,Fe.linePadding=Le.linePadding,Fe.fontSize=Le.fontSize,K.style.left=W+"px",K.style.top=O+"px",K.style.width=B+"px",K.style.height=L+"px",Fe.onenter=function(){pe.mode===i.default.TEXT_SHOWING&&(this.isd?(Q(this),A.debug("Cue enter id:"+this.cueID)):(K.appendChild(this.cueHTMLElement),de.call(De,this),H.trigger(h.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:T})))},Fe.onexit=function(){if(K)for(var Ve=K.childNodes,Ge=0;Ge<Ve.length;++Ge)Ve[Ge].id===this.cueID&&(A.debug("Cue exit id:"+Ve[Ge].id),K.removeChild(Ve[Ge]),--Ge)}):Le.data&&(Fe=new M(Le.start-ye,Le.end-ye,Le.data),Le.styles&&(Le.styles.align!==void 0&&"align"in Fe&&(Fe.align=Le.styles.align),Le.styles.line!==void 0&&"line"in Fe&&(Fe.line=Le.styles.line),Le.styles.position!==void 0&&"position"in Fe&&(Fe.position=Le.styles.position),Le.styles.size!==void 0&&"size"in Fe&&(Fe.size=Le.styles.size)),Fe.onenter=function(){pe.mode===i.default.TEXT_SHOWING&&H.trigger(h.default.CAPTION_RENDERED,{currentTrackIdx:T})});try{Fe?pe.addCue(Fe):A.error("impossible to display subtitles.")}catch(Ve){throw l(pe),pe.addCue(Fe),Ve}}}function j(he){return he>=0&&D[he]?I.getTextTrack(D[he].kind,D[he].id,D[he].lang,D[he].isTTML,D[he].isEmbedded):null}function le(){return T}function G(he){for(var ye=-1,_e=0;_e<D.length;_e++)if(D[_e].id===he){ye=_e;break}return ye}function c(he){var ye=this;if(he!==T){T=he;var _e=j(T);E.call(this,_e),x&&(clearInterval(x),x=null),_e&&_e.renderingType==="html"&&(me.call(this,_e,!0),window.ResizeObserver?(re=new window.ResizeObserver(function(){me.call(ye,_e,!0)}),re.observe(I.getElement())):x=setInterval(me.bind(this,_e),500))}}function E(he){ae.call(this),he?he.renderingType==="html"?te.call(this):$.call(this):$.call(this)}function b(he,ye,_e){return(isNaN(ye)||he.startTime>=ye)&&(isNaN(_e)||he.endTime<=_e)}function l(he,ye,_e){if(he.cues)for(var pe=he.cues,De=pe.length-1,je=De;je>=0;je--)b(pe[je],ye,_e)&&he.removeCue(pe[je])}function d(he,ye,_e){var pe=j(he);pe&&l(pe,ye,_e)}function y(){for(var he=v?v.length:0,ye=0;ye<he;ye++){var _e=j(ye);_e&&(l.call(this,_e),_e.mode="disabled")}v=[],D=[],x&&(clearInterval(x),x=null),re&&I&&(re.unobserve(I.getElement()),re=null),T=-1,ae.call(this)}function V(he){I.removeChild(v[he]),v.splice(he,1)}function te(){var he=document.getElementById("native-cue-style");if(!he){he=document.createElement("style"),he.id="native-cue-style",document.head.appendChild(he);var ye=he.sheet,_e=I.getElement();try{_e&&(_e.id?ye.insertRule("#"+_e.id+"::cue {background: transparent}",0):_e.classList.length!==0?ye.insertRule("."+_e.className+"::cue {background: transparent}",0):ye.insertRule("video::cue {background: transparent}",0))}catch(pe){A.info(""+pe.message)}}}function $(){var he=document.getElementById("native-cue-style");he&&document.head.removeChild(he)}function ae(){if(K)for(;K.firstChild;)K.removeChild(K.firstChild)}function ne(he){!he||he.videoModel&&(I=he.videoModel)}function Se(he,ye){var _e=j(he);_e&&_e.mode!==ye&&(_e.mode=ye)}function Ie(){return D[T]}return N={initialize:ce,setDisplayCConTop:J,addTextTrack:ee,addCaptions:X,getCurrentTrackIdx:le,setCurrentTrackIdx:c,getTrackIdxForId:G,getCurrentTrackInfo:Ie,setModeForTrackIdx:Se,deleteCuesFromTrackIdx:d,deleteAllTextTracks:y,deleteTextTrack:V,setConfig:ne},ve(),N}P.__dashjs_factory_name="TextTracks",r.default=u.default.getSingletonFactory(P),g.exports=r.default},{"112":112,"17":17,"232":232,"45":45,"46":46,"47":47,"54":54}],216:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(P){return P&&P.__esModule?P:{default:P}}var p=e(47),i=t(p),o=e(112),n=t(o),f=e(248),h=t(f),m=e(217),u=t(m),_=e(238),C=t(_),k=e(81);function R(P){var w=this.context,H=P.streamInfo,N=void 0,A=void 0;function M(){B(),A=(0,u.default)(w).create({streamInfo:H,adapter:P.adapter,baseURLController:P.baseURLController,timelineConverter:P.timelineConverter,debug:P.debug,eventBus:P.eventBus,events:P.events,dashConstants:P.dashConstants})}function I(){return H.id}function D(L,K){if(typeof K=="function"){var x=A.getCurrentTrack(),U=void 0,Y=void 0;if(!x||x.segmentDuration<=0||L===void 0||L===null){K(null);return}isNaN(x.segmentDuration)&&(Y=A.getThumbnailRequestForTime(L),Y&&(x.segmentDuration=Y.duration)),U=L%x.segmentDuration;var oe=Math.floor(U*x.tilesHor*x.tilesVert/x.segmentDuration),ue=new h.default;if(ue.width=Math.floor(x.widthPerTile),ue.height=Math.floor(x.heightPerTile),ue.x=Math.floor(oe%x.tilesHor)*x.widthPerTile,ue.y=Math.floor(oe/x.tilesHor)*x.heightPerTile,"readThumbnail"in x)return x.readThumbnail(L,function(ve){ue.url=ve,K(ue)});if(Y)ue.url=Y.url,x.segmentDuration=NaN;else{var re=Math.floor(L/x.segmentDuration);ue.url=v(x,re)}K(ue)}}function v(L,K){var x=K+L.startNumber,U=(0,k.replaceTokenForTemplate)(L.templateUrl,"Number",x);return U=(0,k.replaceTokenForTemplate)(U,"Time",(x-1)*L.segmentDuration*L.timescale),U=(0,k.replaceTokenForTemplate)(U,"Bandwidth",L.bandwidth),(0,k.unescapeDollarsInTemplate)(U)}function T(L){A.setTrackByIndex(L)}function W(){return A.getCurrentTrackIndex()}function O(){var L=A.getTracks(),K=0;return L.map(function(x){var U=new C.default;return U.mediaType=n.default.IMAGE,U.qualityIndex=K++,U.bitrate=x.bitrate,U.width=x.width,U.height=x.height,U})}function B(){A&&A.reset()}return N={getStreamId:I,provide:D,setTrackByIndex:T,getCurrentTrackIndex:W,getBitrateList:O,reset:B},M(),N}R.__dashjs_factory_name="ThumbnailController",r.default=i.default.getClassFactory(R),g.exports=r.default},{"112":112,"217":217,"238":238,"248":248,"47":47,"81":81}],217:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(T){return T&&T.__esModule?T:{default:T}}var p=e(112),i=t(p),o=e(61),n=t(o),f=e(47),h=t(f),m=e(249),u=t(m),_=e(234),C=t(_),k=e(81),R=e(54),P=t(R),w=e(219),H=t(w),N=e(164),A=t(N),M=e(57),I=t(M),D=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];r.THUMBNAILS_SCHEME_ID_URIS=D;function v(T){var W=this.context,O=T.adapter,B=T.baseURLController,L=T.streamInfo,K=T.timelineConverter,x=T.debug,U=T.eventBus,Y=T.events,oe=T.dashConstants,ue=(0,C.default)(W).getInstance(),re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0;function me(){l(),ee=(0,A.default)(W).create({}),ie=(0,H.default)(W).getInstance(),ce=(0,I.default)(W).create({streamInfo:L,timelineConverter:K,baseURLController:B,debug:x,eventBus:U,events:Y,dashConstants:oe,urlUtils:ue}),ce.initialize(O?O.getIsDynamic():!1),Q()}function de(d,y){var V=[],te=0,$=void 0,ae=void 0,ne=void 0,Se=void 0;for($=0,ae=d.length;$<ae;$++)ne=d[$],Se=(0,k.getTimeBasedSegment)(K,O.getIsDynamic(),y,ne.startTime,ne.duration,ne.timescale,ne.media,ne.mediaRange,te),Se&&(V.push(Se),Se=null,te++);return V}function Q(){if(!(!L||!O)&&(J=O.getMediaInfoForType(L,i.default.IMAGE),!!J)){var d=O.getVoRepresentations(J);d&&d.length>0&&d.forEach(function(y){(y.segmentInfoType===n.default.SEGMENT_TEMPLATE&&y.segmentDuration>0&&y.media||y.segmentInfoType===n.default.SEGMENT_TIMELINE)&&X(y),y.segmentInfoType===n.default.SEGMENT_BASE&&X(y,!0)}),ve.length>0&&(ve.sort(function(y,V){return y.bitrate-V.bitrate}),se=ve.length-1)}}function X(d,y){var V=new u.default;V.id=d.id,V.bitrate=d.bandwidth,V.width=d.width,V.height=d.height,V.tilesHor=1,V.tilesVert=1,d.essentialProperties&&d.essentialProperties.forEach(function(te){if(D.indexOf(te.schemeIdUri)>=0&&te.value){var $=te.value.split("x");$.length===2&&!isNaN($[0])&&!isNaN($[1])&&(V.tilesHor=parseInt($[0],10),V.tilesVert=parseInt($[1],10))}}),y?U.trigger(P.default.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:L.id,mediaType:i.default.IMAGE,mimeType:J.mimeType,representation:d,callback:function($,ae,ne,Se){var Ie=[];ne=de(ne,Se),V.segmentDuration=ne[0].duration,V.readThumbnail=function(he,ye){var _e=null;Ie.some(function(pe){if(pe.start<=he&&pe.end>he)return _e=pe.url,!0}),_e?ye(_e):ne.some(function(pe){if(pe.mediaStartTime<=he&&pe.mediaStartTime+pe.duration>he){var De=B.resolve(Se.path);return ee.load({method:"get",url:De.url,request:{range:pe.mediaRange,responseType:"arraybuffer"},onload:function(Fe){var Le=ie.getSamplesInfo(Fe.target.response),Ve=new Blob([Fe.target.response.slice(Le.sampleList[0].offset,Le.sampleList[0].offset+Le.sampleList[0].size)],{type:"image/jpeg"}),Ge=window.URL.createObjectURL(Ve);Ie.push({start:pe.mediaStartTime,end:pe.mediaStartTime+pe.duration,url:Ge}),ye&&ye(Ge)}}),!0}})}}}):(V.startNumber=d.startNumber,V.segmentDuration=d.segmentDuration,V.timescale=d.timescale,V.templateUrl=j(d)),V.tilesHor>0&&V.tilesVert>0&&(V.widthPerTile=V.width/V.tilesHor,V.heightPerTile=V.height/V.tilesVert,ve.push(V))}function j(d){var y=ue.isRelative(d.media)?ue.resolve(d.media,B.resolve(d.path).url):d.media;return y?(0,k.replaceIDForTemplate)(y,d.id):""}function le(){return ve}function G(){return se}function c(){return se<0?null:ve[se]}function E(d){!ve||ve.length===0||(d>=ve.length&&(d=ve.length-1),se=d)}function b(d){for(var y=void 0,V=O.getVoRepresentations(J),te=0;te<V.length;te++)if(ve[se].id===V[te].id){y=V[te];break}return ce.getSegmentRequestForTime(J,y,d)}function l(){ve=[],se=-1,J=null}return re={initialize:me,getTracks:le,reset:l,setTrackByIndex:E,getCurrentTrack:c,getCurrentTrackIndex:G,getThumbnailRequestForTime:b},me(),re}v.__dashjs_factory_name="ThumbnailTracks",r.default=h.default.getClassFactory(v)},{"112":112,"164":164,"219":219,"234":234,"249":249,"47":47,"54":54,"57":57,"61":61,"81":81}],218:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(I){return I&&I.__esModule?I:{default:I}}var p=e(51),i=t(p),o=e(46),n=t(o),f=e(54),h=t(f),m=e(117),u=t(m),_=e(237),C=t(_),k=e(236),R=t(k),P=e(47),w=t(P),H=e(239),N=t(H),A=e(232);function M(){var I=this.context,D=(0,n.default)(I).getInstance(),v=void 0,T=void 0,W=void 0,O=void 0,B=void 0;function L(){T=(0,u.default)(I).create({updateEventName:h.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:h.default.SERVICE_LOCATION_BLACKLIST_ADD}),W=(0,R.default)(I).create({blacklistController:T}),O=(0,C.default)(I).create({blacklistController:T}),B=W}function K(oe){oe.selector&&(B=oe.selector)}function x(oe){(0,A.checkParameterType)(oe,"boolean"),B=oe?O:W}function U(oe){if(!!oe){var ue=oe.baseUrls,re=oe.selectedIdx;if(!isNaN(re))return ue[re];var ve=B.select(ue);if(!ve){D.trigger(h.default.URL_RESOLUTION_FAILED,{error:new N.default(i.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,i.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),B===W&&Y();return}return oe.selectedIdx=ue.indexOf(ve),ve}}function Y(){T.reset()}return v={chooseSelector:x,select:U,reset:Y,setConfig:K},L(),v}M.__dashjs_factory_name="BaseURLSelector",r.default=w.default.getClassFactory(M),g.exports=r.default},{"117":117,"232":232,"236":236,"237":237,"239":239,"46":46,"47":47,"51":51,"54":54}],219:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(R){return R&&R.__esModule?R:{default:R}}var p=e(45),i=t(p),o=e(228),n=t(o),f=e(47),h=t(f),m=e(9),u=t(m),_=e(244),C=t(_);function k(){var R=void 0,P=void 0,w=this.context;function H(){R=(0,i.default)(w).getInstance().getLogger(P)}function N(O){if(!O)return null;O.fileStart===void 0&&(O.fileStart=0);var B=u.default.parseBuffer(O),L=(0,n.default)(w).create();return L.setData(B),L}function A(O,B,L){if(L===void 0&&(L=0),!B||L+8>=B.byteLength)return new C.default(0,!1);for(var K=B instanceof ArrayBuffer?new Uint8Array(B):B,x=void 0,U=0;L<K.byteLength;){var Y=D(K,L),oe=v(K,L+4);if(Y===0)break;L+Y<=K.byteLength&&(O.indexOf(oe)>=0?x=new C.default(L,!0,Y):U=L+Y),L+=Y}return x||new C.default(U,!1)}function M(O){if(!O||O.byteLength===0)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var B=N(O),L=B.getBoxes("moof"),K=B.getBoxes("mfhd"),x=void 0,U=void 0,Y=void 0,oe=void 0,ue=void 0,re=void 0,ve=void 0,ce=void 0,se=void 0,J=void 0,ee=void 0,ie=void 0,me=void 0,de=void 0,Q=void 0,X=void 0,j=void 0;X=B.getBoxes("moof").length,Q=K[K.length-1].sequence_number,Y=0,re=[];var le=-1,G=-1;for(ee=0;ee<L.length;ee++){var c=L[ee],E=c.getChildBoxes("traf");for(se=0;se<E.length;se++){var b=E[se],l=b.getChildBox("tfhd"),d=b.getChildBox("tfdt");ue=d.baseMediaDecodeTime;var y=b.getChildBoxes("trun"),V=b.getChildBoxes("subs");for(J=0;J<y.length;J++){var te=y[J];for(Y=te.sample_count,de=(l.base_data_offset||0)+(te.data_offset||0),ce=0;ce<Y;ce++){ve=te.samples[ce],x=ve.sample_duration!==void 0?ve.sample_duration:l.default_sample_duration,oe=ve.sample_size!==void 0?ve.sample_size:l.default_sample_size,U=ve.sample_composition_time_offset!==void 0?ve.sample_composition_time_offset:0;var $={dts:ue,cts:ue+U,duration:x,offset:c.offset+de,size:oe,subSizes:[oe]};if(V)for(ie=0;ie<V.length;ie++){var ae=V[ie];if(le<ae.entry_count-1&&ce>G&&(le++,G+=ae.entries[le].sample_delta),ce==G){$.subSizes=[];var ne=ae.entries[le];for(me=0;me<ne.subsample_count;me++)$.subSizes.push(ne.subsamples[me].subsample_size)}}re.push($),de+=oe,ue+=x}}j=ue-d.baseMediaDecodeTime}}return{sampleList:re,lastSequenceNumber:Q,totalDuration:j,numSequences:X}}function I(O){var B=N(O),L=B?B.getBox("mdhd"):void 0;return L?L.timescale:NaN}function D(O,B){return O[B+3]>>>0|O[B+2]<<8>>>0|O[B+1]<<16>>>0|O[B]<<24>>>0}function v(O,B){return String.fromCharCode(O[B++])+String.fromCharCode(O[B++])+String.fromCharCode(O[B++])+String.fromCharCode(O[B])}function T(O){var B=null,L=void 0,K=void 0,x=N(O);if(!x)return B;var U=x.getBox("ftyp"),Y=x.getBox("moov");return R.debug("Searching for initialization."),Y&&Y.isComplete&&(L=U?U.offset:Y.offset,K=Y.offset+Y.size-1,B=L+"-"+K,R.debug("Found the initialization. Range: "+B)),B}function W(O,B,L){if(L===void 0&&(L=0),!B||L+8>=B.byteLength)return new C.default(0,!1);for(var K=B instanceof ArrayBuffer?new Uint8Array(B):B,x=void 0,U=0;L<K.byteLength;){var Y=D(K,L),oe=v(K,L+4);if(Y===0)break;L+Y<=K.byteLength&&(O.indexOf(oe)>=0?x=new C.default(L,!0,Y,oe):U=L+Y),L+=Y}return x||new C.default(U,!1)}return P={parse:N,findLastTopIsoBoxCompleted:A,getMediaTimescaleFromMoov:I,getSamplesInfo:M,findInitRange:T,parsePayload:W},H(),P}k.__dashjs_factory_name="BoxParser",r.default=h.default.getSingletonFactory(k),g.exports=r.default},{"228":228,"244":244,"45":45,"47":47,"9":9}],220:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.supportsMediaSource=f;function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(217),n=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function f(){var m="WebKitMediaSource"in window,u="MediaSource"in window;return m||u}function h(){var m=void 0,u=void 0;function _(){u=!1}function C(){return u}function k(H){u=H}function R(H){return!!("MediaSource"in window&&MediaSource.isTypeSupported(H)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(H))}function P(H){try{return o.THUMBNAILS_SCHEME_ID_URIS.indexOf(H.schemeIdUri)!==-1}catch(N){return!0}}function w(H,N){for(var A=H.split(".")[0],M=N.indexOf(A)===0,I=void 0,D=0;D<n.length;D++)if(n[D].codec===A){I=n[D];break}return I?M||I.compatibleCodecs.some(function(v){return N.indexOf(v)===0}):M}return m={supportsMediaSource:f,supportsEncryptedMedia:C,supportsCodec:R,setEncryptedMediaSupported:k,supportsEssentialProperty:P,codecRootCompatibleWithCodec:w},_(),m}h.__dashjs_factory_name="Capabilities",r.default=i.default.getSingletonFactory(h)},{"217":217,"47":47}],221:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(112),h=t(f);function m(){var u=this.context,_=void 0,C=void 0,k=void 0,R=void 0,P=void 0,w=void 0;function H(){P=(0,n.default)(u).getInstance().getLogger(_)}function N(T){!T||(T.adapter&&(C=T.adapter),T.capabilities&&(k=T.capabilities),T.settings&&(R=T.settings))}function A(T){M(h.default.VIDEO,T),M(h.default.AUDIO,T),R.get().streaming.filterUnsupportedEssentialProperties&&I(T),D(T)}function M(T,W){var O=C.getRealPeriodByIndex(W?W.index:null);!O||!O.AdaptationSet_asArray||O.AdaptationSet_asArray.length===0||(O.AdaptationSet_asArray=O.AdaptationSet_asArray.filter(function(B){return!B.Representation_asArray||B.Representation_asArray.length===0||!C.getIsTypeOf(B,T)?!0:(B.Representation_asArray=B.Representation_asArray.filter(function(L,K){var x=C.getCodec(B,K,!0);return k.supportsCodec(x)?!0:(P.error("[Stream] codec not supported: "+x),!1)}),B.Representation_asArray&&B.Representation_asArray.length>0)}))}function I(T){var W=C.getRealPeriodByIndex(T?T.index:null);!W||!W.AdaptationSet_asArray||W.AdaptationSet_asArray.length===0||(W.AdaptationSet_asArray=W.AdaptationSet_asArray.filter(function(O){return!O.Representation_asArray||O.Representation_asArray.length===0?!0:(O.Representation_asArray=O.Representation_asArray.filter(function(B){var L=C.getEssentialPropertiesForRepresentation(B);if(L&&L.length>0)for(var K=0;K<L.length;){if(!k.supportsEssentialProperty(L[K]))return P.debug("[Stream] EssentialProperty not supported: "+L[K].schemeIdUri),!1;K+=1}return!0}),O.Representation_asArray&&O.Representation_asArray.length>0)}))}function D(T){if(!(!w||w.length===0)){var W=C.getRealPeriodByIndex(T?T.index:null);!W||!W.AdaptationSet_asArray||W.AdaptationSet_asArray.length===0||(W.AdaptationSet_asArray=W.AdaptationSet_asArray.filter(function(O){return!O.Representation_asArray||O.Representation_asArray.length===0?!0:(O.Representation_asArray=O.Representation_asArray.filter(function(B){return!w.some(function(L){return!L(B)})}),O.Representation_asArray&&O.Representation_asArray.length>0)}))}}function v(T){w=T}return _={setConfig:N,filterUnsupportedFeaturesOfPeriod:A,setCustomCapabilitiesFilters:v},H(),_}m.__dashjs_factory_name="CapabilitiesFilter",r.default=i.default.getSingletonFactory(m),g.exports=r.default},{"112":112,"45":45,"47":47}],222:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(f){return f&&f.__esModule?f:{default:f}}var p=e(47),i=t(p),o=e(232);function n(){var f=[],h=0;function m(P,w){var H=0;for(H=0;H<this.customTimeRangeArray.length&&P>this.customTimeRangeArray[H].start;H++);for(this.customTimeRangeArray.splice(H,0,{start:P,end:w}),H=0;H<this.customTimeRangeArray.length-1;H++)this.mergeRanges(H,H+1)&&H--;this.length=this.customTimeRangeArray.length}function u(){this.customTimeRangeArray=[],this.length=0}function _(P,w){for(var H=0;H<this.customTimeRangeArray.length;H++)if(P<=this.customTimeRangeArray[H].start&&w>=this.customTimeRangeArray[H].end)this.customTimeRangeArray.splice(H,1),H--;else if(P>this.customTimeRangeArray[H].start&&w<this.customTimeRangeArray[H].end){this.customTimeRangeArray.splice(H+1,0,{start:w,end:this.customTimeRangeArray[H].end}),this.customTimeRangeArray[H].end=P;break}else P>this.customTimeRangeArray[H].start&&P<this.customTimeRangeArray[H].end?this.customTimeRangeArray[H].end=P:w>this.customTimeRangeArray[H].start&&w<this.customTimeRangeArray[H].end&&(this.customTimeRangeArray[H].start=w);this.length=this.customTimeRangeArray.length}function C(P,w){var H=this.customTimeRangeArray[P],N=this.customTimeRangeArray[w];return H.start<=N.start&&N.start<=H.end&&H.end<=N.end?(H.end=N.end,this.customTimeRangeArray.splice(w,1),!0):N.start<=H.start&&H.start<=N.end&&N.end<=H.end?(H.start=N.start,this.customTimeRangeArray.splice(w,1),!0):N.start<=H.start&&H.start<=N.end&&H.end<=N.end?(this.customTimeRangeArray.splice(P,1),!0):H.start<=N.start&&N.start<=H.end&&N.end<=H.end?(this.customTimeRangeArray.splice(w,1),!0):!1}function k(P){return(0,o.checkInteger)(P),P>=this.customTimeRangeArray.length||P<0?NaN:this.customTimeRangeArray[P].start}function R(P){return(0,o.checkInteger)(P),P>=this.customTimeRangeArray.length||P<0?NaN:this.customTimeRangeArray[P].end}return{customTimeRangeArray:f,length:h,add:m,clear:u,remove:_,mergeRanges:C,start:k,end:R}}n.__dashjs_factory_name="CustomTimeRanges",r.default=i.default.getClassFactory(n),g.exports=r.default},{"232":232,"47":47}],223:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(N){return N&&N.__esModule?N:{default:N}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(112),h=t(f),m=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],u="dashjs_?_bitrate",_="dashjs_?_settings",C="localStorage",k="sessionStorage",R="lastBitrate",P="lastMediaSettings";function w(N){N=N||{};var A=this.context,M=N.settings,I=void 0,D=void 0,v=void 0;function T(){D=(0,n.default)(A).getInstance().getLogger(I),O()}function W(ue){if(v!==void 0)return v;v=!1;var re="1",ve="1",ce=void 0;try{typeof window!="undefined"&&(ce=window[ue])}catch(se){return D.warn("DOMStorage access denied: "+se.message),v}if(!ce||ue!==C&&ue!==k)return v;try{ce.setItem(re,ve),ce.removeItem(re),v=!0}catch(se){D.warn("DOMStorage is supported, but cannot be used: "+se.message)}return v}function O(){W(C)&&m.forEach(function(ue){var re=localStorage.getItem(ue.oldKey);if(re){localStorage.removeItem(ue.oldKey);try{localStorage.setItem(ue.newKey,re)}catch(ve){D.error(ve.message)}}})}function B(){var ue=60*1e3*10;return Math.round(new Date().getTime()/ue)*ue}function L(ue,re){return W(ue)&&M.get().streaming[re+"CachingInfo"].enabled}function K(){if(!M)throw new Error(h.default.MISSING_CONFIG_ERROR)}function x(ue){var re=null;if(K(),L(C,P)){var ve=_.replace(/\?/,ue);try{var ce=JSON.parse(localStorage.getItem(ve))||{},se=new Date().getTime()-parseInt(ce.timestamp,10)>=M.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;re=ce.settings,se&&(localStorage.removeItem(ve),re=null)}catch(J){return null}}return re}function U(ue){var re=NaN;if(K(),L(C,R)){var ve=u.replace(/\?/,ue);try{var ce=JSON.parse(localStorage.getItem(ve))||{},se=new Date().getTime()-parseInt(ce.timestamp,10)>=M.get().streaming.lastBitrateCachingInfo.ttl||!1,J=parseFloat(ce.bitrate);!isNaN(J)&&!se?(re=J,D.debug("Last saved bitrate for "+ue+" was "+J)):se&&localStorage.removeItem(ve)}catch(ee){return null}}return re}function Y(ue,re){if(L(C,P)){var ve=_.replace(/\?/,ue);try{localStorage.setItem(ve,JSON.stringify({settings:re,timestamp:B()}))}catch(ce){D.error(ce.message)}}}function oe(ue,re){if(L(C,R)&&re){var ve=u.replace(/\?/,ue);try{localStorage.setItem(ve,JSON.stringify({bitrate:re.toFixed(3),timestamp:B()}))}catch(ce){D.error(ce.message)}}}return I={getSavedBitrateSettings:U,setSavedBitrateSettings:oe,getSavedMediaSettings:x,setSavedMediaSettings:Y},T(),I}w.__dashjs_factory_name="DOMStorage";var H=i.default.getSingletonFactory(w);r.default=H,g.exports=r.default},{"112":112,"45":45,"47":47}],224:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(){var n=void 0,f=/^[a-z][a-z0-9+\-_.]*:/i,h=/^https?:\/\//i,m=/^https:\/\//i,u=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,_=function(O,B){try{return new window.URL(O,B).toString()}catch(L){return O}},C=function(O,B){var L=R;if(!B||!N(O))return O;A(O)&&(L=P),M(O)&&(L=H);var K=L(B),x=K.charAt(K.length-1)!=="/"&&O.charAt(0)!=="/"?"/":"";return[K,O].join(x)};function k(){try{var W=new window.URL("x","http://y");n=_}catch(O){}finally{n=n||C}}function R(W){var O=W.indexOf("/"),B=W.lastIndexOf("/");return O!==-1?B===O+1?W:(W.indexOf("?")!==-1&&(W=W.substring(0,W.indexOf("?"))),W.substring(0,B+1)):""}function P(W){var O=W.match(u);return O?O[1]:""}function w(W){var O=/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(W);return O[2].substring(1)}function H(W){var O=W.match(f);return O?O[0]:""}function N(W){return!f.test(W)}function A(W){return N(W)&&W.charAt(0)==="/"}function M(W){return W.indexOf("//")===0}function I(W){return h.test(W)}function D(W){return m.test(W)}function v(W,O){return n(W,O)}k();var T={parseBaseUrl:R,parseOrigin:P,parseScheme:H,isRelative:N,isPathAbsolute:A,isSchemeRelative:M,isHTTPURL:I,isHTTPS:D,removeHostname:w,resolve:v};return T}o.__dashjs_factory_name="DefaultURLUtils",r.default=i.default.getSingletonFactory(o),g.exports=r.default},{"47":47}],225:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(n){n=n||{};var f=void 0,h=new DataView(n.data),m=0;function u(){return m}function _(M){m=M}function C(M,I){var D=!0,v=0,T=void 0,W=void 0;if(I===void 0&&(I=!1),M.tag>16777215?(h.getUint32(m)!==M.tag&&(D=!1),v=4):M.tag>65535?(T=h.getUint16(m),W=h.getUint8(m+2),T*256+W!==M.tag&&(D=!1),v=3):M.tag>255?(h.getUint16(m)!==M.tag&&(D=!1),v=2):(h.getUint8(m)!==M.tag&&(D=!1),v=1),!D&&M.required&&!I)throw new Error("required tag not found");return D&&(m+=v),D}function k(M,I){var D=C(M,I);return D&&w(),D}function R(M){var I=void 0;return C(M),I=w(),f[M.parse](I)}function P(M,I){var D=C(M,I),v=void 0;return D&&(v=w(),m+=v),D}function w(M){var I=1,D=128,v=8,T=-1,W=0,O=h.getUint8(m),B=0;for(B=0;B<v;B+=1){if((O&D)===D){W=M===void 0?O&~D:O,T=B;break}D>>=1}for(B=0;B<T;B+=1,I+=1)W=W<<8|255&h.getUint8(m+I);return m+=I,W}function H(M){var I=void 0;switch(M){case 4:I=h.getFloat32(m),m+=4;break;case 8:I=h.getFloat64(m),m+=8;break}return I}function N(M){for(var I=0,D=0;D<M;D+=1)I<<=8,I|=h.getUint8(m+D)&255;return m+=M,I}function A(){return m<h.byteLength}return f={getPos:u,setPos:_,consumeTag:C,consumeTagAndSize:k,parseTag:R,skipOverElement:P,getMatroskaCodedNum:w,getMatroskaFloat:H,getMatroskaUint:N,moreData:A},f}o.__dashjs_factory_name="EBMLParser",r.default=i.default.getClassFactory(o),g.exports=r.default},{"47":47}],226:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(u){return u&&u.__esModule?u:{default:u}}var p=e(46),i=t(p),o=e(54),n=t(o),f=e(47),h=t(f);function m(){var u=void 0,_=this.context,C=(0,i.default)(_).getInstance();function k(R){C.trigger(n.default.ERROR,{error:R})}return u={error:k},u}m.__dashjs_factory_name="ErrorHandler",r.default=h.default.getSingletonFactory(m),g.exports=r.default},{"46":46,"47":47,"54":54}],227:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(){var n={};function f(_){var C=_.streamId,k=_.representationId;n[C]=n[C]||{},n[C][k]=_}function h(_,C){return n&&n[_]&&n[_][C]?n[_][C]:null}function m(){n={}}var u={save:f,extract:h,reset:m};return u}o.__dashjs_factory_name="InitCache",r.default=i.default.getSingletonFactory(o),g.exports=r.default},{"47":47}],228:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(243),i=t(p),o=e(47),n=t(o);function f(){var h=void 0,m=void 0;function u(P){return!P||!m||!m.boxes||m.boxes.length===0||typeof m.fetch!="function"?null:R(m.fetch(P))}function _(P){var w=[];if(!P||!m||typeof m.fetchAll!="function")return w;for(var H=m.fetchAll(P),N=void 0,A=0,M=H.length;A<M;A++)N=R(H[A]),N&&w.push(N);return w}function C(P){m=P}function k(){if(!m||!m.boxes||!m.boxes.length)return null;var P=m.boxes[m.boxes.length-1].type,w=_(P);return w.length>0?w[w.length-1]:null}function R(P){if(!P)return null;var w=new i.default(P);return P.hasOwnProperty("_incomplete")&&(w.isComplete=!P._incomplete),w}return h={getBox:u,getBoxes:_,setData:C,getLastBox:k},h}f.__dashjs_factory_name="IsoFile",r.default=n.default.getClassFactory(f),g.exports=r.default},{"243":243,"47":47}],229:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(47),i=t(p),o=e(112),n=t(o);function f(h){h=h||{};var m=void 0,u=h.timelineConverter;function _(){if(!u||!u.hasOwnProperty("getExpectedLiveEdge"))throw new Error(n.default.MISSING_CONFIG_ERROR)}function C(R){return _(),R.DVRWindow?R.DVRWindow.end:0}function k(){u=null}return m={getLiveEdge:C,reset:k},m}f.__dashjs_factory_name="LiveEdgeFinder",r.default=i.default.getClassFactory(f),g.exports=r.default},{"112":112,"47":47}],230:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(h){return h&&h.__esModule?h:{default:h}}var p=e(47),i=t(p),o=e(12),n=t(o);function f(){var h=void 0;function m(u,_){return(0,n.default)(u,_)}return h={areEqual:m},h}f.__dashjs_factory_name="ObjectUtils",r.default=i.default.getSingletonFactory(f),g.exports=r.default},{"12":12,"47":47}],231:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(){var n=void 0;function f(m){return m}function h(m){return m}return n={modifyRequestURL:f,modifyRequestHeader:h},n}o.__dashjs_factory_name="RequestModifier",r.default=i.default.getSingletonFactory(o),g.exports=r.default},{"47":47}],232:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkParameterType=o,r.checkInteger=n,r.checkRange=f,r.checkIsVideoOrAudioType=h;function t(m){return m&&m.__esModule?m:{default:m}}var p=e(112),i=t(p);function o(m,u){if(typeof m!==u)throw i.default.BAD_ARGUMENT_ERROR}function n(m){var u=m!==null&&!isNaN(m)&&m%1==0;if(!u)throw i.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"}function f(m,u,_){if(m<u||m>_)throw i.default.BAD_ARGUMENT_ERROR+" : argument out of range"}function h(m){if(typeof m!="string"||m!==i.default.AUDIO&&m!==i.default.VIDEO)throw i.default.BAD_ARGUMENT_ERROR}},{"112":112}],233:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(H){return H&&H.__esModule?H:{default:H}}var p=e(47),i=t(p),o=e(45),n=t(o),f=e(46),h=t(f),m=e(54),u=t(m),_=e(17),C=e(104),k=t(C),R=e(111),P=t(R);function w(){var H=this.context,N=(0,h.default)(H).getInstance(),A=void 0,M=void 0,I=0;function D(){M=(0,n.default)(H).getInstance().getLogger(A)}function v(){var W="cue_TTML_"+I;return I++,W}function T(W,O,B,L,K){var x="",U=[],Y=void 0,oe=void 0,ue=void 0,re={},ve={},ce="",se="",J={onOpenTag:function(Q,X,j){if(j[" imagetype"]&&!j[" imageType"]&&(N.trigger(k.default.CONFORMANCE_VIOLATION,{level:P.default.LEVELS.ERROR,event:P.default.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),j[" imageType"]=j[" imagetype"]),X==="image"&&(Q==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||Q==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!j[" imageType"]||j[" imageType"].value!=="PNG"){M.warn("smpte-tt imageType != PNG. Discarded");return}ce=j["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){ce&&(ve[ce]=se.trim()),se="",ce=""},onText:function(Q){ce&&(se=se+Q)}};if(!W)throw x="no ttml data to parse",new Error(x);re.data=W,N.trigger(u.default.TTML_TO_PARSE,re);var ee=(0,_.fromXML)(re.data,function(de){x=de},J);N.trigger(u.default.TTML_PARSED,{ttmlString:re.data,ttmlDoc:ee});var ie=ee.getMediaTimeEvents();for(ue=0;ue<ie.length;ue++){var me=(0,_.generateISD)(ee,ie[ue],function(de){x=de});me.contents.some(function(de){return de.contents.length})&&(Y=ie[ue]+O<B?B:ie[ue]+O,oe=ie[ue+1]+O>L?L:ie[ue+1]+O,Y<oe&&U.push({start:Y,end:oe,type:"html",cueID:v(),isd:me,images:K,embeddedImages:ve}))}if(x!=="")throw M.error(x),new Error(x);return U}return A={parse:T},D(),A}w.__dashjs_factory_name="TTMLParser",r.default=i.default.getSingletonFactory(w),g.exports=r.default},{"104":104,"111":111,"17":17,"45":45,"46":46,"47":47,"54":54}],234:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(224),n=t(o);function f(){var m=void 0,u=void 0,_=[],C=this.context;function k(B){var L=void 0;for(L=0;L<_.length;L++){var K=_[L].regex;if(K.test(B))return _[L].utils}return u}function R(){u=(0,n.default)(C).getInstance()}function P(B,L){_.push({regex:B,utils:L})}function w(B,L,K){var x=k(K||L);return x&&typeof x[B]=="function"?x[B](L,K):u[B](L,K)}function H(B){return w("parseBaseUrl",B)}function N(B){return w("parseOrigin",B)}function A(B){return w("removeHostname",B)}function M(B){return w("parseScheme",B)}function I(B){return w("isRelative",B)}function D(B){return w("isPathAbsolute",B)}function v(B){return w("isSchemeRelative",B)}function T(B){return w("isHTTPURL",B)}function W(B){return w("isHTTPS",B)}function O(B,L){return w("resolve",B,L)}return R(),m={registerUrlRegex:P,parseBaseUrl:H,parseOrigin:N,parseScheme:M,isRelative:I,isPathAbsolute:D,isSchemeRelative:v,isHTTPURL:T,isHTTPS:W,removeHostname:A,resolve:O},m}f.__dashjs_factory_name="URLUtils";var h=i.default.getSingletonFactory(f);r.default=h,g.exports=r.default},{"224":224,"47":47}],235:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(m){return m&&m.__esModule?m:{default:m}}var p=e(47),i=t(p),o=e(45),n=t(o),f="WEBVTT";function h(){var m=this.context,u=void 0,_=void 0,C=void 0,k=void 0,R=void 0,P=void 0;function w(){_=(0,n.default)(m).getInstance().getLogger(u),C=/(?:\r\n|\r|\n)/gm,k=/-->/,R=/(^[\s]+|[\s]+$)/g,P=/\s\b/g}function H(D){var v=[],T=void 0,W=void 0;if(!D)return v;D=D.split(C),T=D.length,W=-1;for(var O=0;O<T;O++){var B=D[O];if(B.length>0&&B!==f&&B.match(k)){var L=A(B),K=L.cuePoints,x=L.styles,U=I(D,O+1),Y=N(K[0].replace(R,"")),oe=N(K[1].replace(R,""));!isNaN(Y)&&!isNaN(oe)&&Y>=W&&oe>Y?U!==""?(W=Y,v.push({start:Y,end:oe,data:U,styles:x})):_.error("Skipping cue due to empty/malformed cue text"):_.error("Skipping cue due to incorrect cue timing")}}return v}function N(D){var v=D.split(":"),T=v.length-1;return D=parseInt(v[T-1],10)*60+parseFloat(v[T]),T===2&&(D+=parseInt(v[0],10)*3600),D}function A(D){var v=D.split(k),T=v[1].split(P);return T.shift(),v[1]=T[0],T.shift(),{cuePoints:v,styles:M(T)}}function M(D){var v={};return D.forEach(function(T){if(T.split(/:/).length>1){var W=T.split(/:/)[1];W&&W.search(/%/)!=-1&&(W=parseInt(W.replace(/%/,""),10)),(T.match(/align/)||T.match(/A/))&&(v.align=W),(T.match(/line/)||T.match(/L/))&&(v.line=W),(T.match(/position/)||T.match(/P/))&&(v.position=W),(T.match(/size/)||T.match(/S/))&&(v.size=W)}}),v}function I(D,v){for(var T=v,W="",O="",B=void 0;D[T]!==""&&T<D.length;)T++;if(B=T-v,B>1)for(var L=0;L<B;L++)if(O=D[v+L],!O.match(k))W+=O,L!==B-1&&(W+=`
|
|
`);else{W="";break}else O=D[v],O.match(k)||(W=O);return W}return u={parse:H},w(),u}h.__dashjs_factory_name="VTTParser",r.default=i.default.getSingletonFactory(h),g.exports=r.default},{"45":45,"47":47}],236:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(n){n=n||{};var f=void 0,h=n.blacklistController;function m(u){var _=0,C=void 0;return u&&u.some(function(k,R){return _=R,!h.contains(k.serviceLocation)})&&(C=u[_]),C}return f={select:m},f}o.__dashjs_factory_name="BasicSelector",r.default=i.default.getClassFactory(o),g.exports=r.default},{"47":47}],237:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n){return n&&n.__esModule?n:{default:n}}var p=e(47),i=t(p);function o(n){n=n||{};var f=void 0,h=n.blacklistController;function m(C){var k=[],R=function(H){return!(k.length&&H.dvb_priority&&k.indexOf(H.dvb_priority)!==-1)},P=function(H){return h.contains(H.serviceLocation)?(H.dvb_priority&&k.push(H.dvb_priority),!1):!0};return C.filter(P).filter(R)}function u(C){var k=function(I,D){var v=I.dvb_priority-D.dvb_priority;return isNaN(v)?0:v},R=function(I,D,v){return!D||v[0].dvb_priority&&I.dvb_priority&&v[0].dvb_priority===I.dvb_priority},P=0,w=[],H=0,N=void 0,A=void 0;if(A=C.sort(k).filter(R),A.length)return A.length>1&&(A.forEach(function(M){P+=M.dvb_weight,w.push(P)}),N=Math.floor(Math.random()*(P-1)),w.every(function(M,I){return H=I,!(N<M)})),A[H]}function _(C){return C&&u(m(C))}return f={select:_},f}o.__dashjs_factory_name="DVBSelector",r.default=i.default.getClassFactory(o),g.exports=r.default},{"47":47}],238:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};r.default=p,g.exports=r.default},{}],239:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f){t(this,i),this.code=o||null,this.message=n||null,this.data=f||null};r.default=p,g.exports=r.default},{}],240:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};r.default=p,g.exports=r.default},{}],241:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(f,h){for(var m=0;m<h.length;m++){var u=h[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,h,m){return h&&n(f.prototype,h),m&&n(f,m),f}}();function p(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var i=e(255),o=function(){function n(f){p(this,n),this.action=n.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=f||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}return t(n,[{key:"isInitializationRequest",value:function(){return this.type&&this.type===i.HTTPRequest.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(h){this.type=h&&h.init?i.HTTPRequest.INIT_SEGMENT_TYPE:i.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=h&&h.url?h.url:null,this.range=h&&h.range?h.range.start+"-"+h.range.end:null,this.mediaType=h&&h.mediaType?h.mediaType:null}}]),n}();o.ACTION_DOWNLOAD="download",o.ACTION_COMPLETE="complete",r.default=o,g.exports=r.default},{"255":255}],242:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(u,_,C){var k=!0;e:for(;k;){var R=u,P=_,w=C;k=!1,R===null&&(R=Function.prototype);var H=Object.getOwnPropertyDescriptor(R,P);if(H===void 0){var N=Object.getPrototypeOf(R);if(N===null)return;u=N,_=P,C=w,k=!0,H=N=void 0;continue e}else{if("value"in H)return H.value;var A=H.get;return A===void 0?void 0:A.call(w)}}};function p(m){return m&&m.__esModule?m:{default:m}}function i(m,u){if(!(m instanceof u))throw new TypeError("Cannot call a class as a function")}function o(m,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);m.prototype=Object.create(u&&u.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(m,u):m.__proto__=u)}var n=e(241),f=p(n),h=function(m){o(u,m);function u(_){i(this,u),t(Object.getPrototypeOf(u.prototype),"constructor",this).call(this,_),this.checkForExistenceOnly=!0}return u}(f.default);r.default=h,g.exports=r.default},{"241":241}],243:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function o(n,f){for(var h=0;h<f.length;h++){var m=f[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}return function(n,f,h){return f&&o(n.prototype,f),h&&o(n,h),n}}();function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function(){function o(n){if(p(this,o),this.offset=n._offset,this.type=n.type,this.size=n.size,this.boxes=[],n.boxes)for(var f=0;f<n.boxes.length;f++)this.boxes.push(new o(n.boxes[f]));switch(this.isComplete=!0,n.type){case"sidx":if(this.timescale=n.timescale,this.earliest_presentation_time=n.earliest_presentation_time,this.first_offset=n.first_offset,this.references=n.references,n.references){this.references=[];for(var f=0;f<n.references.length;f++){var h={reference_type:n.references[f].reference_type,referenced_size:n.references[f].referenced_size,subsegment_duration:n.references[f].subsegment_duration};this.references.push(h)}}break;case"emsg":this.id=n.id,this.version=n.version===1?1:0,this.value=n.value,this.timescale=n.timescale,this.scheme_id_uri=n.scheme_id_uri,this.presentation_time_delta=n.version===1?n.presentation_time:n.presentation_time_delta,this.event_duration=n.event_duration,this.message_data=n.message_data;break;case"mdhd":this.timescale=n.timescale;break;case"mfhd":this.sequence_number=n.sequence_number;break;case"subs":this.entry_count=n.entry_count,this.entries=n.entries;break;case"tfhd":this.base_data_offset=n.base_data_offset,this.sample_description_index=n.sample_description_index,this.default_sample_duration=n.default_sample_duration,this.default_sample_size=n.default_sample_size,this.default_sample_flags=n.default_sample_flags,this.flags=n.flags;break;case"tfdt":this.version=n.version,this.baseMediaDecodeTime=n.baseMediaDecodeTime,this.flags=n.flags;break;case"trun":if(this.sample_count=n.sample_count,this.first_sample_flags=n.first_sample_flags,this.data_offset=n.data_offset,this.flags=n.flags,this.samples=n.samples,n.samples){this.samples=[];for(var f=0,m=n.samples.length;f<m;f++){var u={sample_size:n.samples[f].sample_size,sample_duration:n.samples[f].sample_duration,sample_composition_time_offset:n.samples[f].sample_composition_time_offset};this.samples.push(u)}}break}}return t(o,[{key:"getChildBox",value:function(f){for(var h=0;h<this.boxes.length;h++)if(this.boxes[h].type===f)return this.boxes[h]}},{key:"getChildBoxes",value:function(f){for(var h=[],m=0;m<this.boxes.length;m++)this.boxes[m].type===f&&h.push(this.boxes[m]);return h}}]),o}();r.default=i,g.exports=r.default},{}],244:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(o,n,f){t(this,i),this.lastCompletedOffset=o,this.found=n,this.size=f};r.default=p,g.exports=r.default},{}],245:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]};r.default=p,g.exports=r.default},{}],246:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(C,k,R){var P=!0;e:for(;P;){var w=C,H=k,N=R;P=!1,w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,H);if(A===void 0){var M=Object.getPrototypeOf(w);if(M===null)return;C=M,k=H,R=N,P=!0,A=M=void 0;continue e}else{if("value"in A)return A.value;var I=A.get;return I===void 0?void 0:I.call(N)}}};function p(_){return _&&_.__esModule?_:{default:_}}function i(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function o(_,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);_.prototype=Object.create(C&&C.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(_,C):_.__proto__=C)}var n=e(112),f=p(n),h=e(241),m=p(h),u=function(_){o(C,_);function C(k,R){i(this,C),t(Object.getPrototypeOf(C.prototype),"constructor",this).call(this),this.url=k||null,this.type=R||null,this.mediaType=f.default.STREAM,this.responseType=""}return C}(m.default);r.default=u,g.exports=r.default},{"112":112,"241":241}],247:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};r.default=p,g.exports=r.default},{}],248:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null};r.default=p,g.exports=r.default},{}],249:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""};r.default=p,g.exports=r.default},{}],250:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};r.default=p,g.exports=r.default},{}],251:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.t=null,this.level=null};r.default=p,g.exports=r.default},{}],252:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(f){return f&&f.__esModule?f:{default:f}}function p(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var i=e(113),o=t(i),n=function f(){p(this,f),this.target=null,this.state=o.default.BUFFER_EMPTY};r.default=n,g.exports=r.default},{"113":113}],253:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.time=null,this.range=null,this.manifestInfo=null};r.default=p,g.exports=r.default},{}],254:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.time=null,this.droppedFrames=null};r.default=p,g.exports=r.default},{}],255:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var p=function o(){t(this,o),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null},i=function o(){t(this,o),this.s=null,this.d=null,this.b=[]};p.GET="GET",p.HEAD="HEAD",p.MPD_TYPE="MPD",p.XLINK_EXPANSION_TYPE="XLinkExpansion",p.INIT_SEGMENT_TYPE="InitializationSegment",p.INDEX_SEGMENT_TYPE="IndexSegment",p.MEDIA_SEGMENT_TYPE="MediaSegment",p.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",p.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",p.LICENSE="license",p.OTHER_TYPE="other",r.HTTPRequest=p,r.HTTPRequestTrace=i},{}],256:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var p=function n(){t(this,n),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},i=function n(){t(this,n),this.id=null,this.index=null,this.start=null,this.duration=null},o=function n(){t(this,n),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};r.ManifestUpdate=p,r.ManifestUpdateStreamInfo=i,r.ManifestUpdateRepresentationInfo=o},{}],257:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var p=function o(){t(this,o),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};p.INITIAL_PLAYOUT_START_REASON="initial_playout",p.SEEK_START_REASON="seek",p.RESUME_FROM_PAUSE_START_REASON="resume",p.METRICS_COLLECTION_START_REASON="metrics_collection_start";var i=function o(){t(this,o),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};i.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",i.REBUFFERING_REASON="rebuffering",i.USER_REQUEST_STOP_REASON="user_request",i.END_OF_PERIOD_STOP_REASON="end_of_period",i.END_OF_CONTENT_STOP_REASON="end_of_content",i.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",i.FAILURE_STOP_REASON="failure",r.PlayList=p,r.PlayListTrace=i},{}],258:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.t=null,this.mt=null,this.to=null,this.lto=null};r.default=p,g.exports=r.default},{}],259:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.loadingRequests=[],this.executedRequests=[]};r.default=p,g.exports=r.default},{}],260:[function(e,g,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});function t(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}var p=function i(){t(this,i),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null};r.default=p,g.exports=r.default},{}]},{},[4]);var Wa=Jt(Pr());function Cr(e,g){let r=Object.keys(g).map(t=>lo(e,t,g[t]));return r.length===1?r[0]:function(){r.forEach(t=>t())}}function lo(e,g,r){let t=e[g],p=e.hasOwnProperty(g),i=r(t);return t&&Object.setPrototypeOf(i,t),Object.setPrototypeOf(o,i),e[g]=o,n;function o(...f){return i===t&&e[g]===o&&n(),i.apply(this,f)}function n(){e[g]===o&&(p?e[g]=t:delete e[g]),i!==t&&(i=t,Object.setPrototypeOf(o,t||Function))}}var za=Jt(Ua()),qa=Jt(zr());var Fr=Jt(Kr()),ir=Jt(require("obsidian"));var Ha=new Map([["restart",['<svg aria-hidden="true" focusable="false" id="plyr-restart" viewBox="0 0 18 18"><path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"></path></svg>',"Restart"]],["rewind",['<svg aria-hidden="true" focusable="false" id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"></path></svg>',"Rewind"]],["play",['<svg aria-hidden="true" focusable="false" id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"></path></svg>',"Play/Pause"]],["fast-forward",['<svg aria-hidden="true" focusable="false" id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"></path></svg>',"Fast forward"]],["mute",['<svg aria-hidden="true" focusable="false" id="plyr-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"></path></svg>',"Mute"]],["volume",['<svg aria-hidden="true" focusable="false" id="plyr-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"></path><path d="M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"></path></svg>',"Volume bar"]],["captions",['<svg aria-hidden="true" focusable="false" id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"></path></svg>',"Caption"]],["settings",['<svg aria-hidden="true" focusable="false" id="plyr-settings" viewBox="0 0 18 18"><path d="M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"></path></svg>',"Control speed/ select captions..."]],["pip",['<svg aria-hidden="true" focusable="false" id="plyr-settings" viewBox="0 0 18 18"><path d="M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"></path></svg>',"Picture-in-Picture"]],["fullscreen",['<svg aria-hidden="true" focusable="false" id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"></path></svg>',"Fullscreen"]],["current-time",["current-time","Current time"]],["duration",["duration","Duration"]]]),Rn=(e,g,r)=>createEl("button",rr({cls:["plyr__control"],type:"button",attr:{"aria-label":e}},g),r),uo=(e,g,r,t)=>{let p=Ha.get(e);if(!p)throw new Error("Invaild id");return Rn(g,r,i=>{i.insertAdjacentHTML("beforeend",p[0]),t&&t(i)})},Cn=class{constructor(g,r){this.buttonMap=new WeakMap;this.plugin=r,this.containerEl=g,this.regularContainer=this.containerEl.createDiv({cls:"plyr-controls-settings plyr__controls"}),this.progressContainer=this.containerEl.createDiv({cls:"plyr-controls-settings plyr__controls plyr-progress-setting"},t=>t.createEl("input",{type:"range",attr:{disabled:!0}})),this.addControls(),this.containerEl.on("click","button",t=>{let p,i=t.target;if(p=this.buttonMap.get(i)){let o=!this.plyrControls[p];this.plyrControls[p]=o,this.plugin.saveSettings(),i.toggleClass("checked",o)}else console.error("unknown click target: %o",t.target)})}get plyrControls(){return this.plugin.sizeSettings.plyrControls}addControls(){let g=(r,t)=>r.toggleClass("checked",this.plyrControls[t]);Ha.forEach(([,r],t)=>{t==="current-time"?this.buttonMap.set(this.progressContainer.appendChild(Rn(r,{cls:"plyr__controls__item plyr__time--current plyr__time",text:"05:00"},p=>g(p,t))),"current-time"):t==="duration"?this.buttonMap.set(this.progressContainer.appendChild(Rn(r,{cls:"plyr__controls__item plyr__time--duration plyr__time",text:"10:00"},p=>g(p,t))),t):this.buttonMap.set(this.regularContainer.appendChild(uo(t,r,{},p=>g(p,t))),t)})}};var bn="alx-hide-ytb-recomm",Ga={mediaFragmentsEmbed:!0,timestampLink:!0,extendedImageEmbedSyntax:!0,thumbnailPlaceholder:!1,useYoutubeControls:!1,interalBiliPlayback:!0,hideYtbRecomm:!1,embedMaxHeight:"30vh",embedMinWidth:"400px",plyrControls:{restart:!1,rewind:!1,play:!0,"fast-forward":!1,progress:!0,"current-time":!0,duration:!0,mute:!1,volume:!0,captions:!0,settings:!0,pip:!1,fullscreen:!0},embedMaxHeightMobile:"20vh",embedMinWidthMobile:"200px",plyrControlsMobile:{restart:!1,rewind:!1,play:!0,"fast-forward":!1,progress:!0,"current-time":!1,duration:!1,mute:!1,volume:!0,captions:!0,settings:!0,pip:!1,fullscreen:!0},timestampTemplate:`
|
|
{{TIMESTAMP}}
|
|
`,timestampOffset:0,hideEmbedControls:!1},Va=e=>[...Object.entries(e)].filter(g=>g[1]).map(g=>g[0]),In=class extends ir.PluginSettingTab{constructor(g,r){super(g,r);this.setToggle=({k:g,name:r,desc:t},p)=>{let{settings:i}=this.plugin;new ir.Setting(this.containerEl).setName(r).setDesc(typeof t=="string"?t:createFragment(t)).addToggle(o=>{let n=i[g];if(typeof n=="boolean")o.setValue(n).onChange(f=>Bt(this,null,function*(){p&&p(f),i[g]=f,this.plugin.saveData(i),this.display()}));else throw new TypeError("toggle not boolean")})};this.plugin=r}display(){let{containerEl:g}=this;g.empty(),this.general(),this.noteTaking(),this.player(),this.ytb(),this.bili()}general(){let{containerEl:g}=this,{setToggle:r}=this;g.createEl("h2",{text:"General"}),r({k:"mediaFragmentsEmbed",name:"Embed Media Fragments",desc:t=>{t.appendText("If enabled, you can write ![[demo.mp4#t=10]] to embed the specific fragment of video/audio. "),t.createEl("br"),t.appendText("Loop is also available by appending #loop or #t=...&loop to filename"),t.createEl("br"),t.appendText("Restart the app to take effects")}}),r({k:"timestampLink",name:"Timestamps for Media",desc:t=>{t.appendText("If enabled, you can write [[demo.mp4#t=10]] to create timestamp link to the video/audio. Click on the link would open the media file if it's not opened yet. "),t.createEl("br"),t.appendText("PS: Only works in preview mode, hover preview on link is not available"),t.createEl("br"),t.appendText("Restart the app to take effects")}}),r({k:"extendedImageEmbedSyntax",name:"Extended Image Embed Syntax",desc:t=>{t.appendText("If enabled, you can write ![](link/to/demo.mp4) to embed video and audio."),t.createEl("br"),t.appendText("Timestamps and fragments are also available"),t.createEl("br"),t.appendText("Support direct file links (local/remote) and videos from video hosts (Youtube, bilibili...)"),t.createEl("br"),t.appendText("Restart the app to take effects")}})}player(){let{containerEl:g}=this,{setToggle:r}=this;g.createEl("h2",{text:"Player"}),r({k:"thumbnailPlaceholder",name:"Placeholder in favor of full player",desc:p=>{p.appendText("If enabled, thumbnail placeholder will be used in favor of full player when page loads"),p.createEl("br"),p.appendText("Works with for Youtube/Vimeo/bilibili embeds"),p.createEl("br"),p.appendText("Helpful when numerous video from Youtube/Vimeo/... is embeded in one single file"),p.createEl("br"),p.appendText("Restart the app to take effects")}}),r({k:"hideEmbedControls",name:"Hide Embed Controls By Default",desc:p=>{p.appendText("If enabled, embeds are rendered similar to images with all controls hidden, click on embeds to play/pause"),p.createEl("br"),p.appendText("You can still enable controls manually by append #controls to link"),p.createEl("br"),p.appendText("Restart the app to take effects")}});let t=new ir.Setting(g).setName("Plyr Controls").setDesc(createFragment(p=>{p.appendText("Show or hide certain plyr controls"),p.createEl("br"),p.appendText("Restart the app to take effects")}));new Cn(t.settingEl.createDiv({cls:"plyr-ctrls-container"}),this.plugin),new ir.Setting(g).setName("Maximum Player Height for Embeds").setDesc("Reload app to take effects").addText(p=>{let i=(0,ir.debounce)(o=>Bt(this,null,function*(){return yield this.plugin.setSizeSettings({embedMaxHeight:o})}),500,!0);p.setValue(this.plugin.sizeSettings.embedMaxHeight).onChange(o=>Bt(this,null,function*(){p.inputEl.toggleClass("incorrect",!(0,Fr.isCssValue)(o)),(0,Fr.isCssValue)(o)&&i(o)}))}),new ir.Setting(g).setName("Minimum Player Width for Embeds").addText(p=>{let i=(0,ir.debounce)(o=>Bt(this,null,function*(){this.plugin.setEmbedMinWidth(o),yield this.plugin.setSizeSettings({embedMinWidth:o})}),500,!0);p.setValue(this.plugin.sizeSettings.embedMinWidth).onChange(o=>Bt(this,null,function*(){p.inputEl.toggleClass("incorrect",!(0,Fr.isCssValue)(o)),(0,Fr.isCssValue)(o)&&i(o)}))})}noteTaking(){let{containerEl:g}=this;g.createEl("h2",{text:"Note Taking"}),new ir.Setting(g).setName("Timestamp Template").setDesc(createFragment(r=>{r.appendText("The template used to insert timestamps."),r.createEl("br"),r.appendText("Supported placeholders: {{TIMESTAMP}}")})).addTextArea(r=>{let t=p=>Bt(this,null,function*(){this.plugin.settings.timestampTemplate=p,yield this.plugin.saveSettings()});r.setValue(this.plugin.settings.timestampTemplate).onChange((0,ir.debounce)(t,500,!0)),r.inputEl.rows=5,r.inputEl.cols=20}),new ir.Setting(g).setName("Timestamp Offset").setDesc(createFragment(r=>{r.appendText("Amount of seconds to offset timestamps."),r.createEl("br"),r.appendText("Set postive value to offset time backward, vice versa")})).addText(r=>{let t=(0,ir.debounce)(p=>Bt(this,null,function*(){this.plugin.settings.timestampOffset=Number(p),yield this.plugin.saveSettings()}),500,!0);r.setValue(String(this.plugin.settings.timestampOffset)).onChange(p=>Bt(this,null,function*(){r.inputEl.toggleClass("incorrect",isNaN(Number(p))),isNaN(Number(p))||t(p)}))})}ytb(){let{containerEl:g}=this,{setToggle:r}=this;g.createEl("h2",{text:"Youtube"}),r({k:"useYoutubeControls",name:"Use Youtube Built-in Controls",desc:t=>{t.appendText("If enabled, Youtube's built-in Controls will be used in favor of Plyr controls"),t.createEl("br"),t.appendText("Useful when need access to CC (Closed Captioning) and chapters progress bar"),t.createEl("br"),t.appendText("Restart the app to take effects")}}),this.plugin.settings.useYoutubeControls||r({k:"hideYtbRecomm",name:"Hide Recommend Videos",desc:"Blur on pause to hide annoying recommend videos, ignored when Youtube Built-in Controls enabled"},t=>document.body.toggleClass(bn,t))}bili(){let{containerEl:g}=this;g.createEl("h2",{text:"bilibili"});let r=new ir.Setting(g).setName("\u9AD8\u7EA7bilibili\u652F\u6301").setDesc(createFragment(t=>{t.appendText("\u66FF\u4EE3\u5D4C\u5165\u5F0Fiframe\u64AD\u653E\u5668\uFF0C\u652F\u6301\u65F6\u95F4\u6233\u3001\u64AD\u653E1080p\u89C6\u9891\u7B49"),t.createEl("br"),this.app.isMobile?t.appendText("\u79FB\u52A8\u7248\u5C1A\u4E0D\u652F\u6301"):gr(this.app)||(t.appendText("BiliBili Plugin\u5C1A\u672A\u542F\u7528\uFF0C"),t.createEl("a",{href:"https://github.com/aidenlx/mx-bili-plugin",text:"\u70B9\u6B64\u4E0B\u8F7D"}))}));!this.app.isMobile&&gr(this.app)&&(r.addToggle(t=>{let{settings:p}=this.plugin;t.setValue(p.interalBiliPlayback).onChange(i=>Bt(this,null,function*(){p.interalBiliPlayback=i,this.plugin.saveData(p),this.display()}))}),Zn(this.app)(g))}};var Ka=Jt(zr()),Qr={tFrag:/^(?<start>[\w:\.]*?)(?:,(?<end>[\w:\.]+?))?$/,npt_sec:/^\d+(?:\.\d+)?$/,npt_mmss:/^(?<mm>[0-5]\d):(?<ss>[0-5]\d(?:\.\d+)?)$/,npt_hhmmss:/^(?<hh>\d+):(?<mm>[0-5]\d):(?<ss>[0-5]\d(?:\.\d+)?)$/},Ya=e=>{if(e){let r=(0,Ka.parse)(e).t,t;if(r&&typeof r=="string"&&(t=Qr.tFrag.exec(r))!==null){if(!t.groups)throw new Error("tFragRegex match error");let{start:p,end:i}=t.groups,o=fo(p,i);if(o)return Nr(rr({},o),{raw:r})}}return null},fo=(e,g)=>{let r=e||null,t=g!=null?g:null,p,i;if(r&&t)p=$r(r),i=$r(t);else if(r)p=$r(r),i=1/0;else if(t)p=0,i=$r(t);else throw console.error(e,g),new Error("Missing startTime and endTime");return p===null||i===null?null:{start:p,end:i}},$r=e=>{let g=/^(?:npt:)?([\d\.:]+)$/;if(g.test(e)){let r=e.match(g)[1],t;if((t=Qr.npt_sec.exec(r))!==null)return+t[0];if((t=Qr.npt_mmss.exec(r))!==null){if(!t.groups)throw new Error("npt_mmss match error");let{mm:p,ss:i}=t.groups;return+p*60+ +i}else if((t=Qr.npt_hhmmss.exec(r))!==null){if(!t.groups)throw new Error("npt_hhmmss match error");let{hh:p,mm:i,ss:o}=t.groups;return+p*60*60+ +i*60+ +o}else return null}else return null};var xr=e=>{let g=e?Ya(e):null,r=e?(0,qa.parse)(e):null,t=i=>r?r[i]===null:!1,p=new Map([["loop","loop"],["mute","muted"],["play","autoplay"],["controls","controls"]]);return{timeSpan:g,is:i=>{if(!e)return!1;for(let[o,n]of p)if(i===n&&t(o))return!0;return!1},setPlayerTF:i=>{co(i,g)},setHashOpt:i=>p.forEach((o,n)=>{o==="controls"?i instanceof HTMLMediaElement&&t(n)&&(i[o]=!0):t(n)&&(i[o]=!0)})}},co=(e,g)=>{let r=e,t=i=>{if(!r.timeSpan)return;let{timeSpan:{start:o,end:n},currentTime:f}=r;(f>n||f<o)&&(r.currentTime=o)},p=i=>{if(!r.timeSpan)return;let{timeSpan:{start:o,end:n},currentTime:f}=r;f>n&&(r.loop?(r.currentTime=o,r.paused&&r.play()):r.pause())};r.setTimeSpan=i=>{var o;r.timeSpan=i,i?(r instanceof HTMLMediaElement&&!r.onplaying?(r.onplaying=t,r.ontimeupdate=p):(r.on("playing",t),r.on("timeupdate",p)),r.currentTime=(o=i.start)!=null?o:0):(r instanceof HTMLMediaElement?(r.onplaying=null,r.ontimeupdate=null):(r.off("playing",t),r.off("timeupdate",p)),r.currentTime=0)},r.setTimeSpan(g!=null?g:null)},ho=(e,g)=>{let r={};return e&&e.start!==0&&(r.youtube||(r.youtube={}),r.youtube.start=e.start),g&&(r.youtube||(r.youtube={}),r.controls=["play-large"],r.youtube.controls=!0),r},Jr=(e,g,r)=>{let{is:t,setHashOpt:p,setPlayerTF:i,timeSpan:o}=xr(e.hash),{app:n}=g,{useYoutubeControls:f}=g.settings,h=ar(e)&&e.host===$t.youtube,m=h?ho(o,f):null,u={invertTime:!1,controls:Va(g.sizeSettings.plyrControls)},_=rr(rr({},u),m);r&&r(_),_.autoplay=t("autoplay");let C=createDiv().appendChild(createEl("video")),k=new za.default(C,_);if(ar(e)&&e.host===$t.bili){let P=e.iframe.searchParams.has("aid")?"av"+e.id:e.id,w=e.src.searchParams.get("p"),H=dashjs.MediaPlayer().create(),N=new URL("http://localhost/geturl/"+P);N.port=Jn(n).toString(),w&&N.searchParams.append("page",w),H.initialize(C,N.toString(),!1),Cr(k,{destroy(I){return function(){H.destroy(),I.call(this)}}});let A=ea(n);(()=>Bt(void 0,null,function*(){let I=e.iframe.searchParams.has("aid")?yield A(+e.id):yield A(e.id);I?k.poster=I:console.error("unable to fetch poster")}))()}else{let P=mo(e,n.vault);k.source=P,k.sourceBak=P}if(p(k),i(k),nr(e)&&e.subtitles.length>0){let P=k.elements.poster;P?P.addClass("visuallyhidden"):console.error("unable to find posterEl from",k.elements),k.once("ready",()=>k.toggleCaptions())}go(e,k);let R=Ar(k);return f&&R.classList.add("yt-controls"),h&&f&&k.on("ready",()=>Bt(void 0,null,function*(){yield k.play(),k.pause()})),k},go=(e,g)=>{if(!ar(e)&&e.type==="media"&&g.isHTML5){let r=0,t=()=>{let p=g.media;if(p&&p instanceof HTMLVideoElement)if(r===0)p.videoHeight!==0||p.videoWidth!==0?(g.off("loadedmetadata",t),g.sourceBak.type="video"):r++;else if(g.off("loadedmetadata",t),p.videoHeight===0&&p.videoWidth===0){g.sourceBak.type="audio",console.log("media is audio, switching...");let i=g.playing;g.source=g.sourceBak,i&&g.once("canplay",()=>g.play()),Ar(g).style.height=null}else g.sourceBak.type="video"};g.on("loadedmetadata",t)}},mo=(e,g)=>{if(ar(e)){if(e.host===$t.bili)throw new Error("Bilibili not supported in Plyr");return{type:"video",sources:[{src:e.id,provider:$t[e.host]}]}}else{let r=e.type==="media"?"video":e.type;if(Sr(e))return{type:r,sources:[{src:Rr(e).href}]};if(nr(e)){if(e.subtitles.length>0&&e.trackInfo===void 0)throw new Error("trackInfo not updated");return{type:r,sources:[{src:Rr(e,g).href}],tracks:e.trackInfo?e.trackInfo.tracks:void 0}}else(0,Wa.default)(e)}},Ar=e=>{let g=e.elements.container;if(g)return g;throw new Error("Plyr container null")};var wn=(e,g)=>{let r=g==="internal"?"span.internal-embed, div.internal-embed":"img[referrerpolicy]";return(t,p)=>{t.querySelectorAll(r).forEach(i=>Bt(void 0,null,function*(){let o=yield jr(i,g,e.app,p);if(!o)return;let{is:n}=xr(o.hash),f=null,h=e.sizeSettings.embedMaxHeight,m=_=>po(_,h),u=(_=!1)=>Bt(void 0,null,function*(){let C;if(nr(o)){let P=yield o.updateTrackInfo(e.app.vault);P&&(C=P.objUrls)}let k=Jr(o,e,P=>{e.settings.hideEmbedControls&&!n("controls")&&(P.controls=["play-large"])});m(k),_&&k.once("ready",function(P){this.play()});let R=Ar(k);return p.addChild(new yn(R,k,C)),R});if(ar(o)){let{thumbnailPlaceholder:_,interalBiliPlayback:C}=e.settings,k=o.host===$t.bili&&(!gr(e.app)||!C),R=_&&o.host!==$t.bili,P=()=>Bt(void 0,null,function*(){return k?ta(o):yield u(R)});R&&!k?f=yield Ba(o,h,P):f=yield P()}else f=yield u();if(f){let _=i.getAttr("width");_&&(f.style.width=_+"px",f.style.minWidth="0px");let C=i.getAttr("height");C&&(f.style.height=C+"px",f.style.minHeight="0px"),i.replaceWith(f)}}))}},po=(e,g)=>{if(!(0,Xa.isCssValue)(g))throw new TypeError("maxHeight not css value");let r=Ar(e);if(!e.isVideo)return;let t="mx-default-height";r.style.setProperty("--"+t,g),e.isHTML5?(r.addClass(t),e.once("canplay",()=>{let p=o=>{let[n,f]=o.split(":");if(!Number.isInteger(+n)||!Number.isInteger(+f)){console.error("invaild ratio",o);return}r.removeClass(t),Or(r,g,+n/+f)},i=(o,n,f)=>{let h=0,m=window.setInterval(()=>{e.isVideo?e.ratio?(window.clearInterval(m),p(e.ratio)):h>o?(f(),window.clearInterval(m)):h++:window.clearInterval(m)},n)};i(10,100,()=>{console.log("fail to get ratio within 1s, fallback to 16:9"),p("16:9"),i(4,1e3,()=>console.warn("no ratio for video: ",e.source))})})):e.once("ready",()=>{Or(r,g,16/9)})};var en=Jt(require("obsidian"));var ti=Jt(Pr()),ri=Jt(Pn());var lr=Jt(require("obsidian"));var br="media-view",Ir=class extends lr.FileView{constructor(g,r,t){super(g);this.allowNoFile=!0;this.core=null;this.togglePip=()=>{if(!this.player)throw new Error("no media");this.player.pip=!this.player.pip};this.addToDoc=()=>{if(this.leaf.group){let g=this.app.workspace.getGroupLeaves(this.leaf.group);for(let r of g)if(r.view instanceof lr.MarkdownView){this.addTimeStampToMDView(r.view);return}}else console.error("no group for leaf: %o",this.leaf)};this.addTimeStampToMDView=g=>{let r=this.getTimeStamp();if(!r)return;let{timestampTemplate:t}=this.plugin.settings;Wr(t.replace(/{{TIMESTAMP}}/g,r),g)};this.plugin=r,this.emptyEl=this.setEmpty(),this.playerEl=this.contentEl.createDiv({cls:"media-view-player"}),this.app.isMobile&&this.addAction("cross","Close",()=>this.leaf.detach()),this.controls=this.getControls();let p=Cr(g,{open(i){return function(o){if(this.group){if(o instanceof Ir)return i.call(this,o)}else return i.call(this,o)}}});this.register(p),this.setInfo(t!=null?t:null)}get player(){var g,r;return(r=(g=this.core)==null?void 0:g.player)!=null?r:null}onLoadFile(g){return Bt(this,null,function*(){let r=yield vr(g,"");r?this.setInfo(r):new lr.Notice("Fail to open file")})}onRename(g){var r=t=>super[t];return Bt(this,null,function*(){if(this.file&&this.file===g&&this.core){let{info:p}=this.core,{currentTime:i}=this.core.player;yield this.setInfo(yield vr(g,p.hash)),this.player&&this.player.once("canplay",function(){window.setTimeout(()=>this.currentTime=i,200)})}r("onRename").call(this,g)})}onDelete(g){super.onDelete(g),this.file&&this.file===g&&this.leaf.detach()}get info(){var g,r;return(r=(g=this.core)==null?void 0:g.info)!=null?r:null}setInfo(g){return Bt(this,null,function*(){if(g===null)this.showEmpty(),g&&this.unloadCore(),this.file=null;else if(this.isEqual(g))this.hash=g.hash;else{this.showEmpty(!0),g&&this.unloadCore(),nr(g)&&(this.file=g.getSrcFile(this.app.vault),yield g.updateTrackInfo(this.app.vault));let r=Jr(g,this.plugin);if(this.playerEl.appendChild(Ar(r)),r.isHTML5?this.showControl("pip"):this.hideControl("pip"),this.core={info:g,player:r},this.load(),r.isYouTube){let t=p=>{p.detail.code===1&&(this.load(),r.off("statechange",t))};r.on("statechange",t)}}})}showEmpty(g=!1){this.emptyEl.style.display=g?"none":null,this.playerEl.style.display=g?null:"none",g?this.showControls():this.hideControls()}getState(){let g=super.getState();return g.info=Nr(rr({},this.info),{trackInfo:void 0}),g.currentTime=this.core?this.core.player.currentTime:0,g}setState(g,r){var t=p=>super[p];return Bt(this,null,function*(){let i=g.info,o=g.currentTime,n=()=>{o&&window.setTimeout(()=>{if(this.core){let{player:f}=this.core;f.once("playing",()=>{f.currentTime=o,f.pause()}),f.play()}else console.error("fail to set currentTime: media view empty")},1e3)};try{i?ar(i)?(i.src=new URL(i.src),i.iframe=new URL(i.iframe),yield this.setInfo(i),n()):Sr(i)?(i.src=new URL(i.src),yield this.setInfo(i),n()):nr(i)?(yield this.setInfo(Nr(rr({},i),{updateTrackInfo:Tn,getSrcFile:Sn})),n()):(0,ti.default)(i):i===null&&(yield this.setInfo(i))}catch(f){console.error(f),yield this.setInfo(null)}yield t("setState").call(this,g,r)})}onMoreOptionsMenu(g){let r=t=>{let p=new Map([["0.5\xD7","0.5"],["0.75\xD7","0.75"],["Normal","1"],["1.25\xD7","1.25"],["1.5\xD7","1.5"],["1.75\xD7","1.75"],["2\xD7","2"]]),i=new lr.Menu(t);for(let[o,n]of p)i.addItem(f=>f.setTitle(o).setActive(Boolean(this.player&&this.player.speed===+n)).onClick(()=>{this.player&&(this.player.speed=+n)}));return i};g.addItem(t=>t.setTitle("Speed Control").onClick(p=>r(this.app).showAtMouseEvent(p))),g.addSeparator(),super.onMoreOptionsMenu(g)}getControls(){return new Map([["get-timestamp",this.addAction("star","Get current Timestamp",this.addToDoc)],["pip",this.addAction("popup-open","Toggle Picture-in-Picture",this.togglePip)],["open-link",this.addAction("go-to-file","Open Media from link",()=>new Br(this.plugin,this).open())]])}setEmpty(){let{contentEl:g}=this,r=g.createDiv({cls:"empty-state"});return r.createDiv({cls:"empty-state-container"},t=>{t.createDiv({cls:"empty-state-title",text:"No Media"}),t.createDiv({cls:"empty-state-action-list"},p=>{((o,n)=>{p.createDiv({cls:"empty-state-action",text:o},f=>f.onClickEvent(n))})("Open Media from Link",()=>{let o=new Br(this.plugin,this).open()})})}),r}get timeSpan(){var g,r;return(r=(g=this.player)==null?void 0:g.timeSpan)!=null?r:null}set timeSpan(g){if(this.player)this.player.setTimeSpan(g);else throw new Error("trying to set timeSpan on empty media view")}set hash(g){if(!this.player)throw new Error("trying to set timeSpan on empty media view");let{timeSpan:r,is:t}=xr(g);this.player.setTimeSpan(r),this.player.autoplay=t("autoplay"),this.player.loop=t("loop"),this.player.muted=t("muted")}unloadCore(){if(this.core){let{info:g,player:r}=this.core;nr(g)&&g.trackInfo&&g.trackInfo.objUrls.forEach(t=>URL.revokeObjectURL(t)),r.pip&&(r.pip=!1),r.destroy(),this.updatePlayerEl(),this.core=null}else console.warn("core already destoryed")}updatePlayerEl(){let g=createDiv({cls:"media-view-player"});this.playerEl.replaceWith(g),this.playerEl=g}unload(){this.unloadCore()}getViewType(){return br}getDisplayText(){let g=r=>{let t=r.split(".");return t.pop(),t.join(".")};if(this.core){let{info:r,player:t}=this.core;if(nr(r)||Sr(r))return g(r.filename);if(r.host===$t.youtube||r.host===$t.vimeo){let p=()=>{var o;return(o=t==null?void 0:t.config)==null?void 0:o.title},i;if(i=p())return i;{let o=0,n=window.setInterval(()=>{let f=p();f&&this.load(),(f||o>10)&&window.clearInterval(n),o++},200)}}return $t[r.host]+": "+r.id}else return""}isEqual(g){return this.info===null?!1:nr(g)&&nr(this.info)?g.src===this.info.src:Sr(g)&&Sr(this.info)?Yr(Rr(g))===Yr(Rr(this.info)):ar(g)&&ar(this.info)?g.host===this.info.host&&g.id===this.info.id&&!(g.host===$t.bili&&g.src.searchParams.get("p")!==this.info.src.searchParams.get("p")):!1}getTimeStamp(g){if(!this.info)return null;if(!this.player)throw new Error("no media");let r=this.player.currentTime,{timestampOffset:t}=this.plugin.settings,p=r-t;r-t<0?p=0:r-t>this.player.duration&&(p=this.player.duration);let i=ri.default.fromS(p,"hh:mm:ss").replace(/^00:/g,"");return nr(this.info)?`[[${this.app.metadataCache.fileToLinktext(this.info.getSrcFile(this.app.vault),g!=null?g:"",!0)}#t=${i}]]`:`[${i.replace(/\.\d+$/,"")}](${Yr(this.info.src)}#t=${p})`}showControls(){this.controls.forEach(g=>{g.style.display==="none"&&(g.style.display=null)})}showControl(g){let r=this.controls.get(g);r?r.style.display==="none"&&(r.style.display=""):console.error(`control named ${g} not found in %o`,this.controls)}hideControls(){this.controls.forEach(g=>g.style.display="none")}hideControl(g){let r=this.controls.get(g);r?r.style.display="none":console.error(`control named ${g} not found in %o`,this.controls)}},Br=class extends lr.Modal{constructor(g,r){super(g.app);this.view=r,this.plugin=g}onOpen(){let{contentEl:g,titleEl:r,modalEl:t}=this;r.setText("Enter Link to Media");let p=g.createEl("input",{type:"text"},i=>i.style.width="100%");t.createDiv({cls:"modal-button-container"},i=>{i.createEl("button",{cls:"mod-cta",text:"Open"},o=>o.onClickEvent(()=>Bt(this,null,function*(){var f;let n=yield vr(p.value);n?this.view?(yield this.view.setInfo(n),(f=this.view.player)==null||f.once("ready",function(){this.play()}),this.close()):this.app.workspace.activeLeaf?(On(n,this.app.workspace.activeLeaf,this.plugin),this.close()):new lr.Notice("No activeLeaf found"):new lr.Notice("Link not supported")}))),i.createEl("button",{text:"Cancel"},o=>o.onClickEvent(()=>this.close()))})}onClose(){let{contentEl:g}=this;g.empty()}},On=(e,g,r)=>{let{workspace:t}=r.app;if(!(g.view instanceof lr.MarkdownView)){new lr.Notice("No MarkdownView active, open new markdown file or click on opened md file");return}let p=()=>{var h,m;let n=(h=t.rootSplit.containerEl)==null?void 0:h.clientWidth,f=(m=t.rootSplit.containerEl)==null?void 0:m.clientHeight;return f&&n?f<n?"vertical":"horizontal":(console.error("no containerEl for rootSplit, fallback to horizontal",t.rootSplit),"horizontal")},i=t.createLeafBySplit(g,p());g.setGroupMember(i);let o=new Ir(i,r,e);if(i.open(o),o.core){let{player:n}=o.core;n.once("ready",function(){this.play()})}};var ni=(e,g)=>{let{workspace:r}=g.app;return t=>{if(ar(e)&&e.host===$t.bili&&(!gr(g.app)||!g.settings.interalBiliPlayback))return;if(t.stopPropagation(),t.preventDefault(),!r.activeLeaf){console.error("no active leaf");return}let p=r.activeLeaf.group,i=null;if(p){let o=r.getLeavesOfType(br).filter(n=>n.group===p);o.length>0&&(i=o[0]);for(let n=1;n<o.length;n++)o[n].detach()}if(i){let o=i.view,n=o.isEqual(e);o.setInfo(e).then(()=>{if(!o.core)return;let{player:f}=o.core;n?f.play():!ar(e)&&e.type==="media"&&f.isHTML5?f.once("ready",function(){let h=this.play(),m=0;h&&h.catch(u=>{var C;let _="The play() request was interrupted by a new load request";m===0&&((C=u.message)==null?void 0:C.includes(_))?(console.warn(u),m++):console.error(u)})}):f.once("ready",function(){this.play()})})}else r.activeLeaf&&On(e,r.activeLeaf,g)}},Ln=(e,g)=>{let r=g==="internal"?"a.internal-link":"a.external-link";return(t,p)=>{t.querySelectorAll(r).forEach(i=>Bt(void 0,null,function*(){let o=i,n=yield jr(o,g,e.app,p);!n||e.registerDomEvent(o,"click",ni(n,e))}))}},ai=e=>{let{workspace:g,metadataCache:r,vault:t}=e.app;return(p,i)=>Bt(void 0,null,function*(){let o=i.innerText;if(/Macintosh|iPhone/.test(navigator.userAgent)?p.metaKey:p.ctrlKey){let h;if(i.hasClass("cm-hmd-internal-link")){let{path:m,subpath:u}=(0,en.parseLinktext)(o);if(_n(m))p.stopPropagation();else return;let _=g.getActiveViewOfType(en.MarkdownView);if(!_){console.error("no MarkdownView activeLeaf found");return}let C=r.getFirstLinkpathDest(m,_.file.path);if(!C)return;h=yield vr(C,u)}else if(i.hasClass("cm-formatting")&&i.hasClass("cm-formatting-link-string")){let m;if(o==="("?m=i.nextElementSibling:o===")"?m=i.previousElementSibling:m=null,m===null||!(m instanceof HTMLElement)){console.error("unable to get url from: %o",i);return}h=yield vr(m.innerText)}else h=yield vr(o);try{h&&ni(h,e)(p)}catch(m){console.error(m)}}})};var ii=Jt(Pn());var Ur=Jt(require("obsidian"));function si(){let{vault:e,fileManager:g,workspace:r}=this.app,t=this,p=this.app.internalPlugins.plugins["audio-recorder"];if(!p)return;let i=n=>{let f=t.recStartTime;t.recStartTime=null;let h=m=>Bt(this,null,function*(){let u=yield e.read(m);return e.modify(m,u.replace(new RegExp(`%%REC_${f}#t=([\\d.]+?)%%`,"g"),(_,C)=>{let k=ii.default.fromS(+C,"hh:mm:ss").replace(/^00:/g,""),R=g.generateMarkdownLink(n,m.path,"#t="+C,k).substring(1);return R.startsWith("[]")?R.replace(/^\[\]/,`[${k}]`):R}))});r.getLeavesOfType("markdown").forEach(m=>{m.view instanceof Ur.MarkdownView&&(m!==r.activeLeaf?h(m.view.file):window.setTimeout(()=>{m.view instanceof Ur.MarkdownView&&h(m.view.file)},500))})};this.addCommand({id:"take-rec-timestamp",name:"Get Current Timestamp of Recording",editorCheckCallback:(n,f,h)=>{if(n)return typeof this.recStartTime=="number";{let m=this.recStartTime;if(m){let{timestampTemplate:u}=this.settings,_=`%%REC_${this.recStartTime}#t=${(Date.now()-m)/1e3}%%`;Wr(u.replace(/{{TIMESTAMP}}/g,_),h)}}}});let o=Cr(p.instance,{saveRecording(n){return function(...f){let h=n.apply(this,f),m=()=>e.off("create",_),u=window.setTimeout(m,3e5),_=C=>{C instanceof Ur.TFile?i(C):console.error("unexpected folder"),m(),window.clearTimeout(u)};return e.on("create",_),h}},startRecording(n){return function(...f){let h=n.apply(this,f),m=this.recorder;return t.recStartTime=Date.now(),m&&m instanceof MediaRecorder&&m.addEventListener("start",()=>{t.recStartTime=Date.now()}),h}}});this.register(o)}var ui="span.cm-url, span.cm-hmd-internal-link",Fn=class extends li.Plugin{constructor(){super(...arguments);this.settings=Ga;this.recStartTime=null;this.cmLinkHandler=ai(this);this.setEmbedMinWidth=g=>document.documentElement.style.setProperty("--plyr-min-width",g!=null?g:this.sizeSettings.embedMinWidth);this.setSizeSettings=g=>Bt(this,null,function*(){let r;this.app.isMobile?r={embedMaxHeightMobile:g.embedMaxHeight,embedMinWidthMobile:g.embedMinWidth,plyrControlsMobile:g.plyrControls}:r=g;let t=(p,i)=>{let o={};return Object.keys(rr(rr({},p),i)).map(n=>{o[n]=i[n]||p[n]}),o};this.settings=t(this.settings,r),yield this.saveSettings()})}loadSettings(){return Bt(this,null,function*(){this.settings=rr(rr({},this.settings),yield this.loadData())})}saveSettings(){return Bt(this,null,function*(){yield this.saveData(this.settings)})}get sizeSettings(){return{embedMaxHeight:this.app.isMobile?this.settings.embedMaxHeightMobile:this.settings.embedMaxHeight,embedMinWidth:this.app.isMobile?this.settings.embedMinWidthMobile:this.settings.embedMinWidth,plyrControls:this.app.isMobile?this.settings.plyrControlsMobile:this.settings.plyrControls}}onload(){return Bt(this,null,function*(){console.log("loading media-extended"),yield this.loadSettings(),si.call(this),document.body.toggleClass(bn,this.settings.hideYtbRecomm),this.setEmbedMinWidth(),this.addSettingTab(new In(this.app,this)),this.settings.mediaFragmentsEmbed&&this.registerMarkdownPostProcessor(wn(this,"internal")),this.settings.timestampLink&&this.registerMarkdownPostProcessor(Ln(this,"internal")),this.settings.extendedImageEmbedSyntax&&this.registerMarkdownPostProcessor(wn(this,"external")),this.registerMarkdownPostProcessor(Ln(this,"external")),this.app.isMobile||this.registerCodeMirror(g=>{let r=g.getWrapperElement();r.on("mousedown",ui,this.cmLinkHandler),this.register(()=>r.off("mousedown",ui,this.cmLinkHandler))}),this.registerExtensions(),this.addCommand({id:"get-timestamp",name:"Get timestamp from player",editorCheckCallback:(g,r,t)=>{var o;let p=n=>{var f;return(f=this.app.workspace.getGroupLeaves(n).find(h=>h.view.getTimeStamp!==void 0))==null?void 0:f.view},i=t.leaf.group;if(g){if(i){let n=p(i);if(n&&n.getTimeStamp())return!0}return!1}else i&&((o=p(i))==null||o.addTimeStampToMDView(t))}}),this.addCommand({id:"open-media-link",name:"Open Media from Link",callback:()=>{new Br(this).open()}})})}registerExtensions(){let g=fi();this.app.viewRegistry.unregisterExtensions(g),this.registerView(br,r=>new Ir(r,this)),this.app.viewRegistry.registerExtensions(g,br)}unregisterExtensions(){this.app.viewRegistry.unregisterExtensions(fi());for(let[g,r]of Xr)switch(g){case"audio":case"video":this.app.viewRegistry.registerExtensions(r,g);break;case"media":this.app.viewRegistry.registerExtensions(r,"video");break;default:(0,oi.default)(g)}}onunload(){console.log("unloading media-extended"),this.unregisterExtensions()}},fi=()=>[...Xr.values()].reduce((e,g)=>e.concat(g),[]);
|
|
/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
|
|
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
/*! zero-fill. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|