1var xl={7267:function(vt,pe){pe.byteLength=function(w){var h=T(w),m=h[0],r=h[1];return 3*(m+r)/4-r},pe.toByteArray=function(w){var h,m,r=T(w),H=r[0],G=r[1],ue=new d((function(fe,Me,Fe){return 3*(Me+Fe)/4-Fe})(0,H,G)),ge=0,Ne=G>0?H-4:H;for(m=0;m<Ne;m+=4)h=L[w.charCodeAt(m)]<<18|L[w.charCodeAt(m+1)]<<12|L[w.charCodeAt(m+2)]<<6|L[w.charCodeAt(m+3)],ue[ge++]=h>>16&255,ue[ge++]=h>>8&255,ue[ge++]=255&h;return G===2&&(h=L[w.charCodeAt(m)]<<2|L[w.charCodeAt(m+1)]>>4,ue[ge++]=255&h),G===1&&(h=L[w.charCodeAt(m)]<<10|L[w.charCodeAt(m+1)]<<4|L[w.charCodeAt(m+2)]>>2,ue[ge++]=h>>8&255,ue[ge++]=255&h),ue},pe.fromByteArray=function(w){for(var h,m=w.length,r=m%3,H=[],G=16383,ue=0,ge=m-r;ue<ge;ue+=G)H.push(y(w,ue,ue+G>ge?ge:ue+G));return r===1?(h=w[m-1],H.push(P[h>>2]+P[h<<4&63]+"==")):r===2&&(h=(w[m-2]<<8)+w[m-1],H.push(P[h>>10]+P[h>>4&63]+P[h<<2&63]+"=")),H.join("")};for(var P=[],L=[],d=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0;p<64;++p)P[p]=o[p],L[o.charCodeAt(p)]=p;function T(w){var h=w.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=w.indexOf("=");return m===-1&&(m=h),[m,m===h?0:4-m%4]}function y(w,h,m){for(var r,H,G=[],ue=h;ue<m;ue+=3)r=(w[ue]<<16&16711680)+(w[ue+1]<<8&65280)+(255&w[ue+2]),G.push(P[(H=r)>>18&63]+P[H>>12&63]+P[H>>6&63]+P[63&H]);return G.join("")}L[45]=62,L[95]=63},44:function(vt,pe,P){const L=P(7267),d=P(7986),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=y,pe.SlowBuffer=function(i){return+i!=i&&(i=0),y.alloc(+i)},pe.INSPECT_MAX_BYTES=50;const p=2147483647;function T(i){if(i>p)throw new RangeError('The value "'+i+'" is invalid for option "size"');const l=new Uint8Array(i);return Object.setPrototypeOf(l,y.prototype),l}function y(i,l,C){if(typeof i=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(i)}return w(i,l,C)}function w(i,l,C){if(typeof i=="string")return(function(Oe,rt){if(typeof rt=="string"&&rt!==""||(rt="utf8"),!y.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);const ae=0|ue(Oe,rt);let ze=T(ae);const qe=ze.write(Oe,rt);return qe!==ae&&(ze=ze.slice(0,qe)),ze})(i,l);if(ArrayBuffer.isView(i))return(function(Oe){if(j(Oe,Uint8Array)){const rt=new Uint8Array(Oe);return H(rt.buffer,rt.byteOffset,rt.byteLength)}return r(Oe)})(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(j(i,ArrayBuffer)||i&&j(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(j(i,SharedArrayBuffer)||i&&j(i.buffer,SharedArrayBuffer)))return H(i,l,C);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ne=i.valueOf&&i.valueOf();if(ne!=null&&ne!==i)return y.from(ne,l,C);const se=(function(Oe){if(y.isBuffer(Oe)){const rt=0|G(Oe.length),ae=T(rt);return ae.length===0||Oe.copy(ae,0,0,rt),ae}return Oe.length!==void 0?typeof Oe.length!="number"||We(Oe.length)?T(0):r(Oe):Oe.type==="Buffer"&&Array.isArray(Oe.data)?r(Oe.data):void 0})(i);if(se)return se;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return y.from(i[Symbol.toPrimitive]("string"),l,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}function h(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function m(i){return h(i),T(i<0?0:0|G(i))}function r(i){const l=i.length<0?0:0|G(i.length),C=T(l);for(let ne=0;ne<l;ne+=1)C[ne]=255&i[ne];return C}function H(i,l,C){if(l<0||i.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<l+(C||0))throw new RangeError('"length" is outside of buffer bounds');let ne;return ne=l===void 0&&C===void 0?new Uint8Array(i):C===void 0?new Uint8Array(i,l):new Uint8Array(i,l,C),Object.setPrototypeOf(ne,y.prototype),ne}function G(i){if(i>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|i}function ue(i,l){if(y.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||j(i,ArrayBuffer))return i.byteLength;
1if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const C=i.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&C===0)return 0;let se=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return Y(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*C;case"hex":return C>>>1;case"base64":return k(i).length;default:if(se)return ne?-1:Y(i).length;l=(""+l).toLowerCase(),se=!0}}function ge(i,l,C){let ne=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0)<=(l>>>=0))return"";for(i||(i="utf8");;)switch(i){case"hex":return mt(this,l,C);case"utf8":case"utf-8":return Ae(this,l,C);case"ascii":return gt(this,l,C);case"latin1":case"binary":return Ee(this,l,C);case"base64":return Se(this,l,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,l,C);default:if(ne)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),ne=!0}}function Ne(i,l,C){const ne=i[l];i[l]=i[C],i[C]=ne}function fe(i,l,C,ne,se){if(i.length===0)return-1;if(typeof C=="string"?(ne=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),We(C=+C)&&(C=se?0:i.length-1),C<0&&(C=i.length+C),C>=i.length){if(se)return-1;C=i.length-1}else if(C<0){if(!se)return-1;C=0}if(typeof l=="string"&&(l=y.from(l,ne)),y.isBuffer(l))return l.length===0?-1:Me(i,l,C,ne,se);if(typeof l=="number")return l&=255,typeof Uint8Array.prototype.indexOf=="function"?se?Uint8Array.prototype.indexOf.call(i,l,C):Uint8Array.prototype.lastIndexOf.call(i,l,C):Me(i,[l],C,ne,se);throw new TypeError("val must be string, number or Buffer")}function Me(i,l,C,ne,se){let Oe,rt=1,ae=i.length,ze=l.length;if(ne!==void 0&&((ne=String(ne).toLowerCase())==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(i.length<2||l.length<2)return-1;rt=2,ae/=2,ze/=2,C/=2}function qe(V,he){return rt===1?V[he]:V.readUInt16BE(he*rt)}if(se){let V=-1;for(Oe=C;Oe<ae;Oe++)if(qe(i,Oe)===qe(l,V===-1?0:Oe-V)){if(V===-1&&(V=Oe),Oe-V+1===ze)return V*rt}else V!==-1&&(Oe-=Oe-V),V=-1}else for(C+ze>ae&&(C=ae-ze),Oe=C;Oe>=0;Oe--){let V=!0;for(let he=0;he<ze;he++)if(qe(i,Oe+he)!==qe(l,he)){V=!1;break}if(V)return Oe}return-1}function Fe(i,l,C,ne){C=Number(C)||0;const se=i.length-C;ne?(ne=Number(ne))>se&&(ne=se):ne=se;const Oe=l.length;let rt;for(ne>Oe/2&&(ne=Oe/2),rt=0;rt<ne;++rt){const ae=parseInt(l.substr(2*rt,2),16);if(We(ae))return rt;i[C+rt]=ae}return rt}function ot(i,l,C,ne){return De(Y(l,i.length-C),i,C,ne)}function ke(i,l,C,ne){return De((function(se){const Oe=[];for(let rt=0;rt<se.length;++rt)Oe.push(255&se.charCodeAt(rt));return Oe})(l),i,C,ne)}function Q(i,l,C,ne){return De(k(l),i,C,ne)}function X(i,l,C,ne){return De((function(se,Oe){let rt,ae,ze;const qe=[];for(let V=0;V<se.length&&!((Oe-=2)<0);++V)rt=se.charCodeAt(V),ae=rt>>8,ze=rt%256,qe.push(ze),qe.push(ae);return qe})(l,i.length-C),i,C,ne)}function Se(i,l,C){return l===0&&C===i.length?L.fromByteArray(i):L.fromByteArray(i.slice(l,C))}function Ae(i,l,C){C=Math.min(i.length,C);const ne=[];let se=l;for(;se<C;){const Oe=i[se];let rt=null,ae=Oe>239?4:Oe>223?3:Oe>191?2:1;if(se+ae<=C){let ze,qe,V,he;switch(ae){case 1:Oe<128&&(rt=Oe);break;case 2:ze=i[se+1],(192&ze)==128&&(he=(31&Oe)<<6|63&ze,he>127&&(rt=he));break;case 3:ze=i[se+1],qe=i[se+2],(192&ze)==128&&(192&qe)==128&&(he=(15&Oe)<<12|(63&ze)<<6|63&qe,he>2047&&(he<55296||he>57343)&&(rt=he));break;case 4:ze=i[se+1],qe=i[se+2],V=i[se+3],(192&ze)==128&&(192&qe)==128&&(192&V)==128&&(he=(15&Oe)<<18|(63&ze)<<12|(63&qe)<<6|63&V,he>65535&&he<1114112&&(rt=he))}}rt===null?(rt=65533,ae=1):rt>65535&&(rt-=65536,ne.push(rt>>>10&1023|55296),rt=56320|1023&rt),ne.push(rt),se+=ae}return(function(Oe){const rt=Oe.length;if(rt<=xe)return String.fromCharCode.apply(String,Oe);let ae="",ze=0;for(;ze<rt;)ae+=String.fromCharCode.apply(String,Oe.slice(ze,ze+=xe));return ae})(ne)}pe.kMaxLength=p,y.TYPED_ARRAY_SUPPORT=(function(){try{const i=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(i,l),i.foo()===42}catch{return!1}})(),y.TYPED_ARRAY_SUPPORT||typeof console>"u"||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."),Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}}),y.poolSize=8192,y.from=function(i,l,C){return w(i,l,C)}
vendor: 5,116 bytes, line 1
1,Object.setPrototypeOf(y.prototype,Uint8Array.prototype),Object.setPrototypeOf(y,Uint8Array),y.alloc=function(i,l,C){return(function(ne,se,Oe){return h(ne),ne<=0?T(ne):se!==void 0?typeof Oe=="string"?T(ne).fill(se,Oe):T(ne).fill(se):T(ne)})(i,l,C)},y.allocUnsafe=function(i){return m(i)},y.allocUnsafeSlow=function(i){return m(i)},y.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==y.prototype},y.compare=function(i,l){if(j(i,Uint8Array)&&(i=y.from(i,i.offset,i.byteLength)),j(l,Uint8Array)&&(l=y.from(l,l.offset,l.byteLength)),!y.isBuffer(i)||!y.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===l)return 0;let C=i.length,ne=l.length;for(let se=0,Oe=Math.min(C,ne);se<Oe;++se)if(i[se]!==l[se]){C=i[se],ne=l[se];break}return C<ne?-1:ne<C?1:0},y.isEncoding=function(i){switch(String(i).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}},y.concat=function(i,l){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return y.alloc(0);let C;if(l===void 0)for(l=0,C=0;C<i.length;++C)l+=i[C].length;const ne=y.allocUnsafe(l);let se=0;for(C=0;C<i.length;++C){let Oe=i[C];if(j(Oe,Uint8Array))se+Oe.length>ne.length?(y.isBuffer(Oe)||(Oe=y.from(Oe)),Oe.copy(ne,se)):Uint8Array.prototype.set.call(ne,Oe,se);else{if(!y.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(ne,se)}se+=Oe.length}return ne},y.byteLength=ue,y.prototype._isBuffer=!0,y.prototype.swap16=function(){const i=this.length;if(i%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<i;l+=2)Ne(this,l,l+1);return this},y.prototype.swap32=function(){const i=this.length;if(i%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<i;l+=4)Ne(this,l,l+3),Ne(this,l+1,l+2);return this},y.prototype.swap64=function(){const i=this.length;if(i%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<i;l+=8)Ne(this,l,l+7),Ne(this,l+1,l+6),Ne(this,l+2,l+5),Ne(this,l+3,l+4);return this},y.prototype.toString=function(){const i=this.length;return i===0?"":arguments.length===0?Ae(this,0,i):ge.apply(this,arguments)},y.prototype.toLocaleString=y.prototype.toString,y.prototype.equals=function(i){if(!y.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i||y.compare(this,i)===0},y.prototype.inspect=function(){let i="";const l=pe.INSPECT_MAX_BYTES;return i=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(i+=" ... "),"<Buffer "+i+">"},o&&(y.prototype[o]=y.prototype.inspect),y.prototype.compare=function(i,l,C,ne,se){if(j(i,Uint8Array)&&(i=y.from(i,i.offset,i.byteLength)),!y.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(l===void 0&&(l=0),C===void 0&&(C=i?i.length:0),ne===void 0&&(ne=0),se===void 0&&(se=this.length),l<0||C>i.length||ne<0||se>this.length)throw new RangeError("out of range index");if(ne>=se&&l>=C)return 0;if(ne>=se)return-1;if(l>=C)return 1;if(this===i)return 0;let Oe=(se>>>=0)-(ne>>>=0),rt=(C>>>=0)-(l>>>=0);const ae=Math.min(Oe,rt),ze=this.slice(ne,se),qe=i.slice(l,C);for(let V=0;V<ae;++V)if(ze[V]!==qe[V]){Oe=ze[V],rt=qe[V];break}return Oe<rt?-1:rt<Oe?1:0},y.prototype.includes=function(i,l,C){return this.indexOf(i,l,C)!==-1},y.prototype.indexOf=function(i,l,C){return fe(this,i,l,C,!0)},y.prototype.lastIndexOf=function(i,l,C){return fe(this,i,l,C,!1)},y.prototype.write=function(i,l,C,ne){if(l===void 0)ne="utf8",C=this.length,l=0;else if(C===void 0&&typeof l=="string")ne=l,C=this.length,l=0;else{if(!isFinite(l))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");l>>>=0,isFinite(C)?(C>>>=0,ne===void 0&&(ne="utf8")):(ne=C,C=void 0)}const se=this.length-l;if((C===void 0||C>se)&&(C=se),i.length>0&&(C<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");let Oe=!1;for(;;)switch(ne){case"hex":return Fe(this,i,l,C);case"utf8":case"utf-8":return ot(this,i,l,C);case"ascii":case"latin1":case"binary":return ke(this,i,l,C);case"base64":return Q(this,i,l,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,i,l,C);default:if(Oe)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),Oe=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const xe=4096;function gt(i,l,C){let ne="";C=Math.min(i.length,C);for(let se=l;se<C;++se)ne+=String.fromCharCode(127&i[se]);return ne}function Ee(i,l,C){let ne="";C=Math.min(i.length,C);for(let se=l;se<C;++se)ne+=String.fromCharCode(i[se]);return ne}function mt(i,l,C){const ne=i.length;(!l||l<0)&&(l=0),(!C||C<0||C>ne)&&(C=ne);let se="";for(let Oe=l;Oe<C;++Oe)se+=st[i[Oe]];return se}function He(i,l,C){const ne=i.slice(l,C);let se="";for(let Oe=0;Oe<ne.length-1;Oe+=2)se+=String.fromCharCode(ne[Oe]+256*ne[Oe+1]);return se}
vendor: 5,100 bytes, line 1
1function Pe(i,l,C){if(i%1!=0||i<0)throw new RangeError("offset is not uint");if(i+l>C)throw new RangeError("Trying to access beyond buffer length")}function Ke(i,l,C,ne,se,Oe){if(!y.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>se||l<Oe)throw new RangeError('"value" argument is out of bounds');if(C+ne>i.length)throw new RangeError("Index out of range")}function Et(i,l,C,ne,se){Ie(l,ne,se,i,C,7);let Oe=Number(l&BigInt(4294967295));i[C++]=Oe,Oe>>=8,i[C++]=Oe,Oe>>=8,i[C++]=Oe,Oe>>=8,i[C++]=Oe;let rt=Number(l>>BigInt(32)&BigInt(4294967295));return i[C++]=rt,rt>>=8,i[C++]=rt,rt>>=8,i[C++]=rt,rt>>=8,i[C++]=rt,C}function Pt(i,l,C,ne,se){Ie(l,ne,se,i,C,7);let Oe=Number(l&BigInt(4294967295));i[C+7]=Oe,Oe>>=8,i[C+6]=Oe,Oe>>=8,i[C+5]=Oe,Oe>>=8,i[C+4]=Oe;let rt=Number(l>>BigInt(32)&BigInt(4294967295));return i[C+3]=rt,rt>>=8,i[C+2]=rt,rt>>=8,i[C+1]=rt,rt>>=8,i[C]=rt,C+8}function xt(i,l,C,ne,se,Oe){if(C+ne>i.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function Lt(i,l,C,ne,se){return l=+l,C>>>=0,se||xt(i,0,C,4),d.write(i,l,C,ne,23,4),C+4}function sn(i,l,C,ne,se){return l=+l,C>>>=0,se||xt(i,0,C,8),d.write(i,l,C,ne,52,8),C+8}y.prototype.slice=function(i,l){const C=this.length;(i=~~i)<0?(i+=C)<0&&(i=0):i>C&&(i=C),(l=l===void 0?C:~~l)<0?(l+=C)<0&&(l=0):l>C&&(l=C),l<i&&(l=i);const ne=this.subarray(i,l);return Object.setPrototypeOf(ne,y.prototype),ne},y.prototype.readUintLE=y.prototype.readUIntLE=function(i,l,C){i>>>=0,l>>>=0,C||Pe(i,l,this.length);let ne=this[i],se=1,Oe=0;for(;++Oe<l&&(se*=256);)ne+=this[i+Oe]*se;return ne},y.prototype.readUintBE=y.prototype.readUIntBE=function(i,l,C){i>>>=0,l>>>=0,C||Pe(i,l,this.length);let ne=this[i+--l],se=1;for(;l>0&&(se*=256);)ne+=this[i+--l]*se;return ne},y.prototype.readUint8=y.prototype.readUInt8=function(i,l){return i>>>=0,l||Pe(i,1,this.length),this[i]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(i,l){return i>>>=0,l||Pe(i,2,this.length),this[i]|this[i+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(i,l){return i>>>=0,l||Pe(i,2,this.length),this[i]<<8|this[i+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+16777216*this[i+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),16777216*this[i]+(this[i+1]<<16|this[i+2]<<8|this[i+3])},y.prototype.readBigUInt64LE=Te((function(i){pt(i>>>=0,"offset");const l=this[i],C=this[i+7];l!==void 0&&C!==void 0||_t(i,this.length-8);const ne=l+256*this[++i]+65536*this[++i]+this[++i]*2**24,se=this[++i]+256*this[++i]+65536*this[++i]+C*2**24;return BigInt(ne)+(BigInt(se)<<BigInt(32))})),y.prototype.readBigUInt64BE=Te((function(i){pt(i>>>=0,"offset");const l=this[i],C=this[i+7];l!==void 0&&C!==void 0||_t(i,this.length-8);const ne=l*2**24+65536*this[++i]+256*this[++i]+this[++i],se=this[++i]*2**24+65536*this[++i]+256*this[++i]+C;return(BigInt(ne)<<BigInt(32))+BigInt(se)})),y.prototype.readIntLE=function(i,l,C){i>>>=0,l>>>=0,C||Pe(i,l,this.length);let ne=this[i],se=1,Oe=0;for(;++Oe<l&&(se*=256);)ne+=this[i+Oe]*se;return se*=128,ne>=se&&(ne-=Math.pow(2,8*l)),ne},y.prototype.readIntBE=function(i,l,C){i>>>=0,l>>>=0,C||Pe(i,l,this.length);let ne=l,se=1,Oe=this[i+--ne];for(;ne>0&&(se*=256);)Oe+=this[i+--ne]*se;return se*=128,Oe>=se&&(Oe-=Math.pow(2,8*l)),Oe},y.prototype.readInt8=function(i,l){return i>>>=0,l||Pe(i,1,this.length),128&this[i]?-1*(255-this[i]+1):this[i]},y.prototype.readInt16LE=function(i,l){i>>>=0,l||Pe(i,2,this.length);const C=this[i]|this[i+1]<<8;return 32768&C?4294901760|C:C},y.prototype.readInt16BE=function(i,l){i>>>=0,l||Pe(i,2,this.length);const C=this[i+1]|this[i]<<8;return 32768&C?4294901760|C:C},y.prototype.readInt32LE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},y.prototype.readInt32BE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},y.prototype.readBigInt64LE=Te((function(i){pt(i>>>=0,"offset");const l=this[i],C=this[i+7];l!==void 0&&C!==void 0||_t(i,this.length-8);const ne=this[i+4]+256*this[i+5]+65536*this[i+6]+(C<<24);return(BigInt(ne)<<BigInt(32))+BigInt(l+256*this[++i]+65536*this[++i]+this[++i]*16777216)})),y.prototype.readBigInt64BE=Te((function(i){pt(i>>>=0,"offset");const l=this[i],C=this[i+7];l!==void 0&&C!==void 0||_t(i,this.length-8);const ne=(l<<24)+65536*this[++i]+256*this[++i]+this[++i];return(BigInt(ne)<<BigInt(32))+BigInt(this[++i]*16777216+65536*this[++i]+256*this[++i]+C)})),y.prototype.readFloatLE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),d.read(this,i,!0,23,4)},y.prototype.readFloatBE=function(i,l){return i>>>=0,l||Pe(i,4,this.length),d.read(this,i,!1,23,4)},y.prototype.readDoubleLE=function(i,l){return i>>>=0,l||Pe(i,8,this.length),d.read(this,i,!0,52,8)},y.prototype.readDoubleBE=function(i,l){return i>>>=0,l||Pe(i,8,this.length),d.read(this,i,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(i,l,C,ne){i=+i,l>>>=0,C>>>
1=0,ne||Ke(this,i,l,C,Math.pow(2,8*C)-1,0);let se=1,Oe=0;for(this[l]=255&i;++Oe<C&&(se*=256);)this[l+Oe]=i/se&255;return l+C},y.prototype.writeUintBE=y.prototype.writeUIntBE=function(i,l,C,ne){i=+i,l>>>=0,C>>>=0,ne||Ke(this,i,l,C,Math.pow(2,8*C)-1,0);let se=C-1,Oe=1;for(this[l+se]=255&i;--se>=0&&(Oe*=256);)this[l+se]=i/Oe&255;return l+C},y.prototype.writeUint8=y.prototype.writeUInt8=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,1,255,0),this[l]=255&i,l+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,2,65535,0),this[l]=255&i,this[l+1]=i>>>8,l+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,2,65535,0),this[l]=i>>>8,this[l+1]=255&i,l+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,4,4294967295,0),this[l+3]=i>>>24,this[l+2]=i>>>16,this[l+1]=i>>>8,this[l]=255&i,l+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,4,4294967295,0),this[l]=i>>>24,this[l+1]=i>>>16,this[l+2]=i>>>8,this[l+3]=255&i,l+4},y.prototype.writeBigUInt64LE=Te((function(i,l=0){return Et(this,i,l,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeBigUInt64BE=Te((function(i,l=0){return Pt(this,i,l,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeIntLE=function(i,l,C,ne){if(i=+i,l>>>=0,!ne){const ae=Math.pow(2,8*C-1);Ke(this,i,l,C,ae-1,-ae)}let se=0,Oe=1,rt=0;for(this[l]=255&i;++se<C&&(Oe*=256);)i<0&&rt===0&&this[l+se-1]!==0&&(rt=1),this[l+se]=(i/Oe|0)-rt&255;return l+C},y.prototype.writeIntBE=function(i,l,C,ne){if(i=+i,l>>>=0,!ne){const ae=Math.pow(2,8*C-1);Ke(this,i,l,C,ae-1,-ae)}let se=C-1,Oe=1,rt=0;for(this[l+se]=255&i;--se>=0&&(Oe*=256);)i<0&&rt===0&&this[l+se+1]!==0&&(rt=1),this[l+se]=(i/Oe|0)-rt&255;return l+C},y.prototype.writeInt8=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,1,127,-128),i<0&&(i=255+i+1),this[l]=255&i,l+1},y.prototype.writeInt16LE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,2,32767,-32768),this[l]=255&i,this[l+1]=i>>>8,l+2},y.prototype.writeInt16BE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,2,32767,-32768),this[l]=i>>>8,this[l+1]=255&i,l+2},y.prototype.writeInt32LE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,4,2147483647,-2147483648),this[l]=255&i,this[l+1]=i>>>8,this[l+2]=i>>>16,this[l+3]=i>>>24,l+4},y.prototype.writeInt32BE=function(i,l,C){return i=+i,l>>>=0,C||Ke(this,i,l,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[l]=i>>>24,this[l+1]=i>>>16,this[l+2]=i>>>8,this[l+3]=255&i,l+4},y.prototype.writeBigInt64LE=Te((function(i,l=0){return Et(this,i,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeBigInt64BE=Te((function(i,l=0){return Pt(this,i,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeFloatLE=function(i,l,C){return Lt(this,i,l,!0,C)},y.prototype.writeFloatBE=function(i,l,C){return Lt(this,i,l,!1,C)},y.prototype.writeDoubleLE=function(i,l,C){return sn(this,i,l,!0,C)},y.prototype.writeDoubleBE=function(i,l,C){return sn(this,i,l,!1,C)},y.prototype.copy=function(i,l,C,ne){if(!y.isBuffer(i))throw new TypeError("argument should be a Buffer");if(C||(C=0),ne||ne===0||(ne=this.length),l>=i.length&&(l=i.length),l||(l=0),ne>0&&ne<C&&(ne=C),ne===C||i.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),i.length-l<ne-C&&(ne=i.length-l+C);const se=ne-C;return this===i&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,C,ne):Uint8Array.prototype.set.call(i,this.subarray(C,ne),l),se},y.prototype.fill=function(i,l,C,ne){if(typeof i=="string"){if(typeof l=="string"?(ne=l,l=0,C=this.length):typeof C=="string"&&(ne=C,C=this.length),ne!==void 0&&typeof ne!="string")throw new TypeError("encoding must be a string");if(typeof ne=="string"&&!y.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);if(i.length===1){const Oe=i.charCodeAt(0);(ne==="utf8"&&Oe<128||ne==="latin1")&&(i=Oe)}}else typeof i=="number"?i&=255:typeof i=="boolean"&&(i=Number(i));if(l<0||this.length<l||this.length<C)throw new RangeError("Out of range index");if(C<=l)return this;let se;if(l>>>=0,C=C===void 0?this.length:C>>>0,i||(i=0),typeof i=="number")for(se=l;se<C;++se)this[se]=i;else{const Oe=y.isBuffer(i)?i:y.from(i,ne),rt=Oe.length;
1if(rt===0)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(se=0;se<C-l;++se)this[se+l]=Oe[se%rt]}return this};const nn={};function Sn(i,l,C){nn[i]=class extends C{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(ne){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ne,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}function ve(i){let l="",C=i.length;const ne=i[0]==="-"?1:0;for(;C>=ne+4;C-=3)l=`_${i.slice(C-3,C)}${l}`;return`${i.slice(0,C)}${l}`}function Ie(i,l,C,ne,se,Oe){if(i>C||i<l){const rt=typeof l=="bigint"?"n":"";let ae;throw ae=l===0||l===BigInt(0)?`>= 0${rt} and < 2${rt} ** ${8*(Oe+1)}${rt}`:`>= -(2${rt} ** ${8*(Oe+1)-1}${rt}) and < 2 ** ${8*(Oe+1)-1}${rt}`,new nn.ERR_OUT_OF_RANGE("value",ae,i)}(function(rt,ae,ze){pt(ae,"offset"),rt[ae]!==void 0&&rt[ae+ze]!==void 0||_t(ae,rt.length-(ze+1))})(ne,se,Oe)}function pt(i,l){if(typeof i!="number")throw new nn.ERR_INVALID_ARG_TYPE(l,"number",i)}function _t(i,l,C){throw Math.floor(i)!==i?(pt(i,C),new nn.ERR_OUT_OF_RANGE("offset","an integer",i)):l<0?new nn.ERR_BUFFER_OUT_OF_BOUNDS:new nn.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,i)}Sn("ERR_BUFFER_OUT_OF_BOUNDS",(function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),Sn("ERR_INVALID_ARG_TYPE",(function(i,l){return`The "${i}" argument must be of type number. Received type ${typeof l}`}),TypeError),Sn("ERR_OUT_OF_RANGE",(function(i,l,C){let ne=`The value of "${i}" is out of range.`,se=C;return Number.isInteger(C)&&Math.abs(C)>4294967296?se=ve(String(C)):typeof C=="bigint"&&(se=String(C),(C>BigInt(2)**BigInt(32)||C<-(BigInt(2)**BigInt(32)))&&(se=ve(se)),se+="n"),ne+=` It must be ${l}. Received ${se}`,ne}),RangeError);const Ye=/[^+/0-9A-Za-z-_]/g;function Y(i,l){let C;l=l||1/0;const ne=i.length;let se=null;const Oe=[];for(let rt=0;rt<ne;++rt){if(C=i.charCodeAt(rt),C>55295&&C<57344){if(!se){if(C>56319){(l-=3)>-1&&Oe.push(239,191,189);continue}if(rt+1===ne){(l-=3)>-1&&Oe.push(239,191,189);continue}
vendor: 4,330 bytes, line 1
1se=C;continue}if(C<56320){(l-=3)>-1&&Oe.push(239,191,189),se=C;continue}C=65536+(se-55296<<10|C-56320)}else se&&(l-=3)>-1&&Oe.push(239,191,189);if(se=null,C<128){if((l-=1)<0)break;Oe.push(C)}else if(C<2048){if((l-=2)<0)break;Oe.push(C>>6|192,63&C|128)}else if(C<65536){if((l-=3)<0)break;Oe.push(C>>12|224,C>>6&63|128,63&C|128)}else{if(!(C<1114112))throw new Error("Invalid code point");if((l-=4)<0)break;Oe.push(C>>18|240,C>>12&63|128,C>>6&63|128,63&C|128)}}return Oe}function k(i){return L.toByteArray((function(l){if((l=(l=l.split("=")[0]).trim().replace(Ye,"")).length<2)return"";for(;l.length%4!=0;)l+="=";return l})(i))}function De(i,l,C,ne){let se;for(se=0;se<ne&&!(se+C>=l.length||se>=i.length);++se)l[se+C]=i[se];return se}function j(i,l){return i instanceof l||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===l.name}function We(i){return i!=i}const st=(function(){const i="0123456789abcdef",l=new Array(256);for(let C=0;C<16;++C){const ne=16*C;for(let se=0;se<16;++se)l[ne+se]=i[C]+i[se]}return l})();function Te(i){return typeof BigInt>"u"?Le:i}function Le(){throw new Error("BigInt not supported")}},6877:function(vt,pe){var P={parseBuffer:function(o){return new L(o).parse()},addBoxProcessor:function(o,p){typeof o=="string"&&typeof p=="function"&&(d.prototype._boxProcessors[o]=p)},createFile:function(){return new L},createBox:function(o,p,T){var y=d.create(o);return p&&p.append(y,T),y},createFullBox:function(o,p,T){var y=P.createBox(o,p,T);return y.version=0,y.flags=0,y},Utils:{}};P.Utils.dataViewToString=function(o,p){var T=p||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(T).decode(o);var y=[],w=0;if(T==="utf-8")for(;w<o.byteLength;){var h=o.getUint8(w++);h<128||(h<224?(h=(31&h)<<6,h|=63&o.getUint8(w++)):h<240?(h=(15&h)<<12,h|=(63&o.getUint8(w++))<<6,h|=63&o.getUint8(w++)):(h=(7&h)<<18,h|=(63&o.getUint8(w++))<<12,h|=(63&o.getUint8(w++))<<6,h|=63&o.getUint8(w++))),y.push(String.fromCharCode(h))}else for(;w<o.byteLength;)y.push(String.fromCharCode(o.getUint8(w++)));return y.join("")},P.Utils.utf8ToByteArray=function(o){var p,T;if(typeof TextEncoder<"u")p=new TextEncoder().encode(o);else for(p=[],T=0;T<o.length;++T){var y=o.charCodeAt(T);y<128?p.push(y):y<2048?(p.push(192|y>>6),p.push(128|63&y)):y<65536?(p.push(224|y>>12),p.push(128|63&y>>6),p.push(128|63&y)):(p.push(240|y>>18),p.push(128|63&y>>12),p.push(128|63&y>>6),p.push(128|63&y))}return p},P.Utils.appendBox=function(o,p,T){if(p._offset=o._cursor.offset,p._root=o._root?o._root:o,p._raw=o._raw,p._parent=o,T!==-1)if(T!=null){var y,w=-1;if(typeof T=="number")w=T;else{if(typeof T=="string")y=T;else{if(typeof T!="object"||!T.type)return void o.boxes.push(p);y=T.type}for(var h=0;h<o.boxes.length;h++)if(y===o.boxes[h].type){w=h+1;break}}o.boxes.splice(w,0,p)}else o.boxes.push(p)},pe.parseBuffer=P.parseBuffer,pe.addBoxProcessor=P.addBoxProcessor,pe.createFile=P.createFile,pe.createBox=P.createBox,pe.createFullBox=P.createFullBox,pe.Utils=P.Utils,P.Cursor=function(o){this.offset=o===void 0?0:o};var L=function(o){this._cursor=new P.Cursor,this.boxes=[],o&&(this._raw=new DataView(o))};L.prototype.fetch=function(o){var p=this.fetchAll(o,!0);return p.length?p[0]:null},L.prototype.fetchAll=function(o,p){var T=[];return L._sweep.call(this,o,T,p),T},L.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var o=d.parse(this);if(o.type===void 0)break;this.boxes.push(o)}return this},L._sweep=function(o,p,T){for(var y in this.type&&this.type==o&&p.push(this),this.boxes){if(p.length&&T)return;L._sweep.call(this.boxes[y],o,p,T)}},L.prototype.write=function(){var o,p=0;for(o=0;o<this.boxes.length;o++)p+=this.boxes[o].getLength(!1);var T=new Uint8Array(p);for(this._rawo=new DataView(T.buffer),this.bytes=T,this._cursor.offset=0,o=0;o<this.boxes.length;o++)this.boxes[o].write();return T.buffer},L.prototype.append=function(o,p){P.Utils.appendBox(this,o,p)};var d=function(){this._cursor=new P.Cursor};d.parse=function(o){var p=new d;return p._offset=o._cursor.offset,p._root=o._root?o._root:o,p._raw=o._raw,p._parent=o,p._parseBox(),o._cursor.offset=p._raw.byteOffset+p._raw.byteLength,p},d.create=function(o){var p=new d;return p.type=o,p.boxes=[],p},d.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","
1stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],d.prototype._boxProcessors={},d.prototype._procField=function(o,p,T){this._parsing?this[o]=this._readField(p,T):this._writeField(p,T,this[o])},d.prototype._procFieldArray=function(o,p,T,y){var w;if(this._parsing)for(this[o]=[],w=0;w<p;w++)this[o][w]=this._readField(T,y);else for(w=0;w<this[o].length;w++)this._writeField(T,y,this[o][w])},d.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},d.prototype._procEntries=function(o,p,T){var y;if(this._parsing)for(this[o]=[],y=0;y<p;y++)this[o].push({}),T.call(this,this[o][y]);else for(y=0;y<p;y++)T.call(this,this[o][y])},d.prototype._procSubEntries=function(o,p,T,y){var w;if(this._parsing)for(o[p]=[],w=0;w<T;w++)o[p].push({}),y.call(this,o[p][w]);else for(w=0;w<T;w++)y.call(this,o[p][w])},d.prototype._procEntryField=function(o,p,T,y){this._parsing?o[p]=this._readField(T,y):this._writeField(T,y,o[p])},d.prototype._procSubBoxes=function(o,p){var T;if(this._parsing)for(this[o]=[],T=0;T<p;T++)this[o].push(d.parse(this));else for(T=0;T<p;T++)this._rawo?this[o][T].write():this.size+=this[o][T].getLength()},d.prototype._readField=function(o,p){switch(o){case"uint":return this._readUint(p);case"int":return this._readInt(p);case"template":return this._readTemplate(p);case"string":return p===-1?this._readTerminatedString():this._readString(p);case"data":return this._readData(p);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},d.prototype._readInt=function(o){var p=null,T=this._cursor.offset-this._raw.byteOffset;switch(o){case 8:p=this._raw.getInt8(T);break;case 16:p=this._raw.getInt16(T);break;case 32:p=this._raw.getInt32(T);break;case 64:var y=this._raw.getInt32(T),w=this._raw.getInt32(T+4);p=y*Math.pow(2,32)+w}return this._cursor.offset+=o>>3,p},d.prototype._readUint=function(o){var p,T,y=null,w=this._cursor.offset-this._raw.byteOffset;switch(o){case 8:y=this._raw.getUint8(w);break;case 16:y=this._raw.getUint16(w);break;case 24:y=((p=this._raw.getUint16(w))<<8)+(T=this._raw.getUint8(w+2));break;case 32:y=this._raw.getUint32(w);break;case 64:p=this._raw.getUint32(w),T=this._raw.getUint32(w+4),y=p*Math.pow(2,32)+T}return this._cursor.offset+=o>>3,y},d.prototype._readString=function(o){for(var p="",T=0;T<o;T++){var y=this._readUint(8);p+=String.fromCharCode(y)}return p},d.prototype._readTemplate=function(o){return this._readUint(o/2)+this._readUint(o/2)/Math.pow(2,o/2)},d.prototype._readTerminatedString=function(){for(var o="";this._cursor.offset-this._offset<this._raw.byteLength;){var p=this._readUint(8);if(p===0)break;o+=String.fromCharCode(p)}return o},d.prototype._readData=function(o){var p=o>0?o:this._raw.byteLength-(this._cursor.offset-this._offset);if(p>0){var T=new Uint8Array(this._raw.buffer,this._cursor.offset,p);return this._cursor.offset+=p,T}return null},d.prototype._readUTF8String=function(){var o=this._raw.byteLength-(this._cursor.offset-this._offset),p=null;return o>0&&(p=new DataView(this._raw.buffer,this._cursor.offset,o),this._cursor.offset+=o),p&&P.Utils.dataViewToString(p)},d.prototype._readUTF8TerminatedString=function(){var o=this._raw.byteLength-(this._cursor.offset-this._offset),p=null;if(o>0){var T;for(p=new DataView(this._raw.buffer,this._cursor.offset,o),T=0;T<o&&p.getUint8(T)!==0;T++);p=new DataView(this._raw.buffer,this._cursor.offset,T),this._cursor.offset+=Math.min(T+1,o)}return p&&P.Utils.dataViewToString(p)},d.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{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);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())}},d.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},d.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(d.parse(this))},d.prototype.append=function(o,p){P.Utils.appendBox(this,o,p)},d.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},d.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},d.prototype._writeInt=function(o,p){if(this._rawo){var T=this._cursor.offset-this._rawo.byteOffset;switch(o){case 8:this._rawo.setInt8(T,p);break;case 16:this._rawo.setInt16(T,p);break;case 32:this._rawo.setInt32(T,p);break;case 64:var y=Math.floor(p/Math.pow(2,32)),w=p-y*Math.pow(2,32);this._rawo.setUint32(T,y),this._rawo.setUint32(T+4,w)}this._cursor.offset+=o>>3}else this.size+=o>>3},d.prototype._writeUint=function(o,p){if(this._rawo){var T,y,w=this._cursor.offset-this._rawo.byteOffset;switch(o){case 8:this._rawo.setUint8(w,p);break;case 16:this._rawo.setUint16(w,p);break;case 24:T=(16776960&p)>>8,y=255&p,this._rawo.setUint16(w,T),this._rawo.setUint8(w+2,y);break;case 32:this._rawo.setUint32(w,p);break;case 64:y=p-(T=Math.floor(p/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(w,T),this._rawo.setUint32(w+4,y)}this._cursor.offset+=o>>3}else this.size+=o>>3},d.prototype._writeString=function(o,p){for(var T=0;T<o;T++)this._writeUint(8,p.charCodeAt(T))}
vendor: 10,168 bytes, line 1
1,d.prototype._writeTerminatedString=function(o){if(o.length!==0){for(var p=0;p<o.length;p++)this._writeUint(8,o.charCodeAt(p));this._writeUint(8,0)}},d.prototype._writeTemplate=function(o,p){var T=Math.floor(p),y=(p-T)*Math.pow(2,o/2);this._writeUint(o/2,T),this._writeUint(o/2,y)},d.prototype._writeData=function(o){if(o)if(this._rawo){if(o instanceof Array){for(var p=this._cursor.offset-this._rawo.byteOffset,T=0;T<o.length;T++)this._rawo.setInt8(p+T,o[T]);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},d.prototype._writeUTF8String=function(o){var p=P.Utils.utf8ToByteArray(o);if(this._rawo)for(var T=new DataView(this._rawo.buffer,this._cursor.offset,p.length),y=0;y<p.length;y++)T.setUint8(y,p[y]);else this.size+=p.length},d.prototype._writeField=function(o,p,T){switch(o){case"uint":this._writeUint(p,T);break;case"int":this._writeInt(p,T);break;case"template":this._writeTemplate(p,T);break;case"string":p==-1?this._writeTerminatedString(T):this._writeString(p,T);break;case"data":this._writeData(T);break;case"utf8":this._writeUTF8String(T)}},d.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},d.prototype._boxProcessors.avc1=d.prototype._boxProcessors.avc2=d.prototype._boxProcessors.avc3=d.prototype._boxProcessors.avc4=d.prototype._boxProcessors.hvc1=d.prototype._boxProcessors.hev1=d.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)},d.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(o){this._procEntryField(o,"sample_count","uint",32),this._procEntryField(o,"sample_offset",this.version===1?"int":"uint",32)}))},d.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},d.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},d.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)}))},d.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)},d.prototype._boxProcessors.free=d.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},d.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},d.prototype._boxProcessors.ftyp=d.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)},d.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)},d.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},d.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},d.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},d.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},d.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(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},d.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},d.prototype._boxProcessors.meta=function(){this._procFullBox()},d.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},d.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},d.prototype._boxProcessors.mp4a=d.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)},d.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)},d.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},d.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",this.version==1?64:32)},d.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,(function(o){this._procEntryField(o,"entity_id","uint",32)})),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},d.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},d.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},d.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)},d.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=(1&o.reference_type)<<31,o.reference|=2147483647&o.referenced_size,o.sap=(1&o.starts_with_SAP)<<31,o.sap|=(3&o.SAP_type)<<28,o.sap|=268435455&o.SAP_delta_time),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=2147483647&o.reference,o.starts_with_SAP=o.sap>>31&1,o.SAP_type=o.sap>>28&7,o.SAP_delta_time=268435455&o.sap)}))},d.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},d.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(p){this._procEntryField(p,"level","uint",8),this._procEntryField(p,"range_size","uint",24)}))}))},d.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entr
1ies",this.entry_count)},d.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},d.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(o){this._procEntryField(o,"sample_count","uint",32),this._procEntryField(o,"sample_delta","uint",32)}))},d.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(p){this._procEntryField(p,"subsample_size","uint",this.version===1?32:16),this._procEntryField(p,"subsample_priority","uint",8),this._procEntryField(p,"discardable","uint",8),this._procEntryField(p,"codec_specific_parameters","uint",32)}))}))},d.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)},d.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},d.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},d.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),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",8*(this.length_size_of_traf_num+1)),this._procEntryField(o,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(o,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},d.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)},d.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)},d.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(o){256&this.flags&&this._procEntryField(o,"sample_duration","uint",32),512&this.flags&&this._procEntryField(o,"sample_size","uint",32),1024&this.flags&&this._procEntryField(o,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(o,"sample_composition_time_offset",this.version===1?"int":"uint",32)}))},d.prototype._boxProcessors["url "]=d.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},d.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},d.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},d.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},d.prototype._boxProcessors.vtte=function(){}},9826:function(vt){var pe,P=typeof Reflect=="object"?Reflect:null,L=P&&typeof P.apply=="function"?P.apply:function(ge,Ne,fe){return Function.prototype.apply.call(ge,Ne,fe)};pe=P&&typeof P.ownKeys=="function"?P.ownKeys:Object.getOwnPropertySymbols?function(ge){return Object.getOwnPropertyNames(ge).concat(Object.getOwnPropertySymbols(ge))}:function(ge){return Object.getOwnPropertyNames(ge)};var d=Number.isNaN||function(ge){return ge!=ge};function o(){o.init.call(this)}vt.exports=o,vt.exports.once=function(ge,Ne){return new Promise((function(fe,Me){function Fe(ke){ge.removeListener(Ne,ot),Me(ke)}function ot(){typeof ge.removeListener=="function"&&ge.removeListener("error",Fe),fe([].slice.call(arguments))}ue(ge,Ne,ot,{once:!0}),Ne!=="error"&&(function(ke,Q){typeof ke.on=="function"&&ue(ke,"error",Q,{once:!0})})(ge,Fe)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var p=10;function T(ge){if(typeof ge!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ge)}function y(ge){return ge._maxListeners===void 0?o.defaultMaxListeners:ge._maxListeners}function w(ge,Ne,fe,Me){var Fe,ot,ke,Q;if(T(fe),(ot=ge._events)===void 0?(ot=ge._events=Object.create(null),ge._eventsCount=0):(ot.newListener!==void 0&&(ge.emit("newListener",Ne,fe.listener?fe.listener:fe),ot=ge._events),ke=ot[Ne]),ke===void 0)ke=ot[Ne]=fe,++ge._eventsCount;else if(typeof ke=="function"?ke=ot[Ne]=Me?[fe,ke]:[ke,fe]:Me?ke.unshift(fe):ke.push(fe),(Fe=y(ge))>0&&ke.length>Fe&&!ke.warned){ke.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+ke.length+" "+String(Ne)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=ge,X.type=Ne,X.count=ke.length,Q=X,console&&console.warn&&console.warn(Q)}return ge}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(ge,Ne,fe){var Me={fired:!1,wrapFn:void 0,target:ge,type:Ne,listener:fe},Fe=h.bind(Me);return Fe.listener=fe,Me.wrapFn=Fe,Fe}function r(ge,Ne,fe){var Me=ge._events;if(Me===void 0)return[];var Fe=Me[Ne];return Fe===void 0?[]:typeof Fe=="function"?fe?[Fe.listener||Fe]:[Fe]:fe?(function(ot){for(var ke=new Array(ot.length),Q=0;Q<ke.length;++Q)ke[Q]=ot[Q].listener||ot[Q];return ke})(Fe):G(Fe,Fe.length)}function H(ge){var Ne=this._events;if(Ne!==void 0){var fe=Ne[ge];if(typeof fe=="function")return 1;if(fe!==void 0)return fe.length}return 0}function G(ge,Ne){for(var fe=new Array(Ne),Me=0;Me<Ne;++Me)fe[Me]=ge[Me];return fe}function ue(ge,Ne,fe,Me){if(typeof ge.on=="function")Me.once?ge.once(Ne,fe):ge.on(Ne,fe);else{if(typeof ge.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ge);ge.addEventListener(Ne,(function Fe(ot){Me.once&&ge.removeEventListener(Ne,Fe),fe(ot)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return p},set:function(ge){if(typeof ge!="number"||ge<0||d(ge))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ge+".");p=ge}}),o.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(ge){if(typeof ge!="number"||ge<0||d(ge))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ge+".");return this._maxListeners=ge,this},o.prototype.getMaxListeners=function(){return y(this)},o.prototype.emit=function(ge){for(var Ne=[],fe=1;fe<arguments.length;fe++)Ne.push(arguments[fe]);var Me=ge==="error",Fe=this._events;if(Fe!==void 0)Me=Me&&Fe.error===void 0;else if(!Me)return!1;if(Me){var ot;if(Ne.length>0&&(ot=Ne[0]),ot instanceof Error)throw ot;var ke=new Error("Unhandled error."+(ot?" ("+ot.message+")":""));throw ke.context=ot,ke}var Q=Fe[ge];if(Q===void 0)return!1;if(typeof Q=="function")L(Q,this,Ne);else{var X=Q.length,Se=G(Q,X);for(fe=0;fe<X;++fe)L(Se[fe],this,Ne)}return!0},o.prototype.addListener=function(ge,Ne){return w(this,ge,Ne,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(ge,Ne){return w(this,ge,Ne,!0)},o.prototype.once=function(ge,Ne){return T(Ne),this.on(ge,m(this,ge,Ne)),this},o.prototype.prependOnceListener=function(ge,Ne){return T(Ne),this.prependListener(ge,m(this,ge,Ne)),this},o.prototype.removeListener=function(ge,Ne){var fe,Me,Fe,ot,ke;if(T(Ne),(Me=this._events)===void 0)return this;if((fe=Me[ge])===void 0)return this;if(fe===Ne||fe.listener===Ne)--this._eventsCount==0?this._events=Object.create(null):(delete Me[ge],Me.removeListener&&this.emit
1("removeListener",ge,fe.listener||Ne));else if(typeof fe!="function"){for(Fe=-1,ot=fe.length-1;ot>=0;ot--)if(fe[ot]===Ne||fe[ot].listener===Ne){ke=fe[ot].listener,Fe=ot;break}if(Fe<0)return this;Fe===0?fe.shift():(function(Q,X){for(;X+1<Q.length;X++)Q[X]=Q[X+1];Q.pop()})(fe,Fe),fe.length===1&&(Me[ge]=fe[0]),Me.removeListener!==void 0&&this.emit("removeListener",ge,ke||Ne)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(ge){var Ne,fe,Me;if((fe=this._events)===void 0)return this;if(fe.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):fe[ge]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete fe[ge]),this;if(arguments.length===0){var Fe,ot=Object.keys(fe);for(Me=0;Me<ot.length;++Me)(Fe=ot[Me])!=="removeListener"&&this.removeAllListeners(Fe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(Ne=fe[ge])=="function")this.removeListener(ge,Ne);else if(Ne!==void 0)for(Me=Ne.length-1;Me>=0;Me--)this.removeListener(ge,Ne[Me]);return this},o.prototype.listeners=function(ge){return r(this,ge,!0)},o.prototype.rawListeners=function(ge){return r(this,ge,!1)},o.listenerCount=function(ge,Ne){return typeof ge.listenerCount=="function"?ge.listenerCount(Ne):H.call(ge,Ne)},o.prototype.listenerCount=H,o.prototype.eventNames=function(){return this._eventsCount>0?pe(this._events):[]}},7316:function(vt){vt.exports=function pe(P,L){if(P===L)return!0;if(P&&L&&typeof P=="object"&&typeof L=="object"){if(P.constructor!==L.constructor)return!1;var d,o,p;if(Array.isArray(P)){if((d=P.length)!=L.length)return!1;for(o=d;o--!=0;)if(!pe(P[o],L[o]))return!1;return!0}if(P.constructor===RegExp)return P.source===L.source&&P.flags===L.flags;if(P.valueOf!==Object.prototype.valueOf)return P.valueOf()===L.valueOf();if(P.toString!==Object.prototype.toString)return P.toString()===L.toString();if((d=(p=Object.keys(P)).length)!==Object.keys(L).length)return!1;for(o=d;o--!=0;)if(!Object.prototype.hasOwnProperty.call(L,p[o]))return!1;for(o=d;o--!=0;){var T=p[o];if(!pe(P[T],L[T]))return!1}return!0}return P!=P&&L!=L}},7986:function(vt,pe){pe.read=function(P,L,d,o,p){var T,y,w=8*p-o-1,h=(1<<w)-1,m=h>>1,r=-7,H=d?p-1:0,G=d?-1:1,ue=P[L+H];for(H+=G,T=ue&(1<<-r)-1,ue>>=-r,r+=w;r>0;T=256*T+P[L+H],H+=G,r-=8);for(y=T&(1<<-r)-1,T>>=-r,r+=o;r>0;y=256*y+P[L+H],H+=G,r-=8);if(T===0)T=1-m;else{if(T===h)return y?NaN:1/0*(ue?-1:1);y+=Math.pow(2,o),T-=m}return(ue?-1:1)*y*Math.pow(2,T-o)},pe.write=function(P,L,d,o,p,T){var y,w,h,m=8*T-p-1,r=(1<<m)-1,H=r>>1,G=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,ue=o?0:T-1,ge=o?1:-1,Ne=L<0||L===0&&1/L<0?1:0;for(L=Math.abs(L),isNaN(L)||L===1/0?(w=isNaN(L)?1:0,y=r):(y=Math.floor(Math.log(L)/Math.LN2),L*(h=Math.pow(2,-y))<1&&(y--,h*=2),(L+=y+H>=1?G/h:G*Math.pow(2,1-H))*h>=2&&(y++,h/=2),y+H>=r?(w=0,y=r):y+H>=1?(w=(L*h-1)*Math.pow(2,p),y+=H):(w=L*Math.pow(2,H-1)*Math.pow(2,p),y=0));p>=8;P[d+ue]=255&w,ue+=ge,w/=256,p-=8);for(y=y<<p|w,m+=p;m>0;P[d+ue]=255&y,ue+=ge,y/=256,m-=8);P[d+ue-ge]|=128*Ne}},5474:function(vt,pe,P){(function(L){L.parser=function(Y,k){return new p(Y,k)},L.SAXParser=p,L.SAXStream=y,L.createStream=function(Y,k){return new y(Y,k)},L.MAX_BUFFER_LENGTH=65536;var d,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function p(Y,k){if(!(this instanceof p))return new p(Y,k);var De=this;(function(j){for(var We=0,st=o.length;We<st;We++)j[o[We]]=""})(De),De.q=De.c="",De.bufferCheckPosition=L.MAX_BUFFER_LENGTH,De.opt=k||{},De.opt.lowercase=De.opt.lowercase||De.opt.lowercasetags,De.looseCase=De.opt.lowercase?"toLowerCase":"toUpperCase",De.tags=[],De.closed=De.closedRoot=De.sawRoot=!1,De.tag=De.error=null,De.strict=!!Y,De.noscript=!(!Y&&!De.opt.noscript),De.state=Ee.BEGIN,De.strictEntities=De.opt.strictEntities,De.ENTITIES=De.strictEntities?Object.create(L.XML_ENTITIES):Object.create(L.ENTITIES),De.attribList=[],De.opt.xmlns&&(De.ns=Object.create(fe)),De.trackPosition=De.opt.position!==!1,De.trackPosition&&(De.position=De.line=De.column=0),He(De,"onready")}L.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(Y){function k(){}return k.prototype=Y,new k}),Object.keys||(Object.keys=function(Y){var k=[];for(var De in Y)Y.hasOwnProperty(De)&&k.push(De);return k}),p.prototype={end:function(){xt(this)},write:function(Y){var k=this;if(this.error)throw this.error;if(k.closed)return Pt(k,"Cannot write after close. Assign an onready handler.");if(Y===null)return xt(k);typeof Y=="object"&&(Y=Y.toString());for(var De=0,j="";j=Ye(Y,De++),k.c=j,j;)switch(k.trackPosition&&(k.position++,j===` 2`?(k.line++,k.column=0):k.column++),k.state){case Ee.BEGIN:if(k.state=Ee.BEGIN_WHITESPACE,j==="\uFEFF")continue;_t(k,j);continue;case Ee.BEGIN_WHITESPACE:_t(k,j);continue;case Ee.TEXT:if(k.sawRoot&&!k.closedRoot){for(var We=De-1;j&&j!=="<"&&j!=="&";)(j=Ye(Y,De++))&&k.trackPosition&&(k.position++,j===` 3`?(k.line++,k.column=0):k.column++);k.textNode+=Y.substring(We,De-1)}j!=="<"||k.sawRoot&&k.closedRoot&&!k.strict?(!Se(w,j)||k.sawRoot&&!k.closedRoot||Lt(k,"Text data outside of root node."),j==="&"?k.state=Ee.TEXT_ENTITY:k.textNode+=j):(k.state=Ee.OPEN_WAKA,k.startTagPosition=k.position);continue;case Ee.SCRIPT:j==="<"?k.state=Ee.SCRIPT_ENDING:k.script+=j;continue;case Ee.SCRIPT_ENDING:j==="/"?k.state=Ee.CLOSE_TAG:(k.script+="<"+j,k.state=Ee.SCRIPT);continue;case Ee.OPEN_WAKA:if(j==="!")k.state=Ee.SGML_DECL,k.sgmlDecl="";else if(!X(w,j))if(X(Me,j))k.state=Ee.OPEN_TAG,k.tagName=j;else if(j==="/")k.state=Ee.CLOSE_TAG,k.tagName="";else if(j==="?")k.state=Ee.PROC_INST,k.procInstName=k.procInstBody="";else{if(Lt(k,"Unencoded <"),k.startTagPosition+1<k.position){var st=k.position-k.startTagPosition;j=new Array(st).join(" ")+j}k.textNode+="<"+j,k.state=Ee.TEXT}continue;case Ee.SGML_DECL:(k.sgmlDecl+j).toUpperCase()===G?(Pe(k,"onopencdata"),k.state=Ee.CDATA,k.sgmlDecl="",k.cdata=""):k.sgmlDecl+j==="--"?(k.state=Ee.COMMENT,k.comment="",k.sgmlDecl=""):(k.sgmlDecl+j).toUpperCase()===ue?(k.state=Ee.DOCTYPE,(k.doctype||k.sawRoot)&&Lt(k,"Inappropriately located doctype declaration"),k.doctype="",k.sgmlDecl=""):j===">"?(Pe(k,"onsgmldeclaration",k.sgmlDecl),k.sgmlDecl="",k.state=Ee.TEXT):(X(r,j)&&(k.state=Ee.SGML_DECL_QUOTED),k.sgmlDecl+=j);continue;case Ee.SGML_DECL_QUOTED:j===k.q&&(k.state=Ee.SGML_DECL,k.q=""),k.sgmlDecl+=j;continue;case Ee.DOCTYPE:j===">"?(k.state=Ee.TEXT,Pe(k,"ondoctype",k.doctype),k.doctype=!0):(k.doctype+=j,j==="["?k.state=Ee.DOCTYPE_DTD:X(r,j)&&(k.state=Ee.DOCTYPE_QUOTED,k.q=j));continue;case Ee.DOCTYPE_QUOTED:k.doctype+=j,j===k.q&&(k.q="",k.state=Ee.DOCTYPE);continue;case Ee.DOCTYPE_DTD:k.doctype+=j,j==="]"?k.state=Ee.DOCTYPE:X(r,j)&&(k.state=Ee.DOCTYPE_DTD_QUOTED,k.q=j);continue;case Ee.DOCTYPE_DTD_QUOTED:k.doctype+=j,j===k.q&&(k.state=Ee.DOCTYPE_DTD,k.q="");continue;case Ee.COMMENT:j==="-"?k.state=Ee.COMMENT_ENDING:k.comment+=j;continue;
vendor: 5,243 bytes, line 3
3case Ee.COMMENT_ENDING:j==="-"?(k.state=Ee.COMMENT_ENDED,k.comment=Et(k.opt,k.comment),k.comment&&Pe(k,"oncomment",k.comment),k.comment=""):(k.comment+="-"+j,k.state=Ee.COMMENT);continue;case Ee.COMMENT_ENDED:j!==">"?(Lt(k,"Malformed comment"),k.comment+="--"+j,k.state=Ee.COMMENT):k.state=Ee.TEXT;continue;case Ee.CDATA:j==="]"?k.state=Ee.CDATA_ENDING:k.cdata+=j;continue;case Ee.CDATA_ENDING:j==="]"?k.state=Ee.CDATA_ENDING_2:(k.cdata+="]"+j,k.state=Ee.CDATA);continue;case Ee.CDATA_ENDING_2:j===">"?(k.cdata&&Pe(k,"oncdata",k.cdata),Pe(k,"onclosecdata"),k.cdata="",k.state=Ee.TEXT):j==="]"?k.cdata+="]":(k.cdata+="]]"+j,k.state=Ee.CDATA);continue;case Ee.PROC_INST:j==="?"?k.state=Ee.PROC_INST_ENDING:X(w,j)?k.state=Ee.PROC_INST_BODY:k.procInstName+=j;continue;case Ee.PROC_INST_BODY:if(!k.procInstBody&&X(w,j))continue;j==="?"?k.state=Ee.PROC_INST_ENDING:k.procInstBody+=j;continue;case Ee.PROC_INST_ENDING:j===">"?(Pe(k,"onprocessinginstruction",{name:k.procInstName,body:k.procInstBody}),k.procInstName=k.procInstBody="",k.state=Ee.TEXT):(k.procInstBody+="?"+j,k.state=Ee.PROC_INST_BODY);continue;case Ee.OPEN_TAG:X(Fe,j)?k.tagName+=j:(sn(k),j===">"?ve(k):j==="/"?k.state=Ee.OPEN_TAG_SLASH:(Se(w,j)&&Lt(k,"Invalid character in tag name"),k.state=Ee.ATTRIB));continue;case Ee.OPEN_TAG_SLASH:j===">"?(ve(k,!0),Ie(k)):(Lt(k,"Forward-slash in opening tag not followed by >"),k.state=Ee.ATTRIB);continue;case Ee.ATTRIB:if(X(w,j))continue;j===">"?ve(k):j==="/"?k.state=Ee.OPEN_TAG_SLASH:X(Me,j)?(k.attribName=j,k.attribValue="",k.state=Ee.ATTRIB_NAME):Lt(k,"Invalid attribute name");continue;case Ee.ATTRIB_NAME:j==="="?k.state=Ee.ATTRIB_VALUE:j===">"?(Lt(k,"Attribute without value"),k.attribValue=k.attribName,Sn(k),ve(k)):X(w,j)?k.state=Ee.ATTRIB_NAME_SAW_WHITE:X(Fe,j)?k.attribName+=j:Lt(k,"Invalid attribute name");continue;case Ee.ATTRIB_NAME_SAW_WHITE:if(j==="=")k.state=Ee.ATTRIB_VALUE;else{if(X(w,j))continue;Lt(k,"Attribute without value"),k.tag.attributes[k.attribName]="",k.attribValue="",Pe(k,"onattribute",{name:k.attribName,value:""}),k.attribName="",j===">"?ve(k):X(Me,j)?(k.attribName=j,k.state=Ee.ATTRIB_NAME):(Lt(k,"Invalid attribute name"),k.state=Ee.ATTRIB)}continue;case Ee.ATTRIB_VALUE:if(X(w,j))continue;X(r,j)?(k.q=j,k.state=Ee.ATTRIB_VALUE_QUOTED):(Lt(k,"Unquoted attribute value"),k.state=Ee.ATTRIB_VALUE_UNQUOTED,k.attribValue=j);continue;case Ee.ATTRIB_VALUE_QUOTED:if(j!==k.q){j==="&"?k.state=Ee.ATTRIB_VALUE_ENTITY_Q:k.attribValue+=j;continue}Sn(k),k.q="",k.state=Ee.ATTRIB_VALUE_CLOSED;continue;case Ee.ATTRIB_VALUE_CLOSED:X(w,j)?k.state=Ee.ATTRIB:j===">"?ve(k):j==="/"?k.state=Ee.OPEN_TAG_SLASH:X(Me,j)?(Lt(k,"No whitespace between attributes"),k.attribName=j,k.attribValue="",k.state=Ee.ATTRIB_NAME):Lt(k,"Invalid attribute name");continue;case Ee.ATTRIB_VALUE_UNQUOTED:if(Se(H,j)){j==="&"?k.state=Ee.ATTRIB_VALUE_ENTITY_U:k.attribValue+=j;continue}Sn(k),j===">"?ve(k):k.state=Ee.ATTRIB;continue;case Ee.CLOSE_TAG:if(k.tagName)j===">"?Ie(k):X(Fe,j)?k.tagName+=j:k.script?(k.script+="</"+k.tagName,k.tagName="",k.state=Ee.SCRIPT):(Se(w,j)&&Lt(k,"Invalid tagname in closing tag"),k.state=Ee.CLOSE_TAG_SAW_WHITE);else{if(X(w,j))continue;Se(Me,j)?k.script?(k.script+="</"+j,k.state=Ee.SCRIPT):Lt(k,"Invalid tagname in closing tag."):k.tagName=j}continue;case Ee.CLOSE_TAG_SAW_WHITE:if(X(w,j))continue;j===">"?Ie(k):Lt(k,"Invalid characters in closing tag");continue;case Ee.TEXT_ENTITY:case Ee.ATTRIB_VALUE_ENTITY_Q:case Ee.ATTRIB_VALUE_ENTITY_U:var Te,Le;switch(k.state){case Ee.TEXT_ENTITY:Te=Ee.TEXT,Le="textNode";break;case Ee.ATTRIB_VALUE_ENTITY_Q:Te=Ee.ATTRIB_VALUE_QUOTED,Le="attribValue";break;case Ee.ATTRIB_VALUE_ENTITY_U:Te=Ee.ATTRIB_VALUE_UNQUOTED,Le="attribValue"}j===";"?(k[Le]+=pt(k),k.entity="",k.state=Te):X(k.entity.length?ke:ot,j)?k.entity+=j:(Lt(k,"Invalid character in entity name"),k[Le]+="&"+k.entity+j,k.entity="",k.state=Te);continue;default:throw new Error(k,"Unknown state: "+k.state)}return k.position>=k.bufferCheckPosition&&(function(i){for(var l=Math.max(L.MAX_BUFFER_LENGTH,10),C=0,ne=0,se=o.length;ne<se;ne++){var Oe=i[o[ne]].length;if(Oe>l)switch(o[ne]){case"textNode":Ke(i);break;case"cdata":Pe(i,"oncdata",i.cdata),i.cdata="";break;case"script":Pe(i,"onscript",i.script),i.script="";break;default:Pt(i,"Max buffer length exceeded: "+o[ne])}C=Math.max(C,Oe)}var rt=L.MAX_BUFFER_LENGTH-C;i.bufferCheckPosition=rt+i.position})(k),k},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var Y;Ke(Y=this),Y.cdata!==""&&(Pe(Y,"oncdata",Y.cdata),Y.cdata=""),Y.script!==""&&(Pe(Y,"onscript",Y.script),Y.script="")}};try{d=P(3515).Stream}catch{d=function(){}}var T=L.EVENTS.filter((function(Y){return Y!=="error"&&Y!=="end"}));function y(Y,k){if(!(this instanceof y))return new y(Y,k);d.apply(this),this._parser=new p(Y,k),this.writable=!0,this.readable=!0;var De=this;this._parser.onend=function(){De.emit("end")},this._parser.onerror=function(j){De.emit("error",j),De._parser.error=null},this._decoder=null,T.forEach((function(j){Object.defineProperty(De,"on"+j,{get:function(){return De._parser["on"+j]},set:function(We){if(!We)return De.removeAllListeners(j),De._parser["on"+j]=We,We;De.on(j,We)},enumerable:!0,configurable:!1})}
3))}y.prototype=Object.create(d.prototype,{constructor:{value:y}}),y.prototype.write=function(Y){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(Y)){if(!this._decoder){var k=P(748).StringDecoder;this._decoder=new k("utf8")}Y=this._decoder.write(Y)}return this._parser.write(Y.toString()),this.emit("data",Y),!0},y.prototype.end=function(Y){return Y&&Y.length&&this.write(Y),this._parser.end(),!0},y.prototype.on=function(Y,k){var De=this;return De._parser["on"+Y]||T.indexOf(Y)===-1||(De._parser["on"+Y]=function(){var j=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);j.splice(0,0,Y),De.emit.apply(De,j)}),d.prototype.on.call(De,Y,k)};var w=`\r 4 `,h="0124356789",m="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=`'"`,H=w+">",G="[CDATA[",ue="DOCTYPE",ge="http://www.w3.org/XML/1998/namespace",Ne="http://www.w3.org/2000/xmlns/",fe={xml:ge,xmlns:Ne};w=Q(w),h=Q(h),m=Q(m);var Me=/[:_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]/,Fe=/[:_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-]/,ot=/[#:_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]/,ke=/[#:_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-]/;function Q(Y){return Y.split("").reduce((function(k,De){return k[De]=!0,k}),{})}function X(Y,k){return(function(De){return Object.prototype.toString.call(De)==="[object RegExp]"})(Y)?!!k.match(Y):Y[k]}function Se(Y,k){return!X(Y,k)}r=Q(r),H=Q(H);var Ae,xe,gt,Ee=0;for(var mt in L.STATE={BEGIN:Ee++,BEGIN_WHITESPACE:Ee++,TEXT:Ee++,TEXT_ENTITY:Ee++,OPEN_WAKA:Ee++,SGML_DECL:Ee++,SGML_DECL_QUOTED:Ee++,DOCTYPE:Ee++,DOCTYPE_QUOTED:Ee++,DOCTYPE_DTD:Ee++,DOCTYPE_DTD_QUOTED:Ee++,COMMENT_STARTING:Ee++,COMMENT:Ee++,COMMENT_ENDING:Ee++,COMMENT_ENDED:Ee++,CDATA:Ee++,CDATA_ENDING:Ee++,CDATA_ENDING_2:Ee++,PROC_INST:Ee++,PROC_INST_BODY:Ee++,PROC_INST_ENDING:Ee++,OPEN_TAG:Ee++,OPEN_TAG_SLASH:Ee++,ATTRIB:Ee++,ATTRIB_NAME:Ee++,ATTRIB_NAME_SAW_WHITE:Ee++,ATTRIB_VALUE:Ee++,ATTRIB_VALUE_QUOTED:Ee++,ATTRIB_VALUE_CLOSED:Ee++,ATTRIB_VALUE_UNQUOTED:Ee++,ATTRIB_VALUE_ENTITY_Q:Ee++,ATTRIB_VALUE_ENTITY_U:Ee++,CLOSE_TAG:Ee++,CLOSE_TAG_SAW_WHITE:Ee++,SCRIPT:Ee++,SCRIPT_ENDING:Ee++},L.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},L.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:1
vendor: 4,160 bytes, lines 4-9
474,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(L.ENTITIES).forEach((function(Y){var k=L.ENTITIES[Y],De=typeof k=="number"?String.fromCharCode(k):k;L.ENTITIES[Y]=De})),L.STATE)L.STATE[L.STATE[mt]]=mt;function He(Y,k,De){Y[k]&&Y[k](De)}function Pe(Y,k,De){Y.textNode&&Ke(Y),He(Y,k,De)}function Ke(Y){Y.textNode=Et(Y.opt,Y.textNode),Y.textNode&&He(Y,"ontext",Y.textNode),Y.textNode=""}function Et(Y,k){return Y.trim&&(k=k.trim()),Y.normalize&&(k=k.replace(/\s+/g," ")),k}function Pt(Y,k){return Ke(Y),Y.trackPosition&&(k+=` 5Line: `+Y.line+` 6Column: `+Y.column+` 7Char: `+Y.c),k=new Error(k),Y.error=k,He(Y,"onerror",k),Y}function xt(Y){return Y.sawRoot&&!Y.closedRoot&&Lt(Y,"Unclosed root tag"),Y.state!==Ee.BEGIN&&Y.state!==Ee.BEGIN_WHITESPACE&&Y.state!==Ee.TEXT&&Pt(Y,"Unexpected end"),Ke(Y),Y.c="",Y.closed=!0,He(Y,"onend"),p.call(Y,Y.strict,Y.opt),Y}function Lt(Y,k){if(typeof Y!="object"||!(Y instanceof p))throw new Error("bad call to strictFail");Y.strict&&Pt(Y,k)}function sn(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var k=Y.tags[Y.tags.length-1]||Y,De=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(De.ns=k.ns),Y.attribList.length=0,Pe(Y,"onopentagstart",De)}function nn(Y,k){var De=Y.indexOf(":")<0?["",Y]:Y.split(":"),j=De[0],We=De[1];return k&&Y==="xmlns"&&(j="xmlns",We=""),{prefix:j,local:We}}function Sn(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName))Y.attribName=Y.attribValue="";else{if(Y.opt.xmlns){var k=nn(Y.attribName,!0),De=k.prefix,j=k.local;if(De==="xmlns")if(j==="xml"&&Y.attribValue!==ge)Lt(Y,"xml: prefix must be bound to "+ge+` 8Actual: `+Y.attribValue);else if(j==="xmlns"&&Y.attribValue!==Ne)Lt(Y,"xmlns: prefix must be bound to "+Ne+` 9Actual: `+Y.attribValue);else{var We=Y.tag,st=Y.tags[Y.tags.length-1]||Y;We.ns===st.ns&&(We.ns=Object.create(st.ns)),We.ns[j]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,Pe(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}}function ve(Y,k){if(Y.opt.xmlns){var De=Y.tag,j=nn(Y.tagName);De.prefix=j.prefix,De.local=j.local,De.uri=De.ns[j.prefix]||"",De.prefix&&!De.uri&&(Lt(Y,"Unbound namespace prefix: "+JSON.stringify(Y.tagName)),De.uri=j.prefix);var We=Y.tags[Y.tags.length-1]||Y;
vendor: 7,880 bytes, line 9
9De.ns&&We.ns!==De.ns&&Object.keys(De.ns).forEach((function(ae){Pe(Y,"onopennamespace",{prefix:ae,uri:De.ns[ae]})}));for(var st=0,Te=Y.attribList.length;st<Te;st++){var Le=Y.attribList[st],i=Le[0],l=Le[1],C=nn(i,!0),ne=C.prefix,se=C.local,Oe=ne===""?"":De.ns[ne]||"",rt={name:i,value:l,prefix:ne,local:se,uri:Oe};ne&&ne!=="xmlns"&&!Oe&&(Lt(Y,"Unbound namespace prefix: "+JSON.stringify(ne)),rt.uri=ne),Y.tag.attributes[i]=rt,Pe(Y,"onattribute",rt)}Y.attribList.length=0}Y.tag.isSelfClosing=!!k,Y.sawRoot=!0,Y.tags.push(Y.tag),Pe(Y,"onopentag",Y.tag),k||(Y.noscript||Y.tagName.toLowerCase()!=="script"?Y.state=Ee.TEXT:Y.state=Ee.SCRIPT,Y.tag=null,Y.tagName=""),Y.attribName=Y.attribValue="",Y.attribList.length=0}function Ie(Y){if(!Y.tagName)return Lt(Y,"Weird empty close tag."),Y.textNode+="</>",void(Y.state=Ee.TEXT);if(Y.script){if(Y.tagName!=="script")return Y.script+="</"+Y.tagName+">",Y.tagName="",void(Y.state=Ee.SCRIPT);Pe(Y,"onscript",Y.script),Y.script=""}var k=Y.tags.length,De=Y.tagName;Y.strict||(De=De[Y.looseCase]());for(var j=De;k--&&Y.tags[k].name!==j;)Lt(Y,"Unexpected close tag");if(k<0)return Lt(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="</"+Y.tagName+">",void(Y.state=Ee.TEXT);Y.tagName=De;for(var We=Y.tags.length;We-- >k;){var st=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,Pe(Y,"onclosetag",Y.tagName);var Te={};for(var Le in st.ns)Te[Le]=st.ns[Le];var i=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&st.ns!==i.ns&&Object.keys(st.ns).forEach((function(l){var C=st.ns[l];Pe(Y,"onclosenamespace",{prefix:l,uri:C})}))}k===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=Ee.TEXT}function pt(Y){var k,De=Y.entity,j=De.toLowerCase(),We="";return Y.ENTITIES[De]?Y.ENTITIES[De]:Y.ENTITIES[j]?Y.ENTITIES[j]:((De=j).charAt(0)==="#"&&(De.charAt(1)==="x"?(De=De.slice(2),We=(k=parseInt(De,16)).toString(16)):(De=De.slice(1),We=(k=parseInt(De,10)).toString(10))),De=De.replace(/^0+/,""),We.toLowerCase()!==De?(Lt(Y,"Invalid character entity"),"&"+Y.entity+";"):String.fromCodePoint(k))}function _t(Y,k){k==="<"?(Y.state=Ee.OPEN_WAKA,Y.startTagPosition=Y.position):Se(w,k)&&(Lt(Y,"Non-whitespace before first tag."),Y.textNode=k,Y.state=Ee.TEXT)}function Ye(Y,k){var De="";return k<Y.length&&(De=Y.charAt(k)),De}Ee=L.STATE,String.fromCodePoint||(Ae=String.fromCharCode,xe=Math.floor,gt=function(){var Y,k,De=[],j=-1,We=arguments.length;if(!We)return"";for(var st="";++j<We;){var Te=Number(arguments[j]);if(!isFinite(Te)||Te<0||Te>1114111||xe(Te)!==Te)throw RangeError("Invalid code point: "+Te);Te<=65535?De.push(Te):(Y=55296+((Te-=65536)>>10),k=Te%1024+56320,De.push(Y,k)),(j+1===We||De.length>16384)&&(st+=Ae.apply(null,De),De.length=0)}return st},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:gt,configurable:!0,writable:!0}):String.fromCodePoint=gt)})(pe)},6739:function(vt,pe,P){(function(L,d,o,p,T){function y(Ye){if("contents"in Ye)for(var Y=("styleAttrs"in Ye)?Ye.styleAttrs[p.byName.ruby.qname]:null,k=Ye.kind==="span"&&(Y==="container"||Y==="textContainer"||Y==="baseContainer"),De=Ye.contents.length-1;De>=0;De--)!k||"styleAttrs"in Ye.contents[De]&&p.byName.ruby.qname in Ye.contents[De].styleAttrs?y(Ye.contents[De]):delete Ye.contents[De]}function w(Ye,Y,k,De){var j=De&&De.timeContainer==="seq",We=0;De&&(We=j&&k?k.end:De.begin),Y.begin=Y.explicit_begin?Y.explicit_begin+We:We;var st=Y.begin,Te=null;if("sets"in Y)for(var Le=0;Le<Y.sets.length;Le++)w(Ye,Y.sets[Le],Te,Y),st=Y.timeContainer==="seq"?Y.sets[Le].end:Math.max(st,Y.sets[Le].end),Te=Y.sets[Le];if("contents"in Y){if("contents"in Y)for(var i=0;i<Y.contents.length;i++)w(Ye,Y.contents[i],Te,Y),st=Y.timeContainer==="seq"?Y.contents[i].end:Math.max(st,Y.contents[i].end),Te=Y.contents[i]}else st=j?Y.begin:Number.POSITIVE_INFINITY;Y.explicit_end!==null&&Y.explicit_dur!==null?Y.end=Math.min(Y.begin+Y.explicit_dur,We+Y.explicit_end):Y.explicit_end===null&&Y.explicit_dur!==null?Y.end=Y.begin+Y.explicit_dur:Y.explicit_end!==null&&Y.explicit_dur===null?Y.end=We+Y.explicit_end:Y.end=st,delete Y.explicit_begin,delete Y.explicit_dur,delete Y.explicit_end,Ye._registerEvent(Y)}function h(Ye){this.node=Ye}function m(){this.events=[],this.head=new r,this.body=null}function r(){this.styling=new H,this.layout=new ge}function H(){this.styles={},this.initials={}}function G(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function ue(){this.styleAttrs=null}function ge(){this.regions={}}function Ne(Ye,Y){fe.call(this,"image"),this.src=Ye,this.type=Y}function fe(Ye){this.kind=Ye}function Me(Ye){this.id=Ye}function Fe(Ye){this.regionID=Ye}function ot(Ye){this.styleAttrs=Ye}function ke(Ye){this.sets=Ye}function Q(Ye){this.contents=Ye}function X(Ye,Y,k){this.explicit_begin=Ye,this.explicit_end=Y,this.explicit_dur=k}function Se(){fe.call(this,"body")}function Ae(){fe.call(this,"div")}function xe(){fe.call(this,"p")}function gt(){fe.call(this,"span")}function Ee(){fe.call(this,"span")}function mt(){fe.call(this,"br")}function He(){}function Pe(){}function Ke(Ye){return Ye&&"xml:id"in Ye.attributes&&Ye.attributes["xml:id"].value||null}function Et(Ye){return Ye&&"style"in Ye.attributes?Ye.attributes.style.value.split(" "):[]}function Pt(Ye,Y){var k={};if(Ye!==null)for(var De in Ye.attributes){var j=Ye.attributes[De].uri+" "+Ye.attributes[De].local,We=p.byQName[j];if(We!==void 0){var st=We.parse(Ye.attributes[De].value);st!==null?(k[j]=st,We===p.byName.zIndex&&ve(Y,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):Ie(Y,"Cannot parse styling attribute "+j+" --> "+Ye.attributes[De].value)}}return k}function xt(Ye,Y,k){for(var De in Ye.attributes)if(Ye.attributes[De].uri===Y&&Ye.attributes[De].local===k)return Ye.attributes[De].value;return null}function Lt(Ye,Y,k){var De,j=null;return(De=/^(\d+(?:\.\d+)?)f$/.exec(k))!==null?Y!==null&&(j=parseFloat(De[1])/Y):(De=/^(\d+(?:\.\d+)?)t$/.exec(k))!==null?Ye!==null&&(j=parseFloat(De[1])/Ye):(De=/^(\d+(?:\.\d+)?)ms$/.exec(k))!==null?j=parseFloat(De[1])/1e3:(De=/^(\d+(?:\.\d+)?)s$/.exec(k))!==null?j=parseFloat(De[1]):(De=/^(\d+(?:\.\d+)?)h$/.exec(k))!==null?j=3600*parseFloat(De[1]):(De=/^(\d+(?:\.\d+)?)m$/.exec(k))!==null?j=60*parseFloat(De[1]):(De=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(k))!==null?j=3600*parseInt(De[1])+60*parseInt(De[2])+parseFloat(De[3]):(De=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(k))!==null&&Y!==null&&(j=3600*parseInt(De[1])+60*parseInt(De[2])+parseInt(De[3])+(De[4]===null?0:parseInt(De[4])/Y)),j}function sn(Ye,Y,k){for(;Y.styleRefs.length>0;){var De=Y.styleRefs.pop();De in Ye.styles?(sn(Ye,Ye.styles[De],k),Sn(Ye.styles[De].styleAttrs,Y.styleAttrs)):Ie(k,"Non-existant style id referenced")}}function nn(Ye,Y,k,De){for(var j=Y.length-1;j>=0;j--){var We=Y[j];We in Ye.styles?Sn(Ye.styles[We].styleAttrs,k):Ie(De,"Non-existant style id referenced")}}function Sn(Ye,Y){for(var k in Ye)Ye.hasOwnProperty(k)&&(k in Y||(Y[k]=Ye[k]))}function ve(Ye,Y){if(Ye&&Ye.warn&&Ye.warn(Y))throw Y}function Ie(Ye,Y){if(Ye&&Ye.error&&Ye.error(Y))throw Y}function pt(Ye,Y){throw Ye&&Ye.fatal&&Ye.fatal(Y),Y}function _t(Ye,Y){for(var k,De=0,j=Ye.length-1;De<=j;){var We=Ye[k=Math.floor((De+j)/2)];if(We<Y)De=k+1;else{if(!(We>Y))return{found:!0,index:k};j=k-1}}return{found:!1,index:De}}L.fromXML=function(Ye,Y,k){var De=d.parser(!0,{xmlns:!0}),j=[],We=[],st=[],Te=0,Le=null;De.onclosetag=function(se){if(j[0]instanceof He)Le.head!==null&&Le.head.styling!==null&&nn(Le.head.styling,j[0].styleRefs,j[0].styleAttrs,Y),delete j[0].styleRefs;else if(j[0]instanceof H)for(var Oe in j[0].styles)j[0].styles.hasOwnProperty(Oe)&&sn(j[0],j[0].styles[Oe],Y);else if(j[0]instanceof xe||j[0]instanceof gt){if(j[0].contents.length>1){var rt,ae=[j[0].contents[0]];for(rt=1;rt<j[0].contents.length;rt++)j[0].contents[rt]instanceof Ee&&ae[ae.length-1]instanceof Ee?ae[ae.length-1].text+=j[0].contents[rt].text:ae.push(j[0].contents[rt]);
9j[0].contents=ae}j[0]instanceof gt&&j[0].contents.length===1&&j[0].contents[0]instanceof Ee&&(j[0].text=j[0].contents[0].text,delete j[0].contents)}else j[0]instanceof h&&(j[0].node.uri===o.ns_tt&&j[0].node.local==="metadata"?Te--:Te>0&&k&&"onCloseTag"in k&&k.onCloseTag());st.shift(),We.shift(),j.shift()},De.ontext=function(se){if(j[0]!==void 0)if(j[0]instanceof gt||j[0]instanceof xe){if(j[0]instanceof gt){var Oe=j[0].styleAttrs[p.byName.ruby.qname];if(Oe==="container"||Oe==="textContainer"||Oe==="baseContainer")return}var rt=new Ee;rt.initFromText(Le,j[0],se,We[0],st[0],Y),j[0].contents.push(rt)}else j[0]instanceof h&&Te>0&&k&&"onText"in k&&k.onText(se)},De.onopentag=function(se){var Oe=se.attributes["xml:space"];Oe?st.unshift(Oe.value):st.length===0?st.unshift("default"):st.unshift(st[0]);var rt=se.attributes["xml:lang"];if(rt?We.unshift(rt.value):We.length===0?We.unshift(""):We.unshift(We[0]),se.uri===o.ns_tt)if(se.local==="tt")Le!==null&&pt(Y,"Two <tt> elements at ("+this.line+","+this.column+")"),(Le=new m).initFromNode(se,We[0],Y),j.unshift(Le);else if(se.local==="head")j[0]instanceof m||pt(Y,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),j.unshift(Le.head);else if(se.local==="styling")j[0]instanceof r||pt(Y,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),j.unshift(Le.head.styling);else if(se.local==="style"){var ae;j[0]instanceof H?((ae=new G).initFromNode(se,Y),ae.id?Le.head.styling.styles[ae.id]=ae:Ie(Y,"<style> element missing @id attribute"),j.unshift(ae)):j[0]instanceof He?((ae=new G).initFromNode(se,Y),Sn(ae.styleAttrs,j[0].styleAttrs),j.unshift(ae)):pt(Y,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if(se.local==="initial"){var ze;if(j[0]instanceof H){for(var qe in(ze=new ue).initFromNode(se,Y),ze.styleAttrs)ze.styleAttrs.hasOwnProperty(qe)&&(Le.head.styling.initials[qe]=ze.styleAttrs[qe]);j.unshift(ze)}else pt(Y,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if(se.local==="layout")j[0]instanceof r||pt(Y,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),j.unshift(Le.head.layout);else if(se.local==="region"){j[0]instanceof ge||pt(Y,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var V=new He;V.initFromNode(Le,se,We[0],Y),!V.id||V.id in Le.head.layout.regions?Ie(Y,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):Le.head.layout.regions[V.id]=V,j.unshift(V)}else if(se.local==="body"){j[0]instanceof m||pt(Y,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),Le.body!==null&&pt(Y,"Second <body> element at "+this.line+","+this.column+")");var he=new Se;he.initFromNode(Le,se,We[0],Y),Le.body=he,j.unshift(he)}else if(se.local==="div"){j[0]instanceof Ae||j[0]instanceof Se||pt(Y,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var tt=new Ae;tt.initFromNode(Le,j[0],se,We[0],Y);var it=tt.styleAttrs[p.byName.backgroundImage.qname];it&&(tt.contents.push(new Ne(it)),delete tt.styleAttrs[p.byName.backgroundImage.qname]),j[0].contents.push(tt),j.unshift(tt)}else if(se.local==="image"){j[0]instanceof Ae||pt(Y,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var yt=new Ne;yt.initFromNode(Le,j[0],se,We[0],Y),j[0].contents.push(yt),j.unshift(yt)}else if(se.local==="p"){j[0]instanceof Ae||pt(Y,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var Ze=new xe;Ze.initFromNode(Le,j[0],se,We[0],Y),j[0].contents.push(Ze),j.unshift(Ze)}else if(se.local==="span"){j[0]instanceof gt||j[0]instanceof xe||pt(Y,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var ht=new gt;ht.initFromNode(Le,j[0],se,We[0],st[0],Y),j[0].contents.push(ht),j.unshift(ht)}else if(se.local==="br"){j[0]instanceof gt||j[0]instanceof xe||pt(Y,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var fn=new mt;fn.initFromNode(Le,j[0],se,We[0],Y),j[0].contents.push(fn),j.unshift(fn)}else if(se.local==="set"){j[0]instanceof gt||j[0]instanceof xe||j[0]instanceof Ae||j[0]instanceof Se||j[0]instanceof He||j[0]instanceof mt||pt(Y,"Parent of <set>
9 element is not a content element or a region at "+this.line+","+this.column+")");var Nn=new Pe;Nn.initFromNode(Le,j[0],se,Y),j[0].sets.push(Nn),j.unshift(Nn)}else j.unshift(new h(se));else j.unshift(new h(se));if(j[0]instanceof h){if(se.uri===o.ns_tt&&se.local==="metadata")Te++;else if(Te>0&&k&&"onOpenTag"in k){var Vt=[];for(var En in se.attributes)Vt[se.attributes[En].uri+" "+se.attributes[En].local]={uri:se.attributes[En].uri,local:se.attributes[En].local,value:se.attributes[En].value};k.onOpenTag(se.uri,se.local,Vt)}}},De.write(Ye).close(),delete Le.head.styling.styles;var i=!1;for(var l in Le.head.layout.regions)if(Le.head.layout.regions.hasOwnProperty(l)){i=!0;break}if(!i){var C=He.prototype.createDefaultRegion(Le.lang);Le.head.layout.regions[C.id]=C}for(var ne in Le.head.layout.regions)Le.head.layout.regions.hasOwnProperty(ne)&&w(Le,Le.head.layout.regions[ne],null,null);return Le.body&&w(Le,Le.body,null,null),Le.body&&y(Le.body),Le},m.prototype.initFromNode=function(Ye,Y,k){var De=(function(Te,Le){var i=xt(Te,o.ns_ttp,"cellResolution"),l=15,C=32;if(i!==null){var ne=/(\d+) (\d+)/.exec(i);ne!==null?(C=parseInt(ne[1]),l=parseInt(ne[2])):ve(Le,"Malformed cellResolution value (using initial value instead)")}return{w:C,h:l}})(Ye,k);this.cellLength={h:new T.ComputedLength(0,1/De.h),w:new T.ComputedLength(1/De.w,0)};var j=(function(Te,Le){var i,l=xt(Te,o.ns_ttp,"frameRate"),C=30;l!==null&&((i=/(\d+)/.exec(l))!==null?C=parseInt(i[1]):ve(Le,"Malformed frame rate attribute (using initial value instead)"));var ne=xt(Te,o.ns_ttp,"frameRateMultiplier"),se=1;ne!==null&&((i=/(\d+) (\d+)/.exec(ne))!==null?se=parseInt(i[1])/parseInt(i[2]):ve(Le,"Malformed frame rate multiplier attribute (using initial value instead)"));var Oe=se*C,rt=1,ae=xt(Te,o.ns_ttp,"tickRate");return ae===null?l!==null&&(rt=Oe):(i=/(\d+)/.exec(ae))!==null?rt=parseInt(i[1]):ve(Le,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:Oe,tickRate:rt}})(Ye,k);this.effectiveFrameRate=j.effectiveFrameRate,this.tickRate=j.tickRate,this.aspectRatio=(function(Te,Le){var i=xt(Te,o.ns_ittp,"aspectRatio");i===null&&(i=xt(Te,o.ns_ttp,"displayAspectRatio"));var l=null;if(i!==null){var C=/(\d+)\s+(\d+)/.exec(i);if(C!==null){var ne=parseInt(C[1]),se=parseInt(C[2]);ne!==0&&se!==0?l=ne/se:Ie(Le,"Illegal aspectRatio values (ignoring)")}else Ie(Le,"Malformed aspectRatio attribute (ignoring)")}return l})(Ye,k);var We=xt(Ye,o.ns_ttp,"timeBase");We!==null&&We!=="media"&&pt(k,"Unsupported time base");var st=(function(Te,Le){var i=xt(Te,o.ns_tts,"extent");if(i===null)return null;var l=i.split(" ");if(l.length!==2)return ve(Le,"Malformed extent (ignoring)"),null;var C=T.parseLength(l[0]),ne=T.parseLength(l[1]);return ne&&C?{h:ne,w:C}:(ve(Le,"Malformed extent values (ignoring)"),null)})(Ye,k);st===null?this.pxLength={h:null,w:null}:(st.h.unit==="px"&&st.w.unit==="px"||pt(k,"Extent on TT must be in px or absent"),this.pxLength={h:new T.ComputedLength(0,1/st.h.value),w:new T.ComputedLength(1/st.w.value,0)}),this.dimensions={h:new T.ComputedLength(0,1),w:new T.ComputedLength(1,0)},this.lang=Y},m.prototype._registerEvent=function(Ye){if(!(Ye.end<=Ye.begin)){var Y=_t(this.events,Ye.begin);if(Y.found||this.events.splice(Y.index,0,Ye.begin),Ye.end!==Number.POSITIVE_INFINITY){var k=_t(this.events,Ye.end);k.found||this.events.splice(k.index,0,Ye.end)}}},m.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},m.prototype.getMediaTimeEvents=function(){return this.events},G.prototype.initFromNode=function(Ye,Y){this.id=Ke(Ye),this.styleAttrs=Pt(Ye,Y),this.styleRefs=Et(Ye)},ue.prototype.initFromNode=function(Ye,Y){for(var k in this.styleAttrs={},Ye.attributes)if(Ye.attributes[k].uri===o.ns_itts||Ye.attributes[k].uri===o.ns_ebutts||Ye.attributes[k].uri===o.ns_tts){var De=Ye.attributes[k].uri+" "+Ye.attributes[k].local;this.styleAttrs[De]=Ye.attributes[k].value}},Ne.prototype.initFromNode=function(Ye,Y,k,De,j){this.src="src"in k.attributes?k.attributes.src.value:null,this.src||Ie(j,"Invalid image@src attribute"),this.type="type"in k.attributes?k.attributes.type.value:null,this.type||Ie(j,"Invalid image@type attribute"),ot.prototype.initFromNode.call(this,Ye,Y,k,j),X.prototype.initFromNode.call(this,Ye,Y,k,j),ke.prototype.initFromNode.call(this,Ye,Y,k,j),Fe.prototype.initFromNode.call(this,Ye,Y,k,j),this.lang=De},Me.prototype.initFromNode=function(Ye,Y,k,De){this.id=Ke(k)},Fe.prototype.initFromNode=function(Ye,Y,k,De){this.regionID=(function(j){return j&&"region"in j.attributes?j.attributes.region.value:""})(k)},ot.prototype.initFromNode=function(Ye,Y,k,De){this.styleAttrs=Pt(k,De),Ye.head!==null&&Ye.head.styling!==null&&nn(Ye.head.styling,Et(k),this.styleAttrs,De)},ke.prototype.initFromNode=function(Ye,Y,k,De){this.sets=[]},Q.prototype.initFromNode=function(Ye,Y,k,De){this.contents=[]},X.prototype.initFromNode=function(Ye,Y,k,De){var j=(function(We,st,Te,Le){var i=null;Te&&"begin"in Te.attributes&&(i=Lt(We.tickRate,We.effectiveFrameRate,Te.attributes.begin.value))===null&&ve(Le,"Malformed begin value "+Te.attributes.begin.value+" (using 0)");var l=null;Te&&"dur"in Te.attributes&&(l=Lt(We.tickRate,We.effectiveFrameRate,Te.attributes.dur.value))===null&&ve(Le,"Malformed dur value "+Te.attributes.dur.value+" (ignoring)");var C=null;return Te&&"end"in Te.attributes&&(C=Lt(We.tickRate,We.effectiveFrameRate,Te.attributes.end.value))===null&&ve(Le,"Malformed end value (ignoring)"),{explicit_begin:i,explicit_end:C,explicit_dur:l}}
9)(Ye,0,k,De);this.explicit_begin=j.explicit_begin,this.explicit_end=j.explicit_end,this.explicit_dur=j.explicit_dur,this.timeContainer=(function(We,st){var Te=We&&"timeContainer"in We.attributes?We.attributes.timeContainer.value:null;return Te&&Te!=="par"?Te==="seq"?"seq":(Ie(st,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"})(k,De)},Se.prototype.initFromNode=function(Ye,Y,k,De){ot.prototype.initFromNode.call(this,Ye,null,Y,De),X.prototype.initFromNode.call(this,Ye,null,Y,De),ke.prototype.initFromNode.call(this,Ye,null,Y,De),Fe.prototype.initFromNode.call(this,Ye,null,Y,De),Q.prototype.initFromNode.call(this,Ye,null,Y,De),this.lang=k},Ae.prototype.initFromNode=function(Ye,Y,k,De,j){ot.prototype.initFromNode.call(this,Ye,Y,k,j),X.prototype.initFromNode.call(this,Ye,Y,k,j),ke.prototype.initFromNode.call(this,Ye,Y,k,j),Fe.prototype.initFromNode.call(this,Ye,Y,k,j),Q.prototype.initFromNode.call(this,Ye,Y,k,j),this.lang=De},xe.prototype.initFromNode=function(Ye,Y,k,De,j){ot.prototype.initFromNode.call(this,Ye,Y,k,j),X.prototype.initFromNode.call(this,Ye,Y,k,j),ke.prototype.initFromNode.call(this,Ye,Y,k,j),Fe.prototype.initFromNode.call(this,Ye,Y,k,j),Q.prototype.initFromNode.call(this,Ye,Y,k,j),this.lang=De},gt.prototype.initFromNode=function(Ye,Y,k,De,j,We){ot.prototype.initFromNode.call(this,Ye,Y,k,We),X.prototype.initFromNode.call(this,Ye,Y,k,We),ke.prototype.initFromNode.call(this,Ye,Y,k,We),Fe.prototype.initFromNode.call(this,Ye,Y,k,We),Q.prototype.initFromNode.call(this,Ye,Y,k,We),this.space=j,this.lang=De},Ee.prototype.initFromText=function(Ye,Y,k,De,j,We){X.prototype.initFromNode.call(this,Ye,Y,null,We),this.text=k,this.space=j,this.lang=De},mt.prototype.initFromNode=function(Ye,Y,k,De,j){Fe.prototype.initFromNode.call(this,Ye,Y,k,j),X.prototype.initFromNode.call(this,Ye,Y,k,j),this.lang=De},He.prototype.createDefaultRegion=function(Ye){var Y=new He;return Me.call(Y,""),ot.call(Y,{}),ke.call(Y,[]),X.call(Y,0,Number.POSITIVE_INFINITY,null),this.lang=Ye,Y},He.prototype.initFromNode=function(Ye,Y,k,De){Me.prototype.initFromNode.call(this,Ye,null,Y,De),X.prototype.initFromNode.call(this,Ye,null,Y,De),ke.prototype.initFromNode.call(this,Ye,null,Y,De),this.styleAttrs=Pt(Y,De),this.styleRefs=Et(Y),this.lang=k},Pe.prototype.initFromNode=function(Ye,Y,k,De){X.prototype.initFromNode.call(this,Ye,Y,k,De);var j=Pt(k,De);for(var We in this.qname=null,this.value=null,j)if(j.hasOwnProperty(We)){if(this.qname){Ie(De,"More than one style specified on set");break}this.qname=We,this.value=j[We]}}})(pe,typeof sax>"u"?P(5474):sax,typeof imscNames>"u"?P(977):imscNames,typeof imscStyles>"u"?P(1219):imscStyles,typeof imscUtils>"u"?P(6404):imscUtils)},1612:function(vt,pe,P){var L=/firefox/i.test(navigator.userAgent);(function(d,o,p){function T(Q,X,Se,Ae){var xe;if(Se.kind==="region")(xe=document.createElement("div")).style.position="absolute";else if(Se.kind==="body")xe=document.createElement("div");else if(Se.kind==="div")xe=document.createElement("div");else if(Se.kind==="image"){if(xe=document.createElement("img"),Q.imgResolver!==null&&Se.src!==null){var gt=Q.imgResolver(Se.src,xe);gt&&(xe.src=gt),xe.height=Q.regionH,xe.width=Q.regionW}}else if(Se.kind==="p")xe=document.createElement("p");else if(Se.kind==="span")if(Se.styleAttrs[p.byName.ruby.qname]==="container")xe=document.createElement("ruby"),Q.ruby=!0;else if(Se.styleAttrs[p.byName.ruby.qname]==="base")xe=document.createElement("span");else if(Se.styleAttrs[p.byName.ruby.qname]==="text")xe=document.createElement("rt");else if(Se.styleAttrs[p.byName.ruby.qname]==="baseContainer")xe=document.createElement("rbc");else if(Se.styleAttrs[p.byName.ruby.qname]==="textContainer")xe=document.createElement("rtc");else{if(Se.styleAttrs[p.byName.ruby.qname]==="delimiter")return;xe=document.createElement("span")}else Se.kind==="br"&&(xe=document.createElement("br"));if(xe){if(Se.lang&&(Se.kind!=="region"&&Se.lang===Ae.lang||(xe.lang=Se.lang)),X.appendChild(xe),xe.style.margin="0",Se.kind==="region"){var Ee=Se.styleAttrs[p.byName.writingMode.qname];Ee==="lrtb"||Ee==="lr"?(Q.ipd="lr",Q.bpd="tb"):Ee==="rltb"||Ee==="rl"?(Q.ipd="rl",Q.bpd="tb"):Ee==="tblr"?(Q.ipd="tb",Q.bpd="lr"):Ee!=="tbrl"&&Ee!=="tb"||(Q.ipd="tb",Q.bpd="rl")}else if(Se.kind==="p"&&Q.bpd==="tb"){var mt=Se.styleAttrs[p.byName.direction.qname];Q.ipd=mt==="ltr"?"lr":"rl"}for(var He=0;He<ue.length;He++){var Pe=ue[He],Ke=Se.styleAttrs[Pe.qname];Ke!==void 0&&Pe.map!==null&&Pe.map(Q,xe,Se,Ke)}var Et=xe,Pt=Se.styleAttrs[p.byName.linePadding.qname];if(Pt&&!Pt.isZero()){var xt=Pt.toUsedLength(Q.w,Q.h);if(xt>0){var Lt=Math.ceil(xt)+"px";Q.bpd==="tb"?(Et.style.paddingLeft=Lt,Et.style.paddingRight=Lt):(Et.style.paddingTop=Lt,Et.style.paddingBottom=Lt),Q.lp=Pt}}var sn=Se.styleAttrs[p.byName.multiRowAlign.qname];if(sn&&sn!=="auto"){var nn=document.createElement("span");nn.style.display="inline-block",nn.style.textAlign=sn,xe.appendChild(nn),Et=nn,Q.mra=sn}
9var Sn=Se.styleAttrs[p.byName.rubyReserve.qname];if(Sn&&Sn[0]!=="none"&&(Q.rubyReserve=Sn),Se.styleAttrs[p.byName.fillLineGap.qname]&&(Q.flg=!0),Se.kind==="span"&&Se.text){var ve=Se.styleAttrs[p.byName.textEmphasis.qname];if(ve&&ve.style!=="none"&&(Q.textEmphasis=!0),p.byName.textCombine.qname in Se.styleAttrs&&Se.styleAttrs[p.byName.textCombine.qname]==="all")xe.textContent=Se.text,xe._isd_element=Se,ve&&H(Q,xe,0,ve);else for(var Ie="",pt=0;pt<Se.text.length;pt++){Ie+=Se.text.charAt(pt);var _t=Se.text.charCodeAt(pt);if(_t<55296||_t>56319||pt===Se.text.length-1){var Ye=document.createElement("span");Ye.textContent=Ie,ve&&H(Q,Ye,0,ve),xe.appendChild(Ye),Ie="",Ye._isd_element=Se}}}if("contents"in Se)for(var Y=0;Y<Se.contents.length;Y++)T(Q,Et,Se.contents[Y],Se);var k=[];if(Se.kind==="p"&&(r(Q,Et,k,null),Q.rubyReserve&&((function(Te,Le){for(var i=0;i<Te.length;i++){var l,C,ne=document.createElement("ruby"),se=document.createElement("span");se.textContent="â",ne.appendChild(se);var Oe,rt=Le.rubyReserve[1].toUsedLength(Le.w,Le.h)+"px";Le.rubyReserve[0]==="both"||Le.rubyReserve[0]==="outside"&&Te.length==1?((l=document.createElement("rtc")).style[Me]=fe?"after":"under",l.textContent="â",l.style.fontSize=rt,(C=document.createElement("rtc")).style[Me]=fe?"before":"over",C.textContent="â",C.style.fontSize=rt,ne.appendChild(l),ne.appendChild(C)):((l=document.createElement("rtc")).textContent="â",l.style.fontSize=rt,Oe=Le.rubyReserve[0]==="after"||Le.rubyReserve[0]==="outside"&&i>0?fe?"after":Le.bpd==="tb"||Le.bpd==="rl"?"under":"over":fe?"before":Le.bpd==="tb"||Le.bpd==="rl"?"over":"under",l.style[Me]=Oe,ne.appendChild(l));for(var ae=null,ze=0;ze<Te[i].rbc.length;ze++)if(Te[i].rbc[ze].localName==="ruby"){ae=Te[i].rbc[ze];for(var qe=0;qe<ae.style.length;qe++)ne.style.setProperty(ae.style.item(qe),ae.style.getPropertyValue(ae.style.item(qe)));break}(ae=ae||Te[i].elements[0].node).parentElement.insertBefore(ne,ae)}})(k,Q),Q.rubyReserve=null),(Q.ruby||Q.rubyReserve)&&((function(Te,Le){for(var i=0;i<Te.length;i++)for(var l=0;l<Te[i].rbc.length;l++){var C;Te[i].rbc[l].style[Me]||(C=fe?i===0?"before":"after":Le.bpd==="tb"||Le.bpd==="rl"?i===0?"over":"under":i===0?"under":"over",Te[i].rbc[l].style[Me]=C)}})(k,Q),Q.ruby=null),Q.textEmphasis&&((function(Te,Le){for(var i=0;i<Te.length;i++)for(var l=0;l<Te[i].te.length;l++){var C;Te[i].te[l].style[ot]&&Te[i].te[l].style[ot]!=="none"||(C=Le.bpd==="tb"?i===0?"left over":"left under":Le.bpd==="rl"?i===0?"right under":"left under":i===0?"left under":"right under",Te[i].te[l].style[ot]=C)}})(k,Q),Q.textEmphasis=null),Q.mra&&((function(Te){for(var Le=0;Le<Te.length-1;Le++){var i=Te[Le].elements.length;if(i!==0&&Te[Le].br===!1){var l=document.createElement("br"),C=Te[Le].elements[i-1].node;C.parentElement.insertBefore(l,C.nextSibling)}}})(k),Q.mra=null),Q.lp&&((function(Te,Le,i){if(Te!==null)for(var l=0;l<Te.length;l++){var C=Te[l].elements.length,ne=Math.ceil(Le)+"px",se="-"+Math.ceil(Le)+"px";if(C!==0){var Oe=Te[l].elements[Te[l].start_elem],rt=Te[l].elements[Te[l].end_elem];if(Oe===rt){var ae=Oe.node.getBoundingClientRect();if(ae.width==0||ae.height==0)continue}i.ipd==="lr"?(Oe.node.style.marginLeft=se,Oe.node.style.paddingLeft=ne):i.ipd==="rl"?(Oe.node.style.paddingRight=ne,Oe.node.style.marginRight=se):i.ipd==="tb"&&(Oe.node.style.paddingTop=ne,Oe.node.style.marginTop=se),i.ipd==="lr"?(L||(rt.node.style.marginRight=se),rt.node.style.paddingRight=ne):i.ipd==="rl"?(rt.node.style.paddingLeft=ne,L||(rt.node.style.marginLeft=se)):i.ipd==="tb"&&(rt.node.style.paddingBottom=ne,rt.node.style.marginBottom=se)}}})(k,Q.lp.toUsedLength(Q.w,Q.h),Q),Q.lp=null),(function(Te,Le){for(var i=0;i<Te.length;i++)for(var l=Te[i],C=1;C<l.elements.length;){var ne=l.elements[C-1],se=l.elements[C];w(ne.node,se.node,Le)?l.elements.splice(C,1):C++}for(var Oe,rt,ae=[],ze=0;ze<Te.length;ze++)for(var qe=0;qe<Te[ze].elements.length;qe++)(rt=y(Oe=Te[ze].elements[qe].node,ae,!1))&&(Oe.style.backgroundColor=rt);for(var V=0;V<ae.length;V++)ae[V].style.backgroundColor=""})(k,Q),Q.flg)){var De=m(Et.getBoundingClientRect(),Q);(function(Te,Le,i,l){for(var C=Math.sign(i-Le),ne=0;ne<=Te.length;ne++){var se,Oe,rt,ae;if(se=ne===0?Math.round(Le):ne===Te.length?Math.round(i):Math.round((Te[ne-1].after+Te[ne].before)/2),ne>0&&Te[ne-1])for(rt=0;rt<Te[ne-1].elements.length;rt++)Oe=C*(se-(ae=Te[ne-1].elements[rt]).after)+"px",l.bpd==="lr"?ae.node.style.paddingRight=Oe:l.bpd==="rl"?ae.node.style.paddingLeft=Oe:l.bpd==="tb"&&(ae.node.style.paddingBottom=Oe);
9if(ne<Te.length)for(rt=0;rt<Te[ne].elements.length;rt++)Oe=C*((ae=Te[ne].elements[rt]).before-se)+"px",l.bpd==="lr"?ae.node.style.paddingLeft=Oe:l.bpd==="rl"?ae.node.style.paddingRight=Oe:l.bpd==="tb"&&(ae.node.style.paddingTop=Oe)}})(k,De.before,De.after,Q),Q.flg=null}if(Se.kind==="region"&&Q.bpd==="tb"&&Q.enableRollUp&&Se.contents.length>0&&Se.styleAttrs[p.byName.displayAlign.qname]==="after"){r(Q,Et,k,null);var j=new h(Se.id===""?"_":Se.id,k);if(Q.currentISDState[j.id]=j,Q.previousISDState&&j.id in Q.previousISDState&&Q.previousISDState[j.id].plist.length>0&&j.plist.length>1&&j.plist[j.plist.length-2].text===Q.previousISDState[j.id].plist[Q.previousISDState[j.id].plist.length-1].text){var We=xe.firstElementChild,st=j.plist[j.plist.length-1].after-j.plist[j.plist.length-1].before;We.style.bottom="-"+st+"px",We.style.transition="transform 0.4s",We.style.position="relative",We.style.transform="translateY(-"+st+"px)"}}}else ke(Q.errorHandler,"Error processing ISD element kind: "+Se.kind)}function y(Q,X,Se){return Q.style.backgroundColor?(Se&&!X.includes(Q)&&X.push(Q),Q.style.backgroundColor):Q.parentElement.nodeName==="SPAN"||Q.parentElement.nodeName==="RUBY"||Q.parentElement.nodeName==="RBC"||Q.parentElement.nodeName==="RTC"||Q.parentElement.nodeName==="RT"?y(Q.parentElement,X,!0):void 0}function w(Q,X,Se){if(Q.tagName==="SPAN"&&X.tagName==="SPAN"&&Q._isd_element===X._isd_element){if(!Q._isd_element)return ke(Se.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;Q.textContent+=X.textContent;for(var Ae=0;Ae<X.style.length;Ae++){var xe=X.style[Ae];(xe.indexOf("border")>=0||xe.indexOf("padding")>=0||xe.indexOf("margin")>=0)&&(Q.style[xe]=X.style[xe])}return X.parentElement.removeChild(X),!0}return!1}function h(Q,X){this.id=Q,this.plist=X}function m(Q,X){var Se={before:null,after:null,start:null,end:null};return X.bpd==="tb"?(Se.before=Q.top,Se.after=Q.bottom,X.ipd==="lr"?(Se.start=Q.left,Se.end=Q.right):(Se.start=Q.right,Se.end=Q.left)):X.bpd==="lr"?(Se.before=Q.left,Se.after=Q.right,Se.start=Q.top,Se.end=Q.bottom):X.bpd==="rl"&&(Se.before=Q.right,Se.after=Q.left,Se.start=Q.top,Se.end=Q.bottom),Se}function r(Q,X,Se,Ae){if(X.localName!=="rt"&&X.localName!=="rtc"){var xe,gt,Ee,mt,He=X.style.backgroundColor||Ae;if(X.childElementCount===0)if(X.localName==="span"||X.localName==="rb"){var Pe=m(X.getBoundingClientRect(),Q);if(Se.length!==0&&(xe=Pe.before,gt=Pe.after,Ee=Se[Se.length-1].before,gt<(mt=Se[Se.length-1].after)&&xe>Ee||mt<=gt&&Ee>=xe)){var Ke=Math.sign(Pe.after-Pe.before),Et=Math.sign(Pe.end-Pe.start);Ke*(Pe.before-Se[Se.length-1].before)<0&&(Se[Se.length-1].before=Pe.before),Ke*(Pe.after-Se[Se.length-1].after)>0&&(Se[Se.length-1].after=Pe.after),Et*(Pe.start-Se[Se.length-1].start)<0&&(Se[Se.length-1].start=Pe.start,Se[Se.length-1].start_elem=Se[Se.length-1].elements.length),Et*(Pe.end-Se[Se.length-1].end)>0&&(Se[Se.length-1].end=Pe.end,Se[Se.length-1].end_elem=Se[Se.length-1].elements.length)}else Se.push({before:Pe.before,after:Pe.after,start:Pe.start,end:Pe.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});Se[Se.length-1].text+=X.textContent,Se[Se.length-1].elements.push({node:X,bgcolor:He,before:Pe.before,after:Pe.after})}else X.localName==="br"&&Se.length!==0&&(Se[Se.length-1].br=!0);else for(var Pt=X.firstChild;Pt;)Pt.nodeType===Node.ELEMENT_NODE&&(r(Q,Pt,Se,He),Pt.localName==="ruby"||Pt.localName==="rtc"?Se.length>0&&Se[Se.length-1].rbc.push(Pt):Pt.localName==="span"&&Pt.style[Fe]&&Pt.style[Fe]!=="none"&&Se.length>0&&Se[Se.length-1].te.push(Pt)),Pt=Pt.nextSibling}}function H(Q,X,Se,Ae){var xe;Ae.style!=="none"&&(Ae.style==="auto"?X.style[Fe]="filled":X.style[Fe]=Ae.style+" "+Ae.symbol,(Ae.position==="before"||Ae.position==="after")&&(xe=Q.bpd==="tb"?Ae.position==="before"?"left over":"left under":Q.bpd==="rl"?Ae.position==="before"?"right under":"left under":Ae.position==="before"?"left under":"right under",X.style[ot]=xe))}function G(Q,X){this.qname=Q,this.map=X}d.render=function(Q,X,Se,Ae,xe,gt,Ee,mt,He){var Pe=Ae||X.clientHeight,Ke=xe||X.clientWidth;if(Q.aspectRatio!==null){var Et=Pe*Q.aspectRatio;Et>Ke?Pe=Math.round(Ke/Q.aspectRatio):Ke=Et}var Pt=document.createElement("div");Pt.style.position="relative",Pt.style.width=Ke+"px",Pt.style.height=Pe+"px",Pt.style.margin="auto",Pt.style.top=0,Pt.style.bottom=0,Pt.style.left=0,Pt.style.right=0,Pt.style.zIndex=0;var xt={h:Pe,w:Ke,regionH:null,regionW:null,imgResolver:Se,displayForcedOnlyMode:gt||!1,isd:Q,errorHandler:Ee,previousISDState:mt,enableRollUp:He||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(X.appendChild(Pt),"contents"in Q)for(var Lt=0;Lt<Q.contents.length;Lt++)T(xt,Pt,Q.contents[Lt],Q);return xt.currentISDState};for(var ue=[new G("http://www.w3.org/ns/ttml#styling backgroundColor",(function(Q,X,Se,Ae){Ae[3]!==0&&(X.style.backgroundColor="rgba("+Ae[0].toString()+","+Ae[1].toString()+","+Ae[2].toString()+","+(Ae[3]/255
9).toString()+")")})),new G("http://www.w3.org/ns/ttml#styling color",(function(Q,X,Se,Ae){X.style.color="rgba("+Ae[0].toString()+","+Ae[1].toString()+","+Ae[2].toString()+","+(Ae[3]/255).toString()+")"})),new G("http://www.w3.org/ns/ttml#styling direction",(function(Q,X,Se,Ae){X.style.direction=Ae})),new G("http://www.w3.org/ns/ttml#styling display",(function(Q,X,Se,Ae){})),new G("http://www.w3.org/ns/ttml#styling displayAlign",(function(Q,X,Se,Ae){X.style.display="flex",X.style.flexDirection="column",Ae==="before"?X.style.justifyContent="flex-start":Ae==="center"?X.style.justifyContent="center":Ae==="after"&&(X.style.justifyContent="flex-end")})),new G("http://www.w3.org/ns/ttml#styling extent",(function(Q,X,Se,Ae){Q.regionH=Ae.h.toUsedLength(Q.w,Q.h),Q.regionW=Ae.w.toUsedLength(Q.w,Q.h);var xe=0,gt=0,Ee=Se.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];Ee&&(xe=Ee[0].toUsedLength(Q.w,Q.h)+Ee[2].toUsedLength(Q.w,Q.h),gt=Ee[1].toUsedLength(Q.w,Q.h)+Ee[3].toUsedLength(Q.w,Q.h)),X.style.height=Q.regionH-xe+"px",X.style.width=Q.regionW-gt+"px"})),new G("http://www.w3.org/ns/ttml#styling fontFamily",(function(Q,X,Se,Ae){for(var xe=[],gt=0;gt<Ae.length;gt++)Ae[gt]=Ae[gt].trim(),Ae[gt]==="monospaceSerif"?(xe.push("Courier New"),xe.push('"Liberation Mono"'),xe.push("Courier"),xe.push("monospace")):Ae[gt]==="proportionalSansSerif"?(xe.push("Arial"),xe.push("Helvetica"),xe.push('"Liberation Sans"'),xe.push("sans-serif")):Ae[gt]==="monospace"?xe.push("monospace"):Ae[gt]==="sansSerif"?xe.push("sans-serif"):Ae[gt]==="serif"?xe.push("serif"):Ae[gt]==="monospaceSansSerif"?(xe.push("Consolas"),xe.push("monospace")):Ae[gt]==="proportionalSerif"?xe.push("serif"):xe.push(Ae[gt]);if(xe.length>0){for(var Ee=[xe[0]],mt=1;mt<xe.length;mt++)Ee.indexOf(xe[mt])==-1&&Ee.push(xe[mt]);xe=Ee}X.style.fontFamily=xe.join(",")})),new G("http://www.w3.org/ns/ttml#styling shear",(function(Q,X,Se,Ae){if(Ae!==0){var xe=-.9*Ae;Q.bpd==="tb"?X.style.transform="skewX("+xe+"deg)":X.style.transform="skewY("+xe+"deg)"}})),new G("http://www.w3.org/ns/ttml#styling fontSize",(function(Q,X,Se,Ae){X.style.fontSize=Ae.toUsedLength(Q.w,Q.h)+"px"})),new G("http://www.w3.org/ns/ttml#styling fontStyle",(function(Q,X,Se,Ae){X.style.fontStyle=Ae})),new G("http://www.w3.org/ns/ttml#styling fontWeight",(function(Q,X,Se,Ae){X.style.fontWeight=Ae})),new G("http://www.w3.org/ns/ttml#styling lineHeight",(function(Q,X,Se,Ae){X.style.lineHeight=Ae==="normal"?"normal":Ae.toUsedLength(Q.w,Q.h)+"px"})),new G("http://www.w3.org/ns/ttml#styling opacity",(function(Q,X,Se,Ae){X.style.opacity=Ae})),new G("http://www.w3.org/ns/ttml#styling origin",(function(Q,X,Se,Ae){X.style.top=Ae.h.toUsedLength(Q.w,Q.h)+"px",X.style.left=Ae.w.toUsedLength(Q.w,Q.h)+"px"})),new G("http://www.w3.org/ns/ttml#styling overflow",(function(Q,X,Se,Ae){X.style.overflow=Ae})),new G("http://www.w3.org/ns/ttml#styling padding",(function(Q,X,Se,Ae){var xe=[];xe[0]=Ae[0].toUsedLength(Q.w,Q.h)+"px",xe[1]=Ae[3].toUsedLength(Q.w,Q.h)+"px",xe[2]=Ae[2].toUsedLength(Q.w,Q.h)+"px",xe[3]=Ae[1].toUsedLength(Q.w,Q.h)+"px",X.style.padding=xe.join(" ")})),new G("http://www.w3.org/ns/ttml#styling position",(function(Q,X,Se,Ae){X.style.top=Ae.h.toUsedLength(Q.w,Q.h)+"px",X.style.left=Ae.w.toUsedLength(Q.w,Q.h)+"px"})),new G("http://www.w3.org/ns/ttml#styling rubyAlign",(function(Q,X,Se,Ae){X.style.rubyAlign=Ae==="spaceAround"?"space-around":"center"})),new G("http://www.w3.org/ns/ttml#styling rubyPosition",(function(Q,X,Se,Ae){var xe;Ae!=="before"&&Ae!=="after"||(xe=fe?Ae:Q.bpd==="tb"||Q.bpd==="rl"?Ae==="before"?"over":"under":Ae==="before"?"under":"over",X.parentElement.style[Me]=xe)})),new G("http://www.w3.org/ns/ttml#styling showBackground",null),new G("http://www.w3.org/ns/ttml#styling textAlign",(function(Q,X,Se,Ae){var xe;xe=Ae==="start"?Q.ipd==="rl"?"right":"left":Ae==="end"?Q.ipd==="rl"?"left":"right":Ae,X.style.textAlign=xe})),new G("http://www.w3.org/ns/ttml#styling textDecoration",(function(Q,X,Se,Ae){X.style.textDecoration=Ae.join(" ").replace("lineThrough","line-through")})),new G("http://www.w3.org/ns/ttml#styling textOutline",(function(Q,X,Se,Ae){})),new G("http://www.w3.org/ns/ttml#styling textShadow",(function(Q,X,Se,Ae){var xe=Se.styleAttrs[p.byName.textOutline.qname];if(Ae==="none"&&xe==="none")X.style.textShadow="";else{var gt=[];if(xe!=="none"){var Ee="rgba("+xe.color[0].toString()+","+xe.color[1].toString()+","+xe.color[2].toString()+","+(xe.color[3]/255
9).toString()+")";gt.push("1px 1px 1px "+Ee),gt.push("-1px 1px 1px "+Ee),gt.push("1px -1px 1px "+Ee),gt.push("-1px -1px 1px "+Ee)}if(Ae!=="none")for(var mt=0;mt<Ae.length;mt++)gt.push(Ae[mt].x_off.toUsedLength(Q.w,Q.h)+"px "+Ae[mt].y_off.toUsedLength(Q.w,Q.h)+"px "+Ae[mt].b_radius.toUsedLength(Q.w,Q.h)+"px rgba("+Ae[mt].color[0].toString()+","+Ae[mt].color[1].toString()+","+Ae[mt].color[2].toString()+","+(Ae[mt].color[3]/255).toString()+")");X.style.textShadow=gt.join(",")}})),new G("http://www.w3.org/ns/ttml#styling textCombine",(function(Q,X,Se,Ae){X.style.textCombineUpright=Ae})),new G("http://www.w3.org/ns/ttml#styling textEmphasis",(function(Q,X,Se,Ae){})),new G("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(Q,X,Se,Ae){var xe;xe=Ae==="bidiOverride"?"bidi-override":Ae,X.style.unicodeBidi=xe})),new G("http://www.w3.org/ns/ttml#styling visibility",(function(Q,X,Se,Ae){X.style.visibility=Ae})),new G("http://www.w3.org/ns/ttml#styling wrapOption",(function(Q,X,Se,Ae){Ae==="wrap"?Se.space==="preserve"?X.style.whiteSpace="pre-wrap":X.style.whiteSpace="normal":Se.space==="preserve"?X.style.whiteSpace="pre":X.style.whiteSpace="noWrap"})),new G("http://www.w3.org/ns/ttml#styling writingMode",(function(Q,X,Se,Ae){Ae==="lrtb"||Ae==="lr"||Ae==="rltb"||Ae==="rl"?X.style.writingMode="horizontal-tb":Ae==="tblr"?X.style.writingMode="vertical-lr":Ae!=="tbrl"&&Ae!=="tb"||(X.style.writingMode="vertical-rl")})),new G("http://www.w3.org/ns/ttml#styling zIndex",(function(Q,X,Se,Ae){X.style.zIndex=Ae})),new G("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(Q,X,Se,Ae){Q.displayForcedOnlyMode&&Ae===!1&&(X.style.visibility="hidden")}))],ge={},Ne=0;Ne<ue.length;Ne++)ge[ue[Ne].qname]=ue[Ne];var fe="webkitRubyPosition"in window.getComputedStyle(document.documentElement),Me=fe?"webkitRubyPosition":"rubyPosition",Fe="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",ot="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function ke(Q,X){if(Q&&Q.error&&Q.error(X))throw X}})(pe,typeof imscNames>"u"?P(977):imscNames,typeof imscStyles>"u"?P(1219):imscStyles,typeof imscUtils>"u"?P(6404):imscUtils)},8905:function(vt,pe,P){(function(L,d,o,p){L.generateISD=function(G,ue,ge){var Ne,fe=new m(G),Me={},Fe={},ot=G.head.styling.initials[o.byName.showBackground.qname],ke=G.head.styling.initials[o.byName.backgroundColor.qname];for(var Q in G.head.layout.regions)if(G.head.layout.regions.hasOwnProperty(Q)){var X=G.head.layout.regions[Q],Se=X.styleAttrs[o.byName.showBackground.qname]||ot,Ae=X.styleAttrs[o.byName.backgroundColor.qname]||ke;Fe[X.id]=(Se==="always"||Se===void 0)&&Ae!==void 0&&!(ue<X.begin||ue>=X.end)}for(var xe in G.body&&G.body.regionID&&(Fe[G.body.regionID]=!0),Ne=G.body!==null?(function Ee(mt,He){if(He.contents){var Pe={};for(var Ke in He)He.hasOwnProperty(Ke)&&(Pe[Ke]=He[Ke]);return Pe.contents=[],He.contents.filter((function(Et){return!(mt<Et.begin||mt>=Et.end)})).forEach((function(Et){var Pt=Ee(mt,Et);Pt.regionID&&(Fe[Pt.regionID]=!0),Pt!==null&&Pe.contents.push(Pt)})),Pe}return He})(ue,G.body):null,Fe[""]!==void 0&&(Fe[""]=!0),Fe)if(Fe[xe]){var gt=y(G,ue,G.head.layout.regions[xe],Ne,null,"",G.head.layout.regions[xe],ge,Me);gt!==null&&fe.contents.push(gt.element)}return fe};var T=[o.byName.color.qname,o.byName.textCombine.qname,o.byName.textDecoration.qname,o.byName.textEmphasis.qname,o.byName.textOutline.qname,o.byName.textShadow.qname];function y(G,ue,ge,Ne,fe,Me,Fe,ot,ke){if(ue<Fe.begin||ue>=Fe.end)return null;var Q="regionID"in Fe&&Fe.regionID!==""?Fe.regionID:Me;if(fe!==null&&Q!==ge.id&&(!("contents"in Fe)||"contents"in Fe&&Fe.contents.length===0||Q!==""))return null;var X=new r(Fe);if("sets"in Fe)for(var Se=0;Se<Fe.sets.length;Se++)ue<Fe.sets[Se].begin||ue>=Fe.sets[Se].end||(X.styleAttrs[Fe.sets[Se].qname]=Fe.sets[Se].value);var Ae={};for(var xe in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(xe)&&(Ae[xe]=!0,X.kind==="region"&&xe===o.byName.writingMode.qname&&!(o.byName.direction.qname in X.styleAttrs))){var gt=X.styleAttrs[xe];
9gt==="lrtb"||gt==="lr"?X.styleAttrs[o.byName.direction.qname]="ltr":gt!=="rltb"&>!=="rl"||(X.styleAttrs[o.byName.direction.qname]="rtl")}if(fe!==null)for(var Ee=0;Ee<o.all.length;Ee++){var mt=o.all[Ee];if(mt.qname===o.byName.textDecoration.qname){var He=fe.styleAttrs[mt.qname],Pe=X.styleAttrs[mt.qname],Ke=[];Pe===void 0?Ke=He:Pe.indexOf("none")===-1?((Pe.indexOf("noUnderline")===-1&&He.indexOf("underline")!==-1||Pe.indexOf("underline")!==-1)&&Ke.push("underline"),(Pe.indexOf("noLineThrough")===-1&&He.indexOf("lineThrough")!==-1||Pe.indexOf("lineThrough")!==-1)&&Ke.push("lineThrough"),(Pe.indexOf("noOverline")===-1&&He.indexOf("overline")!==-1||Pe.indexOf("overline")!==-1)&&Ke.push("overline")):Ke.push("none"),X.styleAttrs[mt.qname]=Ke}else if(mt.qname!==o.byName.fontSize.qname||mt.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[o.byName.ruby.qname]!=="textContainer")if(mt.qname!==o.byName.fontSize.qname||mt.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[o.byName.ruby.qname]!=="text")mt.inherit&&mt.qname in fe.styleAttrs&&!(mt.qname in X.styleAttrs)&&(X.styleAttrs[mt.qname]=fe.styleAttrs[mt.qname]);else{var Et=fe.styleAttrs[o.byName.fontSize.qname];fe.styleAttrs[o.byName.ruby.qname]==="textContainer"?X.styleAttrs[mt.qname]=Et:X.styleAttrs[mt.qname]=new p.ComputedLength(.5*Et.rw,.5*Et.rh)}else{var Pt=fe.styleAttrs[o.byName.fontSize.qname];X.styleAttrs[mt.qname]=new p.ComputedLength(.5*Pt.rw,.5*Pt.rh)}}for(var xt=0;xt<o.all.length;xt++){var Lt=o.all[xt];if(!(Lt.qname in X.styleAttrs)&&!(Lt.qname===o.byName.position.qname&&o.byName.origin.qname in X.styleAttrs||Lt.qname===o.byName.origin.qname&&o.byName.position.qname in X.styleAttrs)){var sn=G.head.styling.initials[Lt.qname]||Lt.initial;if(sn!==null&&(X.kind==="region"||Lt.inherit===!1&&sn!==null)){var nn=Lt.parse(sn);nn!==null?(X.styleAttrs[Lt.qname]=nn,Ae[Lt.qname]=!0):H(ot,"Invalid initial value for '"+Lt.qname+"' on element '"+X.kind)}}}for(var Sn=0;Sn<o.all.length;Sn++){var ve=o.all[Sn];if(ve.qname in Ae&&ve.compute!==null){var Ie=ve.compute(G,fe,X,X.styleAttrs[ve.qname],ke);Ie!==null?X.styleAttrs[ve.qname]=Ie:(X.styleAttrs[ve.qname]=ve.compute(G,fe,X,ve.parse(ve.initial),ke),H(ot,"Style '"+ve.qname+"' on element '"+X.kind+"' cannot be computed"))}}if(X.styleAttrs[o.byName.display.qname]==="none")return null;var pt=null;fe===null?pt=Ne===null?[]:[Ne]:"contents"in Fe&&(pt=Fe.contents);for(var _t=0;pt!==null&&_t<pt.length;_t++){var Ye=y(G,ue,ge,Ne,X,Q,pt[_t],ot,ke);Ye!==null&&X.contents.push(Ye.element)}for(var Y in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(Y)){var k=!1;if(X.kind==="span"){var De=X.styleAttrs[o.byName.ruby.qname];(k=(De==="container"||De==="textContainer"||De==="baseContainer")&&T.indexOf(Y)!==-1)||(k=De!=="container"&&Y===o.byName.rubyAlign.qname),k||(k=!(De==="textContainer"||De==="text")&&Y===o.byName.rubyPosition.qname)}if(!k){var j=o.byQName[Y];"applies"in j&&(k=j.applies.indexOf(X.kind)===-1)}k&&delete X.styleAttrs[Y]}var We=X.styleAttrs[o.byName.ruby.qname];if(X.kind==="p"||X.kind==="span"&&(We==="textContainer"||We==="text")){var st=[];w(X,st),(function(Te){for(var Le,i=0;i<Te.length;)if((Le=Te[i]).kind!=="br"&&Le.space!=="preserve"){var l=Le.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(l)&&(i===0||(C=Te[i-1]).kind==="br"||/[\r\n\t ]$/.test(C.text))&&(l=l.substring(1)),Le.text=l,l.length===0?Te.splice(i,1):i++}else i++;var C,ne;for(i=0;i<Te.length;i++)(Le=Te[i]).kind!=="br"&&Le.space!=="preserve"?/[ ]$/.test(Le.text)&&(i===Te.length-1||(ne=Te[i+1]).kind==="br"||ne.space==="preserve"&&/^[\r\n]/.test(ne.text))&&(Le.text=Le.text.slice(0,-1)):i++})(st),h(X)}return X.kind==="div"&&o.byName.backgroundImage.qname in X.styleAttrs||X.kind==="br"||X.kind==="image"||"contents"in X&&X.contents.length>0||X.kind==="span"&&X.text!==null||X.kind==="region"&&X.styleAttrs[o.byName.showBackground.qname]==="always"?{region_id:Q,element:X}:null}function w(G,ue){if("contents"in G)for(var ge=0;ge<G.contents.length;ge++){var Ne=G.contents[ge],fe=Ne.styleAttrs[o.byName.ruby.qname];(Ne.kind!=="span"||fe!=="textContainer"&&fe!=="text")&&("contents"in Ne?w(Ne,ue):(Ne.kind==="span"&&Ne.text.length!==0||Ne.kind==="br")&&ue.push(Ne))}}function h(G){if(G.kind==="br")return!1;if("text"in G)return G.text.length===0;if("contents"in G){for(var ue=G.contents.length;ue--;)h(G.contents[ue])&&G.contents.splice(ue,1);return G.contents.length===0}}function m(G){this.contents=[],this.aspectRatio=G.aspectRatio,this.lang=G.lang}function r(G){for(var ue in this.kind=G.kind||"region",this.lang=G.lang,G.id&&
9(this.id=G.id),this.styleAttrs={},G.styleAttrs)G.styleAttrs.hasOwnProperty(ue)&&(this.styleAttrs[ue]=G.styleAttrs[ue]);"src"in G&&(this.src=G.src),"type"in G&&(this.type=G.type),"text"in G?this.text=G.text:(this.kind==="region"||"contents"in G)&&(this.contents=[]),"space"in G&&(this.space=G.space)}function H(G,ue){if(G&&G.error&&G.error(ue))throw ue}})(pe,typeof imscNames>"u"?P(977):imscNames,typeof imscStyles>"u"?P(1219):imscStyles,typeof imscUtils>"u"?P(6404):imscUtils)},7640:function(vt,pe,P){pe.generateISD=P(8905).generateISD,pe.fromXML=P(6739).fromXML,pe.renderHTML=P(1612).render},977:function(vt,pe){(function(P){P.ns_tt="http://www.w3.org/ns/ttml",P.ns_tts="http://www.w3.org/ns/ttml#styling",P.ns_ttp="http://www.w3.org/ns/ttml#parameter",P.ns_xml="http://www.w3.org/XML/1998/namespace",P.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",P.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",P.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",P.ns_ebutts="urn:ebu:tt:style"})(pe)},1219:function(vt,pe,P){(function(L,d,o){function p(w,h,m,r,H,G,ue,ge){this.name=h,this.ns=w,this.qname=w+" "+h,this.inherit=H,this.animatable=G,this.initial=m,this.applies=r,this.parse=ue,this.compute=ge}for(var T in L.all=[new p(d.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,o.parseColor,null),new p(d.ns_tts,"color","white",["span"],!0,!0,o.parseColor,null),new p(d.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"displayAlign","before",["region"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(w){if(w==="auto")return w;var h=w.split(" ");if(h.length!==2)return null;var m=o.parseLength(h[0]),r=o.parseLength(h[1]);return r&&m?{h:r,w:m}:null}),(function(w,h,m,r,H){var G,ue;if(r==="auto")G=new o.ComputedLength(0,1);else if((G=o.toComputedLength(r.h.value,r.h.unit,null,w.dimensions.h,null,w.pxLength.h))===null)return null;if(r==="auto")ue=new o.ComputedLength(1,0);else if((ue=o.toComputedLength(r.w.value,r.w.unit,null,w.dimensions.w,null,w.pxLength.w))===null)return null;return{h:G,w:ue}})),new p(d.ns_tts,"fontFamily","default",["span","p"],!0,!0,(function(w){for(var h=w.split(","),m=[],r=0;r<h.length;r++)h[r]=h[r].trim(),h[r].charAt(0)!=="'"&&h[r].charAt(0)!=='"'&&h[r]==="default"?m.push("monospaceSerif"):m.push(h[r]);return m}),null),new p(d.ns_tts,"shear","0%",["p"],!0,!0,o.parseLength,(function(w,h,m,r){return r.unit!=="%"?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value})),new p(d.ns_tts,"fontSize","1c",["span","p"],!0,!0,o.parseLength,(function(w,h,m,r,H){return o.toComputedLength(r.value,r.unit,h!==null?h.styleAttrs[L.byName.fontSize.qname]:w.cellLength.h,h!==null?h.styleAttrs[L.byName.fontSize.qname]:w.cellLength.h,w.cellLength.h,w.pxLength.h)})),new p(d.ns_tts,"fontStyle","normal",["span","p"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"fontWeight","normal",["span","p"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(w){return w==="normal"?w:o.parseLength(w)}),(function(w,h,m,r,H){var G;if(r==="normal")G=r;else if((G=o.toComputedLength(r.value,r.unit,m.styleAttrs[L.byName.fontSize.qname],m.styleAttrs[L.byName.fontSize.qname],w.cellLength.h,w.pxLength.h))===null)return null;return G})),new p(d.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new p(d.ns_tts,"origin","auto",["region"],!1,!0,(function(w){if(w==="auto")return w;var h=w.split(" ");if(h.length!==2)return null;var m=o.parseLength(h[0]),r=o.parseLength(h[1]);return r&&m?{h:r,w:m}:null}),(function(w,h,m,r,H){var G,ue;if(r==="auto")G=new o.ComputedLength(0,0);else if((G=o.toComputedLength(r.h.value,r.h.unit,null,w.dimensions.h,null,w.pxLength.h))===null)return null;if(r==="auto")ue=new o.ComputedLength(0,0);else if((ue=o.toComputedLength(r.w.value,r.w.unit,null,w.dimensions.w,null,w.pxLength.w))===null)return null;return{h:G,w:ue}}
9)),new p(d.ns_tts,"overflow","hidden",["region"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"padding","0px",["region"],!1,!0,(function(w){var h=w.split(" ");if(h.length>4)return null;for(var m=[],r=0;r<h.length;r++){var H=o.parseLength(h[r]);if(!H)return null;m.push(H)}return m}),(function(w,h,m,r,H){var G;if(r.length===1)G=[r[0],r[0],r[0],r[0]];else if(r.length===2)G=[r[0],r[1],r[0],r[1]];else if(r.length===3)G=[r[0],r[1],r[2],r[1]];else{if(r.length!==4)return null;G=[r[0],r[1],r[2],r[3]]}var ue=m.styleAttrs[L.byName.writingMode.qname];if(ue==="lrtb"||ue==="lr")G=[G[0],G[3],G[2],G[1]];else if(ue==="rltb"||ue==="rl")G=[G[0],G[1],G[2],G[3]];else if(ue==="tblr")G=[G[3],G[0],G[1],G[2]];else{if(ue!=="tbrl"&&ue!=="tb")return null;G=[G[3],G[2],G[1],G[0]]}for(var ge=[],Ne=0;Ne<G.length;Ne++)if(G[Ne].value===0)ge[Ne]=new o.ComputedLength(0,0);else if(ge[Ne]=o.toComputedLength(G[Ne].value,G[Ne].unit,m.styleAttrs[L.byName.fontSize.qname],Ne===0||Ne===2?m.styleAttrs[L.byName.extent.qname].h:m.styleAttrs[L.byName.extent.qname].w,Ne===0||Ne===2?w.cellLength.h:w.cellLength.w,Ne===0||Ne===2?w.pxLength.h:w.pxLength.w),ge[Ne]===null)return null;return ge})),new p(d.ns_tts,"position","top left",["region"],!1,!0,(function(w){return o.parsePosition(w)}),(function(w,h,m,r){var H,G;return(H=o.toComputedLength(r.v.offset.value,r.v.offset.unit,null,new o.ComputedLength(-m.styleAttrs[L.byName.extent.qname].h.rw,w.dimensions.h.rh-m.styleAttrs[L.byName.extent.qname].h.rh),null,w.pxLength.h))===null?null:(r.v.edge==="bottom"&&(H=new o.ComputedLength(-H.rw-m.styleAttrs[L.byName.extent.qname].h.rw,w.dimensions.h.rh-H.rh-m.styleAttrs[L.byName.extent.qname].h.rh)),G=o.toComputedLength(r.h.offset.value,r.h.offset.unit,null,new o.ComputedLength(w.dimensions.w.rw-m.styleAttrs[L.byName.extent.qname].w.rw,-m.styleAttrs[L.byName.extent.qname].w.rh),null,w.pxLength.w),H===null?null:(r.h.edge==="right"&&(G=new o.ComputedLength(w.dimensions.w.rw-G.rw-m.styleAttrs[L.byName.extent.qname].w.rw,-G.rh-m.styleAttrs[L.byName.extent.qname].w.rh)),{h:H,w:G}))})),new p(d.ns_tts,"ruby","none",["span"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(w){return w!=="center"&&w!=="spaceAround"?null:w}),null),new p(d.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(w){var h=w.split(" "),m=[null,null];if(h.length===0||h.length>2||h[0]!=="none"&&h[0]!=="both"&&h[0]!=="after"&&h[0]!=="before"&&h[0]!=="outside")return null;if(m[0]=h[0],h.length===2&&h[0]!=="none"){var r=o.parseLength(h[1]);if(!r)return null;m[1]=r}return m}),(function(w,h,m,r,H){if(r[0]==="none")return r;var G;return(G=r[1]===null?new o.ComputedLength(.5*m.styleAttrs[L.byName.fontSize.qname].rw,.5*m.styleAttrs[L.byName.fontSize.qname].rh):o.toComputedLength(r[1].value,r[1].unit,m.styleAttrs[L.byName.fontSize.qname],m.styleAttrs[L.byName.fontSize.qname],w.cellLength.h,w.pxLength.h))===null?null:[r[0],G]})),new p(d.ns_tts,"showBackground","always",["region"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"textAlign","start",["p"],!0,!0,(function(w){return w}),(function(w,h,m,r,H){return r==="left"?"start":r==="right"?"end":r})),new p(d.ns_tts,"textCombine","none",["span"],!0,!0,(function(w){return w==="none"||w==="all"?w:null}),null),new p(d.ns_tts,"textDecoration","none",["span"],!0,!0,(function(w){return w.split(" ")}),null),new p(d.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(w){for(var h=w.split(" "),m={style:null,symbol:null,color:null,position:null},r=0;r<h.length;r++)if(h[r]==="none"||h[r]==="auto")m.style=h[r];else if(h[r]==="filled"||h[r]==="open")m.style=h[r];else if(h[r]==="circle"||h[r]==="dot"||h[r]==="sesame")m.symbol=h[r];else if(h[r]==="current")m.color=h[r];else if(h[r]==="outside"||h[r]==="before"||h[r]==="after")m.position=h[r];else if(m.color=o.parseColor(h[r]),m.color===null)return null;return m.style==null&&m.symbol==null?m.style="auto":(m.symbol=m.symbol||"circle",m.style=m.style||"filled"),m.position=m.position||"outside",m.color=m.color||"current",m}),null),new p(d.ns_tts,"textOutline","none",["span"],!0,!0,(function(w){if(w==="none")return w;var h={},m=w.split(" ");if(m.length===0||m.length>2)return null;var r=o.parseColor(m[0]);if(h.color=r,r!==null&&m.shift(),m.length!==1)return null;var H=o.parseLength(m[0]);return H?(h.thickness=H,h):null}),(function(w,h,m,r,H){if(r==="none")return r;var G={};return r.color===null?G.color=m.styleAttrs[L.byName.color.qname]:G.color=r.color,G.thickness=o.toComputedLength(r.thickness.value,r.thickness.unit,m.styleAttrs[L.byName.fontSize.qname],m.styleAttrs[L.byName.fontSize.qname],w.cellLength.h,w.pxLength.h),G.thickness===null?null:G})),new p(d.ns_tts,"textShadow","none",["span"],!0,!0,o.parseTextShadow,(function(w,h,m,r){if(r==="none")return r;for(var H=[],G=0;G<r.length;G++){var ue={};if(ue.x_off=o.toComputedLength(r[G][0].value,r[G][0].unit,null,m.styleAttrs[L.byName.fontSize.qname],null,w.pxLength.w),ue.x_off===null||(ue.y_off=o.toComputedLength(r[G][1].value,r[G][1].unit,null,m.styleAttrs[L.byName.fontSize.qname],null,w.pxLength.h),ue.y_off===null))return null;if(r[G][2]===null)ue.b_radius=0;else if(ue.b_radius=o.toComputedLength(r[G][2].value,r[G][2].unit,null,m.styleAttrs[L.byName.fontSize.qname],null,w.pxLength.h),ue.b_radius===null)return null;r[G][3]===null?ue.color=m.styleAttrs[L.byName.color.qname]:ue.color=r[G][3],H.push(ue)}return H}
9)),new p(d.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(w){return w}),null),new p(d.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(w){return w}),null),new p(d.ns_tts,"zIndex","auto",["region"],!1,!0,(function(w){var h;return w==="auto"?h=w:(h=parseInt(w),isNaN(h)&&(h=null)),h}),null),new p(d.ns_ebutts,"linePadding","0c",["p"],!0,!1,o.parseLength,(function(w,h,m,r,H){return o.toComputedLength(r.value,r.unit,null,null,w.cellLength.w,null)})),new p(d.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(w){return w}),null),new p(d.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(w){return w}),null),new p(d.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(w){return w==="true"}),null),new p(d.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(w){return w==="true"}),null)],L.byQName={},L.all)L.byQName[L.all[T].qname]=L.all[T];for(var y in L.byName={},L.all)L.byName[L.all[y].name]=L.all[y]})(pe,typeof imscNames>"u"?P(977):imscNames,typeof imscUtils>"u"?P(6404):imscUtils)},6404:function(vt,pe){(function(P){var L=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,d=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,o=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,p={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]};P.parseColor=function(y){var w,h=null,m=p[y.toLowerCase()];return m!==void 0?h=m:(w=L.exec(y))!==null?h=[parseInt(w[1],16),parseInt(w[2],16),parseInt(w[3],16),w[4]!==void 0?parseInt(w[4],16):255]:(w=d.exec(y))!==null?h=[parseInt(w[1]),parseInt(w[2]),parseInt(w[3]),255]:(w=o.exec(y))!==null&&(h=[parseInt(w[1]),parseInt(w[2]),parseInt(w[3]),parseInt(w[4])]),h};var T=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;P.parseLength=function(y){var w,h=null;return(w=T.exec(y))!==null&&(h={value:parseFloat(w[1]),unit:w[2]}),h},P.parseTextShadow=function(y){for(var w=y.match(/([^\(,\)]|\([^\)]+\))+/g),h=[],m=0;m<w.length;m++){var r=w[m].split(" ");if(r.length===1&&r[0]==="none")return"none";if(r.length>1&&r.length<5){var H=[null,null,null,null],G=P.parseLength(r.shift());if(G===null||(H[0]=G,(G=P.parseLength(r.shift()))===null))return null;if(H[1]=G,r.length===0){h.push(H);continue}if((G=P.parseLength(r[0]))!==null&&(H[2]=G,r.shift()),r.length===0){h.push(H);continue}var ue=P.parseColor(r[0]);if(ue===null)return null;H[3]=ue,h.push(H)}}return h},P.parsePosition=function(y){var w=y.split(" "),h=function(Ne){return Ne==="center"||Ne==="left"||Ne==="top"||Ne==="bottom"||Ne==="right"};if(w.length>4)return null;for(var m=0;m<w.length;m++)if(!h(w[m])){var r=P.parseLength(w[m]);if(r===null)return null;w[m]=r}for(var H={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},G=0;G<w.length;){var ue=w[G++];if(h(ue)){var ge={value:0,unit:"%"};w.length!==2&&G<w.length&&!h(w[G])&&(ge=w[G++]),ue==="right"?(H.h.edge=ue,H.h.offset=ge):ue==="bottom"?(H.v.edge=ue,H.v.offset=ge):ue==="left"?H.h.offset=ge:ue==="top"&&(H.v.offset=ge)}else{if(w.length!==1&&w.length!==2)return null;G===1?H.h.offset=ue:H.v.offset=ue}}return H},P.ComputedLength=function(y,w){this.rw=y,this.rh=w},P.ComputedLength.prototype.toUsedLength=function(y,w){return y*this.rw+w*this.rh},P.ComputedLength.prototype.isZero=function(){return this.rw===0&&this.rh===0},P.toComputedLength=function(y,w,h,m,r,H){return w==="%"&&m?new P.ComputedLength(m.rw*y/100,m.rh*y/100):w==="em"&&h?new P.ComputedLength(h.rw*y,h.rh*y):w==="c"&&r?new P.ComputedLength(y*r.rw,y*r.rh):w==="px"&&H?new P.ComputedLength(y*H.rw,y*H.rh):w==="rh"?new P.ComputedLength(0,y/100):w==="rw"?new P.ComputedLength(y/100,0):null}})(pe)},7523:function(vt){typeof Object.create=="function"?vt.exports=function(pe,P){P&&(pe.super_=P,pe.prototype=Object.create(P.prototype,{constructor:{value:pe,enumerable:!1,writable:!0,configurable:!0}}))}:vt.exports=function(pe,P){if(P){pe.super_=P;var L=function(){};L.prototype=P.prototype,pe.prototype=new L,pe.prototype.constructor=pe}}},3282:function(vt){function pe(d){if(typeof d!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(d))}function P(d,o){for(var p,T="",y=0,w=-1,h=0,m=0;m<=d.length;
vendor: 3,954 bytes, line 9
9++m){if(m<d.length)p=d.charCodeAt(m);else{if(p===47)break;p=47}if(p===47){if(!(w===m-1||h===1))if(w!==m-1&&h===2){if(T.length<2||y!==2||T.charCodeAt(T.length-1)!==46||T.charCodeAt(T.length-2)!==46){if(T.length>2){var r=T.lastIndexOf("/");if(r!==T.length-1){r===-1?(T="",y=0):y=(T=T.slice(0,r)).length-1-T.lastIndexOf("/"),w=m,h=0;continue}}else if(T.length===2||T.length===1){T="",y=0,w=m,h=0;continue}}o&&(T.length>0?T+="/..":T="..",y=2)}else T.length>0?T+="/"+d.slice(w+1,m):T=d.slice(w+1,m),y=m-w-1;w=m,h=0}else p===46&&h!==-1?++h:h=-1}return T}var L={resolve:function(){for(var d,o="",p=!1,T=arguments.length-1;T>=-1&&!p;T--){var y;T>=0?y=arguments[T]:(d===void 0&&(d=process.cwd()),y=d),pe(y),y.length!==0&&(o=y+"/"+o,p=y.charCodeAt(0)===47)}return o=P(o,!p),p?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(d){if(pe(d),d.length===0)return".";var o=d.charCodeAt(0)===47,p=d.charCodeAt(d.length-1)===47;return(d=P(d,!o)).length!==0||o||(d="."),d.length>0&&p&&(d+="/"),o?"/"+d:d},isAbsolute:function(d){return pe(d),d.length>0&&d.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var d,o=0;o<arguments.length;++o){var p=arguments[o];pe(p),p.length>0&&(d===void 0?d=p:d+="/"+p)}return d===void 0?".":L.normalize(d)},relative:function(d,o){if(pe(d),pe(o),d===o||(d=L.resolve(d))===(o=L.resolve(o)))return"";for(var p=1;p<d.length&&d.charCodeAt(p)===47;++p);for(var T=d.length,y=T-p,w=1;w<o.length&&o.charCodeAt(w)===47;++w);for(var h=o.length-w,m=y<h?y:h,r=-1,H=0;H<=m;++H){if(H===m){if(h>m){if(o.charCodeAt(w+H)===47)return o.slice(w+H+1);if(H===0)return o.slice(w+H)}else y>m&&(d.charCodeAt(p+H)===47?r=H:H===0&&(r=0));break}var G=d.charCodeAt(p+H);if(G!==o.charCodeAt(w+H))break;G===47&&(r=H)}var ue="";for(H=p+r+1;H<=T;++H)H!==T&&d.charCodeAt(H)!==47||(ue.length===0?ue+="..":ue+="/..");return ue.length>0?ue+o.slice(w+r):(w+=r,o.charCodeAt(w)===47&&++w,o.slice(w))},_makeLong:function(d){return d},dirname:function(d){if(pe(d),d.length===0)return".";for(var o=d.charCodeAt(0),p=o===47,T=-1,y=!0,w=d.length-1;w>=1;--w)if((o=d.charCodeAt(w))===47){if(!y){T=w;break}}else y=!1;return T===-1?p?"/":".":p&&T===1?"//":d.slice(0,T)},basename:function(d,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');pe(d);var p,T=0,y=-1,w=!0;if(o!==void 0&&o.length>0&&o.length<=d.length){if(o.length===d.length&&o===d)return"";var h=o.length-1,m=-1;for(p=d.length-1;p>=0;--p){var r=d.charCodeAt(p);if(r===47){if(!w){T=p+1;break}}else m===-1&&(w=!1,m=p+1),h>=0&&(r===o.charCodeAt(h)?--h==-1&&(y=p):(h=-1,y=m))}return T===y?y=m:y===-1&&(y=d.length),d.slice(T,y)}for(p=d.length-1;p>=0;--p)if(d.charCodeAt(p)===47){if(!w){T=p+1;break}}else y===-1&&(w=!1,y=p+1);return y===-1?"":d.slice(T,y)},extname:function(d){pe(d);for(var o=-1,p=0,T=-1,y=!0,w=0,h=d.length-1;h>=0;--h){var m=d.charCodeAt(h);if(m!==47)T===-1&&(y=!1,T=h+1),m===46?o===-1?o=h:w!==1&&(w=1):o!==-1&&(w=-1);else if(!y){p=h+1;break}}return o===-1||T===-1||w===0||w===1&&o===T-1&&o===p+1?"":d.slice(o,T)},format:function(d){if(d===null||typeof d!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof d);return(function(o,p){var T=p.dir||p.root,y=p.base||(p.name||"")+(p.ext||"");return T?T===p.root?T+y:T+"/"+y:y})(0,d)},parse:function(d){pe(d);var o={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return o;var p,T=d.charCodeAt(0),y=T===47;y?(o.root="/",p=1):p=0;for(var w=-1,h=0,m=-1,r=!0,H=d.length-1,G=0;H>=p;--H)if((T=d.charCodeAt(H))!==47)m===-1&&(r=!1,m=H+1),T===46?w===-1?w=H:G!==1&&(G=1):w!==-1&&(G=-1);else if(!r){h=H+1;break}return w===-1||m===-1||G===0||G===1&&w===m-1&&w===h+1?m!==-1&&(o.base=o.name=h===0&&y?d.slice(1,m):d.slice(h,m)):(h===0&&y?(o.name=d.slice(1,w),o.base=d.slice(1,m)):(o.name=d.slice(h,w),o.base=d.slice(h,m)),o.ext=d.slice(w,m)),h>0?o.dir=d.slice(0,h-1):y&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};L.posix=L,vt.exports=L}
9,3515:function(vt,pe,P){vt.exports=d;var L=P(9826).EventEmitter;function d(){L.call(this)}P(7523)(d,L),d.Readable=P(2762),d.Writable=P(3726),d.Duplex=P(884),d.Transform=P(6756),d.PassThrough=P(1390),d.finished=P(2896),d.pipeline=P(8460),d.Stream=d,d.prototype.pipe=function(o,p){var T=this;function y(ue){o.writable&&o.write(ue)===!1&&T.pause&&T.pause()}function w(){T.readable&&T.resume&&T.resume()}T.on("data",y),o.on("drain",w),o._isStdio||p&&p.end===!1||(T.on("end",m),T.on("close",r));var h=!1;function m(){h||(h=!0,o.end())}function r(){h||(h=!0,typeof o.destroy=="function"&&o.destroy())}function H(ue){if(G(),L.listenerCount(this,"error")===0)throw ue}function G(){T.removeListener("data",y),o.removeListener("drain",w),T.removeListener("end",m),T.removeListener("close",r),T.removeListener("error",H),o.removeListener("error",H),T.removeListener("end",G),T.removeListener("close",G),o.removeListener("close",G)}return T.on("error",H),o.on("error",H),T.on("end",G),T.on("close",G),o.on("close",G),o.emit("pipe",T),o}},1602:function(vt){var pe={};function P(d,o,p){p||(p=Error);var T=(function(y){var w,h;function m(r,H,G){return y.call(this,(function(ue,ge,Ne){return typeof o=="string"?o:o(ue,ge,Ne)})(r,H,G))||this}return h=y,(w=m).prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h,m})(p);T.prototype.name=p.name,T.prototype.code=d,pe[d]=T}function L(d,o){if(Array.isArray(d)){var p=d.length;return d=d.map((function(T){return String(T)})),p>2?"one of ".concat(o," ").concat(d.slice(0,p-1).join(", "),", or ")+d[p-1]:p===2?"one of ".concat(o," ").concat(d[0]," or ").concat(d[1]):"of ".concat(o," ").concat(d[0])}return"of ".concat(o," ").concat(String(d))}P("ERR_INVALID_OPT_VALUE",(function(d,o){return'The value "'+o+'" is invalid for option "'+d+'"'}),TypeError),P("ERR_INVALID_ARG_TYPE",(function(d,o,p){var T,y,w,h,m;if(typeof o=="string"&&(y="not ",o.substr(0,4)===y)?(T="must not be",o=o.replace(/^not /,"")):T="must be",(function(H,G,ue){return(ue===void 0||ue>H.length)&&(ue=H.length),H.substring(ue-9,ue)===G})(d," argument"))w="The ".concat(d," ").concat(T," ").concat(L(o,"type"));else{var r=(typeof m!="number"&&(m=0),m+1>(h=d).length||h.indexOf(".",m)===-1?"argument":"property");w='The "'.concat(d,'" ').concat(r," ").concat(T," ").concat(L(o,"type"))}return w+". Received type ".concat(typeof p)}),TypeError),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),P("ERR_METHOD_NOT_IMPLEMENTED",(function(d){return"The "+d+" method is not implemented"})),P("ERR_STREAM_PREMATURE_CLOSE","Premature close"),P("ERR_STREAM_DESTROYED",(function(d){return"Cannot call "+d+" after a stream was destroyed"})),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),P("ERR_STREAM_WRITE_AFTER_END","write after end"),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_UNKNOWN_ENCODING",(function(d){return"Unknown encoding: "+d}),TypeError),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),vt.exports.codes=pe},884:function(vt,pe,P){var L=Object.keys||function(r){var H=[];for(var G in r)H.push(G);return H};vt.exports=w;var d=P(2762),o=P(3726);P(7523)(w,d);for(var p=L(o.prototype),T=0;T<p.length;T++){var y=p[T];w.prototype[y]||(w.prototype[y]=o.prototype[y])}function w(r){if(!(this instanceof w))return new w(r);d.call(this,r),o.call(this,r),this.allowHalfOpen=!0,r&&(r.readable===!1&&(this.readable=!1),r.writable===!1&&(this.writable=!1),r.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||process.nextTick(m,this)}function m(r){r.end()}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=r,this._writableState.destroyed=r)}})}
9,1390:function(vt,pe,P){vt.exports=d;var L=P(6756);function d(o){if(!(this instanceof d))return new d(o);L.call(this,o)}P(7523)(d,L),d.prototype._transform=function(o,p,T){T(null,o)}},2762:function(vt,pe,P){var L;vt.exports=X,X.ReadableState=Q,P(9826).EventEmitter;var d,o=function(ve,Ie){return ve.listeners(Ie).length},p=P(2611),T=P(44).Buffer,y=(P.g!==void 0?P.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},w=P(7199);d=w&&w.debuglog?w.debuglog("stream"):function(){};var h,m,r,H=P(3791),G=P(2410),ue=P(1749).getHighWaterMark,ge=P(1602).codes,Ne=ge.ERR_INVALID_ARG_TYPE,fe=ge.ERR_STREAM_PUSH_AFTER_EOF,Me=ge.ERR_METHOD_NOT_IMPLEMENTED,Fe=ge.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;P(7523)(X,p);var ot=G.errorOrDestroy,ke=["error","close","destroy","pause","resume"];function Q(ve,Ie,pt){L=L||P(884),ve=ve||{},typeof pt!="boolean"&&(pt=Ie instanceof L),this.objectMode=!!ve.objectMode,pt&&(this.objectMode=this.objectMode||!!ve.readableObjectMode),this.highWaterMark=ue(this,ve,"readableHighWaterMark",pt),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.paused=!0,this.emitClose=ve.emitClose!==!1,this.autoDestroy=!!ve.autoDestroy,this.destroyed=!1,this.defaultEncoding=ve.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ve.encoding&&(h||(h=P(748).StringDecoder),this.decoder=new h(ve.encoding),this.encoding=ve.encoding)}function X(ve){if(L=L||P(884),!(this instanceof X))return new X(ve);var Ie=this instanceof L;this._readableState=new Q(ve,this,Ie),this.readable=!0,ve&&(typeof ve.read=="function"&&(this._read=ve.read),typeof ve.destroy=="function"&&(this._destroy=ve.destroy)),p.call(this)}function Se(ve,Ie,pt,_t,Ye){d("readableAddChunk",Ie);var Y,k=ve._readableState;if(Ie===null)k.reading=!1,(function(De,j){if(d("onEofChunk"),!j.ended){if(j.decoder){var We=j.decoder.end();We&&We.length&&(j.buffer.push(We),j.length+=j.objectMode?1:We.length)}j.ended=!0,j.sync?Ee(De):(j.needReadable=!1,j.emittedReadable||(j.emittedReadable=!0,mt(De)))}})(ve,k);else if(Ye||(Y=(function(De,j){var We,st;return st=j,T.isBuffer(st)||st instanceof y||typeof j=="string"||j===void 0||De.objectMode||(We=new Ne("chunk",["string","Buffer","Uint8Array"],j)),We})(k,Ie)),Y)ot(ve,Y);else if(k.objectMode||Ie&&Ie.length>0)if(typeof Ie=="string"||k.objectMode||Object.getPrototypeOf(Ie)===T.prototype||(Ie=(function(De){return T.from(De)})(Ie)),_t)k.endEmitted?ot(ve,new Fe):Ae(ve,k,Ie,!0);else if(k.ended)ot(ve,new fe);else{if(k.destroyed)return!1;k.reading=!1,k.decoder&&!pt?(Ie=k.decoder.write(Ie),k.objectMode||Ie.length!==0?Ae(ve,k,Ie,!1):He(ve,k)):Ae(ve,k,Ie,!1)}else _t||(k.reading=!1,He(ve,k));return!k.ended&&(k.length<k.highWaterMark||k.length===0)}function Ae(ve,Ie,pt,_t){Ie.flowing&&Ie.length===0&&!Ie.sync?(Ie.awaitDrain=0,ve.emit("data",pt)):(Ie.length+=Ie.objectMode?1:pt.length,_t?Ie.buffer.unshift(pt):Ie.buffer.push(pt),Ie.needReadable&&Ee(ve)),He(ve,Ie)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ve){this._readableState&&(this._readableState.destroyed=ve)}}),X.prototype.destroy=G.destroy,X.prototype._undestroy=G.undestroy,X.prototype._destroy=function(ve,Ie){Ie(ve)},X.prototype.push=function(ve,Ie){var pt,_t=this._readableState;return _t.objectMode?pt=!0:typeof ve=="string"&&((Ie=Ie||_t.defaultEncoding)!==_t.encoding&&(ve=T.from(ve,Ie),Ie=""),pt=!0),Se(this,ve,Ie,!1,pt)},X.prototype.unshift=function(ve){return Se(this,ve,null,!0,!1)},X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(ve){h||(h=P(748).StringDecoder);var Ie=new h(ve);this._readableState.decoder=Ie,this._readableState.encoding=this._readableState.decoder.encoding;for(var pt=this._readableState.buffer.head,_t="";pt!==null;)_t+=Ie.write(pt.data),pt=pt.next;return this._readableState.buffer.clear(),_t!==""&&this._readableState.buffer.push(_t),this._readableState.length=_t.length,this};var xe=1073741824;function gt(ve,Ie){return ve<=0||Ie.length===0&&Ie.ended?0:Ie.objectMode?1:ve!=ve?Ie.flowing&&Ie.length?Ie.buffer.head.data.length:Ie.length:(ve>Ie.highWaterMark&&(Ie.highWaterMark=(function(pt){return pt>=xe?pt=xe:(pt--,pt|=pt>>>1,pt|=pt>>>2,pt|=pt>>>4,pt|=pt>>>8,pt|=pt>>>16,pt++),pt})(ve)),ve<=Ie.length?ve:Ie.ended?Ie.length:(Ie.needReadable=!0,0))}function Ee(ve){var Ie=ve._readableState;d("emitReadable",Ie.needReadable,Ie.emittedReadable),Ie.needReadable=!1,Ie.emittedReadable||(d("emitReadable",Ie.flowing),Ie.emittedReadable=!0,process.nextTick(mt,ve))}function mt(ve){var Ie=ve._readableState;d("emitReadable_",Ie.destroyed,Ie.length,Ie.ended),Ie.destroyed||!Ie.length&&!Ie.ended||(ve.emit("readable"),Ie.emittedReadable=!1),Ie.needReadable=!Ie.flowing&&!Ie.ended&&Ie.length<=Ie.highWaterMark,xt(ve)}function He(ve,Ie){Ie.readingMore||(Ie.readingMore=!0,process.nextTick(Pe,ve,Ie))}function Pe(ve,Ie){for(;!Ie.reading&&!Ie.ended&&(Ie.length<Ie.highWaterMark||Ie.flowing&&Ie.length===0);){var pt=Ie.length;if(d("maybeReadMore read 0"),ve.read(0),pt===Ie.length)break}Ie.readingMore=!1}function Ke(ve){var Ie=ve._readableState;Ie.readableListening=ve.listenerCount("readable")>0,Ie.resumeScheduled&&!Ie.paused?Ie.flowing=!0:ve.listenerCount("data")>0&&ve.resume()}function Et(ve){d("readable nexttick read 0"),ve.read(0)}function Pt(ve,Ie){d("resume",Ie.reading),Ie.reading||ve.read(0),Ie.resumeScheduled=!1,ve.emit("resume"),xt(ve),Ie.flowing&&!Ie.reading&&ve.read(0)}function xt(ve){var Ie=ve._readableState;for(d("flow",Ie.flowing);Ie.flowing&&ve.read()!==null;);}function Lt(ve,Ie){return Ie.length===0?null:(Ie.objectMode?pt=Ie.buffer.shift():!ve||ve>=Ie.length?(pt=Ie.decoder?Ie.buffer.join(""):Ie.buffer.length===1?Ie.buffer.first():Ie.buffer.concat(Ie.length),Ie.buffer.clear()):pt=Ie.buffer.consume(ve,Ie.decoder),pt);var pt}function sn(ve){var Ie=ve._readableState;d("endReadable",Ie.endEmitted),Ie.endEmitted||(Ie.ended=!0,process.nextTick(nn,Ie,ve))}function nn(ve,Ie){if(d("endReadableNT",ve.endEmitted,ve.length),!ve.endEmitted&&ve.length===0&&(ve.endEmitted=!0,Ie.readable=!1,Ie.emit("end"),ve.autoDestroy)){var pt=Ie._writableState;(!pt||pt.autoDestroy&&pt.finished)&&Ie.destroy()}}function Sn(ve,Ie){for(var pt=0,_t=ve.length;pt<_t;pt++)if(ve[pt]===Ie)return pt;return-1}X.prototype.read=function(ve){d("read",ve),ve=parseInt(ve,10);var Ie=this._readableState,pt=ve;if(ve!==0&&(Ie.emittedReadable=!1),ve===0&&Ie.needReadable&&((Ie.highWaterMark!==0?Ie.length>=Ie.highWaterMark:Ie.length>0)||Ie.ended))return d("read: emitReadable",Ie.length,Ie.ended),Ie.length===0&&Ie.ended?sn(this):Ee(this),null;if((ve=gt(ve,Ie))===0&&Ie.ended)return Ie.length===0&&sn(this),null;var _t,Ye=Ie.needReadable;return d("need readable",Ye),(Ie.length===0||Ie.length-ve<Ie.highWaterMark)&&d("length less than watermark",Ye=!0),Ie.ended||Ie.reading?d("reading or ended",Ye=!1):Ye&&(d("do read"),Ie.reading=!0,Ie.sync=!0,Ie.length===0&&(Ie.needReadable=!0),this._read(Ie.highWaterMark),Ie.sync=!1,Ie.reading||(ve=gt(pt,Ie))),(_t=ve>0?Lt(ve,Ie):null)===null?(Ie.needReadable=Ie.length<=Ie.highWaterMark,ve=0):(Ie.length-=ve,Ie.awaitDrain=0),Ie.length===0&&(Ie.ended||(Ie.needReadable=!0),pt!==ve&&Ie.ended&&sn(this)),_t!==null&&this.emit
9("data",_t),_t},X.prototype._read=function(ve){ot(this,new Me("_read()"))},X.prototype.pipe=function(ve,Ie){var pt=this,_t=this._readableState;switch(_t.pipesCount){case 0:_t.pipes=ve;break;case 1:_t.pipes=[_t.pipes,ve];break;default:_t.pipes.push(ve)}_t.pipesCount+=1,d("pipe count=%d opts=%j",_t.pipesCount,Ie);var Ye=Ie&&Ie.end===!1||ve===process.stdout||ve===process.stderr?Le:Y;function Y(){d("onend"),ve.end()}_t.endEmitted?process.nextTick(Ye):pt.once("end",Ye),ve.on("unpipe",(function i(l,C){d("onunpipe"),l===pt&&C&&C.hasUnpiped===!1&&(C.hasUnpiped=!0,d("cleanup"),ve.removeListener("close",st),ve.removeListener("finish",Te),ve.removeListener("drain",k),ve.removeListener("error",We),ve.removeListener("unpipe",i),pt.removeListener("end",Y),pt.removeListener("end",Le),pt.removeListener("data",j),De=!0,!_t.awaitDrain||ve._writableState&&!ve._writableState.needDrain||k())}));var k=(function(i){return function(){var l=i._readableState;d("pipeOnDrain",l.awaitDrain),l.awaitDrain&&l.awaitDrain--,l.awaitDrain===0&&o(i,"data")&&(l.flowing=!0,xt(i))}})(pt);ve.on("drain",k);var De=!1;function j(i){d("ondata");var l=ve.write(i);d("dest.write",l),l===!1&&((_t.pipesCount===1&&_t.pipes===ve||_t.pipesCount>1&&Sn(_t.pipes,ve)!==-1)&&!De&&(d("false write response, pause",_t.awaitDrain),_t.awaitDrain++),pt.pause())}function We(i){d("onerror",i),Le(),ve.removeListener("error",We),o(ve,"error")===0&&ot(ve,i)}function st(){ve.removeListener("finish",Te),Le()}function Te(){d("onfinish"),ve.removeListener("close",st),Le()}function Le(){d("unpipe"),pt.unpipe(ve)}return pt.on("data",j),(function(i,l,C){if(typeof i.prependListener=="function")return i.prependListener(l,C);i._events&&i._events[l]?Array.isArray(i._events[l])?i._events[l].unshift(C):i._events[l]=[C,i._events[l]]:i.on(l,C)})(ve,"error",We),ve.once("close",st),ve.once("finish",Te),ve.emit("pipe",pt),_t.flowing||(d("pipe resume"),pt.resume()),ve},X.prototype.unpipe=function(ve){var Ie=this._readableState,pt={hasUnpiped:!1};if(Ie.pipesCount===0)return this;if(Ie.pipesCount===1)return ve&&ve!==Ie.pipes||(ve||(ve=Ie.pipes),Ie.pipes=null,Ie.pipesCount=0,Ie.flowing=!1,ve&&ve.emit("unpipe",this,pt)),this;if(!ve){var _t=Ie.pipes,Ye=Ie.pipesCount;Ie.pipes=null,Ie.pipesCount=0,Ie.flowing=!1;for(var Y=0;Y<Ye;Y++)_t[Y].emit("unpipe",this,{hasUnpiped:!1});return this}var k=Sn(Ie.pipes,ve);return k===-1||(Ie.pipes.splice(k,1),Ie.pipesCount-=1,Ie.pipesCount===1&&(Ie.pipes=Ie.pipes[0]),ve.emit("unpipe",this,pt)),this},X.prototype.on=function(ve,Ie){var pt=p.prototype.on.call(this,ve,Ie),_t=this._readableState;return ve==="data"?(_t.readableListening=this.listenerCount("readable")>0,_t.flowing!==!1&&this.resume()):ve==="readable"&&(_t.endEmitted||_t.readableListening||(_t.readableListening=_t.needReadable=!0,_t.flowing=!1,_t.emittedReadable=!1,d("on readable",_t.length,_t.reading),_t.length?Ee(this):_t.reading||process.nextTick(Et,this))),pt},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(ve,Ie){var pt=p.prototype.removeListener.call(this,ve,Ie);return ve==="readable"&&process.nextTick(Ke,this),pt},X.prototype.removeAllListeners=function(ve){var Ie=p.prototype.removeAllListeners.apply(this,arguments);return ve!=="readable"&&ve!==void 0||process.nextTick(Ke,this),Ie},X.prototype.resume=function(){var ve=this._readableState;return ve.flowing||(d("resume"),ve.flowing=!ve.readableListening,(function(Ie,pt){pt.resumeScheduled||(pt.resumeScheduled=!0,process.nextTick(Pt,Ie,pt))})(this,ve)),ve.paused=!1,this},X.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},X.prototype.wrap=function(ve){var Ie=this,pt=this._readableState,_t=!1;for(var Ye in ve.on("end",(function(){if(d("wrapped end"),pt.decoder&&!pt.ended){var k=pt.decoder.end();k&&k.length&&Ie.push(k)}Ie.push(null)})),ve.on("data",(function(k){d("wrapped data"),pt.decoder&&(k=pt.decoder.write(k)),pt.objectMode&&k==null||(pt.objectMode||k&&k.length)&&(Ie.push(k)||(_t=!0,ve.pause()))})),ve)this[Ye]===void 0&&typeof ve[Ye]=="function"&&(this[Ye]=(function(k){return function(){return ve[k].apply(ve,arguments)}})(Ye));for(var Y=0;Y<ke.length;Y++)ve.on(ke[Y],this.emit.bind(this,ke[Y]));return this._read=function(k){d("wrapped _read",k),_t&&(_t=!1,ve.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=P(5857
9)),m(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ve){this._readableState&&(this._readableState.flowing=ve)}}),X._fromList=Lt,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(X.from=function(ve,Ie){return r===void 0&&(r=P(3411)),r(X,ve,Ie)})},6756:function(vt,pe,P){vt.exports=h;var L=P(1602).codes,d=L.ERR_METHOD_NOT_IMPLEMENTED,o=L.ERR_MULTIPLE_CALLBACK,p=L.ERR_TRANSFORM_ALREADY_TRANSFORMING,T=L.ERR_TRANSFORM_WITH_LENGTH_0,y=P(884);function w(H,G){var ue=this._transformState;ue.transforming=!1;var ge=ue.writecb;if(ge===null)return this.emit("error",new o);ue.writechunk=null,ue.writecb=null,G!=null&&this.push(G),ge(H);var Ne=this._readableState;Ne.reading=!1,(Ne.needReadable||Ne.length<Ne.highWaterMark)&&this._read(Ne.highWaterMark)}function h(H){if(!(this instanceof h))return new h(H);y.call(this,H),this._transformState={afterTransform:w.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",m)}function m(){var H=this;typeof this._flush!="function"||this._readableState.destroyed?r(this,null,null):this._flush((function(G,ue){r(H,G,ue)}))}function r(H,G,ue){if(G)return H.emit("error",G);if(ue!=null&&H.push(ue),H._writableState.length)throw new T;if(H._transformState.transforming)throw new p;return H.push(null)}P(7523)(h,y),h.prototype.push=function(H,G){return this._transformState.needTransform=!1,y.prototype.push.call(this,H,G)},h.prototype._transform=function(H,G,ue){ue(new d("_transform()"))},h.prototype._write=function(H,G,ue){var ge=this._transformState;if(ge.writecb=ue,ge.writechunk=H,ge.writeencoding=G,!ge.transforming){var Ne=this._readableState;(ge.needTransform||Ne.needReadable||Ne.length<Ne.highWaterMark)&&this._read(Ne.highWaterMark)}},h.prototype._read=function(H){var G=this._transformState;G.writechunk===null||G.transforming?G.needTransform=!0:(G.transforming=!0,this._transform(G.writechunk,G.writeencoding,G.afterTransform))},h.prototype._destroy=function(H,G){y.prototype._destroy.call(this,H,(function(ue){G(ue)}))}},3726:function(vt,pe,P){function L(He){var Pe=this;this.next=null,this.entry=null,this.finish=function(){(function(Ke,Et){var Pt=Ke.entry;for(Ke.entry=null;Pt;){var xt=Pt.callback;Et.pendingcb--,xt(void 0),Pt=Pt.next}Et.corkedRequestsFree.next=Ke})(Pe,He)}}var d;vt.exports=X,X.WritableState=Q;var o,p={deprecate:P(9e3)},T=P(2611),y=P(44).Buffer,w=(P.g!==void 0?P.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h=P(2410),m=P(1749).getHighWaterMark,r=P(1602).codes,H=r.ERR_INVALID_ARG_TYPE,G=r.ERR_METHOD_NOT_IMPLEMENTED,ue=r.ERR_MULTIPLE_CALLBACK,ge=r.ERR_STREAM_CANNOT_PIPE,Ne=r.ERR_STREAM_DESTROYED,fe=r.ERR_STREAM_NULL_VALUES,Me=r.ERR_STREAM_WRITE_AFTER_END,Fe=r.ERR_UNKNOWN_ENCODING,ot=h.errorOrDestroy;function ke(){}function Q(He,Pe,Ke){d=d||P(884),He=He||{},typeof Ke!="boolean"&&(Ke=Pe instanceof d),this.objectMode=!!He.objectMode,Ke&&(this.objectMode=this.objectMode||!!He.writableObjectMode),this.highWaterMark=m(this,He,"writableHighWaterMark",Ke),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Et=He.decodeStrings===!1;this.decodeStrings=!Et,this.defaultEncoding=He.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Pt){(function(xt,Lt){var sn=xt._writableState,nn=sn.sync,Sn=sn.writecb;if(typeof Sn!="function")throw new ue;if((function(Ie){Ie.writing=!1,Ie.writecb=null,Ie.length-=Ie.writelen,Ie.writelen=0}
9)(sn),Lt)(function(Ie,pt,_t,Ye,Y){--pt.pendingcb,_t?(process.nextTick(Y,Ye),process.nextTick(mt,Ie,pt),Ie._writableState.errorEmitted=!0,ot(Ie,Ye)):(Y(Ye),Ie._writableState.errorEmitted=!0,ot(Ie,Ye),mt(Ie,pt))})(xt,sn,nn,Lt,Sn);else{var ve=gt(sn)||xt.destroyed;ve||sn.corked||sn.bufferProcessing||!sn.bufferedRequest||xe(xt,sn),nn?process.nextTick(Ae,xt,sn,ve,Sn):Ae(xt,sn,ve,Sn)}})(Pe,Pt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=He.emitClose!==!1,this.autoDestroy=!!He.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new L(this)}function X(He){var Pe=this instanceof(d=d||P(884));if(!Pe&&!o.call(X,this))return new X(He);this._writableState=new Q(He,this,Pe),this.writable=!0,He&&(typeof He.write=="function"&&(this._write=He.write),typeof He.writev=="function"&&(this._writev=He.writev),typeof He.destroy=="function"&&(this._destroy=He.destroy),typeof He.final=="function"&&(this._final=He.final)),T.call(this)}function Se(He,Pe,Ke,Et,Pt,xt,Lt){Pe.writelen=Et,Pe.writecb=Lt,Pe.writing=!0,Pe.sync=!0,Pe.destroyed?Pe.onwrite(new Ne("write")):Ke?He._writev(Pt,Pe.onwrite):He._write(Pt,xt,Pe.onwrite),Pe.sync=!1}function Ae(He,Pe,Ke,Et){Ke||(function(Pt,xt){xt.length===0&&xt.needDrain&&(xt.needDrain=!1,Pt.emit("drain"))})(He,Pe),Pe.pendingcb--,Et(),mt(He,Pe)}function xe(He,Pe){Pe.bufferProcessing=!0;var Ke=Pe.bufferedRequest;if(He._writev&&Ke&&Ke.next){var Et=Pe.bufferedRequestCount,Pt=new Array(Et),xt=Pe.corkedRequestsFree;xt.entry=Ke;for(var Lt=0,sn=!0;Ke;)Pt[Lt]=Ke,Ke.isBuf||(sn=!1),Ke=Ke.next,Lt+=1;Pt.allBuffers=sn,Se(He,Pe,!0,Pe.length,Pt,"",xt.finish),Pe.pendingcb++,Pe.lastBufferedRequest=null,xt.next?(Pe.corkedRequestsFree=xt.next,xt.next=null):Pe.corkedRequestsFree=new L(Pe),Pe.bufferedRequestCount=0}else{for(;Ke;){var nn=Ke.chunk,Sn=Ke.encoding,ve=Ke.callback;if(Se(He,Pe,!1,Pe.objectMode?1:nn.length,nn,Sn,ve),Ke=Ke.next,Pe.bufferedRequestCount--,Pe.writing)break}Ke===null&&(Pe.lastBufferedRequest=null)}Pe.bufferedRequest=Ke,Pe.bufferProcessing=!1}function gt(He){return He.ending&&He.length===0&&He.bufferedRequest===null&&!He.finished&&!He.writing}function Ee(He,Pe){He._final((function(Ke){Pe.pendingcb--,Ke&&ot(He,Ke),Pe.prefinished=!0,He.emit("prefinish"),mt(He,Pe)}))}function mt(He,Pe){var Ke=gt(Pe);if(Ke&&((function(Pt,xt){xt.prefinished||xt.finalCalled||(typeof Pt._final!="function"||xt.destroyed?(xt.prefinished=!0,Pt.emit("prefinish")):(xt.pendingcb++,xt.finalCalled=!0,process.nextTick(Ee,Pt,xt)))})(He,Pe),Pe.pendingcb===0&&(Pe.finished=!0,He.emit("finish"),Pe.autoDestroy))){var Et=He._readableState;(!Et||Et.autoDestroy&&Et.endEmitted)&&He.destroy()}return Ke}P(7523)(X,T),Q.prototype.getBuffer=function(){for(var He=this.bufferedRequest,Pe=[];He;)Pe.push(He),He=He.next;return Pe},(function(){try{Object.defineProperty(Q.prototype,"buffer",{get:p.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(He){return!!o.call(this,He)||this===X&&He&&He._writableState instanceof Q}})):o=function(He){return He instanceof this},X.prototype.pipe=function(){ot(this,new ge)},X.prototype.write=function(He,Pe,Ke){var Et,Pt=this._writableState,xt=!1,Lt=!Pt.objectMode&&(Et=He,y.isBuffer(Et)||Et instanceof w);return Lt&&!y.isBuffer(He)&&(He=(function(sn){return y.from(sn)})(He)),typeof Pe=="function"&&(Ke=Pe,Pe=null),Lt?Pe="buffer":Pe||(Pe=Pt.defaultEncoding),typeof Ke!="function"&&(Ke=ke),Pt.ending?(function(sn,nn){var Sn=new Me;ot(sn,Sn),process.nextTick(nn,Sn)})(this,Ke):(Lt||(function(sn,nn,Sn,ve){var Ie;return Sn===null?Ie=new fe:typeof Sn=="string"||nn.objectMode||(Ie=new H("chunk",["string","Buffer"],Sn)),!Ie||(ot(sn,Ie),process.nextTick(ve,Ie),!1)})(this,Pt,He,Ke))&&(Pt.pendingcb++,xt=(function(sn,nn,Sn,ve,Ie,pt){if(!Sn){var _t=(function(De,j,We){return De.objectMode||De.decodeStrings===!1||typeof j!="str
9ing"||(j=y.from(j,We)),j})(nn,ve,Ie);ve!==_t&&(Sn=!0,Ie="buffer",ve=_t)}var Ye=nn.objectMode?1:ve.length;nn.length+=Ye;var Y=nn.length<nn.highWaterMark;if(Y||(nn.needDrain=!0),nn.writing||nn.corked){var k=nn.lastBufferedRequest;nn.lastBufferedRequest={chunk:ve,encoding:Ie,isBuf:Sn,callback:pt,next:null},k?k.next=nn.lastBufferedRequest:nn.bufferedRequest=nn.lastBufferedRequest,nn.bufferedRequestCount+=1}else Se(sn,nn,!1,Ye,ve,Ie,pt);return Y})(this,Pt,Lt,He,Pe,Ke)),xt},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var He=this._writableState;He.corked&&(He.corked--,He.writing||He.corked||He.bufferProcessing||!He.bufferedRequest||xe(this,He))},X.prototype.setDefaultEncoding=function(He){if(typeof He=="string"&&(He=He.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((He+"").toLowerCase())>-1))throw new Fe(He);return this._writableState.defaultEncoding=He,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),X.prototype._write=function(He,Pe,Ke){Ke(new G("_write()"))},X.prototype._writev=null,X.prototype.end=function(He,Pe,Ke){var Et=this._writableState;return typeof He=="function"?(Ke=He,He=null,Pe=null):typeof Pe=="function"&&(Ke=Pe,Pe=null),He!=null&&this.write(He,Pe),Et.corked&&(Et.corked=1,this.uncork()),Et.ending||(function(Pt,xt,Lt){xt.ending=!0,mt(Pt,xt),Lt&&(xt.finished?process.nextTick(Lt):Pt.once("finish",Lt)),xt.ended=!0,Pt.writable=!1})(this,Et,Ke),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(He){this._writableState&&(this._writableState.destroyed=He)}}),X.prototype.destroy=h.destroy,X.prototype._undestroy=h.undestroy,X.prototype._destroy=function(He,Pe){Pe(He)}},5857:function(vt,pe,P){var L;function d(fe,Me,Fe){return(Me=(function(ot){var ke=(function(Q){if(typeof Q!="object"||Q===null)return Q;var X=Q[Symbol.toPrimitive];if(X!==void 0){var Se=X.call(Q,"string");if(typeof Se!="object")return Se;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Q)})(ot);return typeof ke=="symbol"?ke:String(ke)})(Me))in fe?Object.defineProperty(fe,Me,{value:Fe,enumerable:!0,configurable:!0,writable:!0}):fe[Me]=Fe,fe}var o=P(2896),p=Symbol("lastResolve"),T=Symbol("lastReject"),y=Symbol("error"),w=Symbol("ended"),h=Symbol("lastPromise"),m=Symbol("handlePromise"),r=Symbol("stream");function H(fe,Me){return{value:fe,done:Me}}function G(fe){var Me=fe[p];if(Me!==null){var Fe=fe[r].read();Fe!==null&&(fe[h]=null,fe[p]=null,fe[T]=null,Me(H(Fe,!1)))}}function ue(fe){process.nextTick(G,fe)}var ge=Object.getPrototypeOf((function(){})),Ne=Object.setPrototypeOf((d(L={get stream(){return this[r]},next:function(){var fe=this,Me=this[y];if(Me!==null)return Promise.reject(Me);if(this[w])return Promise.resolve(H(void 0,!0));if(this[r].destroyed)return new Promise((function(Q,X){process.nextTick((function(){fe[y]?X(fe[y]):Q(H(void 0,!0))}))}));var Fe,ot=this[h];if(ot)Fe=new Promise((function(Q,X){return function(Se,Ae){Q.then((function(){X[w]?Se(H(void 0,!0)):X[m](Se,Ae)}),Ae)}})(ot,this));else{var ke=this[r].read();if(ke!==null)return Promise.resolve(H(ke,!1));Fe=new Promise(this[m])}return this[h]=Fe,Fe}},Symbol.asyncIterator,(function(){return this})),d(L,"return",(function(){var fe=this;return new Promise((function(Me,Fe){fe[r].destroy(null,(function(ot){ot?Fe(ot):Me(H(void 0,!0))}))}))})),L),ge);vt.exports=function(fe){var Me,Fe=Object.create(Ne,(d(Me={},r,{value:fe,writable:!0}),d(Me,p,{value:null,writable:!0}),d(Me,T,{value:null,writable:!0}),d(Me,y,{value:null,writable:!0}),d(Me,w,{value:fe._readableState.endEmitted,writable:!0}),d(Me,m,{value:function(ot,ke){var Q=Fe[r].read();Q?(Fe[h]=null,Fe[p]=null,Fe[T]=null,ot(H(Q,!1))):(Fe[p]=ot,Fe[T]=ke)},writable:!0}),Me));return Fe[h]=null,o(fe,(function(ot){if(ot&&ot.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ke=Fe[T];return ke!==null&&(Fe[h]=null,Fe[p]=null,Fe[T]=null,ke(ot)),void(Fe[y]=ot)}var Q=Fe[p];Q!==null&&(Fe[h]=null,Fe[p]=null,Fe[T]=null,Q(H(void 0,!0))),Fe[w]=!0})),fe.on("readable",ue.bind(null,Fe)),Fe}},3791:function(vt,pe,P){function L(m,r){var H=Object.keys(m);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(m);r&&(G=G.filter((function(ue){return Object.getOwnPropertyDescriptor(m,ue).enumerable}))),H.push.apply(H,G)}return H}function d(m){for(var r=1;r<arguments.length;r++){var H=arguments[r]!=null?arguments[r]:{};
vendor: 6,061 bytes, line 9
9r%2?L(Object(H),!0).forEach((function(G){o(m,G,H[G])})):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(H)):L(Object(H)).forEach((function(G){Object.defineProperty(m,G,Object.getOwnPropertyDescriptor(H,G))}))}return m}function o(m,r,H){return(r=T(r))in m?Object.defineProperty(m,r,{value:H,enumerable:!0,configurable:!0,writable:!0}):m[r]=H,m}function p(m,r){for(var H=0;H<r.length;H++){var G=r[H];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(m,T(G.key),G)}}function T(m){var r=(function(H){if(typeof H!="object"||H===null)return H;var G=H[Symbol.toPrimitive];if(G!==void 0){var ue=G.call(H,"string");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)})(m);return typeof r=="symbol"?r:String(r)}var y=P(44).Buffer,w=P(3779).inspect,h=w&&w.custom||"inspect";vt.exports=(function(){function m(){(function(G,ue){if(!(G instanceof ue))throw new TypeError("Cannot call a class as a function")})(this,m),this.head=null,this.tail=null,this.length=0}var r,H;return r=m,(H=[{key:"push",value:function(G){var ue={data:G,next:null};this.length>0?this.tail.next=ue:this.head=ue,this.tail=ue,++this.length}},{key:"unshift",value:function(G){var ue={data:G,next:this.head};this.length===0&&(this.tail=ue),this.head=ue,++this.length}},{key:"shift",value:function(){if(this.length!==0){var G=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,G}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(G){if(this.length===0)return"";for(var ue=this.head,ge=""+ue.data;ue=ue.next;)ge+=G+ue.data;return ge}},{key:"concat",value:function(G){if(this.length===0)return y.alloc(0);for(var ue,ge,Ne,fe=y.allocUnsafe(G>>>0),Me=this.head,Fe=0;Me;)ue=Me.data,ge=fe,Ne=Fe,y.prototype.copy.call(ue,ge,Ne),Fe+=Me.data.length,Me=Me.next;return fe}},{key:"consume",value:function(G,ue){var ge;return G<this.head.data.length?(ge=this.head.data.slice(0,G),this.head.data=this.head.data.slice(G)):ge=G===this.head.data.length?this.shift():ue?this._getString(G):this._getBuffer(G),ge}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(G){var ue=this.head,ge=1,Ne=ue.data;for(G-=Ne.length;ue=ue.next;){var fe=ue.data,Me=G>fe.length?fe.length:G;if(Me===fe.length?Ne+=fe:Ne+=fe.slice(0,G),(G-=Me)==0){Me===fe.length?(++ge,ue.next?this.head=ue.next:this.head=this.tail=null):(this.head=ue,ue.data=fe.slice(Me));break}++ge}return this.length-=ge,Ne}},{key:"_getBuffer",value:function(G){var ue=y.allocUnsafe(G),ge=this.head,Ne=1;for(ge.data.copy(ue),G-=ge.data.length;ge=ge.next;){var fe=ge.data,Me=G>fe.length?fe.length:G;if(fe.copy(ue,ue.length-G,0,Me),(G-=Me)==0){Me===fe.length?(++Ne,ge.next?this.head=ge.next:this.head=this.tail=null):(this.head=ge,ge.data=fe.slice(Me));break}++Ne}return this.length-=Ne,ue}},{key:h,value:function(G,ue){return w(this,d(d({},ue),{},{depth:0,customInspect:!1}))}}])&&p(r.prototype,H),Object.defineProperty(r,"prototype",{writable:!1}),m})()},2410:function(vt){function pe(d,o){L(d,o),P(d)}function P(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function L(d,o){d.emit("error",o)}vt.exports={destroy:function(d,o){var p=this,T=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return T||y?(o?o(d):d&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(L,this,d)):process.nextTick(L,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,(function(w){!o&&w?p._writableState?p._writableState.errorEmitted?process.nextTick(P,p):(p._writableState.errorEmitted=!0,process.nextTick(pe,p,w)):process.nextTick(pe,p,w):o?(process.nextTick(P,p),o(w)):process.nextTick(P,p)})),this)},undestroy:function(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,o){var p=d._readableState,T=d._writableState;p&&p.autoDestroy||T&&T.autoDestroy?d.destroy(o):d.emit("error",o)}}},2896:function(vt,pe,P){var L=P(1602).codes.ERR_STREAM_PREMATURE_CLOSE;function d(){}vt.exports=function o(p,T,y){if(typeof T=="function")return o(p,null,T);T||(T={}),y=(function(Me){var Fe=!1;return function(){if(!Fe){Fe=!0;for(var ot=arguments.length,ke=new Array(ot),Q=0;Q<ot;Q++)ke[Q]=arguments[Q];Me.apply(this,ke)}}})(y||d);var w=T.readable||T.readable!==!1&&p.readable,h=T.writable||T.writable!==!1&&p.writable,m=function(){p.writable||H()},r=p._writableState&&p._writableState.finished,H=function(){h=!1,r=!0,w||y.call(p)},G=p._readableState&&p._readableState.endEmitted,ue=function(){w=!1,G=!0,h||y.call(p)},ge=function(Me){y.call(p,Me)},Ne=function(){var Me;return w&&!G?(p._readableState&&p._readableState.ended||(Me=new L),y.call(p,Me)):h&&!r?(p._writableState&&p._writableState.ended||(Me=new L),y.call(p,Me)):void 0},fe=function(){p.req.on("finish",H)};return(function(Me){return Me.setHeader&&typeof Me.abort=="function"})(p)?(p.on("complete",H),p.on("abort",Ne),p.req?fe():p.on("request",fe)):h&&!p._writableState&&(p.on("end",m),p.on("close",m)),p.on("end",ue),p.on("finish",H),T.error!==!1&&p.on("error",ge),p.on("close",Ne),function(){p.removeListener("complete",H),p.removeListener("abort",Ne),p.removeListener("request",fe),p.req&&p.req.removeListener("finish",H),p.removeListener("end",m),p.removeListener("close",m),p.removeListener("finish",H),p.removeListener("end",ue),p.removeListener("error",ge),p.removeListener("close",Ne)}}}
9,3411:function(vt){vt.exports=function(){throw new Error("Readable.from is not available in the browser")}},8460:function(vt,pe,P){var L,d=P(1602).codes,o=d.ERR_MISSING_ARGS,p=d.ERR_STREAM_DESTROYED;function T(h){if(h)throw h}function y(h){h()}function w(h,m){return h.pipe(m)}vt.exports=function(){for(var h=arguments.length,m=new Array(h),r=0;r<h;r++)m[r]=arguments[r];var H,G=(function(ge){return ge.length?typeof ge[ge.length-1]!="function"?T:ge.pop():T})(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new o("streams");var ue=m.map((function(ge,Ne){var fe=Ne<m.length-1;return(function(Me,Fe,ot,ke){ke=(function(Se){var Ae=!1;return function(){Ae||(Ae=!0,Se.apply(void 0,arguments))}})(ke);var Q=!1;Me.on("close",(function(){Q=!0})),L===void 0&&(L=P(2896)),L(Me,{readable:Fe,writable:ot},(function(Se){if(Se)return ke(Se);Q=!0,ke()}));var X=!1;return function(Se){if(!Q&&!X)return X=!0,(function(Ae){return Ae.setHeader&&typeof Ae.abort=="function"})(Me)?Me.abort():typeof Me.destroy=="function"?Me.destroy():void ke(Se||new p("pipe"))}})(ge,fe,Ne>0,(function(Me){H||(H=Me),Me&&ue.forEach(y),fe||(ue.forEach(y),G(H))}))}));return m.reduce(w)}},1749:function(vt,pe,P){var L=P(1602).codes.ERR_INVALID_OPT_VALUE;vt.exports={getHighWaterMark:function(d,o,p,T){var y=(function(w,h,m){return w.highWaterMark!=null?w.highWaterMark:h?w[m]:null})(o,T,p);if(y!=null){if(!isFinite(y)||Math.floor(y)!==y||y<0)throw new L(T?p:"highWaterMark",y);return Math.floor(y)}return d.objectMode?16:16384}}}
vendor: 6,885 bytes, line 9
9,2611:function(vt,pe,P){vt.exports=P(9826).EventEmitter},748:function(vt,pe,P){var L=P(4598).Buffer,d=L.isEncoding||function(G){switch((G=""+G)&&G.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 o(G){var ue;switch(this.encoding=(function(ge){var Ne=(function(fe){if(!fe)return"utf8";for(var Me;;)switch(fe){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 fe;default:if(Me)return;fe=(""+fe).toLowerCase(),Me=!0}})(ge);if(typeof Ne!="string"&&(L.isEncoding===d||!d(ge)))throw new Error("Unknown encoding: "+ge);return Ne||ge})(G),this.encoding){case"utf16le":this.text=y,this.end=w,ue=4;break;case"utf8":this.fillLast=T,ue=4;break;case"base64":this.text=h,this.end=m,ue=3;break;default:return this.write=r,void(this.end=H)}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(ue)}function p(G){return G<=127?0:G>>5==6?2:G>>4==14?3:G>>3==30?4:G>>6==2?-1:-2}function T(G){var ue=this.lastTotal-this.lastNeed,ge=(function(Ne,fe){if((192&fe[0])!=128)return Ne.lastNeed=0,"�";if(Ne.lastNeed>1&&fe.length>1){if((192&fe[1])!=128)return Ne.lastNeed=1,"�";if(Ne.lastNeed>2&&fe.length>2&&(192&fe[2])!=128)return Ne.lastNeed=2,"�"}})(this,G);return ge!==void 0?ge:this.lastNeed<=G.length?(G.copy(this.lastChar,ue,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(G.copy(this.lastChar,ue,0,G.length),void(this.lastNeed-=G.length))}function y(G,ue){if((G.length-ue)%2==0){var ge=G.toString("utf16le",ue);if(ge){var Ne=ge.charCodeAt(ge.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1],ge.slice(0,-1)}return ge}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=G[G.length-1],G.toString("utf16le",ue,G.length-1)}function w(G){var ue=G&&G.length?this.write(G):"";if(this.lastNeed){var ge=this.lastTotal-this.lastNeed;return ue+this.lastChar.toString("utf16le",0,ge)}return ue}function h(G,ue){var ge=(G.length-ue)%3;return ge===0?G.toString("base64",ue):(this.lastNeed=3-ge,this.lastTotal=3,ge===1?this.lastChar[0]=G[G.length-1]:(this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1]),G.toString("base64",ue,G.length-ge))}function m(G){var ue=G&&G.length?this.write(G):"";return this.lastNeed?ue+this.lastChar.toString("base64",0,3-this.lastNeed):ue}function r(G){return G.toString(this.encoding)}function H(G){return G&&G.length?this.write(G):""}pe.StringDecoder=o,o.prototype.write=function(G){if(G.length===0)return"";var ue,ge;if(this.lastNeed){if((ue=this.fillLast(G))===void 0)return"";ge=this.lastNeed,this.lastNeed=0}else ge=0;return ge<G.length?ue?ue+this.text(G,ge):this.text(G,ge):ue||""},o.prototype.end=function(G){var ue=G&&G.length?this.write(G):"";return this.lastNeed?ue+"�":ue},o.prototype.text=function(G,ue){var ge=(function(fe,Me,Fe){var ot=Me.length-1;if(ot<Fe)return 0;var ke=p(Me[ot]);return ke>=0?(ke>0&&(fe.lastNeed=ke-1),ke):--ot<Fe||ke===-2?0:(ke=p(Me[ot]))>=0?(ke>0&&(fe.lastNeed=ke-2),ke):--ot<Fe||ke===-2?0:(ke=p(Me[ot]))>=0?(ke>0&&(ke===2?ke=0:fe.lastNeed=ke-3),ke):0})(this,G,ue);if(!this.lastNeed)return G.toString("utf8",ue);this.lastTotal=ge;var Ne=G.length-(ge-this.lastNeed);return G.copy(this.lastChar,0,Ne),G.toString("utf8",ue,Ne)},o.prototype.fillLast=function(G){if(this.lastNeed<=G.length)return G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,G.length),this.lastNeed-=G.length}},4598:function(vt,pe,P){var L=P(44),d=L.Buffer;function o(T,y){for(var w in T)y[w]=T[w]}function p(T,y,w){return d(T,y,w)}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?vt.exports=L:(o(L,pe),pe.Buffer=p),o(d,p),p.from=function(T,y,w){if(typeof T=="number")throw new TypeError("Argument must not be a number");return d(T,y,w)},p.alloc=function(T,y,w){if(typeof T!="number")throw new TypeError("Argument must be a number");var h=d(T);return y!==void 0?typeof w=="string"?h.fill(y,w):h.fill(y):h.fill(0),h},p.allocUnsafe=function(T){if(typeof T!="number")throw new TypeError("Argument must be a number");return d(T)},p.allocUnsafeSlow=function(T){if(typeof T!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(T)}},9e3:function(vt,pe,P){function L(d){try{if(!P.g.localStorage)return!1}catch{return!1}var o=P.g.localStorage[d];return o!=null&&String(o).toLowerCase()==="true"}vt.exports=function(d,o){if(L("noDeprecation"))return d;var p=!1;return function(){if(!p){if(L("throwDeprecation"))throw new Error(o);L("traceDeprecation")?console.trace(o):console.warn(o),p=!0}return d.apply(this,arguments)}}},3779:function(){},7199:function(){},5393:function(vt,pe,P){P.r(pe),P.d(pe,{Debug:function(){return o.default},FactoryMaker:function(){return d.default},MediaPlayer:function(){return L.default}});var L=P(9839),d=P(138),o=P(649),p=P(8986),T=typeof window<"u"&&window||global,y=T.dashjs;y||(y=T.dashjs={}),y.MediaPlayer=L.default,y.FactoryMaker=d.default,y.Debug=o.default,y.Version=(0,p.getVersionString)(),pe.default=y},8735:function(vt,pe,P){P.r(pe),P.d(pe,{CMCD_DEFAULT_TIME_INTERVAL:function(){return Nn},CMCD_EVENT_AD_BREAK_END:function(){return Ae},CMCD_EVENT_AD_BREAK_START:function(){return Se},CMCD_EVENT_AD_END:function(){return X},CMCD_EVENT_AD_START:function(){return Q},CMCD_EVENT_BACKGROUNDED_MODE:function(){return Ne},CMCD_EVENT_BITRATE_CHANGE:function(){return r},CMCD_EVENT_CONTENT_ID:function(){return ge},CMCD_EVENT_CUSTOM_EVENT:function(){return gt},CMCD_EVENT_ERROR:function(){return G},CMCD_EVENT_KEYS:function(){return Ke},CMCD_EVENT_MODE:function(){return mt},CMCD_EVENT_MUTE:function(){return fe},CMCD_EVENT_PLAYER_COLLAPSE:function(){return ot},CMCD_EVENT_PLAYER_EXPAND:function(){return Fe},CMCD_EVENT_PLAY_STATE:function(){return H},CMCD_EVENT_RESPONSE_RECEIVED:function(){return ke},CMCD_EVENT_SKIP:function(){return xe},CMCD_EVENT_TIME_INTERVAL:function(){return ue},CMCD_EVENT_UNMUTE:function(){return Me},CMCD_FORMATTER_MAP:function(){return h},CMCD_HEADERS:function(){return Ot},CMCD_HEADER_FIELDS:function(){return Oe},CMCD_HEADER_MAP:function(){return rt},CMCD_JSON:function(){return St},CMCD_KEYS:function(){return Vt},CMCD_MIME_TYPE:function(){return En},CMCD_OBJECT:function(){return i},CMCD_PARAM:function(){return he},CMCD_QUERY:function(){return Bt},CMCD_REQUEST:function(){return l},CMCD_REQUEST_KEYS:function(){return Et},CMCD_REQUEST_MODE:function(){return He},CMCD_RESPONSE_KEYS:function(){return nn},CMCD_SESSION:function(){return C},CMCD_STATUS:function(){return ne},CMCD_V1:function(){return un},CMCD_V1_KEYS:function(){return Ye},CMCD_V2:function(){return m}
9,CMCD_VALIDATION_SEVERITY_ERROR:function(){return ft},CMCD_VALIDATION_SEVERITY_WARNING:function(){return Qt},CmcdEventType:function(){return Ee},CmcdHeaderField:function(){return se},CmcdObjectType:function(){return nr},CmcdPlayerState:function(){return wn},CmcdReporter:function(){return Jt},CmcdReportingMode:function(){return Pe},CmcdStreamType:function(){return Ft},CmcdStreamingFormat:function(){return tn},CmcdTransmissionMode:function(){return de},CmcdValidationSeverity:function(){return Fn},appendCmcdHeaders:function(){return V},appendCmcdQuery:function(){return fn},decodeCmcd:function(){return pn},encodeCmcd:function(){return it},fromCmcdHeaders:function(){return on},fromCmcdQuery:function(){return Tn},fromCmcdUrl:function(){return dn},groupCmcdHeaders:function(){return ae},isCmcdCustomKey:function(){return xt},isCmcdEventKey:function(){return pt},isCmcdRequestKey:function(){return sn},isCmcdResponseReceivedKey:function(){return ve},isCmcdV1Data:function(){return At},isCmcdV1Key:function(){return k},isCmcdV2Data:function(){return dt},prepareCmcdData:function(){return Le},toCmcdHeaders:function(){return qe},toCmcdQuery:function(){return Ze},toCmcdUrl:function(){return yt},toCmcdValue:function(){return jt},validateCmcd:function(){return Mr},validateCmcdEventReport:function(){return Ct},validateCmcdEvents:function(){return kr},validateCmcdHeaders:function(){return en},validateCmcdKeys:function(){return Jn},validateCmcdRequest:function(){return _n},validateCmcdStructure:function(){return Qn},validateCmcdValues:function(){return vr}});var L=P(2877),d=P(9259);const o=Re=>Re instanceof L.SfItem?new L.SfItem(Math.round(Re.value),Re.params):Math.round(Re),p=Re=>Array.isArray(Re)?Re.map(o):o(Re),T=(Re,ut)=>Array.isArray(Re)?Re.map((Tt=>T(Tt,ut))):Re instanceof L.SfItem&&typeof Re.value=="string"?new L.SfItem(T(Re.value,ut),Re.params):(ut.baseUrl&&(Re=(0,d.urlToRelativePath)(Re,(0,d.getBaseUrl)(ut.baseUrl))),ut.version===1?encodeURIComponent(Re):Re),y=Re=>Re instanceof L.SfItem?new L.SfItem(100*Math.round(Re.value/100),Re.params):100*Math.round(Re/100),w=Re=>Array.isArray(Re)?Re.map(y):y(Re),h={br:p,d:p,bl:w,dl:w,mtp:w,nor:(Re,ut)=>{let Tt=Re;return ut.version>=2&&(Re instanceof L.SfItem&&typeof Re.value=="string"?Tt=new L.SfItem([Re]):typeof Re=="string"&&(Tt=[Re])),T(Tt,ut)},rtp:w,tb:p},m=2,r="bc",H="ps",G="e",ue="t",ge="c",Ne="b",fe="m",Me="um",Fe="pe",ot="pc",ke="rr",Q="as",X="ae",Se="abs",Ae="abe",xe="sk",gt="ce",Ee={BITRATE_CHANGE:r,PLAY_STATE:H,ERROR:G,TIME_INTERVAL:ue,CONTENT_ID:ge,BACKGROUNDED_MODE:Ne,MUTE:fe,UNMUTE:Me,PLAYER_EXPAND:Fe,PLAYER_COLLAPSE:ot,RESPONSE_RECEIVED:ke,AD_START:Q,AD_END:X,AD_BREAK_START:Se,AD_BREAK_END:Ae,SKIP:xe,CUSTOM_EVENT:gt},mt="event",He="request",Pe={REQUEST:He,EVENT:mt},Ke=["cen","e","h","ts"],Et=["ab","bg","bl","br","bs","bsa","bsd","bsda","cdn","cid","cs","d","dfa","dl","ec","lab","lb","ltc","msd","mtp","nor","nr","ot","pb","pr","pt","rtp","sf","sid","sn","st","sta","su","tab","tb","tbl","tpb","v"],Pt=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function xt(Re){return Pt.test(Re)}const Lt=new Set(Et);function sn(Re){return Lt.has(Re)||xt(Re)}const nn=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"],Sn=new Set(nn);function ve(Re){return Sn.has(Re)}const Ie=new Set(Ke);function pt(Re){return sn(Re)||ve(Re)||Ie.has(Re)}const _t=new Set(["ab","bl","br","bsa","bsd","bsda","lab","lb","mtp","pb","tab","tb","tbl","tpb"]),Ye=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"],Y=new Set(Ye);function k(Re){return Y.has(Re)||xt(Re)}const De=new Set(["ot","sf","st","e","sta"]);function j(Re){return De.has(Re)}function We(Re){return typeof Re=="number"?Number.isFinite(Re):Re!=null&&Re!==""&&Re!==!1}const st={[mt]:pt,[He]:sn};function Te(Re,ut){if(Array.isArray(Re)){let Tt;return ut&&(Tt=Re.find((It=>It.params?.ot===ut))),Tt||(Tt=Re[0]),Te(Tt)}return Re instanceof L.SfItem?Re.value:Re}function Le(Re,ut={}){const Tt={};if(Re==null||typeof Re!="object")return Tt;const It=ut.version||Re.v||m,ct=ut.reportingMode||He,wt=It===1?(function($n){const rr={};for(const[ur,or]of Object.entries($n))if(or!=null)if(ur==="nor"){const lr=(Array.isArray(or)?or:[or])[0];lr instanceof L.SfItem?(rr.nor=lr.value,lr.params?.r&&(rr.nrr=lr.params.r)):rr.nor=lr}else _t.has(ur)?rr[ur]=Te(or,$n.ot):rr[ur]=or;else rr[ur]=or;return rr})(Re):Re,cn=It===1?k:st[ct];let mn=Object.keys(wt).filter(cn);wt.e&&wt.e!==ke&&(mn=mn.filter(($n=>!ve($n))));const Hn=ut.filter;typeof Hn=="function"&&(mn=mn.filter(Hn));const Gn=ct===mt;if(Gn){const $n=wt.e;mn.includes("e")||$n==null||mn.push("e"),mn.includes("ts")||mn.push("ts"),mn.includes("cen")||wt.cen==null||$n!==gt||mn.push("cen")}if(mn.length===0)return Tt;It>1&&!mn.includes("v")&&mn.push("v");
vendor: 10,750 bytes, lines 9-11
9const sr={version:It,reportingMode:ct,baseUrl:ut.baseUrl};mn.sort();for(const $n of mn){let rr=wt[$n];const ur=ut.formatters?.[$n]??h[$n];if(typeof ur=="function"&&(rr=ur(rr,sr)),$n==="v"){if(It===1)continue;rr=It}$n==="pr"&&rr===1||(Gn&&$n==="ts"&&!Number.isFinite(rr)&&(rr=Date.now()),We(rr)&&(j($n)&&typeof rr=="string"&&(rr=new L.SfToken(rr)),Tt[$n]=rr))}return Tt}const i="CMCD-Object",l="CMCD-Request",C="CMCD-Session",ne="CMCD-Status",se={OBJECT:i,REQUEST:l,SESSION:C,STATUS:ne},Oe=[i,l,C,ne],rt={ab:i,br:i,d:i,lab:i,lb:i,ot:i,tab:i,tb:i,tpb:i,bl:l,cs:l,dfa:l,dl:l,ltc:l,mtp:l,nor:l,nrr:l,pb:l,sn:l,sta:l,su:l,tbl:l,cid:C,msd:C,sf:C,sid:C,st:C,v:C,bg:ne,bs:ne,bsa:ne,bsd:ne,bsda:ne,cdn:ne,ec:ne,nr:ne,pr:ne,pt:ne,rtp:ne};function ae(Re,ut){const Tt={};if(!Re)return Tt;const It=Object.keys(Re),ct=ut?(wt=ut,Object.keys(wt).reduce(((cn,mn)=>(wt[mn]?.forEach((Hn=>cn[Hn]=mn)),cn)),{})):{};var wt;for(const cn of It){const mn=rt[cn]||ct[cn]||se.REQUEST;(Tt[mn]??={})[cn]=Re[cn]}return Tt}function ze(Re,ut){const Tt={},It=ae(Re,ut);for(const[ct,wt]of Object.entries(It)){const cn=(0,L.encodeSfDict)(wt,{whitespace:!1});cn&&(Tt[ct]=cn)}return Tt}function qe(Re,ut={}){return Re?ze(Le(Re,ut),ut?.customHeaderMap):{}}function V(Re,ut,Tt){return Object.assign(Re,qe(ut,Tt))}const he="CMCD";function tt(Re){return(0,L.encodeSfDict)(Re,{whitespace:!1})}function it(Re,ut={}){return Re?tt(Le(Re,ut)):""}function yt(Re,ut={}){if(!Re)return"";const Tt=it(Re,ut);return encodeURIComponent(Tt)}function Ze(Re,ut={}){return Re?`${he}=${yt(Re,ut)}`:""}const ht=/CMCD=[^&#]+/;function fn(Re,ut,Tt){const It=Ze(ut,Tt);return It?ht.test(Re)?Re.replace(ht,It):`${Re}${Re.includes("?")?"&":"?"}${It}`:Re}const Nn=30,Vt=[...Ye,...Et,...nn,...Ke].filter(((Re,ut,Tt)=>Tt.indexOf(Re)===ut)),En="application/cmcd",un=1,nr={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},wn={STARTING:"s",PLAYING:"p",SEEKING:"k",REBUFFERING:"r",PAUSED:"a",WAITING:"w",ENDED:"e",FATAL_ERROR:"f",QUIT:"q",PRELOADING:"d"},Bt="query",Ot="headers",St="json",de={JSON:St,QUERY:Bt,HEADERS:Ot};function Ht(Re,ut,Tt){const It=new Set(ut.enabledKeys??[]);return{version:ut.version||m,reportingMode:Re,filter:ct=>It.has(ct),baseUrl:Tt}}function Wt(Re){const{url:ut,...Tt}=Re;return fetch(ut,Tt)}var Jt=class{constructor(Re,ut=Wt){this.timeOrigin=performance.timeOrigin||performance.timing?.fetchStart||Date.now()-performance.now(),this.data={},this.msd=NaN,this.eventTargets=new Map,this.requestTarget={sn:0,msdSent:!1},this.config=(function(Tt){const{version:It=m,eventTargets:ct=[],sid:wt=(0,d.uuid)(),transmissionMode:cn=Bt,...mn}=Tt;return{...mn,version:It,transmissionMode:cn,sid:wt,eventTargets:ct.reduce(((Hn,Gn)=>(Gn?.url&&Gn.events?.length&&Hn.push({version:Gn.version||m,enabledKeys:Gn.enabledKeys?.slice()||[],url:Gn.url,events:Gn.events.slice(),interval:Gn.interval??Nn,batchSize:Gn.batchSize||1}),Hn)),[])}})(Re),this.data={cid:this.config.cid,sid:this.config.sid,v:this.config.version},this.requester=ut;for(const Tt of this.config.eventTargets)this.eventTargets.set(Tt,{intervalId:void 0,sn:0,msdSent:!1,queue:[]})}start(){this.eventTargets.forEach(((Re,ut)=>{if(this.disarmInterval(Re),ut.interval===0||!ut.events.includes(Ee.TIME_INTERVAL))return;const Tt=()=>{this.recordTargetEvent(Re,ut,ue),this.processEventTargets()};Re.intervalId=setInterval(Tt,1e3*ut.interval),Tt()}))}stop(Re=!1){Re&&this.flush(),this.eventTargets.forEach((ut=>{this.disarmInterval(ut)}))}flush(){this.processEventTargets(!0)}update(Re){Re.sid&&Re.sid!==this.data.sid&&this.resetSession(),Re.msd&&!isNaN(Re.msd)&&(this.msd=Re.msd),this.data={...this.data,...Re,msd:void 0}}recordEvent(Re,ut={}){this.eventTargets.forEach(((Tt,It)=>{this.recordTargetEvent(Tt,It,Re,ut)})),this.processEventTargets()}recordTargetEvent(Re,ut,Tt,It={}){if(!ut.events.includes(Tt))return;const ct={...this.data,...It,e:Tt,ts:It.ts??Date.now(),sn:Re.sn++};isNaN(this.msd)||Re.msdSent||(ct.msd=this.msd,Re.msdSent=!0),Re.queue.push(ct)}recordResponseReceived(Re,ut={}){const{request:Tt}=Re,It=ut.url??Tt?.url;if(!It)return;const ct=new URL(It);ct.searchParams.delete(he);const wt={url:ct.toString(),rc:Re.status},cn=Re.resourceTiming;cn&&(cn.startTime!=null&&(wt.ts=Math.round(this.timeOrigin+cn.startTime),cn.responseStart!=null&&(wt.ttfb=Math.round(cn.responseStart-cn.startTime))),cn.duration!=null&&(wt.ttlb=Math.round(cn.duration)));const mn=Tt.customData?.cmcd??{};this.recordEvent(ke,{...mn,...wt,...ut})}applyRequestReport(Re){return this.createRequestReport(Re)??Re}isRequestReportingEnabled(){return!!this.config.enabledKeys?.length}createRequestReport(Re,ut){const{customData:Tt={},headers:It={},...ct}=Re,wt={...ct,headers:{...It},customData:{...Tt,cmcd:{}}};if(!this.config.enabledKeys?.length||!wt.url)return wt;const cn=new URL(wt.url),mn={...this.data,...ut,sn:this.requestTarget.sn++},Hn=Ht(He,this.config,wt.url);isNaN(this.msd)||this.requestTarget.msdSent||(mn.msd=this.msd,this.requestTarget.msdSent=!0);const Gn=wt.customData.cmcd=Le(mn,Hn);switch(this.config.transmissionMode){case Bt:const sr=tt(Gn);sr&&(cn.searchParams.set(he,sr),wt.url=cn.toString());break;case Ot:Object.assign(wt.headers,ze(Gn,Hn.customHeaderMap))}return wt}processEventTargets(Re=!1){let ut=!1;this.eventTargets.forEach(((Tt,It)=>{const{queue:ct}=Tt;if(!ct.length||ct.length<It.batchSize&&!Re)return;const wt=Re?ct.length:It.batchSize,cn=ct.splice(0,wt);this.sendEventReport(It,cn).catch((()=>{Tt.queue.unshift(...cn)})),ut||=ct.length>0})),ut&&this.processEventTargets()}async sendEventReport(Re,ut){const Tt=Ht(mt,Re),{status:It}=await this.requester({url:Re.url,method:"POST",headers:{"Content-Type":En},body:ut.map((ct=>it(ct,Tt))).join(` 10`)+` 11`});if(It===410)this.disposeEventTarget(Re);else if(It===429||It>499&&It<600)throw new Error(`Event report failed with status ${It}`)}disarmInterval(Re){clearInterval(Re.intervalId),Re.intervalId=void 0}disposeEventTarget(Re){const ut=this.eventTargets.get(Re);ut&&(this.disarmInterval(ut),this.eventTargets.delete(Re))}resetSession(){this.eventTargets.forEach((Re=>Re.sn=0)),this.requestTarget.sn=0}};const tn={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"},Ft={VOD:"v",LIVE:"l",LOW_LATENCY:"ll"},ft="error",Qt="warning",Fn={ERROR:ft,WARNING:Qt};function bn(Re){if(Re.v===m)return Re;const ut={};for(const[Tt,It]of Object.entries(Re))It!=null?_t.has(Tt)&&!Array.isArray(It)?ut[Tt]=[It]:ut[Tt]=Tt==="nor"&&typeof It=="string"?[It]:It:ut[Tt]=It;return ut}function Zt(Re){return Array.isArray(Re)?Re.map(Zt):typeof Re=="symbol"?(0,L.symbolToStr)(Re):Re instanceof L.SfItem&&!Re.params?Zt(Re.value):Re}function pn(Re,ut){if(!Re)return{};const Tt=(0,L.decodeSfDict)(Re),It={};for(const[ct,wt]of Object.entries(Tt))It[ct]=Zt(wt.value);return ut?.convertToLatest?bn(It):It}function Pn(Re){return Re instanceof Headers?Re:new Headers(Re)}function on(Re,ut){const Tt=Pn(Re),It={};for(const ct of Oe){const wt=Tt.get(ct);wt&&Object.assign(It,pn(wt))}return ut?.convertToLatest?bn(It):It}function Tn(Re,ut){return typeof Re=="string"&&(Re=new URLSearchParams(Re)),pn(Re.get(he)??"",ut)}function dn(Re,ut){return pn(decodeURIComponent(Re.replace(/^CMCD=/,"")),ut)}function At(Re){return Re.v!==m}function dt(Re){return Re.v===m}function jt(Re,ut){return new L.SfItem(Re,ut)}function zt(...Re){const ut=Re.flatMap((Tt=>Tt.issues));return{valid:ut.every((Tt=>Tt.severity!==ft)),issues:ut}}function Rn(Re,ut){if(ut?.version===1||ut?.version===2)return ut.version;const Tt=Re.v;return Tt===1||Tt===2?Tt:un}const In=new Set(Ye),jn=new Set(Vt);function Jn(Re,ut){const Tt=Rn(Re,ut),It=Tt===un?In:jn,ct=[];for(const wt of Object.keys(Re))xt(wt)||It.has(wt)||ct.push({key:wt,message:`Unknown CMCD key "${wt}" for version ${Tt}.`,severity:ft});return{valid:ct.length===0,issues:ct}}function Qn(Re,ut){const Tt=Rn(Re,ut),It=[];if(ut?.reportingMode===He){for(const ct of Ke)ct in Re&&It.push({key:ct,message:`Event key "${ct}" must not be present in request mode.`,severity:ft});for(const ct of nn)ct in Re&&It.push({key:ct,message:`Response key "${ct}" must not be present in request mode.`,severity:ft})}if(ut?.reportingMode===mt&&("e"in Re||It.push({key:"e",message:'Event mode requires the "e" key to be present.',severity:ft}),"ts"in Re||It.push({key:"ts",message:'Event mode requires the "ts" key to be present.',severity:ft})),"e"in Re){if(Re.e===gt?"cen"in Re||It.push({key:"cen",message:'Custom event (e="ce") requires the "cen" key to be present.',severity:ft}):"cen"in Re&&It.push({key:"cen",message:'The "cen" key must only be present when e="ce".',severity:ft}),Re.e===ke)"url"in Re||It.push({key:"url",message:'Response received event (e="rr") requires the "url" key to be present.',severity:ft});else for(const ct of nn)ct in Re&&It.push({key:ct,message:`Response key "${ct}" must only be present when e="rr".`,severity:ft});Re.e!==H||"sta"in Re||It.push({key:"sta",message:'Play state event (e="ps") requires the "sta" key to be present.',severity:ft}),Re.e!==G||"ec"in Re||It.push({key:"ec",message:'Error event (e="e") requires the "ec" key to be present.',severity:ft})}return"v"in Re&&Re.v!==1&&Re.v!==2?It.push({key:"v",message:`Unsupported CMCD version "${String(Re.v)}". Expected 1 or 2.`,severity:ft}):Tt>1&&!("v"in Re)?It.push({key:"v",message:'Version 2 payloads require the "v" key to be present.',severity:ft}):Tt===un&&"v"in Re&&It.push({key:"v",message:'Version 1 payloads should omit the "v" key (v1 is the default).',severity:Qt}),{valid:It.every((ct=>ct.severity!==ft)),issues:It}}const Vn="number[]",er="string[]",Zn="integer",ar="number",dr="boolean",Xn="string",gr="token",hr={ab:Vn,bl:Vn,br:Vn,bsa:Vn,bsd:Vn,bsda:Vn,lab:Vn,lb:Vn,mtp:Vn,pb:Vn,tab:Vn,tb:Vn,tbl:Vn,tpb:Vn,ec:er,nor:er,d:Zn,dfa:Zn,dl:Zn,ltc:Zn,msd:Zn,pt:Zn,rc:Zn,rtp:Zn,sn:Zn,ts:Zn,ttfb:Zn,ttfbb:Zn,ttlb:Zn,v:Zn,pr:ar,bg:dr,bs:dr,nr:dr,su:dr,cdn:Xn,cen:Xn,cid:Xn,cmsdd:Xn,cmsds:Xn,cs:Xn,h:Xn,nrr:Xn,sid:Xn,smrt:Xn,url:Xn,e:gr,ot:gr,sf:gr,st:gr,sta:gr},Br={bl:Zn,br:ar,mtp:Zn,tb:ar,nor:Xn},Or={sid:64,cid:128,cdn:128,h:128,cen:64},qr=64,Qr={e:["bc","ps","e","t","c","b","m","um","pe","pc","rr","as","ae","abs","abe","sk","ce"],ot:["m","a","v","av","i","c","tt","k","o"],sf:["d","h","s","o"],st:["v","l","ll"],sta:["s","p","k","r","a","w","e","f","q","d"]},pr=new Set(["bl","dl","mtp","rtp","tbl"]),Xr=new Set(["br","d","tb"]);function Dr(Re){return typeof Re=="number"&&Number.isFinite(Re)}function Kr(Re,ut,Tt){if(Array.isArray(ut))for(let It=0;It<ut.length;It++){const ct=ut[It];ct instanceof L.SfItem?Dr(ct.value)||Tt.push({key:Re,message:`Key "${Re}" array element [${It}] must be a finite number.`,severity:ft}):Dr(ct)||Tt.push({key:Re,message:`Key "${Re}" array element [${It}] must be a finite number.`,severity:ft})}else Tt.push({key:Re,message:`Key "${Re}
11" must be an array.`,severity:ft})}function Zr(Re,ut,Tt){if(Array.isArray(ut))for(let It=0;It<ut.length;It++){const ct=ut[It];ct instanceof L.SfItem?typeof ct.value!="string"&&Tt.push({key:Re,message:`Key "${Re}" array element [${It}] must be a string.`,severity:ft}):typeof ct!="string"&&Tt.push({key:Re,message:`Key "${Re}" array element [${It}] must be a string.`,severity:ft})}else Tt.push({key:Re,message:`Key "${Re}" must be an array.`,severity:ft})}function vr(Re,ut){const Tt=Rn(Re,ut),It=[];for(const[ct,wt]of Object.entries(Re)){if(xt(ct)){typeof wt!="string"?It.push({key:ct,message:`Custom key "${ct}" value must be a string or token.`,severity:ft}):wt.length>qr&&It.push({key:ct,message:`Custom key "${ct}" value exceeds maximum length of ${qr}.`,severity:ft});continue}if(ct==="v"){wt!==1&&wt!==2&&It.push({key:ct,message:'Key "v" must be 1 or 2.',severity:ft});continue}let cn=hr[ct];if(cn)switch(Tt===un&&ct in Br&&(cn=Br[ct]),cn){case Zn:Dr(wt)&&Number.isInteger(wt)?pr.has(ct)&&wt%100!=0&&It.push({key:ct,message:`Key "${ct}" should be rounded to the nearest 100.`,severity:Qt}):It.push({key:ct,message:`Key "${ct}" must be a finite integer.`,severity:ft});break;case ar:Dr(wt)?pr.has(ct)&&wt%100!=0?It.push({key:ct,message:`Key "${ct}" should be rounded to the nearest 100.`,severity:Qt}):Xr.has(ct)&&!Number.isInteger(wt)&&It.push({key:ct,message:`Key "${ct}" should be rounded to an integer.`,severity:Qt}):It.push({key:ct,message:`Key "${ct}" must be a finite number.`,severity:ft});break;case dr:typeof wt!="boolean"&&It.push({key:ct,message:`Key "${ct}
11" must be a boolean.`,severity:ft});break;case Xn:typeof wt!="string"?It.push({key:ct,message:`Key "${ct}" must be a string.`,severity:ft}):ct in Or&&wt.length>Or[ct]&&It.push({key:ct,message:`Key "${ct}" exceeds maximum length of ${Or[ct]}.`,severity:ft});break;case gr:{const mn=Qr[ct];mn&&!mn.includes(wt)&&It.push({key:ct,message:`Key "${ct}" has invalid token value "${String(wt)}". Expected one of: ${mn.join(", ")}.`,severity:ft});break}case Vn:Kr(ct,wt,It);break;case er:Zr(ct,wt,It)}}return{valid:It.every((ct=>ct.severity!==ft)),issues:It}}function Mr(Re,ut){return zt(Jn(Re,ut),vr(Re,ut),Qn(Re,ut))}function kr(Re,ut){const Tt={...ut,reportingMode:mt},It=Re.split(/\r?\n/).filter((cn=>cn.length>0));if(It.length===0)return{valid:!1,issues:[{message:"Empty event mode payload. At least one event line is required.",severity:ft}],data:[]};const ct=[],wt=[];for(let cn=0;cn<It.length;cn++)try{const mn=pn(It[cn]);ct.push(mn),wt.push(Mr(mn,Tt))}catch{ct.push({}),wt.push({valid:!1,issues:[{message:`Failed to decode event line ${cn+1}: invalid structured field syntax.`,severity:ft}]})}return{...zt(...wt),data:ct}}function Ct(Re,ut){const Tt=[];Re.method!=="POST"&&Tt.push({message:`Invalid HTTP method '${Re.method??"GET"}'. Event reports must use POST.`,severity:ft});const It=Re.headers?Pn(Re.headers).get("Content-Type"):void 0;if(It){const cn=It.split(";")[0].trim().toLowerCase();cn!==En&&Tt.push({message:`Invalid Content-Type '${cn}'. Event reports must use '${En}'.`,severity:ft})}else Tt.push({message:`Missing Content-Type header. Event reports must use '${En}'.`,severity:ft});const ct=Re.body;if(ct==null)return Tt.push({message:"Missing request body. Event reports must include a body.",severity:ft}),{valid:!1,issues:Tt,data:[]};if(typeof ct!="string")return Tt.push({message:"Request body must be a string.",severity:ft}),{valid:!1,issues:Tt,data:[]};const wt=kr(ct,ut);return{valid:Tt.length===0&&wt.valid,issues:[...Tt,...wt.issues],data:wt.data}}function en(Re,ut){const Tt=Pn(Re),It=[],ct={};for(const mn of Oe){const Hn=Tt.get(mn);if(!Hn)continue;let Gn;try{Gn=pn(Hn)}catch{It.push({key:mn,message:`Failed to decode "${mn}" header: invalid structured field syntax.`,severity:ft});continue}ct[mn]=Gn;for(const sr of Object.keys(Gn)){if(xt(sr))continue;const $n=rt[sr];$n&&$n!==mn&&It.push({key:sr,message:`Key "${sr}" is in "${mn}" but should be in "${$n}".`,severity:ft})}}const wt={valid:It.length===0,issues:It},cn=Object.assign({},...Oe.map((mn=>ct[mn])).filter(Boolean));return{...zt(wt,Mr(cn,{...ut,reportingMode:He})),data:cn}}function _n(Re,ut){const Tt=(function(wt){if(!wt)return;const cn=Pn(wt),mn={};let Hn=!1;for(const Gn of Oe){const sr=cn.get(Gn);sr&&(mn[Gn]=sr,Hn=!0)}return Hn?mn:void 0})(Re.headers);if(Tt)return en(Tt,ut);const It=new URL(Re.url).searchParams.get(he);if(!It)return{valid:!1,issues:[{message:"No CMCD data found in request headers or query parameters.",severity:ft}],data:{}};let ct;try{ct=pn(It)}catch{return{valid:!1,issues:[{message:"Failed to decode CMCD query parameter: invalid structured field syntax.",severity:ft}],data:{}}}return{...Mr(ct,{...ut,reportingMode:He}),data:ct}}},1103:function(vt,pe,P){P.r(pe),P.d(pe,{CMSD_DYNAMIC:function(){return o},CMSD_STATIC:function(){return p},CMSD_V1:function(){return T},CmsdHeaderField:function(){return y},CmsdObjectType:function(){return w},CmsdStreamType:function(){return m},CmsdStreamingFormat:function(){return h},decodeCmsdDynamic:function(){return r},decodeCmsdStatic:function(){return H},encodeCmsdDynamic:function(){return G},encodeCmsdStatic:function(){return ue}});var L=P(6390),d=P(2877);const o="CMSD-Dynamic",p="CMSD-Static",T=1,y={STATIC:p,DYNAMIC:o},w=L.CmObjectType,h=L.CmStreamingFormat,m=L.CmStreamType;function r(ge){return ge?(0,d.decodeSfList)(ge):[]}function H(ge){return ge?Object.entries((0,d.decodeSfDict)(ge)).reduce(((Ne,[fe,Me])=>{const{value:Fe}=Me;return Ne[fe]=typeof Fe=="symbol"?(0,d.symbolToStr)(Fe):Fe,Ne}),{}):{}}function G(ge,Ne){if(!ge)return"";if(typeof ge=="string"){if(!Ne)return"";ge=[new d.SfItem(ge,Ne)]}return(0,d.encodeSfList)(ge,{whitespace:!1})}function ue(ge,Ne){return ge?(0,d.encodeSfDict)((function(fe,Me){const Fe={};if(fe==null||typeof fe!="object")return Fe;const ot=Object.keys(fe),ke=Me?.useSymbol!==!1;return ot.forEach((Q=>{let X=fe[Q];Q==="v"&&X===1||(0,L.isValid)(X)&&((0,L.isTokenField)(Q)&&typeof X=="string"&&(X=ke?Symbol.for(X):new d.SfToken(X)),Fe[Q]=X)})),Fe})(ge,Ne),{whitespace:!1}):""}},6390:function(vt,pe,P){P.r(pe),P.d(pe,{CmObjectType:function(){return L},CmStreamType:function(){return o},CmStreamingFormat:function(){return d},isTokenField:function(){return p},isValid:function(){return T}});const L={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",
11KEY:"k",OTHER:"o"},d={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"},o={VOD:"v",LIVE:"l"};function p(y){return["ot","sf","st","e","sta"].includes(y)}function T(y){return typeof y=="number"?Number.isFinite(y):y!=null&&y!==""&&y!==!1}},2877:function(vt,pe,P){P.r(pe),P.d(pe,{SfItem:function(){return d},SfToken:function(){return Se},decodeSfDict:function(){return xt},decodeSfItem:function(){return sn},decodeSfList:function(){return ve},encodeSfDict:function(){return ne},encodeSfItem:function(){return se},encodeSfList:function(){return rt},parseBareItem:function(){return gt},parseBoolean:function(){return r},parseByteSequence:function(){return G},parseDate:function(){return ot},parseDict:function(){return Pt},parseError:function(){return y},parseInnerList:function(){return Ke},parseIntegerOrDecimal:function(){return Fe},parseItem:function(){return Pe},parseItemOrInnerList:function(){return Et},parseKey:function(){return mt},parseList:function(){return Sn},parseParameters:function(){return He},parseString:function(){return X},parseToken:function(){return xe},serializeBareItem:function(){return st},serializeBoolean:function(){return pt},serializeByteSequence:function(){return _t},serializeDate:function(){return Y},serializeDecimal:function(){return k},serializeDict:function(){return C},serializeError:function(){return Ie},serializeInnerList:function(){return l},serializeInteger:function(){return Ye},serializeItem:function(){return i},serializeKey:function(){return Te},serializeList:function(){return Oe},serializeParams:function(){return Le},serializeString:function(){return De},serializeToken:function(){return We},symbolToStr:function(){return j}});var L=P(9259),d=class Bi{constructor(ze,qe){Array.isArray(ze)&&(ze=ze.map((V=>V instanceof Bi?V:new Bi(V)))),this.value=ze,this.params=qe}};const o="Dict";function p(ae,ze){return{value:ae,src:ze}}function T(ae,ze,qe,V){return new Error(`failed to ${ae} "${he=ze,Array.isArray(he)?JSON.stringify(he):he instanceof Map?"Map{}":he instanceof Set?"Set{}":typeof he=="object"?JSON.stringify(he):String(he)}" as ${qe}`,{cause:V});var he}function y(ae,ze,qe){return T("parse",ae,ze,qe)}const w="Inner List",h="Bare Item",m="Boolean";function r(ae){let ze=0;if(ae[ze]!=="?")throw y(ae,m);if(ze++,ae[ze]==="1")return p(!0,ae.substring(++ze));if(ae[ze]==="0")return p(!1,ae.substring(++ze));throw y(ae,m)}const H="Byte Sequence";function G(ae){if(ae[0]!==":"||(ae=ae.substring(1)).includes(":")===!1)throw y(ae,H);const ze=/(^.*?)(:)/g,qe=ze.exec(ae)[1];return ae=ae.substring(ze.lastIndex),p((0,L.decodeBase64)(qe),ae)}const ue="Date",ge="Decimal",Ne="Integer",fe=`${Ne} or ${ge}`;function Me(ae){return ae<-999999999999999||999999999999999<ae}function Fe(ae){let ze,qe=1,V="";const he=y(ae,fe);if(ae[0]==="-"&&(qe=-1,ae=ae.substring(1)),ae.length<=0)throw he;const tt=/^(\d+)?/g,it=tt.exec(ae);if(it[0].length===0)throw he;if(V+=it[1],(ae=ae.substring(tt.lastIndex))[0]==="."){if(V.length>12)throw he;const yt=/^(\.\d+)?/g,Ze=yt.exec(ae);if(ae=ae.substring(yt.lastIndex),Ze[0].length===0||Ze[1].length>4||(V+=Ze[1],V.length>16))throw he;ze=parseFloat(V)*qe}else{if(V.length>15)throw he;if(ze=parseInt(V)*qe,Me(ze))throw y(V,fe)}return p(ze,ae)}function ot(ae){let ze=0;if(ae[ze]!=="@")throw y(ae,ue);ze++;const qe=Fe(ae.substring(ze));if(Number.isInteger(qe.value)===!1)throw y(ae,ue);return p(new Date(1e3*qe.value),qe.src)}const ke="String",Q=/[\x00-\x1f\x7f]+/;function X(ae){let ze="",qe=0;if(ae[qe]!=='"')throw y(ae,ke);for(qe++;ae.length>qe;){if(ae[qe]==="\\"){if(ae.length<=qe+1||(qe++,ae[qe]!=='"'&&ae[qe]!=="\\"))throw y(ae,ke);ze+=ae[qe]}else{if(ae[qe]==='"')return p(ze,ae.substring(++qe));if(Q.test(ae[qe]))throw y(ae,ke);ze+=ae[qe]}qe++}throw y(ae,ke)}var Se=class{constructor(ae){this.description=ae}};const Ae="Token";function xe(ae,ze){if(/^[a-zA-Z*]$/.test(ae[0])===!1)throw y(ae,Ae);const qe=/^([!#$%&'*+\-.^_`|~\w:/]+)/g,V=qe.exec(ae)[1];return ae=ae.substring(qe.lastIndex),p(ze?.useSymbol===!1?new Se(V):Symbol.for(V),ae)}function gt(ae,ze){const qe=ae[0];if(qe==='"')return X(ae);if(/^[-0-9]/.test(qe))return Fe(ae);if(qe==="?")return r(ae);if(qe===":")return G(ae);if(/^[a-zA-Z*]/.test(qe))return xe(ae,ze);if(qe==="@")return ot(ae);throw y(ae,h)}const Ee="Key";function mt(ae){let ze=0;
11if(/^[a-z*]$/.test(ae[ze])===!1)throw y(ae,Ee);let qe="";for(;ae.length>ze;){if(/^[a-z0-9_\-.*]$/.test(ae[ze])===!1)return p(qe,ae.substring(ze));qe+=ae[ze],ze++}return p(qe,ae.substring(ze))}function He(ae,ze){let qe;for(;ae.length>0&&ae[0]===";";){const V=mt(ae=ae.substring(1).trim()),he=V.value;let tt=!0;if((ae=V.src)[0]==="="){const it=gt(ae=ae.substring(1),ze);tt=it.value,ae=it.src}qe==null&&(qe={}),qe[he]=tt}return p(qe,ae)}function Pe(ae,ze){const qe=gt(ae,ze),V=He(ae=qe.src,ze);return ae=V.src,p(new d(qe.value,V.value),ae)}function Ke(ae,ze){if(ae[0]!=="(")throw y(ae,w);ae=ae.substring(1);const qe=[];for(;ae.length>0;){if((ae=ae.trim())[0]===")"){const he=He(ae=ae.substring(1),ze);return p(new d(qe,he.value),he.src)}const V=Pe(ae,ze);if(qe.push(V.value),(ae=V.src)[0]!==" "&&ae[0]!==")")throw y(ae,w)}throw y(ae,w)}function Et(ae,ze){return ae[0]==="("?Ke(ae,ze):Pe(ae,ze)}function Pt(ae,ze){const qe={};for(;ae.length>0;){let V;const he=mt(ae),tt=he.value;if((ae=he.src)[0]==="="){const it=Et(ae.substring(1),ze);V=it.value,ae=it.src}else{const it=He(ae,ze);V=new d(!0,it.value),ae=it.src}if(qe[tt]=V,(ae=ae.trim()).length===0)return p(qe,ae);if(ae[0]!==","||(ae=ae.substring(1).trim()).length===0||ae[0]===",")throw y(ae,o)}return p(qe,ae)}function xt(ae,ze){try{const{src:qe,value:V}=Pt(ae.trim(),ze);if(qe!=="")throw y(qe,o);return V}catch(qe){throw y(ae,o,qe)}}const Lt="Item";function sn(ae,ze){try{const{src:qe,value:V}=Pe(ae.trim(),ze);if(qe!=="")throw y(qe,Lt);return V}catch(qe){throw y(ae,Lt,qe)}}const nn="List";function Sn(ae,ze){const qe=[];for(;ae.length>0;){const V=Et(ae,ze);if(qe.push(V.value),(ae=V.src.trim()).length===0)return p(qe,ae);if(ae[0]!==","||(ae=ae.substring(1).trim()).length===0||ae[0]===",")throw y(ae,nn)}return p(qe,ae)}function ve(ae,ze){try{const{src:qe,value:V}=Sn(ae.trim(),ze);if(qe!=="")throw y(qe,nn);return V}catch(qe){throw y(ae,nn,qe)}}function Ie(ae,ze,qe){return T("serialize",ae,ze,qe)}function pt(ae){if(typeof ae!="boolean")throw Ie(ae,m);return ae?"?1":"?0"}function _t(ae){if(ArrayBuffer.isView(ae)===!1)throw Ie(ae,H);return`:${(0,L.encodeBase64)(ae)}:`}function Ye(ae){if(Me(ae))throw Ie(ae,Ne);return ae.toString()}function Y(ae){return`@${Ye(ae.getTime()/1e3)}`}function k(ae){const ze=(0,L.roundToEven)(ae,3);if(Math.floor(Math.abs(ze)).toString().length>12)throw Ie(ae,ge);const qe=ze.toString();return qe.includes(".")?qe:`${qe}.0`}function De(ae){if(Q.test(ae))throw Ie(ae,ke);return`"${ae.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function j(ae){return ae.description||ae.toString().slice(7,-1)}function We(ae){const ze=j(ae);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(ze)===!1)throw Ie(ze,Ae);return ze}function st(ae){switch(typeof ae){case"number":if(!Number.isFinite(ae))throw Ie(ae,h);return Number.isInteger(ae)?Ye(ae):k(ae);case"string":return De(ae);case"symbol":return We(ae);case"boolean":return pt(ae);case"object":if(ae instanceof Date)return Y(ae);if(ae instanceof Uint8Array)return _t(ae);if(ae instanceof Se)return We(ae);default:throw Ie(ae,h)}}function Te(ae){if(/^[a-z*][a-z0-9\-_.*]*$/.test(ae)===!1)throw Ie(ae,Ee);return ae}function Le(ae){return ae==null?"":Object.entries(ae).map((([ze,qe])=>qe===!0?`;${Te(ze)}`:`;${Te(ze)}=${st(qe)}`)).join("")}function i(ae){return ae instanceof d?`${st(ae.value)}${Le(ae.params)}`:st(ae)}function l(ae){return`(${ae.value.map(i).join(" ")})${Le(ae.params)}`}function C(ae,ze={whitespace:!0}){if(typeof ae!="object"||ae==null)throw Ie(ae,o);const qe=ae instanceof Map?ae.entries():Object.entries(ae),V=ze?.whitespace?" ":"";return Array.from(qe).map((([he,tt])=>{tt instanceof d==0&&(tt=new d(tt));let it=Te(he);return tt.value===!0?it+=Le(tt.params):(it+="=",Array.isArray(tt.value)?it+=l(tt):it+=i(tt)),it})).join(`,${V}`)}function ne(ae,ze){return C(ae,ze)}function se(ae,ze){return ae instanceof d||(ae=new d(ae,ze)),i(ae)}function Oe(ae,ze={whitespace:!0}){if(Array.isArray(ae)===!1)throw Ie(ae,nn);const qe=ze?.whitespace?" ":"";return ae.map((V=>{V instanceof d==0&&(V=new d(V));const he=V;return Array.isArray(he.value)?l(he):i(he)})).join(`,${qe}`)}function rt(ae,ze){return Oe(ae,ze)}},9259:function(vt,pe,P){function L(Ee){return new Uint8Array(Ee).reduce(((mt,He)=>mt+He.toString(16).padStart(2,"0")),"")}function d(Ee){return L(Ee).replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function o(Ee){return new Uint8Array([...atob(Ee)].map((mt=>mt.charCodeAt(0))))}P.r(pe),P.d(pe,{Encoding:function(){return Ne},RequestResponseType:function(){return ot},UTF_16:function(){return m},UTF_16_BE:function(){return r},UTF_16_LE:function(){return H},UTF_8:function(){return G},arrayBufferToHex:function(){return L},arrayBufferToUuid:function(){return d},base64decode:function(){return p},base64encode:function(){return y},convertUint8ToUint16:function(){return w},decodeBase64:function(){return o},decodeText:function(){return ue},encodeBase64:function(){return T},encodeText:function(){return ge},getBandwidthBps:function(){return fe},getBaseUrl:function(){return Me},hexToArrayBuffer:function(){return Fe},isArrayBufferLike:function(){return h},roundToEven:function(){return ke},stringToUint16:function(){return Q},unescapeHtml:function(){return Se},urlToRelativePath:function(){return Ae},uuid:function(){return xe},uuidToArrayBuffer:function(){return gt}});const p=o;function T(Ee){return btoa(String.fromCharCode(...Ee))}const y=T;function w(Ee){if(Ee.length%2!=0){const mt=new Uint8Array(Ee.length+1);return mt.set(Ee),new Uint16Array(mt.buffer)}return new Uint16Array(Ee.buffer)}function h(Ee){return Ee instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&Ee instanceof SharedArrayBuffer}
11const m="utf-16",r="utf-16be",H="utf-16le",G="utf-8";function ue(Ee,mt={}){let He;He=h(Ee)?new DataView(Ee):new DataView(Ee.buffer,Ee.byteOffset,Ee.byteLength);let Pe=0,{encoding:Ke}=mt;if(!Ke){const sn=He.getUint8(0),nn=He.getUint8(1);sn==239&&nn==187&&He.getUint8(2)==191?(Ke=G,Pe=3):sn==254&&nn==255?(Ke=r,Pe=2):sn==255&&nn==254?(Ke=H,Pe=2):Ke=G}if(typeof TextDecoder<"u")return new TextDecoder(Ke).decode(He);const{byteLength:Et}=He,Pt=Ke!==r;let xt,Lt="";for(;Pe<Et;){switch(Ke){case G:if(xt=He.getUint8(Pe),xt<128)Pe++;else if(xt>=194&&xt<=223)if(Pe+1<Et){const sn=He.getUint8(Pe+1);sn>=128&&sn<=191?(xt=(31&xt)<<6|63&sn,Pe+=2):Pe++}else Pe++;else if(xt>=224&&xt<=239)if(Pe+2<=Et-1){const sn=He.getUint8(Pe+1),nn=He.getUint8(Pe+2);sn>=128&&sn<=191&&nn>=128&&nn<=191?(xt=(15&xt)<<12|(63&sn)<<6|63&nn,Pe+=3):Pe++}else Pe++;else if(xt>=240&&xt<=244)if(Pe+3<=Et-1){const sn=He.getUint8(Pe+1),nn=He.getUint8(Pe+2),Sn=He.getUint8(Pe+3);sn>=128&&sn<=191&&nn>=128&&nn<=191&&Sn>=128&&Sn<=191?(xt=(7&xt)<<18|(63&sn)<<12|(63&nn)<<6|63&Sn,Pe+=4):Pe++}else Pe++;else Pe++;break;case r:case m:case H:xt=He.getUint16(Pe,Pt),Pe+=2}Lt+=String.fromCodePoint(xt)}return Lt}function ge(Ee){return new TextEncoder().encode(Ee)}const Ne={UTF8:G,UTF16:m,UTF16BE:r,UTF16LE:H};function fe(Ee){const mt=Ee.duration/1e3;return 8*Ee.encodedBodySize/mt}function Me(Ee){const mt=typeof Ee=="string"?new URL(Ee):Ee;return mt.origin+mt.pathname.substring(0,mt.pathname.lastIndexOf("/")+1)}function Fe(Ee){const mt=new ArrayBuffer(Ee.length/2),He=new Uint8Array(mt);for(let Pe=0;Pe<Ee.length;Pe+=2)He[Pe/2]=parseInt(Ee.slice(Pe,Pe+2),16);return mt}const ot={TEXT:"text",JSON:"json",BLOB:"blob",ARRAY_BUFFER:"arrayBuffer",DOCUMENT:"document",STREAM:"stream"};function ke(Ee,mt){if(Ee<0)return-ke(-Ee,mt);const He=Math.pow(10,mt);if(Math.abs(Ee*He%1-.5)<Number.EPSILON){const Pe=Math.floor(Ee*He);return(Pe%2==0?Pe:Pe+1)/He}return Math.round(Ee*He)/He}function Q(Ee){const mt=new ArrayBuffer(2*Ee.length),He=new DataView(mt);for(let Pe=0;Pe<Ee.length;Pe++)He.setUint16(2*Pe,Ee.charCodeAt(Pe),!0);return new Uint16Array(mt)}const X=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g;function Se(Ee){return Ee.indexOf("&")===-1?Ee:Ee.replace(X,(mt=>{switch(mt){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'";case" ":return"Â ";case"‎":return"â";case"‏":return"â";default:if(mt[1]==="#"){const He=mt[2]==="x"||mt[2]==="X"?parseInt(mt.slice(3),16):parseInt(mt.slice(2),10);return String.fromCodePoint(He)}return mt}}))}function Ae(Ee,mt){let He;try{He=new URL(Ee)}catch{return Ee}const Pe=new URL(mt);if(He.origin!==Pe.origin)return Ee;const Ke=He.pathname.split("/").slice(1),Et=Pe.pathname.split("/").slice(1,-1),Pt=Math.min(Ke.length,Et.length);for(let xt=0;xt<Pt&&Ke[xt]===Et[xt];xt++)Ke.shift(),Et.shift();for(;Et.length;)Et.shift(),Ke.unshift("..");return Ke.join("/")+He.search+He.hash}function xe(){try{return crypto.randomUUID()}catch{try{const mt=URL.createObjectURL(new Blob),He=mt.toString();return URL.revokeObjectURL(mt),He.slice(He.lastIndexOf("/")+1)}catch{let He=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(Pe=>{const Ke=(He+16*Math.random())%16|0;return He=Math.floor(He/16),(Pe=="x"?Ke:3&Ke|8).toString(16)}))}}}function gt(Ee){return Fe(Ee.replace(/-/g,""))}},649:function(vt,pe,P){P.r(pe);var L=P(8850),d=P(3621),o=P(138);function p(y){y=y||{};const w=this.context,h=(0,L.default)(w).getInstance(),m=y.settings,r=[];let H,G,ue,ge;function Ne(X){return X&&X.bind?X.bind(window.console):window.console.log.bind(window.console)}function fe(...X){Q(1,this,...X)}function Me(...X){Q(2,this,...X)}function Fe(...X){Q(3,this,...X)}function ot(...X){Q(4,this,...X)}function ke(...X){Q(5,this,...X)}function Q(X,Se,...Ae){let xe="",gt=null;G&&(gt=new Date().getTime(),xe+="["+(gt-ge)+"]"),ue&&Se&&Se.getClassName&&(xe+="["+Se.getClassName()+"]",Se.getType&&(xe+="["+Se.getType()+"]")),xe.length>0&&(xe+=" "),Array.apply(null,Ae).forEach((function(Ee){xe+=Ee+" "})),r[X]&&m&&m.get().debug.logLevel>
11=X&&r[X](xe),m&&m.get().debug.dispatchEvent&&h.trigger(d.default.LOG,{message:xe,level:X})}return H={getLogger:function(X){return{fatal:fe.bind(X),error:Me.bind(X),warn:Fe.bind(X),info:ot.bind(X),debug:ke.bind(X)}},setLogTimestampVisible:function(X){G=X},setCalleeNameVisible:function(X){ue=X}},G=!0,ue=!0,ge=new Date().getTime(),typeof window<"u"&&window.console&&(r[1]=Ne(window.console.error),r[2]=Ne(window.console.error),r[3]=Ne(window.console.warn),r[4]=Ne(window.console.info),r[5]=Ne(window.console.debug)),H}p.__dashjs_factory_name="Debug";const T=o.default.getSingletonFactory(p);T.LOG_LEVEL_NONE=0,T.LOG_LEVEL_FATAL=1,T.LOG_LEVEL_ERROR=2,T.LOG_LEVEL_WARNING=3,T.LOG_LEVEL_INFO=4,T.LOG_LEVEL_DEBUG=5,o.default.updateSingletonFactory(p.__dashjs_factory_name,T),pe.default=T},8850:function(vt,pe,P){P.r(pe);var L=P(138),d=P(1191);function o(){let T={};function y(m,r,H,G={},ue=!1){if(!m)throw new Error("event type cannot be null or undefined");if(!r||typeof r!="function")throw new Error("listener must be a function: "+r);let ge=G.priority||0;if(h(m,r,H)>=0)return;T[m]=T[m]||[];const Ne={callback:r,scope:H,priority:ge,executeOnlyOnce:ue};H&&H.getStreamId&&(Ne.streamId=H.getStreamId()),H&&H.getType&&(Ne.mediaType=H.getType()),G&&G.mode&&(Ne.mode=G.mode),T[m].some(((fe,Me)=>{if(fe&&ge>fe.priority)return T[m].splice(Me,0,Ne),!0}))||T[m].push(Ne)}function w(m,r,H){if(!m||!r||!T[m])return;const G=h(m,r,H);G<0||T[m].splice(G,1)}function h(m,r,H){let G=-1;return T[m]&&T[m].some(((ue,ge)=>{if(ue&&ue.callback===r&&(!H||H===ue.scope))return G=ge,!0})),G}return{on:function(m,r,H,G={}){y(m,r,H,G)},once:function(m,r,H,G={}){y(m,r,H,G,!0)},off:w,trigger:function(m,r={},H={}){if(!m||!T[m])return;if((r=r||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");r.type=m,H.streamId&&(r.streamId=H.streamId),H.mediaType&&(r.mediaType=H.mediaType);const G=[];T[m].filter((ue=>!(!ue||H.streamId&&ue.streamId&&ue.streamId!==H.streamId||H.mediaType&&ue.mediaType&&ue.mediaType!==H.mediaType||H.mode&&ue.mode&&ue.mode!==H.mode||!ue.mode&&H.mode&&H.mode===d.default.EVENT_MODE_ON_RECEIVE))).forEach((ue=>{ue&&ue.callback.call(ue.scope,r),ue.executeOnlyOnce&&G.push(ue)})),G.forEach((ue=>{w(m,ue.callback,ue.scope)}))},reset:function(){T={}}}}o.__dashjs_factory_name="EventBus";const p=L.default.getSingletonFactory(o);p.EVENT_PRIORITY_LOW=0,p.EVENT_PRIORITY_HIGH=5e3,L.default.updateSingletonFactory(o.__dashjs_factory_name,p),pe.default=p},138:function(vt,pe,P){P.r(pe);const L=(function(){let d,o=[];const p={},T={};function y(r,H){for(const G in o){const ue=o[G];if(ue.context===r&&ue.name===H)return ue.instance}return null}function w(r,H){return H[r]}function h(r,H,G){r in G&&(G[r]=H)}function m(r,H,G){let ue;const ge=r.__dashjs_factory_name,Ne=H[ge];if(Ne){let fe=Ne.instance;if(!Ne.override)return fe.apply({context:H,factory:d},G);ue=r.apply({context:H},G),fe=fe.apply({context:H,factory:d,parent:ue},G);for(const Me in fe)ue.hasOwnProperty(Me)&&(ue[Me]=fe[Me])}else ue=r.apply({context:H},G);return ue.getClassName=function(){return ge},ue}return d={deleteSingletonInstances:function(r){o=o.filter((H=>H.context!==r))},extend:function(r,H,G,ue){!ue[r]&&H&&(ue[r]={instance:H,override:G})},getClassFactory:function(r){let H=w(r.__dashjs_factory_name,T);return H||(H=function(G){return G===void 0&&(G={}),{create:function(){return m(r,G,arguments)}}},T[r.__dashjs_factory_name]=H),H},getClassFactoryByName:function(r){return w(r,T)},getSingletonFactory:function(r){let H=w(r.__dashjs_factory_name,p);return H||(H=function(G){let ue;return G===void 0&&(G={}),{getInstance:function(){return ue||(ue=y(G,r.__dashjs_factory_name)),ue||(ue=m(r,G,arguments),o.push({name:r.__dashjs_factory_name,context:G,instance:ue})),ue}}},p[r.__dashjs_factory_name]=H),H},getSingletonFactoryByName:function(r){return w(r,p)},getSingletonInstance:y,setSingletonInstance:function(r,H,G){for(const ue in o){const ge=o[ue];if(ge.context===r&&ge.name===H)return void(o[ue].instance=G)}o.push({name:H,context:r,instance:G})},updateClassFactory:function(r,H){h(r,H,T)},updateSingletonFactory:function(r,H){h(r,H,p)}},d})();pe.default=L},8261:function(vt,pe,P){P.r(pe);var L=P(138),d=P(7263),o=P(649),p=P(5212),T=P(7568),y=P(8850),w=P(3621),h=P(4246);function m(){let H;const G=this.context,ue=(0,y.default)(G).getInstance(),ge={"streaming.delay.liveDelay":w.default.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":w.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":w.default.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":w.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":w.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,"streaming.abr.rules.throughputRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.bolaRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.insufficientBufferRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.switchHistoryRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.droppedFramesRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.abandonRequestsRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.l2ARule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.loLPRule.active":w.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.maxBitrate.video":w.default.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.maxBitrate.audio":w.default.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.minBitrate.video":w.default.SETTING_UPDATED_MIN_BITRATE,"streaming.abr.minBitrate.audio":w.default.SETTING_UPDATED_MIN_BITRATE},Ne={debug:{logLevel:o.default.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,cacheInitSegmentsLimit:50,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,supportedEssentialProperties:[{schemeIdUri:p.default.FONT_DOWNLOAD_DVB_SCHEME},{schemeIdUri:p.default.COLOUR_PRIMARIES_SCHEME_ID_URI,value:/1|5|6|7/},{schemeIdUri:p.default.URL_QUERY_INFO_SCHEME},{schemeIdUri:p.default.EXT_URL_QUERY_INFO_SCHEME},{schemeIdUri:p.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI,value:/0|1|5|6/},{schemeIdUri:p.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI,value:/1|6|13|14|15/},{schemeIdUri:p.default.SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI},...p.default.THUMBNAILS_SCHEME_ID_URIS.map((Fe=>({schemeIdUri:Fe})))],useMediaCapabilitiesApi:!0,filterVideoColorimetryEssentialProperties:!0,filterHDRMetadataFormatEssentialProperties:!0,filterAudioChannelConfiguration:!1},events:{eventControllerRefreshDelay:100,deleteEventMessageDataTimeout:1e4},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,keepProtectionMediaKeysMaximumOpenSessions:-1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0,ignoreKeyStatuses:!1},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:null,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,bufferTimeDefault:18,longFormContentDurationThreshold:600,stallThreshold:.3,lowLatencyStallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeType:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1,syntheticStallEvents:{enabled:!1,ignoreReadyState:!1}},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1,seekOffset:0,checkInterval:250},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroun
11dSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"},artificialTimeOffsetToApply:0},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},step:{start:{min:NaN,max:NaN},stop:{min:NaN,max:NaN}},liveThreshold:-1,playbackBufferMin:.5,enabled:null,mode:p.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:10,audio:5},trackSwitchMode:{audio:p.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:p.default.TRACK_SWITCH_MODE_NEVER_REPLACE},includePreselectionsInMediainfoArray:!0,includePreselectionsForInitialTrackSelection:!1,ignoreSelectionPriority:!1,prioritizeRoleMain:!0,assumeDefaultRoleAsMain:!0,selectionModeForInitialTrack:p.default.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY,blacklistExpiryTime:-1,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:{[T.HTTPRequest.MPD_TYPE]:500,[T.HTTPRequest.XLINK_EXPANSION_TYPE]:500,[T.HTTPRequest.MEDIA_SEGMENT_TYPE]:1e3,[T.HTTPRequest.INIT_SEGMENT_TYPE]:1e3,[T.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:1e3,[T.HTTPRequest.INDEX_SEGMENT_TYPE]:1e3,[T.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]:1e3,[T.HTTPRequest.LICENSE]:1e3,[T.HTTPRequest.LICENSE_CERTIFICATE]:1e3,[T.HTTPRequest.OTHER_TYPE]:1e3,lowLatencyReductionFactor:10},retryAttempts:{[T.HTTPRequest.MPD_TYPE]:3,[T.HTTPRequest.XLINK_EXPANSION_TYPE]:1,[T.HTTPRequest.MEDIA_SEGMENT_TYPE]:3,[T.HTTPRequest.INIT_SEGMENT_TYPE]:3,[T.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:3,[T.HTTPRequest.INDEX_SEGMENT_TYPE]:3,[T.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]:3,[T.HTTPRequest.LICENSE]:3,[T.HTTPRequest.LICENSE_CERTIFICATE]:3,[T.HTTPRequest.OTHER_TYPE]:3,lowLatencyMultiplyFactor:5},abr:{limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,limitBitrateByPortalMinimum:0,enableSupplementalPropertyAdaptationSetSwitching:!0,rules:{throughputRule:{active:!0,priority:h.default.PRIORITY.DEFAULT},bolaRule:{active:!0,priority:h.default.PRIORITY.DEFAULT},insufficientBufferRule:{active:!0,priority:h.default.PRIORITY.DEFAULT,parameters:{throughputSafetyFactor:.7,segmentIgnoreCount:2}},switchHistoryRule:{active:!0,priority:h.default.PRIORITY.DEFAULT,parameters:{sampleSize:8,switchPercentageThreshold:.075}},droppedFramesRule:{active:!1,priority:h.default.PRIORITY.DEFAULT,parameters:{minimumSampleSize:375,droppedFramesPercentageThreshold:.15}},abandonRequestsRule:{active:!0,priority:h.default.PRIORITY.DEFAULT,parameters:{abandonDurationMultiplier:1.8,minSegmentDownloadTimeThresholdInMs:500,minThroughputSamplesThreshold:6}},l2ARule:{active:!1,priority:h.default.PRIORITY.DEFAULT},loLPRule:{active:!1,priority:h.default.PRIORITY.DEFAULT}},throughput:{averageCalculationMode:p.default.THROUGHPUT_CALCULATION_MODES.EWMA,lowLatencyDownloadTimeCalculationMode:p.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING,useResourceTimingApi:!0,useNetworkInformationApi:{xhr:!1,fetch:!1},useDeadTimeLatency:!0,bandwidthSafetyFactor:.9,sampleSettings:{live:3,vod:4,enableSampleSizeAdjustment:!0,decreaseScale:.7,increaseScale:1.3,maxMeasurementsToKeep:20,averageLatencySampleAmount:4},ewma:{throughputSlowHalfLifeSeconds:8,throughputFastHalfLifeSeconds:3,latencySlowHalfLifeCount:2,latencyFastHalfLifeCount:1,weightDownloadTimeMultiplicationFactor:.0015}},maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},initialBitrate:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0}},cmcd:{applyParametersFromMpd:!0,enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:p.default.CMCD_MODE_QUERY,enabledKeys:p.default.CMCD_KEYS,includeInRequests:["segment","mpd"],version:1,eventTargets:[]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}
11,enhancement:{enabled:!1,codecs:["lvc1"]},defaultSchemeIdUri:{viewpoint:"",audioChannelConfiguration:"urn:mpeg:mpegB:cicp:ChannelConfiguration",role:"urn:mpeg:dash:role:2011",accessibility:"urn:mpeg:dash:role:2011"},dvbReporting:{reportingUrl:null}},errors:{recoverAttempts:{mediaErrorDecode:5}}};let fe=d.default.clone(Ne);function Me(Fe,ot,ke){for(let Q in Fe)Fe.hasOwnProperty(Q)&&(ot.hasOwnProperty(Q)?typeof Fe[Q]!="object"||Fe[Q]instanceof RegExp||Fe[Q]instanceof Array||Fe[Q]===null?(ot[Q]=d.default.clone(Fe[Q]),ge[ke+Q]&&ue.trigger(ge[ke+Q])):Me(Fe[Q],ot[Q],ke.slice()+Q+"."):console.error("Settings parameter "+ke+Q+" is not supported"))}return H={get:function(){return fe},update:function(Fe){typeof Fe=="object"&&Me(Fe,fe,"")},reset:function(){fe=d.default.clone(Ne)}},H}m.__dashjs_factory_name="Settings";let r=L.default.getSingletonFactory(m);pe.default=r},7263:function(vt,pe,P){P.r(pe);var L=P(3282),d=P(5212);class o{static mixin(T,y,w){let h,m={};if(T)for(let r in y)y.hasOwnProperty(r)&&(h=y[r],r in T&&(T[r]===h||r in m&&m[r]===h)||(typeof T[r]=="object"&&T[r]!==null?T[r]=o.mixin(T[r],h,w):T[r]=w(h)));return T}static clone(T){if(!T||typeof T!="object")return T;if(T instanceof RegExp)return new RegExp(T);let y;if(T instanceof Array){y=[];for(let w=0,h=T.length;w<h;++w)w in T&&y.push(o.clone(T[w]))}else y={};return o.mixin(y,T,o.clone)}static addAdditionalQueryParameterToUrl(T,y){try{if(!y||y.length===0)return T;let w=T;return y.forEach((({key:h,value:m})=>{const r=w.includes("?")?"&":"?";w+=`${r}${encodeURIComponent(h)}=${encodeURIComponent(m)}`})),w}catch{return T}}static removeQueryParameterFromUrl(T,y){if(!T||!y)return T;const w=new URL(T),h=new URLSearchParams(w.search);if(!h||h.size===0||!h.has(y))return T;h.delete(y);const m=Array.from(h.entries()).map((([H,G])=>`${H}=${G}`)).join("&"),r=`${w.origin}${w.pathname}`;return m?`${r}?${m}`:r}static parseHttpHeaders(T){let y={};if(!T)return y;let w=T.trim().split(`\r 12`);for(let h=0,m=w.length;h<m;h++){let r=w[h],H=r.indexOf(": ");H>0&&(y[r.substring(0,H)]=r.substring(H+2))}return y}static parseQueryParams(T){const y=[],w=new URLSearchParams(T);for(const[h,m]of w.entries())y.push({key:decodeURIComponent(h),value:decodeURIComponent(m)});return y}static generateUuid(){let T=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(y){const w=(T+16*Math.random())%16|0;return T=Math.floor(T/16),(y=="x"?w:3&w|8).toString(16)}))}static generateHashCode(T){let y=0;if(T.length===0)return y;for(let w=0;w<T.length;w++)y=(y<<5)-y+T.charCodeAt(w),y|=0;return y}static getRelativeUrl(T,y){try{const w=new URL(T),h=new URL(y);if(w.protocol=h.protocol,w.origin!==h.origin)return y;let m=L.relative(w.pathname.substr(0,w.pathname.lastIndexOf("/")),h.pathname.substr(0,h.pathname.lastIndexOf("/")));const r=m.length===0?1:0;return m+=h.pathname.substr(h.pathname.lastIndexOf("/")+r,h.pathname.length-1),h.pathname.length<m.length?h.pathname:m}catch{return y}}static getHostFromUrl(T){try{return new URL(T).host}catch{return null}}static parseUserAgent(T=null){try{const y=typeof T=="string"?T.toLowerCase():typeof navigator<"u"&&navigator.userAgent?navigator.userAgent.toLowerCase():"",w={name:""};return/edg/.test(y)?w.name="edge":/opr|opios/.test(y)?w.name="opera":/chrome|crios/.test(y)?w.name="chrome":/firefox|fxios/.test(y)?w.name="firefox":/safari/.test(y)&&(w.name="safari"),{browser:w}}catch{return{}}}static stringHasProtocol(T){return/(http(s?)):\/\//i.test(T)}static bufferSourceToDataView(T){return o.toDataView(T,DataView)}static bufferSourceToInt8(T){return o.toDataView(T,Uint8Array)}static uint8ArrayToString(T){return new TextDecoder("utf-8").decode(T)}static bufferSourceToHex(T){const y=o.bufferSourceToInt8(T);let w="";for(let h of y)h=h.toString(16),h.length===1&&(h="0"+h),w+=h;return w}static toDataView(T,y){const w=o.getArrayBuffer(T);let h=1;"BYTES_PER_ELEMENT"in DataView&&(h=DataView.BYTES_PER_ELEMENT);const m=((T.byteOffset||0)+T.byteLength)/h,r=(T.byteOffset||0)/h,H=Math.floor(Math.max(0,Math.min(r,m)));return new y(w,H,Math.floor(Math.min(H+Math.max(1/0,0),m))-H)}static getArrayBuffer(T){return T instanceof ArrayBuffer?T:T.buffer}static getCodecFamily(T){const{base:y,profile:w}=o._getCodecParts(T);switch(y){case"mp4a":switch(w){case"69":case"6b":case"40.34":return d.default.CODEC_FAMILIES.MP3;case"66":case"67":case"68":case"40.2":case"40.02":case"40.5":case"40.05":case"40.29":case"40.42":return d.default.CODEC_FAMILIES.AAC;case"a5":return d.default.CODEC_FAMILIES.AC3;case"e6":return d.default.CODEC_FAMILIES.EC3;case"b2":return d.default.CODEC_FAMILIES.DTSX;case"a9":return d.default.CODEC_FAMILIES.DTSC}break;case"avc1":case"avc3":return d.default.CODEC_FAMILIES.AVC;case"hvc1":case"hvc3":return d.default.CODEC_FAMILIES.HEVC;default:return y}return y}static _getCodecParts(T){const[y,...w]=T.split(".");return{base:y,profile:w.join(".")}}}pe.default=o},8986:function(vt,pe,P){P.r(pe),P.d(pe,{getVersionString:function(){return d}});const L="5.2.0";function d(){return L}},893:function(vt,pe,P){P.r(pe);var L=P(8748);class d extends L.default{constructor(){super(),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.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_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.NO_SUPPORTED_
12KEY_IDS=36,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 segment ranges from sidx",this.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server 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="Removing data from the SourceBuffer",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 : ",this.NO_SUPPORTED_KEY_IDS_MESSAGE="All possible Adaptation Sets have an invalid key status"}}let o=new d;pe.default=o},8748:function(vt,pe,P){P.r(pe),pe.default=class{extend(L,d){if(!L)return;let o=!!d&&d.override,p=!!d&&d.publicOnly;for(const T in L)!L.hasOwnProperty(T)||this[T]&&!o||p&&L[T].indexOf("public_")===-1||(this[T]=L[T])}}},5734:function(vt,pe,P){P.r(pe);var L=P(7252);class d extends L.default{constructor(){super(),this.ATTEMPT_BACKGROUND_SYNC="attemptBackgroun
12dSync",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CMSD_STATIC_HEADER="cmsdStaticHeader",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.INBAND_EVENTS="inbandEvents",this.INITIAL_STREAM_SWITCH="initialStreamSwitch",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_FRAGMENT_NEEDED="initFragmentNeeded",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.LOADING_ABANDONED="loadingAborted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_PROGRESS="loadingProgress",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIAINFO_UPDATED="mediaInfoUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",this.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.SEEK_TARGET="seekTarget",this.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",this.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",this.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",this.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",this.SETTING_UPDATED_ABR_ACTIVE_RULES="settingUpdatedAbrActiveRules",this.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",this.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",this.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",this.SETTING_UPDATED_MAX_BITRATE="settingUpdatedMaxBitrate",this.SETTING_UPDATED_MIN_BITRATE="settingUpdatedMinBitrate",this.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",this.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",this.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",this.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",this.SOURCE_BUFFER_ERROR="sourceBufferError",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",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.VIDEO_ELEMENT_RESIZED="videoElementResized",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}}pe.default=d},3621:function(vt,pe,P){P.r(pe);var L=P(5734);class d extends L.default{}let o=new d;pe.default=o},7252:function(vt,pe,P){P.r(pe),pe.default=class{extend(L,d){if(!L)return;let o=!!d&&d.override,p=!!d&&d.publicOnly;for(const T in L)!L.hasOwnProperty(T)||this[T]&&!o||p&&L[T].indexOf("public_")===-1||(this[T]=L[T])}}},8854:function(vt,pe,P){P.r(pe),pe.default
vendor: 4,771 bytes, line 12
12={ACCESSIBILITY:"Accessibility",ADAPTATION_SET:"AdaptationSet",ADAPTATION_SETS:"adaptationSets",ADAPTATION_SET_SWITCHING_SCHEME_ID_URI:"urn:mpeg:dash:adaptation-set-switching:2016",ADD:"add",ASSET_IDENTIFIER:"AssetIdentifier",AUDIO_CHANNEL_CONFIGURATION:"AudioChannelConfiguration",AUDIO_SAMPLING_RATE:"audioSamplingRate",AVAILABILITY_END_TIME:"availabilityEndTime",AVAILABILITY_START_TIME:"availabilityStartTime",AVAILABILITY_TIME_COMPLETE:"availabilityTimeComplete",AVAILABILITY_TIME_OFFSET:"availabilityTimeOffset",BANDWITH:"bandwidth",BASE_URL:"BaseURL",BITSTREAM_SWITCHING:"BitstreamSwitching",BITSTREAM_SWITCHING_MINUS:"bitstreamSwitching",BYTE_RANGE:"byteRange",CAPTION:"caption",CENC_DEFAULT_KID:"cenc:default_KID",CLIENT_DATA_REPORTING:"ClientDataReporting",CLIENT_REQUIREMENT:"clientRequirement",CMCD_PARAMETERS:"CMCDParameters",CODECS:"codecs",CODEC_PRIVATE_DATA:"codecPrivateData",CODING_DEPENDENCY:"codingDependency",CONTENT_COMPONENT:"ContentComponent",CONTENT_PROTECTION:"ContentProtection",CONTENT_STEERING:"ContentSteering",CONTENT_STEERING_RESPONSE:{VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},CONTENT_TYPE:"contentType",DEFAULT_SERVICE_LOCATION:"defaultServiceLocation",DEPENDENCY_ID:"dependencyId",DURATION:"duration",DVB_PRIORITY:"dvb:priority",DVB_WEIGHT:"dvb:weight",DVB_URL:"dvb:url",DVB_MIMETYPE:"dvb:mimeType",DVB_FONTFAMILY:"dvb:fontFamily",DYNAMIC:"dynamic",END_NUMBER:"endNumber",ESSENTIAL_PROPERTY:"EssentialProperty",EVENT:"Event",EVENT_STREAM:"EventStream",FORCED_SUBTITLE:"forced-subtitle",FRAMERATE:"frameRate",FRAME_PACKING:"FramePacking",GROUP_LABEL:"GroupLabel",HEIGHT:"height",ID:"id",INBAND:"inband",INBAND_EVENT_STREAM:"InbandEventStream",INDEX:"index",INDEX_RANGE:"indexRange",INITIALIZATION:"Initialization",INITIALIZATION_MINUS:"initialization",K:"k",LA_URL:"Laurl",LA_URL_LOWER_CASE:"laurl",CERT_URL:"Certurl",LABEL:"Label",LANG:"lang",LOCATION:"Location",MAIN:"main",MAXIMUM_SAP_PERIOD:"maximumSAPPeriod",MAX_PLAYOUT_RATE:"maxPlayoutRate",MAX_SEGMENT_DURATION:"maxSegmentDuration",MAX_SUBSEGMENT_DURATION:"maxSubsegmentDuration",MEDIA:"media",MEDIA_PRESENTATION_DURATION:"mediaPresentationDuration",MEDIA_RANGE:"mediaRange",MEDIA_STREAM_STRUCTURE_ID:"mediaStreamStructureId",METRICS:"Metrics",METRICS_MINUS:"metrics",MIME_TYPE:"mimeType",MINIMUM_UPDATE_PERIOD:"minimumUpdatePeriod",MIN_BUFFER_TIME:"minBufferTime",MP4_PROTECTION_SCHEME:"urn:mpeg:dash:mp4protection:2011",MPD:"MPD",MPD_TYPE:"mpd",MPD_PATCH_TYPE:"mpdpatch",ORDER:"order",ORIGINAL_MPD_ID:"mpdId",ORIGINAL_PUBLISH_TIME:"originalPublishTime",PATCH_LOCATION:"PatchLocation",PERIOD:"Period",PRESELECTION:"Preselection",PRESELECTION_COMPONENTS:"preselectionComponents",PRESENTATION_TIME:"presentationTime",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",PRO:"pro",PRODUCER_REFERENCE_TIME:"ProducerReferenceTime",PRODUCER_REFERENCE_TIME_TYPE:{ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},PROFILES:"profiles",PSSH:"pssh",PUBLISH_TIME:"publishTime",QUALITY_RANKING:"qualityRanking",QUERY_BEFORE_START:"queryBeforeStart",QUERY_PART:"$querypart$",RANGE:"range",RATING:"Rating",REF:"ref",REF_ID:"refId",REMOVE:"remove",REPLACE:"replace",REPORTING:"Reporting",REPRESENTATION:"Representation",REPRESENTATION_INDEX:"RepresentationIndex",ROBUSTNESS:"robustness",ROLE:"Role",S:"S",SAR:"sar",SCAN_TYPE:"scanType",SEGMENT_ALIGNMENT:"segmentAlignment",SEGMENT_BASE:"SegmentBase",SEGMENT_LIST:"SegmentList",SEGMENT_PROFILES:"segmentProfiles",SEGMENT_SEQUENCE_PROPERTIES:"SegmentSequenceProperties",SEGMENT_TEMPLATE:"SegmentTemplate",SEGMENT_TIMELINE:"SegmentTimeline",SEGMENT_TYPE:"segment",SEGMENT_URL:"SegmentURL",SERVICE_DESCRIPTION:"ServiceDescription",SERVICE_DESCRIPTION_LATENCY:"Latency",SERVICE_DESCRIPTION_OPERATING_BANDWIDTH:"OperatingBandwidth",SERVICE_DESCRIPTION_OPERATING_QUALITY:"OperatingQuality",SERVICE_DESCRIPTION_PLAYBACK_RATE:"PlaybackRate",SERVICE_DESCRIPTION_SCOPE:"Scope",SERVICE_LOCATION:"serviceLocation",SERVICE_LOCATIONS:"serviceLocations",SOURCE_URL:"sourceURL",START:"start",START_NUMBER:"startNumber",START_WITH_SAP:"startWithSAP",STATIC:"static",STEERING_TYPE:"steering",SUBSET:"Subset",SUBTITLE:"subtitle",SUB_REPRESENTATION:"SubRepresentation",SUB_SEGMENT_ALIGNMENT:"subsegmentAlignment",SUGGESTED_PRESENTATION_DELAY:"suggestedPresentationDelay",SUPPLEMENTAL_PROPERTY:"SupplementalProperty",SUPPLEMENTAL_CODECS:"scte214:supplementalCodecs",TAG:"tag",TIMESCALE:"timescale",TIMESHIFT_BUFFER_DEPTH:"timeShiftBufferDepth",TTL:"ttl",TYPE:"type",UTC_TIMING:"UTCTiming",VALUE:"value",VIEWPOINT:"Viewpoint",WALL_CLOCK_TIME:"wallClockTime",WIDTH:"width"}},9302:function(
12vt,pe,P){P.r(pe);var L=P(8062),d=P(9415),o=P(9578),p=P(4770),T=P(5212),y=P(5915),w=P(6455),h=P(8854),m=P(1944),r=P(649),H=P(1036),G=P(893),ue=P(1465),ge=P(7153),Ne=P(138),fe=P(5274),Me=P(6517),Fe=P(7393),ot=P(4740),ke=P(7408),Q=P(2436),X=P(2655),Se=P(5876),Ae=P(6503),xe=P(5717),gt=P(7263),Ee=P(7356);function mt(){let He,Pe,Ke,Et;const Pt=this.context,xt=(0,Ae.default)(Pt).getInstance(),Lt=Number.isInteger||function(V){return typeof V=="number"&&isFinite(V)&&Math.floor(V)===V};function sn(V,he){if(!V)throw new Error("adaptation is not defined");if(!he)throw new Error("type is not defined");if(V.Representation&&V.Representation.length){const it=Te(V.Representation[0]);if(it&&it.some((yt=>T.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(yt.schemeIdUri)>=0)))return he===T.default.IMAGE}if(V.ContentComponent&&V.ContentComponent.length>0){if(V.ContentComponent.length>1)return he===T.default.MUXED;if(V.ContentComponent[0].contentType===he)return!0}const tt=he===T.default.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(he);if(V.Representation&&V.Representation.length){const it=V.Representation[0].codecs;if(tt.test(it))return!0}if(V.hasOwnProperty(h.default.MIME_TYPE))return tt.test(V.mimeType);if(V.Representation){let it;for(let yt=0;yt<V.Representation.length;yt++)if(it=V.Representation[yt],it.hasOwnProperty(h.default.MIME_TYPE))return tt.test(it.mimeType)}return!1}function nn(V){if(!V)throw new Error("adaptation is not defined");if(V.hasOwnProperty(h.default.SEGMENT_TEMPLATE)||V.hasOwnProperty(h.default.SEGMENT_TIMELINE)||V.hasOwnProperty(h.default.SEGMENT_LIST)||V.hasOwnProperty(h.default.SEGMENT_BASE))return!0;if(V.Representation&&V.Representation.length>0){const he=V.Representation[0];if(he.hasOwnProperty(h.default.SEGMENT_TEMPLATE)||he.hasOwnProperty(h.default.SEGMENT_TIMELINE)||he.hasOwnProperty(h.default.SEGMENT_LIST)||he.hasOwnProperty(h.default.SEGMENT_BASE))return!0}return!1}function Sn(V){return sn(V,T.default.TEXT)}function ve(V){return V&&V.Representation&&V.Representation.sort(((he,tt)=>he.bandwidth-tt.bandwidth)),V}function Ie(V,he){return V&&V.Period&&Lt(he)&&V.Period[he]?V.Period[he].AdaptationSet:[]}function pt(V){return V&&V.Period?V.Period:[]}function _t(V,he,tt){let it=null;if(V&&V.Representation&&V.Representation.length>0){const yt=Lt(he)&&he>=0&&he<V.Representation.length?V.Representation[he]:V.Representation[0];yt&&(it=yt.mimeType+';codecs="'+yt.codecs+'"',tt&&yt.width!==void 0&&(it+=';width="'+yt.width+'";height="'+yt.height+'"'))}return it&&(it=it.replace(/\sprofiles=[^;]*/g,"")),it}function Ye(V){const he=Y(V);return he&&he.length>0}function Y(V){let he=[];if(!V)return he;const tt=k(V);return he=he.concat(tt),V.hasOwnProperty(h.default.ADAPTATION_SET)&&V[h.default.ADAPTATION_SET].length>0&&V[h.default.ADAPTATION_SET].forEach((it=>{const yt=k(it);he=he.concat(yt)})),he}function k(V){return V&&V.hasOwnProperty(h.default.CONTENT_PROTECTION)&&V.ContentProtection.length!==0?V[h.default.CONTENT_PROTECTION].map((he=>{const tt=new y.default;return tt.init(he),tt})):[]}function De(V){let he=!1;return V&&V.hasOwnProperty("type")&&(he=V.type===h.default.DYNAMIC),he}function j(V){if(!V)return null;const he=V[h.default.FRAMERATE];if(!he)return null;if(typeof he=="string"&&he.includes("/")){const[tt,it]=he.split("/").map((yt=>parseInt(yt,10)));if(!isNaN(tt)&&!isNaN(it)&&it!==0)return tt/it}return parseInt(he)}function We(V,he){return he&&he.hasOwnProperty(V)&&he[V].length?he[V].map((tt=>{const it=new H.default;return it.init(tt),it})):[]}function st(V,he){if(!he)return[];let tt=(function(it,yt){if(!yt||!yt.length)return[];let Ze=yt[0][it]||[];return Ze.length===0?[]:yt.length===1?Ze:Ze.filter((ht=>yt.slice(1).every((fn=>fn.hasOwnProperty(it)&&fn[it].some((Nn=>Nn.schemeIdUri===ht.schemeIdUri&&Nn.value===ht.value))))))})(V,he[h.default.REPRESENTATION]);return he.hasOwnProperty(V)&&he[V].length&&he[V].forEach((it=>{tt.some((yt=>yt.schemeIdUri===it.schemeIdUri&&yt.value===it.value))||tt.push(it)})),tt.map((it=>{const yt=new H.default;return yt.init(it),yt}))}function Te(V){return We(h.default.ESSENTIAL_PROPERTY,V)}function Le(V){return We(h.default.SUPPLEMENTAL_PROPERTY,V)}function i(V){return V&&V.hasOwnProperty(h.default.SEGMENT_SEQUENCE_PROPERTIES)&&V[h.default.SEGMENT_SEQUENCE_PROPERTIES].length?V[h.default.SEGMENT_SEQUENCE_PROPERTIES].map((he=>{const tt=new Ee.default(he);return tt.init(he),tt})):[]}function l(V,he,tt,it,yt,Ze){const ht=new Se.default;(function(Vt,En,un,nr,wn){if(Vt.index=wn,Vt.adaptation=un,Vt.mediaInfo=nr,En.hasOwnProperty(h.default.ID)&&(Vt.id=En.id),En.hasOwnProperty(h.default.CODECS)&&(Vt.codecs=En.codecs,Vt.codecFamily=gt.default.getCodecFamily(Vt.codecs)),En.hasOwnProperty(h.default.DEPENDENCY_ID)){const Bt=En[h.default.DEPENDENCY_ID].toString().split(" ")[0];Vt.dependencyId=Bt,Vt.dependentRepresentation=new Se.default,Vt.dependentRepresentation.id=Bt}En.hasOwnProperty(h.default.MIME_TYPE)&&(Vt.mimeType=En[h.default.MIME_TYPE]),En.hasOwnProperty(h.default.CODEC_PRIVATE_DATA)&&(Vt.codecPrivateData=En.codecPr
12ivateData),En.hasOwnProperty(h.default.BANDWITH)&&(Vt.bandwidth=En.bandwidth,Vt.bitrateInKbit=En.bandwidth/1e3),En.hasOwnProperty(h.default.WIDTH)&&(Vt.width=En.width),En.hasOwnProperty(h.default.HEIGHT)&&(Vt.height=En.height),En.hasOwnProperty(h.default.SCAN_TYPE)&&(Vt.scanType=En.scanType),En.hasOwnProperty(h.default.FRAMERATE)&&(Vt.frameRate=j(En)),En.hasOwnProperty(h.default.QUALITY_RANKING)&&(Vt.qualityRanking=En[h.default.QUALITY_RANKING]),En.hasOwnProperty(h.default.MAX_PLAYOUT_RATE)&&(Vt.maxPlayoutRate=En.maxPlayoutRate),Vt.essentialProperties=Te(En),Vt.supplementalProperties=Le(En),Vt.segmentSequenceProperties=i(En),Vt.path=[un.period.index,un.index,wn]})(ht,he,tt,V,Ze);const{segmentInfo:fn,segmentInfoType:Nn}=(function(Vt){let En,un;return Vt.hasOwnProperty(h.default.SEGMENT_BASE)?(En=Vt.SegmentBase,un=h.default.SEGMENT_BASE):Vt.hasOwnProperty(h.default.SEGMENT_LIST)?(En=Vt.SegmentList,un=En.hasOwnProperty(h.default.SEGMENT_TIMELINE)?h.default.SEGMENT_TIMELINE:h.default.SEGMENT_LIST):Vt.hasOwnProperty(h.default.SEGMENT_TEMPLATE)?(En=Vt.SegmentTemplate,un=En.hasOwnProperty(h.default.SEGMENT_TIMELINE)?h.default.SEGMENT_TIMELINE:h.default.SEGMENT_TEMPLATE):un=h.default.BASE_URL,{segmentInfo:En,segmentInfoType:un}})(he);return ht.segmentInfoType=Nn,(function(Vt,En,un,nr,wn,Bt){if(Vt){if(Vt.hasOwnProperty(h.default.INITIALIZATION_MINUS)&&(un.initialization=Vt.initialization.split("$Bandwidth$").join(wn.bandwidth).split("$RepresentationID$").join(wn.id)),Vt.hasOwnProperty(h.default.INITIALIZATION)){const Ot=Vt.Initialization;Ot.hasOwnProperty(h.default.SOURCE_URL)&&(un.initialization=Ot.sourceURL),Ot.hasOwnProperty(h.default.RANGE)&&(un.range=Ot.range)}else Sn(nr)&&nn(nr)&&nr.mimeType&&nr.mimeType.indexOf("application/mp4")===-1&&(un.range=0);Vt.hasOwnProperty(h.default.TIMESCALE)&&(un.timescale=Vt.timescale),Vt.hasOwnProperty(h.default.DURATION)?un.segmentDuration=Vt.duration/un.timescale:En===h.default.SEGMENT_TIMELINE&&(un.segmentDuration=(function(Ot){if(!Ot||!Ot.S)return NaN;let St=Ot.S[0],de=Ot.S[1];return St.hasOwnProperty("d")?St.d:de.t-St.t})(Vt.SegmentTimeline)/un.timescale,un.k=(function(Ot){if(!Ot||!Ot.S)return 1;const St=Ot.S[0];return St.hasOwnProperty(h.default.K)?St.k:1})(Vt.SegmentTimeline)),Vt.hasOwnProperty(h.default.MEDIA)&&(un.media=Vt.media),Vt.hasOwnProperty(h.default.K)&&(un.k=Vt.k||1),Vt.hasOwnProperty(h.default.START_NUMBER)&&(un.startNumber=parseInt(Vt.startNumber)),Vt.hasOwnProperty(h.default.INDEX_RANGE)&&(un.indexRange=Vt.indexRange),Vt.hasOwnProperty(h.default.PRESENTATION_TIME_OFFSET)&&(un.presentationTimeOffset=Vt.presentationTimeOffset/un.timescale),Vt.hasOwnProperty(h.default.AVAILABILITY_TIME_OFFSET)?un.availabilityTimeOffset=Vt.availabilityTimeOffset:Bt&&Bt.availabilityTimeOffset!==void 0&&(un.availabilityTimeOffset=Bt.availabilityTimeOffset),Vt.hasOwnProperty(h.default.AVAILABILITY_TIME_COMPLETE)?un.availabilityTimeComplete=Vt.availabilityTimeComplete!=="false":Bt&&Bt.availabilityTimeComplete!==void 0&&(un.availabilityTimeComplete=Bt.availabilityTimeComplete),Vt.hasOwnProperty(h.default.END_NUMBER)&&(un.endNumber=Vt[h.default.END_NUMBER]),un.mseTimeOffset=(function(Ot){const St=Ot.presentationTimeOffset;return Ot.adaptation.period.start-St})(un)}})(fn,Nn,ht,it,he,yt),(function(Vt){isNaN(Vt.width)||isNaN(Vt.height)||isNaN(Vt.frameRate)||(Vt.pixelsPerSecond=Math.max(1,Vt.width*Vt.height*Vt.frameRate),isNaN(Vt.bandwidth)||(Vt.bitsPerPixel=Vt.bandwidth/Vt.pixelsPerSecond))})(ht),ht}function C(V){return sn(V,T.default.MUXED)?T.default.MUXED:sn(V,T.default.AUDIO)?T.default.AUDIO:(function(he){return sn(he,T.default.VIDEO)})(V)?T.default.VIDEO:Sn(V)?T.default.TEXT:(function(he){return sn(he,T.default.IMAGE)})(V)?T.default.IMAGE:(Pe.warn("Unknown Preselection stream type"),null)}function ne(V,he){if(V&&V.hasOwnProperty(h.default.PRESELECTION_COMPONENTS)&&Array.isArray(he))return String(V.preselectionComponents).split(" ").map((tt=>he.find((it=>it.id===tt))))}function se(V,he){if(!V||!V.hasOwnProperty(h.default.PRESELECTION_COMPONENTS)||!Array.isArray(he))return;const tt=String(V.preselectionComponents).split(" ");return he.find((it=>it.id===tt[0]))}function Oe(V,he){if(!V)throw new Error("Period cannot be null or undefined");let tt=ke.default.DEFAULT_ID+"_"+he;return V.hasOwnProperty(h.default.ID)&&V.id.toString().length>0&&V.id!=="__proto__"&&(tt=V.id.toString()),tt}function rt(V,he,tt){const it=[];let yt;if(!V)return it;for(yt=0;yt<V.length;yt++){const Ze=new ge.default;if(Ze.timescale=1,Ze.representation=he,!V[yt].hasOwnProperty(T.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");Ze.schemeIdUri=V[yt].schemeIdUri,V[yt].hasOwnProperty(h.default.TIMESCALE)&&(Ze.timescale=V[yt].timescale),V[yt].hasOwnProperty(h.default.VALUE)&&(Ze.value=V[yt].value),it.push(Ze),Ze.period=tt}return it}function ae(V){const he=[],tt=V.BaseURL||[V.baseUri];let it=!1;return tt.some((yt=>{if(yt){const Ze=new d.default;let ht=yt.__text||yt;return xt.isRelative(ht)&&(it=!0,V.baseUri&&(ht=xt.resolve(ht,V.baseUri)
12)),Ze.url=ht,yt.hasOwnProperty(h.default.SERVICE_LOCATION)&&yt.serviceLocation.length?Ze.serviceLocation=yt.serviceLocation:Ze.serviceLocation=ht,yt.hasOwnProperty(h.default.DVB_PRIORITY)&&(Ze.dvbPriority=yt[h.default.DVB_PRIORITY]),yt.hasOwnProperty(h.default.DVB_WEIGHT)&&(Ze.dvbWeight=yt[h.default.DVB_WEIGHT]),yt.hasOwnProperty(h.default.AVAILABILITY_TIME_OFFSET)&&(Ze.availabilityTimeOffset=yt[h.default.AVAILABILITY_TIME_OFFSET]),yt.hasOwnProperty(h.default.AVAILABILITY_TIME_COMPLETE)&&(Ze.availabilityTimeComplete=yt[h.default.AVAILABILITY_TIME_COMPLETE]!=="false"),he.push(Ze),it}})),he}function ze(V){const he=new w.default;return he.serverUrl=V.__text,V.hasOwnProperty(h.default.DEFAULT_SERVICE_LOCATION)&&(he.defaultServiceLocation=V[h.default.DEFAULT_SERVICE_LOCATION],he.defaultServiceLocationArray=he.defaultServiceLocation.split(" ")),V.hasOwnProperty(h.default.QUERY_BEFORE_START)&&(he.queryBeforeStart=V[h.default.QUERY_BEFORE_START].toLowerCase()==="true"),V.hasOwnProperty(h.default.CLIENT_REQUIREMENT)&&(he.clientRequirement=V[h.default.CLIENT_REQUIREMENT].toLowerCase()!=="false"),he}function qe(V){const he=new p.default,tt=V.schemeIdUri||V[h.default.CMCD_PARAMETERS]?.schemeIdUri,it=[T.default.CTA_5004_2023_SCHEME,T.default.CTA_5004_2025_SCHEME].includes(tt);return V.hasOwnProperty(h.default.CMCD_PARAMETERS)&&it&&(he.cmcdParameters=new o.default,he.cmcdParameters.init(V[h.default.CMCD_PARAMETERS])),V.hasOwnProperty(h.default.SERVICE_LOCATIONS)&&V[h.default.SERVICE_LOCATIONS]!==""&&(he.serviceLocations=V[h.default.SERVICE_LOCATIONS],he.serviceLocationsArray=he.serviceLocations.toString().split(" ")),V.hasOwnProperty(h.default.ADAPTATION_SETS)&&V[h.default.ADAPTATION_SETS]!==""&&(he.adaptationSets=V[h.default.ADAPTATION_SETS],he.adaptationSetsArray=he.adaptationSets.toString().split(" ")),he}return He={getAccessibilityForAdaptation:function(V){return V&&V.hasOwnProperty(h.default.ACCESSIBILITY)&&V[h.default.ACCESSIBILITY].length?V[h.default.ACCESSIBILITY].map((he=>{const tt=new H.default;return tt.init(he),tt})):[]},getAdaptationForId:function(V,he,tt){const it=Ie(he,tt);let yt,Ze;for(yt=0,Ze=it.length;yt<Ze;yt++)if(it[yt].hasOwnProperty(h.default.ID)&&it[yt].id===V)return it[yt];return null},getAdaptationForIndex:function(V,he,tt){const it=Ie(he,tt);return it.length>0&&Lt(V)?it[V]:null},getAdaptationsForPeriod:function(V){const he=V&&Lt(V.index)?V.mpd.manifest.Period[V.index]:null,tt=[];let it,yt,Ze;if(he&&he.AdaptationSet)for(Ze=0;Ze<he.AdaptationSet.length;Ze++)yt=he.AdaptationSet[Ze],it=new L.default,yt.hasOwnProperty(h.default.ID)&&(it.id=yt.id),it.index=Ze,it.period=V,it.type=C(yt),tt.push(it);return tt},getAdaptationsForType:function(V,he,tt){const it=Ie(V,he);let yt,Ze;const ht=[];for(yt=0,Ze=it.length;yt<Ze;yt++)sn(it[yt],tt)&&ht.push(ve(it[yt]));return ht},getAudioChannelConfigurationForAdaptation:function(V){return V&&V.hasOwnProperty(h.default.AUDIO_CHANNEL_CONFIGURATION)&&V[h.default.AUDIO_CHANNEL_CONFIGURATION].length?V[h.default.AUDIO_CHANNEL_CONFIGURATION].map((he=>{const tt=new H.default;return tt.init(he),tt})):[]},getAudioChannelConfigurationForRepresentation:function(V){return V&&V.hasOwnProperty(h.default.AUDIO_CHANNEL_CONFIGURATION)&&V[h.default.AUDIO_CHANNEL_CONFIGURATION].length?V[h.default.AUDIO_CHANNEL_CONFIGURATION].map((he=>{const tt=new H.default;return tt.init(he),tt})):[]},getAvailabilityStartTime:function(V){return V&&V.hasOwnProperty(h.default.AVAILABILITY_START_TIME)&&V.availabilityStartTime!==null?V.availabilityStartTime.getTime():null},getBandwidth:function(V){return V&&V.bandwidth?V.bandwidth:NaN},getBaseURLsFromElement:ae,getBitrateListForAdaptation:function(V){const he=ve(V);return(he&&he.Representation?he.Representation:[]).map((tt=>({bandwidth:tt.bandwidth,width:tt.width||0,height:tt.height||0,scanType:tt.scanType||null,id:tt.id||null})))},getCodec:_t,getCodecForPreselection:function(V,he,tt){let it=null;if(V&&he){let yt=_t(se(V,he),0,tt);if(V.hasOwnProperty(h.default.CODECS)){let Ze=V.codecs;it=yt.replace(/(codecs=")[^"]*(")/,`$1${Ze}$2`),Pe.info("Preselection has own codecs-attribute: replacing in MainAdaptationSet (was: "+yt+"), new Preselection codec is: "+it)}else it=yt}return it},getCombinedEssentialPropertiesForAdaptationSet:function(V){return st(h.default.ESSENTIAL_PROPERTY,V)},getCombinedSupplementalPropertiesForAdaptationSet:function(V){return st(h.default.SUPPLEMENTAL_PROPERTY,V)},getContentProtectionByAdaptation:function(V){return k(V)},getContentProtectionByManifest:function(V){let he=[];if(!V)return he;const tt=k(V);return he=he.concat(tt),V.hasOwnProperty(h.default.PERIOD)&&V[h.default.PERIOD].length>
120&&V[h.default.PERIOD].forEach((it=>{const yt=Y(it);he=he.concat(yt)})),he},getContentProtectionByPeriod:Y,getContentSteering:function(V){if(V&&V.hasOwnProperty(h.default.CONTENT_STEERING))return ze(V[h.default.CONTENT_STEERING][0])},getDuration:function(V){let he;return he=V&&V.hasOwnProperty(h.default.MEDIA_PRESENTATION_DURATION)?V.mediaPresentationDuration:V&&V.type==="dynamic"?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,he},getEssentialProperties:Te,getEventStreamForAdaptationSet:function(V,he,tt){let it,yt,Ze;return V&&V.Period&&he&&he.period&&Lt(he.period.index)&&(yt=V.Period[he.period.index],yt&&yt.AdaptationSet&&Lt(he.index)&&(Ze=yt.AdaptationSet[he.index],Ze&&(it=Ze.InbandEventStream))),rt(it,null,tt)},getEventStreamForRepresentation:function(V,he,tt){let it,yt,Ze,ht;return V&&V.Period&&he&&he.adaptation&&he.adaptation.period&&Lt(he.adaptation.period.index)&&(yt=V.Period[he.adaptation.period.index],yt&&yt.AdaptationSet&&Lt(he.adaptation.index)&&(Ze=yt.AdaptationSet[he.adaptation.index],Ze&&Ze.Representation&&Lt(he.index)&&(ht=Ze.Representation[he.index],ht&&(it=ht.InbandEventStream)))),rt(it,he,tt)},getEventsForPeriod:function(V){const he=V&&V.mpd&&V.mpd.manifest?V.mpd.manifest:null,tt=he?he.Period:null,it=tt&&V&&Lt(V.index)?tt[V.index].EventStream:null,yt=[];let Ze,ht;if(it)for(Ze=0;Ze<it.length;Ze++){const fn=new ge.default;if(fn.period=V,fn.timescale=1,!it[Ze].hasOwnProperty(T.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(fn.schemeIdUri=it[Ze][T.default.SCHEME_ID_URI],it[Ze].hasOwnProperty(h.default.TIMESCALE)&&(fn.timescale=it[Ze][h.default.TIMESCALE]),it[Ze].hasOwnProperty(h.default.VALUE)&&(fn.value=it[Ze][h.default.VALUE]),it[Ze].hasOwnProperty(h.default.PRESENTATION_TIME_OFFSET)&&(fn.presentationTimeOffset=it[Ze][h.default.PRESENTATION_TIME_OFFSET]),ht=0;it[Ze].Event&&ht<it[Ze].Event.length;ht++){const Nn=it[Ze].Event[ht],Vt=new ue.default;Vt.presentationTime=0,Vt.eventStream=fn,Nn.hasOwnProperty(h.default.PRESENTATION_TIME)&&(Vt.presentationTime=Nn.presentationTime);const En=fn.presentationTimeOffset?fn.presentationTimeOffset/fn.timescale:0;Vt.calculatedPresentationTime=Vt.presentationTime/fn.timescale+V.start-En,Nn.hasOwnProperty(h.default.DURATION)&&(Vt.duration=Nn.duration/fn.timescale),Nn.hasOwnProperty(h.default.ID)?Vt.id=parseInt(Nn.id):Vt.id=null,Nn.Signal&&Nn.Signal.Binary&&Nn.Signal.Binary.__text?Vt.messageData=Et.decodeArray(Nn.Signal.Binary.__text.toString()):Vt.messageData=Nn.messageData||Nn.__cdata||Nn.__text,yt.push(Vt)}}return yt},getFramerate:j,getId:function(V){return V&&V[h.default.ID]||null},getIndexForAdaptation:function(V,he,tt){if(!V)return-1;const it=Ie(he,tt);for(let yt=0;yt<it.length;yt++)if((0,Fe.default)(Pt).getInstance().areEqual(it[yt],V))return yt;return-1},getIsDynamic:De,getIsFragmented:nn,getIsText:Sn,getIsTypeOf:sn,getLabelsForAdaptation:function(V){if(!V||!V.Label)return[];const he=[];for(let tt=0;tt<V.Label.length;tt++)he.push({lang:V.Label[tt].lang,text:V.Label[tt].__text||V.Label[tt]});return he},getLanguageForAdaptation:function(V){let he="";return V&&V.hasOwnProperty(h.default.LANG)&&(he=V.lang),he},getLocation:function(V){return V&&V.hasOwnProperty(h.default.LOCATION)?V[h.default.LOCATION].map((he=>{const tt=he.__text||he,it=he.hasOwnProperty(h.default.SERVICE_LOCATION)?he[h.default.SERVICE_LOCATION]:null;return new Me.default(tt,it)})):[]},getMainAdaptationSetForPreselection:se,getCommonRepresentationForPreselection:function(V,he){if(!V||!Array.isArray(he))return;const tt=se(V,he);return tt?tt.Representation[0]:void 0},getManifestUpdatePeriod:function(V,he=0){let tt=NaN;return V&&V.hasOwnProperty(h.default.MINIMUM_UPDATE_PERIOD)&&(tt=V.minimumUpdatePeriod),isNaN(tt)?tt:Math.max(tt-he,1)},getMimeType:function(V){return V&&V.Representation&&V.Representation.length>0?V.Representation[0].mimeType:null},getMpd:function(V){const he=new fe.default;return V&&(he.manifest=V,V.hasOwnProperty(h.default.AVAILABILITY_START_TIME)?he.availabilityStartTime=new Date(V.availabilityStartTime.getTime()):V.loadedT
12ime&&(he.availabilityStartTime=new Date(V.loadedTime.getTime())),V.hasOwnProperty(h.default.AVAILABILITY_END_TIME)&&(he.availabilityEndTime=new Date(V.availabilityEndTime.getTime())),V.hasOwnProperty(h.default.MINIMUM_UPDATE_PERIOD)&&(he.minimumUpdatePeriod=V.minimumUpdatePeriod),V.hasOwnProperty(h.default.MEDIA_PRESENTATION_DURATION)&&(he.mediaPresentationDuration=V.mediaPresentationDuration),V.hasOwnProperty(h.default.SUGGESTED_PRESENTATION_DELAY)&&(he.suggestedPresentationDelay=V.suggestedPresentationDelay),V.hasOwnProperty(h.default.TIMESHIFT_BUFFER_DEPTH)&&(he.timeShiftBufferDepth=V.timeShiftBufferDepth),V.hasOwnProperty(h.default.MAX_SEGMENT_DURATION)&&(he.maxSegmentDuration=V.maxSegmentDuration),V.hasOwnProperty(h.default.PUBLISH_TIME)&&(he.publishTime=new Date(V.publishTime))),he},getPatchLocation:function(V){return V&&V.hasOwnProperty(h.default.PATCH_LOCATION)?V[h.default.PATCH_LOCATION].map((he=>{const tt=he.__text||he,it=he.hasOwnProperty(h.default.SERVICE_LOCATION)?he[h.default.SERVICE_LOCATION]:null;let yt=he.hasOwnProperty(h.default.TTL)?1e3*parseFloat(he[h.default.TTL]):NaN;return new ot.default(tt,it,yt)})):[]},getPreselectionIsTypeOf:function(V,he,tt){if(!V)throw new Error("preselection is not defined");
12if(!he)throw new Error("adaptations is not defined");if(!tt)throw new Error("type is not defined");const it=se(V,he);return!!it&&sn(it,tt)},getPreselectionsForPeriod:function(V){const he=V&&Lt(V.index)?V.mpd.manifest.Period[V.index]:null,tt=[];let it,yt,Ze;if(he&&he.Preselection)for(Ze=0;Ze<he.Preselection.length;Ze++){yt=he.Preselection[Ze],it=new Q.default;const ht=ne(yt,he.AdaptationSet);ht.every((fn=>!!fn))&&ht.length===1?(yt.hasOwnProperty(h.default.ID)&&(it.id=yt.id),it.index=Ze,it.period=V,yt.hasOwnProperty(h.default.TAG)&&(it.tag=yt.tag),yt.hasOwnProperty(h.default.PRESELECTION_COMPONENTS)?it.preselectionComponents=ht:Pe.warn("Preselection (index: "+it.index+") missing component(s)"),yt.hasOwnProperty(h.default.ORDER)&&(it.order=yt.order),it.type=C(ht[0]),tt.push(it)):Pe.warn("Preselection removed because we don't support multi-representation preselections or not all components available.")}return tt},getProducerReferenceTimesForAdaptation:function(V){const he=V&&V.hasOwnProperty(h.default.PRODUCER_REFERENCE_TIME)?V[h.default.PRODUCER_REFERENCE_TIME]:[];(V&&V.hasOwnProperty(h.default.REPRESENTATION)?V[h.default.REPRESENTATION]:[]).forEach((it=>{it.hasOwnProperty(h.default.PRODUCER_REFERENCE_TIME)&&he.push(...it[h.default.PRODUCER_REFERENCE_TIME])}));const tt=[];return he.forEach((it=>{const yt=new X.default;it.hasOwnProperty(h.default.ID)&&(yt[h.default.ID]=parseInt(it[h.default.ID]),it.hasOwnProperty(h.default.WALL_CLOCK_TIME)&&(yt[h.default.WALL_CLOCK_TIME]=it[h.default.WALL_CLOCK_TIME],it.hasOwnProperty(h.default.PRESENTATION_TIME)&&(yt[h.default.PRESENTATION_TIME]=it[h.default.PRESENTATION_TIME],it.hasOwnProperty(h.default.INBAND)&&(yt[h.default.INBAND]=it[h.default.INBAND]!=="false"),it.hasOwnProperty(h.default.TYPE)&&(yt[h.default.TYPE]=it[h.default.TYPE]),tt.push(yt))))})),tt},getPublishTime:function(V){return V&&V.hasOwnProperty(h.default.PUBLISH_TIME)?new Date(V[h.default.PUBLISH_TIME]):null},getRealPeriodForIndex:function(V,he){const tt=pt(he);return tt.length>0&&Lt(V)?tt[V]:null},getRealPeriods:pt,getRegularPeriods:function(V){const he=!!V&&De(V.manifest),tt=[];let it,yt,Ze=null,ht=null,fn=null,Nn=null;for(yt=0,it=V&&V.manifest&&V.manifest.Period?V.manifest.Period.length:0;yt<it;yt++)ht=V.manifest.Period[yt],ht.hasOwnProperty(h.default.START)?(Nn=new ke.default,Nn.start=ht.start):Ze!==null&&Ze.hasOwnProperty(h.default.DURATION)&&fn!==null?(Nn=new ke.default,Nn.start=parseFloat((fn.start+fn.duration).toFixed(5))):yt!==0||he||(Nn=new ke.default,Nn.start=0),fn!==null&&isNaN(fn.duration)&&(Nn!==null?fn.duration=parseFloat((Nn.start-fn.start).toFixed(5)):Pe.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),Nn!==null&&(Nn.id=Oe(ht,yt),Nn.index=yt,Nn.mpd=V,Nn.isEncrypted=Ye(ht),ht.hasOwnProperty(h.default.DURATION)&&(Nn.duration=ht.duration),fn&&(fn.nextPeriodId=Nn.id),tt.push(Nn),Ze=ht,fn=Nn),ht=null,Nn=null;return tt.length===0||fn!==null&&isNaN(fn.duration)&&(fn.duration=parseFloat(((function(Vt){(function(){if(!Ke||!Ke.hasOwnProperty("error"))throw new Error(T.default.MISSING_CONFIG_ERROR)})();const En=De(Vt.mpd.manifest);let un;return Vt.mpd.manifest.mediaPresentationDuration?un=Vt.mpd.manifest.mediaPresentationDuration:Vt.duration?un=Vt.duration:En?un=Number.POSITIVE_INFINITY:Ke.error(new m.default(G.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",Vt)),un})(fn)-fn.start).toFixed(5))),tt},getRepresentationCount:function(V){return V&&V.Representation?V.Representation.length:0},getRepresentationFor:function(V,he){return he&&he.Representation&&he.Representation.length>0&&Lt(V)?he.Representation[V]:null},getRepresentationSortFunction:function(){return(V,he)=>V.bandwidth-he.bandwidth},getRepresentationsForAdaptation:function(V,he){const tt=[],it=(function(Ze){if(Ze&&Ze.period&&Lt(Ze.period.index)){const ht=Ze.period.mpd.manifest.Period[Ze.period.index];if(ht&&ht.AdaptationSet&&Lt(Ze.index))return ve(ht.AdaptationSet[Ze.index])}})(V);let yt;if(it&&it.Representation){if(V&&V.period&&Lt(V.period.index)){const Ze=ae(V.period.mpd.manifest);Ze&&(yt=Ze[0])}for(let Ze=0,ht=it.Representation.length;Ze<ht;++Ze){const fn=l(he,it.Representation[Ze],V,it,yt,Ze);tt.push(fn)}}return tt},getRolesForAdaptation:function(V){return V&&V.hasOwnProperty(h.default.ROLE)&&V[h.default.ROLE].length?V[h.default.ROLE].map((he=>{he.schemeIdUri===T.default.DASH_ROLE_SCHEME_ID&&he.value==="Main"&&(he.value=h.default.MAIN);const tt=new H.default;return tt.init(he),tt})):[]},getSegmentAlignment:function(V){return!(!V||!V.hasOwnProperty(h.default.SEGMENT_ALIGNMENT))&&V[h.default.SEGMENT_ALIGNMENT]==="true"},getSegmentSequencePropertiesForAdaptationSet:function(V){const he=[];
12return V&&(he.push(...i(V)),V.Representation&&V.Representation.length&&V.Representation.forEach((tt=>{he.push(...i(tt))}))),he},getSelectionPriority:function(V){try{const he=V&&V.selectionPriority!==void 0?parseInt(V.selectionPriority):1;return isNaN(he)?1:he}catch{return 1}},getServiceDescriptions:function(V){const he=[];if(V&&V.hasOwnProperty(h.default.SERVICE_DESCRIPTION))for(const tt of V.ServiceDescription){let it=null,yt=null,Ze=null,ht=null,fn=null,Nn=null,Vt=null,En=null;for(const un in tt)if(tt.hasOwnProperty(un))if(un===h.default.ID)it=tt[un];else if(un===h.default.SERVICE_DESCRIPTION_SCOPE)yt=tt[un].schemeIdUri;else if(un===h.default.SERVICE_DESCRIPTION_LATENCY)Ze={target:parseInt(tt[un].target),max:parseInt(tt[un].max),min:parseInt(tt[un].min),referenceId:parseInt(tt[un].referenceId)};else if(un===h.default.SERVICE_DESCRIPTION_PLAYBACK_RATE)ht={max:parseFloat(tt[un].max),min:parseFloat(tt[un].min)};else if(un===h.default.SERVICE_DESCRIPTION_OPERATING_QUALITY)fn={mediaType:tt[un].mediaType,max:parseInt(tt[un].max),min:parseInt(tt[un].min),target:parseInt(tt[un].target),type:tt[un].type,maxQualityDifference:parseInt(tt[un].maxQualityDifference)};else if(un===h.default.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH)Nn={mediaType:tt[un].mediaType,max:parseInt(tt[un].max),min:parseInt(tt[un].min),target:parseInt(tt[un].target)};else if(un===h.default.CONTENT_STEERING){let nr=tt[un];nr=Array.isArray(nr)?nr.at(nr.length-1):nr,Vt=ze(nr)}else un===h.default.CLIENT_DATA_REPORTING&&(En=qe(tt[un]));he.push({id:it,schemeIdUri:yt,latency:Ze,playbackRate:ht,operatingQuality:fn,operatingBandwidth:Nn,contentSteering:Vt,clientDataReporting:En})}return he},getSubSegmentAlignment:function(V){return!(!V||!V.hasOwnProperty(h.default.SUB_SEGMENT_ALIGNMENT))&&V[h.default.SUB_SEGMENT_ALIGNMENT]==="true"},getSuggestedPresentationDelay:function(V){return V&&V.hasOwnProperty(h.default.SUGGESTED_PRESENTATION_DELAY)?V.suggestedPresentationDelay:null},getSupplementalProperties:Le,getUTCTimingSources:function(V){const he=De(V),tt=!!V&&V.hasOwnProperty(h.default.AVAILABILITY_START_TIME),it=V?V.UTCTiming:null,yt=[];return(he||tt)&&it&&it.forEach((function(Ze){const ht=new xe.default;Ze.hasOwnProperty(T.default.SCHEME_ID_URI)&&(ht.schemeIdUri=Ze.schemeIdUri,Ze.hasOwnProperty(h.default.VALUE)&&(ht.value=Ze.value.toString(),yt.push(ht)))})),yt},getViewpointForAdaptation:function(V){return V&&V.hasOwnProperty(h.default.VIEWPOINT)&&V[h.default.VIEWPOINT].length?V[h.default.VIEWPOINT].map((he=>{const tt=new H.default;return tt.init(he),tt})):[]},hasProfile:function(V,he){let tt=!1;return V&&V.profiles&&V.profiles.length>0&&(tt=V.profiles.indexOf(he)!==-1),tt},isPeriodEncrypted:Ye,setConfig:function(V){V&&(V.errHandler&&(Ke=V.errHandler),V.BASE64&&(Et=V.BASE64))}},Pe=(0,r.default)(Pt).getInstance().getLogger(He),He}mt.__dashjs_factory_name="DashManifestModel",pe.default=Ne.default.getSingletonFactory(mt)},8062:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.period=null,this.index=-1,this.id=null,this.type=null}}},9415:function(vt,pe,P){P.r(pe);class L{constructor(o,p,T,y){this.url=o||"",this.serviceLocation=p||o||"",this.dvbPriority=T||1,this.dvbWeight=y||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}}}L.DEFAULT_DVB_PRIORITY=1,L.DEFAULT_DVB_WEIGHT=1,pe.default=L},9578:function(vt,pe,P){P.r(pe);var L=P(1036),d=P(5212);class o extends L.default{constructor(){super(),this.version=null,this.sessionID=null,this.contentID=null,this.mode=null,this.keys=null,this.includeInRequests=null}init(T){super.init(T),T&&(this.version=T.version?parseInt(T.version):null,this.sessionID=T.sessionID,this.contentID=T.contentID,this.mode=T.mode??"query",this.keys=T.keys?T.keys.split(" "):null,this.includeInRequests=T.includeInRequests?T.includeInRequests.split(" "):[d.default.CMCD_DEFAULT_INCLUDE_IN_REQUESTS],this.schemeIdUri=T.schemeIdUri)}}pe.default=o},4770:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.adaptationSets=null,this.adaptationSetsArray=[],this.cmcdParameters=null,this.serviceLocations=null,this.serviceLocationsArray=[]}}},5915:function(vt,pe,P){P.r(pe);var L=P(1349),d=P(1036),o=P(8854);class p extends d.default{constructor(){super(),this.ref=null,this.refId=null,this.robustness=null,this.keyId=null,this.cencDefaultKid=null,this.pss
12h=null,this.pro=null,this.laUrl=null,this.certUrls=[]}init(y){if(super.init(y),y){this.ref=y.hasOwnProperty(o.default.REF)?y[o.default.REF]:null,this.refId=y.hasOwnProperty(o.default.REF_ID)?y[o.default.REF_ID]:null,this.robustness=y.hasOwnProperty(o.default.ROBUSTNESS)?y[o.default.ROBUSTNESS]:null,this.cencDefaultKid=y.hasOwnProperty(o.default.CENC_DEFAULT_KID)?y[o.default.CENC_DEFAULT_KID]:null,this.pssh=y.hasOwnProperty(o.default.PSSH)?y[o.default.PSSH]:null,this.pro=y.hasOwnProperty(o.default.PRO)?y[o.default.PRO]:null,this.laUrl=y.hasOwnProperty(o.default.LA_URL)?y[o.default.LA_URL]:y.hasOwnProperty(o.default.LA_URL_LOWER_CASE)?y[o.default.LA_URL_LOWER_CASE]:null;const w=Object.keys(y).find((m=>m.toLowerCase()===o.default.CERT_URL.toLowerCase())),h=w?y[w]:null;this.certUrls=L.default.normalizeCertUrls(h)}}mergeAttributesFromReference(y){if(["schemeIdUri","value","id","robustness","cencDefaultKid","pro","pssh","laUrl"].forEach((w=>{this[w]===null&&(this[w]=y[w])})),y.certUrls&&y.certUrls.length){const w=new Set(this.certUrls.map((h=>`${h.url}||${h.certType||""}`)));
12y.certUrls.forEach((h=>{const m=`${h.url}||${h.certType||""}`;w.has(m)||this.certUrls.push({url:h.url,certType:h.certType||null})}))}}}pe.default=p},6455:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0}}},1036:function(vt,pe,P){P.r(pe);var L=P(8854);pe.default=class{constructor(){this.schemeIdUri=null,this.value=null,this.id=null}init(d){d&&(this.schemeIdUri=d.schemeIdUri?d.schemeIdUri:null,this.value=d.value!==null&&d.value!==void 0?d.value.toString():null,this.id=d.id?d.id:null,d[L.default.DVB_URL]&&(this.dvbUrl=d[L.default.DVB_URL]),d[L.default.DVB_MIMETYPE]&&(this.dvbMimeType=d[L.default.DVB_MIMETYPE]),d[L.default.DVB_FONTFAMILY]&&(this.dvbFontFamily=d[L.default.DVB_FONTFAMILY]))}inArray(d){return!!d&&d.some((o=>this.schemeIdUri===o.schemeIdUri&&(this.value?this.value.toString().match(o.value):"".match(o.value))))}}},1465:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN,this.parsedMessageData=null}}},7153:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}}},5274:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.availabilityEndTime=Number.POSITIVE_INFINITY,this.availabilityStartTime=null,this.manifest=null,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.mediaPresentationDuration=NaN,this.minimumUpdatePeriod=NaN,this.publishTime=null,this.suggestedPresentationDelay=0,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY}}},6517:function(vt,pe,P){P.r(pe),pe.default=class{constructor(L,d){this.url=L||"",this.serviceLocation=d||null,this.queryParams={}}}},4740:function(vt,pe,P){P.r(pe),pe.default=class{constructor(L,d,o){this.url=L||"",this.serviceLocation=d||null,this.ttl=o||NaN,this.queryParams={}}}},7408:function(vt,pe,P){P.r(pe);class L{constructor(){this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null,this.isEncrypted=!1}}L.DEFAULT_ID="defaultId",pe.default=L},2436:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.period=null,this.index=-1,this.id=1,this.type=null,this.tag=null,this.order="undefined",this.preselectionComponents=[]}}},2655:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null}}},5876:function(vt,pe,P){P.r(pe);var L=P(8854);pe.default=class{constructor(){this.absoluteIndex=NaN,this.adaptation=null,this.availabilityTimeComplete=!0,this.availabilityTimeOffset=0,this.bandwidth=NaN,this.bitrateInKbit=NaN,this.bitsPerPixel=NaN,this.codecFamily=null,this.co
12decPrivateData=null,this.codecs=null,this.dependencyId=null,this.dependentRepresentation=null,this.endNumber=null,this.essentialProperties=[],this.fragmentDuration=null,this.frameRate=null,this.height=NaN,this.id=null,this.indexRange=null,this.initialization=null,this.k=1,this.maxPlayoutRate=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.mediaInfo=null,this.mimeType=null,this.mseTimeOffset=NaN,this.pixelsPerSecond=NaN,this.presentationTimeOffset=0,this.qualityRanking=NaN,this.range=null,this.scanType=null,this.segments=null,this.segmentDuration=NaN,this.segmentInfoType=null,this.segmentSequenceProperties=[],this.supplementalProperties=[],this.startNumber=1,this.timescale=1,this.width=NaN}hasInitialization(){return this.initialization!==null||this.range!==null}hasSegments(){return this.segmentInfoType!==L.default.BASE_URL&&this.segmentInfoType!==L.default.SEGMENT_BASE&&!this.indexRange}isBootstrapRepresentation(){return!(!this.segmentSequenceProperties||this.segmentSequenceProperties.length===0)&&this.segmentSequenceProperties.some((d=>d.isBootstrapConfiguration()))}}},7356:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.cadence=1,this.sapType=0,this.event=!0,this.alignment=null}init(L){L&&(this.cadence=L.cadence===void 0||isNaN(L.cadence)?1:L.cadence,this.sapType=L.sapType===void 0||isNaN(L.sapType)?0:L.sapType,this.event=L.event===void 0||L.event,this.alignment=L.alignment!==void 0?L.alignment:null)}isBootstrapConfiguration(){return this.cadence===1&&(this.sapType===0||this.sapType===1)}}},5717:function(vt,pe,P){P.r(pe),pe.default=class{constructor(){this.schemeIdUri="",this.value=""}}},9839:function(vt,pe,P){P.r(pe),P.d(pe,{default:function(){return Ul}});var L=P(138),d=P(4246),o={TCP_CONNECTION:"TcpList",HTTP_REQUEST:"HttpList",TRACK_SWITCH:"RepSwitchList",BUFFER_LEVEL:"BufferLevel",BUFFER_LOADED:"bufferLoaded",ABANDON_LOAD:"abandonload",ALLOW_LOAD:"allowload",BUFFER_EMPTY:"bufferStalled",BUFFER_STATE:"BufferState",DVR_INFO:"DVRInfo",DROPPED_FRAMES:"DroppedFrames",SCHEDULING_INFO:"SchedulingInfo",REQUESTS_QUEUE:"RequestsQueue",MANIFEST_UPDATE:"ManifestUpdate",MANIFEST_UPDATE_STREAM_INFO:"ManifestUpdatePeriodInfo",MANIFEST_UPDATE_TRACK_INFO:"ManifestUpdateRepresentationInfo",PLAY_LIST:"PlayList",DVB_ERRORS:"DVBErrors",HTTP_REQUEST_DVB_REPORTING_TYPE:"DVBReporting"},p=P(649),T=P(8261);function y(n){n=n||{};const e=this.context,t=n.dashMetrics;let u,c,_;return u={getSwitchRequest:function(v){try{const I=(0,d.default)(e).create();I.rule=this.getClassName();const g=v.getMediaInfo(),D=v.getMediaType(),N=t.getCurrentBufferState(D),E=v.getScheduleController(),f=v.getAbrController(),A=v.getStreamInfo(),U=A?A.id:null,F=A&&A.manifestInfo?A.manifestInfo.isDynamic:null,B=v.getThroughputController(),x=B.getSafeAverageThroughput(D),W=B.getAverageLatency(D);return isNaN(x)||!N||f.getAbandonmentStateFor(U,D)===o.ALLOW_LOAD&&(N.state===o.BUFFER_LOADED||F)&&(I.representation=f.getOptimalRepresentationForBitrate(g,x,!0),I.priority=c.get().streaming.abr.rules.throughputRule.priority,I.reason={throughput:x,latency:W,message:`[ThroughputRule]: Switching to Representation with bitrate ${I.representation?I.representation.bitrateInKbit:"n/a"} kbit/s. Throughput: ${x}`},E.setTimeToLoadDelay(0)),I}catch(I){return _.error(I),(0,d.default)(e).create()}},reset:function(){}},_=(0,p.default)(e).getInstance().getLogger(u),c=(0,T.default)(e).getInstance(),u}y.__dashjs_factory_name="ThroughputRule";var w=L.default.getClassFactory(y),h=P(8850),m=P(3621),r=P(5212),H=P(1191);function G(n){n=n||{};const e=this.context,t=(0,h.default)(e).getInstance(),u=n.dashMetrics,c=(0,T.default)(e).getInstance();let _,v,I;function g(){const E=c.get().streaming.abr.rules.insufficientBufferRule.parameters.segmentIgnoreCount;I={},I[r.default.VIDEO]={ignoreCount:E},I[r.default.AUDIO]={ignoreCount:E},I[r.default.ENHANCEMENT]={ignoreCount:E}}function D(){g()}function N(E){isNaN(E.startTime)||E.mediaType!==r.default.AUDIO&&E.mediaType!==r.default.VIDEO||I[E.mediaType].ignoreCount>0&&I[E.mediaType].ignoreCount--}return _={getSwitchRequest:function(E){const f=(0,d.default)(e).create();if(f.rule=this.getClassName(),!E||!E.hasOwnProperty("getMediaType"))return f;const A=E.getMediaType(),U=u.getCurrentBufferState(A),F=E.getRepresentation().fragmentDuration;if(!(function(W,K,z){return!W.getLowLatencyModeEnabled()&&I[K].ignoreCount<=0&&z})(E.getScheduleController().getPlaybackController(),A,F))return f;const B=E.getMediaInfo(),x=E.getAbrController();if(U&&U.state===o.BUFFER_EMPTY)v.debug("["+A+"] Switch to index 0; buffer is empty."),f.representation=x.getOptimalRepresentationForBitrate(B,0,!0),f.reason={message:"[InsufficientBufferRule]: Switching to lowest Representation because buffer is empty"};else{const W=E.getThroughputController(),K=u.getCurrentBufferLevel(A),z=W.getAverageThroughput(A,null,NaN)*c.get().streaming.abr.rules.insufficientBufferRule.parameters.throughputSafetyFactor*K/F;if(isNaN(z)||z<=0)return f;f.representation=x.getOptimalRepresentationForBitrate(B,z,!0),f.priority=c.get().streaming.abr.rules.insufficientBufferRule.priority,f.reason={message:"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun.",bitrate:z}}return f},reset:function(){g(),t.off(H.default.PLAYBACK_SEEKING,D,_),t.off(m.default.BYTES_APPENDED_END_FRAGMENT,N,_)}},v=(0,p.default)(e).getInstance().getLogger(_),g(),t.on(H.default.PLAYBACK_SEEKING,D,_),t.on(m.default.BYTES_APPENDED_END_FRAGMENT,N,_),_}G.__dashjs_factory_name="InsufficientBufferRule";var ue=L.default.getClassFactory(G);function ge(n){const e=(n=n||{}).mediaPlayerModel,t=n.dashMetrics,u=this.context,c=(0,T.default)(u).getInstance();let _,v,I;function g(){I={}}return _={shouldAbandon:function(D){const N=(0,d.default)(u).create();N.rule=this.getClassName();try{if(!D)return N;const E=D.getCurrentRequest();if(!isNaN(E.index)){if(E.firstByteDate===null||I.hasOwnProperty(E.index))return N;const f=e.getBufferTimeDefault(),A=D.getMediaType();if(t.getCurrentBufferLevel(A)>f)return N;const U=Date.now()-E.firstByteDate.getTime();if(E.traces.length>=c.get().streaming.abr.rules.abandonRequestsRule.parameters.minThroughputSamplesThreshold&&U>c.get().streaming.abr.rules.abandonRequestsRule.parameters.minSegmentDownloadTimeThresholdInMs&&E.bytesLoaded<E.bytesTotal)return(function(F,B,x){const W=F.getMediaInfo(),K=F.getMediaType(),z=B.traces.reduce(((J,O)=>J+O.b[0]),0)-B.traces[0].b[0],Z=Math.max(B.traces.reduce(((J,O)=>J+O.d),0)-B.traces[0].d,1),M=Math.round(8*z/Z),R=Number(8*B.bytesTotal/M/1e3).toFixed(2),S=F.getRepresentation(),b=F.getAbrController();if(R<B.duration*c.get().streaming.abr.rules.abandonRequestsRule.parameters.abandonDurationMultiplier||b.isPlayingAtLowestQuality(S))return x;if(!I.hasOwnProperty(B.index)){const J=F.getAbrController(),O=B.bytesTotal-B.bytesLoaded,ee=J.getOptimalRepresentationForBitrate(W,M,!0),$=B.representation;O>B.bytesTotal*ee.bitrateInKbit/$.bitrateInKbit&&(x.representation=ee,x.priority=c.get().streaming.abr.rules.abandonRequestsRule.priority,x.reason={throughputInKbit:M,message:`[AbandonRequestRule][${K} is asking to abandon and switch to quality to ${ee.absoluteIndex}. The measured bandwidth was ${M} kbit/s`},I[B.index]=!0)}return x})(D,E,N)}return N}catch(E){return v.error(E),N}},reset:g},v=(0,p.default)(u).getInstance().getLogger(_),g(),_}ge.__dashjs_factory_name="AbandonRequestsRule";var Ne=L.default.getClassFactory(ge);function fe(){const n=this.context,e=(0,T.default)(n).getInstance();let t;return t={getSwitchRequest:function(u){const c=(0,d.default)(n).create();if(c.rule=this.getClassName(),!u||!u.hasOwnProperty("getDroppedFramesHistory"))return c;const _=u.getDroppedFramesHistory();if(!_)return c;const v=u.getStreamInfo().id,I=u.getMediaInfo(),g=u.getAbrController(),D=_.getFrameHistory(v);if(!D||Object.keys(D).length===0)return c;let N=0,E=0;
12const f=g.getPossibleVoRepresentationsFilteredBySettings(I,!0);let A=null;for(let U=1;U<f.length;U++){const F=f[U];if(F&&D[F.id]&&(N=D[F.id].droppedVideoFrames,E=D[F.id].totalVideoFrames,E>e.get().streaming.abr.rules.droppedFramesRule.parameters.minimumSampleSize&&N/E>e.get().streaming.abr.rules.droppedFramesRule.parameters.droppedFramesPercentageThreshold)){A=f[U-1];break}}return A&&(c.representation=A,c.priority=e.get().streaming.abr.rules.droppedFramesRule.priority,c.reason={droppedFrames:N,message:`[DroppedFramesRule]: Switching to index ${A.absoluteIndex}. Dropped Frames: ${N}, Total Frames: ${E}`}),c}},t}fe.__dashjs_factory_name="DroppedFramesRule";var Me=L.default.getClassFactory(fe);function Fe(){const n=this.context,e=(0,T.default)(n).getInstance();let t;return t={getSwitchRequest:function(u){const c=(0,d.default)(n).create();if(c.rule=this.getClassName(),!u)return c;const _=u.getStreamInfo().id,v=u.getMediaType(),I=u?u.getSwitchRequestHistory():null,g=I?I.getSwitchRequests(_,v):{},D=u.getAbrController(),N=u.getMediaInfo(),E=D.getPossibleVoRepresentationsFilteredBySettings(N,!0);let f=0,A=0;for(let U=0;U<E.length;U++){const F=E[U];if(F&&g[F.id]&&(f+=g[F.id].drops,A+=g[F.id].noDrops,f+A>=e.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize&&f/A>e.get().streaming.abr.rules.switchHistoryRule.parameters.switchPercentageThreshold)){c.representation=U>0&&g[F.id].drops>0?E[U-1]:F,c.priority=e.get().streaming.abr.rules.switchHistoryRule.priority,c.reason={drops:f,noDrops:A,message:`[SwitchHistoryRule]: Switch to index: ${c.representation.absoluteIndex} samples: ${f+A} drops: ${f}`};break}}return c}},t}Fe.__dashjs_factory_name="SwitchHistoryRule";var ot=L.default.getClassFactory(Fe),ke=P(7568);const Q="BOLA_STATE_ONE_BITRATE",X="BOLA_STATE_STARTUP",Se="BOLA_STATE_STEADY",Ae=10;function xe(n){n=n||{};const e=this.context,t=n.dashMetrics,u=n.mediaPlayerModel,c=(0,h.default)(e).getInstance(),_=it(e).getInstance();let v,I,g,D;function N(b){const J=b.mediaType,O=b.streamId,ee=J===r.default.AUDIO?[r.default.AUDIO]:D[O];for(const $ in ee)D[O]&&D[O].hasOwnProperty($)&&D[O][$].state===Se&&(D[O][$].placeholderBuffer=0)}function E(b){const J=b.streamId;for(const O in D[J])if(D[J].hasOwnProperty(O)){const ee=D[J][O];ee.state!==Q&&(ee.state=X,f(ee))}}function f(b){b.placeholderBuffer=0,b.mostAdvancedSegmentStart=NaN,b.lastSegmentWasReplacement=!1,b.lastSegmentStart=NaN,b.lastSegmentDurationS=NaN,b.lastSegmentRequestTimeMs=NaN,b.lastSegmentFinishTimeMs=NaN}function A(b){try{if(b&&b.metric===o.HTTP_REQUEST&&b.value&&b.value.type===ke.HTTPRequest.MEDIA_SEGMENT_TYPE&&b.value.trace&&b.value.trace.length){const J=D[b.value._streamId]&&D[b.value._streamId][b.mediaType]?D[b.value._streamId][b.mediaType]:null;J&&J.state!==Q&&(J.lastSegmentRequestTimeMs=b.value.trequest.getTime(),J.lastSegmentFinishTimeMs=b.value._tfinish.getTime(),U(J,b.mediaType))}}catch(J){I.error(J)}}function U(b,J){if(!isNaN(b.lastSegmentStart)&&!isNaN(b.lastSegmentRequestTimeMs)&&!isNaN(b.placeholderBuffer)){if(b.placeholderBuffer*=.99,!isNaN(b.lastSegmentFinishTimeMs)){const O=t.getCurrentBufferLevel(J)+.001*(b.lastSegmentFinishTimeMs-b.lastSegmentRequestTimeMs),ee=W(b,b.currentRepresentation),$=Math.max(0,ee-O);b.placeholderBuffer=Math.min($,b.placeholderBuffer)}b.lastSegmentWasReplacement&&!isNaN(b.lastSegmentDurationS)&&(b.placeholderBuffer+=b.lastSegmentDurationS),b.lastSegmentStart=NaN,b.lastSegmentRequestTimeMs=NaN}}function F(b){if(b&&D[b.streamId]&&D[b.streamId][b.mediaType]){const J=D[b.streamId][b.mediaType];J&&J.state!==Q&&(J.currentRepresentation=b.newRepresentation)}}function B(b,J,O){const ee=O.reduce(((be,Ce,we)=>Ce>O[be]?we:be),0);if(ee===0)return null;const $=Math.max(b,Ae+2*J.length),ie=(O[ee]-1)/($/Ae-1);return{gp:ie,Vp:Ae/ie}}function x(b,J){const O=u.getBufferTimeDefault();if(b.bufferTimeDefault!==O){const ee=B(O,b.representations,b.utilities);if(ee.Vp!==b.Vp||ee.gp!==b.gp){const $=t.getCurrentBufferLevel(J);let ie=$+b.placeholderBuffer;ie-=Ae,ie*=ee.Vp/b.Vp,ie+=Ae,b.bufferTimeDefault=O,b.Vp=ee.Vp,b.gp=ee.gp,b.placeholderBuffer=Math.max(0,ie-$)}}}function W(b,J){return b.Vp*(b.utilities[J.absoluteIndex]+b.gp)}function K(b){if(b&&b.chunk&&b.chunk.representation.mediaInfo&&D[b.streamId]){const J=D[b.streamId][b.chunk.representation.mediaInfo.type];if(J&&J.state!==Q){const O=b.chunk.start;isNaN(J.mostAdvancedSegmentStart)||O>J.mostAdvancedSegmentStart?(J.mostAdvancedSegmentStart=O,J.lastSegmentWasReplacement=!1):J.lastSegmentWasReplacement=!0,J.lastSegmentStart=O,J.lastSegmentDurationS=b.chunk.duration,J.currentRepresentation=b.chunk.representation,U(J,b.chunk.representation.mediaInfo.type)}}}function z(){S()}function Z(){g.get().streaming.abr.limitBitrateByPortal&&S()}function M(b,J){const O=J.absoluteIndex,ee=J.bandwidth,$=b.utilities[O];let ie=0;for(let be=O-1;be>=0;--be)if(b.utilities[be]<b.utilities[O]){const Ce=b.representations[be].bandwidth,we=b.utilities[be],ce=b.Vp*(b.gp+(ee*we-Ce*$)/(ee-Ce));ie=Math.max(ie,ce)}return ie}function R(b){if(b&&D[b.streamId]){const J=D[b.streamId][b.mediaType];if(J&&J.state!==Q){const O=t.getCurrentBufferLevel(b.mediaType);let ee;ee=J.currentRepresentation.absoluteIndex>0?M(J,J.currentRepresentation):Ae;const $=Math.max(0,ee-O);J.placeholderBuffer=Math.min(J.placeholderBuffer,$)}}}function S(){D={}}return v={getSwitchRequest:function(b){try{const J=(0,d.default)(e).create();b.getScheduleController().setTimeToLoadDelay(0),J.rule=this.getClassName(),J.reason=J.reason||{};const O=(function(ee){const $=ee.getMediaType(),ie=ee.getStreamInfo().id;D[ie]||(D={},D[ie]={});let be=D[ie][$];return be?be.state!==Q&&x(be,$):(be=(function(Ce){const we={}
12,ce=Ce.getMediaInfo(),le=_.getPossibleVoRepresentationsFilteredBySettings(ce,!0);let re=le.map((te=>te.bandwidth)).map((te=>Math.log(te)));re=re.map((te=>te-re[0]+1));const me=u.getBufferTimeDefault(),ye=B(me,le,re);return ye?(we.state=X,we.representations=le,we.utilities=re,we.bufferTimeDefault=me,we.Vp=ye.Vp,we.gp=ye.gp,we.currentRepresentation=null,f(we)):we.state=Q,we})(ee),D[ie][$]=be),be})(b);switch(J.reason.state=O.state,O.state){case Q:break;case X:(function(ee,$,ie){const be=$.getMediaType(),Ce=$.getThroughputController().getSafeAverageThroughput(be);if(isNaN(Ce))return;const we=$.getMediaInfo(),ce=_.getOptimalRepresentationForBitrate(we,Ce,!0),le=t.getCurrentBufferLevel(be);ee.representation=ce,ee.reason.throughput=Ce,ie.placeholderBuffer=Math.max(0,M(ie,ce)-le),ie.currentRepresentation=ce,!isNaN(ie.lastSegmentDurationS)&&le>=ie.lastSegmentDurationS&&(ie.state=Se)})(J,b,O);break;case Se:(function(ee,$,ie){const be=$.getMediaType(),Ce=$.getThroughputController(),we=$.getMediaInfo(),ce=Ce.getSafeAverageThroughput(be),le=$.getScheduleController();(function(q,oe){const Ue=Date.now();if(isNaN(q.lastSegmentFinishTimeMs)){if(!isNaN(q.lastCallTimeMs)){const Ge=.001*(Ue-q.lastCallTimeMs);q.placeholderBuffer+=Math.max(0,Ge)}}else{const Ge=.001*(Ue-q.lastSegmentFinishTimeMs);q.placeholderBuffer+=Math.max(0,Ge)}q.lastCallTimeMs=Ue,q.lastSegmentStart=NaN,q.lastSegmentRequestTimeMs=NaN,q.lastSegmentFinishTimeMs=NaN,x(q,oe)})(ie,be);const re=t.getCurrentBufferLevel(be);let me=(function(q,oe){const Ue=q.representations.length;let Ge=NaN,Ve=NaN;for(let je=0;je<Ue;++je){let lt=(q.Vp*(q.utilities[je]-1+q.gp)-oe)/q.representations[je].bandwidth;(isNaN(Ve)||lt>=Ve)&&(Ve=lt,Ge=je)}return q.representations[Ge]})(ie,re+ie.placeholderBuffer);const ye=_.getOptimalRepresentationForBitrate(we,ce,!0);me.absoluteIndex>ie.currentRepresentation.absoluteIndex&&me.absoluteIndex>ye.absoluteIndex&&(me=ye.absoluteIndex>ie.currentRepresentation.absoluteIndex?ye:ie.currentRepresentation);let te=Math.max(0,re+ie.placeholderBuffer-W(ie,me));te<=ie.placeholderBuffer?(ie.placeholderBuffer-=te,te=0):(te-=ie.placeholderBuffer,ie.placeholderBuffer=0,_.isPlayingAtTopQuality(me)?te=0:le.setTimeToLoadDelay(1e3*te)),ee.representation=me,ee.reason.throughput=ce,ee.reason.bufferLevel=re,ee.reason.placeholderBuffer=ie.placeholderBuffer,ee.reason.delay=te,ie.currentRepresentation=me})(J,b,O);break;default:(function(ee,$,ie){I.debug("BOLA ABR rule invoked in bad state.");const be=$.getMediaInfo(),Ce=$.getMediaType(),we=$.getThroughputController().getSafeAverageThroughput(Ce);ee.representation=_.getOptimalRepresentationForBitrate(be,we,!0),ee.reason.state=ie.state,ee.reason.throughput=we,ie.state=X,f(ie)})(J,b,O)}return J.priority=g.get().streaming.abr.rules.bolaRule.priority,J}catch(J){return I.error(J),(0,d.default)(e).create()}},handleNewMediaInfo:function(b){b&&b.streamInfo&&b.type&&D[b.streamInfo.id]&&D[b.streamInfo.id][b.type]&&delete D[b.streamInfo.id][b.type]},reset:function(){S(),c.off(H.default.BUFFER_EMPTY,N,v),c.off(H.default.PLAYBACK_SEEKING,E,v),c.off(H.default.METRIC_ADDED,A,v),c.off(H.default.QUALITY_CHANGE_REQUESTED,F,v),c.off(H.default.FRAGMENT_LOADING_ABANDONED,R,v),c.off(m.default.MEDIA_FRAGMENT_LOADED,K,v),c.off(m.default.SETTING_UPDATED_MAX_BITRATE,z,v),c.off(m.default.SETTING_UPDATED_MIN_BITRATE,z,v),c.off(m.default.VIDEO_ELEMENT_RESIZED,Z,v)}},I=(0,p.default)(e).getInstance().getLogger(v),g=(0,T.default)(e).getInstance(),S(),c.on(H.default.BUFFER_EMPTY,N,v),c.on(H.default.PLAYBACK_SEEKING,E,v),c.on(H.default.METRIC_ADDED,A,v),c.on(H.default.QUALITY_CHANGE_REQUESTED,F,v),c.on(H.default.FRAGMENT_LOADING_ABANDONED,R,v),c.on(m.default.MEDIA_FRAGMENT_LOADED,K,v),c.on(m.default.SETTING_UPDATED_MAX_BITRATE,z,v),c.on(m.default.SETTING_UPDATED_MIN_BITRATE,z,v),c.on(m.default.VIDEO_ELEMENT_RESIZED,Z,v),v}xe.__dashjs_factory_name="BolaRule";var gt=L.default.getClassFactory(xe);const Ee="L2A_STATE_ONE_BITRATE",mt="L2A_STATE_STARTUP",He="L2A_STATE_STEADY",Pe=Math.pow(4,.99);function Ke(n){n=n||{};const e=this.context,t=n.dashMetrics,u=(0,h.default)(e).getInstance(),c=(0,T.default)(e).getInstance();let _,v,I,g;function D(B){B.placeholderBuffer=0,B.mostAdvancedSegmentStart=NaN,B.lastSegmentWasReplacement=!1,B.lastSegmentStart=NaN,B.lastSegmentDurationS=NaN,B.lastSegmentRequestTimeMs=NaN,B.lastSegmentFinishTimeMs=NaN,B.lastSegmentUrl=""}function N(){for(const B in v)if(v.hasOwnProperty(B)){const x=v[B];x.state!==Ee&&(x.state=mt,D(x))}}function E(B){if(B&&B.chunk&&B.chunk.representation&&B.chunk.representation.mediaInfo){const x=v[B.chunk.representation.mediaInfo.type],W=I[B.chunk.representation.mediaInfo.type];if(x&&x.state!==Ee){const K=B.chunk.start;isNaN(x.mostAdvancedSegmentStart)||K>x.mostAdvancedSegmentStart?(x.mostAdvancedSegmentStart=K,x.lastSegmentWasReplacement=!1):x.lastSegmentWasReplacement=!0,x.lastSegmentStart=K,x.lastSegmentDurationS=B.chunk.duration,x.currentRepresentation=B.chunk.representation,A(x,W)}}}function f(B){if(B&&B.metric===o.HTTP_REQUEST&&B.value&&B.value.type===ke.HTTPRequest.MEDIA_SEGMENT_TYPE&&B.value.trace&&B.value.trace.length){const x=v[B.mediaType],W=I[B.mediaType];x&&x.state!==Ee&&(x.lastSegmentRequestTimeMs=B.value.trequest.getTime(),x.lastSegmentFinishTimeMs=B.value._tfinish.getTime(),A(x,W))}}function A(B,x){isNaN(B.lastSegmentStart)||isNaN(B.lastSegmentRequestTimeMs)||(x.segment_request_start_s=.001*B.lastSegmentRequestTimeMs,x.segment_download_finish_s=.001*B.lastSegmentFinishTimeMs,B.lastSegmentStart=NaN,B.lastSegmentRequestTimeMs=NaN)}function U(B,x){if(B.length!==x.length)return-1;let W=0;for(let K=0;K<B.length;K++)W+=B[K]*x[K];return W}function F(){v={},I={}}return _={getSwitchRequest:function(B){try{const x=(0,d.default)(e).create();x.rule=this.getClassName();const W=B.getMediaType(),K=B.getScheduleController();if(x.reason=x.reason||{},W===r.default.AUDIO)return x;K.setTimeToLoadDelay(0);const z=(function(Z){const M=Z.getMediaType();let R=v[M];return R||(R=(function(S){const b={},J=S.getMediaInfo();return b.state=mt,b.currentRepresentation=null,(function(O){O&&O.type&&(I[O.type]={},I[O.type].w=[],I[O.type].prev_w=[],I[O.type].Q=0,I[O.type].segment_request_start_s=0,I[O.type].segment_download_finish_s=0,I[O.type].B_target=1.5)})(J),D(b),b})(Z),v[M]=R),R})(B);if(!I[W])return x;switch(x.reason.state=z.state,z.state){case Ee:break;case mt:(function(Z,M,R){const S=Z.getMediaInfo(),b=Z.getMediaType(),J=Z.getThroughputController().getSafeAverageThroughput(b);if(isNaN(J))return M;const O=Z.getAbrController(),ee=O.getOptimalRepresentationForBitrate(S,J,!0),$=t.getCurrentBufferLevel(b,!0),ie=I[b],be=O.getPossibleV
12oRepresentationsFilteredBySettings(S,!0);if(M.representation=ee,M.reason.throughput=J,R.currentRepresentation=ee,!isNaN(R.lastSegmentDurationS)&&$>=ie.B_target){R.state=He,ie.Q=Pe;for(let Ce=0;Ce<be.length;++Ce)be[Ce].id===R.currentRepresentation.id?ie.prev_w[Ce]=1:ie.prev_w[Ce]=0}})(B,x,z);break;case He:(function(Z,M,R){let S=[];const b=Z.getThroughputController(),J=Z.getMediaType();let O=b.getAverageThroughput(J,r.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN,1),ee=t.getCurrentHttpRequest(J),$=null;const ie=I[J];if(O<1&&(O=1),ee.url===R.lastSegmentUrl||ee.type===ke.HTTPRequest.INIT_SEGMENT_TYPE)$=R.currentRepresentation;else{let be=R.lastSegmentDurationS,Ce=1;const we=Z.getAbrController(),ce=Z.getMediaInfo(),le=we.getPossibleVoRepresentationsFilteredBySettings(ce,!0);let re=Z.getVideoModel().getPlaybackRate();const me=Math.max(Math.pow(4,1),Pe*Math.sqrt(4));for(let oe=0;oe<le.length;++oe){const Ue=le[oe];re*Ue.bitrateInKbit>O&&(Ce=-1),ie.w[oe]=ie.prev_w[oe]+Ce*(be/(2*me))*((ie.Q+Pe)*(re*Ue.bitrateInKbit/O))}ie.w=(function(oe){const Ue=oe.length;let Ge=!1,Ve=[];for(let an=0;an<Ue;++an)Ve[an]=oe[an];let je=oe.sort((function(an,vn){return vn-an})),lt=0,Rt=0,Dt=[];for(let an=0;an<Ue-1;++an)if(lt+=je[an],Rt=(lt-1)/(an+1),Rt>=je[an+1]){Ge=!0;break}Ge||(Rt=(lt+je[Ue-1]-1)/Ue);for(let an=0;an<Ue;++an)Dt[an]=Math.max(Ve[an]-Rt,0);return Dt})(ie.w);for(let oe=0;oe<le.length;++oe)S[oe]=ie.w[oe]-ie.prev_w[oe],ie.prev_w[oe]=ie.w[oe];const ye=le.map((oe=>oe.bandwidth));ie.Q=Math.max(0,ie.Q-be+be*re*((U(ye,ie.prev_w)+U(ye,S))/O));let te=[];for(let oe=0;oe<ye.length;++oe)te[oe]=Math.abs(ye[oe]-U(ie.w,ye));const q=te.indexOf(Math.min(...te));$=we.getRepresentationByAbsoluteIndex(q,ce,!0),$.absoluteIndex>R.currentRepresentation.absoluteIndex&&ye[R.currentRepresentation.absoluteIndex+1]<=O&&($=we.getRepresentationByAbsoluteIndex(R.currentRepresentation.absoluteIndex+1,ce,!0)),$.bitrateInKbit>=O&&(ie.Q=2*Math.max(Pe,ie.Q)),R.lastSegmentUrl=ee.url}M.representation=$,R.currentRepresentation=M.representation})(B,x,z);break;default:(function(Z,M,R){const S=Z.getAbrController(),b=Z.getMediaInfo(),J=Z.getMediaType(),O=Z.getThroughputController().getSafeAverageThroughput(J);M.representation=S.getOptimalRepresentationForBitrate(b,O,!0),M.reason.throughput=O,R.state=mt,D(R)})(B,x,z)}return x.priority=c.get().streaming.abr.rules.l2ARule.priority,x}catch(x){return g.error(x),(0,d.default)(e).create()}},reset:function(){F(),u.off(m.default.PLAYBACK_SEEKING,N,_),u.off(m.default.MEDIA_FRAGMENT_LOADED,E,_),u.off(m.default.METRIC_ADDED,f,_)}},g=(0,p.default)(e).getInstance().getLogger(_),F(),u.on(m.default.PLAYBACK_SEEKING,N,_),u.on(m.default.MEDIA_FRAGMENT_LOADED,E,_),u.on(m.default.METRIC_ADDED,f,_),_}Ke.__dashjs_factory_name="L2ARule";var Et=L.default.getClassFactory(Ke);function Pt(){const n=this.context;let e,t,u,c,_,v,I,g,D;function N(){u=null,c=1,_=100,v=0,I=null,g=null,D="dynamic_weight_selection"}function E(){let B=0;if(u)for(let x=0;x<u.length;x++){let W=u[x];W.state.throughput>B&&(B=W.state.throughput)}return B}function f(B,x,W){let K=B.map(((z,Z)=>W[Z]*Math.pow(z-x[Z],2))).reduce(((z,Z)=>z+Z));return(K<0?-1:1)*Math.sqrt(Math.abs(K))}function A(B,x){return f([B.state.throughput,B.state.latency,B.state.rebuffer,B.state.switch],[x.state.throughput,x.state.latency,x.state.rebuffer,x.state.switch],[1,1,1,1])}function U(B,x){for(let W=0;W<u.length;W++){let K=u[W],z=.1;const Z=A(K,B);F(K,x,Math.exp(-1*Math.pow(Z,2)/(2*Math.pow(z,2))))}}function F(B,x,W){let K=B.state,z=[.01,.01,.01,.01];K.throughput=K.throughput+(x[0]-K.throughput)*z[0]*W,K.latency=K.latency+(x[1]-K.latency)*z[1]*W,K.rebuffer=K.rebuffer+(x[2]-K.rebuffer)*z[2]*W,K.switch=K.switch+(x[3]-K.switch)*z[3]*W}return e={getNextQuality:function(B,x,W,K,z,Z,M,R){let S=K,b=W;(function(ce,le){if(!u){u=[];const re=le.getPossibleVoRepresentationsFilteredBySettings(ce,!0),me=re.map((ye=>ye.bandwidth));v=Math.min(...me),c=(function(ye){const te=ye.map((q=>Math.pow(q,2))).reduce(((q,oe)=>q+oe));return Math.sqrt(te)})(me),re.forEach((ye=>{let te={representation:ye,state:{throughput:ye.bandwidth/c,latency:0,rebuffer:0,switch:0}};u.push(te)})),g=(function(ye){let te=[],q=(function(je){let lt=[];for(let Rt=0;Rt<je;Rt++){let Dt=[Math.random()*E(),Math.random(),Math.random(),Math.random()];lt.push(Dt)}return lt})(Math.pow(ye.length,2));te.push(q[0]);let oe=[1,1,1,1];for(let je=1;je<ye.length;je++){let lt=null,Rt=null;for(let Dt=0;Dt<q.length;Dt++){let an=q[Dt],vn=null;for(let qn=0;qn<te.length;qn++){let Yn=f(an,te[qn],oe);(vn===null||Yn<vn)&&(vn=Yn)}(Rt===null||vn>Rt)&&(lt=an,Rt=vn)}te.push(lt)}let Ue=null,Ge=null;for(let je=0;je<te.length;je++){let lt=0;for(let Rt=0;Rt<te.length;Rt++)je!==Rt&&(lt+=f(te[je],te[Rt],oe));(Ue===null||lt>Ue)&&(Ue=lt,Ge=je)}let Ve=[];for(Ve.push(te[Ge]),te.splice(Ge,1);te.length>0;){let je=null,lt=null;for(let Rt=0;Rt<te.length;Rt++){let Dt=f(Ve[0],te[Rt],oe);(je===null||Dt<je)&&(je=Dt,lt=Rt)}Ve.push(te[lt]),te.splice(lt,1)}return Ve})(u)}})(x,B);let J=W/c;J>1&&(J=E()),K/=_;let O=u.find((ce=>ce.representation.id===M.id)),ee=O.representation.bandwidth*R.getSegmentDuration()/b,$=Math.max(0,ee-z);if(z-ee<R.getMinBuffer())return t.debug(`Buffer is low for bitrate= ${O.representation.bandwidth} downloadTime=${ee} currentBuffer=${z} rebuffer=${$}`),(function(ce,le){let re=0,me=ce;if(u)for(let ye=0;ye<u.length;ye++){let te=u[ye];te.representation.bandwidth<ce.representation.bandwidth&&te.representation.bandwidth>re&&le>te.representation.bandwidth&&(re=te.representation.bandwidth,me=te)}return me})(O,b).representation;switch(D){case"manual_weight_selection":I=[.4,.4,.4,.4];break;case"random_weight_selection":I=(function(ce){let le=[],re=Math.sqrt(2/ce);for(let me=0;me<4;me++)le.push(Math.random()*re);return I=le,I})(u.length);break;default:(function(ce,le,re,me,ye,te){I||(I=g[g.length-1]);let q=ce.findWeightVector(u,le,re,me,ye,te);q!==null&&q!==-1&&(I=q)})(R,S,z,$,b,Z)}let ie=null,be=null,Ce=null;for(let ce=0;ce<u.length;ce++){let le=u[ce],re=le.state,me=[re.throughput,re.latency,re.rebuffer,re.switch],ye=I.slice(),te=R.getNextBufferWithBitrate(le.representation.bandwidth,z,b),q=te<R.getMinBuffer();q&&t.debug(`Buffer is low for bitrate=${le.representation.bandwidth} downloadTime=${ee} currentBuffer=${z} nextBuffer=${te}`),(le.representation.bandwidth>W-1e4||q)&&le.representation.bandwidth!==v&&(ye[0]=100);let oe=f(me,[J,0,0,0],ye);(ie===null||oe<ie)&&(ie=oe,be=le.representation,Ce=le)}let we=Math.abs(O.representation.bandwidth-Ce.representation.bandwidth)/c;return U(O,[J,K,$,we]),U(Ce,[J,0,0,we]),be},reset:function(){N()}},t=(0,p.default)(n).getInstance().getLogger(e),N(),e}Pt.__dashjs_factory_name="LearningAbrController";var xt=L.default.getClassFactory(Pt),Lt=class{constructor(){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}};function sn(){let n,e,t,u,c;function _(){e=null,t=null,u=null,c=null}function v(g,D,N,E){let f=new Lt;return f.type=g,f.weights.bitrateReward=D||1,f.weights.bitrateSwitchPenalty=1,f.weights.rebufferPenalty=N||1e3,f.weights.latencyPenalty=[],f.weights.latencyPenalty.push({threshold:1.1,penalty:.05*E}),f.weights.latencyPenalty.push({threshold:1e8,penalty:.1*N}),f.weights.playbackSpeedPenalty=E||200,f}function I(g,D,N,E,f){f.bitrateWSum+=f.weights.bitrateReward*g,f.lastBitrate&&(f.bitrateSwitchWSum+=f.weights.bitrateSwitchPenalty*Math.abs(g-f.lastBitrate)),f.lastBitrate=g,f.rebufferWSum+=f.weights.rebufferPenalty*D;for(let A=0;A<f.weights.latencyPenalty.length;A++){let U=f.weights.latencyPenalty[A];if(N<=U.threshold){f.latencyWSum+=U.penalty*N;break}}f.playbackSpeedWSum+=f.weights.playbackSpeedPenalty*Math.abs(1-E),f.totalQoe=f.bitrateWSum-f.bitrateSwitchWSum-f.rebufferWSum-f.latencyWSum-f.playbackSpeedWSum}return n={setupPerSegmentQoe:function(g,D,N){e=v("segment",g,D,N),t=g,u=D,c=N},logSegmentMetrics:function(g,D,N,E){e&&I(g,D,N,E,e)},getPerSegmentQoe:function(){return e},calculateSingleUseQoe:function(g,D,N,E){let f=null;
12return t&&u&&c&&(f=v("segment",t,u,c)),f?(I(g,D,N,E,f),f.totalQoe):0},reset:function(){_()}},_(),n}sn.__dashjs_factory_name="LoLpQoeEvaluator";var nn=L.default.getClassFactory(sn);function Sn(n){let e,t,u,c,_=n.targetLatency,v=n.bufferMin,I=n.segmentDuration,g=n.qoeEvaluator;function D(){return I}function N(E,f){const A=D();let U;return U=f>A?E-A:E+A-f,U}return e={getMinBuffer:function(){return v},getSegmentDuration:D,getNextBufferWithBitrate:function(E,f,A){return N(f,E*I/A)},getNextBuffer:N,findWeightVector:function(E,f,A,U,F,B){let x=null,W=null,K=null,z=Math.abs(f-c);return E.forEach((Z=>{u.forEach((M=>{M[0];let R,S=M[1],b=M[2],J=(M[3],Z.representation.bandwidth*I/F),O=N(A,J);R=b===0?10:1/b;let ee=R*Math.max(1e-5,J-O);R=S===0?10:1/S;let $=R*Z.state.latency,ie=g.calculateSingleUseQoe(Z.representation.bandwidth,ee,$,B);(x===null||ie>x)&&(function(be,Ce,we){return!(be>_+we)&&Ce>=v})(f,O,z)&&(x=ie,W=M,K=Z.representation.bandwidth)}))})),W===null&&K===null&&(W=-1),c=f,W}},t=[.2,.4,.6,.8,1],u=(function(E){let f=E.map((function(U){return[U]})),A=function(U,F,B){if(B===F)return U;let x=U.length;for(let W=0;W<x;W++){let K=U.shift();for(let z=0;z<E.length;z++)U.push(K.concat(E[z]))}return A(U,F,B+1)};return A(f,4,1)})(t),c=0,e}Sn.__dashjs_factory_name="LoLpWeightSelector";var ve=L.default.getClassFactory(Sn);function Ie(n){let e,t,u,c,_,v=(n=n||{}).dashMetrics,I=this.context;return u={getSwitchRequest:function(g){try{let D=(0,d.default)(I).create();D.rule=this.getClassName();let N=g.getMediaInfo().type,E=g.getAbrController();const f=g.getStreamInfo();let A=g.getRepresentation();const U=g.getMediaInfo(),F=v.getCurrentBufferState(N),B=g.getScheduleController(),x=v.getCurrentBufferLevel(N,!0),W=B.getPlaybackController();let K=W.getCurrentLiveLatency();if(N===r.default.AUDIO)return D;K||(K=0);const z=W.getPlaybackRate(),Z=g.getThroughputController().getSafeAverageThroughput(N);if(e.debug(`Throughput ${Math.round(Z)} kbps`),isNaN(Z)||!F||E.getAbandonmentStateFor(f.id,N)===o.ABANDON_LOAD)return D;let M=E.getPossibleVoRepresentationsFilteredBySettings(U,!0).map((be=>be.bandwidth)),R=g.getRepresentation().fragmentDuration,S=Math.min(...M)/1e3,b=Math.max(...M)/1e3,J=A.bandwidth/1e3,O=v.getCurrentHttpRequest(N,!0),ee=(O.tresponse.getTime()-O.trequest.getTime())/1e3,$=ee>R?ee-R:0;_.setupPerSegmentQoe(R,b,S),_.logSegmentMetrics(J,$,K,z);let ie=ve(I).create({targetLatency:1.5,bufferMin:.3,segmentDuration:R,qoeEvaluator:_});return D.representation=c.getNextQuality(E,U,1e3*Z,K,x,z,A,ie),D.reason={throughput:Z,latency:K},D.priority=t.get().streaming.abr.rules.loLPRule.priority,B.setTimeToLoadDelay(0),D}catch(D){throw D}},reset:function(){c.reset(),_.reset()}},e=(0,p.default)(I).getInstance().getLogger(u),c=xt(I).create(),_=nn(I).create(),t=(0,T.default)(I).getInstance(),u}Ie.__dashjs_factory_name="LoLPRule";var pt=L.default.getClassFactory(Ie);function _t(n){n=n||{};const e=this.context,t=n.mediaPlayerModel,u=n.customParametersModel,c=n.dashMetrics,_=n.settings,v=(0,h.default)(e).getInstance();let I,g,D,N;function E(){Object.values(r.default.QUALITY_SWITCH_RULES).forEach((B=>{g=f(B,g)})),Object.values(r.default.ABANDON_FRAGMENT_RULES).forEach((B=>{D=f(B,D)}
12)),u.getAbrCustomRules().forEach((function(B){B.type===r.default.RULES_TYPES.QUALITY_SWITCH_RULES&&g.push(B.rule(e).create()),B.type===r.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&D.push(B.rule(e).create())})),g.length===0&&(g.push(gt(e).create({dashMetrics:c,mediaPlayerModel:t,settings:_})),g.push(w(e).create({dashMetrics:c})))}function f(B,x){const W=B.charAt(0).toLowerCase()+B.slice(1);return _.get().streaming.abr.rules[W].active&&!(function(K,z){return K.filter((Z=>Z.getClassName()===z)).length>0})(x,B)?(x.push((function(K){switch(K){case r.default.QUALITY_SWITCH_RULES.BOLA_RULE:return gt(e).create({dashMetrics:c,mediaPlayerModel:t,settings:_});case r.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE:return w(e).create({dashMetrics:c});case r.default.QUALITY_SWITCH_RULES.INSUFFICIENT_BUFFER_RULE:return ue(e).create({dashMetrics:c,settings:_});case r.default.QUALITY_SWITCH_RULES.SWITCH_HISTORY_RULE:return ot(e).create();case r.default.QUALITY_SWITCH_RULES.DROPPED_FRAMES_RULE:return Me(e).create();case r.default.QUALITY_SWITCH_RULES.LEARN_TO_ADAPT_RULE:return Et(e).create({dashMetrics:c,settings:_});case r.default.QUALITY_SWITCH_RULES.LOL_PLUS_RULE:return pt(e).create({dashMetrics:c});case r.default.ABANDON_FRAGMENT_RULES.ABANDON_REQUEST_RULE:return Ne(e).create({dashMetrics:c,mediaPlayerModel:t,settings:_})}})(B)),x):_.get().streaming.abr.rules[W].active?x:(function(K,z){return K.filter((Z=>Z.getClassName()!==z))})(x,B)}function A(B){return B.filter((x=>x.representation!==d.default.NO_CHANGE))}function U(B){const x={};let W,K,z,Z=null;if(B.length!==0){for(x[d.default.PRIORITY.STRONG]=null,x[d.default.PRIORITY.WEAK]=null,x[d.default.PRIORITY.DEFAULT]=null,W=0,K=B.length;W<K;W+=1)z=B[W],z.representation!==d.default.NO_CHANGE&&(x[z.priority]===null||x[z.priority].representation!==d.default.NO_CHANGE&&z.representation.bitrateInKbit<x[z.priority].representation.bitrateInKbit)&&(x[z.priority]=z);return x[d.default.PRIORITY.WEAK]&&x[d.default.PRIORITY.WEAK].representation!==d.default.NO_CHANGE&&(Z=x[d.default.PRIORITY.WEAK]),x[d.default.PRIORITY.DEFAULT]&&x[d.default.PRIORITY.DEFAULT].representation!==d.default.NO_CHANGE&&(Z=x[d.default.PRIORITY.DEFAULT]),x[d.default.PRIORITY.STRONG]&&x[d.default.PRIORITY.STRONG].representation!==d.default.NO_CHANGE&&(Z=x[d.default.PRIORITY.STRONG]),Z}}function F(){E()}return I={clearDataForStream:function(B){[g,D].forEach((x=>{x&&x.length&&x.forEach((W=>W.clearDataForStream&&typeof W.clearDataForStream=="function"&&W.clearDataForStream(B)))}))},getAbandonFragmentRules:function(){return D},getBestPossibleSwitchRequest:function(B){return B&&U(A(g.filter((x=>{const W=x.getClassName();if(W!==r.default.QUALITY_SWITCH_RULES.BOLA_RULE&&W!==r.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE)return!0;const K=B.getMediaType();return N[K]&&W===r.default.QUALITY_SWITCH_RULES.BOLA_RULE||!N[K]&&W===r.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE})).map((x=>x.getSwitchRequest(B)))))||(0,d.default)(e).create()},getBolaState:function(B){return N[B]},getMinSwitchRequest:U,getQualitySwitchRules:function(){return g},handleNewMediaInfo:function(B){g.forEach((x=>x.handleNewMediaInfo&&x.handleNewMediaInfo(B))),D.forEach((x=>x.handleNewMediaInfo&&x.handleNewMediaInfo(B)))},initialize:function(){g=[],D=[],N={},E(),v.on(m.default.SETTING_UPDATED_ABR_ACTIVE_RULES,F,I)},reset:function(){[g,D].forEach((B=>{B&&B.length&&B.forEach((x=>x.reset&&x.reset()))})),g=[],D=[],N={},v.off(m.default.SETTING_UPDATED_ABR_ACTIVE_RULES,F,I)},setBolaState:function(B,x){N[B]=x},shouldAbandonFragment:function(B){if(!B)return(0,d.default)(e).create();const x=U(A(D.map((W=>W.shouldAbandon(B)))));return x&&x.reason&&(x.reason.forceAbandon=!0),x||(0,d.default)(e).create()}},I}_t.__dashjs_factory_name="ABRRulesCollection";const Ye=L.default.getClassFactory(_t);L.default.updateSingletonFactory(_t.__dashjs_factory_name,Ye);var Y=Ye,k=P(2842);const De="loading",j="executed",We="failed";function st(n){const e=(n=n||{}).eventBus,t=n.events,u=n.dashMetrics,c=n.fragmentLoader,_=n.debug,v=n.streamInfo,I=n.type;let g,D,N,E;function f(M){return!!M&&(function(R){let S=!1;return R.some((b=>{if(J=M,O=b,!isNaN(J.index)&&J.startTime===O.startTime&&J.adaptationIndex===O.adaptationIndex&&J.type===O.type||(function(ee,$){return ee.representation.id===$.representation.id})(M,b)||(function(ee,$){return ee.action===k.default.ACTION_COMPLETE&&ee.action===$.action})(M,b))return S=!0,S;var J,O})),S})(N)}function A(M){return isNaN(M.duration)?.25:Math.min(M.duration/8,.5)}function U(M){N=N.filter((R=>{const S=A(R);return isNaN(R.startTime)||M!==void 0&&R.startTime>=M-S}))}function F(M,R){R<=M+.5||(N=N.filter((S=>{const b=A(S);return isNaN(S.startTime)||S.startTime>=R-b||isNaN(S.duration)||S.startTime+S.duration<=M+b})))}function B(M,R,S){for(let b=M.length-1;b>=0;b--){const J=M[b],O=J.startTime,ee=O+J.duration;if(S=isNaN(S)?A(J):S,!isNaN(O)&&!isNaN(ee)&&R+S>=O&&R-S<ee||isNaN(O)&&isNaN(R))return J}return null}function x(M,R){u.addSchedulingInfo(M,R),u.addRequestsQueue(M.mediaType,E,N)}function W(M){M.sender===c&&(E.splice(E.indexOf(M.request),1),M.response&&!M.error&&N.push(M.request),x(M.request,M.error?We:j),e.trigger(t.FRAGMENT_LOADING_COMPLETED,{request:M.request,response:M.response,error:M.error,sender:this},{streamId:v.id,mediaType:I}))}function K(M){M.sender===c&&e.trigger(t.FRAGMENT_LOADING_PROGRESS,{request:M.request,response:M.response,error:M.error,sender:this},{streamId:v.id,mediaType:I})}function z(M){M.sender===c&&e.trigger(t.FRAGMENT_LOADING_ABANDONED,{request:M.request},{streamId:v.id,mediaType:I})}function Z(){N=[],E=[],c&&c.resetInitialSettings()}return g={abortRequests:function(){D.debug("abort requests"),c.abort(),E=[]},executeRequest:function(M){M.action===k.default.ACTION_DOWNLOAD?(x(M,De),E.push(M),(function(R){e.trigger(t.FRAGMENT_LOADING_STARTED,{request:R},{streamId:v.id,mediaType:I}),c.load(R)})(M)):D.warn("Unknown request action.")},getRequests:function(M){const R=M?M.state instanceof Array?M.state:[M.state]:[];let S=[];return R.forEach((b=>{const J=(function(O){let ee;switch(O){case De:ee=E;break;case j:ee=N;break;default:ee=[]}return ee})(b);S=S.concat((function(O,ee){return ee.hasOwnProperty("time")?[B(O,ee.time,ee.threshold)]:O.filter(($=>{for(const ie in ee)if(ie!=="state"&&ee.hasOwnProperty(ie)&&$[ie]!=ee[ie])return!1;return!0}))})(J,M))})),S},getStreamId:function(){return v.id},getType:function(){return I},isFragmentLoaded:f,isFragmentLoadedOrPending:function(M){let R,S=!1,b=0;if(S=f(M),!S)for(b=0;b<E.length;b++)R=E[b],M.url===R.url&&M.startTime===R.startTime&&(S=!0);return S},removeExecutedRequestsAfterTime:function(M){N=N.filter((R=>
12isNaN(R.startTime)||M!==void 0&&R.startTime<M))},removeExecutedRequestsBeforeTime:U,reset:function(){e.off(t.LOADING_COMPLETED,W,this),e.off(t.LOADING_DATA_PROGRESS,K,this),e.off(t.LOADING_ABANDONED,z,this),c&&c.reset(),Z()},resetInitialSettings:Z,syncExecutedRequestsWithBufferedRange:function(M,R){if(!M||M.length===0)return void U();let S=0;for(let b=0,J=M.length;b<J;b++)F(S,M.start(b)),S=M.end(b);R>0&&F(S,R)}},D=_.getLogger(g),Z(),e.on(t.LOADING_COMPLETED,W,g),e.on(t.LOADING_DATA_PROGRESS,K,g),e.on(t.LOADING_ABANDONED,z,g),g}st.__dashjs_factory_name="FragmentModel";const Te=L.default.getClassFactory(st);Te.FRAGMENT_MODEL_LOADING=De,Te.FRAGMENT_MODEL_EXECUTED=j,Te.FRAGMENT_MODEL_CANCELED="canceled",Te.FRAGMENT_MODEL_FAILED=We,L.default.updateClassFactory(st.__dashjs_factory_name,Te);var Le=Te;function i(n){let e;const t=(n=n||{}).abrController,u=n.throughputController,c=n.switchRequestHistory,_=n.droppedFramesHistory,v=n.currentRequest,I=n.streamProcessor?n.streamProcessor.getScheduleController():null,g=n.streamProcessor?n.streamProcessor.getRepresentation():null,D=n.videoModel?n.videoModel:null;function N(){return g?g.mediaInfo:null}return e={getAbrController:function(){return t},getCurrentRequest:function(){return v},getDroppedFramesHistory:function(){return _},getMediaInfo:N,getMediaType:function(){const E=N();return E?E.type:null},getRepresentation:function(){return g},getScheduleController:function(){return I},getStreamInfo:function(){const E=N();return E?E.streamInfo:null},getSwitchRequestHistory:function(){return c},getThroughputController:function(){return u},getVideoModel:function(){return D}},e}i.__dashjs_factory_name="RulesContext";var l=L.default.getClassFactory(i);function C(){let n={},e={};const t=this.context,u=(0,T.default)(t).getInstance();return{clearForStream:function(c){delete n[c],delete e[c]},getSwitchRequests:function(c,_){return c!=null&&_!=null&&n[c]&&n[c][_]?n[c][_]:{}},push:function(c){const _=c.currentRepresentation,v=c.newRepresentation;if(_.mediaInfo.streamInfo.id!==v.mediaInfo.streamInfo.id||v.mediaInfo.id!==_.mediaInfo.id)return;const I=_.mediaInfo.streamInfo.id;n[I]||(function(F){n[F]={},e[F]={}})(I);const g=_.mediaInfo.type;n[I][g]||(function(F,B){n[F][B]={},e[F][B]=[]})(I,g);const D=c.currentRepresentation.id;n[I][g][D]||(function(F,B,x){n[F][B][x]={noDrops:0,drops:0,dropSize:0}})(I,g,D);let N=c.newRepresentation.absoluteIndex-c.currentRepresentation.absoluteIndex,E=N<0?1:0,f=E?-N:0,A=E?0:1;n[I][g][c.currentRepresentation.id].drops+=E,n[I][g][c.currentRepresentation.id].dropSize+=f,n[I][g][c.currentRepresentation.id].noDrops+=A,e[I][g].push({id:c.currentRepresentation.id,noDrop:A,drop:E,dropSize:f});const U=(function(F,B){return e[F][B].length>u.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize?e[F][B].shift():null})(I,g);U&&(function(F,B,x){n[F][B][x.id].drops-=x.drop,n[F][B][x.id].dropSize-=x.dropSize,n[F][B][x.id].noDrops-=x.noDrop})(I,g,U)},reset:function(){n={},e={}}}}C.__dashjs_factory_name="SwitchRequestHistory";var ne=L.default.getClassFactory(C);function se(){let n={},e={},t={};return{clearForStream:function(u){delete n[u],delete e[u],delete t[u]},getFrameHistory:function(u){return n[u]},push:function(u,c,_){if(!c)return;n[u]||(function(E){n[E]=[],e[E]=0,t[E]=0})(u);let v=_&&_.droppedVideoFrames?_.droppedVideoFrames:0,I=_&&_.totalVideoFrames?_.totalVideoFrames:0,g=v-e[u];e[u]=v;let D=I-t[u];t[u]=I;const N=n[u];N[c]?(N[c].droppedVideoFrames+=g,N[c].totalVideoFrames+=D):N[c]={droppedVideoFrames:g,totalVideoFrames:D}},reset:function(){n={},e={},t={}}}}se.__dashjs_factory_name="DroppedFramesHistory";var Oe=L.default.getClassFactory(se);function rt(){const n=this.context,e=(0,p.default)(n).getInstance(),t=(0,h.default)(n).getInstance();let u,c,_,v,I,g,D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R;function S(){u={},z={},x=new Map,A&&A.reset(),Z&&Z.reset(),D=void 0,A=void 0,Z=void 0,clearTimeout(c),c=null}function b(q,oe=!0){let Ue=J(q,oe);return Ue=(function(Ge){try{return(function(Ve){try{if(!W.get().streaming.cmsd.enabled||!W.get().streaming.cmsd.abr.applyMb)return Ve;const je=Ve.filter((lt=>{const Rt=lt.mediaInfo.type;let Dt=g.getMaxBitrate(Rt);if(Rt!==r.default.VIDEO||Dt<0)return!0;const an=lt.mediaInfo.streamInfo.id;return Dt-=z[an][r.default.AUDIO].getRepresentation().bitrateInKbit||0,lt.bitrateInKbit<=Dt}));return je.length>0?je:Ve}catch(je){return F.error(je),Ve}})(Ge=(function(Ve){try{if(!W.get().streaming.abr.limitBitrateByPortal)return Ve;const je=1e3*W.get().streaming.abr.limitBitrateByPortalMinimum||0,{elementWidth:lt}=R.getVideoElementSize(),Rt=Ve.filter((Dt=>Dt.mediaInfo.type!==r.default.VIDEO||Dt.width<=lt||Dt.bandwidth<=je));return Rt.length>0?Rt:Ve}catch(je){return F.error(je),Ve}})(Ge=(function(Ve){try{const je=Ve.filter((lt=>{const Rt=lt.mediaInfo.type,Dt=lt.bitrateInKbit,an=B.getAbrBitrateParameter("maxBitrate",Rt),vn=B.getAbrBitrateParameter("minBitrate",Rt);return!(an>-1&&Dt>an||vn>-1&&Dt<vn)}));return je.length>0?je:Ve}catch(je){return F.error(je),Ve}})(Ge)))}catch(Ve){return F.error(Ve),Ge}})(Ue),Ue}function J(q,oe){let Ue=[];return q&&((function(Ve){try{const je=[];if(Ve&&je.push(Ve),!W.get().streaming.abr.enableSupplementalPropertyAdaptationSetSwitching||!Ve.adaptationSetSwitchingCompatibleIds||Ve.adaptationSetSwitchingCompatibleIds.length===0)return je;const lt=z[Ve.streamInfo.id][Ve.type].getAllMediaInfos().filter((Rt=>
12Ve.adaptationSetSwitchingCompatibleIds.includes(Rt.id)));return je.concat(lt)}catch{return[Ve]}})(q).forEach((Ve=>{let je=v.getVoRepresentations(Ve);je&&je.length>0&&(Ue=Ue.concat(je))})),Ue=(function(Ve){return Ve.forEach((je=>{if(je.dependentRepresentation&&je.dependentRepresentation.mediaInfo===null){let lt=je.dependentRepresentation.id,Rt=Ve.find((Dt=>Dt.id===lt));Rt&&(je.dependentRepresentation=Rt)}})),Ve})(Ue),Ue=(function(Ve){return Ve=(function(je){let lt=null;return je.filter((Rt=>(lt||(lt=Rt.mediaInfo),!isNaN(Rt.qualityRanking)&&v.areMediaInfosEqual(lt,Rt.mediaInfo)))).length===je.length})(Ve)?(function(je){return je.sort(((lt,Rt)=>Rt.qualityRanking-lt.qualityRanking)),je})(Ve):(function(je){return je.sort(((lt,Rt)=>v.areMediaInfosEqual(lt.mediaInfo,Rt.mediaInfo)?(function(Dt,an){if(!isNaN(Dt.pixelsPerSecond)&&!isNaN(an.pixelsPerSecond)&&Dt.pixelsPerSecond!==an.pixelsPerSecond)return Dt.pixelsPerSecond-an.pixelsPerSecond;const vn=Dt.bandwidth-an.bandwidth;return vn!==0?vn:O(Dt,an)})(lt,Rt):(function(Dt,an){if(!isNaN(Dt.pixelsPerSecond)&&!isNaN(an.pixelsPerSecond)&&Dt.pixelsPerSecond!==an.pixelsPerSecond)return Dt.pixelsPerSecond-an.pixelsPerSecond;if(!isNaN(Dt.bitsPerPixel)&&!isNaN(an.bitsPerPixel)&&Dt.bitsPerPixel!==an.bitsPerPixel)return an.bitsPerPixel-Dt.bitsPerPixel;const vn=Dt.bandwidth-an.bandwidth;return vn!==0?vn:O(Dt,an)})(lt,Rt))),je})(Ve)})(Ue),Ue.forEach(((Ve,je)=>{Ve.absoluteIndex=je})),Ue=Ue.filter((Ve=>{const je=!!oe||v.areMediaInfosEqual(Ve.mediaInfo,q),lt=!Ve||!Ve.mediaInfo||I.areKeyIdsUsable(Ve.mediaInfo);return je&<}))),Ue}function O(q,oe){const Ue=q.isBootstrapRepresentation();return Ue!==oe.isBootstrapRepresentation()?Ue?-1:1:oe.k-q.k}function ee(q){const oe=q.request.mediaType,Ue=q.streamId;if(!(oe&&Ue&&z[Ue]&&W.get().streaming.abr.autoSwitchBitrate[oe]))return;const Ge=z[Ue][oe];if(!Ge)return;var Ve;if(!(!((Ve=Ge.getLastSegment())&&Ve.isPartialSegment&&!isNaN(Ve.totalNumberOfPartialSegments)&&!isNaN(Ve.replacementSubNumber))||Ve.replacementSubNumber===0))return;const je=ie(Ge,q.request),lt=_.shouldAbandonFragment(je);lt&<.representation!==d.default.NO_CHANGE&&(function(Rt,Dt,an,vn,qn){if(vn.getFragmentModel().getRequests({state:Le.FRAGMENT_MODEL_LOADING,index:Rt.request.index})[0]){const Yn=(function(Wn,xn){return u[Wn]&&u[Wn][xn]?u[Wn][xn]:null})(Dt,an);Yn&&(Yn.state=o.ABANDON_LOAD),Z.reset(),re(an,K.getActiveStreamInfo(),qn.representation,qn.reason),clearTimeout(c),c=setTimeout((()=>{Yn&&(u[Dt][an].state=o.ALLOW_LOAD),c=null}),W.get().streaming.abandonLoadTimeout)}})(q,Ue,oe,Ge,lt)}function $(){if(W.get().streaming.abr.limitBitrateByPortal)for(const q in z)for(const oe in z[q])we(oe,q)}function ie(q,oe){return l(n).create({abrController:U,adapter:v,currentRequest:oe,droppedFramesHistory:A,streamProcessor:q,switchRequestHistory:Z,throughputController:M,videoModel:R})}function be(q){q.mediaType===r.default.VIDEO&&(le(q.streamId),D=q.newRepresentation.id)}function Ce(q){!te()||q.metric!==o.BUFFER_LEVEL||q.mediaType!==r.default.AUDIO&&q.mediaType!==r.default.VIDEO||(function(oe,Ue){try{const Ge=B.getBufferTimeDefault(),Ve=Ge,je=.5*Ge,lt=_.getBolaState(oe),Rt=Ue>=(lt?je:Ve);_.setBolaState(oe,Rt),Rt!==lt&&(Rt?F.info("["+oe+"] switching from throughput to buffer occupancy ABR rule (buffer: "+Ue.toFixed(3)+")."):F.info("["+oe+"] switching from buffer occupancy to throughput ABR rule (buffer: "+Ue.toFixed(3)+")."))}catch(Ge){F.error(Ge)}})(q.mediaType,.001*q.value.level)}function we(q,oe){try{if(!(q&&z&&z[oe]&&z[oe][q]))return!1;le(oe);const Ue=z[oe][q],Ge=Ue.getLastSegment(),Ve=Ue.getRepresentationController()?.getCurrentCompositeRepresentation(),je=ce(Ge,Ve);if(!W.get().streaming.abr.autoSwitchBitrate[q]||!je)return!1;const lt=ie(Ue),Rt=_.getBestPossibleSwitchRequest(lt);if(!Rt||!Rt.representation)return!1;let Dt=Rt.representation;return(function(an,vn){Z.push({currentRepresentation:an,newRepresentation:vn})})(Ve,Dt),Dt.id!==Ve.id&&(u[oe][q].state===o.ALLOW_LOAD||Dt.absoluteIndex<Ve.absoluteIndex)&&(ye(q,Ve,Dt,Rt.reason),!0)}catch(Ue){return F.error(Ue),!1}}function ce(q,oe){return!(q&&q.isPartialSegment&&!isNaN(q.totalNumberOfPartialSegments)&&!isNaN(q.replacementSubNumber))||q.replacementSubNumber===q.totalNumberOfPartialSegments-1||(function(Ue,Ge){if(!Ge||!Ge.segmentSequenceProperties||Ge.segmentSequenceProperties.length<=0||Ge&&Ge.mediaInfo&&Ge.mediaInfo.adaptationSetSwitchingCompatibleIds&&Ge.mediaInfo.adaptationSetSwitchingCompatibleIds.length>0)return!1;const Ve=Ge.segmentSequenceProperties.filter((lt=>!isNaN(lt.sapType)&<.sapType<=1));if(Ve.length===0)return!1;let je=(Ue.replacementSubNumber+1)%Ue.totalNumberOfPartialSegments;return Ve.some((lt=>je%lt.cadence==0))})(q,oe)}function le(q){if(A){const oe=R.getPlaybackQuality();oe&&A.push(q,D,oe)}}function re(q,oe,Ue,Ge={}){if(!(oe&&oe.id&&q&&z&&z[oe.id]&&z[oe.id][q]&&Ue))return!1;const Ve=z[oe.id][q],je=Ve.getRepresentationController()?.getCurrentCompositeRepresentation();return(!je||Ue.id!==je.id)&&ye(q,je,Ue,Ge)}function me(q,oe){return`${q}-${oe}`}function ye(q,oe,Ue,Ge){const Ve=Ue.mediaInfo.streamInfo.id;if(!q||!z[Ve]||!z[Ve][q])return!1;const je=z[Ve][q].getStreamInfo(),lt=E.getCurrentBufferLevel(q),Rt=oe!==null&&!v.areMediaInfosEqual(oe.mediaInfo,Ue.mediaInfo),Dt=oe?oe.bitrateInKbit:0;return F.info(`[AbrController]: Switching quality in period ${Ve} for media type ${q}. Switch from bitrate ${Dt} to bitrate ${Ue.bitrateInKbit}. Current buffer level: ${lt}. Reason:`+(Ge?JSON.stringify(Ge):"/")),t.trigger(H.default.QUALITY_CHANGE_REQUESTED,{isAdaptationSetSwitch:Rt,mediaType:q,newRepresentation:Ue,oldRepresentation:oe,reason:Ge,streamInfo:je},{streamId:je.id,mediaType:q}),(function(an){const vn=M.getAverageThroughput(an);isNaN(vn)||f.setSavedBitrateSettings(an,vn)})(q),!0}function te(){return W.get().streaming.abr.rules.bolaRule.active&&W.get().streaming.abr.rules.throughputRule.active}return U={canPerformQualitySwitch:ce,checkPlaybackQuality:we,clearDataForStream:function(q){A&&A.clearForStream(q),z[q]&&delete z[q],Z&&Z.clearForStream(q),u[q]&&delete u[q],_.clearDataForStream(q)},getAbandonmentStateFor:function(q,oe){return u[q]&&u[q][oe]?u[q][oe].state:null},getInitialBitrateFor:function(q){if(q===r.default.TEXT)return NaN;let oe=B.getAbrBitrateParameter("initialBitrate",q);if(oe>0)return oe;let Ue=NaN;if(f&&f.hasOwnProperty("getSavedBitrateSettings")&&(Ue=f.getSavedBitrateSettings(q)),!isNaN(Ue))return Ue;const Ge=M.getAverageThroughput(q);return!isNaN(Ge)&&Ge>0?Ge:q===r.default.VIDEO?1e3:100},getOptimalRepresentationForBitrate:function(q,oe,Ue=!0){const Ge=b(q,Ue);
12if(!Ge||Ge.length===0)return null;const Ve=Ge.reduce(((lt,Rt)=>lt.bandwidth<Rt.bandwidth?lt:Rt));if(oe<=0)return Ve;const je=Ge.filter((lt=>lt.bitrateInKbit<=oe));return je&&je.length!==0?je.reduce(((lt,Rt)=>Rt.absoluteIndex>lt.absoluteIndex?Rt:lt)):Ve},getPossibleVoRepresentations:function(q,oe=!0){return J(q,oe)},getPossibleVoRepresentationsFilteredBySettings:b,getRepresentationByAbsoluteIndex:function(q,oe,Ue=!0){return isNaN(q)||q<0?null:b(oe,Ue).find((Ge=>Ge.absoluteIndex===q))},handleNewMediaInfo:function(q){_.handleNewMediaInfo(q)},handlePendingManualQualitySwitch:function(q,oe){try{const Ue=me(q,oe);let Ge=null;if(x.has(Ue)&&(Ge=x.get(Ue)),!Ge)return!1;const Ve=z[q][oe],je=Ve.getLastSegment();if(!ce(je,Ve.getRepresentation()))return!1;const{type:lt,streamInfo:Rt,representation:Dt,reason:an}=Ge;return x.delete(Ue),re(lt,Rt,Dt,an),!0}catch(Ue){F.error(`Can not handle pending manual quality switch: ${Ue}`)}},initialize:function(){A=Oe(n).create(),Z=ne(n).create(),_=Y(n).create({dashMetrics:E,customParametersModel:N,mediaPlayerModel:B,settings:W}),_.initialize(),t.on(H.default.QUALITY_CHANGE_RENDERED,be,U),t.on(H.default.METRIC_ADDED,Ce,U),t.on(m.default.LOADING_PROGRESS,ee,U),t.on(m.default.VIDEO_ELEMENT_RESIZED,$,U)},isPlayingAtLowestQuality:function(q){return b(q.mediaInfo,!0)[0].id===q.id},isPlayingAtTopQuality:function(q){if(!q)return!0;const oe=b(q.mediaInfo,!0);return oe[oe.length-1].id===q.id},manuallySetPlaybackQuality:function(q,oe,Ue,Ge={}){const Ve=z[oe.id][q];if(ce(Ve.getLastSegment(),Ve.getRepresentation()))return re(q,oe,Ue,Ge);(function(je,lt,Rt,Dt){try{F.debug(`[AbrController] Queuing manual quality switch for stream ${lt.id} and type ${je} to representation ${Rt.id}`);const an=me(lt.id,je);x.set(an,{type:je,streamInfo:lt,representation:Rt,reason:Dt})}catch(an){F.error(`Can not queue manual quality switch: ${an}`)}})(q,oe,Ue,Ge)},registerStreamType:function(q,oe){const Ue=oe.getStreamInfo().id;z[Ue]||(z[Ue]={}),z[Ue][q]=oe,u[Ue]||(u[Ue]={}),u[Ue][q]={},u[Ue][q].state=o.ALLOW_LOAD,_.getBolaState(q)===void 0&&_.setBolaState(q,W.get().streaming.abr.rules.bolaRule.active&&!te())},reset:function(){S(),t.off(H.default.QUALITY_CHANGE_RENDERED,be,U),t.off(H.default.METRIC_ADDED,Ce,U),t.off(m.default.LOADING_PROGRESS,ee,U),t.off(m.default.VIDEO_ELEMENT_RESIZED,$,U),_&&_.reset()},setConfig:function(q){q&&(q.streamController&&(K=q.streamController),q.throughputController&&(M=q.throughputController),q.domStorage&&(f=q.domStorage),q.mediaPlayerModel&&(B=q.mediaPlayerModel),q.customParametersModel&&(N=q.customParametersModel),q.cmsdModel&&(g=q.cmsdModel),q.dashMetrics&&(E=q.dashMetrics),q.adapter&&(v=q.adapter),q.videoModel&&(R=q.videoModel),q.settings&&(W=q.settings),q.capabilities&&(I=q.capabilities))},setPlaybackQuality:re,unRegisterStreamType:function(q,oe){try{z[q]&&z[q][oe]&&delete z[q][oe],u[q]&&u[q][oe]&&delete u[q][oe]}catch{}}},F=e.getLogger(U),S(),U}rt.__dashjs_factory_name="AbrController";const ae=L.default.getSingletonFactory(rt);L.default.updateSingletonFactory(rt.__dashjs_factory_name,ae);var ze,qe,V,he,tt,it=ae,yt=function(n){for(var e=[],t=0;t<n.length;++t){var u=n.charCodeAt(t);u<128?e.push(u):u<2048?(e.push(192|u>>6),e.push(128|63&u)):u<65536?(e.push(224|u>>12),e.push(128|63&u>>6),e.push(128|63&u)):(e.push(240|u>>18),e.push(128|63&u>>12),e.push(128|63&u>>6),e.push(128|63&u))}return e},Ze=function(n){for(var e=[],t=0;t<n.length;){var u=n[t++];u<128||(u<224?(u=(31&u)<<6,u|=63&n[t++]):u<240?(u=(15&u)<<12,u|=(63&n[t++])<<6,u|=63&n[t++]):(u=(7&u)<<18,u|=(63&n[t++])<<12,u|=(63&n[t++])<<6,u|=63&n[t++])),e.push(String.fromCharCode(u))}return e.join("")},ht={};ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qe=function(n){for(var e=0,t=[],u=0|n.length/3;0<u--;){var c=(n[e]<<16)+(n[e+1]<<8)+n[e+2];e+=3,t.push(ze.charAt(63&c>>18)),t.push(ze.charAt(63&c>>12)),t.push(ze.charAt(63&c>>6)),t.push(ze.charAt(63&c))}return n.length-e==2?(c=(n[e]<<16)+(n[e+1]<<8),t.push(ze.charAt(63&c>>18)),t.push(ze.charAt(63&c>>12)),t.push(ze.charAt(63&c>>6)),t.push("=")):n.length-e==1&&(c=n[e]<<16,t.push(ze.charAt(63&c>>18)),t.push(ze.charAt(63&c>>12)),t.push("==")),t.join("")},V=(function(){for(var n=[],e=0;e<64;++e)n[ze.charCodeAt(e)]=e;return n[61]=0,n})(),he=function(n){for(var e=0,t=[],u=0|n.length/4;0<u--;
12){var c=(V[n.charCodeAt(e)]<<18)+(V[n.charCodeAt(e+1)]<<12)+(V[n.charCodeAt(e+2)]<<6)+V[n.charCodeAt(e+3)];t.push(255&c>>16),t.push(255&c>>8),t.push(255&c),e+=4}return t&&(n.charAt(e-2)=="="?(t.pop(),t.pop()):n.charAt(e-1)=="="&&t.pop()),t},tt={encode:function(n){for(var e=[],t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e},decode:function(n){for(var e=0;e<s.length;++e)a[e]=String.fromCharCode(a[e]);return a.join("")}},ht.decodeArray=function(n){var e=he(n);return new Uint8Array(e)},ht.encodeASCII=function(n){var e=tt.encode(n);return qe(e)},ht.decodeASCII=function(n){var e=he(n);return tt.decode(e)},ht.encode=function(n){var e=yt(n);return qe(e)},ht.decode=function(n){var e=he(n);return Ze(e)},typeof exports<"u"&&(exports.decode=ht.decode,exports.decodeArray=ht.decodeArray,exports.encode=ht.encode,exports.encodeASCII=ht.encodeASCII);var fn=ht,Nn=P(7393);const Vt=NaN;class En{constructor(e,t){this.data={baseUrls:e||null,selectedIdx:t||Vt},this.children=[]}}function un(){let n,e,t,u;const c=this.context,_=(0,Nn.default)(c).getInstance();function v(N,E,f){const A=I(f);N[E]?_.areEqual(A,N[E].data.baseUrls)||(N[E].data.baseUrls=A,N[E].data.selectedIdx=Vt):N[E]=new En(A)}function I(N){let E=t.getBaseURLsFromElement(N);const f=u.getSynthesizedBaseUrlElements(E);return f&&f.length>0&&f.forEach((A=>{const U=E.findIndex((F=>F.serviceLocation===A.serviceLocation));U!==-1?E[U]=A:E.push(A)})),E}function g(N,E){const f=E||e;N(f.data),f.children&&f.children.forEach((A=>g(N,A)))}function D(){e=new En}return n={reset:D,update:function(N){(function(E){(function(){if(!t||!t.hasOwnProperty("getBaseURLsFromElement")||!t.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")})();const f=I(E);_.areEqual(f,e.data.baseUrls)||(e.data.baseUrls=f,e.data.selectedIdx=Vt),E&&E.Period&&E.Period.forEach(((A,U)=>{v(e.children,U,A),A.AdaptationSet&&A.AdaptationSet.forEach(((F,B)=>{v(e.children[U].children,B,F),F.Representation&&F.Representation.sort(t.getRepresentationSortFunction()).forEach(((x,W)=>{v(e.children[U].children[B].children,W,x)}))}))}))})(N)},getForPath:function(N){let E=e;const f=[E.data];
12return N&&N.forEach((A=>{E=E.children[A],E&&f.push(E.data)})),f.filter((A=>A.baseUrls.length))},invalidateSelectedIndexes:function(N){g((E=>{isNaN(E.selectedIdx)||N===E.baseUrls[E.selectedIdx].serviceLocation&&(E.selectedIdx=Vt)}))},setConfig:function(N){N.adapter&&(t=N.adapter),N.contentSteeringController&&(u=N.contentSteeringController)},getBaseUrls:function(N){return I(N)}},D(),n}un.__dashjs_factory_name="BaseURLTreeModel";var nr=L.default.getClassFactory(un),wn=P(893),Bt=P(3773),Ot=class{constructor(n){this.url=n||null,this.type=ke.HTTPRequest.CONTENT_STEERING_TYPE,this.responseType="json"}},St=class{constructor(){this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]}},de=P(8854),Ht=P(6503),Wt=P(9415),Jt=P(6517),tn=P(7263);function Ft(){const n=this.context,e=(0,Ht.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E,f,A,U,F,B,x;function W($){Z($,"baseUrl")}function K($){Z($,"location")}function z($){var ie,be;$&&$.throughputValues&&$.throughputValues.serviceLocation&&(ie=$.throughputValues.serviceLocation,be=$.throughputValues,F[ie]||(F[ie]=[]),F[ie].push(be),F[ie].length>4&&F[ie].shift())}function Z($,ie){if($&&$.request&&$.request.serviceLocation){const be=$.request.serviceLocation;A[ie].all.indexOf(be)===-1&&A[ie].all.push(be),A[ie].current=be}}function M(){const $=D.getValue();let ie=t.getContentSteering($);return ie||(ie=f.getServiceDescriptionSettings().contentSteering),!ie&&u&&(ie=u),u=ie,ie}function R(){return new Promise(($=>{try{const ie=M();if(!ie||!ie.serverUrl)return void $();const be=(function(we){let ce=we.serverUrl;c&&c.reloadUri&&(ce=e.isRelative(c.reloadUri)?e.resolve(c.reloadUri,we.serverUrl):c.reloadUri);const le=[],re=A.baseUrl.all.concat(A.location.all);if(re.length>0){const me=re.map((q=>{const oe=(function(Ue){if(!Ue||!F[Ue]||F[Ue].length===0)return-1;const Ge=U.getArithmeticMean(F[Ue],F[Ue].length,!0);return parseInt(1e3*Ge)})(q);return{serviceLocation:q,throughput:oe}}));let ye="",te="";me.forEach(((q,oe)=>{oe!==0&&(ye+=",",te+=","),ye+=q.serviceLocation,te+=q.throughput>-1?q.throughput:""})),le.push({key:"_DASH_pathway",value:`"${ye}"`}),le.push({key:"_DASH_throughput",value:te})}return ce=tn.default.addAdditionalQueryParameterToUrl(ce,le),ce})(ie),Ce=new Ot(be);B.load({request:Ce,success:we=>{(function(ce){ce&&ce[de.default.CONTENT_STEERING_RESPONSE.VERSION]&&parseInt(ce[de.default.CONTENT_STEERING_RESPONSE.VERSION])===1&&(c=new St,c.version=ce[de.default.CONTENT_STEERING_RESPONSE.VERSION],ce[de.default.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(ce[de.default.CONTENT_STEERING_RESPONSE.TTL])&&(c.ttl=ce[de.default.CONTENT_STEERING_RESPONSE.TTL]),ce[de.default.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(c.reloadUri=ce[de.default.CONTENT_STEERING_RESPONSE.RELOAD_URI]),ce[de.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(c.pathwayPriority=ce[de.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),ce[de.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(c.pathwayClones=ce[de.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],c.pathwayClones=c.pathwayClones.filter((le=>(function(re){return re[de.default.CONTENT_STEERING_RESPONSE.BASE_ID]&&re[de.default.CONTENT_STEERING_RESPONSE.ID]&&re[de.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&re[de.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][de.default.CONTENT_STEERING_RESPONSE.HOST]})(le)))),J())})(we),I.trigger(H.default.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:c,url:be}),$()},error:(we,ce,le,re)=>{(function(me,ye){try{switch(g.warn("Error fetching data from content steering server",me),ye.status){case 404:case 410:u=null;break;case 429:const te=ye&&ye.headers&&ye.headers["retry-after"];te!==null&&(c||(c={}),c.ttl=parseInt(te)),J();break;default:J()}}catch(te){g.error(te)}})(we,re),$(we)},complete:()=>{A.baseUrl.all=S(A.baseUrl),A.location.all=S(A.location)}})}catch(ie){$(ie)}}))}function S($){return $.all&&$.all.length!==0&&$.current?$.all.filter((ie=>ie===$.current)):[]}function b($){try{const ie=[];return $&&$.length!==0&&c&&c.pathwayClones&&c.pathwayClones.length!==0&&c.pathwayClones.forEac
12h((be=>{let Ce=$.filter((ce=>be[de.default.CONTENT_STEERING_RESPONSE.BASE_ID]===ce.serviceLocation)),we=null;if(Ce&&Ce.length>0&&(we=Ce[0]),we){const ce=new URL(we.url);let le=be[de.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][de.default.CONTENT_STEERING_RESPONSE.HOST];le=tn.default.stringHasProtocol(le)?le:`${ce.protocol}//${le}`;const re={synthesizedUrl:`${le}${ce.pathname}`,serviceLocation:be[de.default.CONTENT_STEERING_RESPONSE.ID],queryParams:be[de.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][de.default.CONTENT_STEERING_RESPONSE.PARAMS],reference:we};ie.push(re)}})),ie}catch(ie){return g.error(ie),[]}}function J(){c&&c.ttl&&!isNaN(c.ttl)&&(E&&clearTimeout(E),E=setTimeout((()=>{R()}),1e3*c.ttl))}function O(){E&&clearTimeout(E),E=null}function ee(){c=null,u=null,F={},A={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},O()}return x={reset:function(){ee(),I.off(H.default.FRAGMENT_LOADING_STARTED,W,x),I.off(H.default.MANIFEST_LOADING_STARTED,K,x),I.off(H.default.THROUGHPUT_MEASUREMENT_STORED,z,x)},setConfig:function($){$&&($.adapter&&(t=$.adapter),$.errHandler&&(v=$.errHandler),$.dashMetrics&&(_=$.dashMetrics),$.mediaPlayerModel&&(N=$.mediaPlayerModel),$.manifestModel&&(D=$.manifestModel),$.serviceDescriptionController&&(f=$.serviceDescriptionController),$.throughputController&&(U=$.throughputController),$.eventBus&&(I=$.eventBus))},loadSteeringData:R,getCurrentSteeringResponseData:function(){return c},shouldQueryBeforeStart:function(){const $=M();return!!$&&$.queryBeforeStart},getSteeringDataFromManifest:M,stopSteeringRequestTimer:O,getSynthesizedBaseUrlElements:function($){try{return b($).map((ie=>{const be=new Wt.default(ie.synthesizedUrl,ie.serviceLocation);return be.queryParams=ie.queryParams,be.dvbPriority=ie.reference.dvbPriority,be.dvbWeight=ie.reference.dvbWeight,be.availabilityTimeOffset=ie.reference.availabilityTimeOffset,be.availabilityTimeComplete=ie.reference.availabilityTimeComplete,be}))}catch(ie){return g.error(ie),[]}},getSynthesizedLocationElements:function($){try{return b($).map((ie=>{const be=new Jt.default(ie.synthesizedUrl,ie.serviceLocation);return be.queryParams=ie.queryParams,be}))}catch(ie){return g.error(ie),[]}},initialize:function(){B=(0,Bt.default)(n).create({errHandler:v,dashMetrics:_,mediaPlayerModel:N,errors:wn.default}),I.on(H.default.FRAGMENT_LOADING_STARTED,W,x),I.on(H.default.MANIFEST_LOADING_STARTED,K,x),I.on(H.default.THROUGHPUT_MEASUREMENT_STORED,z,x)}},g=(0,p.default)(n).getInstance().getLogger(x),ee(),x}Ft.__dashjs_factory_name="ContentSteeringController";var ft=L.default.getSingletonFactory(Ft);function Qt(n){let e;n=n||{};let t=[];const u=(0,h.default)(this.context).getInstance(),c=(0,T.default)(this.context).getInstance(),_=ft(this.context).getInstance(),v=n.updateEventName,I=n.addBlacklistEventName;function g(E){if(t.findIndex((A=>A.entry===E))!==-1)return;const f=n.enableExpiry?(function(){const A=_?_.getCurrentSteeringResponseData():null;return A&&Number.isFinite(A.ttl)?A.ttl:c.get().streaming.blacklistExpiryTime})():NaN;if(n.enableExpiry&&f&&f>0){const A=setTimeout((()=>{D(E)}),1e3*f);t.push({entry:E,timeoutId:A})}else t.push({entry:E});u.trigger(v,{entry:E})}function D(E){const f=t.findIndex((A=>A.entry===E));f!==-1&&t.splice(f,1)}function N(E){g(E.entry)}return e={add:g,remove:D,contains:function(E){return!!(t.length&&E&&E.length)&&t.findIndex((f=>f.entry===E))!==-1},reset:function(){I&&u.off(I,N,e);for(const E of t)E.timeoutId&&clearTimeout(E.timeoutId);t=[]}},I&&u.on(I,N,e),e}Qt.__dashjs_factory_name="BlackListController";var Fn=L.default.getClassFactory(Qt);function bn(n){let e;const t=(n=n||{}).blacklistController;return e={select:function(u){return u&&(function(c){let _,v,I=0,g=[],D=0;if(v=c.sort((function(N,E){let f=N.dvbPriority-E.dvbPriority;return isNaN(f)?0:f})).filter((function(N,E,f){return!E||f[0].dvbPriority&&N.dvbPriority&&f[0].dvbPriority===N.dvbPriority})),v.length)return v.length>1&&(v.forEach((N=>{I+=N.dvbWeight,g.push(I)})),_=Math.floor(Math.random()*I),g.every(((N,E)=>(D=E,!(_<N))))),v[D]})((function(c){let _=[];return c.filter((function(v){return!t.contains(v.serviceLocation)||(v.dvbPriority&&_.push(v.dvbPriority),!1)})).filter((function(v){return!_.length||!v.dvbPriority||_.indexOf(v.dvbPriority)===-1}))})(u))}},e}bn.__dashjs_factory_name="DVBSelector";var Zt=L.default.getClassFactory(bn);function pn(n){let e;const t=(n=n||{}).blacklistController;return e={select:function(u){let c,_=0;return u&&u.some(((v,I)=>(_=I,!t.contains(v.serviceLocation))))&&(c=u[_]),c}},e}pn.__dashjs_factory_name="BasicSelector";var Pn=L.default.getClassFactory(pn),on=P(1944),Tn=P(656);function dn(){const n=this.context;let e,t,u;function c(_=[],v=[]){let I=0,g=NaN;for(;I<_.length;){const D=_[I],N=v.findIndex((E=>E.serviceLocation&&E.serviceLocation===D));if(N!==-1&&!u.contains(v[N].serviceLocation)){g=N;break}I+=1}return g}return e={selectBaseUrlIndex:function(_){let v=NaN;if(isNaN(_.selectedIdx)){const g=t.getSteeringDataFromManifest();g&&g.defaultServiceLocationArray.length>
120&&(v=c(g.defaultServiceLocationArray,_.baseUrls))}const I=t.getCurrentSteeringResponseData();return _.baseUrls&&_.baseUrls.length&&I&&I.pathwayPriority&&I.pathwayPriority.length&&(v=c(I.pathwayPriority,_.baseUrls)),v},setConfig:function(_){_.blacklistController&&(u=_.blacklistController),_.contentSteeringController&&(t=_.contentSteeringController)}},t=ft(n).getInstance(),e}dn.__dashjs_factory_name="ContentSteeringSelector";var At=L.default.getClassFactory(dn);function dt(){const n=this.context,e=(0,h.default)(n).getInstance(),t=(0,T.default)(n).getInstance();let u,c,_,v,I,g;function D(){c.reset()}return u={chooseSelector:function(N){(0,Tn.checkParameterType)(N,"boolean"),g=N?v:_},select:function(N){if(!N)return;if(t.get().streaming.applyContentSteering){const f=I.selectBaseUrlIndex(N);isNaN(f)||f===-1||(N.selectedIdx=f)}if(!isNaN(N.selectedIdx))return N.baseUrls[N.selectedIdx];let E=g.select(N.baseUrls);return E?(N.selectedIdx=N.baseUrls.indexOf(E),E):(e.trigger(m.default.URL_RESOLUTION_FAILED,{error:new on.default(wn.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,wn.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(g===_&&D()))},reset:D,setConfig:function(N){N.selector&&(g=N.selector),N.contentSteeringSelector&&(I=N.contentSteeringSelector)}},c=Fn(n).create({updateEventName:m.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:m.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,enableExpiry:!0}),_=Pn(n).create({blacklistController:c}),v=Zt(n).create({blacklistController:c}),I=At(n).create(),I.setConfig({blacklistController:c,addBlacklistEventName:m.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),g=_,u}dt.__dashjs_factory_name="BaseURLSelector";var jt=L.default.getClassFactory(dt);function zt(){let n,e;const t=this.context,u=(0,h.default)(t).getInstance(),c=(0,Ht.default)(t).getInstance();let _,v,I;function g(N){_.update(N),v.chooseSelector(e.getIsDVB(N)),u.trigger(H.default.BASE_URLS_UPDATED,{baseUrls:D(N)})}function D(N){return _.getBaseUrls(N)}return n={reset:function(){_.reset(),v.reset()},initialize:function(N){_.setConfig({adapter:e,contentSteeringController:I}),g(N)},resolve:function(N){const E=_.getForPath(N).reduce(((f,A)=>{const U=v.select(A);return U?(c.isRelative(U.url)?f.url=c.resolve(U.url,f.url):(f.url=U.url,f.serviceLocation=U.serviceLocation),f.availabilityTimeOffset=U.availabilityTimeOffset,f.availabilityTimeComplete=U.availabilityTimeComplete,f.queryParams=U.queryParams,f):new Wt.default}),new Wt.default);if(!c.isRelative(E.url))return E},setConfig:function(N){N.baseURLTreeModel&&(_=N.baseURLTreeModel),N.baseURLSelector&&(v=N.baseURLSelector),N.adapter&&(e=N.adapter),N.contentSteeringController&&(I=N.contentSteeringController)},getBaseUrls:D,update:g},_=nr(t).create(),v=jt(t).create(),u.on(m.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(N){_.invalidateSelectedIndexes(N.entry)}),n),n}zt.__dashjs_factory_name="BaseURLController";var Rn=L.default.getClassFactory(zt);class In{constructor(e){if(this.offset=e._offset,this.type=e.type,this.size=e.size,this.boxes=[],e.boxes)for(let t=0;t<e.boxes.length;t++)this.boxes.push(new In(e.boxes[t]));switch(this.isComplete=!0,e.type){case"sidx":if(this.timescale=e.timescale,this.earliest_presentation_time=e.earliest_presentation_time,this.first_offset=e.first_offset,this.references=e.references,e.references){this.references=[];for(let t=0;t<e.references.length;t++){let u={reference_type:e.references[t].reference_type,referenced_size:e.references[t].referenced_size,subsegment_duration:e.references[t].subsegment_duration};this.references.push(u)}}break;case"emsg":this.id=e.id,this.version=e.version===1?1:0,this.value=e.value,this.timescale=e.timescale,this.scheme_id_uri=e.scheme_id_uri,this.presentation_time_delta=e.version===1?e.presentation_time:e.presentation_time_delta,this.event_duration=e.event_duration,this.message_data=e.message_data;break;case"mdhd":this.timescale=e.timescale;break;case"mfhd":this.sequence_number=e.sequence_number;break;case"subs":this.entry_count=e.entry_count,this.entries=e.entries;break;case"tfhd":this.base_data_offset=e.base_data_offset,this.sample_description_index=e.sample_description_index,this.default_sample_duration=e.default_sample_duration,this.default_sample_size=e.default_sample_size,this.default_sample_flags=e.default_sample_flags,this.flags=e.flags;break;case"tfdt":this.version=e.version,this.baseMediaDecodeTime=e.baseMediaDecodeTime,this.flags=e.flags;break;case"trun":if(this.sample_count=e.sample_count,this.first_sample_flags=e.first_sample_flags,this.data_offset=e.data_offset,this.flags=e.flags,this.samples=e.samples,e.samples){this.samples=[];
12for(let t=0,u=e.samples.length;t<u;t++){let c={sample_size:e.samples[t].sample_size,sample_duration:e.samples[t].sample_duration,sample_composition_time_offset:e.samples[t].sample_composition_time_offset};this.samples.push(c)}}break;case"prft":this.version=e.version,this.reference_track_ID=e.reference_track_ID,this.ntp_timestamp_sec=e.ntp_timestamp_sec,this.ntp_timestamp_frac=e.ntp_timestamp_frac,this.media_time=e.media_time,this.flags=e.flags}}getChildBox(e){for(let t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}getChildBoxes(e){let t=[];for(let u=0;u<this.boxes.length;u++)this.boxes[u].type===e&&t.push(this.boxes[u]);return t}}var jn=In;function Jn(){let n,e;function t(c){let _=[];if(!c||!e||typeof e.fetchAll!="function")return _;let v,I=e.fetchAll(c);for(let g=0,D=I.length;g<D;g++)v=u(I[g]),v&&_.push(v);return _}function u(c){if(!c)return null;let _=new jn(c);return c.hasOwnProperty("_incomplete")&&(_.isComplete=!c._incomplete),_}return n={getBox:function(c){return c&&e&&e.boxes&&e.boxes.length!==0&&typeof e.fetch=="function"?u(e.fetch(c)):null},getBoxes:t,setData:function(c){e=c},getLastBox:function(){if(!e||!e.boxes||!e.boxes.length)return null;let c=t(e.boxes[e.boxes.length-1].type);return c.length>0?c[c.length-1]:null}},n}Jn.__dashjs_factory_name="IsoFile";var Qn=L.default.getClassFactory(Jn),Vn=P(6877),er=class{constructor({found:n,sizeOfLastCompletedBox:e,sizeOfLastFoundTargetBox:t,startOffsetOfLastCompletedBox:u,startOffsetOfLastFoundTargetBox:c,typeOfLastCompletedBox:_,typeOfLastTargetBox:v}){this.found=n!==void 0&&n,this.sizeOfLastCompletedBox=e!==void 0?e:0,this.sizeOfLastFoundTargetBox=t!==void 0?t:0,this.startOffsetOfLastCompletedBox=u!==void 0?u:0,this.startOffsetOfLastFoundTargetBox=c!==void 0?c:0,this.typeOfLastCompletedBox=_!==void 0?_:null,this.typeOfLastTargetBox=v!==void 0?v:null}};function Zn(){let n,e,t=this.context;function u(v){if(!v)return null;v.fileStart===void 0&&(v.fileStart=0);let I=Vn.parseBuffer(v),g=Qn(t).create();return g.setData(I),g}function c(v,I){return v[I+3]>>>0|v[I+2]<<8>>>0|v[I+1]<<16>>>0|v[I]<<24>>>0}function _(v,I){return String.fromCharCode(v[I++])+String.fromCharCode(v[I++])+String.fromCharCode(v[I++])+String.fromCharCode(v[I])}return e={findInitRange:function(v){let I,g,D=null;const N=u(v);if(!N)return D;const E=N.getBox("ftyp"),f=N.getBox("moov");return n.debug("Searching for initialization."),f&&f.isComplete&&(I=E?E.offset:f.offset,g=f.offset+f.size-1,D=I+"-"+g,n.debug("Found the initialization. Range: "+D)),D},findLastTopIsoBoxCompleted:function(v,I,g){if(g===void 0&&(g=0),!I||g+8>=I.byteLength)return new er({found:!1});const D=I instanceof ArrayBuffer?new Uint8Array(I):I;let N,E=0,f=0,A=null;for(;g<D.byteLength;){const U=c(D,g),F=_(D,g+4);if(U===0)break;g+U<=D.byteLength&&(v.indexOf(F)>=0?N=new er({found:!0,startOffsetOfLastFoundTargetBox:g,sizeOfLastFoundTargetBox:U,typeOfLastTargetBox:F}):(E=g,f=U,A=F)),g+=U}return N||new er({found:!1,startOffsetOfLastCompletedBox:E,sizeOfLastCompletedBox:f,typeOfLastCompletedBox:A})},getMediaTimescaleFromMoov:function(v){let I=u(v),g=I?I.getBox("mdhd"):void 0;return g?g.timescale:NaN},getSamplesInfo:function(v){if(!v||v.byteLength===0)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};let I,g,D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R,S=u(v),b=S.getBoxes("moof"),J=S.getBoxes("mfhd");M=S.getBoxes("moof").length,Z=J[J.length-1].sequence_number,D=0,f=[];let O=-1,ee=-1;for(x=0;x<b.length;x++){let $=b[x],ie=$.getChildBoxes("traf");for(F=0;F<ie.length;F++){let be=ie[F],Ce=be.getChildBox("tfhd"),we=be.getChildBox("tfdt");E=we.baseMediaDecodeTime;let ce=be.getChildBoxes("trun"),le=be.getChildBoxes("subs");for(B=0;B<ce.length;B++){let re=ce[B];for(D=re.sample_count,z=(Ce.base_data_offset||0)+(re.data_offset||0),U=0;U<D;U++){A=re.samples[U],I=A.sample_duration!==void 0?A.sample_duration:Ce.default_sample_duration,N=A.sample_size!==void 0?A.sample_size:Ce.default_sample_size,g=A.sample_composition_time_offset!==void 0?A.sample_composition_time_offset:0;let me={dts:E,cts:E+g,duration:I,offset:$.offset+z,size:N,subSizes:[N]};if(le)for(W=0;W<le.length;W++){let ye=le[W];if(O<ye.entry_count-1&&U>ee&&(O++,ee+=ye.entries[O].sample_delta),U==ee){me.subSizes=[];let te=ye.entries[O];for(K=0;K<te.subsample_count;K++)me.subSizes.push(te.subsamples[K].subsample_size)}}f.push(me),z+=N,E+=I}}R=E-we.baseMediaDecodeTime}}return{sampleList:f,lastSequenceNumber:Z,totalDuration:R,numSequences:M}},parse:u},n=(0,p.default)(t).getInstance().getLogger(e),e}Zn.__dashjs_factory_name="BoxParser";var ar=L.default.getSingletonFactory(Zn),dr=P(559);const Xn={0:void 0,1:{channels:1,lfe:0},2:{channels:2,lfe:0},3:{channels:3,lfe:0},4:{channels:4,lfe:0},5:{channels:5,lfe:0},6:{channels:5,lfe:1},7:{channels:7,lfe:1},8:{channels:2,lfe:0},9:{channels:3,lfe:0},10:{channels:4,lfe:0},11:{channels:6,lfe:1},12:{channels:7,lfe:1},13:{channels:22,lfe:2},14:{channels:7,lfe:1},15:{channels:10,lfe:2},16:{channels:9,lfe:1},17:{channels:11,lfe:1},18:{channels:13,lfe:1},19:{channels:11,lfe:1},20:{channels:13,lfe:1}};function gr(n){return n==0?0:n.toString(2).match(/1/g).length}function hr(n,e){let t,u=parseInt("0x"+n,16),c=u&e[0],_=u&e[1];return t=gr(c)+2*gr(_),t}var Br=function(n,e=!1){let t;if(!n||!n.schemeIdUri||!n.value)return;const u=n.schemeIdUri,c=n.value;
12return u==="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"||u==="urn:mpeg:mpegB:cicp:ChannelConfiguration"?t=Xn[c]&&Xn[c].channels+(e?Xn[c].lfe:0):u==="tag:dolby.com,2014:dash:audio_channel_configuration:2011"?t=(function(_,v){if(_.length===4)return hr(_,[63880+(v?6:0),1648])})(c,e):u==="tag:dolby.com,2015:dash:audio_channel_configuration:2015"?t=(function(_,v){if(_.length===6)return _==="800000"?24:hr(_,[56834+(v?4160:0),205245])})(c,e):u==="tag:dts.com,2014:dash:audio_channel_configuration:2012"?t=parseInt(c):u==="tag:dts.com,2018:uhd:audio_channel_configuration"&&(t=(function(_,v){if(!(_.length>8))return hr(_,[4294901727+(v?65568:0),0])})(c,e)),t};function Or(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g;function D(x,W,K,z=void 0){const Z=E(x,W,K,z);return c.isCodecSupportedBasedOnTestedConfigurations(Z,x)}function N(x,W,K,z,Z,M=void 0){const R=E(x,W,K,M),S=JSON.stringify(R);z.has(S)||(z.add(S),Z.push(R))}function E(x,W,K,z){let Z=null;switch(x){case r.default.VIDEO:Z=(function(M,R,S){let b={codec:R,width:M&&M.width||null,height:M&&M.height||null,framerate:u.getFramerate(M)||null,bitrate:M&&M.bandwidth||null,isSupported:!0};if(M.tagName===de.default.PRESELECTION&&S&&(b.width||(b.width=S.width||null),b.height||(b.height=S.height||null),b.bitrate||(b.bitrate=S.bandwidth||null),b.framerate||(b.framerate=u.getFramerate(S)||null)),_.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(Object.assign(b,A(M)),M.tagName===de.default.PRESELECTION&&S)){let ee=A(S),$=ee.isSupported;delete ee.isSupported,b.isSupported=b.isSupported&&$,f(b,ee)}let J=b.isSupported;if(_.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(Object.assign(b,U(M)),M.tagName===de.default.PRESELECTION&&S)){let ee=U(S),$=ee.isSupported;delete ee.isSupported,b.isSupported=b.isSupported&&$,f(b,ee)}let O=b.isSupported;return J&&O||(b.isSupported=!1),b})(W,K,z);break;case r.default.AUDIO:Z=(function(M,R,S){let b={codec:R,samplerate:M&&M.audioSamplingRate||null,bitrate:M&&M.bandwidth||null,isSupported:!0};return M.tagName===de.default.PRESELECTION&&S&&(b.samplerate||(b.samplerate=S.audioSamplingRate||null),b.bitrate||(b.bitrate=S.bandwidth||null)),_.get().streaming.capabilities.filterAudioChannelConfiguration&&Object.assign(b,(function(J,O){let ee=J[de.default.AUDIO_CHANNEL_CONFIGURATION]||[],$=null;ee.length==0&&O&&(ee=O[de.default.AUDIO_CHANNEL_CONFIGURATION]||[]);const ie=ee.map((be=>Br(be,!0)));return ie.every((be=>be==ie[0]))&&($=ie[0]),{channels:$}})(M,S)),b})(W,K,z);break;default:return Z}return z&&(Z=F(z,Z)),F(W,Z)}function f(x,W){for(const K in W)Object.prototype.hasOwnProperty.call(W,K)&&!(K in x)&&(x[K]=W[K]);return x}function A(x){let W={colorGamut:null,transferFunction:null,isSupported:!0};for(const K of x.EssentialProperty||[])K.schemeIdUri===r.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["1","5","6","7"].includes(K.value.toString())?W.colorGamut=r.default.MEDIA_CAPABILITIES_API.COLORGAMUT.SRGB:K.schemeIdUri===r.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["11","12"].includes(K.value.toString())?W.colorGamut=r.default.MEDIA_CAPABILITIES_API.COLORGAMUT.P3:K.schemeIdUri===r.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["9"].includes(K.value.toString())?W.colorGamut=r.default.MEDIA_CAPABILITIES_API.COLORGAMUT.REC2020:K.schemeIdUri===r.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["2"].includes(K.value.toString())?W.colorGamut=null:K.schemeIdUri===r.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&(W.isSupported=!1),K.schemeIdUri===r.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["1","6","13","14","15"].includes(K.value.toString())?W.transferFunction=r.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.SRGB:K.schemeIdUri===r.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["16"].includes(K.value.toString())?W.transferFunction=r.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.PQ:K.schemeIdUri===r.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["18"].includes(K.value.toString())?W.transferFunction=r.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.HLG:K.schemeIdUri===r.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["2"].includes(K.value.toString())?W.transferFunction=null:K.schemeIdUri===r.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&(W.isSupported=!1);return W}function U(x){let W={isSupported:!0,hdrMetadataType:null};for(const K of x.EssentialProperty||[])K.schemeIdUri===r.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&K.value===r.default.HDR_METADATA_FORMAT_VALUES.ST2094_10?W.hdrMetadataType=r.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_10:K.schemeIdUri===r.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&K.value===r.default.HDR_METADATA_FORMAT_VALUES.SL_HDR2?W.hdrMetadataType=r.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SLHDR2:K.schemeIdUri===r.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&K.value===r.default.HDR_METADATA_FORMAT_VALUES.ST2094_40?W.hdrMetadataType=r.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_40:K.schemeIdUri===r.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&(W.isSupported=!1);return W}function F(x,W){return I&&x&&x[de.default.CONTENT_PROTECTION]&&x[de.default.CONTENT_PROTECTION].length>0&&(W.keySystemsMetadata=I.getSupportedKeySystemMetadataFromContentProtection(x[de.default.CONTENT_PROTECTION])),W}function B(x){if(!x||x.length===0)return!0;let W=0;for(;W<x.length;){if(!c.supportsEssentialProperty(x[W]))return g.debug("[Stream] EssentialProperty not supported: "+x[W].schemeIdUri),!1;W+=1}return!0}return t={setConfig:function(x){x&&(x.adapter&&(u=x.adapter),x.capabilities&&(c=x.capabilities),x.settings&&(_=x.settings),x.protectionController&&(I=x.protectionController),x.customParametersModel&&(v=x.customParametersModel))},filterUnsupportedFeatures:function(x){return new Promise((W=>{const K=[r.default.VIDEO,r.default.AUDIO],z=[];
12K.forEach((Z=>{(function(R,S){if(!R||!R.Period||R.Period.length===0)return[];const b=new Set,J=[];return R.Period.forEach((O=>{O.AdaptationSet.forEach((ee=>{u.getIsTypeOf(ee,S)&&ee.Representation.forEach((($,ie)=>{const be=u.getCodec(ee,ie,!1);N(S,$,be,b,J);const Ce=u.getSupplementalCodecs($);Ce.length>0&&N(S,$,Ce[0],b,J)}))})),O.Preselection&&O.Preselection.length&&O.Preselection.forEach((ee=>{if(u.getPreselectionIsTypeOf(ee,O.AdaptationSet,S)){const $=u.getCodecForPreselection(ee,O.AdaptationSet),ie=u.getCommonRepresentationForPreselection(ee,O.AdaptationSet);N(S,ee,$,b,J,ie)}}))})),J})(x,Z).forEach((R=>{z.push(c.runCodecSupportCheck(R,Z))}))})),Promise.allSettled(z).then((()=>(K.forEach((Z=>{(function(M,R){R&&R.Period&&R.Period.length!==0&&R.Period.forEach((S=>{(function(b,J){b&&b.AdaptationSet&&b.AdaptationSet.length!==0&&(b.AdaptationSet=b.AdaptationSet.filter((O=>{u.getIsTypeOf(O,J)&&(function($,ie){$.Representation&&$.Representation.length!==0&&($.Representation=$.Representation.filter(((be,Ce)=>{const we=u.getCodec($,Ce,!1),ce=D(ie,be,we);let le=(function(re,me){let ye=!1;const te=u.getSupplementalCodecs(re);return te.length>0&&(te.length>1&&g.warn("[CapabilitiesFilter] Multiple supplemental codecs not supported; using the first in list"),ye=D(me,re,te[0])),ye})(be,ie);return le&&(g.debug(`[CapabilitiesFilter] Codec supported. Upgrading codecs string of Representation with ID ${be.id}`),be.codecs=be[de.default.SUPPLEMENTAL_CODECS]),ce||le||g.warn(`[CapabilitiesFilter] Codec ${we} not supported. Removing Representation with ID ${be.id}`),ce||le})))})(O,J);const ee=O.Representation&&O.Representation.length>0;return ee||(e.trigger(m.default.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:O}),g.warn(`[CapabilitiesFilter] AdaptationSet with ID ${O.id?O.id:"undefined"} and codec ${O.codecs?O.codecs:"undefined"} has been removed because of no supported Representation`)),ee})))})(S,M),(function(b,J){b&&b.Preselection&&b.Preselection.length!==0&&(b.Preselection=b.Preselection.filter((O=>{if(u.getPreselectionIsTypeOf(O,b.AdaptationSet,J)){const ee=u.getCodecForPreselection(O,b.AdaptationSet);let $=!0;if(ee){let ie=u.getCommonRepresentationForPreselection(O,b.AdaptationSet);$=D(J,O,ee,ie)}return $||g.warn(`[CapabilitiesFilter] Preselection@codecs ${ee} not supported. Removing Preselection with ID ${O.id}`),$}return!0})))})(S,M)}))})(Z,x)})),_.get().streaming.capabilities.filterUnsupportedEssentialProperties&&(function(Z){Z&&Z.Period&&Z.Period.length!==0&&Z.Period.forEach((M=>{M.AdaptationSet=M.AdaptationSet.filter((R=>{if(!R.Representation||R.Representation.length===0)return!0;if(!B(u.getEssentialProperties(R)))return g.warn(`[CapabilitiesFilter] removed AdaptationSet (id: ${R.id}) with unsupported EssentialProperty`),!1;R.Representation=R.Representation.filter((b=>B(u.getEssentialProperties(b))));const S=R.Representation&&R.Representation.length>0;return S||g.warn(`[CapabilitiesFilter] removed AdaptationSet (id: ${R.id}) with unsupported EssentialProperty on all Representations`),S})),M.Preselection&&M.Preselection.length&&(M.Preselection=M.Preselection.filter((R=>!!B(u.getEssentialProperties(R))||(g.warn(`[CapabilitiesFilter] removed Preselection (id: ${R.id}) with unsupported EssentialProperty`),!1))))}))})(x),(function(Z){Z&&Z.Period&&Z.Period.length!==0&&Z.Period.forEach((M=>{M.Preselection&&(M.Preselection=M.Preselection.filter((R=>{const S=String(R.preselectionComponents).split(" ").length;return S!==1&&g.warn(`Multi-Representation Preselection (id: ${R.id}) removed as not supported.`),S===1})))}))})(x),(function(Z){Z&&Z.Period&&Z.Period.length!==0&&Z.Period.forEach((M=>{M.Preselection&&(M.Preselection=M.Preselection.filter((R=>{const S=String(R.preselectionComponents).split(" "),b=M.AdaptationSet.map((J=>J.id));return S.every((J=>b.includes(J)))})))}))})(x),(function(Z){if(!Z||!Z.Period||Z.Period.length===0)return Promise.resolve();const M=[];return Z.Period.forEach((R=>{M.push((function(S){return new Promise((b=>{if(!S||!S.AdaptationSet||S.AdaptationSet.length===0)return void b();const J=[];S.AdaptationSet.forEach((O=>{J.push((function(ee){return new Promise(($=>{if(!ee.Representation||ee.Representation.length===0)return void $();const ie=[];ee.Representation.forEach((be=>{ie.push((function(Ce){const we=[],ce=v.getCustomCapabilitiesFilters();return ce&&ce.length!==0?ce.forEach((le=>{we.push(new Promise((re=>re(le(Ce)))))}
12)):we.push(Promise.resolve(!0)),Promise.all(we)})(be))})),Promise.all(ie).then((be=>{ee.Representation=ee.Representation.filter(((Ce,we)=>{let ce=be[we].every((le=>le));return ce||g.debug("[Stream] Representation "+Ce.id+" has been removed because of unsupported CustomFilter"),ce})),$()})).catch((be=>{g.warn("[Stream] at least one promise rejected in CustomFilter with error: ",be),$()}))}))})(O))})),Promise.all(J).then((()=>{S.AdaptationSet=S.AdaptationSet.filter((O=>O.Representation&&O.Representation.length>0)),b()})).catch((()=>{b()}))}))})(R))})),Promise.all(M)})(x)))).then((()=>{W()})).catch((Z=>{g.error(Z),W()}))}))}},g=(0,p.default)(n).getInstance().getLogger(t),t}Or.__dashjs_factory_name="CapabilitiesFilter";var qr=L.default.getSingletonFactory(Or),Qr=P(1234);function pr(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E;function f(){u=!1;const M=tn.default.parseUserAgent();c=M&&M.browser&&M.browser.name&&M.browser.name.toLowerCase()==="safari"}function A(){u=!1}function U(M){if(M.streamId!==I.getActiveStreamInfo().id||!N)return;const R=g.getLiveDelay();g.getBufferLevel()>R/2&&(N=!1)}function F(M){M.streamId===I.getActiveStreamInfo().id&&(N=M.state===o.BUFFER_EMPTY)}function B(){D.getCatchupModeEnabled()||_.setPlaybackRate(1)}function x(){g.getIsDynamic()&&D.getCatchupModeEnabled()&&(D.getCatchupPlaybackRates().max>0||D.getCatchupPlaybackRates().min<0)&&!g.isPaused()&&!g.isSeeking()&&(function(){try{if(g.getTime()<=0||u||N&&_.getPlaybackRate()===0)return!1;const M=z();return M===r.default.LIVE_CATCHUP_MODE_LOLP?(function(R,S){try{return Math.abs(W())>0||R<S}catch{return!1}})(g.getBufferLevel(),v.get().streaming.liveCatchup.playbackBufferMin):M===r.default.LIVE_CATCHUP_MODE_STEP?(function(){try{const R=D.getCatchupStepSettings(),S=K();if(S<-1*R.start.min||S>R.start.max)return E.debug(`[_stepNeedToCatchUp] latency offset ${S}`),!0;if(g.getPlaybackRate()!==1)return!0}catch{return!1}})():(function(){try{return Math.abs(W())>0}catch{return!1}})()}catch{return!1}})()&&(function(){if(!u&&_){let M;const R=_.getPlaybackRate(),S=D.getCatchupPlaybackRates(),b=g.getBufferLevel(),J=W(),O=K(),ee=v.get().streaming.liveCatchup.liveThreshold,$=D.getCatchupMaxDrift();if(!isNaN($)&&$>0&&J>$)E.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),u=!0,g.seekToCurrentLive(!0,!1);else if(!isNaN(ee)&&ee>0&&O>ee)R>1&&(E.info("[CatchupController]: Past live threshold, setting playback rate to 1.0"),_.setPlaybackRate(1));else{const ie=g.getCurrentLiveLatency(),be=g.getLiveDelay();M=z()===r.default.LIVE_CATCHUP_MODE_LOLP?(function(we,ce,le,re,me){let ye;if(me<re){const te=Math.abs(we.min),q=5*(me-re);ye=1-te+2*te/(1+Math.pow(Math.E,-q)),E.debug("[LoL+ playback control_buffer-based] bufferLevel: "+me+", newRate: "+ye)}else{if(Math.abs(ce-le)<=.02*le)ye=1;else{const q=ce-le,oe=q<0?Math.abs(we.min):we.max,Ue=5*q;ye=1-oe+2*oe/(1+Math.pow(Math.E,-Ue))}E.debug("[LoL+ playback control_latency-based] latency: "+ce+", newRate: "+ye)}return ye})(S,ie,be,v.get().streaming.liveCatchup.playbackBufferMin,b):z()===r.default.LIVE_CATCHUP_MODE_STEP?(function(we,ce,le){let re=1;const me=D.getCatchupStepSettings();if(!N){const ye=K();ye>me.stop.max&&ye>0?re=1+we.max:ye<-1*me.stop.min&&ye<0&&(re=1+we.min),(ye>-1*me.stop.min&&ye<0||ye<me.stop.max&&ye>0||ye===0)&&(re=1),g.getPlaybackStalled()&&le<=ce/2&&ye>0&&(re=1)}return E.debug(`[_calculateNewPlaybackRateStep] rate should be ${re}`),re})(S,be,b):(function(we,ce,le,re){if(N)return 1;const me=ce-le,ye=me<0?Math.abs(we.min):we.max,te=5*me;let q=1-ye+2*ye/(1+Math.pow(Math.E,-te));return g.getPlaybackStalled()&&re<=le/2&&me>0&&(q=1),q})(S,ie,be,b);const Ce=c?.25:.02/(.5/S.max);(M&&Math.abs(R-M)>=Ce||M==1)&&(E.debug(`[CatchupController]: Setting playback rate to ${M}`),_.setPlaybackRate(M))}}})()}function W(){return g.getCurrentLiveLatency()-g.getLiveDelay()}function K(){return g.getCurrentLiveLatency()-g.getOriginalLiveDelay()}function z(){const M=v.get().streaming.liveCatchup.playbackBufferMin;let R=r.default.LIVE_CATCHUP_MODE_DEFAULT;return v.get().streaming.liveCatchup.mode===r.default.LIVE_CATCHUP_MODE_STEP?R=r.default.LIVE_CATCHUP_MODE_STEP:v.get().streaming.liveCatchup.mode!==r.default.LIVE_CATCHUP_MODE_LOLP||M===null||isNaN(M)||(R=r.default.LIVE_CATCHUP_MODE_LOLP),R}function Z(){D.getCatchupPlaybackRates(!0)}return t={reset:function(){e.off(H.default.BUFFER_LEVEL_UPDATED,U,t),e.off(H.default.BUFFER_LEVEL_STATE_CHANGED,F,t),e.off(H.default.PLAYBACK_PROGRESS,x,t),e.off(H.default.PLAYBACK_TIME_UPDATED,x,t),e.off(H.default.PLAYBACK_SEEKED,A,t),e.off(m.default.SETTING_UPDATED_CATCHUP_ENABLED,B,t),e.off(m.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,Z,t),e.off(m.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,Z,t),e.off(H.default.STREAM_INITIALIZED,Z,t),f(),_.setPlaybackRate(1,!0)},setConfig:function(M){M&&(M.settings&&(v=M.settings),M.videoModel&&(_=M.videoModel),M.streamController&&(I=M.streamController),M.playbackController&&(g=M.playbackController),M.mediaPlayerModel&&(D=M.mediaPlayerModel))},initialize:function(){e.on(H.default.BUFFER_LEVEL_UPDATED,U,t),e.on(H.default.BUFFER_LEVEL_STATE_CHANGED,F,t),e.on(H.default.PLAYBACK_PROGRESS,x,t),e.on(H.default.PLAYBACK_TIME_UPDATED,x,t),e.on(H.default.PLAYBACK_SEEKED,A,t),e.on(m.default.SETTING_UPDATED_CATCHUP_ENABLED,B,t),e.on(m.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,Z,t),e.on(m.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,Z,t),e.on(H.default.STREAM_INITIALIZED,Z,t),Z()}},E=(0,p.default)(n).getInstance().getLogger(t),f(),t}pr.__dashjs_factory_name="CatchupController";var Xr=L.default.getSingletonFactory(pr);function Dr(){let n,e;return n={setConfig:function(t){t&&t.serviceDescriptionController&&(e=t.serviceDescriptionController)},isAdaptationsIncluded:function(t){const{adaptationSetsArray:u}=e?.getServiceDescriptionSettings()?.clientDataReporting??{};return!u||u?.length===0||u.includes(t)},isServiceLocationIncluded:function(t,u){if(t===ke.HTTPRequest.CONTENT_STEERING_TYPE)return!0;const{serviceLocationsArray:c}=e?.getServiceDescriptionSettings()?.clientDataReporting??{};return!c||c?.length===0||c.includes(u)}},n}Dr.__dashjs_factory_name="ClientDataReportingController";var Kr=L.default.getSingletonFactory(Dr),Zr=P(6066),vr=P(1926);const Mr=[{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"}],kr="dashjs_?_bitrate",Ct="dashjs_?_settings",en="localStorage",_n="lastBitrate",Re="lastMediaSettings";function ut(n){n=n||{};const e=this.context,t=n.settings;let u,c,_;function v(N){if(_!==void 0)return _;let E;_=!1;try{typeof window<"u"&&(E=window[N])}catch(f){return c.warn("DOMStorage access denied: "+f.message),_}if(!E||N!==en)return _;try{E.setItem("1","1"),E.removeItem("1"),_=!0}catch(f){c.warn("DOMStorage is supported, but cannot be used: "+f.message)}return _}function I(){return Math.round(new Date().getTime()/6e5)*6e5}function g(N,E){return v(N)&&t.get().streaming[E+"CachingInfo"].enabled}function D(){if(!t)throw new Error(r.default.MISSING_CONFIG_ERROR)}return u={getSavedBitrateSettings:function(N){if(D(),!t.get().streaming.lastBitrateCachingInfo.enabled)return NaN;let E=NaN;
12if(g(en,_n)){const f=kr.replace(/\?/,N);try{const A=JSON.parse(localStorage.getItem(f))||{},U=new Date().getTime()-parseInt(A.timestamp,10)>=t.get().streaming.lastBitrateCachingInfo.ttl||!1,F=parseFloat(A.bitrate);isNaN(F)||U?U&&localStorage.removeItem(f):(E=F,c.debug("Last saved bitrate for "+N+" was "+F))}catch{return null}}return E},setSavedBitrateSettings:function(N,E){if(g(en,_n)&&E){const f=kr.replace(/\?/,N);try{localStorage.setItem(f,JSON.stringify({bitrate:E.toFixed(3),timestamp:I()}))}catch(A){c.error(A.message)}}},getSavedMediaSettings:function(N){if(D(),!t.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;let E=null;if(g(en,Re)){const f=Ct.replace(/\?/,N);try{const A=JSON.parse(localStorage.getItem(f))||{},U=new Date().getTime()-parseInt(A.timestamp,10)>=t.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;E=A.settings,U&&(localStorage.removeItem(f),E=null)}catch{return null}}return E},setSavedMediaSettings:function(N,E){if(g(en,Re)){const f=Ct.replace(/\?/,N);try{localStorage.setItem(f,JSON.stringify({settings:E,timestamp:I()}))}catch(A){c.error(A.message)}}}},c=(0,p.default)(e).getInstance().getLogger(u),v(en)&&Mr.forEach((N=>{const E=localStorage.getItem(N.oldKey);if(E){localStorage.removeItem(N.oldKey);try{localStorage.setItem(N.newKey,E)}catch(f){c.error(f.message)}}})),u}ut.__dashjs_factory_name="DOMStorage";var Tt=L.default.getSingletonFactory(ut);function It(){const n=this.context,e=(0,T.default)(n).getInstance();let t={},u=[];return{save:function(c){const _=c.streamId,v=c.representation.id;t[_]=t[_]||{};const I=!t[_][v];t[_][v]=c,I&&(u.push({streamId:_,representationId:v}),(function(){const g=e.get().streaming.cacheInitSegmentsLimit;for(;u.length>g;){const D=u.shift();t[D.streamId]&&t[D.streamId][D.representationId]&&(delete t[D.streamId][D.representationId],Object.keys(t[D.streamId]).length===0&&delete t[D.streamId])}})())},extract:function(c,_){return t&&t[c]&&t[c][_]?t[c][_]:null},reset:function(){t={},u=[]},getStats:function(){const c=Object.keys(t).length;let _=0;for(const v in t)_+=Object.keys(t[v]).length;return{entryCount:_,streamCount:c,maxSize:e.get().streaming.cacheInitSegmentsLimit,accessOrderLength:u.length}}}}It.__dashjs_factory_name="InitCache";var ct=L.default.getSingletonFactory(It),wt=class{constructor(){this.accessibility=null,this.adaptationSetSwitchingCompatibleIds=[],this.audioChannelConfiguration=null,this.bitrateList=null,this.co
12dec=null,this.contentProtection=null,this.essentialProperties=[],this.id=null,this.index=null,this.isEmbedded=null,this.isFragmented=null,this.isPreselection=!1,this.isText=!1,this.labels=null,this.lang=null,this.mimeType=null,this.normalizedKeyIds=new Set,this.representationCount=0,this.roles=null,this.segmentAlignment=!1,this.segmentSequenceProperties=[],this.selectionPriority=1,this.streamInfo=null,this.subSegmentAlignment=!1,this.supplementalProperties=[],this.type=null,this.viewpoint=null}},cn=class{constructor(){this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isEncrypted=!1}},mn=class{constructor(){this.availableFrom=null,this.duration=NaN,this.dvrWindowSize=NaN,this.isDynamic=!1,this.loadedTime=null,this.maxFragmentDuration=null,this.minBufferTime=NaN,this.protocol=null,this.serviceDescriptions=[]}},Hn=P(1465),Gn=P(9302),sr=class{constructor(n){this.valid=n[0]=="/",this.path=n.split("/").filter((e=>e.length!==0)).map((e=>{let t={name:e},u=e.indexOf("[");if(u!=-1){t.name=e.substring(0,u);let c=e.substring(u+1,e.length-1);this.valid=this.valid&&c.indexOf("[")==-1;let _=c.indexOf("=");_!=-1?(t.attribute={name:c.substring(1,_),value:c.substring(_+1)},["'",'"'].indexOf(t.attribute.value[0])!=-1&&(t.attribute.value=t.attribute.value.substring(1,t.attribute.value.length-1))):t.position=parseInt(c,10)-1}return t}))}isValid(){return this.valid}findsElement(){return!this.findsAttribute()}findsAttribute(){return this.path[this.path.length-1].name.startsWith("@")}findsTextReplace(){return this.path[this.path.length-1].name==="text()"}getMpdTarget(n,e){let t=null,u=n,c=1,_="MPD";for(;c<this.path.length&&u!==null;){t=u;let v=this.path[c];if(_=v.name,c!==this.path.length-1||!_.startsWith("@")&&_!=="text()"){let I=t[_]||[];if(I.length===0&&t[_]&&I.push(t[_]),v.position)u=I[v.position]||null;else if(v.attribute){let g=v.attribute;u=I.filter((D=>D[g.name]==g.value))[0]||null}else u=Array.isArray(I)?I[0]:I}c++}return u===null?null:_.startsWith("@")?{name:_.substring(1),leaf:u,target:u}:_==="text()"?{name:"__text",leaf:u,target:u}:{name:_,leaf:u,target:e?t:u}}},$n=class{constructor(n,e,t){this.action=n,this.xpath=e,this.value=t,this.position=null}getMpdTarget(n){let e=this.action==="remove"||this.action==="replace"||this.position==="before"||this.position==="after";return this.xpath.getMpdTarget(n,e)}};function rr(){let n,e;const t=this.context;return n={getIsPatch:function(u){return u&&u.hasOwnProperty(de.default.ORIGINAL_MPD_ID)||!1},getMpdId:function(u){return u&&u[de.default.ORIGINAL_MPD_ID]||null},getOriginalPublishTime:function(u){return u&&u.hasOwnProperty(de.default.ORIGINAL_PUBLISH_TIME)?new Date(u[de.default.ORIGINAL_PUBLISH_TIME]):null},getPatchOperations:function(u){return u?(u.__children||[]).map((c=>{const _=c.tagName;if(_!=="add"&&_!=="remove"&&_!=="replace")return e.warn(`Ignoring node of invalid action: ${_}`),null;let v=c.sel;if(_==="add"&&c.type){if(!c.type.startsWith("@"))return e.warn(`Ignoring add action for prefixed namespace declaration: ${c.type}=${c.__text}`),null;v=`${v}/${c.type}`}let I=new sr(v);if(!I.isValid())return e.warn(`Ignoring action with invalid selector: ${_} - ${v}`),null;let g=null;I.findsAttribute()||I.findsTextReplace()?g=c.__text||"":_!=="remove"&&(g=c.__children.reduce(((N,E)=>{let f=E.tagName;return f!=="#text"&&(N[f]=N[f]||[],N[f].push(E)),N}),{}));let D=new $n(_,I,g);return _==="add"&&(D.position=c.pos),D})).filter((c=>!!c)):[]},getPublishTime:function(u){return u&&u.hasOwnProperty(de.default.PUBLISH_TIME)?new Date(u[de.default.PUBLISH_TIME]):null}},e=(0,p.default)(t).getInstance().getLogger(n),n}rr.__dashjs_factory_name="PatchManifestModel";var ur=L.default.getSingletonFactory(rr),or=P(5876);const lr
vendor: 1,875 bytes, line 12
12=Object.create(null,Object.getOwnPropertyDescriptors({aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"}));
12function Jr(n){if(!n||typeof n!="string")return n;const e=n.split("-");e[0]=e[0].toLowerCase(),e[0]=lr[e[0]]||e[0];for(let t=1;t<e.length;t++)e[t].length===4?e[t]=e[t].charAt(0).toUpperCase()+e[t].slice(1).toLowerCase():e[t].length===2&&/^[a-zA-Z]+$/.test(e[t])&&(e[t]=e[t].toUpperCase());return e.join("-")}var Lr=P(9259);function _i(n,e){return e+10<=n.length&&n[e]===73&&n[e+1]===68&&n[e+2]===51&&n[e+3]<255&&n[e+4]<255&&n[e+6]<128&&n[e+7]<128&&n[e+8]<128&&n[e+9]<128}function ci(n,e){let t=0;return t=(127&n[e])<<21,t|=(127&n[e+1])<<14,t|=(127&n[e+2])<<7,t|=127&n[e+3],t}function yi(n,e){return e+10<=n.length&&n[e]===51&&n[e+1]===68&&n[e+2]===73&&n[e+3]<255&&n[e+4]<255&&n[e+6]<128&&n[e+7]<128&&n[e+8]<128&&n[e+9]<128}function li(n,e=0,t=1/0){return(function(u,c,_,v){const I=(g=u,(0,Lr.isArrayBufferLike)(g)?g:g.buffer);var g;let D=1;"BYTES_PER_ELEMENT"in v&&(D=v.BYTES_PER_ELEMENT);const N=(U=u)&&(0,Lr.isArrayBufferLike)(U.buffer)&&U.byteLength!==void 0&&U.byteOffset!==void 0?u.byteOffset:0,E=(N+u.byteLength)/D,f=(N+c)/D,A=Math.floor(Math.max(0,Math.min(f,E)));var U;return new v(I,A,Math.floor(Math.min(A+Math.max(_,0),E))-A)})(n,e,t,Uint8Array)}function Tr(n,e=!1){const t=e?n.indexOf(0):n.length,u=(0,Lr.decodeText)(new DataView(n.buffer,n.byteOffset,t),{encoding:Lr.UTF_8});return e?u:u.replace(/\0/g,"")}function Si(n){return n.type==="PRIV"?(function(e){if(e.size<2)return;const t=Tr(e.data,!0),u=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:u.buffer}})(n):n.type[0]==="W"?(function(e){if(e.type==="WXXX"){if(e.size<2)return;let u=1;const c=Tr(e.data.subarray(u),!0);u+=c.length+1;const _=Tr(e.data.subarray(u));return{key:e.type,info:c,data:_}}const t=Tr(e.data);return{key:e.type,info:"",data:t}})(n):n.type==="APIC"?(function(e){const t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.size<2)return;if(e.data[0]!==3)return void console.log("Ignore frame with unrecognized character encoding");const u=e.data.subarray(1).indexOf(0);if(u===-1)return;const c=Tr(li(e.data,1,u)),_=e.data[2+u],v=e.data.subarray(3+u).indexOf(0);if(v===-1)return;const I=Tr(li(e.data,3+u,v));let g;var D;return c==="-->"?g=Tr(li(e.data,4+u+v)):(D=e.data.subarray(4+u+v),g=(0,Lr.isArrayBufferLike)(D)?D:D.byteOffset==0&&D.byteLength==D.buffer.byteLength?D.buffer:new Uint8Array(D).buffer),t.mimeType=c,t.pictureType=_,t.description=I,t.data=g,t})(n):(function(e){if(e.size<2)return;if(e.type==="TXXX"){let u=1;const{data:c}=e,_=Tr(c.subarray(u),!0);u+=_.length+1;const v=Tr(c.subarray(u));return{key:e.type,info:_,data:v}}const t=Tr(e.data.subarray(1));return{key:e.type,info:"",data:t}})(n)}function fi(n){const e=String.fromCharCode(n[0],n[1],n[2],n[3]),t=ci(n,4);return{type:e,size:t,data:n.subarray(10,10+t)}}const ei=10,ir=10;function Gr(){let n,e,t,u,c,_,v;const I=this.context;function g(R,S){const b=S?S.index:0,J=e.getAdaptationsForType(c[b].mpd.manifest,b,R);if(!J||J.length===0)return null;if(J.length>1&&S){for(let ee=0,$=J.length;ee<$;ee++)if(O=J[ee],e.getRolesForAdaptation(O).filter((function(ie){return ie.schemeIdUri===r.default.DASH_ROLE_SCHEME_ID&&ie.value===de.default.MAIN}))[0])return J[ee]}var O;return J[0]}function D(R,S,b,J,O,ee){let $,ie,be,Ce,we,ce,le=[];if(!J||J.length===0)return[];const re=e.getAdaptationsForPeriod(S);for(Ce=0,ce=J.length;Ce<ce;Ce++)if($=J[Ce],be=e.getIndexForAdaptation($,R,b.index),ie=B(re[be]),ie)if(ee){let me=ie.accessibility.length;for(we=0;we<me;we++){if(!ie)continue;let ye=ie.accessibility[we];if(ye.schemeIdUri===_.ACCESSIBILITY_CEA608_SCHEME)if(ye.value&&ye.value!==""){let te=ye.value.split(";");if(te[0].substring(0,2)==="CC")for(we=0;we<te.length;we++)ie||(ie=B.call(this,re[be])),W(ie,te[we].substring(0,3),te[we].substring(4)),le.push(ie),ie=null;else for(we=0;we<te.length;we++)ie||(ie=B.call(this,re[be])),W(ie,"CC"+(we+1),te[we]),le.push(ie),ie=null}else W(ie,_.CC1,"eng"),le.push(ie),ie=null}}else O===_.IMAGE?(ie.type=_.IMAGE,le.push(ie),ie=null):ie&&le.push(ie);if(u.get().streaming.includePreselectionsInMediainfoArray){const me=e.getPreselectionsForPeriod(S);for(Ce=0,ce=me.length;Ce<ce;Ce++){const ye=me[Ce];ye.hasOwnProperty("type")&&ye.type===O&&(ie=x(me[Ce]),ie&&le.push(ie))}}return le}function N(R){const S=E(R);return e.getRegularPeriods(S)}function E(R){const S=A(R);return e.getMpd(S)}function f(){c=[]}function A(R){return R||(c.length>0?c[0].mpd.manifest:null)}function U(R){try{const S=F(R.streamInfo,c),b=e.getAdaptationsForPeriod(S);return R&&R.streamInfo&&R.streamInfo.id!==void 0&&b?b[R.index]:null}catch{return null}}function F(R,S){const b=S.length;for(let J=0;J<b;J++){let O=S[J];if(R&&R.id===O.id)return O}return null}
12function B(R){if(!R)return null;let S=new wt;const b=R.period.mpd.manifest.Period[R.period.index].AdaptationSet[R.index];S.id=R.id,S.index=R.index,S.codec=e.getCodec(b);const J=u.get().streaming.enhancement.codecs;return S.type=J.some((O=>S.codec?.includes(O)))?r.default.ENHANCEMENT:R.type,S.streamInfo=K(R.period),S.representationCount=e.getRepresentationCount(b),S.labels=e.getLabelsForAdaptation(b),S.lang=e.getLanguageForAdaptation(b),S.segmentAlignment=e.getSegmentAlignment(b),S.subSegmentAlignment=e.getSubSegmentAlignment(b),S.viewpoint=e.getViewpointForAdaptation(b),S.accessibility=e.getAccessibilityForAdaptation(b),S.accessibility.filter((function(O){if(O.schemeIdUri&&O.schemeIdUri.search("cea-608")>=0&&v!==void 0)return!0}))[0]&&(S.embeddedCaptions=!0),S.audioChannelConfiguration=e.getAudioChannelConfigurationForAdaptation(b),S.audioChannelConfiguration.length===0&&b.Representation&&b.Representation.length>0&&(S.audioChannelConfiguration=e.getAudioChannelConfigurationForRepresentation(b.Representation[0])),S.roles=e.getRolesForAdaptation(b),S.mimeType=e.getMimeType(b),S.contentProtection=e.getContentProtectionByAdaptation(b),S.bitrateList=e.getBitrateListForAdaptation(b),S.selectionPriority=e.getSelectionPriority(b),S.contentProtection&&S.contentProtection.length>0&&(S.contentProtection=(function(O,ee){if(!O||!O.length||!ee)return O;const $=e.getContentProtectionByManifest(ee);if(!$||!$.length)return O;const ie=$.reduce(((be,Ce)=>(Ce.refId&&be.set(Ce.refId,Ce),be)),new Map);return O.map((be=>{if(be.ref){const Ce=ie.get(be.ref);Ce&&be.mergeAttributesFromReference(Ce)}return be}))})(S.contentProtection,R.period.mpd.manifest),S.contentProtection=(function(O){const ee=O.map(($=>$.cencDefaultKid)).filter(($=>$!==null));if(ee.length){const $=ee[0];O.forEach((ie=>{ie.keyId=$}))}return O})(S.contentProtection),S.normalizedKeyIds=(function(O){const ee=new Set;return O.forEach(($=>{$.cencDefaultKid&&typeof $.cencDefaultKid=="string"&&ee.add($.cencDefaultKid.replace(/-/g,"").toLowerCase())})),ee})(S.contentProtection)),S.isText=e.getIsText(b),S.essentialProperties=e.getCombinedEssentialPropertiesForAdaptationSet(b),S.supplementalProperties=e.getCombinedSupplementalPropertiesForAdaptationSet(b),S.isFragmented=e.getIsFragmented(b),S.isEmbedded=!1,S.adaptationSetSwitchingCompatibleIds=(function(O){if(!O||!O.supplementalProperties)return[];let ee=[];const $=O.supplementalProperties.filter((ie=>ie.schemeIdUri===de.default.ADAPTATION_SET_SWITCHING_SCHEME_ID_URI));return $&&$.length>0&&(ee=$[0].value.toString().split(",").filter((ie=>ie!==O.id))),ee})(S),S.segmentSequenceProperties=e.getSegmentSequencePropertiesForAdaptationSet(b),S}function x(R){if(!R)return null;let S=new wt;const b=R.period.mpd.manifest.Period[R.period.index].Preselection[R.index],J=R.period.mpd.manifest.Period[R.period.index].AdaptationSet,O=e.getAdaptationsForPeriod(R.period);return S=B(e.getMainAdaptationSetForPreselection(b,O)),S&&(S.isPreselection=!0,S.tag=R.tag,S.id=R.id,S.codec=e.getCodecForPreselection(b,J),S.selectionPriority=e.getSelectionPriority(b),S.labels=e.getLabelsForAdaptation(b),S.lang=e.getLanguageForAdaptation(b),S.viewpoint=e.getViewpointForAdaptation(b),S.accessibility=e.getAccessibilityForAdaptation(b),S.audioChannelConfiguration=e.getAudioChannelConfigurationForAdaptation(b),S.roles=e.getRolesForAdaptation(b),S.essentialProperties=e.getCombinedEssentialPropertiesForAdaptationSet(b),S.supplementalProperties=e.getCombinedSupplementalPropertiesForAdaptationSet(b)),S}function W(R,S,b){R.id=S,R.index=100+parseInt(S.substring(2,3)),R.type=_.TEXT,R.codec="cea-608-in-SEI",R.isEmbedded=!0,R.isFragmented=!1,R.lang=Jr(b),R.roles=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function K(R){let S=new cn;return S.id=R.id,S.index=R.index,S.start=R.start,S.duration=R.duration,S.manifestInfo=(function(b){let J=new mn;return J.dvrWindowSize=b.timeShiftBufferDepth,J.loadedTime=b.manifest.loadedTime,J.availableFrom=b.availabilityStartTime,J.minBufferTime=b.manifest.minBufferTime,J.maxFragmentDuration=b.maxSegmentDuration,J.duration=e.getDuration(b.manifest),J.isDynamic=e.getIsDynamic(b.manifest),J.serviceDescriptions=e.getServiceDescriptions(b.manifest),J.protocol=b.manifest.protocol,J})(R.mpd),S.isLast=R.mpd.manifest.Period.length===1||Math.abs(S.start+S.duration-S.manifestInfo.duration)<1,S.isEncrypted=R.isEncrypted,S}function z(){if(!_)throw new Error("setConfig function has to be called previously")}function Z(R){return c.length>0?c[0].mpd.manifest.Period[R]:null}function M(R,S,b){let J,O,ee,$,ie,be;if(R){for(O=R.AdaptationSet,ie=0;ie<O.length;ie+=1)for(J=O[ie],$=J.Representation,be=0;be<$.length;
12be+=1)if(ee=$[be],S===ee.id)return b?be:ee}return null}return n={applyPatchToManifest:function(R,S){t.getPatchOperations(S).forEach((b=>{let J=b.getMpdTarget(R);if(J===null)return;let{name:O,target:ee,leaf:$}=J;if(b.xpath.findsAttribute()||O==="__text"){switch(b.action){case"add":case"replace":ee[O]=b.value;break;case"remove":delete ee[O]}return}let ie=(ee[O]||[]).indexOf($),be=b.position==="prepend"||b.position==="before";if(b.action==="remove"||b.action==="replace")if(Array.isArray(ee[O])){if(ie!=-1){let Ce=ee[O];Ce.splice(ie,1),Ce.length>0?ee[O]=Ce:delete ee[O]}}else delete ee[O];b.action!=="add"&&b.action!=="replace"||Object.keys(b.value).forEach((Ce=>{let we=b.value[Ce],ce=ee[Ce]||[];if(ce.length===0&&ee[Ce]&&ce.push(ee[Ce]),ce.length===0)ce=we;else{let le=ce.length;le=Ce==O&&ie!=-1?ie+(be?0:1)+(b.action==="replace"?-1:0):be?0:ce.length,ce.splice.apply(ce,[le,0].concat(we))}ee[Ce]=ce}))}))},areMediaInfosEqual:function(R,S){if(!R||!S)return!1;const b=R.id===S.id,J=R.codec===S.codec,O=JSON.stringify(R.viewpoint)===JSON.stringify(S.viewpoint),ee=R.lang===S.lang,$=JSON.stringify(R.roles)===JSON.stringify(S.roles),ie=JSON.stringify(R.accessibility)===JSON.stringify(S.accessibility),be=JSON.stringify(R.audioChannelConfiguration)===JSON.stringify(S.audioChannelConfiguration);return b&&J&&O&&ee&&$&&ie&&be},convertAdaptationToMediaInfo:B,getAllMediaInfoForType:function(R,S,b){let J=c,O=b,ee=[];if(O)z(),J=N(O);else{if(!(c.length>0))return ee;O=c[0].mpd.manifest}const $=F(R,J);let ie=e.getAdaptationsForType(O,R?R.index:null,S);return ee=D(O,$,R,ie,S),S===_.TEXT&&(ie=e.getAdaptationsForType(O,R?R.index:null,_.VIDEO),ee=ee.concat(D(O,$,R,ie,S,!0))),ee},getAvailabilityStartTime:function(R){const S=E(R);return e.getAvailabilityStartTime(S)},getBandwidthForRepresentation:function(R,S){let b;return b=M(Z(S),R),b?b.bandwidth:null},getBaseURLsFromElement:function(R){return e.getBaseURLsFromElement(R)},getCodec:function(R,S,b){return e.getCodec(R,S,b)},getCodecForPreselection:function(R,S){return e.getCodecForPreselection(R,S)},getContentSteering:function(R){return e.getContentSteering(R)},getDuration:function(R){const S=A(R);return e.getDuration(S)},getEssentialProperties:function(R){try{return e.getEssentialProperties(R)}catch{return[]}},getEvent:function(R,S,b,J){try{if(!R||!S||isNaN(b)||!J)return null;const O=R.scheme_id_uri,ee=R.value;if(!S[O+"/"+ee])return null;const $=new Hn.default,ie=R.timescale||1,be=J.adaptation.period.start,Ce=S[O+"/"+ee],we=isNaN(J.presentationTimeOffset)?isNaN(Ce.presentationTimeOffset)?0:Ce.presentationTimeOffset:J.presentationTimeOffset;let ce,le=R.presentation_time_delta/ie;ce=R.version===0?be+b-we+le:be-we+le;const re=R.event_duration/ie,me=R.id,ye=R.message_data;return $.eventStream=Ce,$.eventStream.value=ee,$.eventStream.timescale=ie,$.duration=re,$.id=me,$.calculatedPresentationTime=ce,$.messageData=ye,$.presentationTimeDelta=le,$.parsedMessageData=O===r.default.ID3_SCHEME_ID_URI?(function(te){let q=0;const oe=[];for(;_i(te,q);){const Ue=ci(te,q+6);te[q+5]>>6&1&&(q+=ei),q+=ei;const Ge=q+Ue;for(;q+ir<Ge;){const Ve=fi(te.subarray(q)),je=Si(Ve);je&&oe.push(je),q+=Ve.size+ei}yi(te,q)&&(q+=ei)}return oe})(ye):null,$}catch{return null}},getEventsFor:function(R,S,b){let J=[];if(c.length>0){const O=c[0].mpd.manifest;if(R instanceof cn){const ee=F(R,c);J=e.getEventsForPeriod(ee)}else if(R instanceof wt){const ee=F(b,c);J=e.getEventStreamForAdaptationSet(O,U(R),ee)}else if(R instanceof or.default){const ee=F(b,c);J=e.getEventStreamForRepresentation(O,S,ee)}}return J},getFramerate:function(R){return e.getFramerate(R)},getIndexForRepresentation:function(R,S){return(function(b,J){const O=M(b,J,!0);return O!==null?O:-1})(Z(S),R)},getIsDVB:function(R){return e.hasProfile(R,"urn:dvb:dash:profile:dvb-dash:2014")},getIsDynamic:function(R){const S=A(R);return e.getIsDynamic(S)},getIsPatch:function(R){return t.getIsPatch(R)},getIsTextTrack:function(R){return e.getIsText(R)},getIsTypeOf:function(R,S){return e.getIsTypeOf(R,S)},getLocation:function(R){return e.getLocation(R)},getMainAdaptationForType:g,getMainAdaptationSetForPreselection:function(R,S){return e.getMainAdaptationSetForPreselection(R,S)},getCommonRepresentationForPreselection:function(R,S){return e.getCommonRepresentationForPreselection(R,S)},getManifestUpdatePeriod:function(R,S=0){return e.getManifestUpdatePeriod(R,S)},getMediaInfoForType:function(R,S){if(c.length===0||!R)return null;let b=F(R,c);if(!b)return null;const J=e.getAdaptationsForPeriod(b);let O=g(S,R);return O?B(J[e.getIndexForAdaptation(O,c[0].mpd.manifest,R.index)]):null},getMpd:E,getPatchLocation:function(R){const S=e.getPatchLocation(R),b=e.getPublishTime(R);return S&&S.length!==0&&b?S.filter((J=>isNaN(J.ttl)||b.getTime()+J.ttl>new Date().getTime())):[]},getPeriodById:function(R){if(!R||c.length===0)return null;const S=c.filter((b=>b.id===R));return S&&S.length>0?S[0]:null},getPreselectionIsTypeOf:function(R,S,b){return e.getPreselectionIsTypeOf(R,S,b)},getProducerReferenceTimes:function(R,S){let b,J;const O=F(R,c);return b=S?S.id:null,c.length>0&&O&&(J=b?e.getAdaptationForId(b,c[0].mpd.manifest,O.index):e.getAdaptationForIndex(S?S.index:null,c[0].mpd.manifest,O.index)),J?e.getProducerReferenceTimesForAdaptation(J):[]},getPublishTime:function(R){return e.getPublishTime(R)},getRealAdaptation:function(R,S){let b,J;const O=F(R,c);return b=S?S.id:null,c.length>0&&O&&(J=b?e.getAdaptationForId(b,c[0].mpd.manifest,O.index):e.getAdaptationForIndex(S?S.index:null,c[0].mpd.manifest,O.index)),J},getRealPeriodByIndex:function(R){return e.getRealPeriodForIndex(R,c[0].mpd.manifest)},getRegularPeriods:N,getRepresentationSortFunction:function(){return e.getRepresentationSortFunction()},getStreamsInfo:function(R,S){const b=[];let J=c;if(R&&(z(),J=N(R)),J.length>0){(!S||S>J.length)&&(S=J.length);for(let O=0;O<S;O++)b.push(K(J[O]))}return b},getSuggestedPresentationDelay:function(){const R=c.length>0?c[0].mpd:null;return e.getSuggestedPresentationDelay(R)},getSupplementalCodecs:function(R){const S=R[de.default.SUPPLEMENTAL_CODECS];return S?S.split(" ").map((b=>R.mimeType+';codecs="'+b+'"')):[]},getUTCTimingSources:function(){const R=A();return e.getUTCTimingSources(R)},getVoRepresentations:function(R){let S;const b=U(R);return S=e.getRepresentationsForAdaptation(b,R),S},isPatchValid:function(R,S){let b=e.getId(R),J=t.getMpdId(S),O=e.getPublishTime(R),ee=t.getPublishTime(S),$=t.getOriginalPublishTime(S);return!!(b&&J&&b==J&&O&&$&&O.getTime()==$.getTime()&&ee&&O.getTime()<ee.getTime())},reset:f,setConfig:function(R){R&&(R.constants&&(_=R.constants),R.cea608parser&&(v=R.cea608parser),R.errHandler&&e.setConfig({errHandler:R.errHandler}),R.BASE64&&e.setConfig({BASE64:R.BASE64}))},updatePeriods:function(R){if(!R)return null;z(),c=N(R)}},e=(0,Gn.default)(I).getInstance(),t=ur(I).getInstance(),u=(0,T.default)(I).getInstance(),f(),n}Gr.__dashjs_factory_name="DashAdapter";var ti=L.default.getSingletonFactory(Gr);class jr{static round10(e,t){return(function(u,c,_){return _===void 0||+_==0?Math[u](c):(_=+_,(c=+c)===null||isNaN(c)||typeof _!="number"||_%1!=0?NaN:(c=c.toString().split("e"),+((c=(c=Math[u](+(c[0]+"e"+(c[1]?+c[1]-_:-_)))).toString().split("e"))[0]+"e"+(c[1]?+c[1]+_:_))))})("round",e,t)}}var Ii=class{constructor(){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=[]}},Er=class{constructor(){this.t=null,this.mt=null,this.to=null,this.lto=null}},Ri=class{constructor(){this.t=null,this.level=null}},wr=class{constructor(){this.target=null,this.state=o.BUFFER_EMPTY}},vs=class{constructor(){this.time=null,this.range=null,this.manifestInfo=null}},Ms=class{constructor(){this.time=null,this.droppedFrames=null}};class ws{constructor(){this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOff
12set=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]}}class Ps{constructor(){this.id=null,this.index=null,this.start=null,this.duration=null}}class Os{constructor(){this.id=null,this.index=null,this.mediaType=null,this.presentationTimeOffset=null,this.startNumber=null}}var Ls=class{constructor(){this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.bandwidth=null,this.range=null,this.state=null}},Fs=class{constructor(){this.loadingRequests=[],this.executedRequests=[]}};function ki(n){const e=(n=n||{}).settings;let t,u,c=this.context,_=(0,h.default)(c).getInstance();function v(){_.trigger(m.default.METRICS_CHANGED)}function I(A){_.trigger(m.default.METRIC_CHANGED,{mediaType:A}),v()}function g(A,U,F){_.trigger(m.default.METRIC_UPDATED,{mediaType:A,metric:U,value:F}),I(A)}function D(A,U,F){_.trigger(m.default.METRIC_ADDED,{mediaType:A,metric:U,value:F}),I(A)}function N(A,U){let F=null;return A&&(u.hasOwnProperty(A)?F=u[A]:U||(F=new Ii,u[A]=F)),F}function E(A,U,F){let B=N(A);B!==null&&(B[U].push(F),B[U].length>e.get().streaming.metrics.maxListDepth&&B[U].shift())}function f(A,U,F){E(A,U,F),D(A,U,F)}return t={addBufferLevel:function(A,U,F){let B=new Ri;B.t=U,B.level=F,f(A,o.BUFFER_LEVEL,B)},addBufferState:function(A,U,F){let B=new wr;B.target=F,B.state=U,f(A,o.BUFFER_STATE,B)},addDVBErrors:function(A){f(r.default.STREAM,o.DVB_ERRORS,A)},addDVRInfo:function(A,U,F,B){let x=new vs;x.time=U,x.range=B,x.manifestInfo=F,f(A,o.DVR_INFO,x)},addDroppedFrames:function(A,U){let F=new Ms,B=N(A).DroppedFrames;U&&(F.time=U.creationTime,F.droppedFrames=U.droppedVideoFrames,B.length>0&&B[B.length-1]==F||f(A,o.DROPPED_FRAMES,F))},addHttpRequest:function A(U,F,B,x){let W=new ke.HTTPRequest;F.url&&F.url!==U.url&&(A({mediaType:U.mediaType,type:U.type,url:U.url,serviceLocation:null,range:U.range,startDate:U.startDate,firstByteDate:null,endDate:null,duration:U.duration,fileLoaderType:U.fileLoaderType,resourceTimingValues:U.resourceTimingValues},{url:null,status:null,headers:null},null,x),W.actualurl=F.url),W.tcpid=null,W.type=U.type,W.url=U.url,W.range=U.range||null,W.trequest=U.startDate,W.tresponse=U.firstByteDate,W.responsecode=F.status,W.cmsd=x,W._tfinish=U.endDate,W._stream=U.mediaType,W._mediaduration=U.duration,W._responseHeaders="";for(const K in F.headers)W._responseHeaders+=K+": "+F.headers[K]+`\r 13`;W._serviceLocation=U.serviceLocation||null,W._fileLoaderType=U.fileLoaderType,W._resourceTimingValues=U.resourceTimingValues,W._streamId=U&&U.representation&&U.representation.mediaInfo&&U.representation.mediaInfo.streamInfo?U.representation.mediaInfo.streamInfo.id:null,B?B.forEach((K=>{(function(z,Z,M,R){let S=new ke.HTTPRequestTrace;S.s=Z,S.d=M,S.b=R,z.trace.push(S),z.interval||(z.interval=0),z.interval+=M})(W,K.s,K.d,K.b,K.t)})):(delete W.interval,delete W.trace),f(U.mediaType,o.HTTP_REQUEST,W)},addManifestUpdate:function(A,U,F,B){let x=new ws;x.mediaType=A,x.type=U,x.requestTime=F,x.fetchTime=B,E(r.default.STREAM,o.MANIFEST_UPDATE,x),D(A,o.MANIFEST_UPDATE,x)},addManifestUpdateRepresentationInfo:function(A,U,F){if(A&&A.representationInfo){const B=new Os;B.id=U?U.id:null,B.index=U?U.index:null,B.mediaType=F,B.startNumber=U?U.startNumber:null,B.presentationTimeOffset=U?U.presentationTimeOffset:null,A.representationInfo.push(B),g(A.mediaType,o.MANIFEST_UPDATE_TRACK_INFO,A)}},addManifestUpdateStreamInfo:function(A,U,F,B,x){if(A){let W=new Ps;W.id=U,W.index=F,W.start=B,W.duration=x,A.streamInfo.push(W),g(A.mediaType,o.MANIFEST_UPDATE_STREAM_INFO,A)}},addPlayList:function(A){A.trace&&Array.isArray(A.trace)?A.trace.forEach((U=>{U.hasOwnProperty("subreplevel")&&!U.subreplevel&&delete U.subreplevel})):delete A.trace,f(r.default.STREAM,o.PLAY_LIST,A)},addRepresentationSwitch:function(A,U,F,B,x){let W=new Er;W.t=U,W.mt=F,W.to=B,x?W.lto=x:delete W.lto,f(A,o.TRACK_SWITCH,W)},addRequestsQueue:function(A,U,F){let B=new Fs;B.loadingRequests=U,B.executedRequests=F,N(A).RequestsQueue=B,D(A,o.REQUESTS_QUEUE,B)},addSchedulingInfo:function(A,U,F,B,x,W,K,z,Z){let M=new Ls;M.mediaType=A,M.t=U,M.type=F,M.startTime=B,M.availabilityStartTime=x,M.duration=W,M.bandwidth=K,M.range=z,M.state=Z,f(A,o.SCHEDULING_INFO,M)},clearAllCurrentMetrics:function(){u={},v()},clearCurrentMetricsForType:function(A){delete u[A],I(A)},getMetricsFor:N,updateManifestUpdateInfo:function(A,U){if(A){for(let F in U)A[F]=U[F];g(A.mediaType,o.MANIFEST_UPDATE,A)}}},u={},t}ki.__dashjs_factory_name="MetricsModel";var Us=L.default.getSingletonFactory(ki);class Hr{constructor(){this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}}Hr.INITIAL_PLAYOUT_START_REASON="initial_playout",Hr.SEEK_START_REASON="seek",Hr.RESUME_FROM_PAUSE_START_REASON="resume",Hr.METRICS_COLLECTION_START_REASON="metrics_collection_start";
13class fr{constructor(){this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}}function Gi(n){n=n||{};const e=this.context;let t,u,c,_,v=n.metricsModel;function I(N){const E=v.getMetricsFor(N,!0);if(!E)return null;const f=E.HttpList;let A,U=null;if(!f||f.length<=0)return null;for(A=f.length-1;A>=0;){if(f[A].responsecode){U=f[A];break}A--}return U}function g(N){const E=v.getMetricsFor(N,!0);return E&&E.HttpList?E.HttpList:[]}function D(N,E){if(!N)return null;const f=N[E];return f&&f.length!==0?f[f.length-1]:null}return t={addBufferLevel:function(N,E,f){v.addBufferLevel(N,E,f)},addBufferState:function(N,E,f){v.addBufferState(N,E,f)},addDVBErrors:function(N){v.addDVBErrors(N)},addDVRInfo:function(N,E,f,A){v.addDVRInfo(N,E,f,A)},addDroppedFrames:function(N){v.addDroppedFrames(r.default.VIDEO,N)},addHttpRequest:function(N,E,f,A,U,F){const B={status:f,headers:A,url:E};v.addHttpRequest(N,B,U,F)},addManifestUpdate:function(N){v.addManifestUpdate(r.default.STREAM,N.type,N.startDate,N.endDate)},addManifestUpdateRepresentationInfo:function(N,E){if(N){const f=this.getCurrentManifestUpdate();v.addManifestUpdateRepresentationInfo(f,N,E)}},addManifestUpdateStreamInfo:function(N){if(N){const E=this.getCurrentManifestUpdate();v.addManifestUpdateStreamInfo(E,N.id,N.index,N.start,N.duration)}},addPlayList:function(){_&&(v.addPlayList(_),_=null)},addRepresentationSwitch:function(N,E,f,A,U){v.addRepresentationSwitch(N,E,f,A,U)},addRequestsQueue:function(N,E,f){v.addRequestsQueue(N,E,f)},addSchedulingInfo:function(N,E){v.addSchedulingInfo(N.mediaType,new Date,N.type,N.startTime,N.availabilityStartTime,N.duration,N.bandwidth,N.range,E)},clearAllCurrentMetrics:function(){v.clearAllCurrentMetrics()},createPlaylistMetrics:function(N,E){_=new Hr,_.start=new Date,_.mstart=N,_.starttype=E},createPlaylistTraceMetrics:function(N,E,f){u===!0&&(u=!1,c=new fr,c.representationid=N,c.start=new Date,c.mstart=E,c.playbackspeed=f!==null?f.toString():null)},getCurrentBufferLevel:function(N){const E=D(v.getMetricsFor(N,!0),o.BUFFER_LEVEL);return E?jr.round10(E.level/1e3,-3):0},getCurrentBufferState:function(N){return D(v.getMetricsFor(N,!0),o.BUFFER_STATE)},getCurrentDVRInfo:function(N){return D(N?v.getMetricsFor(N,!0):v.getMetricsFor(r.default.VIDEO,!0)||v.getMetricsFor(r.default.AUDIO,!0),o.DVR_INFO)},getCurrentDroppedFrames:function(){return D(v.getMetricsFor(r.default.VIDEO,!0),o.DROPPED_FRAMES)},getCurrentHttpRequest:I,getCurrentManifestUpdate:function(){return D(v.getMetricsFor(r.default.STREAM),o.MANIFEST_UPDATE)},getCurrentRepresentationSwitch:function(N){return D(v.getMetricsFor(N,!0),o.TRACK_SWITCH)},getCurrentSchedulingInfo:function(N){return D(v.getMetricsFor(N,!0),o.SCHEDULING_INFO)},getHttpRequests:g,getLatestFragmentRequestHeaderValueByID:function(N,E){if(!E)return null;let f={},A=I(N);A&&(f=tn.default.parseHttpHeaders(A._responseHeaders));const U=f[E.toLowerCase()];return U===void 0?null:U},getLatestMPDRequestHeaderValueByID:function(N){if(!N)return null;let E,f,A,U={};for(E=g(r.default.STREAM),A=E.length-1;A>=0;A--)if(f=E[A],f.type===ke.HTTPRequest.MPD_TYPE){U=tn.default.parseHttpHeaders(f._responseHeaders);break}const F=U[N.toLowerCase()];return F===void 0?null:F},pushPlayListTraceMetrics:function(N,E){if(u===!1&&_&&c&&c.start){const f=c.start;c.duration=N.getTime()-f.getTime(),c.stopreason=E,_.trace.push(c),u=!0}},updateManifestUpdateInfo:function(N){const E=this.getCurrentManifestUpdate();v.updateManifestUpdateInfo(E,N)},updatePlayListTraceMetrics:function(N){if(c)for(let E in c)c[E]=N[E]}},v=v||Us(e).getInstance({settings:n.settings}),u=!0,c=null,_=null,t}fr.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",fr.REBUFFERING_REASON="rebuffering",fr.USER_REQUEST_STOP_REASON="user_request",fr.END_OF_PERIOD_STOP_REASON="end_of_period",fr.END_OF_CONTENT_STOP_REASON="end_of_content",fr.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",fr.FAILURE_STOP_REASON="failure",Gi.__dashjs_factory_name="DashMetrics";var xs=L.default.getSingletonFactory(Gi);function Hi(){let n;const e=this.context,t=(0,h.default)(e).getInstance();return n={error:function(u){t.trigger(m.default.ERROR,{error:u})}},n}Hi.__dashjs_factory_name="ErrorHandler";var Bs=L.default.getSingletonFactory(Hi),ks=P(5560);function Yi(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E,f,A;function U(){A.debug("Stopping the gap controller"),v&&(clearInterval(v),v=null),(function(){e.off(m.default.WALLCLOCK_TIME_UPDATED,K,this),e.off(m.default.INITIAL_STREAM_SWITCH,W,this),e.off(m.default.PLAYBACK_SEEKING,F,this),e.off(m.default.BUFFER_REPLACEMENT_STARTED,B,t),e.off(m.default.TRACK_CHANGE_RENDERED,x,t)})(),v=null,I=NaN,_=0,E=null,f={}}
13function F(){E&&(clearTimeout(E),E=null)}function B(M){try{if(M.streamId!==D.getActiveStreamInfo().id||M.mediaType!==r.default.VIDEO&&M.mediaType!==r.default.AUDIO)return;M.streamId===D.getActiveStreamInfo().id&&(f[M.mediaType]=!0)}catch(R){A.error(R)}}function x(M){M&&M.mediaType&&(f[M.mediaType]=!1)}function W(){v||(function(){try{v||(A.debug("Starting the gap controller"),v=setInterval((()=>{z()&&Z(g.getTime())}),c.get().streaming.gaps.checkInterval))}catch{}})()}function K(){if(z(c.get().streaming.gaps.enableSeekFix)&&(_++,_>=10)){const M=g.getTime();u===M?Z(M,!0):(u=M,I=NaN),_=0}}function z(M=!1){if(!D.getActiveStream())return!1;let R=!1;for(const b in f)if(f[b]){R=!0;break}const S=!!M&&(function(){const b=D.getActiveStream(),J=parseFloat((b.getStartTime()+b.getDuration()).toFixed(5));return g.getTime()+c.get().streaming.gaps.threshold>=J})();return!R&&c.get().streaming.gaps.jumpGaps&&D.getActiveStreamProcessors().length>0&&(!g.isSeeking()||S)&&!g.isPaused()&&!D.getIsStreamSwitchInProgress()&&!D.getHasMediaOrInitialisationError()}function Z(M,R=!1){const S=c.get().streaming.gaps,b=S.enableStallFix,J=S.stallSeek,O=S.smallGapLimit,ee=S.jumpLargeGaps,$=S.seekOffset,ie=N.getBufferRange();let be,Ce=NaN,we=!1;if(be=(function(le,re){try{if(!le||le.length<=1&&re>0)return NaN;let me=NaN,ye=0;for(;isNaN(me)&&ye<le.length;){const te=ye>0?le.end(ye-1):0;re<le.start(ye)&&te-re<c.get().streaming.gaps.threshold&&(me=ye),ye+=1}return me}catch{return null}})(ie,M),!isNaN(be)){const le=ie.start(be),re=le-M;re>0&&(re<=O||ee)&&(Ce=le)}const ce=g.getTimeToStreamEnd();if(isNaN(Ce)&&R&&isFinite(ce)&&!isNaN(ce)&&ce<O&&(Ce=parseFloat(g.getStreamEndTime().toFixed(5)),we=!0),b&&isNaN(Ce)&&R&&isNaN(be)&&(function(le,re){for(let me=0,ye=le.length;me<ye;me++)if(re>=le.start(me)&&re<=le.end(me))return!0;return!1})(ie,M)&&(J===0?(A.warn("Toggle play pause to break stall"),N.pause(),N.play()):(A.warn(`Jumping ${J}s to break stall`),Ce=M+J)),Ce>0&&I!==Ce&&Ce>M&&!E){const le=Ce-M;if(we){const re=D.getStreamForTime(Ce),me=re&&!!re.getPreloaded();A.warn(`Jumping to end of stream because of gap from ${M} to ${Ce}. Gap duration: ${le}`),g.seek(Ce+$,!0,me)}else{const re=g.getIsDynamic(),me=be>0?ie.end(be-1):M,ye=re?1e3*Math.max(0,le-.1):0;E=window.setTimeout((()=>{g.seek(Ce+$,!0,!0);const te=D.getActiveStream();te&&A.warn(`Jumping gap occuring in period ${te.getStreamId()} starting at ${me} and ending at ${Ce}. Jumping by: ${Ce+$-me}`),E=null}),ye)}I=Ce}}return t={reset:U,setConfig:function(M){M&&(M.settings&&(c=M.settings),M.playbackController&&(g=M.playbackController),M.streamController&&(D=M.streamController),M.videoModel&&(N=M.videoModel))},initialize:function(){(function(){e.on(m.default.WALLCLOCK_TIME_UPDATED,K,this),e.on(m.default.INITIAL_STREAM_SWITCH,W,this),e.on(m.default.PLAYBACK_SEEKING,F,this),e.on(m.default.BUFFER_REPLACEMENT_STARTED,B,t),e.on(m.default.TRACK_CHANGE_RENDERED,x,t)})()}},A=(0,p.default)(n).getInstance().getLogger(t),U(),t}Yi.__dashjs_factory_name="GapController";var Gs=L.default.getSingletonFactory(Yi);class Hs extends k.default{constructor(e,t){super(),this.url=e||null,this.type=t||null,this.mediaType=r.default.STREAM,this.responseType=""}}var Vi=Hs;function qi(n){n=n||{};const e=this.context,t=(0,h.default)(e).getInstance();let u,c=(0,Bt.default)(e).create({errHandler:n.errHandler,dashMetrics:n.dashMetrics,mediaPlayerModel:n.mediaPlayerModel,errors:wn.default});return u={load:function(_,v,I){const g=function(D,N){v.resolved=!0,v.resolvedContent=D||null,t.trigger(m.default.XLINK_ELEMENT_LOADED,{element:v,resolveObject:I,error:D||N?null:new on.default(wn.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,wn.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+_)})};if(_==="urn:mpeg:dash:resolve-to-zero:2013")g(null,!0);else{const D=new Vi(_,ke.HTTPRequest.XLINK_EXPANSION_TYPE);c.load({request:D,success:function(N){g(N)},error:function(){g(null)}})}},reset:function(){c&&(c.abort(),c=null)}},u}qi.__dashjs_factory_name="XlinkLoader";var Ys=L.default.getClassFactory(qi);const ni="onLoad";function Ki(n){n=n||{};let e=this.context,t=(0,h.default)(e).getInstance();const u=(0,Ht.default)(e).getInstance();let c,_,v,I;function g(A,U,F){let B,x,W={};W.elements=A,W.type=U,W.resolveType=F,W.elements.length===0&&N(W);for(let K=0;K<W.elements.length;K++)B=W.elements[K],x=u.isHTTPURL(B.url)?B.url:B.originalContent.BaseURL+B.url,I.load(x,B,W)}function D(A){let U,F,B="";if(U=A.element,F=A.resolveObject,U.resolvedContent){let x=0;U.resolvedContent.indexOf("<?xml")===0&&(x=U.resolvedContent.indexOf("?>")+2),B=U.resolvedContent.substr(0,x)+"<response>"+U.resolvedContent.substr(x)+"</response>",U.resolvedContent=_.parseXml(B).response}(function(x){let W,K;for(W=0;W<x.elements.length;W++)if(K=x.elements[W],K.resolved===!1)return!1;return!0})(F)&&N(F)}function N(A){let U,F,B=[];if((function(x){let W,K,z,Z,M,R,S=[];for(Z=x.elements.length-1;Z>=0;Z--){if(W=x.elements[Z],K=W.type,W.resolvedContent){if(W.resolvedContent)for(M=0;M<W.resolvedContent[K].length;M++)z=W.resolvedContent[K][M],S.push(z)}else delete W.originalContent["xlink:actuate"],delete W.originalContent["xlink:href"],S.push(W.originalContent);for(W.parentElement[K].splice(W.index,1),R=0;R<S.length;R++)W.parentElement[K].splice(W.index+R,0,S[R]);S=[]}x.elements.length>0&&_.getIron().run(v)})(A),A.resolveType==="onActuate"&&t.trigger(m.default.XLINK_READY,{manifest:v}),A.resolveType===ni)switch(A.type){case de.default.PERIOD:for(U=0;U<v[de.default.PERIOD].length;U++)F=v[de.default.PERIOD][U],F.hasOwnProperty(de.default.ADAPTATION_SET)&&(B=B.concat(E(F[de.default.ADAPTATION_SET],F,de.default.ADAPTATION_SET,ni))),F.hasOwnProperty(de.default.EVENT_STREAM)&&(B=B.concat(E(F[de.default.EVENT_STREAM
13],F,de.default.EVENT_STREAM,ni)));g(B,de.default.ADAPTATION_SET,ni);break;case de.default.ADAPTATION_SET:t.trigger(m.default.XLINK_READY,{manifest:v})}}function E(A,U,F,B){let x,W,K,z=[];for(W=A.length-1;W>=0;W--)x=A[W],x.hasOwnProperty("xlink:href")&&x["xlink:href"]==="urn:mpeg:dash:resolve-to-zero:2013"&&A.splice(W,1);for(W=0;W<A.length;W++)x=A[W],x.hasOwnProperty("xlink:href")&&x.hasOwnProperty("xlink:actuate")&&x["xlink:actuate"]===B&&(K=f(x["xlink:href"],U,F,W,B,x),z.push(K));return z}function f(A,U,F,B,x,W){return{url:A,parentElement:U,type:F,index:B,resolveType:x,originalContent:W,resolvedContent:null,resolved:!1}}return c={resolveManifestOnLoad:function(A){let U;v=A,v.Period?(U=E(v.Period,v,de.default.PERIOD,ni),g(U,de.default.PERIOD,ni)):t.trigger(m.default.XLINK_READY,{manifest:v})},setParser:function(A){A&&(_=A)},reset:function(){t.off(m.default.XLINK_ELEMENT_LOADED,D,c),I&&(I.reset(),I=null)}},t.on(m.default.XLINK_ELEMENT_LOADED,D,c),I=Ys(e).create({errHandler:n.errHandler,dashMetrics:n.dashMetrics,mediaPlayerModel:n.mediaPlayerModel,settings:n.settings}),c}Ki.__dashjs_factory_name="XlinkController";var Vs=L.default.getClassFactory(Ki);function ji(n){function e(c,_,v,I,g){(function(D,N){let E=!0;if(N)for(const[f,A]of Object.entries(N)){let U=D[f];A.some((F=>U.match(F)))&&(E=!1)}return E})(I,c)&&(g[_]?v?g[_].push(I):(function(D,N){if(typeof D=="object")for(let E in D)N.hasOwnProperty(E)||(N[E]=D[E])})(I,g[_]):g[_]=v?[I]:I)}function t(c,_,v,I){for(let g=0,D=c.length;g<D;++g){const N=c[g];if(v[N]){const E=v[N];Array.isArray(E)?E.forEach((f=>{e(_[N],N,!0,f,I)})):e(_[N],N,!1,E,I)}}}function u(c,_){for(let v=0,I=c.children.length;v<I;++v){const g=c.children[v],D=_[g.name];if(D)for(let N=0,E=D.length;N<E;++N){const f=D[N];t(c.properties,c.exceptions,_,f),u(g,f)}}}return{run:function(c){if(c===null||typeof c!="object")return c;if(c.Period&&"period"in n){const _=n.period,v=c.Period;for(let I=0,g=v.length;I<g;++I){const D=v[I];if(u(_,D),"adaptationset"in n){const N=D.AdaptationSet;if(N){const E=n.adaptationset;for(let f=0,A=N.length;f<A;++f)u(E,N[f])}}}}return c}}}ji.__dashjs_factory_name="ObjectIron";var qs=L.default.getClassFactory(ji),di=class{constructor(n,e){this._test=n,this._converter=e}get test(){return this._test}get converter(){return this._converter}};const Wi=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/;var Ks=class extends di{constructor(){super(((n,e,t)=>{const u=[de.default.MIN_BUFFER_TIME,de.default.MEDIA_PRESENTATION_DURATION,de.default.MINIMUM_UPDATE_PERIOD,de.default.TIMESHIFT_BUFFER_DEPTH,de.default.MAX_SEGMENT_DURATION,de.default.MAX_SUBSEGMENT_DURATION,de.default.SUGGESTED_PRESENTATION_DELAY,de.default.START,r.default.START_TIME,de.default.DURATION],c=u.length;for(let _=0;_<c;_++)if(e===u[_])return Wi.test(t);return!1}),(n=>{const e=Wi.exec(n);let t=31536e3*parseFloat(e[3]||0)+2592e3*parseFloat(e[5]||0)+86400*parseFloat(e[7]||0)+3600*parseFloat(e[9]||0)+60*parseFloat(e[11]||0)+parseFloat(e[13]||0);return e[1]!==void 0&&(t=-t),t}))}};const zi=/^([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}))?/;var js=class extends di{constructor(){super(((n,e,t)=>zi.test(t)),(n=>{const e=zi.exec(n);let t;if(t=Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[4],10),parseInt(e[5],10),e[6]&&parseInt(e[6],10)||0,e[7]&&1e3*parseFloat(e[7])||0),e[9]&&e[10]){const u=60*parseInt(e[9],10)+parseInt(e[10],10);t+=(e[8]==="+"?-1:1)*u*60*1e3}return new Date(t)}))}};const Ws=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,zs=[de.default.ID];var $s=class extends di{constructor(){super(((n,e,t)=>Ws.test(t)&&zs.indexOf(e)===-1),(n=>parseFloat(n)))}},Qs=class extends di{constructor(){super(((n,e)=>{const t={[de.default.ADAPTATION_SET]:[de.default.LANG],[de.default.REPRESENTATION]:[de.default.LANG],[de.default.CONTENT_COMPONENT]:[de.default.LANG],[de.default.LABEL]:[de.default.LANG],[de.default.GROUP_LABEL]:[de.default.LANG]};if(t.hasOwnProperty(n)){let u=t[n];return u!==void 0&&u.indexOf(e)>=0}return!1}),(n=>Jr(n)||String(n)))}},ri=class{constructor(n,e,t,u){this._name=n||"",this._properties=e||[],this._exceptions=t||{},this._children=u||[]}get name(){return this._name}get children(){return this._children}get properties(){return this._properties}get exceptions(){return this._exceptions}},Xs=class extends ri{constructor(){const n=[de.default.AUDIO_CHANNEL_CONFIGURATION,de.default.AUDIO_SAMPLING_RATE,de.default.CODECS,de.default.CODING_DEPENDENCY,de.default.CONTENT_PROTECTION,de.default.ESSENTIAL_PROPERTY,de.default.FRAMERATE,de.default.FRAME_PACKING,de.default.HEIGHT,de.default.INBAND_EVENT_STREAM,de.default.MAXIMUM_SAP_PERIOD,de.default.MAX_PLAYOUT_RATE,de.default.MIME_TYPE,de.default.PROFILES,de.default.SAR,de.default.SCAN_TYPE,de.default.SEGMENT_PROFILES,de.default.SEGMENT_SEQUENCE_PROPERTIES,de.default.START_WITH_SAP,de.default.SUPPLEMENTAL_CODECS,de.default.SUPPLEMENTAL_PROPERTY,de.default.WIDTH],e={[de.default.SUPPLEMENTAL_PROPERTY]:{schemeIdUri:[r.default.URL_QUERY_INFO_SCHEME,r.default.EXT_URL_QUERY_INFO_SCHEME,r.default.ADV_URL_QUERY_INFO_SCHEME,r.default.URL_QUERY_STATE_PREFIX]},[de.default.ESSENTIAL_PROPERTY]:{schemeIdUri:[r.default.URL_QUERY_INFO_SCHEME,r.default.EXT_URL_QUERY_INFO_SCHEME,r.default.ADV_URL_QUERY_INFO_SCHEME,r.default.URL_QUERY_STATE_PREFIX]}};super(de.default.ADAPTATION_SET,n,e,[new ri(de.default.REPRESENTATION,n,e,[new ri(de.default.SUB_REPRESENTATION,n,e)])])}},Zs=class extends ri{constructor(){const n=[de.default.SEGMENT_BASE,de.default.SEGMENT_TEMPLATE,de.default.SEGMENT_LIST],e={};super(de.default.PERIOD,n,e,[new ri(de.default.ADAPTATION_SET,n,e,[new ri(de.default.REPRESENTATION,n,e)])])}};const Js=60,Ai=62,Ni=45,$i=47,eo=63,to=33,Qi=39,Xi=34,bi=91,no=93,ro=new Set([13,10,9,62,47,61,32]),io=[de.default.ACCESSIBILITY,de.default.ADAPTATION_SET,de.default.ADD,de.default.AUDIO_CHANNEL_CONFIGURATION,de.default.BASE_URL,de.default.CONTENT_COMPONENT,de.default.CONTENT_PROTECTION,de.default.CONTENT_STEERING,de.default.ESSENTIAL_PROPERTY,de.default.EVENT,de.default.EVENT_STREAM,de.default.INBAND_EVENT_STREAM,de.default.LABEL,de.default.LO
13CATION,de.default.METRICS,de.default.PATCH_LOCATION,de.default.PERIOD,de.default.PRESELECTION,de.default.PRODUCER_REFERENCE_TIME,de.default.REMOVE,de.default.REPLACE,de.default.REPORTING,de.default.REPRESENTATION,de.default.ROLE,de.default.S,de.default.SEGMENT_SEQUENCE_PROPERTIES,de.default.SEGMENT_URL,de.default.SERVICE_DESCRIPTION,de.default.SUPPLEMENTAL_PROPERTY,de.default.UTC_TIMING];function Zi(n){n=n||{};const e=this.context,t=n.debug;let u,c,_,v;function I(g){try{const D=(function(N){const E=(function(A,U={}){let F=U.pos||0;const B=A.length,x=!!U.keepComments,W=!!U.keepWhitespace,K=!!U.includeParentElement;function z(O,ee="#text"){return{nodeName:ee,nodeValue:O,attributes:{},childNodes:[]}}function Z(O=""){const ee=[];for(;F<B;)if(A.charCodeAt(F)===Js){const $=A.charCodeAt(F+1);if($===$i){const be=F+2;if(F=A.indexOf(">",F),!A.startsWith(O,be)){const Ce=A.substring(0,F).split(` 14`);throw new Error(`Unexpected close tag 15Line: `+(Ce.length-1)+` 16Column: `+(Ce[Ce.length-1].length+1)+` 17Char: `+A[F])}return F+1&&(F+=1),ee}if($===eo){F=A.indexOf(">",F),F++;continue}if($===to){const be=A.charCodeAt(F+2);if(be===Ni){const Ce=F;for(;F!==-1&&(A.charCodeAt(F)!==Ai||A.charCodeAt(F-1)!==Ni||A.charCodeAt(F-2)!==Ni);)F=A.indexOf(">",F+1);F===-1&&(F=B),x&&ee.push(z(A.substring(Ce,F+1),"#comment"))}else{if(be===bi&&A.charCodeAt(F+8)===bi&&A.startsWith("CDATA",F+3)){const Ce=A.indexOf("]]>",F);Ce===-1?(ee.push(z(A.substr(F+9),"#cdata")),F=B):(ee.push(z(A.substring(F+9,Ce),"#cdata")),F=Ce+3);continue}{const Ce=F+1;F+=2;let we=!1;for(;F<B&&(A.charCodeAt(F)!==Ai||we);){const ce=A.charCodeAt(F);ce===bi?we=!0:we&&ce===no&&(we=!1),F++}ee.push(z(A.substring(Ce,F),"#doctype"))}}F++;continue}const ie=S();ee.push(ie)}else{const $=M();if(W)$.length>0&&ee.push(z($));else{const ie=$.trim();ie.length>0&&ee.push(z(ie))}F++}return ee}function M(){const O=F;return F=A.indexOf("<",F)-1,F===-2&&(F=B),(0,Lr.unescapeHtml)(A.slice(O,F+1))}function R(){const O=F;for(;F<B&&!ro.has(A.charCodeAt(F));)F++;return A.slice(O,F)}function S(){F++;const O=R();let ee=O,$=null;const ie=O.indexOf(":");ie!==-1&&($=O.slice(0,ie),ee=O.slice(ie+1));const be=(function(){const ce={};for(;F<B&&A.charCodeAt(F)!==Ai;){const le=A.charCodeAt(F);if(le>64&&le<91||le>96&&le<123){const re=R();let me="",ye=A.charCodeAt(F);for(;ye!==Qi&&ye!==Xi;)F++,ye=A.charCodeAt(F);if(ye===Qi||ye===Xi){if(me=b(),F===-1)throw new Error("Missing closing quote")}else F--;ce[re]=(0,Lr.unescapeHtml)(me)}F++}return ce})();let Ce=[];const we=A.charCodeAt(F-1);return F++,we!==$i&&(Ce=Z(O)),{nodeName:O,nodeValue:null,attributes:be,childNodes:Ce,prefix:$,localName:ee}}function b(){const O=A[F],ee=F+1;return F=A.indexOf(O,ee),A.slice(ee,F)}const J={nodeName:"#document",nodeValue:null,childNodes:Z(""),attributes:{}};return K&&(function O(ee,$){ee.parentElement=$?.nodeName.startsWith("#")?null:$;for(const ie of ee.childNodes)O(ie,ee)})(J,null),J})(N),f=E.childNodes.find((A=>A.nodeName==="MPD"||A.nodeName==="Patch"))||E.childNodes[0];return(function A(U){U.nodeName.indexOf(":")!==-1&&(U.__prefix=U.prefix,U.nodeName=U.localName);const{childNodes:F,attributes:B,nodeName:x}=U;U.tagName=x;for(let K in B){let z=B[K];if(x==="S")z=parseInt(z);else for(let Z=0,M=_.length;Z<M;Z++){const R=_[Z];if(R.test(x,K,z)){z=R.converter(z);break}}U[K]=z}const W=F?.length;for(let K=0;K<W;K++){const z=F[K];if(z.nodeName==="#text"){U.__text=z.nodeValue;continue}A(z);const{nodeName:Z}=z;
17Array.isArray(U[Z])?U[Z].push(z):io.indexOf(Z)!==-1?(U[Z]||(U[Z]=[]),U[Z].push(z)):U[Z]=z}U.__children=F})(f),f})(g);return{[D.tagName]:D}}catch{return null}}return u={getIron:function(){return v},parseXml:I,parse:function(g){let D;const N=window.performance.now();if(D=I(g),!D)throw new Error("failed to parse the manifest");D.Patch?(D=D.Patch,D.add&&D.add.forEach((f=>v.run(f))),D.replace&&D.replace.forEach((f=>v.run(f)))):(D=D.MPD,v.run(D));const E=window.performance.now();return c.info("Parsing complete: "+(E-N).toPrecision(3)+"ms"),D.protocol="DASH",D}},c=t.getLogger(u),_=[new Ks,new js,new $s,new Qs],v=qs(e).create({adaptationset:new Xs,period:new Zs}),u}Zi.__dashjs_factory_name="DashParser";var ao=L.default.getClassFactory(Zi);function Ji(n){n=n||{};const e=this.context,t=n.debug,u=n.settings,c=(0,h.default)(e).getInstance(),_=(0,Ht.default)(e).getInstance();let v,I,g,D,N,E=n.mssHandler,f=n.errHandler;function A(U){c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:U.manifest})}return v={load:function(U,F=null,B=null){const x=new Date,W=new Vi(U,ke.HTTPRequest.MPD_TYPE);F&&(W.serviceLocation=F),B&&(W.queryParams=B),W.startDate||(W.startDate=x),c.trigger(m.default.MANIFEST_LOADING_STARTED,{request:W}),g.load({request:W,success:function(K,z,Z){if(!D)return;let M,R,S;if(Z&&Z!==U?(R=_.parseBaseUrl(Z),M=Z):(_.isRelative(U)&&(U=_.resolve(U,window.location.href)),R=_.parseBaseUrl(U)),z!="No Content")if(N===null&&(N=(function(b){let J=null;return b.indexOf("SmoothStreamingMedia")>-1?(E&&(J=E.createMssParser(),E.createMssFragmentProcessor(),E.registerEvents()),J):b.indexOf("MPD")>-1||b.indexOf("Patch")>-1?ao(e).create({debug:t}):J})(K)),N!==null){D.setParser(N);try{S=N.parse(K)}catch{return void c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new on.default(wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${U}`)})}if(S){if(S.url=M||U,S.originalUrl||(S.originalUrl=S.url),u&&u.get().streaming.enableManifestDurationMismatchFix&&S.mediaPresentationDuration&&S.Period.length>1){const b=S.Period.reduce(((J,O)=>J+O.duration),0);!isNaN(b)&&S.mediaPresentationDuration>b&&(I.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),S.mediaPresentationDuration=b)}S.baseUri=R,S.loadedTime=new Date,D.resolveManifestOnLoad(S),c.trigger(m.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:K})}else c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new on.default(wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${U}`)})}else c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new on.default(wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${U}`)});else c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(K,z,Z){c.trigger(m.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new on.default(wn.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,wn.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+`${U}, ${Z}`)})}})},reset:function(){c.off(m.default.XLINK_READY,A,v),E&&E.reset(),D&&(D.reset(),D=null),g&&(g.abort(),g=null)}},I=t.getLogger(v),c.on(m.default.XLINK_READY,A,v),g=(0,Bt.default)(e).create({errHandler:n.errHandler,dashMetrics:n.dashMetrics,mediaPlayerModel:n.mediaPlayerModel,urlUtils:_,constants:r.default,dashConstants:de.default,errors:wn.default}),D=Vs(e).create({errHandler:f,dashMetrics:n.dashMetrics,mediaPlayerModel:n.mediaPlayerModel,settings:n.settings}),N=null,v}Ji.__dashjs_factory_name="ManifestLoader";var so=L.default.getClassFactory(Ji);function ea(){let n,e,t=this.context,u=(0,h.default)(t).getInstance();return n={getValue:function(){return e},setValue:function(c){e=c,c&&u.trigger(m.default.MANIFEST_LOADED,{data:c})}},n}ea.__dashjs_factory_name="ManifestModel";var oo=L.default.getSingletonFactory(ea);function ta(){const n=this.context,e=(0,T.default)(n).getInstance();let t,u,c;return t={select:function(_){if(!_||_.length===0)return null;let v=null;return e.get().streaming.applyContentSteering&&(v=(function(I){const g=c.getCurrentSteeringResponseData();return g&&g.pathwayPriority&&g.pathwayPriority.length>0?(function(D=[],N=[]){let E=0,f=null;for(;E<D.length;){const A=D[E],U=N.findIndex((F=>F.serviceLocation&&F.serviceLocation===A));if(U!==-1&&!u.contains(N[U].serviceLocation)){f=N[U];break}E+=1}return f})(g.pathwayPriority,I):null})(_)),v||(v=(function(I){return I[0]})(_)),v},setConfig:function(_){_.blacklistController&&(u=_.blacklistController),_.contentSteeringController&&(c=_.contentSteeringController)},reset:function(){u.reset()}},u=Fn(n).create({updateEventName:m.default.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:m.default.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),c=ft(n).getInstance(),t}ta.__dashjs_factory_name="LocationSelector";var lo=L.default.getClassFactory(ta);function na(){const n=this.context,e=(0,h.default)(n).getInstance(),t=(0,Ht.default)(n).getInstance();let u,c,_,v,I,g,D,N,E,f,A,U,F,B,x;function W(){F=NaN,N=!1,g=!0,D=!1,K()}function K(){B!==null&&(clearTimeout(B),B=null)}
17function z($){K(),D||(isNaN($)&&!isNaN(F)&&($=1e3*F),isNaN($)||(f.debug("Refresh manifest in "+$+" milliseconds."),B=setTimeout(R,$)))}function Z($=!1){N=!0;const ie=U.getValue();let be=ie.url;be&&(be=tn.default.removeQueryParameterFromUrl(be,r.default.CMCD_QUERY_KEY));let Ce=null;const we=u.getPatchLocation(ie),ce=E.select(we);let le=null;if(ce&&!$)be=ce.url,Ce=ce.serviceLocation,le=ce.queryParams;else{const re=(function(ye){const te=u.getLocation(ye),q=c.getSynthesizedLocationElements(te);return te.concat(q)})(ie),me=E.select(re);me&&(be=me.url,Ce=me.serviceLocation,le=me.queryParams)}t.isRelative(be)&&(be=t.resolve(be,ie.url)),A.load(be,Ce,le)}function M($){if($){if(u.getIsPatch($)){let Ce=$;$=U.getValue();let we=u.isPatchValid($,Ce),ce=we;if(we){let le=u.getPublishTime($);u.applyPatchToManifest($,Ce);let re=u.getPublishTime($);ce=le.getTime()!==re.getTime()}if(!ce)return f.debug("Patch provided is invalid, performing full manifest refresh"),void Z(!0);$.loadedTime=new Date}}else($=U.getValue()).loadedTime=new Date;if(U.getValue()&&U.getValue().type===de.default.DYNAMIC&&$.type===de.default.STATIC)return e.trigger(m.default.DYNAMIC_TO_STATIC),N=!1,void(D=!0);U.setValue($);const ie=new Date,be=(ie.getTime()-$.loadedTime.getTime())/1e3;F=u.getManifestUpdatePeriod($,be),1e3*F>2147483647&&(F=2147483647e-3),e.trigger(m.default.MANIFEST_UPDATED,{manifest:$}),f.info("Manifest has been refreshed at "+ie+"["+ie.getTime()/1e3+"] "),g||z()}function R(){g||(N?z(x.get().streaming.manifestUpdateRetryInterval):Z())}function S($){if($.error)$.error.code===wn.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&v.error($.error);else{const ie=$.manifest;(function(be){(function(Ce){const we=_.getExternalSubtitles();if(!we||we.length===0)return;const ce=Ce&&Ce.Period?Ce.Period.length:0;we.forEach((le=>{if(le.periodId===null&&ce>1)f.warn(`External subtitle with id ${le.id} has no periodId and the MPD contains more than one period. Unable to add the external subtitle as it is not clear which period shall be used.`);else if(ce===1)b(Ce.Period[0],le);else{const re=Ce.Period.find((me=>me.id===le.periodId));re?b(re,le):f.warn(`External subtitle with id ${le.id} has periodId ${le.periodId} but the MPD does not contain a period with that id. Unable to add the external subtitle.`)}}))})(be)})(ie),M(ie)}}function b($,ie){if(!$||!$.AdaptationSet)return $;$.AdaptationSet.push(ie.serializeToMpdParserFormat())}function J(){g=!1,z()}function O(){g=!x.get().streaming.scheduling.scheduleWhilePaused,g&&K()}function ee(){N=!1}return I={getIsUpdating:function(){return N},initialize:function(){W(),e.on(m.default.STREAMS_COMPOSED,ee,this),e.on(H.default.PLAYBACK_STARTED,J,this),e.on(H.default.PLAYBACK_PAUSED,O,this),e.on(m.default.INTERNAL_MANIFEST_LOADED,S,this)},refreshManifest:Z,reset:function(){e.off(H.default.PLAYBACK_STARTED,J,this),e.off(H.default.PLAYBACK_PAUSED,O,this),e.off(m.default.STREAMS_COMPOSED,ee,this),e.off(m.default.INTERNAL_MANIFEST_LOADED,S,this),W()},setConfig:function($){$&&($.manifestModel&&(U=$.manifestModel),$.adapter&&(u=$.adapter),$.manifestLoader&&(A=$.manifestLoader),$.errHandler&&(v=$.errHandler),$.locationSelector&&(E=$.locationSelector),$.settings&&(x=$.settings),$.contentSteeringController&&(c=$.contentSteeringController),$.customParametersModel&&(_=$.customParametersModel))},setManifest:function($){M($)}},f=(0,p.default)(n).getInstance().getLogger(I),E=lo(n).create(),_=(0,vr.default)(n).getInstance(),I}na.__dashjs_factory_name="ManifestUpdater";var ra=L.default.getClassFactory(na);function uo(n,e){return function(t,u){let c=aa(t,"tag");const _=aa(u??"*","range"),v=[];let I=-1;for(;++I<_.length;){const g=_[I].toLowerCase();if(!e&&g==="*")continue;let D=-1;const N=[];for(;++D<c.length;)if(n(c[D].toLowerCase(),g)){if(!e)return c[D];v.push(c[D])}else N.push(c[D]);c=N}return e?v:void 0}}const ia=uo((function(n,e){const t=n.split("-"),u=e.split("-");let c=0,_=0;if(u[_]!=="*"&&t[c]!==u[_])return!1;for(c++,_++;_<u.length;)if(u[_]!=="*"){if(!t[c])return!1;if(t[c]!==u[_]){if(t[c].length===1)return!1;c++}else c++,_++}else _++;return!0}),!0);function aa(n,e){const t=n&&typeof n=="string"?[n]:n;if(!t||typeof t!="object"||!("length"in t))throw new Error("Invalid "+e+" `"+t+"`, expected non-empty string");return t}function Ci(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E,f;function A(te){if(!(te&&te.currentRepresentation&&te.currentRepresentation.mediaInfo&&te.currentRepresentation.mediaInfo.type))return;const q=te.currentRepresentation.mediaInfo.type;g[q]=te.currentRepresentation}function U(te,q){return te&&c[q]&&c[q][te]?c[q][te].list:[]}function F(te,q){return te&&c[q]&&c[q][te]?c[q][te].current:null}function B(te,q={}){if(!te||!te.streamInfo)return;const oe=te.type,Ue=te.streamInfo.id,Ge=F(oe,Ue);
17if(c[Ue]&&c[Ue][oe]&&(c[Ue][oe].current=te,c[Ue][oe].current&&(oe!==r.default.TEXT&&!K(te,Ge)||oe===r.default.TEXT&&te.isFragmented)&&e.trigger(m.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:Ge,newMediaInfo:te,switchMode:_.get().streaming.trackSwitchMode[oe],options:q},{streamId:Ue}),!q.hasOwnProperty("noSettingsSave")||!q.noSettingsSave)){let Ve=(function(je){const lt={lang:je.lang,viewpoint:je.viewpoint,roles:je.roles,accessibility:je.accessibility,audioChannelConfiguration:je.audioChannelConfiguration,codec:je.codec};return lt.lang||lt.viewpoint||lt.role&<.role.length>0||lt.accessibility&<.accessibility.length>0||lt.audioChannelConfiguration&<.audioChannelConfiguration.length>0?lt:null})(te);if(!Ve||!c[Ue][oe].storeLastSettings)return;Ve.roles&&(Ve.role=Ve.roles[0],delete Ve.roles),Ve.accessibility&&(Ve.accessibility=Ve.accessibility[0]),Ve.audioChannelConfiguration&&(Ve.audioChannelConfiguration=Ve.audioChannelConfiguration[0]),I[oe]=Ve,f.setSavedMediaSettings(oe,Ve)}}function x(te,q){te&&q&&(v[te]=q)}function W(te){return te?v[te]:null}function K(te,q){if(!te&&!q)return!0;if(!te||!q||te.isPreselection!==q.isPreselection)return!1;let oe=(0,Nn.default)(n).getInstance();const Ue=te.id===q.id,Ge=oe.areEqual(te.viewpoint,q.viewpoint),Ve=te.lang===q.lang,je=te.codec===q.codec,lt=oe.areEqual(te.roles,q.roles),Rt=oe.areEqual(te.accessibility,q.accessibility),Dt=oe.areEqual(te.audioChannelConfiguration,q.audioChannelConfiguration),an=oe.areEqual(te.supplementalProperties,q.supplementalProperties),vn=oe.areEqual(te.essentialProperties,q.essentialProperties);return Ue&&je&&Ge&&Ve&<&&Rt&&Dt&&an&&vn}function z(){c={},I={},g={},v={audio:null,video:null,text:null},e.off(H.default.REPRESENTATION_SWITCH,A,t)}function Z(te,q,oe){let Ue=[];return te.forEach((function(Ge){q(oe,Ge)&&Ue.push(Ge)})),Ue.length!==0?(u.info("Filter-Function ("+q.name+") resulted in "+Ue.length+" tracks"),Ue):q===J&&_.get().streaming.assumeDefaultRoleAsMain&&ye(oe.role,{schemeIdUri:r.default.DASH_ROLE_SCHEME_ID,value:de.default.MAIN})&&(u.info("no track with Role set to main - assuming main as default and searching again"),Ue=Z(te,O,null),Ue.length!==0)?Ue:(u.info("Filter-Function ("+q.name+") resulted in no tracks; setting ignored"),te)}function M(te,q){try{return!te.lang||te.lang instanceof RegExp?q.lang.match(te.lang):q.lang!==""&&ia(q.lang,Jr(te.lang)).length>0}catch{return!1}}function R(te,q){return te.index===void 0||te.index===null||q.index===te.index}function S(te,q){return te.id===void 0||te.id===null||q.id===te.id}function b(te,q){return!te.viewpoint||!!q.viewpoint.filter((function(oe){return ye(oe,te.viewpoint)}))[0]}function J(te,q,oe=!1){return!!q.roles&&(!te.role||!!q.roles.filter((function(Ue){return ye(Ue,te.role)}))[0]||q.type===r.default.AUDIO&&oe)}function O(te,q){return!q.roles||q.roles.length===0}function ee(te,q){let oe;return oe=te.accessibility?!!q.accessibility.filter((function(Ue){return ye(Ue,te.accessibility)}))[0]:!q.accessibility.length,oe}function $(te,q){return!te.audioChannelConfiguration||!!q.audioChannelConfiguration.filter((function(oe){return ye(oe,te.audioChannelConfiguration)}))[0]}function ie(te,q){return!te.codec||te.codec===q.codec}function be(te){let q=0,oe=[];return te.forEach((Ue=>{isNaN(Ue.selectionPriority)||(Ue.selectionPriority>q?(q=Ue.selectionPriority,oe=[Ue]):Ue.selectionPriority===q&&oe.push(Ue))})),oe}function Ce(te){let q,oe=0,Ue=[];return te.forEach((function(Ge){q=Math.max.apply(Math,Ge.bitrateList.map((function(Ve){return Ve.bandwidth}))),q>oe?(oe=q,Ue=[Ge]):q===oe&&Ue.push(Ge)})),Ue}function we(te){return te[0]&&te[0].type===r.default.VIDEO?(function(q){let oe,Ue=1/0,Ge=[];return q.forEach((function(Ve){oe=Ve.bitrateList.reduce((function(lt,Rt){const Dt=Math.max(1,Rt.width*Rt.height);return lt+Rt.bandwidth/Dt}),0)/Ve.bitrateList.length,oe<Ue?(Ue=oe,Ge=[Ve]):oe===Ue&&Ge.push(Ve)})),Ge})(te):te[0]&&te[0].type===r.default.AUDIO?(function(q){let oe=1/0,Ue=[];return q.forEach((function(Ge){let Ve=Ge.audioChannelConfiguration.reduce((function(lt,Rt){return lt+(Br(Rt)||0)}),0)/Ge.audioChannelConfiguration.length;Ge.hasOwnProperty("supplementalProperties")&&Ge.supplementalProperties.some((lt=>lt.schemeIdUri==="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&<.value==="JOC"))&&(Ve=16),Ve||(Ve=1);let je=Ge.bitrateList.reduce((function(lt,Rt){return lt+Rt.bandwidth/Ve}),0)/Ge.bitrateList.length;je<oe?(oe=je,Ue=[Ge]):je===oe&&Ue.push(Ge)})),Ue})(te):te}function ce(te){let q,oe=0,Ue=[];return te.forEach((function(Ge){q=Ge.representationCount,q>oe?(oe=q,Ue=[Ge]):q===oe&&Ue.push(Ge)})),Ue}function le(te,q){if(te===r.default.TEXT)return(function(Ge){if(!Ge||Ge.length===0)return null;const Ve=Ge.filter((je=>!(je&&je.roles&&je.roles.length>0)||je.roles.every((lt=>lt.schemeIdUri!==r.default.DASH_ROLE_SCHEME_ID||lt.value!==de.default.FORCED_SUBTITLE))));return Ve.length>0?Ve[0]:Ge[0]})(q);let oe;const Ue=D.getCustomInitialTrackSelectionFunction();if(oe=(function(Ge){try{let Ve;
17return Ve=(function(je){try{const lt=je.filter((Rt=>{const Dt=Rt.type;return Rt.bitrateList.some((an=>{const vn=N.getAbrBitrateParameter("maxBitrate",Dt),qn=N.getAbrBitrateParameter("minBitrate",Dt);return!(vn>-1&&an.bandwidth>1e3*vn||qn>-1&&an.bandwidth<1e3*qn)}))}));return lt.length>0?lt:je}catch(lt){return u.error(lt),je}})(Ge),Ve=(function(je){try{if(!_.get().streaming.abr.limitBitrateByPortal)return je;const{elementWidth:lt}=E.getVideoElementSize(),Rt=je.filter((Dt=>Dt.type!==r.default.VIDEO||Dt.bitrateList.some((an=>an.width<=lt))));return Rt.length>0?Rt:je}catch(lt){return u.error(lt),je}})(Ve),Ve}catch(Ve){return u.error(Ve),Ge}})(q),Ue&&typeof Ue=="function")oe=Ue(oe);else if(g[te])oe=(function(Ge,Ve){if(!Ge||Ge.length===0||!Ve||!g[Ve])return Ge;const je=g[Ve].bandwidth;if(!je||isNaN(je))return Ge;let lt={min:NaN,track:null};return Ge.forEach((Rt=>{Rt.bitrateList.forEach((Dt=>{const an=Math.abs(Dt.bandwidth-je);(isNaN(lt.min)||an<lt.min)&&(lt.min=an,lt.track=Rt)}))})),lt.track?[lt.track]:Ge})(oe,te);else if(_.get().streaming.ignoreSelectionPriority||(u.info("Trying to find track with highest selectionPriority"),oe=(function(Ge){return be(Ge)})(oe)),oe.length>1&&_.get().streaming.prioritizeRoleMain&&(u.info("Trying to find a main track"),oe=Z(oe,J,{role:{schemeIdUri:r.default.DASH_ROLE_SCHEME_ID,value:de.default.MAIN}})),oe.length>1){u.info("Selecting track based on selectionModeForInitialTrack");let Ge=_.get().streaming.selectionModeForInitialTrack;switch(Ge){case r.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:oe=(function(Ve){let je=Ce(Ve);return je.length>1&&(je=ce(je)),je})(oe);break;case r.default.TRACK_SELECTION_MODE_FIRST_TRACK:oe=re(oe);break;case r.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:oe=me(oe);break;case r.default.TRACK_SELECTION_MODE_WIDEST_RANGE:oe=(function(Ve){let je=ce(Ve);return je.length>1&&(je=Ce(Ve)),je})(oe);break;case r.default.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:oe=(function(Ve){let je=Ve.filter((lt=>!(!lt.segmentSequenceProperties||lt.segmentSequenceProperties.length===0)&<.segmentSequenceProperties.some((Rt=>Rt.isBootstrapConfiguration()))));return me(je.length>0?je:Ve)})(oe);break;default:u.warn(`Track selection mode ${Ge} is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK`),oe=re(oe)}}return oe.length>0?oe[0]:q[0]}function re(te){return te[0]}function me(te){let q=we(te);return q.length>1&&(q=Ce(q)),q}function ye(te,q){return!(!te||!q)&&JSON.stringify({schemeIdUri:te.schemeIdUri,value:te.value})===JSON.stringify({schemeIdUri:q.schemeIdUri,value:q.value})}return t={addTrack:function(te){if(!te)return;const q=te.type;if((oe=q)!==r.default.AUDIO&&oe!==r.default.VIDEO&&oe!==r.default.TEXT&&oe!==r.default.IMAGE)return void u.info("track not added (_isMultiTrackSupportedByType), track.index="+te.index);var oe;let Ue=te.streamInfo.id;c[Ue]||(c[Ue]=(function(){const Ve=_.get().streaming.saveLastMediaSettingsForCurrentStreamingSession;return{audio:{list:[],storeLastSettings:Ve,current:null},video:{list:[],storeLastSettings:Ve,current:null},text:{list:[],storeLastSettings:Ve,current:null},image:{list:[],storeLastSettings:Ve,current:null}}})());const Ge=c[Ue][q].list;for(let Ve=0,je=Ge.length;Ve<je;++Ve)if(K(Ge[Ve],te))return void u.info("track not added as it is already set (this track-index="+te.index+" - existing track.index="+Ge[Ve].index+")");u.info("addTrack with track.codec='"+te.codec+"', track.type='"+te.type+"', track.id='"+te.id+"', track.index="+te.index),Ge.push(te)},areTracksEqual:K,clearDataForStream:function(te){c[te]&&delete c[te]},getCurrentTrackFor:F,getInitialSettings:W,getTracksFor:U,getTracksWithHighestSelectionPriority:be,getTracksWithHighestBitrate:Ce,getTracksWithHighestEfficiency:we,getTracksWithWidestRange:ce,initialize:function(){e.on(H.default.REPRESENTATION_SWITCH,A,t)},isCurrentTrack:function(te){if(!te)return!1;const q=te.type,oe=te.streamInfo.id;return c[oe]&&c[oe][q]&&K(c[oe][q].current,te)},matchSettings:function(te,q,oe=!1){try{let Ue=!1;if(te.lang){if(te.lang instanceof RegExp)Ue=q.lang.match(te.lang);else if(q.lang!==""){const Dt=Jr(te.lang);Dt&&(Ue=ia(q.lang,Dt).length>0)}}else Ue=!0;const Ge=te.index===void 0||te.index===null||q.index===te.index,Ve=!te.viewpoint||!!q.viewpoint.filter((function(Dt){return ye(Dt,te.viewpoint)}))[0],je=!te.role||!!q.roles.filter((function(Dt){return ye(Dt,te.role)}))[0];let lt=!te.accessibility||!!q.accessibility.filter((function(Dt){return ye(Dt,te.accessibility)}))[0],Rt=!te.audioChannelConfiguration||!!q.audioChannelConfiguration.filter((function(Dt){return ye(Dt,te.audioChannelConfiguration)}))[0];return Ue&&Ge&&Ve&&(je||q.type===r.default.AUDIO&&oe)&<&&Rt}catch(Ue){return u.error(Ue),!1}}
17,matchSettingsAccessibility:ee,matchSettingsAudioChannelConfig:$,matchSettingsIndex:R,matchSettingsLang:M,matchSettingsRole:J,matchSettingsViewPoint:b,reset:z,saveTextSettingsDisabled:function(){f.setSavedMediaSettings(r.default.TEXT,null)},selectInitialTrack:le,setConfig:function(te){te&&(te.domStorage&&(f=te.domStorage),te.settings&&(_=te.settings),te.customParametersModel&&(D=te.customParametersModel),te.mediaPlayerModel&&(N=te.mediaPlayerModel),te.videoModel&&(E=te.videoModel))},setInitialMediaSettingsForType:function(te,q){let oe=I[te]||W(te);const Ue=U(te,q.id);let Ge=[];oe&&Object.keys(oe).length!==0||(oe=f.getSavedMediaSettings(te),oe&&delete oe.codec,x(te,oe)),Ue&&Ue.length!==0&&(Ge=_.get().streaming.includePreselectionsForInitialTrackSelection?Array.from(Ue):Ue.filter((Ve=>!Ve.isPreselection)),oe&&(u.info("Filtering "+Ge.length+" "+te+" tracks based on settings"),Ge=Z(Ge,S,oe),Ge=Z(Ge,M,oe),Ge=Z(Ge,R,oe),Ge=Z(Ge,b,oe),te===r.default.AUDIO&&I[te]||(Ge=Z(Ge,J,oe)),Ge=Z(Ge,ee,oe),Ge=Z(Ge,$,oe),Ge=Z(Ge,ie,oe),u.info("Filtering "+te+" tracks ended, found "+Ge.length+" matching track(s).")),Ge.length>1?B(le(te,Ge)):B(Ge[0]))},setInitialSettings:x,setTrack:B},u=(0,p.default)(n).getInstance().getLogger(t),z(),t}Ci.__dashjs_factory_name="MediaController";const sa=L.default.getSingletonFactory(Ci);L.default.updateSingletonFactory(Ci.__dashjs_factory_name,sa);var co=sa;function oa(){let n,e,t,u;const c=this.context,_=(0,T.default)(c).getInstance();function v(f,A){return isNaN(f)?0:f>0?(A&&e.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):f<-.5?(A&&e.warn("Supplied minimum playback rate is out of range and will be limited to -0.5: -50% playback speed."),-.5):f}function I(f,A){return isNaN(f)?0:f<0?(A&&e.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):f>1?(A&&e.warn("Supplied maximum playback rate is out of range and will be limited to 1: 200% playback speed."),1):f}function g(f,A){return isNaN(f)?0:f<0?(A&&e.warn("Supplied step algorithm value is a negative value when it should be positive or 0. The supplied value will not be applied and set to 0."),0):f<0?(A&&e.warn("Supplied step algorithm value is out of range and will be limited to 0"),0):f}function D(){const f=N(),A=t.getLiveDelay();return!isNaN(A)&&A>0?Math.min(f,A):f}function N(){return _.get().streaming.buffer.bufferTimeDefault>0?_.get().streaming.buffer.bufferTimeDefault:E()?20:12}function E(){return _.get().streaming.buffer.fastSwitchEnabled!==null?_.get().streaming.buffer.fastSwitchEnabled:!t.getLowLatencyModeEnabled()}return n={getAbrBitrateParameter:function(f,A){try{const U=_.get().streaming.abr[f][A];if(!isNaN(U)&&U!==-1)return U;const F=u.getServiceDescriptionSettings();return F&&F[f]&&!isNaN(F[f][A])?F[f][A]:-1}catch{return-1}},getBufferTimeDefault:D,getBufferTimeDefaultUnadjusted:N,getCatchupMaxDrift:function(){if(!isNaN(_.get().streaming.liveCatchup.maxDrift))return _.get().streaming.liveCatchup.maxDrift;const f=u.getServiceDescriptionSettings();return f&&f.liveCatchup&&!isNaN(f.liveCatchup.maxDrift)&&f.liveCatchup.maxDrift>=0?f.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return _.get().streaming.liveCatchup.enabled!==null?_.get().streaming.liveCatchup.enabled:t.getInitialCatchupModeActivated()},getCatchupPlaybackRates:function(f){const A=_.get().streaming.liveCatchup.playbackRate;if(!isNaN(A.min)||!isNaN(A.max))return{min:v(A.min,f),max:I(A.max,f)};const U=u.getServiceDescriptionSettings();if(U&&U.liveCatchup&&(!isNaN(U.liveCatchup.playbackRate.min)||!isNaN(U.liveCatchup.playbackRate.max))){const F=U.liveCatchup.playbackRate;return{min:v(F.min,f),max:I(F.max,f)}}return{min:-.5,max:.5}},getCatchupStepSettings:function(f){const A=_.get().streaming.liveCatchup.step;return isNaN(A.start.min)&&isNaN(A.start.max)&&isNaN(A.stop.min)&&isNaN(A.stop.max)?{start:{min:0,max:1},stop:{min:0,max:1}}:{start:{min:g(A.start.min,f),max:g(A.start.max,f)},stop:{min:g(A.stop.min,f),max:g(A.stop.max,f)}}},getFastSwitchEnabled:E,getInitialBufferLevel:function(){const f=_.get().streaming.buffer.initialBufferLevel;return isNaN(f)||f<0?0:Math.min(D(),f)},getRetryAttemptsForType:function(f){const A=isNaN(_.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:_.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return t.getLowLatencyModeEnabled()?_.get().streaming.retryAttempts[f]*A:_.get().streaming.retryAttempts[f]},getRetryIntervalsForType:function(f){const A=isNaN(_.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:_.get().streaming.retryIntervals.lowLatencyReductionFactor;return t.getLowLatencyModeEnabled()?_.get().streaming.retryIntervals[f]/A:_.get().streaming.retryIntervals[f]},getScheduleTimeout:function(){return t.getLowLatencyModeEnabled()?_.get().streaming.scheduling.lowLatencyTimeout:_.get().streaming.scheduling.defaultTimeout},reset:function(){},setConfig:function(f){f.playbackController&&(t=f.playbackController),f.serviceDescriptionController&&(u=f.serviceDescriptionController)}},e=(0,p.default)(c).getInstance().getLogger(n),n}oa.__dashjs_factory_name="MediaPlayerModel";var fo=L.default.getSingletonFactory(oa);function la(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R,S,b;function J(){ie(),B=!1,E=0,F=0,u=0,U=!1,A=!1,_=!1,W=NaN,N=NaN,S&&(e.off(m.default.DATA_UPDATE_COMPLETED,Ve,v),e.off(m.default.MANIFEST_UPDATED,Xe,v),e.off(m.default.STREAMS_COMPOSED,bt,v),e.off(H.default.PLAYBACK_ENDED,ln,v),e.off(H.default.STREAM_INITIALIZING,Xt,v),e.off(H.default.REPRESENTATION_SWITCH,Be,v),e.off(H.default.BUFFER_LEVEL_STATE_CHANGED,Rt,v),Ge(),S.removeEventListener("canplay",je),S.removeEventListener("canplaythrough",lt),S.removeEventListener("ended",Nt),S.removeEventListener("error",yn),S.removeEventListener("loadeddata",Mt),S.removeEventListener("loadedmetadata",Je),S.removeEventListener("pause",qn),S.removeEventListener("play",Dt),S.removeEventListener("playing",vn),S.removeEventListener("progress",kn),S.removeEventListener("ratechange",Un),S.removeEventListener("seeked",Wn),S.removeEventListener("seeking",Yn),S.removeEventListener("stalled",Ut),S.removeEventListener("timeupdate",xn),S.removeEventListener("volumechange",kt),S.removeEventListener("waiting",an)),b=null,S=null,M=null,g=null}function O(et=null){return parseFloat((ee(et)-ce()).toFixed(5))}function ee(et){const qt=et||M;return qt.start+qt.duration}
17function $(et=!1){M&&S&&S.getElement()?(et&&g&&we(ce()),S.play()):B=!0}function ie(){M&&S&&S.pause()}function be(et,qt=!1,$t=!1,rn=!1){M&&S&&S.getElement()&&et!==(isNaN(W)?S.getTime():W)&&(I=$t===!0,I||(W=et),f.info("Requesting seek to time: "+et+(I?" (internal)":"")),g&&rn&&we(et),S.setCurrentTime(et,qt))}function Ce(){if(!M||!S||!g)return;const et=Z&&Z.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO,qt=c.getCurrentDVRInfo(et);return qt&&qt.range?qt.range.end:0}function we(et){const qt=new Date(R.getClientReferenceTime()),$t=t.getRegularPeriods()[0];E=R.calcPresentationTimeFromWallTime(qt,$t)-et}function ce(){return M&&S?S.getTime():null}function le(){return M&&S?S.isPaused():null}function re(){return M&&S?S.isSeeking():null}function me(){return M&&S?S.isStalled():null}function ye(){return M&&S?S.getPlaybackRate():null}function te(){return M&&S?S.getEnded():null}function q(){return g}function oe(et=null){if(le()||!g||S.getReadyState()===0||re()||U)return;et||(et=Z.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO);const qt=ce(),$t=(function(rn,Mn){const _e=c.getCurrentDVRInfo(Mn),nt=_e?_e.range:null;let Kt;return nt?(Kt=rn>nt.end?Math.max(nt.end-E,nt.start):rn>0&&rn+.25<nt.start&&Math.abs(rn-nt.start)<31536e4?A?Math.max(nt.end-E,nt.start):nt.start:rn,Kt):NaN})(qt,et);!isNaN($t)&&$t!==qt&&!re()&&(me()||x||S.getReadyState()===1)&&(f.debug(`UpdateCurrentTime: Seek to actual time: ${$t} from currentTime: ${qt}`),be($t,!1,!1))}function Ue(){b===null&&(b=setInterval((()=>{(function(){if(e.trigger(m.default.WALLCLOCK_TIME_UPDATED,{isDynamic:g,time:new Date}),q()){const et=Date.now();(isNaN(N)||et>N+z.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(Z.addDVRMetric(),le()?(function(){const qt=Date.now();(!D||qt>D+500)&&(D=qt,xn())})():oe(),N=et)}})()}),z.get().streaming.wallclockTimeUpdateInterval))}function Ge(){clearInterval(b),b=null}function Ve(et){const qt=et.currentRepresentation,$t=qt?qt.mediaInfo.streamInfo:null;$t!==null&&M.id===$t.id&&(M=$t)}function je(){e.trigger(m.default.CAN_PLAY)}function lt(){e.trigger(m.default.CAN_PLAY_THROUGH)}function Rt(et){et.streamId===Z.getActiveStreamInfo().id&&(x=et.state===o.BUFFER_EMPTY,z.get().streaming.buffer.setStallState&&S.setStallState(et.mediaType,et.state===o.BUFFER_EMPTY))}function Dt(){f.info("Native video element event: play"),oe(),Ue(),e.trigger(m.default.PLAYBACK_STARTED,{startTime:ce()})}function an(){f.info("Native video element event: waiting"),e.trigger(m.default.PLAYBACK_WAITING,{playingTime:ce()})}function vn(){f.info("Native video element event: playing"),I=!1,e.trigger(m.default.PLAYBACK_PLAYING,{playingTime:ce()})}function qn(){f.info("Native video element event: pause"),e.trigger(m.default.PLAYBACK_PAUSED,{ended:te()})}function Yn(){if(I)return;let et=ce();isNaN(W)||W===et||(et=W),W=NaN,f.info("Seeking to: "+et),Ue(),e.trigger(m.default.PLAYBACK_SEEKING,{seekTime:et,streamId:M.id})}function Wn(){f.info("Native video element event: seeked"),I=!1,e.trigger(m.default.PLAYBACK_SEEKED,{streamId:M.id})}function xn(){M&&e.trigger(m.default.PLAYBACK_TIME_UPDATED,{timeToEnd:O(),time:ce(),streamId:M.id})}function kn(){e.trigger(m.default.PLAYBACK_PROGRESS,{streamId:M.id})}function Un(){const et=ye();f.info("Native video element event: ratechange: ",et),e.trigger(m.default.PLAYBACK_RATE_CHANGED,{playbackRate:et})}function Je(){f.info("Native video element event: loadedmetadata"),e.trigger(m.default.PLAYBACK_METADATA_LOADED),Ue()}function Mt(){f.info("Native video element event: loadeddata"),e.trigger(m.default.PLAYBACK_LOADED_DATA)}function Nt(){f.info("Native video element event: ended"),ie(),Ge();const et=Z?Z.getActiveStreamInfo():null;et&&e.trigger(m.default.PLAYBACK_ENDED,{isLast:et.isLast})}function kt(){e.trigger(m.default.PLAYBACK_VOLUME_CHANGED)}function ln(et){if(b&&et.isLast){f.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");const qt=et.seekTime?et.seekTime:ee();S.setCurrentTime(qt),ie(),Ge()}}function yn(et){const qt=et.target||et.srcElement;e.trigger(m.default.PLAYBACK_ERROR,{error:qt.error})}function at(){g=!1}function Ut(et){e.trigger(m.default.PLAYBACK_STALLED,{e:et})}function Xt(et){var qt;(qt=et.mediaInfo)&&qt.supplementalProperties&&qt.supplementalProperties.find(($t=>$t.schemeIdUri===r.default.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME))&&(f.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),A=!0)}function Be(et){const qt=Z.getActiveStreamInfo();et&&qt&&et.currentRepresentation&&et.streamId&&et.streamId===qt.id&&et.mediaType&&(et.mediaType===r.default.VIDEO||et.mediaType===r.default.AUDIO)&&(A=et.currentRepresentation.availabilityTimeComplete===!1||et.currentRepresentation.k>1,A&&!_&&(_=!0))}function Xe(){U=!0}function bt(){U=!1}return v={computeAndSetLiveDelay:function(et,qt){let $t,rn,Mn;const _e=!isNaN(et)&&isFinite(et)?et:NaN;let nt=t.getSuggestedPresentationDelay();const Kt=K.getServiceDescriptionSettings();return $t=isNaN(z.get().streaming.delay.liveDelay)?z.get().streaming.delay.liveDelayFragmentCount===null||isNaN(z.get().streaming.delay.liveDelayFragmentCount)||isNaN(_e)?Kt&&!isNaN(Kt.liveDelay)&&Kt.liveDelay>0?Kt.liveDelay:z.get().streaming.delay.useSuggestedPresentationDelay===!0&&nt!==null&&!isNaN(nt)&&nt>0?nt:isNaN(_e)?qt&&!isNaN(qt.minBufferTime)?4*qt.minBufferTime:4*M.manifestInfo.minBufferTime:4*_e:_e*z.get().streaming.delay.liveDelayFragmentCount:z.get().streaming.delay.liveDelay,Mn=t.getAvailabilityStartTime(),Mn!==null&&(u=Mn),rn=qt&&qt.dvrWindowSize>0?Math.min($t,qt.dvrWindowSize):$t,E=rn,F=rn,rn},getAvailabilityStartTime:function(){return u},getBufferLevel:function(et=null){let qt=null;
17return Z.getActiveStreamProcessors().forEach(($t=>{if(!et||et.length===0||et.indexOf($t.getType())===-1){const rn=$t.getBufferLevel();qt=qt===null?rn:Math.min(qt,rn)}})),qt},getCurrentLiveLatency:function(){if(!g||isNaN(u))return NaN;let et=ce();if(isNaN(et)||et===0)return 0;const qt=new Date().getTime()+1e3*R.getClientTimeOffset();return Math.max(((qt-u-1e3*et)/1e3).toFixed(3),0)},getEnded:te,getInitialCatchupModeActivated:function(){return _},getIsDynamic:q,getIsManifestUpdateInProgress:function(){return U},getLiveDelay:function(){return E},getLowLatencyModeEnabled:function(){return A},getOriginalLiveDelay:function(){return F},getPlaybackRate:ye,getPlaybackStalled:function(){return x},getPlayedRanges:function(){return M&&S?S.getPlayedRanges():null},getStreamController:function(){return Z},getStreamEndTime:ee,getTime:ce,getTimeToStreamEnd:O,initialize:function(et,qt){M=et,qt!==!0&&(S.addEventListener("canplay",je),S.addEventListener("canplaythrough",lt),S.addEventListener("ended",Nt),S.addEventListener("error",yn),S.addEventListener("loadeddata",Mt),S.addEventListener("loadedmetadata",Je),S.addEventListener("pause",qn),S.addEventListener("play",Dt),S.addEventListener("playing",vn),S.addEventListener("progress",kn),S.addEventListener("ratechange",Un),S.addEventListener("seeked",Wn),S.addEventListener("seeking",Yn),S.addEventListener("stalled",Ut),S.addEventListener("timeupdate",xn),S.addEventListener("volumechange",kt),S.addEventListener("waiting",an),g=M.manifestInfo.isDynamic,x=!1,I=!1,e.on(m.default.DATA_UPDATE_COMPLETED,Ve,v),e.on(m.default.MANIFEST_UPDATED,Xe,v),e.on(m.default.STREAMS_COMPOSED,bt,v),e.on(H.default.PLAYBACK_ENDED,ln,v,{priority:h.default.EVENT_PRIORITY_HIGH}),e.on(H.default.STREAM_INITIALIZING,Xt,v),e.on(H.default.REPRESENTATION_SWITCH,Be,v),e.on(H.default.BUFFER_LEVEL_STATE_CHANGED,Rt,v),e.on(H.default.DYNAMIC_TO_STATIC,at,v),B&&(B=!1,$()))},isPaused:le,isProgressing:function(et=500){return new Promise((qt=>{let $t=-1,rn=null;const Mn=nt=>{clearTimeout(rn),rn=null,e.off(H.default.PLAYBACK_TIME_UPDATED,_e,v),qt(nt)},_e=nt=>{$t<0?$t=nt.time:nt.time>$t+.1&&Mn(!0)};rn=setTimeout((()=>{Mn(!1)}),et),e.on(H.default.PLAYBACK_TIME_UPDATED,_e,v)}))},isSeeking:re,isStalled:me,pause:ie,play:$,reset:J,seek:be,seekToCurrentLive:function(et=!1,qt=!1,$t=!1){const rn=Ce();rn!==0&&be(rn-E,et,qt,$t)},seekToOriginalLive:function(et=!1,qt=!1,$t=!1){const rn=Ce();rn!==0&&(E=F,be(rn-E,et,qt,$t))},setConfig:function(et){et&&(et.streamController&&(Z=et.streamController),et.serviceDescriptionController&&(K=et.serviceDescriptionController),et.dashMetrics&&(c=et.dashMetrics),et.adapter&&(t=et.adapter),et.videoModel&&(S=et.videoModel),et.timelineConverter&&(R=et.timelineConverter),et.settings&&(z=et.settings))},updateCurrentTime:oe},f=(0,p.default)(n).getInstance().getLogger(v),J(),v}la.__dashjs_factory_name="PlaybackController";var go=L.default.getSingletonFactory(la),ho=P(1721),ua=class{constructor(){this.availabilityEndTime=NaN,this.availabilityStartTime=NaN,this.duration=NaN,this.index=null,this.indexRange=null,this.isPartialSegment=!1,this.media=null,this.mediaRange=null,this.mediaUrl=null,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.replacementNumber=NaN,this.replacementTime=null,this.representation=null,this.wallStartTime=NaN}assignAttributes(n){for(let e in n)n.hasOwnProperty(e)&&this.hasOwnProperty(e)&&(this[e]=n[e])}},Di=class extends ua{constructor(){super()}};function ca(){const n=this.context;let e,t,u,c,_,v,I,g,D,N,E,f;function A(x,W,K,z){let Z=null;const M=x?f.resolve(x.path):null,R=z||{init:!0,url:M?M.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:W,representation:x};t.debug("Start searching for initialization.");const S=B(R);I.load({request:S,success:function(b){if(R.bytesLoaded=R.range.end,Z=c.findInitRange(b),!Z)return R.range.end=R.bytesLoaded+R.bytesToLoad,A(x,W,K,R);x.range=Z,K(x)},error:function(){K(x)}}),t.debug("Perform init search: "+R.url)}function U(x,W,K,z,Z,M){if(K&&(K.start===void 0||K.end===void 0)){const $=K?K.toString().split("-"):null;K=$?{start:parseFloat($[0]),end:parseFloat($[1])}:null}Z=Z||F;let R=null,S=null;
17const b=!!K,J=x?f.resolve(x.path):null,O={init:!1,url:J?J.url:void 0,range:b?K:{start:0,end:1500},searching:!b,bytesLoaded:M?M.bytesLoaded:0,bytesToLoad:1500,mediaType:W,representation:x},ee=B(O);I.load({request:ee,success:function($){const ie=O.bytesToLoad,be=$.byteLength;if(O.bytesLoaded=O.range.end-O.range.start,R=c.parse($),S=R.getBox("sidx"),S&&S.isComplete){const Ce=S.references;let we,ce;if(Ce!=null&&Ce.length>0&&(we=Ce[0].reference_type===1),we){let le,re,me,ye,te;t.debug("Initiate multiple SIDX load."),O.range.end=O.range.start+S.size;let q=[],oe=0,Ue=(S.offset||O.range.start)+S.size;const Ge=function(Ve){Ve?(q=q.concat(Ve),oe++,oe>=re&&(q.sort((function(je,lt){return je.startTime-lt.startTime<0?-1:0})),Z(q,x,z))):Z(null,x,z)};for(le=0,re=Ce.length;le<re;le++)me=Ue,ye=Ue+Ce[le].referenced_size-1,Ue+=Ce[le].referenced_size,te={start:me,end:ye},U(x,W,te,z,Ge,O)}else t.debug("Parsing segments from SIDX. representation "+W+" - id: "+x.id+" for range : "+O.range.start+" - "+O.range.end),ce=(function(le,re){const me=le.references,ye=me.length,te=le.timescale;let q=le.earliest_presentation_time,oe=re.range.start+le.offset+le.first_offset+le.size;const Ue=[];let Ge,Ve,je,lt;for(let Rt=0;Rt<ye;Rt++)je=me[Rt].subsegment_duration,lt=me[Rt].referenced_size,Ge=new Di,Ge.duration=je,Ge.startTime=q,Ge.timescale=te,Ve=oe+lt-1,Ge.mediaRange=oe+"-"+Ve,Ue.push(Ge),q+=je,oe+=lt;return Ue})(S,O),Z(ce,x,z)}else{if(S)O.range.start=S.offset||O.range.start,O.range.end=O.range.start+(S.size||ie);else{if(be<O.bytesLoaded)return void Z(null,x,z);{const Ce=R.getLastBox();Ce&&Ce.size?(O.range.start=Ce.offset+Ce.size,O.range.end=O.range.start+ie):O.range.end+=ie}}U(x,W,O.range,z,null,O)}},error:function(){Z(null,x,z)}}),t.debug(`Perform SIDX load for type ${W} : ${O.url} with range ${O.range.start} - ${O.range.end}`)}function F(x,W,K){K({segments:x,representation:W,error:x?void 0:new on.default(g.SEGMENT_BASE_LOADER_ERROR_CODE,g.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function B(x){if(!x.url)return;const W=new k.default;return W.setInfo(x),W}return e={setConfig:function(x){x.baseURLController&&(f=x.baseURLController),x.dashMetrics&&(_=x.dashMetrics),x.mediaPlayerModel&&(v=x.mediaPlayerModel),x.errHandler&&(u=x.errHandler),x.boxParser&&(c=x.boxParser),x.debug&&(t=x.debug.getLogger(e)),x.errors&&(g=x.errors),x.urlUtils&&(E=x.urlUtils),x.constants&&(D=x.constants),x.dashConstants&&(N=x.dashConstants)},initialize:function(){I=(0,Bt.default)(n).create({errHandler:u,dashMetrics:_,mediaPlayerModel:v,boxParser:c,errors:g,urlUtils:E,constants:D,dashConstants:N})},loadInitialization:function(x,W){return new Promise((K=>{A(x,W,K)}))},loadSegments:function(x,W,K){return new Promise((z=>{U(x,W,K,z)}))},reset:function(){I&&(I.abort(),I=null)}},e}ca.__dashjs_factory_name="SegmentBaseLoader";var po=L.default.getSingletonFactory(ca);function fa(n){let e;n=n||{};let t=new DataView(n.data),u=0;function c(v,I){let g,D,N=!0,E=0;if(I===void 0&&(I=!1),v.tag>16777215?(t.getUint32(u)!==v.tag&&(N=!1),E=4):v.tag>65535?(g=t.getUint16(u),D=t.getUint8(u+2),256*g+D!==v.tag&&(N=!1),E=3):v.tag>255?(t.getUint16(u)!==v.tag&&(N=!1),E=2):(t.getUint8(u)!==v.tag&&(N=!1),E=1),!N&&v.required&&!I)throw new Error("required tag not found");return N&&(u+=E),N}function _(v){let I=1,g=128,D=-1,N=0,E=t.getUint8(u),f=0;for(f=0;f<8;f+=1){if((E&g)===g){N=v===void 0?E&~g:E,D=f;break}g>>=1}for(f=0;f<D;f+=1,I+=1)N=N<<8|255&t.getUint8(u+I);return u+=I,N}return e={getPos:function(){return u},setPos:function(v){u=v},consumeTag:c,consumeTagAndSize:function(v,I){let g=c(v,I);return g&&_(),g},parseTag:function(v){let I;return c(v),I=_(),e[v.parse](I)},skipOverElement:function(v,I){let g,D=c(v,I);return D&&(g=_(),u+=g),D},getMatroskaCodedNum:_,getMatroskaFloat:function(v){let I;switch(v){case 4:I=t.getFloat32(u),u+=4;break;case 8:I=t.getFloat64(u),u+=8}return I},getMatroskaUint:function(v){if(v>4)return(function(g){const D=Math.floor(Number.MAX_SAFE_INTEGER/256);let N=0;for(let E=0;E<g;E+=1){if(N>D)throw new Error("Value exceeds safe integer limit");N*=256;const f=t.getUint8(u+E);if(N>Number.MAX_SAFE_INTEGER-f)throw new Error("Value exceeds safe integer limit");N+=f}return u+=g,N})(v);let I=0;for(let g=0;g<v;g+=1)I<<=8,I|=255&t.getUint8(u+g);return u+=v,I>>>0},moreData:function(){return u<t.byteLength}},e}fa.__dashjs_factory_name="EBMLParser";var da=L.default.getClassFactory(fa);function ga(){const n=this.context;let e,t,u,c,_,v,I,g,D;function N(E){const f=new k.default;return f.setInfo(E),f}return e={setConfig:function(E){if(!(E.baseURLController&&E.dashMetrics&&E.mediaPlayerModel&&E.errHandler))throw new Error(r.default.MISSING_CONFIG_ERROR);D=E.baseURLController,_=E.dashMetrics,v=E.mediaPlayerModel,c=E.errHandler,g=E.errors,t=E.debug.getLogger(e)},initialize:function(){I=(0,Bt.default)(n).create({errHandler:c,dashMetrics:_,mediaPlayerModel:v,errors:g})},loadInitialization:function(E,f){return new Promise((A=>{let U=null,F=E?D.resolve(E.path):null,B=E?E.range.split("-"):null,x={range:{start:B?parseFloat(B[0]):null,end:B?parseFloat(B[1]):null},request:U,url:F?F.url:void 0,init:!0,mediaType:f};t.info("Start loading initialization."),U=N(x),I.load({request:U,success:function(){A(E)},error:function(){A(E)}}),t.debug("Perform init load: "+x.url)}))},loadSegments:function(E,f,A){return new Promise((U=>{let F=null,B=E?D.resolve(E.path):null,x=B?B.url:void 0;F=N({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:F,url:x,init:!1,mediaType:f,representation:E}),t.debug("Parsing ebml header"),I.load({request:F,success:function(W){(function(K,z,Z,M){if(!K||K.byteLength===0)return void M(null);let R,S,b,J,O=da(n).create({data:K}),ee=Z?Z.split("-"):null,$=null,ie={url:z,range:{start:ee?parseFloat(ee[0]):null,end:ee?parseFloat(ee[1]):null},request:$};for(t.debug("Parse EBML header: "+ie.url),O.skipOverElement(u.EBML),O.consumeTag(u.Segment),b=O.getMatroskaCodedNum(),b+=O.getPos(),J=O.getPos();
17O.moreData()&&!O.consumeTagAndSize(u.Segment.Info,!0);)if(!(O.skipOverElement(u.Segment.SeekHead,!0)||O.skipOverElement(u.Segment.Tracks,!0)||O.skipOverElement(u.Segment.Cues,!0)||O.skipOverElement(u.Void,!0)))throw new Error("no valid top level element found");for(;R===void 0;){let be=O.getMatroskaCodedNum(!0),Ce=O.getMatroskaCodedNum();be===u.Segment.Info.Duration.tag?R=O[u.Segment.Info.Duration.parse](Ce):O.setPos(O.getPos()+Ce)}$=N(ie),I.load({request:$,success:function(be){S=(function(Ce,we,ce,le){let re,me,ye,te,q,oe,Ue,Ge;for(me=(function(Ve){let je,lt,Rt=[],Dt=da(n).create({data:Ve});for(Dt.consumeTagAndSize(u.Segment.Cues);Dt.moreData()&&Dt.consumeTagAndSize(u.Segment.Cues.CuePoint,!0);){for(je={},je.CueTime=Dt.parseTag(u.Segment.Cues.CuePoint.CueTime),je.CueTracks=[];Dt.moreData()&&Dt.consumeTag(u.Segment.Cues.CuePoint.CueTrackPositions,!0);){const an=Dt.getMatroskaCodedNum(),vn=Dt.getPos();if(lt={},lt.Track=Dt.parseTag(u.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),lt.Track===0)throw new Error("Cue track cannot be 0");lt.ClusterPosition=Dt.parseTag(u.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),je.CueTracks.push(lt),Dt.setPos(vn+an)}if(je.CueTracks.length===0)throw new Error("Mandatory cuetrack not found");Rt.push(je)}if(Rt.length===0)throw new Error("mandatory cuepoint not found");return Rt})(Ce),ye=[],q=0,oe=me.length;q<oe;q+=1)te=new Di,re=0,re=q<me.length-1?me[q+1].CueTime-me[q].CueTime:le-me[q].CueTime,te.duration=re,te.startTime=me[q].CueTime,te.timescale=1e3,Ue=me[q].CueTracks[0].ClusterPosition+we,Ge=q<me.length-1?me[q+1].CueTracks[0].ClusterPosition+we-1:ce-1,te.mediaRange=Ue+"-"+Ge,ye.push(te);return t.debug("Parsed cues: "+ye.length+" cues."),ye})(be,J,b,R),M(S)},error:function(){t.error("Download Error: Cues "+ie.url),M(null)}}),t.debug("Perform cues load: "+ie.url+" bytes="+ie.range.start+"-"+ie.range.end)})(W,x,A,(function(K){U({segments:K,representation:E,error:K?void 0:new on.default(g.SEGMENT_BASE_LOADER_ERROR_CODE,g.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){U({representation:E,error:new on.default(g.SEGMENT_BASE_LOADER_ERROR_CODE,g.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})}))},reset:function(){I&&(I.abort(),I=null)}},u={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}},e}ga.__dashjs_factory_name="WebmSegmentBaseLoader";var mo=L.default.getSingletonFactory(ga);function ha(n){n=n||{};const e=this.context,t=n.eventBus,u=n.events,c=n.dashMetrics,_=n.mediaPlayerModel,v=n.errHandler,I=n.baseURLController,g=n.debug,D=n.boxParser,N=n.errors;let E,f,A;function U(F){return(F?F.split("/")[1]:"").toLowerCase()==="webm"}return E={initialize:function(){f.initialize(),A.initialize()},getSegmentBaseInitSegment:function(F){return U(F.representation.mimeType)?A.loadInitialization(F.representation,F.mediaType):f.loadInitialization(F.representation,F.mediaType)},getSegmentList:function(F){return U(F.mimeType)?A.loadSegments(F.representation,F.mediaType,F.representation?F.representation.indexRange:null):f.loadSegments(F.representation,F.mediaType,F.representation?F.representation.indexRange:null)},reset:function(){f.reset(),A.reset()}},f=po(e).getInstance(),A=mo(e).getInstance(),f.setConfig({baseURLController:I,dashMetrics:c,mediaPlayerModel:_,errHandler:v,eventBus:t,events:u,errors:N,debug:g,boxParser:D}),A.setConfig({baseURLController:I,dashMetrics:c,mediaPlayerModel:_,errHandler:v,eventBus:t,events:u,errors:N,debug:g}),E}ha.__dashjs_factory_name="SegmentBaseController";var Eo=L.default.getSingletonFactory(ha);const To=[r.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME],pa="video",ma="audio";function Ea(){const n=this.context;let e,t,u,c,_;function v(){t={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null,clientDataReporting:null},u=[]}function I(g,D,N){try{t[g][D]=N/1e3}catch(E){c.error(E)}}
17return e={applyServiceDescription:function(g){if(!g||!g.serviceDescriptions)return;const D=g.serviceDescriptions.filter((f=>To.includes(f.schemeIdUri))),N=g.serviceDescriptions.filter((f=>f.schemeIdUri==null));let E=D.length>0?D[D.length-1]:N[N.length-1];E&&(E.latency&&E.latency.target>0&&(function(f){let A;if(f.schemeIdUri,r.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME,A=(function(U){return{liveDelay:U.latency.target/1e3,maxDrift:!isNaN(U.latency.max)&&U.latency.max>U.latency.target?(U.latency.max-U.latency.target+500)/1e3:NaN,referenceId:U.latency.referenceId||NaN}})(f),u.length>0){let{to:U,id:F}=(function(B){let x,W=0,K=u.filter((z=>z.id===B.referenceId));return K.length===0?(W=u.length>0?u[0].to:0,x=u[0].id||NaN):(W=K[0].to||0,x=K[0].id||NaN),{to:W,id:x}})(A);t.liveDelay=A.liveDelay-U,t.liveCatchup.maxDrift=A.maxDrift,c.debug(` 18 Found latency properties coming from service description. Applied time offset of ${U} from ProducerReferenceTime element with id ${F}. 19 Live Delay: ${A.liveDelay-U}, Live catchup max drift: ${A.maxDrift} 20 `)}else t.liveDelay=A.liveDelay,t.liveCatchup.maxDrift=A.maxDrift,c.debug(`Found latency properties coming from service description: Live Delay: ${A.liveDelay}, Live catchup max drift: ${A.maxDrift}`)})(E),E.playbackRate&&(function(f){const A=f.playbackRate.min?Math.round(1e3*(f.playbackRate.min-1))/1e3:NaN,U=f.playbackRate.max?Math.round(1e3*(f.playbackRate.max-1))/1e3:NaN;t.liveCatchup.playbackRate.min=A,t.liveCatchup.playbackRate.max=U,c.debug(`Found latency properties coming from service description: Live catchup min playback rate: ${A}`),c.debug(`Found latency properties coming from service description: Live catchup max playback rate: ${U}`)})(E),E.operatingQuality,E.operatingBandwidth&&(function(f){if(!f||!f.operatingBandwidth||!f.operatingBandwidth.mediaType||f.operatingBandwidth.mediaType==="all")return;const A={};A.minBandwidth=f.operatingBandwidth.min,A.maxBandwidth=f.operatingBandwidth.max,A.targetBandwidth=f.operatingBandwidth.target;const U=[];f.operatingBandwidth.mediaType===pa||f.operatingBandwidth.mediaType===ma?U.push(f.operatingBandwidth.mediaType):f.o
20peratingBandwidth.mediaType==="any"&&(U.push(ma),U.push(pa)),U.forEach((F=>{isNaN(A.minBandwidth)||I("minBitrate",F,A.minBandwidth),isNaN(A.maxBandwidth)||I("maxBitrate",F,A.maxBandwidth),isNaN(A.targetBandwidth)||I("initialBitrate",F,A.targetBandwidth)}))})(E),E.contentSteering&&(function(f){t.contentSteering=f.contentSteering})(E),E.clientDataReporting&&(function(f){t.clientDataReporting=f.clientDataReporting})(E))},calculateProducerReferenceTimeOffsets:function(g){try{let D=[];if(g&&g.length>0){const N=[r.default.VIDEO,r.default.AUDIO,r.default.TEXT],E=_.getAvailabilityStartTime()/1e3;g.forEach((f=>{const A=N.reduce(((U,F)=>U.concat(_.getAllMediaInfoForType(f,F))),[]).reduce(((U,F)=>(_.getProducerReferenceTimes(f,F).forEach((B=>{const x=_.getVoRepresentations(F);if(x&&x.length>0&&x[0].adaptation&&x[0].segmentInfoType===de.default.SEGMENT_TEMPLATE){const W=x[0],K=new Date(B[de.default.WALL_CLOCK_TIME]).getTime()/1e3-(B[de.default.PRESENTATION_TIME]/W[de.default.TIMESCALE]-W[de.default.PRESENTATION_TIME_OFFSET]+f.start),z=E-K;U.push({id:B[de.default.ID],to:z})}})),U)),[]);D=D.concat(A)}))}u=D}catch(D){c.error(D),u=[]}},getProducerReferenceTimeOffsets:function(){return u},getServiceDescriptionSettings:function(){return t},reset:function(){v()},setConfig:function(g){g&&g.adapter&&(_=g.adapter)}},c=(0,p.default)(n).getInstance().getLogger(e),v(),e}Ea.__dashjs_factory_name="ServiceDescriptionController";var _o=L.default.getSingletonFactory(Ea);class yo{constructor(e){this._ranges=[];for(const t of e){const u=this._ranges,c={start:t.start,end:t.end},_=u.length?u[u.length-1]:null;!_||c.start>_.end?u.push(c):_.end=c.end}}get length(){return this._ranges.length}start(e){return this._ranges[e].start}end(e){return this._ranges[e].end}}var Ta=class{constructor(n,e){this.eventBus=e,this.mimeType=n,this.updating=!1,this.chunks=[],this.appendWindowStart=0,this.appendWindowEnd=1/0,this.timestampOffset=0,this.mode="segments"}appendBuffer(n,e,t){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"appendBuffer",data:n,start:e,end:t}),Number.isNaN(e)||(this.chunks.push({data:n,start:e,end:t}),this.chunks.sort(((u,c)=>u.start-c.start))),setTimeout((()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})}),10)}abort(){this.updating&&(this.updating=!1,this.eventBus.trigger("externalSourceBufferAbort",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType}))}remove(n,e){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"remove",start:n,end:e}),this.chunks=this.chunks.filter((t=>t.end<=n||t.start>=e)),setTimeout((()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})}),10)}get buffered(){return new yo(this.chunks)}},So=class{constructor(n){this.eventBus=n,this.reset()}get duration(){return this._duration}set duration(n){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");this._duration=n}get readyState(){return this._readyState}addSourceBuffer(n){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");const e=new Ta(n,this.eventBus);return this.sourceBuffers.set(e,n),e}removeSourceBuffer(n){if(!this.sourceBuffers.has(n))throw new Error("ExternalSourceBuffer not found");this.sourceBuffers.delete(n)}open(){this._readyState="open",this.eventBus.trigger("externalMediaSourceOpen",{})}endOfStream(){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");this._readyState="ended",this.eventBus.trigger("externalMediaSourceEnded",{})}close(){this._readyState="closed",this.eventBus.trigger("externalMediaSourceClosed",{})}reset(){this.sourceBuffers=new Map,this._duration=NaN,this._readyState="closed"}},Io=class{constructor(){this.streamId=null,this.segmentType=null,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representation=null,this.endFragment=null}};class Ro extends k.default{constructor(e){super(e),this.checkForExistenceOnly=!0}}var Ao=Ro;function _a(n){n=n||{};const e=this.context,t=n.eventBus,u=n.events,c=n.urlUtils,_=n.errors,v=n.streamId;let I,g;return I={abort:function(){g&&g.abort()},checkForExistence:function(D){const N=function(E){t.trigger(u.CHECK_FOR_EXISTENCE_COMPLETED,{request:D,exists:E})};if(D){let E=new Ao(D.url);g.load({request:E,success:function(){N(!0)},error:function(){N(!1)}})}else N(!1)},load:function(D){const N=function(E,f){t.trigger(u.LOADING_COMPLETED,{request:D,response:E||null,error:f||null,sender:I})};D?g.load({request:D,progress:function(E){t.trigger(u.LOADING_PROGRESS,{request:D,stream:E.stream,streamId:v}),E.data&&t.trigger(u.LOADING_DATA_PROGRESS,{request:D,response:E.data||null,error:null,sender:I})},success:function(E){N(E)},error:function(E,f,A){N(void 0,new on.default(_.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,A,f))},abort:function(E){E&&t.trigger(u.LOADING_ABANDONED,{mediaType:E.mediaType,request:E,sender:I})}}):N(void 0,new on.default(_.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,_.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},reset:function(){g&&(g.abort(),g.reset(),g=null)},resetInitialSettings:function(){g&&g.resetInitialSettings()}},g=(0,Bt.default)(e).create({errHandler:n.errHandler,errors:_,dashMetrics:n.dashMetrics,mediaPlayerModel:n.mediaPlayerModel,urlUtils:c,constants:r.default,boxParser:n.boxParser,dashConstants:n.dashConstants}),I}_a.__dashjs_factory_name="FragmentLoader";var No=L.default.getClassFactory(_a);function ya(n){n=n||{};const e=this.context,t=(0,h.default)(e).getInstance(),u=n.errHandler,c=n.mediaPlayerModel,_=n.dashMetrics,v=(0,p.default)(e).getInstance(),I=n.streamInfo;let g,D,N;function E(){return I.id}function f(){for(let U in N)N[U].reset();N={}}function A(U){if(!U.sender)return;const F=U.request,B=U.response,x=F.isInitializationRequest(),W=F.representation.mediaInfo.streamInfo;if(U.error&&(F.mediaType===r.default.AUDIO||F.mediaType===r.default.VIDEO||F.mediaType===r.default.TEXT&&F.representation.mediaInfo.isFragmented)&&t.trigger(m.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:U.request.serviceLocation}),!B||!W)return void D.warn("No "+F.mediaType+" bytes to push or stream is inactive.");const K=(function(z,Z,M,R){const S=new Io;return S.streamId=M,S.segmentType=Z.type,S.start=Z.startTime,S.duration=Z.duration,S.end=S.start+S.duration,S.bytes=z,S.index=Z.index,S.representation=Z.representation,S.endFragment=R,S})(B,F,I.id,U.type!==m.default.FRAGMENT_LOADING_PROGRESS);t.trigger(x?m.default.INIT_FRAGMENT_LOADED:m.default.MEDIA_FRAGMENT_LOADED,{chunk:K,request:F},{streamId:W.id,mediaType:F.mediaType})}return g={getStreamId:E,getModel:function(U){let F=N[U];return F||(F=Le(e).create({streamInfo:I,type:U,dashMetrics:_,fragmentLoader:No(e).create({dashMetrics:_,mediaPlayerModel:c,errHandler:u,settings:n.settings,boxParser:n.boxParser,eventBus:t,events:m.default,errors:wn.default,dashConstants:n.dashConstants,urlUtils:n.urlUtils,streamId:E()}),debug:v,eventBus:t,events:m.default}),N[U]=F),F},reset:function(){t.off(H.default.FRAGMENT_LOADING_COMPLETED,A,this),t.off(H.default.FRAGMENT_LOADING_PROGRESS,A,this),f()}},D=v.getLogger(g),f(),t.on(H.default.FRAGMENT_LOADING_COMPLETED,A,g),t.on(H.default.FRAGMENT_LOADING_PROGRESS,A,g),g}ya.__dashjs_factory_name="FragmentController";var bo=L.default.getClassFactory(ya),Fr=class{constructor(n){this.newMediaInfo=n.newMediaInfo,this.previouslySelectedRepresentation=n.previouslySelectedRepresentation,this.newRepresentation=n.newRepresentation}};function Sa(n){const e=this.context,t=(0,T.default)(e).getInstance(),u=n.textController,c=n.eventBus;let _,v,I,g,D,N,E=[],f=[],A=!1,U=n.mediaSource,F=null;function B(O){return O.mimeType+';codecs="'+O.codecs+'"'}function x(O){return g=u.getTextSourceBuffer(O),Promise.resolve()}function W(){if(typeof g.addEventListener=="function")try{g.addEventListener("updateend",S,!1),g.addEventListener("error",b,!1),g.addEventListener("abort",b,!1)}catch{N=setInterval(S,50)}else N=setInterval(S,50)}function K(){try{typeof g.removeEventListener=="function"&&(g.removeEventListener("updateend",S,!1),g.removeEventListener("error",b,!1),g.removeEventListener("abort",b,!1)),clearInterval(N)}catch(O){I.error(O)}}function z(O){return new Promise((ee=>{g&&t.get().streaming.buffer.useAppendWindow?J((()=>{try{if(!g)return void ee();let $=U.duration,ie=0;O&&!isNaN(O.start)&&!isNaN(O.duration)&&isFinite(O.duration)&&($=O.start+O.duration),O&&!isNaN(O.start)&&(ie=O.start),g.appendWindowEnd===$&&g.appendWindowStart===ie||(g.appendWindowStart=0,g.appendWindowEnd=$+.01,g.appendWindowStart=Math.max(ie-.1,0),I.debug(`Upd
20ated append window for ${D.type}. Set start to ${g.appendWindowStart} and end to ${g.appendWindowEnd}`)),ee()}catch{I.warn("Failed to set append window"),ee()}})):ee()}))}function Z(O){return new Promise((ee=>{g?J((()=>{try{g.timestampOffset===O||isNaN(O)||(g.timestampOffset=O,I.debug(`Set MSE timestamp offset to ${O}`)),ee()}catch{ee()}})):ee()}))}function M(){if(!A&&f.length>0){A=!0;const O=f[0];f.splice(0,1);const ee=function(){A=!1,f.length>0&&M.call(this),O&&O.data&&O.data.segmentType&&O.data.segmentType!==ke.HTTPRequest.INIT_SEGMENT_TYPE&&delete O.data.bytes,O.promise.resolve({chunk:O.data})};try{if(F=O.request,O.data.bytes.byteLength===0)ee.call(this);else{try{I.debug(`Appending ${O.data.segmentType} from period ${O.data.streamId} to buffer. Request URL: ${O.request.url}, Representation: ID: ${O.data.representation.id}, bitrate: ${O.data.representation.bitrateInKbit}`)}catch{}g instanceof Ta?g.appendBuffer(O.data.bytes,O.data.start,O.data.end):g.appendBuffer?g.appendBuffer(O.data.bytes):g.append(O.data.bytes,O.data),J(ee.bind(this))}}catch($){I.fatal('SourceBuffer append failed "'+$+'"'),f.length>0?M():A=!1,delete O.data.bytes,O.promise.reject({chunk:O.data,error:new on.default($.code,$.message)})}}}function R(){E.length>0&&!g.updating&&(E.shift()(),R())}function S(){g&&!g.updating&&R()}function b(O){const ee=O.target||{};(function($,ie){let be=ie||{};c.trigger($,be,{streamId:D.streamInfo.id,mediaType:v})})(m.default.SOURCE_BUFFER_ERROR,{error:ee,lastRequestAppended:F})}function J(O){try{E.push(O),g&&!g.updating&&R()}catch(ee){I.error(ee)}}return _={abort:function(){return new Promise((O=>{try{f=[],U.readyState==="open"?J((()=>{try{g&&g.abort(),O()}catch{O()}})):(g&&g.setTextTrack&&U.readyState==="ended"&&g.abort(),O())}catch{O()}}))},abortBeforeAppend:function(){return new Promise((O=>{J((()=>{const ee=g.appendWindowStart,$=g.appendWindowEnd;g&&(g.abort(),g.appendWindowStart=ee,g.appendWindowEnd=$),O()}))}))},append:function(O,ee=null){return new Promise((($,ie)=>{O?(f.push({data:O,promise:{resolve:$,reject:ie},request:ee}),J(M.bind(this))):ie({chunk:O,error:new on.default(wn.default.APPEND_ERROR_CODE,wn.default.APPEND_ERROR_MESSAGE)})}))},changeType:function(O){const ee=B(O);return new Promise((($,ie)=>{J((()=>{if(g&&g.changeType)try{I.debug(`Changing SourceBuffer codec to ${ee}`),g.changeType(ee),$()}catch(be){(function(Ce){I.error(Ce),typeof Ce?.name=="string"&&Ce.name==="NotSupportedError"&&t.update({streaming:{buffer:{useChangeType:!1,resetSourceBuffersForTrackSwitch:!0}}})})(be),ie()}else $()}))}))},getAllBufferRanges:function(){try{return g?.buffered}catch(O){return I.error("getAllBufferRanges exception: "+O.message),null}},getBuffer:function(){return g},getType:function(){return v},initializeForFirstUse:function(O,ee){D=O;const $=O.streamInfo;v=D.type;const ie=ee?B(ee):O.codec;try{if(ie.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return x($);g=U.addSourceBuffer(ie),W();const be=[];return be.push(z(D.streamInfo)),ee&&ee.mseTimeOffset!==void 0&&be.push(Z(ee.mseTimeOffset)),Promise.all(be)}catch(be){return D.type==r.default.TEXT&&!D.isFragmented||ie.indexOf('codecs="stpp')!==-1||ie.indexOf('codecs="vtt')!==-1||ie.indexOf("text/vtt")!==-1?x($):Promise.reject(be)}},initializeForStreamSwitch:function(O,ee,$){D=O,v=D.type,(function(ie){g=ie.getBuffer()})($),W()},remove:function(O){return new Promise(((ee,$)=>{const ie=O.start,be=O.end;ie>=0&&be>ie?J((function(){try{g.remove(ie,be),J((function(){ee({from:ie,to:be,unintended:!1}),O.resolve&&O.resolve()}))}catch(Ce){$({from:ie,to:be,unintended:!1,error:new on.default(wn.default.REMOVE_ERROR_CODE,wn.default.REMOVE_ERROR_MESSAGE)}),O.reject&&O.reject(Ce)}})):ee()}))},removeEventListeners:K,reset:function(){if(g){try{E=[],K(),A=!1,f=[],g.getClassName&&g.getClassName()==="TextSourceBuffer"||(I.debug("Removing sourcebuffer from media source"),U.removeSourceBuffer(g))}catch{}g=null}F=null},updateAppendWindow:z,updateTimestampOffset:Z},I=(0,p.default)(e).getInstance().getLogger(_),_}Sa.__dashjs_factory_name="SourceBufferSink";var Ia=L.default.getClassFactory(Sa);function Ra(n){const e=this.context;let t,u,c,_=[],v=[],I=n;return t={getAllBufferRanges:function(){let g=[];for(let N=0;N<v.length;N++){let E=v[N];g.length===0||E.start>g[g.length-1].end?g.push({start:E.start,end:E.end}):g[g.length-1].end=E.end}const D={start:function(N){return g[N].start},end:function(N){return g[N].end}};return Object.defineProperty(D,"length",{get:function(){return g.length}}),D},append:function(g){return g.segmentType!=="InitializationSegment"?(v.push(g),v.sort((function(D,N){return D.start-N.start})),c=null):(_.includes(g)||_.push(g),c=g),u.debug("PreBufferSink a
20ppended chunk s: "+g.start+"; e: "+g.end),I&&I({chunk:g}),Promise.resolve()},remove:function(g,D){return v=v.filter((N=>!((isNaN(D)||N.start<D)&&(isNaN(g)||N.end>g)))),Promise.resolve()},abort:function(){return Promise.resolve()},discharge:function(){const g=v;let D=null;for(let N=0;N<g.length;N++)D&&g[N].representation.id==D.representation.id||(D=_.find((E=>E.representation.id===g[N].representation.id)),D&&(g.splice(N,0,D),N++));return c&&(g.push(c),c=null),v=[],_=[],g},reset:function(){v=[],_=[],c=null,I=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(g){g()},getBuffer:function(){return this}},u=(0,p.default)(e).getInstance().getLogger(t),t}Ra.__dashjs_factory_name="PreBufferSink";var Co=L.default.getClassFactory(Ra);const vi=.01,Aa="BufferController";function Na(n){const e=(n=n||{}).capabilities,t=this.context,u=(0,h.default)(t).getInstance(),c=n.fragmentModel,_=n.playbackController,v=n.representationController,I=n.settings,g=n.streamInfo,D=n.textController,N=n.type;let E,f,A,U,F,B,x,W,K,z,Z,M,R,S,b,J,O,ee,$,ie,be;function Ce(Be,Xe=null){return new Promise(((bt,et)=>{B=Be,K&&Xe&&typeof K.discharge=="function"?(z=K,we(Xe).then((()=>{bt()})).catch((qt=>{et(qt)}))):bt()}))}function we(Be,Xe=new Map,bt){return new Promise(((et,qt)=>{ee&&Be?B?(Z=!1,(function($t,rn,Mn){return new Promise((_e=>{K=Ia(t).create({mediaSource:B,textController:D,eventBus:u}),(function(nt,Kt,$e){const Gt=v.getCurrentRepresentation();let hn=null;return N!==r.default.VIDEO&&N!==r.default.AUDIO||(hn=Kt.get(N)),hn?(function(Cn,On,Dn,Kn){K.initializeForStreamSwitch(Cn,On,Dn);const zn=[];return zn.push(K.abortBeforeAppend()),zn.push(Je()),zn.push(q(On,Kn)),On&&On.mseTimeOffset!==void 0&&zn.push(Un(On)),Promise.allSettled(zn)})(nt,Gt,hn,$e):(function(Cn,On){return K.initializeForFirstUse(Cn,On)})(nt,Gt)})($t,rn,Mn).then((()=>Un(v.getCurrentRepresentation()))).then((()=>{_e(K)})).catch((nt=>{f.warn("Caught error on create SourceBuffer: "+nt),_e(K)}))}))})(Be,Xe,bt).then(($t=>{et($t)})).catch(($t=>{qt($t)}))):(Z=!0,(function(){return new Promise((($t,rn)=>{K=Co(t).create(ye.bind(this)),Un(v.getCurrentRepresentation()).then((()=>{$t(K)})).catch((()=>{rn()}))}))})().then(($t=>{et($t)})).catch(($t=>{qt($t)}))):et(null)}))}function ce(Be){I.get().streaming.cacheInitSegments&&(f.info("Init fragment finished loading saving to",N+"'s init cache"),ee.save(Be.chunk)),f.debug(`Appending init fragment for type ${N}, representationId ${Be.chunk.representation.id} and bandwidth ${Be.chunk.representation.bandwidth}`),re(Be.chunk)}function le(Be){re(Be.chunk,Be.request)}function re(Be,Xe=null){K&&(K.append(Be,Xe).then((bt=>{ye(bt)})).catch((bt=>{ye(bt)})),Be.representation.mediaInfo.type===r.default.VIDEO&&Ut(m.default.VIDEO_CHUNK_RECEIVED,{chunk:Be}))}function me(Be){if(Be&&Be.length>0)for(let Xe=0,bt=Be.length;Xe<bt;Xe++)f.debug("Buffered range: "+Be.start(Xe)+" - "+Be.end(Xe)+", currentTime = ",_.getTime())}function ye(Be){if(Be.error)return void(function(et){et.error.code===22&&(function(){if(O=!0,F=.8*ln(),f.warn("Quota exceeded, Critical Buffer: "+F),F>0){const qt=Math.max(.2*F,1),$t=F-qt,rn=Math.min(I.get().streaming.buffer.bufferTimeAtTopQuality,.9*$t),Mn=Math.min(I.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*$t),_e={streaming:{buffer:{bufferToKeep:parseFloat(qt.toFixed(5)),bufferTimeAtTopQuality:parseFloat(rn.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(Mn.toFixed(5))}}};I.update(_e)}})(),et.error.code!==22&&at()||(f.warn("Clearing playback buffer to overcome quota exceed situation"),Ut(m.default.QUOTA_EXCEEDED,{criticalBufferLevel:F,quotaExceededTime:et.chunk.start}),Wn(Yn()))})(Be);if(!K||(Rt(),O=!1,S=Be.chunk,!S||!S.endFragment))return;S&&!isNaN(S.index)&&(x=Math.max(S.index,x),Dt());const Xe=K.getAllBufferRanges();S.segmentType===ke.HTTPRequest.MEDIA_SEGMENT_TYPE&&(me(Xe),Ge(),(function(){if(isNaN(be)||Z)return;if(N!==r.default.AUDIO&&N!==r.default.VIDEO)return void(be=NaN);const et=_.getTime(),qt=lt(et,0),$t=lt(be,0);if(qt&&$t&&qt.start===$t.start)return void(be=NaN);const rn=v.getCurrentRepresentation().segmentDuration,Mn=lt(be,rn);Mn&&(I.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(et-be)>rn?be<=Mn.end&&_.seek(Math.max(be,Mn.start),!1,!0):et<Mn.start&&_.seek(Mn.start,!1,!0))})());let bt=!1;M&&(M.indexOf(S)>0&&(bt=!0),M=null),S&&!bt&&Ut(m.default.BYTES_APPENDED_END_FRAGMENT,{startTime:S.start,index:S.index,bufferedRanges:Xe,segmentType:S.segmentType,mediaType:N,representationId:S.representation.id})}function te(Be,Xe){const bt=[];return bt.push(Un(Be)),bt.push(K?K.abort():Promise.resolve()),bt.push(q(Be,Xe)),Promise.allSettled(bt)}function q(Be,Xe){if(!Be||!Xe)return f.warn("BufferController._changeCodec() is missing the information about the Representations. Doing nothing"),Promise.resolve();if(Be&&Xe&&Be.mimeType===Xe.mimeType&&Be.codecFamily===Xe.codecFamily)return f.debug(`Switching to new codec ${Be.codecs} without changeType as previous codec ${Xe.codecs} is compatible.`),Promise.resolve();if(!I.get().streaming.buffer.useChangeType||!e.supportsChangeType())return f.debug("changeType() not available"),Promise.resolve();f.debug(`Using changeType() to switch from codec ${Xe.codecs} to ${Be.codecs}`);
20const bt=Be.dependentRepresentation?Be.dependentRepresentation:Be;return K.changeType(bt)}function oe(){return new Promise(((Be,Xe)=>{let bt=Ue();if(!bt||bt.length===0)return Ge(),void Be();Wn(bt).then((()=>{Be()})).catch((et=>{Xe(et)}))}))}function Ue(Be){const Xe=[],bt=K.getAllBufferRanges();if(!bt||bt.length===0)return Xe;if(!Be&&Be!==0||isNaN(Be))Xe.push({start:bt.start(0),end:bt.end(bt.length-1)+.5});else{const et=(function($t,rn){const Mn=I.get().streaming.buffer.bufferToKeep,_e=rn.start(0);if($t-_e>Mn){let nt=Math.max(0,$t-Mn);const Kt=c.getRequests({state:Le.FRAGMENT_MODEL_EXECUTED,time:$t,threshold:vi})[0];if(Kt&&(nt=Math.min(Kt.startTime,nt)),nt>0)return{start:_e,end:nt}}return null})(Be,bt),qt=(function($t,rn){const Mn=rn.end(rn.length-1)+.5,_e=yn($t),nt=g.manifestInfo.duration>=I.get().streaming.buffer.longFormContentDurationThreshold?I.get().streaming.buffer.bufferTimeAtTopQualityLongForm:I.get().streaming.buffer.bufferTimeAtTopQuality;let Kt=isNaN(_e)?$t:Math.min(_e,$t+nt);if(Kt>=rn.end(rn.length-1))return null;const $e=c.getRequests({state:Le.FRAGMENT_MODEL_EXECUTED,time:$t,threshold:vi})[0];if($e&&(Kt=Math.max($e.startTime+$e.duration,Kt)),I.get().streaming.buffer.avoidCurrentTimeRangePruning){for(let Gt=0;Gt<rn.length;Gt++)if(rn.start(Gt)<=$t&&$t<=rn.end(Gt)&&rn.start(Gt)<=Kt&&Kt<=rn.end(Gt)){let hn=Kt;Kt=Gt+1<rn.length?rn.start(Gt+1):rn.end(Gt)+1,f.debug("Buffered range ["+rn.start(Gt)+", "+rn.end(Gt)+"] overlaps with targetTime "+$t+" and range to be pruned ["+hn+", "+Mn+"], using ["+Kt+", "+Mn+"] instead"+(Kt<Mn?"":" (no actual pruning)"));break}}return Kt<rn.end(rn.length-1)?{start:Kt,end:Mn}:null})(Be,bt);et&&Xe.push(et),qt&&Xe.push(qt)}return Xe}function Ge(){ie||N===r.default.TEXT&&!D.isTextEnabled()||Rt()}function Ve(){an()}function je(){an(),be=NaN}function lt(Be,Xe){if(!K)return null;const bt=K.getAllBufferRanges();let et,qt,$t=0,rn=0,Mn=null,_e=null,nt=0;const Kt=isNaN(Xe)?.15:Xe;if(bt!=null){for(qt=0,et=bt.length;qt<et;qt++)if($t=bt.start(qt),rn=bt.end(qt),Mn===null)nt=Math.abs($t-Be),(Be>=$t&&Be<rn||nt<=Kt)&&(Mn=$t,_e=rn);else{if(nt=$t-_e,!(nt<=Kt))break;_e=rn}if(Mn!==null)return{start:Mn,end:_e}}return null}function Rt(){if(_){let Be=_.getTime()||0;Z&&(Be=isNaN(be)?0:be);const Xe=I.get().streaming.gaps.jumpGaps&&!isNaN(I.get().streaming.gaps.smallGapLimit)?I.get().streaming.gaps.smallGapLimit:NaN;U=Math.max((function(bt,et){let qt,$t;return I.get().streaming.gaps.jumpGaps&&(et=I.get().streaming.gaps.smallGapLimit),qt=lt(bt,et),$t=qt===null?0:qt.end-bt,$t})(Be,Xe),0),Ut(m.default.BUFFER_LEVEL_UPDATED,{mediaType:N,bufferLevel:U}),an()}}function Dt(){const Be=x>=W-1,Xe=_.getTimeToStreamEnd(g)-U<1e-5;!Be&&!Xe||A||(kt(!0),f.debug(`checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ${g.id} and type ${N}`))}function an(){if(N!==r.default.AUDIO&&N!==r.default.VIDEO)return;const Be=_.getLowLatencyModeEnabled()?I.get().streaming.buffer.lowLatencyStallThreshold:I.get().streaming.buffer.stallThreshold;U<=Be&&!A?vn(o.BUFFER_EMPTY):(A||U>Be)&&vn(o.BUFFER_LOADED)}function vn(Be){R===Be||Be===o.BUFFER_EMPTY&&_.getTime()===0||N===r.default.TEXT&&!D.isTextEnabled()||(R=Be,Ut(m.default.BUFFER_LEVEL_STATE_CHANGED,{state:Be}),Ut(Be===o.BUFFER_LOADED?m.default.BUFFER_LOADED:m.default.BUFFER_EMPTY),f.debug(Be===o.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function qn(){K&&N!==r.default.TEXT&&(A||Wn(Yn()))}function Yn(){const Be=[],Xe=K.getAllBufferRanges();if(!Xe||Xe.length===0)return Be;const bt=_.getTime();let et=Math.max(0,bt-I.get().streaming.buffer.bufferToKeep);const qt=c.getRequests({state:Le.FRAGMENT_MODEL_EXECUTED,time:bt,threshold:vi})[0];if(qt)et=Math.min(qt.startTime,et);else if(bt===0&&_.getIsDynamic())return[];if(Xe.start(0)<=et){const $t={start:0,end:et};for(let rn=0;rn<Xe.length&&Xe.end(rn)<=et;rn++)$t.end=Xe.end(rn);$t.start<$t.end&&Be.push($t)}return Be}function Wn(Be){return new Promise(((Xe,bt)=>{if(!Be||!K||Be.length===0)return Rt(),void Xe();const et=[];Be.forEach((qt=>{et.push((function($t){return new Promise(((rn,Mn)=>{$t.resolve=rn,$t.reject=Mn,$.push($t)}
20))})(qt))})),J||xn(),Promise.all(et).then((()=>{Xe()})).catch((qt=>{bt(qt)}))}))}function xn(){try{if($.length===0||!K)return f.debug("Nothing to prune, halt pruning"),$=[],void(J=!1);const Be=K.getBuffer();if(!Be||!Be.buffered||Be.buffered.length===0)return f.debug("SourceBuffer is empty (or does not exist), halt pruning"),$=[],void(J=!1);const Xe=$.shift();f.debug(`${N}: Removing buffer from: ${Xe.start} to ${Xe.end}`),J=!0,_.getTime()<Xe.end&&kt(!1),K.remove(Xe).then((bt=>{kn(bt)})).catch((bt=>{kn(bt)}))}catch{J=!1}}function kn(Be){f.debug("onRemoved buffer from:",Be.from,"to",Be.to),K&&(me(K.getAllBufferRanges()),$.length===0&&(J=!1,Rt()),Be.unintended&&(f.warn("Detected unintended removal from:",Be.from,"to",Be.to,"setting streamprocessor time to",Be.from),Ut(m.default.SEEK_TARGET,{time:Be.from})),J?xn():(ie?ie=!1:Rt(),Ut(m.default.BUFFER_CLEARED,{from:Be.from,to:Be.to,unintended:Be.unintended,hasEnoughSpaceToAppend:at(),quotaExceeded:O})))}function Un(Be){return new Promise((Xe=>{Be&&Be.mseTimeOffset!==void 0&&K&&K.updateTimestampOffset?K.updateTimestampOffset(Be.mseTimeOffset).then((()=>{Xe()})).catch((()=>{Xe()})):Xe()}))}function Je(){return K&&!A?K.updateAppendWindow(g):Promise.resolve()}function Mt(){b++,b*(I.get().streaming.wallclockTimeUpdateInterval/1e3)>=I.get().streaming.buffer.bufferPruningInterval&&(b=0,qn())}function Nt(){an()}function kt(Be){A=Be,A?Ut(m.default.BUFFERING_COMPLETED):W=Number.POSITIVE_INFINITY}function ln(){try{const Be=K.getAllBufferRanges();let Xe,bt,et=0;if(!Be)return et;for(bt=0,Xe=Be.length;bt<Xe;bt++)et+=Be.end(bt)-Be.start(bt);return et}catch{return 0}}function yn(Be){try{let Xe=Be;const bt=K.getAllBufferRanges();if(!bt||bt.length===0)return NaN;let et=0;for(;Xe===Be&&et<bt.length;){const qt=bt.start(et),$t=bt.end(et);Xe>=qt&&Xe<=$t&&(Xe=$t),et+=1}return Xe===Be?NaN:Xe}catch{return NaN}}function at(){const Be=ln();return isNaN(Be)||Be<F}function Ut(Be,Xe){let bt=Xe||{};u.trigger(Be,bt,{streamId:g.id,mediaType:N})}function Xt(Be,Xe){if(F=Number.POSITIVE_INFINITY,R=void 0,W=Number.POSITIVE_INFINITY,x=0,S=null,A=!1,J=!1,O=!1,U=0,b=0,$=[],be=NaN,Z=!1,K){let bt=K;K=null,Be||(Xe?bt.removeEventListeners():bt.abort().then((()=>{bt.reset(Xe),bt=null})))}ie=!1}return E={appendInitSegmentFromCache:function(Be){const Xe=ee.extract(g.id,Be);return!!Xe&&(f.debug(`Appending init fragment for type ${N}, representationId ${Xe.representation.id} and bandwidth ${Xe.representation.bandwidth}
20`),re(Xe),!0)},clearBuffers:Wn,createBufferSink:we,dischargePreBuffer:function(){if(K&&z&&typeof z.discharge=="function"){const Be=z.getAllBufferRanges();if(Be.length>0){let bt="Beginning "+N+"PreBuffer discharge, adding buffer for:";for(let et=0;et<Be.length;et++)bt+=" start: "+Be.start(et)+", end: "+Be.end(et)+";";f.debug(bt)}else f.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");M=[];let Xe=z.discharge();for(let bt=0;bt<Xe.length;bt++){const et=Xe[bt];M.push(et),K.append(et)}z.reset(),z=null}},getAllRangesWithSafetyFactor:Ue,getBuffer:function(){return K},getBufferControllerType:function(){return Aa},getBufferLevel:function(){return U},getContinuousBufferTimeForTargetTime:yn,getIsBufferingCompleted:function(){return A},getIsPruningInProgress:function(){return J},getMediaSource:function(){return B},getRangeAt:lt,getStreamId:function(){return g.id},getType:function(){return N},hasBufferAtTime:function(Be){try{const Xe=K.getAllBufferRanges();if(!Xe||Xe.length===0)return!1;let bt=0;for(;bt<Xe.length;){const et=Xe.start(bt),qt=Xe.end(bt);if(Be>=et&&Be<=qt)return!0;bt+=1}return!1}catch(Xe){return f.error(Xe),!1}},initialize:function(Be){Ce(Be),u.on(m.default.INIT_FRAGMENT_LOADED,ce,E),u.on(m.default.MEDIA_FRAGMENT_LOADED,le,E),u.on(m.default.WALLCLOCK_TIME_UPDATED,Mt,E),u.on(H.default.PLAYBACK_PLAYING,je,E),u.on(H.default.PLAYBACK_PROGRESS,Ge,E),u.on(H.default.PLAYBACK_TIME_UPDATED,Ge,E),u.on(H.default.PLAYBACK_RATE_CHANGED,Nt,E),u.on(H.default.PLAYBACK_STALLED,Ve,E)},prepareForAbandonQualitySwitch:function(Be,Xe){return te(Be,Xe)},prepareForDefaultQualitySwitch:function(Be,Xe){return te(Be,Xe)},prepareForFastQualitySwitch:function(Be,Xe){return te(Be,Xe)},prepareForForceReplacementQualitySwitch:function(Be,Xe){return new Promise((bt=>{const et=[];et.push(K.abort()),et.push(Je()),et.push(oe()),et.push(Un(Be)),et.push(q(Be,Xe)),Promise.allSettled(et).then((()=>{kt(!1),bt()}))}))},prepareForNonReplacementTrackSwitch:function(Be,Xe){return new Promise((bt=>{const et=[];et.push(Je()),et.push(q(Be,Xe)),Promise.allSettled(et).then((()=>{bt()}))}))},prepareForPlaybackSeek:function(){return A&&kt(!1),K.abort()},prepareForReplacementTrackSwitch:function(Be,Xe){return new Promise((bt=>{const et=[];et.push(K.abort()),et.push(Je()),et.push(q(Be,Xe)),et.push(oe()),et.push(Un(Be)),Promise.allSettled(et).then((()=>{kt(!1),bt()}))}))},pruneAllSafely:oe,pruneBuffer:qn,reset:function(Be,Xe){u.off(m.default.INIT_FRAGMENT_LOADED,ce,this),u.off(m.default.MEDIA_FRAGMENT_LOADED,le,this),u.off(m.default.WALLCLOCK_TIME_UPDATED,Mt,this),u.off(H.default.PLAYBACK_PLAYING,je,this),u.off(H.default.PLAYBACK_PROGRESS,Ge,this),u.off(H.default.PLAYBACK_TIME_UPDATED,Ge,this),u.off(H.default.PLAYBACK_RATE_CHANGED,Nt,this),u.off(H.default.PLAYBACK_STALLED,Ve,this),Xt(Be,Xe)},segmentRequestingCompleted:function(Be){isNaN(Be)||(W=Be,Dt())},setIsBufferingCompleted:kt,setMediaSource:Ce,setSeekTarget:function(Be){be=Be},updateAppendWindow:Je,updateBufferTimestampOffset:Un},f=(0,p.default)(t).getInstance().getLogger(E),ee=ct(t).getInstance(),Xt(),E}Na.__dashjs_factory_name=Aa;var Do=L.default.getClassFactory(Na);const ba="NotFragmentedTextBufferController";function Ca(n){n=n||{};const e=this.context,t=(0,h.default)(e).getInstance(),u=n.textController,c=n.errHandler,_=n.streamInfo,v=n.type;let I,g,D,N,E,f;function A(B){N=B}function U(B){g!==B&&(g=B,g&&(function(x){let W={};t.trigger(x,W,{streamId:_.id,mediaType:v})})(m.default.BUFFERING_COMPLETED))}
20function F(B){B.chunk.bytes&&!g&&(f.save(B.chunk),E.append(B.chunk),U(!0))}return I={appendInitSegmentFromCache:function(B){return f.extract(_.id,B)!==null},clearBuffers:function(){return Promise.resolve()},createBufferSink:function(B){return new Promise(((x,W)=>{try{E=Ia(e).create({mediaSource:N,textController:u,eventBus:t}),E.initializeForFirstUse(B),D||(E.getBuffer()&&typeof E.getBuffer().initialize=="function"&&E.getBuffer().initialize(),D=!0),x(E)}catch(K){c.error(new on.default(wn.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,wn.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+v)),W(K)}}))},dischargePreBuffer:function(){},getAllRangesWithSafetyFactor:function(){return[]},getBuffer:function(){return E},getBufferControllerType:function(){return ba},getBufferLevel:function(){return 0},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},getIsBufferingCompleted:function(){return g},getIsPruningInProgress:function(){return!1},getMediaSource:function(){return N},getRangeAt:function(){return null},getStreamId:function(){return _.id},getType:function(){return v},hasBufferAtTime:function(){return!0},initialize:function(B){A(B)},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return g=!1,Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},pruneBuffer:function(){},reset:function(B){t.off(m.default.INIT_FRAGMENT_LOADED,F,I),!B&&E&&(E.abort(),E.reset(),E=null)},segmentRequestingCompleted:function(){},setIsBufferingCompleted:U,setMediaSource:A,setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()}},D=!1,N=null,g=!1,f=ct(e).getInstance(),t.on(m.default.INIT_FRAGMENT_LOADED,F,I),I}Ca.__dashjs_factory_name=ba;var vo=L.default.getClassFactory(Ca);function Da(n){const e=(n=n||{}).abrController,t=n.bufferController,u=this.context,c=n.dashMetrics,_=(0,h.default)(u).getInstance(),v=n.fragmentModel,I=n.mediaPlayerModel,g=n.playbackController,D=n.representationController,N=n.settings,E=n.textController,f=n.type;let A,U,F,B,x,W,K,z,Z,M,R,S;function b(){W=(0,p.default)(u).getInstance().getLogger(F),me(),Z=n.streamInfo}function J(){K=!0}function O(){K=!1}function ee(ye){if(t.getIsBufferingCompleted())return;$();const te=isNaN(ye)?0:ye;z=setTimeout(ie,te)}function $(){z&&(clearTimeout(z),z=null)}function ie(){const ye=I.getScheduleTimeout();try{if((function(){try{return f===r.default.TEXT&&!E.isTextEnabled()||g.isPaused()&&(!g.getStreamController().getInitialPlayback()||!g.getStreamController().getAutoPlay())&&!N.get().streaming.scheduling.scheduleWhilePaused}catch{return!1}})())return void $();(function(){try{return!!K&&D.getCurrentRepresentation()&&(x==null||M||(function(){const te=D.getCurrentRepresentation();if(!f||!te)return!0;let q=te&&te.segmentDuration&&!isNaN(te.segmentDuration)?te.segmentDuration:0;const oe=c.getCurrentBufferLevel(f),Ue=be();return(Ue<=q||g.getLowLatencyModeEnabled()||f===r.default.AUDIO&&A)&&(q=0),oe+q<Ue})())}catch{return!1}})()?(function(){if(e.handlePendingManualQualitySwitch(Z.id,f))return;let te=!1;S&&(te=e.checkPlaybackQuality(f,Z.id)),te||(function(){const q=D.getCurrentRepresentation();U||q.id!==x||M?(function(oe){M?(W.debug("Switch track for "+f+", representation id = "+oe.id),M=!1):W.debug("Quality has changed, get init request for representationid = "+oe.id),_.trigger(m.default.INIT_FRAGMENT_NEEDED,{representationId:oe.id,sender:F},{streamId:Z.id,mediaType:f}),S=!1,U=!1})(q):(W.debug(`Media segment needed for ${f} and stream id ${Z.id}`),_.trigger(m.default.MEDIA_FRAGMENT_NEEDED,{},{streamId:Z.id,mediaType:f}),S=!0)})()})():ee(ye)}catch{ee(ye)}}function be(){let ye=NaN;const te=D.getCurrentRepresentation();return f&&te&&(ye=f===r.default.TEXT?(function(){try{if(E.isTextEnabled()){const q=D.getCurrentRepresentation();if(isNaN(q.fragmentDuration)){const oe=c.getCurrentSchedulingInfo(o.SCHEDULING_INFO);return oe?oe.duration:0}return q.fragmentDuration}return 0}catch{return 0}})():f===r.default.AUDIO&&A?(function(){try{const q=c.getCurrentBufferLevel(r.default.VIDEO),oe=D.getCurrentRepresentation();return isNaN(oe.fragmentDuration)?q+1:Math.max(q+1,oe.fragmentDuration)}catch{return 0}})():(function(){try{const q=N.get().streaming.enhancement.enabled?D.getCurrentCompositeRepresentation():D.getCurrentRepresentation(),oe=q.mediaInfo.streamInfo;return e.isPlayingAtTopQuality(q)?oe.manifestInfo.duration>=N.get().streaming.buffer.longFormContentDurationThreshold?N.get().streaming.buffer.bufferTimeAtTopQualityLongForm:N.get().streaming.buffer.bufferTimeAtTopQuality:I.getBufferTimeDefaultUnadjusted()}catch{return I.getBufferTimeDefaultUnadjusted()}})()),ye}function Ce(){we(!0)}function we(ye){if(g&&v){const te=v.getRequests({state:Le.FRAGMENT_MODEL_EXECUTED,time:g.getTime(),threshold:0})[0];te&&g.getTime()>=te.startTime&&((!B.representation||te.representation.mediaInfo.type===B.representation.mediaInfo.type&&te.representation.mediaInfo.index!==B.representation.mediaInfo.index)&&ye&&(function(q){W.debug(`Track change rendered for streamId ${Z.id} and type ${f}`),_.trigger(m.default.TRACK_CHANGE_RENDERED,{mediaType:f,oldMediaInfo:B&&B.representation&&B.representation.mediaInfo?B.representation.mediaInfo:null,newMediaInfo:q.representation.mediaInfo,streamId:Z.id})})(te),B.representation&&te.representation.id===B.representation.id||!ye||(function(q){W.debug(`Quality change rendered for streamId ${Z.id} and type ${f}`),_.trigger(m.default.QUALITY_CHANGE_RENDERED,{mediaType:f,oldRepresentation:B.representation?B.representation:null,newRepresentation:q.representation,streamId:Z.id})})(te),B.representation=te.representation)}}function ce(){v.abortRequests(),$()}function le(){N.get().streaming.scheduling.scheduleWhilePaused||ee()}function re(ye){c.updatePlayListTraceMetrics({playbackspeed:ye.playbackRate.toString()})}function me(){S=!0,R=0,x=null,B={representation:null},M=!1,U=!1,K=!0}return F={clearScheduleTimer:$,getBufferTarget:be,getPlaybackController:function(){return g},getStreamId:function(){return Z.id},getSwitchTrack:function(){return M},getTimeToLoadDelay:function(){return R},getType:function(){return f},initialize:function(ye){A=ye,_.on(m.default.URL_RESOLUTION_FAILED,ce,F),_.on(H.default.PLAYBACK_STARTED,le,F),_.on(H.default.PLAYBACK_RATE_CHANGED,re,F),_.on(H.default.PLAYBACK_TIME_UPDATED,Ce,F),_.on(H.default.MANAGED_MEDIA_SOURCE_START_STREAMING,J,F),_.on(H.default.MANAGED_MEDIA_SOURCE_END_STREAMING,O,F)},reset:function(){_.off(m.default.URL_RESOLUTION_FAILED,ce,F),_.off(H.default.PLAYBACK_STARTED,le,F),_.off(H.default.PLAYBACK_RATE_CHANGED,re,F),_.off(H.default.PLAYBACK_TIME_UPDATED,Ce,F),_.off(H.default.MANAGED_MEDIA_SOURCE_START_STREAMING,J,F),_.off(H.default.MANAGED_MEDIA_SOURCE_END_STREAMING,O,F),$(),we(!1),me(),Z=null},setShouldCheckPlaybackQuality:function(ye){S=ye},setInitSegmentRequired:function(ye){U=ye},setLastInitializedRepresentationId:function(ye){x=ye},setup:b,setSwitchTrack:function(ye){M=ye},setTimeToLoadDelay:function(ye){R=ye},startScheduleTimer:ee},b(),F}Da.__dashjs_factory_name="ScheduleController";var Mo=L.default.getClassFactory(Da);const wo=/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g;var Po=class extends ua{constructor(){super(),this.isPartialSegment=!0,this.replacementSubNumber=NaN,this.totalNumberOfPartialSegments=NaN}};function va(n){return n?n.totalNumberOfPartialSegments&&!isNaN(n.totalNumberOfPartialSegments)&&n.totalNumberOfPartialSegments>0&&!isNaN(n.subNumberOfPartialSegmentToRequest)?(function(e){const t=(function(u,c){const _=new Po,v=u.segmentDurationInSeconds/u.totalNumberOfPartialSegments,{representation:I,timelineConverter:g,
20isDynamic:D,index:N,totalNumberOfPartialSegments:E}=u,f=Ma({representation:I,segmentDurationInSeconds:v,presentationStartTime:u.presentationStartTime+c*v,presentationEndTime:u.presentationStartTime+(c+1)*v,timelineConverter:g,isDynamic:D,mediaTimeInSeconds:u.mediaTimeInSeconds+c*v,index:N});return _.assignAttributes(f),_.replacementSubNumber=c,_.totalNumberOfPartialSegments=E,_})(e,e.subNumberOfPartialSegmentToRequest);return wa(t,e),t})(n):(function(e){const t=new Di,u=Ma(e);return t.assignAttributes(u),wa(t,e),t})(n):null}function Ma(n){const{representation:e,segmentDurationInSeconds:t,presentationStartTime:u,presentationEndTime:c,mediaTimeInSeconds:_,timelineConverter:v,isDynamic:I,index:g}=n,D={availabilityEndTime:v.calcAvailabilityEndTimeFromPresentationTime(c+t,e,I),availabilityStartTime:v.calcAvailabilityStartTimeFromPresentationTime(c,e,I),duration:t,index:g,mediaStartTime:_,presentationStartTime:u,replacementNumber:e.startNumber+g,representation:e};return D.wallStartTime=v.calcWallTimeForSegment(D,I),D}function wa(n,e){const{tManifest:t,mediaTime:u,mediaUrl:c,mediaRange:_}=e;n.replacementTime=t||u,n.media=ui(c,n.representation.id,n.replacementNumber,n.replacementSubNumber,n.representation.bandwidth,n.replacementTime),n.mediaRange=_,n.mediaUrl=c}function Pa(n,e,t,u){const c=e.adaptation.period;if(isFinite(c.duration)&&c.start+c.duration<=t.presentationStartTime)return!1;if(u){if(e.availabilityTimeOffset==="INF")return!0;const _=n.getClientReferenceTime();return t.availabilityStartTime.getTime()<=_&&(!isFinite(t.availabilityEndTime)||t.availabilityEndTime.getTime()>=_)}return!0}function ui(n,e,t,u,c,_){return n&&(function(v,I,g,D,N,E){return v.replace(wo,((f,A,U,F)=>{let B,x;switch(A){case void 0:return"$";case"RepresentationID":B=I;break;case"Number":B=g;break;case"SubNumber":B=D;break;case"Bandwidth":B=N;break;case"Time":if(typeof E=="string")return E;B=E&&Math.round(E);break;default:B=null}if(B==null)return f;switch(F){case void 0:case"d":case"i":case"u":x=B.toString();break;case"o":x=B.toString(8);break;case"x":x=B.toString(16);break;case"X":x=B.toString(16).toUpperCase();break;default:x=B.toString()}const W=parseInt(U,10)||1;return x.padStart(W,"0")}))})(n,e,t,u,c,_)}function Oa(n){const{index:e,isDynamic:t,mediaRange:u,mediaTime:c,mediaUrl:_,representation:v,subNumberOfPartialSegmentToRequest:I,timelineConverter:g,totalNumberOfPartialSegments:D}=n;let N,E,f;N=v.segmentDuration,isNaN(N)&&(N=v.adaptation.period.duration),E=parseFloat((v.adaptation.period.start+e*N).toFixed(5)),f=parseFloat((E+N).toFixed(5));const A=va({index:e,isDynamic:t,mediaRange:u,mediaTime:c,mediaTimeInSeconds:g.calcMediaTimeFromPresentationTime(E,v),mediaUrl:_,presentationEndTime:f,presentationStartTime:E,representation:v,segmentDurationInSeconds:N,subNumberOfPartialSegmentToRequest:I,timelineConverter:g,totalNumberOfPartialSegments:D});return Pa(g,v,A,t)?A:null}function Mi(n){const{durationInTimescale:e,fTimescale:t,index:u,subNumberOfPartialSegmentToRequest:c,isDynamic:_,mediaRange:v,mediaTime:I,mediaUrl:g,totalNumberOfPartialSegments:D,representation:N,tManifest:E,timelineConverter:f}=n,A=I/t,U=e/t;let F=f.calcPresentationTimeFromMediaTime(A,N),B=va({representation:N,segmentDurationInSeconds:U,presentationStartTime:F,presentationEndTime:F+U,mediaTimeInSeconds:A,timelineConverter:f,isDynamic:_,index:u,totalNumberOfPartialSegments:D,subNumberOfPartialSegmentToRequest:c,mediaUrl:g,mediaRange:v,tManifest:E,mediaTime:I});return Pa(f,N,B,_)?B:null}function wi(n){return n.k}function La(n){const e=(n=n||{}).eventBus,t=n.events,u=n.abrController,c=n.dashMetrics,_=n.playbackController,v=n.timelineConverter,I=n.type,g=n.streamInfo,D=n.segmentsController,N=n.isDynamic;let E,f,A;function U(){return I}function F(){return A?.mediaInfo.type===I?A:(function(){let M=A?.dependentRepresentation;if(M){if(!M.mediaInfo)throw new Error("dependentRepresentation has no mediaInfo!");if(M.mediaInfo.type===I)return M}return null})()}function B(){A=null,f=[]}function x(M){return new Promise(((R,S)=>{const b=M.hasInitialization(),J=M.hasSegments(),O=[];O.push(D.updateInitData(M,b)),O.push(D.updateSegmentData(M,J)),Promise.all(O).then((ee=>{var $;ee[0]&&!ee[0].error&&(M=(function(ie,be){return be&&!be.error&&be.representation?be.representation:ie})(M,ee[0])),ee[1]&&!ee[1].error&&(M=(function(ie,be){if(!be||be.error)return;const Ce=be.segments,we=[];let ce,le,re,me,ye=0;for(ce=0,le=Ce?Ce.length:0;ce<le;ce++)re=Ce[ce],me=Mi({durationInTimescale:re.duration,fTimescale:re.timescale,index:ye,isDynamic:N,mediaRange:re.mediaRange,mediaTime:re.startTime,mediaUrl:re.media,representation:ie,timelineConverter:v}),me&&(we.push(me),me=null,ye++);return we.length>0&&(ie.segments=we),ie})(M,ee[1])),M.fragmentDuration=M.segmentDuration?M.segmentDuration:M.segments&&M.segments.length>0?M.segments[0].duration:NaN,($=M).mediaFinishedInformation=D.getMediaFinishedInformation($),(function(ie){let be,Ce=c.getCurrentManifestUpdate(),we=!1;if(Ce){for(let ce=0;ce<Ce.representationInfo.length;ce++)if(be=Ce.representationInfo[ce],be.index===ie.index&&be.mediaType===U()){we=!0;break}we||c.addManifestUpdateRepresentationInfo(ie,U())}})(M),R()})).catch((ee=>{S(ee)}))}
20))}function W(M){if(!f||f.length===0)return null;const R=f.filter((S=>S.id===M));return R.length>0?R[0]:null}function K(M){e.trigger(t.DATA_UPDATE_COMPLETED,{currentRepresentation:A,error:M},{streamId:g.id,mediaType:I})}function z(M){A&&A.id===M.id||(function(R){(function(){if(!(u&&c&&_&&v))throw new Error(r.default.MISSING_CONFIG_ERROR)})();const S=new Date,b=1e3*_.getTime();R&&c.addRepresentationSwitch(R.adaptation.type,S,b,R.id),e.trigger(H.default.REPRESENTATION_SWITCH,{mediaType:I,streamId:g.id,currentRepresentation:R},{streamId:g.id,mediaType:I})})(M),A=M}function Z(M){if(M.newDuration){const R=F();R&&R.adaptation.period&&(R.adaptation.period.duration=M.newDuration)}}return E={getCurrentCompositeRepresentation:function(){return A},getCurrentRepresentation:F,getRepresentationById:W,getStreamId:function(){return g.id},getType:U,prepareQualityChange:function(M){const R=f.filter((S=>S.id===M.id));R.length>0&&z(R[0])},reset:function(){e.off(H.default.MANIFEST_VALIDITY_CHANGED,Z,E),B()},updateData:function(M,R,S){return new Promise(((b,J)=>{if(f=M,z(W(S)),I!==r.default.VIDEO&&I!==r.default.ENHANCEMENT&&I!==r.default.AUDIO&&(I!==r.default.TEXT||!R))return K(),void b();const O=[];for(let ee=0,$=f.length;ee<$;ee++){const ie=f[ee];O.push(x(ie))}Promise.all(O).then((()=>{(function(){u.setPlaybackQuality(I,g,A);const ee=c.getCurrentDVRInfo(I);ee&&c.updateManifestUpdateInfo({latency:ee.range.end-_.getTime()}),K()})(),b()})).catch((ee=>{J(ee)}))}))}},B(),e.on(H.default.MANIFEST_VALIDITY_CHANGED,Z,E),E}La.__dashjs_factory_name="RepresentationController";var Oo=L.default.getClassFactory(La);function Fa(n){const e=(n=n||{}).eventBus,t=n.debug,u=n.urlUtils,c=n.type,_=n.streamInfo,v=n.segmentsController,I=n.timelineConverter,g=n.baseURLController;let D,N,E,f,A;function U(){return c}function F(){E=null}function B(M,R,S){const b=g.resolve(S.path);let J,O,ee={};return b&&R!==b.url&&u.isRelative(R)?(J=b.url,O=b.serviceLocation,ee=b.queryParams,R&&(J=u.resolve(R,J))):J=R,!u.isRelative(J)&&(M.url=J,M.serviceLocation=O,M.queryParams=ee,!0)}function x(M,R,S){let b=null;if(!R||!R.segmentInfoType)return b;const J=v.getSegmentByTime(R,S);return J&&(E=J,N.debug("Index for time "+S+" is "+J.index),b=W(0,J)),b}function W(M,R){if(R==null)return null;const S=new k.default,b=R.representation,J=b.bandwidth,O=ui(R.media,b.id,R.replacementNumber,R.replacementSubNumber,J,R.replacementTime);return S.adaptationIndex=b.adaptation.index,S.availabilityEndTime=R.availabilityEndTime,S.availabilityStartTime=R.availabilityStartTime,S.availabilityTimeComplete=b.availabilityTimeComplete,S.bandwidth=b.bandwidth,S.duration=R.duration,S.index=R.index,S.isPartialSegmentRequest=R.isPartialSegment,S.mediaStartTime=R.mediaStartTime,S.mediaType=U(),S.presentationStartTime=R.presentationStartTime,S.range=R.mediaRange,S.representation=b,S.startTime=R.presentationStartTime,S.timescale=b.timescale,S.type=ke.HTTPRequest.MEDIA_SEGMENT_TYPE,S.wallStartTime=R.wallStartTime,B(S,O,b)?S:void 0}function K(M){if(!M)return{indexToRequest:0,subNumberOfPartialSegmentToRequest:NaN};const R=M.isPartialSegment,S=!isNaN(M.replacementSubNumber),b=!isNaN(M.totalNumberOfPartialSegments);if(R&&S&&b){const J=M.replacementSubNumber+1;return J<M.totalNumberOfPartialSegments?{indexToRequest:M.index,subNumberOfPartialSegmentToRequest:J}:{indexToRequest:M.index+1,subNumberOfPartialSegmentToRequest:0}}return{indexToRequest:M.index+1,subNumberOfPartialSegmentToRequest:NaN}}function z(M,R,S,b){let J=null;const O=v.getSegmentByIndex(R,S,b,E);if(O)J=W(0,O),E=O;else{if(f&&!A)return N.debug(U()+" No segment found at index: "+S+". Wait for next loop"),null;A=!0}return J}function Z(){N.debug("Dynamic stream complete"),A=!0}return D={getCurrentIndex:function(){return E?E.index:-1},getInitRequest:function(M,R){return R?(function(S,b,J){const O=new k.default,ee=b.adaptation.period,$=ee.start;if(O.mediaType=J,O.type=ke.HTTPRequest.INIT_SEGMENT_TYPE,O.range=b.range,O.availabilityStartTime=I.calcAvailabilityStartTimeFromPresentationTime($,b,f),O.availabilityEndTime=I.calcAvailabilityEndTimeFromPresentationTime($+ee.duration,b,f),O.representation=b,B(O,b.initialization,b))return O.url=ui(O.url,b.id,void 0,void 0,b.bandwidth),O})(0,R,U()):null},getLastSegment:function(){return E},getNextSegmentRequest:function(M,R){if(!R||!R.segmentInfoType)return null;if((function(J){return J&&E&&J.endNumber&&E.replacementNumber&&E.replacementNumber>=J.endNumber})(R))return A=!0,null;let{indexToRequest:S,subNumberOfPartialSegmentToRequest:b}=K(E);return z(0,R,S,b)},getNextSegmentRequestIdempotent:function(M,R){let S=null,{indexToRequest:b,subNumberOfPartialSegmentToRequest:J}=K(E);const O=v.getSegmentByIndex(R,b,J,E);return O?(S=W(0,O),S):null},getSegmentRequestForTime:x,getStreamId:function(){return _.id},getStreamInfo:function(){return _},getType:U,getValidTimeAheadOfTargetTime:function(M,R,S,b){try{if(isNaN(M)||!R||!S)return NaN;if(M<0&&(M=0),isNaN(b)&&(b=.5),x(0,S,M))return M;if(S.adaptation.period.start+S.adaptation.period.duration<M)return NaN;const J=isFinite(S.adaptation.period.duration)?S.adaptation.period.start+S.adaptation.period.duration:M+30;let O=Math.min(M+b,J),ee=NaN,$=null;for(;O<=J;){let ie=null;if(O<=J&&(ie=x(0,S,O)),ie){ee=O,$=ie;break}O+=b}if($){const ie=$.startTime+$.duration;return M>$.startTime&&ie-M>b?M:!isNaN($.startTime)&&M<$.startTime&&ee>$.startTime?$.startTime+.001:Math.min(ie-b,ee)}return ee}catch{return NaN}},initialize:function(M){f=M,A=!1,v.initialize(M)},isLastSegmentRequested:function(M,R){return!M||!E?!1:A?!0:!isFinite(M.adaptation.period.duration)||E.presentationStartTime+E.duration>R?!1:M.mediaFinishedInformation&&!isNaN(M.mediaFinishedInformation.numberOfSegments)&&!isNaN(E.index)&&E.index>=M.mediaFinishedInformation.numberOfSegments-1&&(!f||M.segmentInfoType===de.default.SEGMENT_TEMPLATE||f&&M.segmentInfoType===de.default.SEGMENT_LIST&&M.adaptation.period.nextPeriodId)?!0:!!(f&&M.adaptation.period.nextPeriodId&&M.segmentInfoType===de.default.SEGMENT_TIMELINE&&M.mediaFinishedInformation&&!isNaN(M.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&E&&!isNaN(E.mediaStartTime)&&!isNaN(E.duration)&&E.mediaStartTime+E.duration>=M.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(M,R){return R&&R.segmentInfoType?z(0,R,E?E.index:0,E&&E.isPartialSegment&&!isNaN(E.replacementSubNumber)?E.replacementSubNumber:NaN):null},reset:function(){F(),e.off(H.default.DYNAMIC_TO_STATIC,Z,D)}},N=t.getLogger(D),F(),e.on(H.default.DYNAMIC_TO_STATIC,Z,D),D}Fa.__dashjs_factory_name="DashHandler";var Ua=L.default.getClassFactory(Fa);function xa(n,e){const t=(n=n||{}).timelineConverter,u=n.dashMetrics;let c;function _(I,g){if((function(){if(!t)throw new Error(r.default.MISSING_CONFIG_ERROR)})(),!I)return null;g===void 0&&(g=null);let D=null;const N=t.calcMediaTimeFromPresentationTime(g,I);return(function(E,f){const A=(function(J){return J.adaptation.period.mpd.manifest.Period[J.adaptation.period.index].AdaptationSet[J.adaptation.index].Representation[J.index].SegmentTemplate||J.adaptation.period.mpd.manifest.Period[J.adaptation.period.index].AdaptationSet[J.adaptation.index].Representation[J.index].SegmentList})(E),U=A.SegmentTimeline,F=A.SegmentURL;let B,x,W,K,z,Z,M=0,R=-1;Z=E.timescale,B=U.S;let S=!1;const b=B.length;for(W=0;W<b&&!S;W++)for(x=B[W],z=0,x.hasOwnProperty("r")&&(z=x.r),x.hasOwnProperty("t")&&(M=x.t),z<0&&(z=v(E,B[W+1],x,Z,M/Z)),K=0;K<=z&&!S;K++)R++,S=f({mediaTime:M,segmentBase:A,segmentURL:F,currentSElement:x,sElementCounterIncludingRepeats:R,sElementCounter:W}),S&&(E.segmentDuration=x.d/Z),M+=x.d})(I,(function(E){const f=I.timescale;return(function(A,U){const{mediaTime:F,segmentBase:B,segmentURL:x,currentSElement:W,sElementCounterIncludingRepeats:K,sElementCounter:z}=U,Z=W.d,M=I.timescale;return A<F+Z&&A>=F&&((function(R){const{segmentBase:S,segmentURL:b,sElementCounter:J,currentSElement:O,mediaTime:ee,durationInTimescale:$,fTimescale:ie,requiredMediaTimeInTimescaleUnits:be,sElementCounterIncludingRepeats:Ce}=R;let we=(function(me,ye,te){let q=me.media;return ye&&(q=ye[te].media||""),q})(S,b,J),ce=(function(me,ye,te){let q=me.mediaRange;return ye&&(q=ye[te].mediaRange),q})(O,b,J);const le=wi(O),re=(function(me){if(!me||me.totalNumberOfPartialSegments===void 0||isNaN(me.totalNumberOfPartialSegments)||me.totalNumberOfPartialSegments<1)return;const{durationInTimescale:ye,requiredMediaTimeInTimescaleUnits:te,mediaTime:q,totalNumberOfPartialSegments:oe}=me,Ue=ye/oe;for(let Ge=0;Ge<oe;Ge++){const Ve=q+Ge*Ue;if(te>=Ve&&te<Ve+Ue)return Ge}return NaN})({durationInTimescale:$,requiredMediaTimeInTimescaleUnits:be,mediaTime:ee,totalNumberOfPartialSegments:le});D=Mi({timelineConverter:t,isDynamic:e,representation:I,mediaTime:ee,durationInTimescale:$,fTimescale:ie,mediaUrl:we,mediaRange:ce,index:Ce,tManifest:O.tManifest,totalNumberOfPartialSegments:le,subNumberOfPartialSegmentToRequest:re})})({segmentBase:B,segmentURL:x,sElementCounter:z,currentSElement:W,mediaTime:F,durationInTimescale:Z,fTimescale:M,requiredMediaTimeInTimescaleUnits:A,sElementCounterIncludingRepeats:K}),!0)})(parseFloat((N*f).toPrecision(15)),E)})),D}function v(I,g,D,N,E){let f;if(g&&g.hasOwnProperty("t"))f=g.t/N;else try{let A=0;if(isNaN(I.adaptation.period.start)||isNaN(I.adaptation.period.duration)||!isFinite(I.adaptation.period.duration)){const U=u.getCurrentDVRInfo();A=isNaN(U.end)?0:U.end}else A=I.adaptation.period.start+I.adaptation.period.duration;f=t.calcMediaTimeFromPresentationTime(A,I),I.segmentDuration=D.d/N}catch{f=0}return Math.max(Math.ceil((f-E)/(D.d/N))-1,0)}return c={getMediaFinishedInformation:function(I){if(!I)return 0;const g=(I.adaptation.period.mpd.manifest.Period[I.adaptation.period.index].AdaptationSet[I.adaptation.index].Representation[I.index].SegmentTemplate||I.adaptation.period.mpd.manifest.Period[I.adaptation.period.index].AdaptationSet[I.adaptation.index].Representation[I.index].SegmentList).SegmentTimeline;let D,N,E,f,A,U,F=0,B=0,x=0;U=I.timescale,D=g.S;const W=D.length;for(E=0;E<W;E++)for(N=D[E],A=0,N.hasOwnProperty("r")&&(A=N.r),N.hasOwnProperty("t")&&(F=N.t,B=F/U),A<0&&(A=v(I,D[E+1],N,U,B)),f=0;f<=A;f++)x++,F+=N.d,B=F/U;return{numberOfSegments:x,mediaTimeOfLastSignaledSegment:B}},getSegmentByIndex:function(I,g){return I?_(I,g&&!isNaN(g.presentationStartTime)?g.presentationStartTime+g.duration+.01:0):null},getSegmentByTime:_},c}
20xa.__dashjs_factory_name="TimelineSegmentsGetter";var Lo=L.default.getClassFactory(xa);function Ba(n,e){const t=(n=n||{}).timelineConverter;let u;function c(v,I,g){if(!v)return null;const D=_(v),N=wi(D);N!==void 0&&N>=0&&(g=g!==void 0&&g<N?g:0);const E=Oa({index:I=Math.max(I,0),isDynamic:e,mediaTime:Math.round(I*v.segmentDuration*v.timescale,10),mediaUrl:D.media,representation:v,subNumberOfPartialSegmentToRequest:g,timelineConverter:t,totalNumberOfPartialSegments:N});return E&&v.endNumber&&E.replacementNumber>v.endNumber?null:E}function _(v){return v.adaptation.period.mpd.manifest.Period[v.adaptation.period.index].AdaptationSet[v.adaptation.index].Representation[v.index].SegmentTemplate}return u={getMediaFinishedInformation:function(v){const I={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!v)return I;const g=v.segmentDuration;return isNaN(g)?I.numberOfSegments=1:I.numberOfSegments=Math.ceil(v.adaptation.period.duration/g),I},getSegmentByIndex:c,getSegmentByTime:function(v,I){if(!v)return null;const g=v.segmentDuration;if(isNaN(g))return null;let D=t.calcPeriodRelativeTimeFromMpdRelativeTime(v,I);const N=_(v),E=Math.floor(D/g),f=(function(A){if(!A||A.totalNumberOfPartialSegments===void 0||isNaN(A.totalNumberOfPartialSegments)||A.totalNumberOfPartialSegments<1)return;const{totalNumberOfPartialSegments:U,representation:F,requestedTimeRelativeToPeriodStart:B,indexWithoutStartNumber:x}=A,W=x*F.segmentDuration,K=F.segmentDuration/U,z=B-W;let Z=Math.floor(z/K);return Z=Math.max(0,Math.min(Z,U-1)),Z})({totalNumberOfPartialSegments:wi(N),representation:v,requestedTimeRelativeToPeriodStart:D,indexWithoutStartNumber:E});return c(v,E,f)}},u}Ba.__dashjs_factory_name="TemplateSegmentsGetter";var Fo=L.default.getClassFactory(Ba);function ka(n,e){const t=(n=n||{}).timelineConverter;let u;function c(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function _(v,I){if(c(),!v)return null;const g=v.adaptation.period.mpd.manifest.Period[v.adaptation.period.index].AdaptationSet[v.adaptation.index].Representation[v.index].SegmentList,D=g.SegmentURL.length,N=v&&!isNaN(v.startNumber)?v.startNumber:1,E=Math.max(N-1,0),f=Math.max(I-E,0);let A=null;if(f<D){const U=g.SegmentURL[f];A=Oa({index:I,isDynamic:e,mediaRange:U.mediaRange,mediaTime:(N+I-1)*v.segmentDuration,representation:v,timelineConverter:t}),A&&(A.media=U.media?U.media:"",A.indexRange=U.indexRange)}return A}return u={getSegmentByIndex:_,getSegmentByTime:function(v,I){if(c(),!v)return null;const g=v.segmentDuration;if(isNaN(g))return null;const D=t.calcPeriodRelativeTimeFromMpdRelativeTime(v,I);return _(v,Math.floor(D/g))},getMediaFinishedInformation:function(v){const I={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!v)return I;const g=v.adaptation.period.mpd.manifest.Period[v.adaptation.period.index].AdaptationSet[v.adaptation.index].Representation[v.index].SegmentList,D=v&&!isNaN(v.startNumber)?v.startNumber:1,N=Math.max(D-1,0);return I.numberOfSegments=N+g.SegmentURL.length,I}},u}ka.__dashjs_factory_name="ListSegmentsGetter";var Uo=L.default.getClassFactory(ka);function Ga(n){const e=(n=n||{}).timelineConverter;let t;function u(){if(!e||!e.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function c(_,v){if(u(),!_)return null;const I=_.segments?_.segments.length:-1;let g;if(v<I&&(g=_.segments[v],g&&g.index===v))return g;for(let D=0;D<I;D++)if(g=_.segments[D],g&&g.index===v)return g;return null}return t={getSegmentByIndex:c,getSegmentByTime:function(_,v){u();const I=(function(g,D){if(!g)return-1;const N=g.segments,E=N?N.length:null;let f,A,U,F,B,x=-1;if(N&&E>0){for(B=0;B<E;B++)if(A=N[B],U=A.presentationStartTime,F=A.duration,f=F/2,D+f>=U&&D-f<U+F){x=A.index;break}}return x})(_,v);return c(_,I)},getMediaFinishedInformation:function(_){const v={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return _&&_.segments&&(v.numberOfSegments=_.segments.length),v}},t}Ga.__dashjs_factory_name="SegmentBaseGetter";var xo=L.default.getClassFactory(Ga);function Ha(n){n=n||{};const e=this.context,t=n.dashConstants,u=n.type,c=n.segmentBaseController;let _,v;function I(g){return g?g.segments?v[t.SEGMENT_BASE]:v[g.segmentInfoType]:null}return _={initialize:function(g){v[t.SEGMENT_TIMELINE]=Lo(e).create(n,g),v[t.SEGMENT_TEMPLATE]=Fo(e).create(n,g),v[t.SEGMENT_LIST]=Uo(e).create(n,g),v[t.SEGMENT_BASE]=xo(e).create(n,g)},updateInitData:function(g,D){return D?Promise.resolve():c.getSegmentBaseInitSegment({representation:g,mediaType:u})},updateSegmentData:function(g,D){return D?Promise.resolve():c.getSegmentList({mimeType:g.mimeType,representation:g,mediaType:u})},getSegmentByIndex:function(g,D,N,E){const f=I(g);return f?g.segmentInfoType?g.segmentInfoType===t.SEGMENT_TIMELINE?f.getSegmentByIndex(g,E):g.segmentInfoType===t.SEGMENT_TEMPLATE?f.getSegmentByIndex(g,D,N):f.getSegmentByIndex(g,D):f.getSegmentByIndex(g,D):null},getSegmentByTime:function(g,D){const N=I(g);return N?N.getSegmentByTime(g,D):null},getMediaFinishedInformation:function(g){const D=I(g);return D?D.getMediaFinishedInformation(g):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},v={},_}
20Ha.__dashjs_factory_name="SegmentsController";var Ya=L.default.getClassFactory(Ha);function Va(){let n;return n={ntpToUTC:function(e){const t=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(t.getTime()+e).getTime()}},n}Va.__dashjs_factory_name="TimeUtils";var Bo=L.default.getSingletonFactory(Va);function qa(n){n=n||{};let e,t,u,c,_,v,I,g,D,N,E,f,A,U,F,B,x,W,K=this.context,z=(0,h.default)(K).getInstance(),Z=n.abrController,M=n.adapter,R=n.boxParser,S=n.capabilities,b=n.dashMetrics,J=n.errHandler,O=n.fragmentModel,ee=n.manifestModel,$=n.mediaController,ie=n.mediaPlayerModel,be=n.mimeType,Ce=n.playbackController,we=n.segmentBlacklistController,ce=n.settings,le=n.streamInfo,re=n.textController,me=n.timelineConverter,ye=n.type;function te(){return le.id}function q(){return ye}function oe(){N=[],c=null,t=0,x=!1,B=!1,f=!1,v=null,W=!1,qn()}function Ue($e){return!isNaN($e)&&!isNaN(le.duration)&&isFinite(le.duration)&&$e>=le.start+le.duration}function Ge($e,Gt=!0){if($e.sender){if(Ce.getIsManifestUpdateInProgress())lt();else if((!c.isText||re.isTextEnabled())&&e&&$e.representationId&&!e.appendInitSegmentFromCache($e.representationId)){const hn=A.getCurrentRepresentation();if(hn.range===0)return void Ve();const Cn=_?_.getInitRequest(c,hn):null;Cn?O.executeRequest(Cn):Gt&&(U.setInitSegmentRequired(!0),lt())}}}function Ve($e,Gt=!0){if(Ce.getIsManifestUpdateInProgress()||e.getIsPruningInProgress())return void lt();let hn=(function(){let Cn;if(isNaN(t)||q()===r.default.TEXT&&!re.isTextEnabled())return null;if(_){const On=bt();Cn=x?_.getSegmentRequestForTime(c,On,t):B?_.repeatSegmentRequest(c,On):_.getNextSegmentRequest(c,On)}return Cn})();hn?(x=!1,B=!1,(function(Cn){isNaN(Cn.startTime+Cn.duration)||(t=Cn.startTime+Cn.duration),Cn.delayLoadingTime=new Date().getTime()+U.getTimeToLoadDelay(),U.setTimeToLoadDelay(0),(function(On){let Dn=On.url;return On.range&&(Dn=Dn.concat("_",On.range)),we.contains(Dn)})(Cn)?(D.warn(`Fragment request url ${Cn.url} for stream id ${le.id} and media type ${ye} is on the ignore list and will be skipped`),lt()):(D.debug(`Next fragment request url for stream id ${le.id} and media type ${ye} is ${Cn.url} with request range ${Cn.range}`),O.executeRequest(Cn))})(hn)):(function(Cn){const On=A.getCurrentRepresentation();try{if(ce.get().streaming.gaps.enableSeekFix&&(x||Ce.getTime()===0)){let Dn;if(g?g&&On.segmentInfoType===de.default.SEGMENT_TIMELINE&&(Dn=(function(Kn){return _.getValidTimeAheadOfTargetTime(t,c,Kn,ce.get().streaming.gaps.threshold)})(On)):Dn=(function(Kn){let zn=_.getValidTimeAheadOfTargetTime(t,c,Kn,ce.get().streaming.gaps.threshold);return isNaN(zn)&&t>=Kn.adaptation.period.mpd.mediaPresentationDuration-Kn.segmentDuration&&(zn=t-.1),zn})(On),!isNaN(Dn)&&Dn!==t)return void(function(Kn,zn){Ce.isSeeking()||Ce.getTime()===0?(D.warn(`Adjusting playback time ${Kn} because of gap in the manifest. Seeking by ${Kn-t}`),Ce.seek(Kn,!1,!1)):(D.warn(`Adjusting buffering time ${Kn} because of gap in the manifest. Adjusting time by ${Kn-t}`),nt(Kn),zn&<())})(Dn,Cn)}}catch(Dn){D.error(Dn)}je()||Cn&<()})(Gt)}function je(){const $e=A.getCurrentRepresentation(),Gt=_.isLastSegmentRequested($e,t);if(Gt){const hn=_.getCurrentIndex();D.debug(`Segment requesting for stream ${le.id} has finished`),z.trigger(m.default.STREAM_REQUESTING_COMPLETED,{segmentIndex:hn},{streamId:le.id,mediaType:ye}),e.segmentRequestingCompleted(hn),Xe()}return Gt}function lt(){const $e=ie.getScheduleTimeout();U.startScheduleTimer($e)}function Rt($e){b.addBufferState(ye,$e.state,U.getBufferTarget()),$e.state!==o.BUFFER_EMPTY||Ce.isSeeking()||(D.info("Buffer is empty! Stalling!"),b.pushPlayListTraceMetrics(new Date,fr.REBUFFERING_REASON))}function Dt($e){O.syncExecutedRequestsWithBufferedRange(e.getBuffer().getAllBufferRanges(),le.duration),$e.quotaExceeded&&$e.from>Ce.getTime()&&nt($e.from),$e.hasEnoughSpaceToAppend&&$e.quotaExceeded&&U.startScheduleTimer()}function an($e){if(!$e||!$e.lastRequestAppended||!$e.lastRequestAppended.url)return;let Gt=$e.lastRequestAppended.url;$e.lastRequestAppended.range&&(Gt=Gt.concat("_",$e.lastRequestAppended.range)),D.warn(`Blacklisting segment with url ${Gt}`),we.add(Gt)}function vn($e){if(D.debug(`Appended bytes for ${$e.mediaType} and stream id ${$e.streamId}`),$e.segmentType===ke.HTTPRequest.INIT_SEGMENT_TYPE){const Gt=$e.representationId;U.setLastInitializedRepresentationId(Gt),D.info("["+ye+"] lastInitializedRepresentationId changed to "+Gt)}E&&E.enabled?Mt(E.newRepresentation,E.oldRepresentation):W||U.startScheduleTimer(0)}function qn(){E={newRepresentation:null,oldRepresentation:null,enabled:!1}}function Yn($e){return new Promise((Gt=>{if(!A)return Promise.resolve();let hn=null;var Cn;hn=$e.newRepresentation?{selectedRepresentation:(Cn=$e).newRepresentation,currentMediaInfo:Cn.newMediaInfo}:c!==null&&M.areMediaInfosEqual(c,$e.newMediaInfo)?(function(Dn){return{currentMediaInfo:Dn.newMediaInfo,selectedRepresentation:A.getCurrentRepresentation()}})($e):(function(Dn){let Kn=NaN;return Kn=!ce.get().streaming.abr.autoSwitchBitrate[Dn.newMediaInfo.type]&&Dn.previouslySelectedRepresentation?Dn.previouslySelectedRepresentation.bitrateInKbit:Z.getInitialBitrateFor(ye),{selectedRepresentation:Z.getOptimalRepresentationForBitrate(Dn.newMediaInfo,Kn,!1),currentMediaInfo:Dn.newMediaInfo}})($e),Wn(hn.currentMediaInfo),z.trigger(),(function(Dn){v&&Dn.selectedRepresentation.dependentRepresentation&&(D.info("["+ye+"] selectMediaInfo : call selectMediaInfo on enhancementStreamProcessor for index = "+Dn.selectedRepresentation.absoluteIndex),v.selectMediaInfo(new Fr({newMediaInfo:Dn.selectedRepresentation.mediaInfo,newRepresentation:Dn.selectedRepresentation})))})(hn);
20const On=Z.getPossibleVoRepresentations(c,!1);return A.updateData(On,c.isFragmented,hn.selectedRepresentation.id).then((()=>{(function(){if(!e||!A)return;const Dn=A.getCurrentCompositeRepresentation();e.getIsBufferingCompleted()||e.updateBufferTimestampOffset(Dn)})(),Gt()})).catch((Dn=>{D.error(Dn),Gt()}))}))}function Wn($e){M.areMediaInfosEqual(c,$e)||z.trigger(H.default.NEW_TRACK_SELECTED,{value:$e}),c=$e,Z.handleNewMediaInfo(c),z.trigger(m.default.MEDIAINFO_UPDATED,{mediaType:ye,streamId:le.id,currentMediaInfo:c})}function xn($e){const Gt=$e.newRepresentation,hn=$e.oldRepresentation,Cn=Kt();Gt&&hn||D.warn("_handleDifferentSwitchTypes() is missing the target representations"),$e.reason&&$e.reason.forceReplace?(function(On,Dn){O.abortRequests(),z.trigger(m.default.BUFFER_REPLACEMENT_STARTED,{mediaType:ye,streamId:le.id},{mediaType:ye,streamId:le.id}),U.setShouldCheckPlaybackQuality(!1),e.prepareForForceReplacementQualitySwitch(On,Dn).then((()=>{kn()})).catch((()=>{kn()}))})(Gt,hn):$e&&$e.reason&&$e.reason.forceAbandon?(function(On,Dn){e.prepareForAbandonQualitySwitch(On,Dn).then((()=>{Un()})).catch((()=>{Un()}))})(Gt,hn):!ie.getFastSwitchEnabled()||Cn&&Cn.isPartialSegment?Mt(Gt,hn):(function(On,Dn){const Kn=Ce.getTime();let zn=1.5*(isNaN(On.fragmentDuration)?1:On.fragmentDuration);const Ar=O.getRequests({state:Le.FRAGMENT_MODEL_EXECUTED,time:Kn+zn,threshold:0})[0];if(Ar&&!c.isText){const Nr=e.getBufferLevel(),Pr=Z.getAbandonmentStateFor(le.id,ye),xr=ye===r.default.VIDEO&&On.dependentRepresentation?On.dependentRepresentation.bandwidth:On.bandwidth;Ar.bandwidth<xr&&Nr>=zn&&Pr===o.ALLOW_LOAD?e.prepareForFastQualitySwitch(On,Dn).then((()=>{Je(Kn,zn)})).catch((()=>{Je(Kn,zn)})):Mt(On,Dn)}else Mt(On,Dn)})(Gt,hn),b.pushPlayListTraceMetrics(new Date,fr.REPRESENTATION_SWITCH_STOP_REASON),b.createPlaylistTraceMetrics(Gt.id,1e3*Ce.getTime(),Ce.getPlaybackRate())}function kn(){rn(),qn(),f=!1}function Un(){O.abortRequests(),B=!0,U.setShouldCheckPlaybackQuality(!1),U.startScheduleTimer(),f=!1}function Je($e,Gt){O.abortRequests(),nt($e+Gt),U.setShouldCheckPlaybackQuality(!1),U.startScheduleTimer(),f=!1}function Mt($e,Gt){const hn=O.getRequests({state:Le.FRAGMENT_MODEL_LOADING});if(hn&&hn.length>0)return D.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),E.newRepresentation=$e,E.oldRepresentation=Gt,void(E.enabled=!0);e.prepareForDefaultQualitySwitch($e,Gt).then((()=>{Nt()})).catch((()=>{Nt()}))}function Nt(){U.setShouldCheckPlaybackQuality(!1),c.segmentAlignment||c.subSegmentAlignment?U.startScheduleTimer():Mn(),qn(),f=!1}function kt($e){D.info("onFragmentLoadingAbandoned request: "+$e.request.url+" has been aborted"),Ce.isSeeking()||U.getSwitchTrack()||f||(D.info("onFragmentLoadingAbandoned request: "+$e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),$e.request&&$e.request.isInitializationRequest()?U.setInitSegmentRequired(!0):nt($e.request.startTime+$e.request.duration/2),U.startScheduleTimer(0))}function ln($e){D.info("OnFragmentLoadingCompleted for stream id "+le.id+" and media type "+ye+" - Url:",$e.request?$e.request.url:"undefined",$e.request.range?", Range:"+$e.request.range:""),c.isText&&U.startScheduleTimer(0),$e.error&&$e.request.serviceLocation&&(function(Gt){D.info("Fragment loading completed with an error"),Gt&&Gt.request&&Gt.request.type&&(Gt.request.type===ke.HTTPRequest.INIT_SEGMENT_TYPE?Ge({representationId:Gt.request.representation.id,sender:{}},!1):Gt.request.type===ke.HTTPRequest.MEDIA_SEGMENT_TYPE&&(nt(Gt.request.startTime+Gt.request.duration/2),Ve(0,!1)))})($e)}function yn(){nt(Ce.getTime()),Be().startScheduleTimer()}function at($e){const Gt=$e.currentTrackInfo;if(!Gt)return;const hn=N.find((Cn=>Cn.index===Gt.index&&Cn.lang===Gt.lang));hn&&Yn(new Fr({newMediaInfo:hn})).then((()=>{e.setIsBufferingCompleted(!1),nt(Ce.getTime()),U.setInitSegmentRequired(!0),U.startScheduleTimer()}))}function Ut($e){nt($e.quotaExceededTime),Xe()}function Xt(){return e?e.getBuffer():null}function Be(){return U}function Xe(){U&&U.clearScheduleTimer()}function bt($e=NaN){let Gt;return isNaN($e)?Gt=A?A.getCurrentRepresentation():null:((0,Tn.checkInteger)($e),Gt=A?A.getRepresentationById($e):null),Gt}function et(){return!!e&&e.getIsBufferingCompleted()}function qt($e){if(!ce.get().streaming.enableManifestTimescaleMismatchFix)return;const Gt=$e.chunk,hn=Gt.bytes,Cn=bt(Gt.representation.id);Cn&&(Cn.timescale=R.getMediaTimescaleFromMoov(hn))}function $t($e){const Gt=$e.chunk,hn=Gt.bytes,Cn=bt(Gt.representation.id);if(Cn){let On;if(ce.get().streaming.parseInbandPrft&&$e.request.type===ke.HTTPRequest.MEDIA_SEGMENT_TYPE){On=On||R.parse(hn);const zn=(function(Ar,Nr){const Pr=Ar.getBoxes("prft"),xr=[];return Pr.forEach((Yr=>{xr.push((function(_r,Vr){let yr="unknown";switch(_r.flags){case 0:yr=de.default.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:yr=de.default.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:yr=de.default.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}let br=1e3*_r.ntp_timestamp_sec+_r.ntp_timestamp_frac/2**32*1e3;
20return br=Bo(K).getInstance().ntpToUTC(br),{type:yr,ntpTimestamp:br,mediaTime:_r.media_time/Vr}})(Yr,Nr))})),xr})(On,Cn.timescale);zn&&zn.length&&z.trigger(H.default.INBAND_PRFT,{data:zn},{streamId:le.id,mediaType:ye})}const Dn=M.getEventsFor(Cn.mediaInfo,null,le),Kn=M.getEventsFor(Cn,Cn,le);if(Dn&&Dn.length>0||Kn&&Kn.length>0){const zn=$e.request;On=On||R.parse(hn);const Ar=(function(Nr,Pr,xr,Yr){try{const _r={},Vr=[],yr=xr.concat(Yr);for(let mr=0,si=yr.length;mr<si;mr++)_r[yr[mr].schemeIdUri+"/"+yr[mr].value]=yr[mr];const br=Nr.getBoxes("emsg");if(!br||br.length===0)return Vr;const Sr=Nr.getBox("sidx"),ai=!Sr||isNaN(Sr.earliest_presentation_time)||isNaN(Sr.timescale)?Pr&&!isNaN(Pr.mediaStartTime)?Pr.mediaStartTime:0:Sr.earliest_presentation_time/Sr.timescale,mi=Math.max(ai,0),Ei=A.getCurrentRepresentation();for(let mr=0,si=br.length;mr<si;mr++){const $r=M.getEvent(br[mr],_r,mi,Ei);$r&&Vr.push($r)}return Vr}catch{return[]}})(On,zn,Dn,Kn);z.trigger(m.default.INBAND_EVENTS,{events:Ar},{streamId:le.id})}}}function rn(){const $e=Ce.getTime();ce.get().streaming.buffer.flushBufferAtTrackSwitch&&Ce.seek($e+.001,!1,!0),nt($e),e.setSeekTarget($e),U.startScheduleTimer()}function Mn(){const $e=Ce.getTime(),Gt=e.getContinuousBufferTimeForTargetTime($e);nt(isNaN(Gt)?$e:Gt),U.startScheduleTimer()}function _e($e){$e&&!isNaN($e.time)&&(nt($e.time),e.setSeekTarget($e.time))}function nt($e){t=$e,x=!0}function Kt(){return _.getLastSegment()}return I={checkAndHandleCompletedBuffering:je,clearScheduleTimer:Xe,createBufferSinks:function($e,Gt){const hn=Xt();return hn?Promise.resolve(hn):e?e.createBufferSink(c,$e,Gt):Promise.resolve(null)},dischargePreBuffer:function(){e.dischargePreBuffer()},finalisePlayList:function($e,Gt){b.pushPlayListTraceMetrics($e,Gt)},getAllMediaInfos:function(){return N},getBuffer:Xt,getBufferController:function(){return e},getBufferLevel:function(){return e?e.getBufferLevel():0},getFragmentModel:function(){return O},getLastSegment:Kt,getMediaInfo:function(){return c},getMediaSource:function(){return e.getMediaSource()},getRepresentation:bt,getRepresentationController:function(){return A},getScheduleController:Be,getStreamId:te,getStreamInfo:function(){return le},getType:q,initialize:function($e,Gt,hn){F=Ya(K).create({events:m.default,eventBus:z,streamInfo:le,timelineConverter:me,dashConstants:de.default,segmentBaseController:n.segmentBaseController,type:ye}),_=Ua(K).create({baseURLController:n.baseURLController,boxParser:R,constants:r.default,dashConstants:de.default,dashMetrics:b,debug:(0,p.default)(K).getInstance(),errHandler:J,errors:wn.default,eventBus:z,events:m.default,mediaPlayerModel:ie,segmentsController:F,settings:ce,streamInfo:le,timelineConverter:me,type:ye,urlUtils:(0,Ht.default)(K).getInstance()}),g=le.manifestInfo.isDynamic,_.initialize(g),Z.registerStreamType(ye,I),A=Oo(K).create({abrController:Z,adapter:M,dashConstants:de.default,dashMetrics:b,errors:wn.default,eventBus:z,events:m.default,isDynamic:g,playbackController:Ce,segmentsController:F,streamInfo:le,timelineConverter:me,type:ye}),e=(function(Cn,On){let Dn=null;return Cn?(Dn=Cn!==r.default.TEXT||On?Do(K).create({abrController:Z,capabilities:S,errHandler:J,fragmentModel:O,manifestModel:ee,mediaController:$,mediaPlayerModel:ie,playbackController:Ce,representationController:A,settings:ce,streamInfo:le,textController:re,type:Cn}):vo(K).create({errHandler:J,fragmentModel:O,mimeType:be,settings:ce,streamInfo:le,textController:re,type:Cn}),Dn):(J.error(new on.default(wn.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,wn.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)})(ye,hn),e&&e.initialize($e),U=Mo(K).create({abrController:Z,adapter:M,bufferController:e,dashMetrics:b,fragmentModel:O,mediaController:$,mediaPlayerModel:ie,mimeType:be,playbackController:Ce,representationController:A,settings:ce,streamInfo:le,textController:re,type:ye}),u=Gt,U.initialize(Gt),t=0,x=!1,B=!1},isBufferingCompleted:et,prepareInnerPeriodPlaybackSeeking:function($e){return new Promise((Gt=>{if(e.hasBufferAtTime($e.seekTime))return e.pruneBuffer(),Ue(e.getContinuousBufferTimeForTargetTime($e.seekTime))&&e.setIsBufferingCompleted(!0),void Gt();Xe(),O.abortRequests(),e.prepareForPlaybackSeek().then((()=>{const hn=e.getAllRangesWithSafetyFactor($e.seekTime);return e.clearBuffers(hn)})).then((()=>{const hn=e.getContinuousBufferTimeForTargetTime($e.seekTime);if(Ue(hn))e.setIsBufferingCompleted(!0),Gt();else{const Cn=isNaN(hn)?$e.seekTime:hn;nt(Cn),e.setSeekTarget(Cn);const On=[];On.push(e.updateAppendWindow());const Dn=bt();On.push(e.updateBufferTimestampOffset(Dn)),Promise.all(On).then((()=>{U.setInitSegmentRequired(!0),U.setShouldCheckPlaybackQuality(!1),U.startScheduleTimer(),Gt()}))}})).catch((hn=>{D.error(hn)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((($e,Gt)=>{try{Xe(),O.abortRequests(),e.prepareForPlaybackSeek().then((()=>e.pruneAllSafely())).then((()=>{$e()}))}catch(hn){Gt(hn)}}))},prepareQualityChange:function($e){$e.newRepresentation&&((function(Gt){if(v)v.prepareQualityChange(Gt);else if(ye===r.default.ENHANCEMENT){const hn=Gt.oldRepresentation.mediaInfo.type,Cn=Gt.newRepresentation.mediaInfo.type;if(hn===r.default.ENHANCEMENT&&Cn===r.default.VIDEO)return D.info("Stop "+ye+" stream processor"),U.reset(),!0;if(hn===r.default.VIDEO&&Cn===r.default.ENHANCEMENT)return D.info("Start "+ye+" stream processor"),Yn(new Fr({newMediaInfo:Gt.newRepresentation.mediaInfo,newRepresentation:Gt.newRepresentation})).then((()=>{U.setup(),U.initialize(u),U.startScheduleTimer()})),!0}return!1})($e)||(E&&E.enabled&&D.warn(`Canceling queued representation switch to ${E.newRepresentation.id} for ${ye}
20`),$e.isAdaptationSetSwitch?(D.debug(`Preparing quality switch to different AdaptationSet for type ${ye} from representation id ${$e.oldRepresentation.id} to ${$e.newRepresentation.id}`),(function(Gt){const hn=Gt.newRepresentation;f=!0,Xe(),U.setSwitchTrack(!0);const Cn=hn.mediaInfo;Wn(Cn),Yn(new Fr({newMediaInfo:Cn,newRepresentation:hn})).then((()=>{xn(Gt)}))})($e)):(D.debug(`Preparing quality within the same AdaptationSet for type ${ye} from representation id ${$e.oldRepresentation.id} to ${$e.newRepresentation.id}`),(function(Gt){const hn=Gt.newRepresentation;f=!0,Xe(),A.prepareQualityChange(hn),xn(Gt)})($e))))},prepareTrackSwitch:function($e,Gt=!1){return new Promise((hn=>{D.debug(`Preparing track switch for type ${ye}`);const Cn=ye===r.default.TEXT||Gt||ce.get().streaming.trackSwitchMode[ye]===r.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&Ce.getTimeToStreamEnd(le)>ce.get().streaming.buffer.stallThreshold;e.getIsBufferingCompleted()&&!Cn?(function(On){return new Promise((Dn=>{const Kn=A.getCurrentRepresentation();e.prepareForNonReplacementTrackSwitch(Kn,On).then((()=>{z.trigger(m.default.BUFFERING_COMPLETED,{},{streamId:le.id,mediaType:ye}),Dn()})).catch((()=>{z.trigger(m.default.BUFFERING_COMPLETED,{},{streamId:le.id,mediaType:ye}),Dn()}))}))})($e).then((()=>{hn()})):(U.setSwitchTrack(!0),Cn?(function(On){return new Promise((Dn=>{z.trigger(m.default.BUFFER_REPLACEMENT_STARTED,{mediaType:ye,streamId:le.id},{mediaType:ye,streamId:le.id}),O.abortRequests();const Kn=bt();e.prepareForReplacementTrackSwitch(Kn,On).then((()=>{rn(),Dn()})).catch((()=>{rn(),Dn()}))}))})($e).then((()=>{hn()})):(function(On){return new Promise((Dn=>{const Kn=()=>{const zn=O.getRequests({state:Le.FRAGMENT_MODEL_LOADING});if(zn&&zn.length!==0)z.once(H.default.FRAGMENT_LOADING_COMPLETED,Kn,I);else{const Ar=bt();e.prepareForNonReplacementTrackSwitch(Ar,On).then((()=>{Mn(),Dn()})).catch((Nr=>{D.error(Nr),Mn(),Dn()}))}};Kn()}))})($e).then((()=>{hn()})))}))},probeNextRequest:function(){const $e=bt();return _.getNextSegmentRequestIdempotent(c,$e)},reset:function($e,Gt){_&&_.reset(),e&&(e.reset($e,Gt),e=null),U&&(U.reset(),U=null),A&&(A.reset(),A=null),F&&(F=null),Z&&Z.unRegisterStreamType(te(),ye),z.off(m.default.BUFFER_CLEARED,Dt,I),z.off(m.default.BUFFER_LEVEL_STATE_CHANGED,Rt,I),z.off(m.default.BYTES_APPENDED_END_FRAGMENT,vn,I),z.off(m.default.FRAGMENT_LOADING_ABANDONED,kt,I),z.off(m.default.FRAGMENT_LOADING_COMPLETED,ln,I),z.off(m.default.INIT_FRAGMENT_LOADED,qt,I),z.off(m.default.INIT_FRAGMENT_NEEDED,Ge,I),z.off(m.default.MEDIA_FRAGMENT_LOADED,$t,I),z.off(m.default.MEDIA_FRAGMENT_NEEDED,Ve,I),z.off(m.default.QUOTA_EXCEEDED,Ut,I),z.off(m.default.SEEK_TARGET,_e,I),z.off(m.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,yn,I),z.off(m.default.SET_NON_FRAGMENTED_TEXT,at,I),z.off(m.default.SOURCE_BUFFER_ERROR,an,I),oe(),ye=null,le=null},selectMediaInfo:Yn,setEnhancementStreamProcessor:function($e){v=$e,D.info("enhancementStreamProcessor = "+v)},setExplicitBufferingTime:nt,setMediaInfoArray:function($e){N=$e},setMediaSource:function($e){return e.setMediaSource($e,c)},setTrackSwitchInProgress:function($e){W=$e},updateStreamInfo:function($e){return le=$e,et()?Promise.resolve():e.updateAppendWindow()}},D=(0,p.default)(K).getInstance().getLogger(I),oe(),z.on(m.default.BUFFER_CLEARED,Dt,I),z.on(m.default.BUFFER_LEVEL_STATE_CHANGED,Rt,I),z.on(m.default.BYTES_APPENDED_END_FRAGMENT,vn,I),z.on(m.default.FRAGMENT_LOADING_ABANDONED,kt,I),z.on(m.default.FRAGMENT_LOADING_COMPLETED,ln,I),z.on(m.default.INIT_FRAGMENT_LOADED,qt,I),z.on(m.default.INIT_FRAGMENT_NEEDED,Ge,I),z.on(m.default.MEDIA_FRAGMENT_LOADED,$t,I),z.on(m.default.MEDIA_FRAGMENT_NEEDED,Ve,I),z.on(m.default.QUOTA_EXCEEDED,Ut,I),z.on(m.default.SEEK_TARGET,_e,I),z.on(m.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,yn,I),z.on(m.default.SET_NON_FRAGMENTED_TEXT,at,I),z.on(m.default.SOURCE_BUFFER_ERROR,an,I),I}qa.__dashjs_factory_name="StreamProcessor";var ko=L.default.getClassFactory(qa),Go=class{constructor(){this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}},Ho=class{constructor(){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=""}},Ka=P(9838),ja=P(447),Wa=P(5099);function za(n){const e=this.context,t=n.adapter,u=n.baseURLController,c=n.streamInfo,_=n.timelineConverter,v=n.debug,I=n.eventBus,g=n.events,D=n.dashConstants,N=(0,Ht.default)(e).getInstance();let E,f,A,U,F,B,x,W,K;function z(M,R){const S=new Ho;S.id=M.id,S.bitrate=M.bandwidth,S.width=M.width,S.height=M.height,S.tilesHor=1,S.tilesVert=1,M.essentialProperties&&M.essentialProperties.forEac
20h((b=>{if(r.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(b.schemeIdUri)>=0&&b.value){const J=b.value.split("x");J.length!==2||isNaN(J[0])||isNaN(J[1])||(S.tilesHor=parseInt(J[0],10),S.tilesVert=parseInt(J[1],10))}})),R?x.updateSegmentData(M).then((b=>{(function(J,O,ee){let $=[];const ie=(function(be,Ce){const we=[];let ce,le,re,me,ye=0;for(ce=0,le=be.segments.length;ce<le;ce++)re=be.segments[ce],me=Mi({durationInTimescale:re.duration,fTimescale:re.timescale,index:ye,isDynamic:t.getIsDynamic(),mediaRange:re.mediaRange,mediaTime:re.startTime,mediaUrl:re.media,representation:Ce,timelineConverter:_}),me&&(we.push(me),me=null,ye++);return we})(ee,O);O.segments=ie,O.fragmentDuration=O.segmentDuration||(O.segments&&O.segments.length>0?O.segments[0].duration:NaN),J.segmentDuration=O.segments[0].duration,J.readThumbnail=function(be,Ce){let we=null;$.some((ce=>{if(ce.start<=be&&ce.end>be)return we=ce.url,!0})),we?Ce(we):O.segments.some((ce=>{if(ce.mediaStartTime<=be&&ce.mediaStartTime+ce.duration>be){const le=u.resolve(O.path),re=new ja.default({method:"get",url:le.url,responseType:"arraybuffer",customData:{request:{range:ce.mediaRange},onloadend:function(ye){let te=K.getSamplesInfo(ye.target.response),q=new Blob([ye.target.response.slice(te.sampleList[0].offset,te.sampleList[0].offset+te.sampleList[0].size)],{type:"image/jpeg"}),oe=window.URL.createObjectURL(q);$.push({start:ce.mediaStartTime,end:ce.mediaStartTime+ce.duration,url:oe}),Ce&&Ce(oe)}}}),me=new Wa.default({request:re});return W.load(re,me),!0}}))}})(S,M,b)})):(S.startNumber=M.startNumber,S.segmentDuration=M.segmentDuration,S.timescale=M.timescale,S.templateUrl=(function(b){const J=N.isRelative(b.media)?N.resolve(b.media,u.resolve(b.path).url):b.media;return J?ui(J,b.id):""})(M)),S.tilesHor>0&&S.tilesVert>0&&(S.widthPerTile=S.width/S.tilesHor,S.heightPerTile=S.height/S.tilesVert,f.push(S))}function Z(){f=[],A=[],F=-1,B=null,U&&(U.reset(),U=null)}return E={addTracks:function(){if(!c||!t||(B=t.getMediaInfoForType(c,r.default.IMAGE),!B))return;const M=t.getVoRepresentations(B);M&&M.length>0&&M.forEach((R=>{(R.segmentInfoType===de.default.SEGMENT_TEMPLATE&&R.segmentDuration>0&&R.media||R.segmentInfoType===de.default.SEGMENT_TIMELINE)&&z(R),R.segmentInfoType===de.default.SEGMENT_BASE&&z(R,!0),A.push(R)})),f.length>0&&f.sort(((R,S)=>R.bitrate-S.bitrate))},getCurrentTrack:function(){return F<0?null:f[F]},getCurrentTrackIndex:function(){return F},getRepresentations:function(){return A},getThumbnailRequestForTime:function(M){let R;const S=t.getVoRepresentations(B);for(let b=0;b<S.length;b++)if(f[F].id===S[b].id){R=S[b];break}return U.getSegmentRequestForTime(B,R,M)},getTracks:function(){return f},reset:Z,setTrackById:function(M){if(!f||f.length===0)return;const R=f.findIndex((S=>S.id===M));R!==-1&&(F=R)},setTrackByIndex:function(M){f&&f.length!==0&&(M>=f.length&&(M=f.length-1),F=M)}},Z(),W=(0,Ka.default)(e).create({}),K=ar(e).getInstance(),x=Ya(e).create({events:g,eventBus:I,streamInfo:c,timelineConverter:_,dashConstants:D,dashMetrics:n.dashMetrics,segmentBaseController:n.segmentBaseController,type:r.default.IMAGE}),U=Ua(e).create({streamInfo:c,type:r.default.IMAGE,timelineConverter:_,segmentsController:x,baseURLController:u,debug:v,eventBus:I,events:g,dashConstants:D,urlUtils:N}),U.initialize(!!t&&t.getIsDynamic()),E}za.__dashjs_factory_name="ThumbnailTracks";var Yo=L.default.getClassFactory(za);function $a(n){const e=this.context,t=n.streamInfo;let u,c;function _(I){c.setTrackByIndex(I)}function v(){c&&c.reset()}return u={getCurrentTrack:function(){return c.getCurrentTrack()},getCurrentTrackIndex:function(){return c.getCurrentTrackIndex()},getPossibleVoRepresentations:function(){return c.getRepresentations()},getStreamId:function(){return t.id},initialize:function(){c.addTracks();const I=c.getTracks();I&&I.length>0&&_(0)},provide:function(I,g){if(typeof g!="function")return;const D=c.getCurrentTrack();let N,E;if(!D||D.segmentDuration<=0||I==null)return void g(null);E=c.getThumbnailRequestForTime(I),E&&(D.segmentDuration=E.duration),N=I%D.segmentDuration;const f=Math.floor(N*D.tilesHor*D.tilesVert/D.segmentDuration),A=new Go;if(A.width=Math.floor(D.widthPerTile),A.height=Math.floor(D.heightPerTile),A.x=Math.floor(f%D.tilesHor)*D.widthPerTile,A.y=Math.floor(f/D.tilesHor)*D.heightPerTile,"readThumbnail"in D)return D.readThumbnail(I,(U=>{A.url=U,g(A)}));if(E)A.url=E.url,D.segmentDuration=NaN;else{const U=Math.floor(I/D.segmentDuration);A.url=(function(F,B){const x=B+F.startNumber;return ui(F.templateUrl,void 0,x,void 0,F.bandwidth,(x-1)*F.segmentDuration*F.timescale)})(D,U)}g(A)},reset:v,setTrackByIndex:_,setTrackById:function(I){c.setTrackById(I)}},v(),c=Yo(e).create({streamInfo:t,adapter:n.adapter,baseURLController:n.baseURLController,timelineConverter:n.timelineConverter,debug:n.debug,eventBus:n.eventBus,events:n.events,dashConstants:n.dashConstants,dashMetrics:n.dashMetrics,segmentBaseController:n.segmentBaseController}),u}
20$a.__dashjs_factory_name="ThumbnailController";var Vo=L.default.getClassFactory($a);const qo=[r.default.VIDEO,r.default.AUDIO,r.default.TEXT,r.default.MUXED,r.default.IMAGE];function Qa(n){n=n||{};const e=this.context,t=(0,h.default)(e).getInstance(),u=(0,Ht.default)(e).getInstance(),c=n.manifestModel,_=n.mediaPlayerModel,v=n.dashMetrics,I=n.manifestUpdater,g=n.adapter,D=n.timelineConverter,N=n.capabilities,E=n.errHandler,f=n.abrController,A=n.playbackController,U=n.throughputController,F=n.eventController,B=n.mediaController,x=n.protectionController,W=n.textController,K=n.videoModel;let z=n.streamInfo;const Z=n.settings;let M,R,S,b,J,O,ee,$,ie,be,Ce,we,ce,le,re,me;function ye(at,Ut,Xt){return new Promise(((Be,Xe)=>{Rt(),an();let bt=K.getElement();const et=[];qo.forEach((qt=>{if((qt!==r.default.TEXT||at)&&(qt!==r.default.VIDEO||!bt||bt&&/^VIDEO$/i.test(bt.nodeName))){const $t=Xt.find((rn=>rn.mediaInfo.type===qt));et.push(te(qt,at,$t))}})),Promise.all(et).then((()=>(function(qt,$t){return new Promise((rn=>{const Mn={},_e=le.map((nt=>{const Kt=nt.getRepresentation(),$e=$t.find((Gt=>Gt.mediaInfo.type===Kt.mediaInfo.type));return nt.createBufferSinks(qt,$e)}));Promise.all(_e).then((nt=>{nt.forEach((Kt=>{Kt&&(Mn[Kt.getType()]=Kt)})),rn(Mn)})).catch((()=>{rn(Mn)}))}))})(Ut,Xt))).then((qt=>{if(le.length===0){const $t="No streams to play.";E.error(new on.default(wn.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,$t,c.getValue())),Ce.fatal($t)}else kt();at&&W.createTracks(z),Be(qt)})).catch((qt=>{Xe(qt)}))}))}function te(at,Ut,Xt){let Be,Xe=g.getAllMediaInfoForType(z,at),bt=[],et=null,qt=-1;if(!Xe||Xe.length===0)return Ce.info("No "+at+" data."),Promise.resolve();at===r.default.VIDEO&&(O=!0),at===r.default.AUDIO&&(b=!0);for(let rn=0,Mn=Xe.length;rn<Mn;rn++)et=Xe[rn],at===r.default.TEXT&&et.isEmbedded&&(W.addEmbeddedTrack(z,et),bt.push(et)),q(et)&&B.addTrack(et),et.type===r.default.ENHANCEMENT&&(qt=rn);if(bt.length>0&&(B.setInitialMediaSettingsForType(at,z),W.addMediaInfosToBuffer(z,at,bt)),Xe=Xe.filter((rn=>!rn.isEmbedded)),Xe.length===0)return Promise.resolve();if(at===r.default.IMAGE)return re=Vo(e).create({streamInfo:z,adapter:g,baseURLController:n.baseURLController,timelineConverter:n.timelineConverter,debug:R,eventBus:t,events:m.default,dashConstants:de.default,dashMetrics:n.dashMetrics,segmentBaseController:n.segmentBaseController}),re.initialize(),Promise.resolve();t.trigger(m.default.STREAM_INITIALIZING,{streamInfo:z,mediaInfo:et}),B.setInitialMediaSettingsForType(at,z);let $t=oe(Xe,Ut,at);if(qt>=0){let rn=new So(t);rn.open(),rn.duration=z.manifestInfo.duration;let Mn=oe(Xe,rn,r.default.ENHANCEMENT);Mn.selectMediaInfo(new Fr({newMediaInfo:Xe[qt]})),$t.setEnhancementStreamProcessor(Mn)}if(Be=B.getCurrentTrackFor(at,z.id),Be){const rn=at===r.default.TEXT&&Be.isEmbedded?Xe[0]:Be,Mn=new Fr({newMediaInfo:rn,previouslySelectedRepresentation:Xt});return $t.selectMediaInfo(Mn)}return Promise.resolve()}function q(at){const Ut=at?at.type:null;let Xt;return Ut===r.default.MUXED?(Xt="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",Ce.fatal(Xt),E.error(new on.default(wn.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,Xt,c.getValue())),!1):!(Ut!==r.default.TEXT&&Ut!==r.default.IMAGE&&at.contentProtection&&at.contentProtection.length>0&&!N.supportsEncryptedMedia()&&(E.error(new on.default(wn.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,wn.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function oe(at,Ut,Xt){const Be=at&&at.length>0?at.filter((rn=>rn.type===Xt))[0]:null;let Xe=S.getModel(Be?Be.type:null);const bt=Be?Be.type:null,et=Be?Be.mimeType:null,qt=Be?Be.isFragmented:null;let $t=ko(e).create({abrController:f,adapter:g,baseURLController:n.baseURLController,boxParser:M,capabilities:N,dashMetrics:n.dashMetrics,errHandler:E,fragmentModel:Xe,manifestModel:c,mediaController:B,mediaPlayerModel:_,mimeType:et,playbackController:A,segmentBaseController:n.segmentBaseController,segmentBlacklistController:ce,settings:Z,streamInfo:z,textController:W,throughputController:U,timelineConverter:D,type:bt});return $t.initialize(Ut,O,qt),le.push($t),$t.setMediaInfoArray(at),bt===r.default.TEXT&&W.addMediaInfosToBuffer(z,bt,at,Xe),$t}function Ue(at){let Ut=le?le.length:0;for(let Xt=0;Xt<Ut;Xt++){let Be=le[Xt].getFragmentModel();Be.abortRequests(),Be.resetInitialSettings(),le[Xt].reset(!1,at)}W&&W.deactivateStream(z),re&&(re.reset(),re=null),le=[],$=!1,J=!1,ln(!1),Ve(!1),t.trigger(m.default.STREAM_DEACTIVATED,{streamInfo:z})}function Ge(at){Ue(at),be=!1,O=!1,b=!1,ie=!1,me=[]}function Ve(at){ie=at}function je(){return z?z.start:NaN}function lt(){return z?z.id:null}function Rt(){if(!K||!f)throw new Error(r.default.MISSING_CONFIG_ERROR)}function Dt(at){at.error&&(E.error(at.error),Ce.fatal(at.error.message))}function an(){if(F){const at=g.getEventsFor(z);at&&at.length>0&&F.addInlineEvents(at,z.id)}}function vn(at){let Ut=qn(at);return Ut?Ut.getMediaInfo():null}function qn(at){return at?le.find((Ut=>Ut.getType()===at)):null}function Yn(){let at=Mt();const Ut=at.length;if(Ut!==0){for(let Xt=0;Xt<Ut;Xt++)if(!at[Xt].isBufferingCompleted()&&(at[Xt].getType()===r.default.AUDIO||at[Xt].getType()===r.default.VIDEO))return void Ce.debug("onBufferingCompleted - One streamProcessor has finished but",at[Xt].getType(),"one is not buffering completed");Ce.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),J=!0,t.trigger(m.default.STREAM_BUFFERING_COMPLETED,{streamInfo:z},{streamInfo:z})}else Ce.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function Wn(at){F&&F.addInbandEvents(at.events,z.id)}function xn(){kt()}function kn(){an()}function Un(at){return at&&at.type?Je(at.type):null}
20function Je(at){return at?Mt().filter((function(Ut){return Ut.getType()===at}))[0]:null}function Mt(){let at,Ut,Xt=[];for(let Be=0;Be<le.length;Be++)Ut=le[Be],at=Ut.getType(),at!==r.default.AUDIO&&at!==r.default.VIDEO&&at!==r.default.TEXT&&at!==r.default.ENHANCEMENT||Xt.push(Ut);return Xt}function Nt(){const at=le.length;for(let Ut=0;Ut<at&&le[Ut];Ut++)le[Ut].getScheduleController().startScheduleTimer()}function kt(){const at=le.length;if(x){x.clearMediaInfoArray();for(let Ut=0;Ut<at&&le[Ut];Ut++){const Xt=le[Ut].getType(),Be=le[Ut].getMediaInfo();if(Xt===r.default.AUDIO||Xt===r.default.VIDEO||Xt===r.default.TEXT&&Be&&Be.isFragmented){let Xe=le[Ut].getMediaInfo();Xe&&x.initializeForMedia(Xe)}}x.handleKeySystemFromManifest()}be||(be=!0,K.waitForReadyState(r.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(()=>{t.trigger(m.default.STREAM_INITIALIZED,{streamInfo:z})})))}function ln(at){we=at}function yn(){return we}return ee={activate:function(at,Ut,Xt=[]){return new Promise(((Be,Xe)=>{if(!$)return yn()?($=!0,t.trigger(m.default.STREAM_ACTIVATED,{streamInfo:z}),void Be()):void(function(bt,et,qt=[]){return ye(bt,et,qt)}
20)(at,Ut,Xt).then((()=>{$=!0,Xt&&Xt.length>0&&Nt(),t.trigger(m.default.STREAM_ACTIVATED,{streamInfo:z}),Be()})).catch((bt=>{Xe(bt)}));Be()}))},checkAndHandleCompletedBuffering:function(){J||le.forEach((at=>{at.checkAndHandleCompletedBuffering()}))},deactivate:Ue,getAdapter:function(){return g},getCurrentMediaInfoForType:function(at){const Ut=Je(at);return Ut?Ut.getMediaInfo():null},getCurrentRepresentationForType:function(at){const Ut=Je(at);return Ut?Ut.getRepresentation():null},getDuration:function(){return z?z.duration:NaN},getHasAudioTrack:function(){return b},getHasFinishedBuffering:function(){return J},getHasVideoTrack:function(){return O},getId:lt,getIsActive:function(){return $},getIsEndedEventSignaled:function(){return ie},getPreloaded:yn,getRepresentationForTypeById:function(at,Ut){let Xt;if(at===r.default.IMAGE){if(!re)return null;Xt=re.getPossibleVoRepresentations()}else Xt=(function(bt){let et=qn(bt);return et?et.getAllMediaInfos():[]})(at).flatMap((bt=>f.getPossibleVoRepresentationsFilteredBySettings(bt,!0)));if(!Xt||Xt.length===0)return null;const Be=Xt.filter((Xe=>Xe.id===Ut));return Be&&Be.length>0?Be[0]:null},getRepresentationForTypeByIndex:function(at,Ut){let Xt;if(at===r.default.IMAGE){if(!re)return null;Xt=re.getPossibleVoRepresentations()}else{const Be=vn(at);Xt=f.getPossibleVoRepresentationsFilteredBySettings(Be,!0)}return Xt[Ut=Math.max(Math.min(Ut,Xt.length-1),0)]},getRepresentationsByType:function(at,Ut=!0){if(Rt(),at===r.default.IMAGE)return re?re.getPossibleVoRepresentations():[];const Xt=vn(at);return Ut?f.getPossibleVoRepresentationsFilteredBySettings(Xt,!0):f.getPossibleVoRepresentations(Xt,!0)},getStartTime:je,getStreamId:function(){return z?z.id:null},getStreamInfo:function(){return z},getStreamProcessors:Mt,getThumbnailController:function(){return re},initialize:function(){t.on(m.default.BUFFERING_COMPLETED,Yn,ee),t.on(m.default.INBAND_EVENTS,Wn,ee),t.on(m.default.DATA_UPDATE_COMPLETED,xn,ee),t.on(H.default.PLAYBACK_SEEKED,kn,ee),x&&(t.on(m.default.KEY_ERROR,Dt,ee),t.on(m.default.SERVER_CERTIFICATE_UPDATED,Dt,ee),t.on(m.default.LICENSE_REQUEST_COMPLETE,Dt,ee),t.on(m.default.KEY_SYSTEM_SELECTED,Dt,ee),t.on(m.default.KEY_SESSION_CREATED,Dt,ee)),W.initializeForStream(z),t.trigger(m.default.STREAM_UPDATED,{streamInfo:z})},initializeForTextWithMediaSource:function(at){return new Promise(((Ut,Xt)=>{te(r.default.TEXT,at,null).then((()=>(function(){const Be=Je(r.default.TEXT);return Be?Be.createBufferSinks():Promise.resolve()})())).then((()=>{W.createTracks(z),Ut()})).catch((Be=>{Xt(Be)}))}))},prepareQualityChange:function(at){const Ut=Je(at.mediaType);Ut&&Ut.prepareQualityChange(at)},prepareTrackChange:function(at){if(!$||!z)return;J=!1;let Ut=at.newMediaInfo,Xt=c.getValue(),Be=Un(Ut);if(!Be)return;let Xe=A.getTime();if(Ce.info("Stream - Process track changed at current time "+Xe),Xt.refreshManifestOnSwitchTrack)me.push(at),I.getIsUpdating()||(Ce.debug("Stream - Refreshing manifest for switch track"),I.refreshManifest());else{Be.clearScheduleTimer(),Be.setTrackSwitchInProgress(!0);const bt=Be.getRepresentation();Be.selectMediaInfo(new Fr({newMediaInfo:Ut})).then((()=>{const et=!!(at&&at.options&&at.options.hasOwnProperty("replaceBuffer"))&&at.options.replaceBuffer;return Be.prepareTrackSwitch(bt,et)})).then((()=>{Be.setTrackSwitchInProgress(!1)}))}},reset:function(at){S&&(S.reset(),S=null),f&&z&&f.clearDataForStream(z.id),ce&&(ce.reset(),ce=null),W&&z&&W.clearDataForStream(z.id),B&&z&&B.clearDataForStream(z.id),Ge(at),z=null,t.off(m.default.BUFFERING_COMPLETED,Yn,ee),t.off(m.default.INBAND_EVENTS,Wn,ee),t.off(m.default.DATA_UPDATE_COMPLETED,xn,ee),t.off(H.default.PLAYBACK_SEEKED,kn,ee),x&&(t.off(m.default.KEY_ERROR,Dt,ee),t.off(m.default.SERVER_CERTIFICATE_UPDATED,Dt,ee),t.off(m.default.LICENSE_REQUEST_COMPLETE,Dt,ee),t.off(m.default.KEY_SYSTEM_SELECTED,Dt,ee),t.off(m.default.KEY_SESSION_CREATED,Dt,ee))},setIsEndedEventSignaled:Ve,setMediaSource:function(at){return new Promise(((Ut,Xt)=>{const Be=[];for(let Xe=0;Xe<le.length;)q(le[Xe].getMediaInfo())?(Be.push(le[Xe].setMediaSource(at)),Xe++):(le[Xe].reset(),le.splice(Xe,1));Promise.all(Be).then((()=>{for(let Xe=0;Xe<le.length;Xe++)le[Xe].dischargePreBuffer();if(le.length===0){const Xe="No streams to play.";E.error(new on.default(wn.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,Xe+"nostreams",c.getValue())),Ce.fatal(Xe)}Ut()})).catch((Xe=>{Ce.error(Xe),Xt(Xe)}))}))},startPreloading:function(at,Ut,Xt=[]){return new Promise(((Be,Xe)=>{yn()?Xe():(Ce.info(`[startPreloading] Preloading next stream with i
20d ${lt()}`),ln(!0),ye(at,Ut,Xt).then((()=>{for(let bt=0;bt<le.length&&le[bt];bt++)le[bt].setExplicitBufferingTime(je()),le[bt].getScheduleController().startScheduleTimer();Be()})).catch((()=>{ln(!1),Xe()})))}))},startScheduleControllers:Nt,triggerProtectionError:function(at){Dt(at)},updateData:function(at){return new Promise((Ut=>{z=at,F&&an();let Xt,Be=[];for(let Xe=0,bt=le.length;Xe<bt;Xe++){let et=le[Xe];const qt=et.getMediaInfo();Be.push(et.updateStreamInfo(z));let $t=g.getAllMediaInfoForType(z,et.getType());if($t=$t.filter((rn=>!rn.isEmbedded)),et.setMediaInfoArray($t),$t)for(let rn=0;rn<$t.length;rn++)g.areMediaInfosEqual(qt,$t[rn])&&Be.push(et.selectMediaInfo(new Fr({newMediaInfo:$t[rn]})))}Promise.all(Be).then((()=>{let Xe=[];for(;me.length>0;){let bt=me.pop(),et=bt.newMediaInfo;if(Xt=Un(bt.oldMediaInfo),!Xt)return;const qt=Xt.getRepresentation();Xt.setTrackSwitchInProgress(!0),Xe.push(Xt.prepareTrackSwitch(qt)),Xe.push(Xt.selectMediaInfo(new Fr({newMediaInfo:et})))}return Promise.all(Xe)})).then((()=>{kt(),Xt&&Xt.setTrackSwitchInProgress(!1),t.trigger(m.default.STREAM_UPDATED,{streamInfo:z}),Ut()})).catch((Xe=>{E.error(Xe)}))}))}},(function(){try{R=(0,p.default)(e).getInstance(),Ce=R.getLogger(ee),Ge(),M=ar(e).getInstance(),ce=Fn(e).create({updateEventName:m.default.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:m.default.SEGMENT_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),S=bo(e).create({streamInfo:z,mediaPlayerModel:_,dashMetrics:v,errHandler:E,settings:Z,boxParser:M,dashConstants:de.default,urlUtils:u})}catch(at){throw at}})(),ee}Qa.__dashjs_factory_name="Stream";var Ko=L.default.getClassFactory(Qa);function Pi(){const n=this.context,e=(0,h.default)(n).getInstance(),t=(0,Ht.default)(n).getInstance();let u,c,_,v,I,g,D,N,E,f,A,U,F,B,x,W;function K(){N=[],E=[],f=null,A=null,F=null,U=NaN,_=!1,v=!1,B=I.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function z(){I.get().streaming.utcSynchronization.enabled&&!_&&!v&&F&&F.value&&F.schemeIdUri&&!isNaN(U)&&!isNaN(I.get().streaming.utcSynchronization.backgroundAttempts)&&(A&&(Date.now()-A)/1e3<30||(N=[],v=!0,Z(isNaN(I.get().streaming.utcSynchronization.backgroundAttempts)?2:I.get().streaming.utcSynchronization.backgroundAttempts)))}function Z(le){try{if(le<=0)return void we();const re=Date.now();g[F.schemeIdUri](F.value,(function(me){const ye=Date.now(),te=R(re,ye,me);N.push(te),Z(le-1)}),(function(){we()}))}catch{we()}}function M(le=null){let re=le||0;if(!E||E.length===0||re>=E.length)return void S();let me=E[re];if(me)if(g.hasOwnProperty(me.schemeIdUri)){const ye=new Date().getTime();g[me.schemeIdUri](me.value,(function(te){const q=new Date().getTime(),oe=R(ye,q,te);F=me,S(oe)}),(function(){M(re+1)}))}else M(re+1);else S()}function R(le,re,me){return me-(re-(re-le)/2)}function S(le=NaN){let re=isNaN(le);re&&I.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(function(){let me=D.getLatestMPDRequestHeaderValueByID("Date"),ye=me!==null?new Date(me).getTime():Number.NaN;isNaN(ye)?Ce(!0):Ce(!1,ye-Date.now())})():Ce(re,le)}function b(le){let re=Date.parse(le);return isNaN(re)&&(re=(function(me){let ye,te,q=/^([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}))?/.exec(me);return ye=Date.UTC(parseInt(q[1],10),parseInt(q[2],10)-1,parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10),q[6]&&(parseInt(q[6],10)||0),q[7]&&1e3*parseFloat(q[7])||0),q[9]&&q[10]&&(te=60*parseInt(q[9],10)+parseInt(q[10],10),ye+=(q[8]==="+"?-1:1)*te*60*1e3),new Date(ye).getTime()})(le)),re}function J(le){return Date.parse(le)}function O(le){return Date.parse(le)}function ee(le,re,me){me()}function $(le,re,me){let ye=b(le);isNaN(ye)?me():re(ye)}function ie(le,re,me,ye,te){let q,oe,Ue=!1,Ge=new XMLHttpRequest,Ve=te?ke.HTTPRequest.HEAD:ke.HTTPRequest.GET,je=re.match(/\S+/g);
20if(re=je.shift(),q=function(){Ue||(Ue=!0,je.length?ie(le,je.join(" "),me,ye,te):ye())},oe=function(){let lt,Rt;Ge.status===200&&(lt=te?Ge.getResponseHeader("Date"):Ge.response,Rt=le(lt),isNaN(Rt)||(me(Rt),Ue=!0))},t.isRelative(re)){const lt=W.resolve();lt&&(re=t.resolve(re,lt.url))}Ge.open(Ve,re),Ge.timeout=5e3,Ge.onload=oe,Ge.onloadend=q,Ge.send()}function be(le,re,me){ie(O,le,re,me,!0)}function Ce(le,re){if(isNaN(U)||isNaN(re)||le||(function(ye){try{const te=ce(ye),q=isNaN(B)?30:B,oe=isNaN(I.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:I.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,Ue=isNaN(I.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:I.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,Ge=isNaN(I.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:I.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;let Ve;te?(Ve=Math.min(q*oe,Ue),c.debug(`Increasing timeBetweenSyncAttempts to ${Ve}`)):(Ve=Math.max(q/oe,Ge),c.debug(`Decreasing timeBetweenSyncAttempts to ${Ve}`)),B=Ve}catch{}})(re),!le&&!isNaN(re)){f=Date.now(),_=!1;const ye=isNaN(U);U=re,ye&&z(),c.debug(`Completed UTC sync. Setting client - server offset to ${re}`)}le&&(F=null,_=!1,x.error(new on.default(wn.default.TIME_SYNC_FAILED_ERROR_CODE,wn.default.TIME_SYNC_FAILED_ERROR_MESSAGE)));const me=I.get().streaming.utcSynchronization.artificialTimeOffsetToApply;e.trigger(m.default.UPDATE_TIME_SYNC_OFFSET,{offset:re+me}),e.trigger(m.default.TIME_SYNCHRONIZATION_COMPLETED)}function we(){if(!N||N.length===0)return;const le=N.reduce(((re,me)=>re+me),0)/N.length;ce(le)?c.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(c.debug(`Completed background UTC sync. Setting client - server offset to ${le}`),U=le,e.trigger(m.default.UPDATE_TIME_SYNC_OFFSET,{offset:U})),v=!1,A=Date.now()}function ce(le){try{if(isNaN(U))return!0;const re=I.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(I.get().streaming.utcSynchronization.maximumAllowedDrift)?I.get().streaming.utcSynchronization.maximumAllowedDrift:100;return le>=U-re&&le<=U+re}catch{return!0}}return u={initialize:function(){K(),g={"urn:mpeg:dash:utc:http-head:2014":be,"urn:mpeg:dash:utc:http-xsdate:2014":ie.bind(null,b),"urn:mpeg:dash:utc:http-iso:2014":ie.bind(null,J),"urn:mpeg:dash:utc:direct:2014":$,"urn:mpeg:dash:utc:http-head:2012":be,"urn:mpeg:dash:utc:http-xsdate:2012":ie.bind(null,b),"urn:mpeg:dash:utc:http-iso:2012":ie.bind(null,J),"urn:mpeg:dash:utc:direct:2012":$,"urn:mpeg:dash:utc:http-ntp:2014":ee,"urn:mpeg:dash:utc:ntp:2014":ee,"urn:mpeg:dash:utc:sntp:2014":ee}},attemptSync:function(le,re){E=le,_||((function(me){try{if(!me||!I.get().streaming.utcSynchronization.enabled)return!1;const ye=isNaN(B)?30:B;return!(f&&ye&&!isNaN(ye))||(Date.now()-f)/1e3>=ye}catch{return!0}})(re)?(_=!0,M()):e.trigger(m.default.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(le){le&&(le.dashMetrics&&(D=le.dashMetrics),le.baseURLController&&(W=le.baseURLController),le.errHandler&&(x=le.errHandler),le.settings&&(I=le.settings))},reset:function(){K(),e.off(m.default.ATTEMPT_BACKGROUND_SYNC,z,u)}},c=(0,p.default)(n).getInstance().getLogger(u),e.on(m.default.ATTEMPT_BACKGROUND_SYNC,z,u),u}Pi.__dashjs_factory_name="TimeSyncController";const Oi=L.default.getSingletonFactory(Pi);Oi.HTTP_TIMEOUT_MS=5e3,L.default.updateSingletonFactory(Pi.__dashjs_factory_name,Oi);var jo=Oi;function Xa(){let n,e,t,u,c;const _=this.context,v=(0,h.default)(_).getInstance();return n={attachMediaSource:function(I){let g=window.URL.createObjectURL(e);return I.setSource(g),u==="managedMediaSource"&&(I.setDisableRemotePlayback(!0),e.addEventListener("startstreaming",(()=>{v.trigger(H.default.MANAGED_MEDIA_SOURCE_START_STREAMING)})),e.addEventListener("endstreaming",(()=>{v.trigger(H.default.MANAGED_MEDIA_SOURCE_END_STREAMING)}))),g},createMediaSource:function(){let I="WebKitMediaSource"in window,g="MediaSource"in window;return"ManagedMediaSource"in window?(e=new ManagedMediaSource,u="managedMediaSource",c.info("Created ManagedMediaSource")):g?(e=new MediaSource,u="mediaSource",c.info("Created MediaSource")):I&&(e=new WebKitMediaSource,c.info("Created WebkitMediaSource")),e},detachMediaSource:function(I){I.setSource(null)},setConfig:function(I){I&&I.settings&&(t=I.settings)},setDuration:function I(g){e&&e.readyState==="open"&&(g===null&&isNaN(g)||e.duration!==g&&(g!==1/0||t.get().streaming.buffer.mediaSourceDurationInfinity||(g=Math.pow(2,32)),(function(D){let N=D.sourceBuffers;for(let E=0;E<N.length;E++)if(N[E].updating)return!0;return!1})(e)?setTimeout(I.bind(null,g),50):(c.info("Set MediaSource duration:"+g),e.duration=g)))},setSeekable:function(I,g){e&&typeof e.setLiveSeekableRange=="function"&&typeof e.clearLiveSeekableRange=="function"&&e.readyState==="open"&&I>=0&&I<g&&(e.clearLiveSeekableRange(),e.setLiveSeekableRange(I,g))}
20,signalEndOfStream:function(I){if(!I||I.readyState!=="open")return;let g=I.sourceBuffers;for(let D=0;D<g.length;D++)if(g[D].updating||g[D].buffered.length===0)return;c.info("call to mediaSource endOfStream"),I.endOfStream()}},c=(0,p.default)(_).getInstance().getLogger(n),n}Xa.__dashjs_factory_name="MediaSourceController";var Wo=L.default.getSingletonFactory(Xa);function Za(){const n="urn:mpeg:dash:event:2012",t="urn:mpeg:dash:event:callback:2015",_="discarded",v="updated",I="added";function g(we){for(const ce in we)if(Object.prototype.hasOwnProperty.call(we,ce))return!1;return!0}const D=this.context,N=(0,h.default)(D).getInstance();let E,f,A,U,F,B,x,W,K,z,Z;function M(){if(!x||!W)throw new Error("setConfig function has to be called previously")}function R(){Z=!1,A={},U={},F=null,z=!1,B=Date.now()/1e3}function S(){try{if(!z){z=!0;const we=W.getTime();let ce=we-B;ce=B>0?Math.max(0,ce):0,b(U,ce,we),b(A,ce,we),J(U),J(A),B=we,z=!1}}catch(we){z=!1,f.error(we)}}function b(we,ce,le){try{ie(we,function(me){if(me!==void 0){const ye=isNaN(me.duration)?0:me.duration;me.calculatedPresentationTime<=le&&me.calculatedPresentationTime+ce+ye>=le?Ce(me,H.default.EVENT_MODE_ON_START):(be(le,ye+ce,me.calculatedPresentationTime)||(function(te){try{const q=te.eventStream.period.start+te.eventStream.period.duration;return te.calculatedPresentationTime>q}catch(q){return f.error(q),!1}})(me))&&(f.debug(`Removing event ${me.id} from period ${me.eventStream.period.id} as it is expired or invalid`),(function(te,q){try{const oe=q.eventStream.schemeIdUri,Ue=q.eventStream.period.id,Ge=q.eventStream.value,Ve=q.id;te[Ue][oe]=te[Ue][oe].filter((je=>Ge&&je.eventStream.value&&je.eventStream.value!==Ge||je.id!==Ve)),te[Ue][oe].length===0&&delete te[Ue][oe]}catch(oe){f.error(oe)}})(we,me))}})}catch(re){f.error(re)}}function J(we){try{for(const ce in we)Object.prototype.hasOwnProperty.call(we,ce)&&g(we[ce])&&delete we[ce]}catch(ce){f.error(ce)}}function O(we,ce,le=!1){const re=we.eventStream.schemeIdUri,me=we.eventStream.value,ye=we.id;let te=_;ce[re]||(ce[re]=[]);const q=ce[re].findIndex((oe=>(!me||oe.eventStream.value&&oe.eventStream.value===me)&&oe.id===ye));if(q===-1)ce[re].push(we),we.triggeredReceivedEvent=!1,we.triggeredStartEvent=!1,te=I;else if(le){const oe=ce[re][q];we.triggeredReceivedEvent=oe.triggeredReceivedEvent,we.triggeredStartEvent=oe.triggeredStartEvent,ce[re][q]=we,te=v}return te}function ee(we){try{if(we.eventStream.value==1){const ce=we.calculatedPresentationTime;let le;le=we.calculatedPresentationTime==4294967295?NaN:we.calculatedPresentationTime+we.duration,N.trigger(H.default.MANIFEST_VALIDITY_CHANGED,{id:we.id,validUntil:ce,newDuration:le,newManifestValidAfter:NaN},{mode:H.default.EVENT_MODE_ON_START})}}catch(ce){f.error(ce)}}function $(we){try{const ce=W.getTime();ie(we,(function(le){const re=le.eventStream&&le.eventStream.period&&!isNaN(le.eventStream.period.duration)?le.eventStream.period.duration:NaN,me=le.eventStream&&le.eventStream.period&&!isNaN(le.eventStream.period.start)?le.eventStream.period.start:NaN;if(isNaN(re)||isNaN(me))return;const ye=le.calculatedPresentationTime;Math.abs(ye-ce)<300&&Ce(le,H.default.EVENT_MODE_ON_START)}))}catch(ce){f.error(ce)}}function ie(we,ce){try{if(we)for(const le in we){const re=we[le];for(const me in re){const ye=re[me];for(let te=0;te<ye.length;te++){const q=ye[te];q!==void 0&&ce(q)}}}}catch(le){f.error(le)}}function be(we,ce,le){try{return we-ce>le}catch(re){return f.error(re),!1}}function Ce(we,ce){try{const le=W.getTime(),re=we.id;if(ce===H.default.EVENT_MODE_ON_RECEIVE&&!we.triggeredReceivedEvent)return f.debug(`Received event ${re}`),we.triggeredReceivedEvent=!0,void N.trigger(we.eventStream.schemeIdUri,{event:we},{mode:ce});we.triggeredStartEvent||(we.eventStream.schemeIdUri===n&&we.eventStream.value==1?we.duration===0&&we.presentationTimeDelta===0||(f.debug(`Starting manifest refresh event ${re} at ${le}`),(function(){try{M(),x.refreshManifest()}catch(me){f.error(me)}})()):we.eventStream.schemeIdUri===t&&we.eventStream.value==1?(f.debug(`Starting callback event ${re} at ${le}`),(function(me){try{let ye=(0,Ka.default)(D).create({});const te=new ja.default({method:"get",url:me,responseType:"arraybuffer",customData:{}}),q=new Wa.default({request:te});ye.load(te,q)}catch(ye){f.error(ye)}})(we.messageData instanceof Uint8Array?tn.default.uint8ArrayToString(we.messageData):we.messageData)):(f.debug(`Starting event ${re}
20 from period ${we.eventStream.period.id} at ${le}`),N.trigger(we.eventStream.schemeIdUri,{event:we},{mode:ce}),K.get().streaming.events.deleteEventMessageDataTimeout>-1&&setTimeout((()=>{delete we.messageData,delete we.parsedMessageData}),K.get().streaming.events.deleteEventMessageDataTimeout)),we.triggeredStartEvent=!0)}catch(le){f.error(le)}}return E={addInlineEvents:function(we,ce){try{if(M(),A[ce]||(A[ce]={}),we)for(let le=0;le<we.length;le++){let re=we[le];if(!be(W.getTime(),isNaN(re.duration)?0:re.duration,re.calculatedPresentationTime)){let me=O(re,A[ce],!0);me===I?(f.debug(`Added inline event with id ${re.id} from period ${ce}`),Ce(re,H.default.EVENT_MODE_ON_RECEIVE)):me===v&&f.debug(`Updated inline event with id ${re.id} from period ${ce}`)}}}catch(le){throw le}},addInbandEvents:function(we,ce){try{M(),U[ce]||(U[ce]={});for(let le=0;le<we.length;le++){let re=we[le];be(W.getTime(),isNaN(re.duration)?0:re.duration,re.calculatedPresentationTime)||(O(re,U[ce],!1)===I?(re.eventStream.schemeIdUri===n&&ee(re),f.debug(`Added inband event with id ${re.id} from period ${ce}`),Ce(re,H.default.EVENT_MODE_ON_RECEIVE)):f.debug(`Inband event with scheme_id_uri ${re.eventStream.schemeIdUri}, value ${re.eventStream.value}, period id ${ce} and event id ${re.id} was ignored because it has been added before.`))}S()}catch(le){throw le}},getInbandEvents:function(){return U},getInlineEvents:function(){return A},start:function(){try{M(),f.debug("Start Event Controller");const we=K.get().streaming.events.eventControllerRefreshDelay;Z||isNaN(we)||(Z=!0,F=setInterval(S,we))}catch(we){throw we}},setConfig:function(we){try{if(!we)return;we.manifestUpdater&&(x=we.manifestUpdater),we.playbackController&&(W=we.playbackController),we.settings&&(K=we.settings)}catch(ce){throw ce}},reset:function(){(function(){try{F!==null&&Z&&(clearInterval(F),F=null,Z=!1,(function(){try{$(U),$(A)}catch(we){f.error(we)}})())}catch(we){throw we}})(),R()}},f=(0,p.default)(D).getInstance().getLogger(E),R(),E}Za.__dashjs_factory_name="EventController";var zo=L.default.getSingletonFactory(Za),ii={LEVELS:{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"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}},$o=P(5313),Ja=P(445),es=P(1923);function ts(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c,_,v,I,g,D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R,S,b,J,O,ee,$,ie,be,Ce,we,ce,le,re,me,ye,te,q,oe,Ue,Ge,Ve,je,lt,Rt,Dt,an;function vn(){if(!(I&&I.hasOwnProperty("load")&&R&&R.hasOwnProperty("initialize")&&R.hasOwnProperty("reset")&&R.hasOwnProperty("getClientTimeOffset")&&g&&M&&N&&re))throw new Error(r.default.MISSING_CONFIG_ERROR)}function qn(){(function(){try{const Qe=D.getStreamsInfo();if(!b&&Qe.length===0)throw new Error("There are no periods in the MPD");b&&Qe.length>0&&N.updateManifestUpdateInfo({currentTime:re.getTime(),buffered:le.getBufferRange(),presentationStartTime:Qe[0].start,clientTimeOffset:R.getClientTimeOffset()}),S.length>0&&(function(gn){gn.length!==0?S=S.filter((An=>{const Ln=gn.filter((Bn=>Bn.id===An.getId())).length>0||An.getId()===b.getId();return Ln||(u.debug(`Removing stream ${An.getId()}`),An.reset(!0),An=null),Ln})):u.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")})(Qe);const Yt=[];for(let gn=0,An=Qe.length;gn<An;gn++){const Ln=Qe[gn];Yt.push(Wn(Ln)),N.addManifestUpdateStreamInfo(Ln)}Promise.all(Yt).then((()=>new Promise(((gn,An)=>{b?gn():xn(Qe,gn,An)})))).then((()=>{e.trigger(m.default.STREAMS_COMPOSED),Kt()})).catch((gn=>{throw gn}))}catch(Qe){M.error(new on.default(wn.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,Qe.message+" nostreamscomposed",g.getValue())),we=!0,mr()}})()}function Yn(){lt=!0}function Wn(Qe){let Yt=ai(Qe.id);return Yt?Yt.updateData(Qe):(Yt=Ko(n).create({manifestModel:g,mediaPlayerModel:ye,dashMetrics:N,manifestUpdater:v,adapter:D,timelineConverter:R,capabilities:c,capabilitiesFilter:_,errHandler:M,baseURLController:U,segmentBaseController:F,textController:O,abrController:x,playbackController:re,throughputController:W,eventController:z,mediaController:K,protectionController:J,videoModel:le,streamInfo:Qe,settings:je}),S.push(Yt),Yt.initialize(),Promise.resolve())}function xn(Qe,Yt,gn){try{bt();const An=N.getCurrentDVRInfo().range;if(An.end<An.start)return void(function(Bn,tr,Cr,Ir){Rt&&clearTimeout(Rt);const oi=Math.min(1e3*(-1*(Bn.end-Bn.start)+2),2147483647);u.debug(`Waiting for ${oi} ms before playback can start`),e.trigger(m.default.AST_IN_FUTURE,{delay:oi}),Rt=setTimeout((()=>{xn(tr,Cr,Ir)}),oi)})(An,Qe,Yt,gn);je.get().streaming.applyProducerReferenceTime&&me.calculateProducerReferenceTimeOffsets(Qe);const Ln=Qe[0].manifestInfo;if(je.get().streaming.applyServiceDescription&&me.applyServiceDescription(Ln),D.getIsDynamic()){const Bn=zn(Ln);re.computeAndSetLiveDelay(Bn,Ln)}(je.get().streaming.applyContentSteering&&A.shouldQueryBeforeStart()?A.loadSteeringData():Promise.resolve()).then((()=>{const Bn=g.getValue();Bn&&U.update(Bn),kn(),Yt()})).catch((Bn=>{u.error(Bn),kn(),Yt()}))}catch(An){gn(An)}}function kn(){const Qe=(function(){let An;return An=D.getIsDynamic()?(function(){let Ln;const Bn=N.getCurrentDVRInfo();Ln=(Bn&&Bn.range?Bn.range.end:0)-re.getOriginalLiveDelay();const tr=Bn?Bn.range:null;if(tr){if(isNaN(Dt)&&Dt.toString().indexOf("posix:")===-1){const Ir=On(!0);isNaN(Ir)||(u.info(`Start time from URI parameters: ${Ir}`),Ln=Math.min(Ln,Ir))}else{u.info(`Start time provided by the app: ${Dt}`);const Ir=Dn(!0,Dt);isNaN(Ir)||(Ln=Math.min(Ln,Ir))}const Cr=je.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;Ln=Math.max(Ln,tr.start+Cr)}return Ln})():(function(){let Ln=$r()[0].getStreamInfo().start;if(isNaN(Dt)){const Bn=On(!1);isNaN(Bn)||(u.info(`Start time from URI parameters: ${Bn}`),Ln=Math.max(Ln,Bn))}else{u.info(`Start time provided by the app: ${Dt}`);const Bn=Dn(!1,Dt);isNaN(Bn)||(Ln=Math.max(Ln,Bn))}return Ln})(),An})();let Yt=Xe(Qe);const gn=Yt!==null?Yt:S[0];e.trigger(m.default.INITIAL_STREAM_SWITCH,{startTime:Qe}),Un(gn,null,Qe),Ge||(Ge=setInterval((function(){!be&&re.getTimeToStreamEnd()<=0&&!re.isSeeking()&&e.trigger(m.default.PLAYBACK_ENDED,{isLast:Sr().isLast})}),200))}function Un(Qe,Yt,gn){try{if(be||!Qe||Yt===Qe&&Qe.getIsActive())return;be=!0,e.trigger(m.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:Yt?Yt.getStreamInfo():null,toStreamInfo:Qe.getStreamInfo()});let An=!1,Ln=[],Bn=kt(Yt);b=Qe,Yt&&(An=Xt(Qe,Yt),Ln=Nt(Yt),Yt.deactivate(An)),gn=isNaN(gn)?!An&&Yt?Qe.getStreamInfo().start:NaN:gn,u.info(`Switch to stream ${Qe.getId()}. Seektime is ${gn}, current playback time is ${re.getTime()}. Seamless period switch is set to ${An}`),Ve=Ve.filter((tr=>tr.getId()!==b.getId())),re.initialize(Sr(),!!Yt),le.getElement()?Je({seekTime:gn,keepBuffers:An,sourceBufferSinksFromPreviousPeriod:Bn,streamActivated:!1,representationsFromPreviousPeriod:Ln}):Mt({seekTime:gn,keepBuffers:An,sourceBufferSinksFromPreviousPeriod:Bn})}catch{be=!1}}function Je(Qe){let Yt;function gn(){if(!ce||ce.readyState!=="open")return;u.debug("MediaSource is open!"),window.URL.revokeObjectURL(Yt),ce.removeEventListener("sourceopen",gn),ce.removeEventListener("webkitsourceopen",gn),Cn();const Ln=N.getCurrentDVRInfo();E.setSeekable(Ln.range.start,Ln.range.end),Qe.streamActivated?(isNaN(Qe.seekTime)||re.seek(Qe.seekTime,!0,!0),b.setMediaSource(ce).then((()=>{b.initializeForTextWithMediaSource(ce)}))):Mt(Qe)}function An(){ce.addEventListener("sourceopen",gn,!1),ce.addEventListener("webkitsourceopen",gn,!1),Yt=E.attachMediaSource(le),u.debug("MediaSource attached to element. Waiting on open...")}ce?Qe.keepBuffers?Mt(Qe):(E.detachMediaSource(le),An()):(ce=E.createMediaSource(),An())}function Mt(Qe){const Yt=Qe.representationsFromPreviousPeriod||[];b.activate(ce,Qe.sourceBufferSinksFromPreviousPeriod,Yt).then((()=>{isNaN(Qe.seekTime)||(e.trigger(m.default.SEEK_TARGET,{time:Qe.seekTime},{streamId:b.getId()}),re.seek(Qe.seekTime,!1,!0),b.startScheduleControllers()),be=!1,e.trigger(m.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Sr()})}))}function Nt(Qe){return(Qe?Qe.getStreamProcessors():[]).map((Yt=>Yt.getRepresentation()))}function kt(Qe){const Yt=new Map;
20return Qe&&(Qe?Qe.getStreamProcessors():[]).forEach((gn=>{const An=gn.getBuffer();An&&Yt.set(An.getType(),An)})),Yt}function ln(Qe){const Yt=Xe(Qe.seekTime);Yt&&Yt!==b?Yt&&Yt!==b&&(yn(Yt),(function(gn,An){const Ln=gn&&!isNaN(gn.seekTime)?gn.seekTime:NaN,Bn=b.getStreamProcessors().map((tr=>tr.prepareOuterPeriodPlaybackSeeking(gn)));Promise.all(Bn).then((()=>{Un(An,b,Ln)})).catch((tr=>{M.error(tr)}))})(Qe,Yt)):(yn(),(function(gn){b.getStreamProcessors().forEach((An=>An.prepareInnerPeriodPlaybackSeeking(gn))),Yr(fr.USER_REQUEST_STOP_REASON)})(Qe)),_r(Hr.SEEK_START_REASON)}function yn(Qe=null){at()}function at(){Ve&&Ve.length>0&&(Ve.forEach((Qe=>{Qe.deactivate(!0)})),Ve=[])}function Ut(Qe){if(Qe.newMediaInfo.streamInfo.id===b.getId()){if(at(),je.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&Qe.oldMediaInfo&&Qe.oldMediaInfo.codec!==Qe.newMediaInfo.codec){const Yt=re.getTime();return b.deactivate(!1),void Je({seekTime:Yt,keepBuffers:!1,streamActivated:!1})}b.prepareTrackChange(Qe)}}function Xt(Qe,Yt){try{return je.get().streaming.buffer.reuseExistingSourceBuffers&&(c.isProtectionCompatible(Yt.getStreamInfo(),Qe.getStreamInfo())||lt)&&c.supportsChangeType()&&je.get().streaming.buffer.useChangeType}catch{return!1}}function Be(Qe,Yt=null){if(!ce||Qe.getPreloaded()||!Xt(Qe,Yt))return;const gn=Nt(Yt),An=kt(Yt);Qe.startPreloading(ce,An,gn).then((()=>{Ve.push(Qe)}))}function Xe(Qe){if(isNaN(Qe))return null;const Yt=S.length;for(let gn=0;gn<Yt;gn++){const An=S[gn];if(Qe<parseFloat((An.getStartTime()+An.getDuration()).toFixed(5)))return An}return null}function bt(){try{const Qe=D.getIsDynamic(),Yt=D.getStreamsInfo()[0].manifestInfo,gn=re.getTime(),An=R.calcTimeShiftBufferWindow(S,Qe),Ln=Gt();if(An.start===void 0||An.end===void 0)return;Ln&&Ln.length!==0?Ln.forEach((Bn=>{N.addDVRInfo(Bn.getType(),gn,Yt,An)})):N.addDVRInfo(r.default.VIDEO,gn,Yt,An)}catch{}}function et(Qe){if(oe&&ie){const Yt=ye.getInitialBufferLevel(),gn=[r.default.TEXT];(isNaN(Yt)||Yt<=re.getBufferLevel(gn)||D.getIsDynamic()&&Yt>re.getLiveDelay())&&(oe=!1,_r(Hr.INITIAL_PLAYOUT_START_REASON),re.play())}Qe&&Qe.mediaType&&N.addBufferLevel(Qe.mediaType,new Date,1e3*Qe.bufferLevel)}function qt(Qe){Qe.streamInfo.id===b.getId()&&at(),ai(Qe.streamInfo.id).prepareQualityChange(Qe)}function $t(){if(D.getIsDynamic()&&re.getOriginalLiveDelay()!==0&&b){const Qe=D.getStreamsInfo();if(Qe.length>0){const Yt=Qe[0].manifestInfo,gn=zn(Yt);re.computeAndSetLiveDelay(gn,Yt)}}}function rn(){if(Pr()){const Qe=le.getPlaybackQuality();Qe&&N.addDroppedFrames(Qe)}}function Mn(){u.debug("[onPlaybackStarted]"),!oe&&q&&_r(Hr.RESUME_FROM_PAUSE_START_REASON),oe&&(oe=!1),Ue&&(Ue=!1,je.get().streaming.applyContentSteering&&!A.shouldQueryBeforeStart()&&A.loadSteeringData()),q=!1}function _e(Qe){u.debug("[onPlaybackPaused]"),Qe.ended||(q=!0,Yr(fr.USER_REQUEST_STOP_REASON))}function nt(Qe){u.debug(`Stream with id ${Qe.streamInfo.id} finished buffering`);const Yt=Qe.streamInfo.isLast;ce&&Yt?(u.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),E.signalEndOfStream(ce)):Kt()}function Kt(){if(!b)return;if(!b.getHasFinishedBuffering())return void b.checkAndHandleCompletedBuffering();const Qe=(function(gn=null){try{const An=gn||b||null;if(An){const Ln=An.getStreamInfo();return S.filter((function(Bn){const tr=Bn.getStreamInfo();return tr.start>Ln.start&&Ln.id!==tr.id}))}}catch{return[]}})(b);let Yt=0;for(;Yt<Qe.length;){const gn=Qe[Yt],An=Yt===0?b:Qe[Yt-1];!gn.getPreloaded()&&An.getHasFinishedBuffering()&&Be(gn,An),Yt+=1}}function $e(){Ge&&(clearInterval(Ge),Ge=null)}function Gt(){return b?b.getStreamProcessors():[]}function hn(Qe){if(b&&!b.getIsEndedEventSignaled()){b.setIsEndedEventSignaled(!0);const Yt=(function(gn=null){const An=gn||b||null;if(!An)return null;const Ln=An.getStreamInfo(),Bn=Ln.start;let tr=0,Cr=-1,Ir=NaN;for(;tr<S.length;){const oi=S[tr].getStreamInfo(),xi=oi.start-Bn;xi>0&&(isNaN(Ir)||xi<Ir)&&Ln.id!==oi.id&&(Ir=xi,Cr=tr),tr+=1}return Cr>=0?S[Cr]:null})();Yt?(u.debug(`StreamController onEnded, found next stream with id ${Yt.getStreamInfo().id}. Switching from ${b.getStreamInfo().id} to ${Yt.getStreamInfo().id}`),Un(Yt,b,NaN)):(u.debug("StreamController no next stream found"),b.setIsEndedEventSignaled(!1)),Yr(Yt?fr.END_OF_PERIOD_STOP_REASON:fr.END_OF_CONTENT_STOP_REASON)}Qe&&Qe.isLast&&($e(),A.stopSteeringRequestTimer())}function Cn(Qe){const Yt=Qe||Sr().manifestInfo.duration;E.setDuration(Yt)}function On(Qe){const Yt=B.getURIFragmentData();if(!Yt||!Yt.t)return NaN;const gn=$r()[0].getStreamInfo().start;return Yt.t=Yt.t.split(",")[0],Kn(Qe,Yt.t,gn)}function Dn(Qe,Yt){let gn=0;return Qe||(gn=$r()[0].getStreamInfo().start),Kn(Qe,Yt,gn)}function Kn(Qe,Yt,gn){const An=D.getRegularPeriods()[0],Ln=Yt.toString(),Bn=Ln.indexOf("posix:")!==-1?Ln.substring(6)==="now"?Date.now()/1e3:parseFloat(Ln.substring(6)):NaN;return Qe&&!isNaN(Bn)?R.calcPresentationTimeFromWallTime(new Date(1e3*Bn),An):parseFloat(Ln)+gn}function zn(Qe){try{return Qe&&Number.isFinite(Qe.maxFragmentDuration)?Qe.maxFragmentDuration:NaN}catch{return NaN}}function Ar(){const Qe=g.getValue();U.initialize(Qe)}function Nr(Qe){if(Qe.error)we=!0,mr();else{u.info("Manifest updated... updating data system wide.");const Yt=Qe.manifest;D.updatePeriods(Yt),_.filterUnsupportedFeatures(Yt).then((()=>{U.initialize(Yt);let gn=D.getUTCTimingSources();
20!D.getIsDynamic()||gn&&gn.length!==0||e.trigger(H.default.CONFORMANCE_VIOLATION,{level:ii.LEVELS.WARNING,event:ii.EVENTS.NO_UTC_TIMING_ELEMENT});let An=D.getIsDynamic()?gn.concat(te.getUTCTimingSources()):gn;f.attemptSync(An,D.getIsDynamic()),$.createFinalQueryStrings(Yt)}))}}function Pr(){return!!b&&b.getHasVideoTrack()}function xr(){return!!b&&b.getHasAudioTrack()}function Yr(Qe,Yt){Yt=Yt||new Date,Gt().forEach((gn=>{gn.finalisePlayList(Yt,Qe)})),N.addPlayList()}function _r(Qe){N.createPlaylistMetrics(1e3*re.getTime(),Qe)}function Vr(Qe){J.updateKeyStatusesMap(Qe),(function(){const Yt=Gt();let gn=!1;Yt.forEach((An=>{const Ln=An.getMediaInfo();!Ln||c.areKeyIdsUsable(Ln)?Ln&&c.areKeyIdsExpired(Ln)&&(function(Bn){const tr=ai(Bn.getStreamId());tr&&tr.triggerProtectionError({error:new on.default(es.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,es.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)})})(An):(gn=!0,(function(Bn){const tr=Bn.getAllMediaInfos().filter((Cr=>c.areKeyIdsUsable(Cr)));if(tr&&tr.length!==0)K.setTrack(tr[0],{replaceBuffer:!0});else{const Cr=Bn.getType();M.error(new on.default(wn.default.NO_SUPPORTED_KEY_IDS,`Type: ${Cr}: ${wn.default.NO_SUPPORTED_KEY_IDS_MESSAGE}`))}})(An))})),gn&&(re.getTime()===0?e.once(H.default.FRAGMENT_LOADING_COMPLETED,(()=>{yr()}),t):re.isProgressing(500).then((An=>{An||yr()})))})()}function yr(){const Qe=re.getTime();re.seek(Qe+.01,!1,!1)}function br(Qe){if(!Qe.error)return;let Yt;switch(Qe.error.code){case 1:Yt="MEDIA_ERR_ABORTED";break;case 2:Yt="MEDIA_ERR_NETWORK";break;case 3:Yt="MEDIA_ERR_DECODE",an.counts.mediaErrorDecode+=1;break;case 4:Yt="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:Yt="MEDIA_ERR_ENCRYPTED";break;default:Yt="UNKNOWN"}Yt==="MEDIA_ERR_DECODE"&&je.get().errors.recoverAttempts.mediaErrorDecode>=an.counts.mediaErrorDecode?(function(){u.error("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");const gn=re.getTime();b.deactivate(!1),u.info(`MediaSource has been resetted. Resuming playback from time ${gn}`),Je({seekTime:gn,keepBuffers:!1,streamActivated:!1})})():(Ce=!0,Qe.error.message&&(Yt+=" ("+Qe.error.message+")"),Qe.error.msExtendedCode&&(Yt+=" (0x"+(Qe.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),u.fatal("Video Element Error: "+Yt),Qe.error&&u.fatal(Qe.error),M.error(new on.default(Qe.error.code,Yt)),mr())}function Sr(){return b?b.getStreamInfo():null}function ai(Qe){for(let Yt=0,gn=S.length;Yt<gn;Yt++)if(S[Yt].getId()===Qe)return S[Yt];return null}function mi(Qe){isNaN(Qe.newDuration)||Cn(Qe.newDuration)}function Ei(){S=[],Dt=NaN,J=null,be=!1,b=null,Ce=!1,we=!1,oe=!0,Ue=!0,q=!1,ie=!0,Ge=null,lt=!1,Ve=[],Rt=null,an={counts:{mediaErrorDecode:0}}}function mr(){vn(),f.reset(),Yr(Ce||we?fr.FAILURE_STOP_REASON:fr.USER_REQUEST_STOP_REASON);for(let Qe=0,Yt=S?S.length:0;Qe<Yt;Qe++)S[Qe].reset(Ce);e.off(H.default.PLAYBACK_TIME_UPDATED,rn,t),e.off(H.default.PLAYBACK_SEEKING,ln,t),e.off(H.default.PLAYBACK_ERROR,br,t),e.off(H.default.PLAYBACK_STARTED,Mn,t),e.off(H.default.PLAYBACK_PAUSED,_e,t),e.off(H.default.PLAYBACK_ENDED,hn,t),e.off(H.default.METRIC_ADDED,si,t),e.off(H.default.MANIFEST_VALIDITY_CHANGED,mi,t),e.off(H.default.BUFFER_LEVEL_UPDATED,et,t),e.off(H.default.QUALITY_CHANGE_REQUESTED,qt,t),e.off(H.default.CONTENT_STEERING_REQUEST_COMPLETED,Ar,t),m.default.KEY_SESSION_UPDATED&&e.off(m.default.KEY_SESSION_UPDATED,Yn,t),e.off(m.default.MANIFEST_UPDATED,Nr,t),e.off(m.default.STREAM_BUFFERING_COMPLETED,nt,t),e.off(m.default.TIME_SYNCHRONIZATION_COMPLETED,qn,t),e.off(m.default.CURRENT_TRACK_CHANGED,Ut,t),e.off(m.default.SETTING_UPDATED_LIVE_DELAY,$t,t),e.off(m.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,$t,t),e.off(Ja.default.INTERNAL_KEY_STATUSES_CHANGED,Vr,t),U.reset(),v.reset(),z.reset(),N.clearAllCurrentMetrics(),g.setValue(null),I.reset(),R.reset(),Z.reset(),ce&&(E.detachMediaSource(le),ce=null),le=null,J&&(J=null,ee=null,g.getValue()&&e.trigger(m.default.PROTECTION_DESTROYED,{data:g.getValue().url})),$e(),e.trigger(m.default.STREAM_TEARDOWN_COMPLETE),Ei()}function si(Qe){if(Qe.metric===o.DVR_INFO){const Yt=xr()?r.default.AUDIO:r.default.VIDEO;Qe.mediaType===Yt&&E.setSeekable(Qe.value.range.start,Qe.value.range.end)}}function $r(){return S}return t={addDVRMetric:bt,getActiveStream:function(){return b},getActiveStreamInfo:Sr,getActiveStreamProcessors:Gt,getAutoPlay:function(){return ie},getHasMediaOrInitialisationError:function(){return Ce||we},getInitialPlayback:function(){return oe},getIsStreamSwitchInProgress:function(){return be},getProtectionData:function(){return J?J.getProtectionData():null},getStreamById:ai,getStreamForTime:Xe,getStreams:$r,getTimeRelativeToStreamId:function(Qe,Yt){let gn=null,An=0,Ln=0,Bn=null;for(let tr=0;tr<S.length;tr++){if(gn=S[tr],Ln=gn.getStartTime(),Bn=gn.getDuration(),Number.isFinite(Ln)&&(An=Ln),gn.getId()===Yt)return Qe-An;Number.isFinite(Bn)&&(An+=Bn)}return null},hasAudioTrack:xr,hasVideoTrack:Pr,initialize:function(Qe,Yt){vn(),ie=Qe,ee=Yt,R.initialize(),v=ra(n).create(),v.setConfig({manifestModel:g,adapter:D,manifestLoader:I,errHandler:M,settings:je,contentSteeringController:A}),v.initialize(),z=zo(n).getInstance(),z.setConfig({manifestUpdater:v,playbackController:re,settings:je}),z.start(),$=(0,$o.default)(n).getInstance(),f.setConfig({dashMetrics:N,baseURLController:U,errHandler:M,settings:je}),f.initialize(),E.setConfig({settings:je}),J&&(e.trigger(m.default.PROTECTION_CREATED,{controller:J}),J.setMediaElement(le.getElement()),ee&&J.setProtectionData(ee)),e.on(H.default.PLAYBACK_TIME_UPDATED,rn,t),e.on(H.default.PLAYBACK_SEEKING,ln,t),e.on(H.default.PLAYBACK_ERROR,br,t),e.on(H.default.PLAYBACK_STARTED,Mn,t),e.on(H.default.PLAYBACK_PAUSED,_e,t),e.on(H.default.PLAYBACK_ENDED,hn,t),e.on(H.default.METRIC_ADDED,si,t),e.on(H.default.MANIFEST_VALIDITY_CHANGED,mi,t),e.on(H.default.BUFFER_LEVEL_UPDATED,et,t),e.on(H.default.QUALITY_CHANGE_REQUESTED,qt,t),e.on(H.default.CONTENT_STEERING_REQUEST_COMPLETED,Ar,t),m.default.KEY_SESSION_UPDATED&&e.on(m.default.KEY_SESSION_UPDATED,Yn,t),e.on(m.default.MANIFEST_UPDATED,Nr,t),e.on(m.default.STREAM_BUFFERING_COMPLETED,nt,t),e.on(m.default.TIME_SYNCHRONIZATION_COMPLETED,qn,t),e.on(m.default.CURRENT_TRACK_CHANGED,Ut,t),e.on(m.default.SETTING_UPDATED_LIVE_DELAY,$t,t),e.on(m.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,$t,t),e.on(Ja.default.INTERNAL_KEY_STATUSES_CHANGED,Vr,t)},load:function(Qe,Yt=NaN){vn(),Dt=Yt,I.load(Qe)},loadWithManifest:function(Qe,Yt=NaN){(function(){if(!v||!v.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")})(),Dt=Yt,v.setManifest(Qe)},refreshManifest:function(){v.getIsUpdating()||v.refreshManifest()},reset:mr,setConfig:function(Qe){Qe&&(Qe.capabilities&&(c=Qe.capabilities),Qe.capabilitiesFilter&&(_=Qe.capabilitiesFilter),Qe.manifestLoader&&(I=Qe.manifestLoader),Qe.manifestModel&&(g=Qe.manifestModel),Qe.mediaPlayerModel&&(ye=Qe.mediaPlayerModel),Qe.customParametersModel&&(te=Qe.customParametersModel),Qe.protectionController&&(J=Qe.protectionController),Qe.adapter&&(D=Qe.adapter),Qe.dashMetrics&&(N=Qe.dashMetrics),Qe.errHandler&&(M=Qe.errHandler),Qe.timelineConverter&&(R=Qe.timelineConverter),Qe.videoModel&&(le=Qe.videoModel),Qe.playbackController&&(re=Qe.playbackController),Qe.throughputController&&(W=Qe.throughputController),Qe.serviceDescriptionController&&(me=Qe.serviceDescriptionController),Qe.contentSteeringController&&(A=Qe.contentSteeringController),Qe.textController&&(O=Qe.textController),Qe.abrController&&(x=Qe.abrController),Qe.mediaController&&(K=Qe.mediaController),Qe.settings&&(je=Qe.settings),Qe.baseURLController&&(U=Qe.baseURLController),Qe.uriFragmentModel&&(B=Qe.uriFragmentModel),Qe.segmentBaseController&&(F=Qe.segmentBaseController),Qe.manifestUpdater&&(v=Qe.manifestUpdater))},setProtectionData:function(Qe){ee=Qe,J&&J.setProtectionData(ee)},switchToVideoElement:function(Qe){b&&(re.initialize(Sr()),Je({seekTime:Qe,keepBuffers:!1,streamActivated:!0}))}},u=(0,p.default)(n).getInstance().getLogger(t),f=jo(n).getInstance(),E=Wo(n).getInstance(),Z=ct(n).getInstance(),Ei(),t}ts.__dashjs_factory_name="StreamController";var ns=L.default.getSingletonFactory(ts),Qo=class extends wt{constructor(){super(),this.captionData=null,this.label=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1,this.isTTML=null}},Xo=P(7377);function rs(){let n,e=0;function t(g){let D="";for(let N=0;N<g.length;++N)D+=g[N].uchar;return D.length-D.replace(/^\s+/,"").length}function u(g){return"left: "+3.125*g.x+"%; top: "+6.66*g.y1+"%; width: "+(100-3.125*g.x)+"%; height: "+6.66*Math.max(g.y2-1-g.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function c(g){return g==="red"?"rgb(255, 0, 0)":g==="green"?"rgb(0, 255, 0)":g==="blue"?"rgb(0, 0, 255)":g==="cyan"?"rgb(0, 255, 255)":g==="magenta"?"rgb(255, 0, 255)":g==="yellow"?"rgb(255, 255, 0)":g==="white"?"rgb(255, 255, 255)":g==="black"?"rgb(0, 0, 0)":g}function _(g,D){const N=g.videoHeight/15;return D?"font-size: "+N+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(D.foreground?c(D.foreground):"rgb(255, 255, 255)")+"; font-style: "+(D.italics?"italic":"normal")+"; text-decoration: "+(D.underline?"underline":"none")+"; white-space: pre; background-color: "+(D.background?c(D.background):"transparent")+";":"font-size: "+N+"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 v(g){return g.replace(/^\s+/g,"")}function I(g){return g.replace(/\s+$/g,"")}return n={createHTMLCaptionsFromScreen:function(g,D,N,E){let f=null,A=null,U=!1,F=-1,B={start:D,end:N,spans:[]},x="style_cea608_white_black";const W={},K={},z=[];let Z,M;for(Z=0;Z<15;++Z){const S=E.rows[Z];let b="",J=null;if(S.isEmpty()===!1){const O=t(S.chars);f===null&&(f={x:O,y1:Z,y2:Z+1,p:[]}),O!==F&&U&&(f.p.push(B),B={start:D,end:N,spans:[]},f.y2=Z,f.name="region_"+f.x+"_"+f.y1+"_"+f.y2,W.hasOwnProperty(f.name)===!1?(z.push(f),W[f.name]=f):(A
20=W[f.name],A.p.contat(f.p)),f={x:O,y1:Z,y2:Z+1,p:[]});for(let ee=0;ee<S.chars.length;++ee){const $=S.chars[ee],ie=$.penState;if(J===null||!ie.equals(J)){b.trim().length>0&&(B.spans.push({name:x,line:b,row:Z}),b="");let be="style_cea608_"+ie.foreground+"_"+ie.background;ie.underline&&(be+="_underline"),ie.italics&&(be+="_italics"),K.hasOwnProperty(be)||(K[be]=JSON.parse(JSON.stringify(ie))),J=ie,x=be}b+=$.uchar}b.trim().length>0&&B.spans.push({name:x,line:b,row:Z}),U=!0,F=O}else U=!1,F=-1,f&&(f.p.push(B),B={start:D,end:N,spans:[]},f.y2=Z,f.name="region_"+f.x+"_"+f.y1+"_"+f.y2,W.hasOwnProperty(f.name)===!1?(z.push(f),W[f.name]=f):(A=W[f.name],A.p.contat(f.p)),f=null)}f&&(f.p.push(B),f.y2=Z+1,f.name="region_"+f.x+"_"+f.y1+"_"+f.y2,W.hasOwnProperty(f.name)===!1?(z.push(f),W[f.name]=f):(A=W[f.name],A.p.contat(f.p)),f=null);const R=[];for(Z=0;Z<z.length;++Z){const S=z[Z],b="sub_cea608_"+e++,J=document.createElement("div");J.id=b;const O=u(S);J.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+O;const ee=document.createElement("div");ee.className="paragraph bodyStyle",ee.style.cssText=_(g);const $=document.createElement("div");$.className="cueUniWrapper",$.style.cssText="unicode-bidi: normal; direction: ltr;";for(let be=0;be<S.p.length;++be){const Ce=S.p[be];let we=0;for(M=0;M<Ce.spans.length;++M){let ce=Ce.spans[M];if(ce.line.length>0){if(M!==0&&we!=ce.row){const ye=document.createElement("br");ye.className="lineBreak",$.appendChild(ye)}let le=!1;we===ce.row&&(le=!0),we=ce.row;const re=K[ce.name],me=document.createElement("span");me.className="spanPadding "+ce.name+" customSpanColor",me.style.cssText=_(g,re),M!==0&&le?M===Ce.spans.length-1?me.textContent=I(ce.line):me.textContent=ce.line:Ce.spans.length>1&&M<Ce.spans.length-1&&ce.row===Ce.spans[M+1].row?me.textContent=v(ce.line):me.textContent=ce.line.trim(),$.appendChild(me)}}}ee.appendChild($),J.appendChild(ee);const ie={bodyStyle:["%",90]};for(const be in K)K.hasOwnProperty(be)&&(ie[be]=["%",90]);R.push({type:"html",start:D,end:N,cueHTMLElement:J,cueID:b,cellResolution:[32,15],isFromCEA608:!0,fontSize:ie,lineHeight:{},linePadding:{}})}return R}},n}rs.__dashjs_factory_name="EmbeddedTextHtmlRender";var Zo=L.default.getSingletonFactory(rs),gi=class{constructor(){this.time=null,this.verboseLevel=0}log(n,e){if(this.verboseLevel>=n){const t=typeof e=="function"?e():e;console.log(`${this.time} [${n}] ${t}`)}}},is=class{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(n){for(const e of["foreground","underline","italics","background","flash"])Object.prototype.hasOwnProperty.call(n,e)&&(this[e]=n[e])}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(n){return this.foreground===n.foreground&&this.underline===n.underline&&this.italics===n.italics&&this.background===n.background&&this.flash===n.flash}copy(n){this.foreground=n.foreground,this.underline=n.underline,this.italics=n.italics,this.background=n.background,this.flash=n.flash}},Jo=class{constructor(){this.uchar=" ",this.penState=new is}reset(){this.uchar=" ",this.penState.reset()}setChar(n,e){this.uchar=n,this.penState.copy(e)}setPenState(n){this.penState.copy(n)}equals(n){return this.uchar===n.uchar&&this.penState.equals(n.penState)}copy(n){this.uchar=n.uchar,this.penState.copy(n.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}};const Ur=100,el={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,
20185: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};function as(n){return String.fromCharCode(el[n]||n)}var tl=class{constructor(n=new gi){this.chars=[],this.cueStartTime=null,this.pos=0,this.currPenState=new is;for(let e=0;e<Ur;e++)this.chars.push(new Jo);this.logger=n}equals(n){for(let e=0;e<Ur;e++)if(!this.chars[e].equals(n.chars[e]))return!1;return!0}copy(n){for(let e=0;e<Ur;e++)this.chars[e].copy(n.chars[e])}isEmpty(){let n=!0;for(let e=0;e<Ur;e++)if(!this.chars[e].isEmpty()){n=!1;break}return n}setCursor(n){this.pos!==n&&(this.pos=n),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ur&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ur)}moveCursor(n){const e=this.pos+n;if(n>1)for(let t=this.pos+1;t<e+1;t++)this.chars[t].setPenState(this.currPenState);this.setCursor(e)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(n){n>=144&&this.backSpace();const e=as(n);this.pos>=Ur?this.logger.log(0,(()=>"Cannot insert "+n.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))}clearFromPos(n){let e;for(e=n;e<Ur;e++)this.chars[e].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const n=[];let e=!0;for(let t=0;t<Ur;t++){const u=this.chars[t].uchar;u!==" "&&(e=!1),n.push(u)}return e?"":n.join("")}setPenStyles(n){this.currPenState.setStyles(n),this.chars[this.pos].setPenState(this.currPenState)}};const Wr=15;var Li=class{constructor(n=new gi){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null;for(let e=0;e<Wr;e++)this.rows.push(new tl(n));this.logger=n}reset(){for(let n=0;n<Wr;n++)this.rows[n].clear();this.currRow=14}equals(n){let e=!0;for(let t=0;t<Wr;t++)if(!this.rows[t].equals(n.rows[t])){e=!1;break}return e}copy(n){for(let e=0;e<Wr;e++)this.rows[e].copy(n.rows[e])}isEmpty(){let n=!0;for(let e=0;e<Wr;e++)if(!this.rows[e].isEmpty()){n=!1;break}return n}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(n){this.rows[this.currRow].insertChar(n)}setPen(n){this.rows[this.currRow].setPenStyles(n)}moveCursor(n){this.rows[this.currRow].moveCursor(n)}setCursor(n){this.logger.log(2,"setCursor: "+n),this.rows[this.currRow].setCursor(n)}setPAC(n){this.logger.log(2,(()=>"pacData = "+JSON.stringify(n)));let e=n.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(let v=0;v<Wr;v++)this.rows[v].clear();const c=this.currRow+1-this.nrRollUpRows,_=this.lastOutputScreen;if(_){const v=_.rows[c].cueStartTime,I=this.logger.time;if(v!==null&&I!==null&&v<I)for(let g=0;g<this.nrRollUpRows;g++)this.rows[e-this.nrRollUpRows+g+1].copy(_.rows[c+g])}}this.currRow=e;const t=this.rows[this.currRow];if(n.indent!==null){const c=n.indent,_=Math.max(c-1,0);t.setCursor(n.indent),n.color=t.chars[_].penState.foreground}const u={foreground:n.color,underline:n.underline,italics:n.italics,background:"black",flash:!1};this.setPen(u)}setBkgData(n){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(n))),this.backSpace(),this.setPen(n),this.insertChar(32)}setRollUpRows(n){this.nrRollUpRows=n}rollUp(){if(this.nrRollUpRows===null)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const n=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(n,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(2,"Rolling up")}getDisplayText(n){n=n||!1;const e=[];let t="",u=-1;for(let c=0;c<Wr;c++){const _=this.rows[c].getTextString();_&&(u=c+1,n?e.push("Row "+u+": '"+_+"'"):e.push(_.trim()))}return e.length>0&&(t=n?"["+e.join(" | ")+"]":e.join(` 21`)),t}getTextAndFormat(){return this.rows}},ss=class{constructor(n,e,t=new gi){this.chNr=n,this.outputFilter=e,this.mode=null,this.displayedMemory=new Li(t),this.nonDisplayedMemory=new Li(t),this.lastOutputScreen=new Li(t),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=t,this.logger.log(2,"new Cea608Channel("+this.chNr+")")}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter?.reset?.(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(n){this.outputFilter=n}setPAC(n){this.writeScreen.setPAC(n)}setBkgData(n){this.writeScreen.setBkgData(n)}setMode(n){n!==this.mode&&(this.mode=n,this.logger.log(2,(()=>"MODE="+n)),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.setRollUpRows(null),this.nonDisplayedMemory.setRollUpRows(null)),this.mode=n)}insertChars(n){for(const t of n)this.writeScreen.insertChar(t);const e=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>e+": "+this.writeScreen.getDisplayText(!0))),this.mode!=="MODE_PAINT-ON"&&this.mode!=="MODE_ROLL-UP"||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(n){this.logger.log(2,"RU("+n+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(n)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}
21ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const n=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=n,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(n){this.logger.log(2,"TO("+n+") - Tab Offset"),this.writeScreen.moveCursor(n)}ccMIDROW(n){const e={flash:!1};e.underline=n%2==1,e.italics=n>=46,e.italics?e.foreground="white":e.foreground=["white","green","blue","cyan","red","yellow","magenta"][Math.floor(n/2)-16],this.logger.log(2,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)}outputDataUpdate(n=!1){const e=this.logger.time;e!==null&&this.outputFilter&&(this.cueStartTime!==null||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),n&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(n){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,n,this.displayedMemory),this.cueStartTime=n))}};const nl=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];function rl(n,e,t){return t.a===n&&t.b===e}function zr(n){const e=[];for(const t of n)e.push(t.toString(16));return e}const il={17:2,18:4,21:6,22:8,23:10,19:13,20:15},al={25:2,26:4,29:6,30:8,31:10,27:13,28:15},sl={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},ol={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14};function hi(n,e,t){t.a=n,t.b=e}var os=class{constructor(n,e,t){this.currentChannel=0,this.cmdHistory={a:null,b:null},this.lastTime=null;const u=this.logger=new gi;this.channels=[null,new ss(n,e,u),new ss(n+1,t,u)]}addData(n,e){this.lastTime=n,this.logger.time=n;for(let t=0;t<e.length;t+=2){const u=127&e[t],c=127&e[t+1];let _=!1,v=null;if(this.lastTime!==null&&(n=this.lastTime+.5*t*1001/3e4,this.logger.time=n),u===0&&c===0)continue;this.logger.log(3,(()=>"["+zr([e[t],e[t+1]])+"] -> ("+zr([u,c])+")"));const I=this.cmdHistory;if(u>=16&&u<=31){if(rl(u,c,I)){hi(null,null,I),this.logger.log(3,(()=>"Repeated command ("+zr([u,c])+") is dropped"));continue}hi(u,c,this.cmdHistory),_=this.parseCmd(u,c),_||(_=this.parseMidrow(u,c)),_||(_=this.parsePAC(u,c)),_||(_=this.parseBackgroundAttributes(u,c))}else hi(null,null,I);if(!_&&(v=this.parseChars(u,c),v.length)){const g=this.currentChannel;g&&g>0?this.channels[g].insertChars(v):this.logger.log(2,"No channel found yet. TEXT-MODE?")}_||v||this.logger.log(2,(()=>"Couldn't parse cleaned data "+zr([u,c])+" orig: "+zr([e[t],e[t+1]])))}}parseCmd(n,e){if(!((n===20||n===28||n===21||n===29)&&e>=32&&e<=47||(n===23||n===31)&&e>=33&&e<=35))return!1;const t=n===20||n===21||n===23?1:2,u=this.channels[t];return n===20||n===21||n===28||n===29?e===32?u.ccRCL():e===33?u.ccBS():e===34?u.ccAOF():e===35?u.ccAON():e===36?u.ccDER():e===37?u.ccRU(2):e===38?u.ccRU(3):e===39?u.ccRU(4):e===40?u.ccFON():e===41?u.ccRDC():e===42?u.ccTR():e===43?u.ccRTD():e===44?u.ccEDM():e===45?u.ccCR():e===46?u.ccENM():e===47&&u.ccEOC():u.ccTO(e-32),this.currentChannel=t,!0}parseMidrow(n,e){let t=0;if((n===17||n===25)&&e>=32&&e<=47){if(t=n===17?1:2,t!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const u=this.channels[t];return!!u&&(u.ccMIDROW(e),this.logger.log(3,(()=>"MIDROW ("+zr([n,e])+")")),!0)}return!1}parsePAC(n,e){let t;if(!((n>=17&&n<=23||n>=25&&n<=31)&&e>=64&&e<=127||(n===16||n===24)&&e>=64&&e<=95))return!1;const u=n<=23?1:2;t=e>=64&&e<=95?u===1?sl[n]:ol[n]:u===1?il[n]:al[n];const c=this.channels[u];return!!c&&(c.setPAC(this.interpretPAC(t,e)),this.currentChannel=u,!0)}interpretPAC(n,e){let t;const u={color:null,italics:!1,indent:null,underline:!1,row:n};return t=e>95?e-96:e-64,u.underline=!(1&~t),t<=13?u.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(t/2)]:t<=15?(u.italics=!0,u.color="white"):u.indent=4*Math.floor((t-16)/2),u}parseChars(n,e){let t,u=[],c=null;if(n>=25?(t=2,c=n-8):(t=1,c=n),c>=17&&c<=19){let _;_=c===17?e+80:c===18?e+112:e+144,this.logger.log(2,(()=>"Special char '"+as(_)+"' in channel "+t)),u=[_]}else n>=32&&n<=127&&(u=e===0?[n]:[n,e]);return u&&this.logger.log(3,(()=>"Char codes = "+zr(u).join(","))),u}
21parseBackgroundAttributes(n,e){if(!((n===16||n===24)&&e>=32&&e<=47||(n===23||n===31)&&e>=45&&e<=47))return!1;let t;const u={};n===16||n===24?(t=Math.floor((e-32)/2),u.background=nl[t],e%2==1&&(u.background=u.background+"_semi")):e===45?u.background="transparent":(u.foreground="black",e===47&&(u.underline=!0));const c=n<=23?1:2;return this.channels[c].setBkgData(u),!0}reset(){for(let n=0;n<Object.keys(this.channels).length;n++){const e=this.channels[n];e&&e.reset()}hi(null,null,this.cmdHistory)}cueSplitAtTime(n){for(const e of this.channels)e&&e.cueSplitAtTime(n)}};function ll(n,e,t){const u=[];for(let c=e;c<t;c++)c+2<t&&n.getUint8(c)===0&&n.getUint8(c+1)===0&&n.getUint8(c+2)===3?(u.push(0),u.push(0),c+=2):u.push(n.getUint8(c));return new DataView(new Uint8Array(u).buffer)}function ul(n,e,t,u){return!(n!==4||e<8)&&t.getUint8(u)===181&&t.getUint16(u+1)===49&&t.getUint32(u+3)===1195456820&&t.getUint8(u+7)===3}function cl(n,e){return(127&n)>0||(127&e)>0}const fl=6,dl=39,gl=40,hl=23,pl=24;function ml(n,e){const t=n.getUint8(e),u=31&t;if(u===fl)return{nalType:u,headerSize:1};const c=t>>1&63;if(c===dl||c===gl)return{nalType:c,headerSize:2};if(e+1>=n.byteLength)return null;const _=n.getUint8(e+1)>>3&31;return _===hl||_===pl?{nalType:_,headerSize:2}:null}function El(n,e){let t=0;for(;t<n.byteLength-1;){let c,_=0,v=0;do _+=c=n.getUint8(t++);while(c===255);do v+=c=n.getUint8(t++);while(c===255);if(ul(_,v,n,t)){const I=t+10,g=I+3*(31&n.getUint8(I-2));for(let D=I;D<g;D+=3){const N=n.getUint8(D);if(4&N){const E=3&N;if((u=E)===0||u===1){const f=n.getUint8(D+1),A=n.getUint8(D+2);cl(f,A)&&e[E].push(f,A)}}}}t+=v}var u}function Tl(n,e,t){let u=0;const c=[[],[]];for(let _=e;_<e+t-6;_++){u=n.getUint32(_);const v=_+4+u;if(v>e+t)break;const I=ml(n,_+4);if(I){const g=_+4+I.headerSize;v<=n.byteLength&&El(ll(n,g,v),c)}_+=u+3}return c}function ls(n){const e=n.errHandler,t=n.manifestModel,u=n.mediaController,c=n.videoModel,_=n.textTracks,v=n.vttParser,I=n.vttCustomRenderingParser,g=n.ttmlParser,D=n.streamInfo,N=n.settings,E=this.context,f=(0,h.default)(E).getInstance();let A,U,F,B,x,W,K,z,Z,M,R,S,b,J,O,ee,$=!1;function ie(){W=null,z=NaN,Z=[],K=!1,x=[],B=null}function be(q){const oe={};oe[de.default.SUBTITLE]="subtitles",oe[de.default.CAPTION]="captions",oe[de.default.FORCED_SUBTITLE]="subtitles";const Ue=new Qo;for(let Ge in q)Ue[Ge]=q[Ge];Ue.defaultTrack=(function(Ge){let Ve=!1;return R.length>1&&Ge.isEmbedded?Ve=Ge.id&&Ge.id===r.default.CC1:R.length===1?Ge.id&&typeof Ge.id=="string"&&Ge.id.substring(0,2)==="CC"&&(Ve=!0):R.length===0&&(Ve=Ge.index===x[0].index),Ve})(q),Ue.isTTML=(function(Ge){return Ge.codec&&Ge.codec.search(r.default.STPP)>=0||Ge.mimeType&&Ge.mimeType.search(r.default.TTML)>=0})(q),Ue.kind=(function(Ge,Ve){let je=Ge.roles&&Ge.roles.length>0?Ve[Ge.roles[0].value]:Ve.caption;return je=Object.values(Ve).includes(je)?je:Ve.caption,je})(q,oe),_.addTextTrackInfo(Ue)}function Ce(q){const oe=q.chunk;oe.representation.mediaInfo.embeddedCaptions&&ce(oe.bytes,oe)}function we(q){M=q}function ce(q,oe){const Ue=oe.representation.mediaInfo,Ge=Ue.type,Ve=Ue.mimeType,je=Ue.codec||Ve;je?Ue.codec.indexOf("application/mp4")!==-1?(function(lt,Rt,Dt){let an,vn;if(Rt.segmentType==="InitializationSegment")K=!0,z=F.getMediaTimescaleFromMoov(lt);else{if(!K)return;vn=F.getSamplesInfo(lt),an=vn.sampleList,Dt.search(r.default.STPP)>=0?(function(qn,Yn,Wn){let xn,kn;for(B=B!==null?B:me(Wn),xn=0;xn<Yn.length;xn++){const Un=Yn[xn],Je=Un.cts,Mt=re(),Nt=Mt+Je/z,kt=Nt+Un.duration/z;A.buffered.add(Nt,kt);const ln=new DataView(qn,Un.offset,Un.subSizes[0]);let yn=Vn.Utils.dataViewToString(ln,r.default.UTF8);const at=[];let Ut=Un.offset+Un.subSizes[0];for(kn=1;kn<Un.subSizes.length;kn++){const Xt=new Uint8Array(qn,Ut,Un.subSizes[kn]),Be=String.fromCharCode.apply(null,Xt);at.push(Be),Ut+=Un.subSizes[kn]}try{const Xt=t.getValue().ttmlTimeIsRelative?Je/z:0,Be=B.parse(yn,Xt,Je/z,(Je+Un.duration)/z,at);_.addCaptions(M,Mt,Be)}catch(Xt){W.removeExecutedRequestsBeforeTime(),ye(),U.error("TTML parser error: "+Xt)}}})(lt,an,Dt):(function(qn,Yn){let Wn,xn,kn;const Un=[];for(Wn=0;Wn<Yn.length;Wn++){const Je=Yn[Wn],Mt=re()+Je.cts/z,Nt=Mt+Je.duration/z;A.buffered.add(Mt,Nt);const kt=qn.slice(Je.offset,Je.offset+Je.size),ln=Vn.parseBuffer(kt);for(xn=0;xn<ln.boxes.length;xn++){const yn=ln.boxes[xn];if(U.debug("VTT box1: "+yn.type),yn.type!=="vtte"&&yn.type==="vttc"){U.debug("VTT vttc boxes.length = "+yn.boxes.length);let at={styles:{}};for(kn=0;kn<yn.boxes.length;kn++){const Ut=yn.boxes[kn];if(U.debug("VTT box2: "+Ut.type),Ut.type==="payl")at.start=Je.cts/z,at.end=(Je.cts+Je.duration)/z,at.data=Ut.cue_text;else if(Ut.type==="sttg"&&Ut.settings&&Ut.settings!=="")try{const Xt=Ut.settings.split(" ");at.styles=v.getCaptionStyles(Xt)}catch{}}at&&at.data&&(Un.push(at),U.debug(`VTT ${at.start} - ${at.end} : ${at.data}`))}}}Un.length>0&&_.addCaptions(M,0,Un)})(lt,an)}})(q,oe,je):Ge===r.default.VIDEO?(function(lt,Rt){let Dt,an;if(Rt.segmentType===ke.HTTPRequest.INIT_SEGMENT_TYPE)S===0&&(S=F.getMediaTimescaleFromMoov(lt));else if(Rt.segmentType===ke.HTTPRequest.MEDIA_SEGMENT_TYPE){if(S===0)return void U.warn("CEA-608: No timescale for embeddedTextTrack yet");an=F.getSamplesInfo(lt);const vn=an.lastSequenceNumber,qn=Math.trunc(Rt.start),Yn=Math.trunc(Rt.end);if(O[0]||O[1]||(function(){let Wn;for(let xn=0;xn<R.length;xn++){if(Wn=_.getTrackIdxForId(R[xn].id),Wn===-1)return void U.warn("CEA-608: data before track is ready.");const kn=le(Wn);O[xn]=new os(xn+1,{newCue:kn},null)}})(),S){if((function(xn,kn,Un,Je,Mt){return xn!==null&&kn!==null&&Je!==null&&Mt!==null&&(kn===xn?Je!==Mt:kn!==xn+Un)})(b,vn,an.numSequences,J,qn))for(Dt=0;Dt<O.length;Dt++)O[Dt]&&O[Dt].reset();const Wn=(function(xn,kn){if(kn.length===0)return null;const Un={splits:[],fields:[[],[]]},Je=new DataView(xn);for(let Mt=0;Mt<kn.length;Mt++){const Nt=kn[Mt],kt=Tl(Je,Nt.offset,Nt.size);let ln=null,yn=0;for(let at=0;at<2;at++)if(kt[at].length>0){Nt.cts!==ln?yn=0:yn+=1;const Ut=re();
21Un.fields[at].push([Nt.cts+Ut*S,kt[at],yn]),ln=Nt.cts}}return Un.fields.forEach((function(Mt){Mt.sort((function(Nt,kt){return Nt[0]===kt[0]?Nt[2]-kt[2]:Nt[0]-kt[0]}))})),Un})(lt,an.sampleList);for(let xn=0;xn<O.length;xn++){const kn=Wn.fields[xn],Un=O[xn];if(Un)for(Dt=0;Dt<kn.length;Dt++)Un.addData(kn[Dt][0]/S,kn[Dt][1])}b=vn,J=Yn}}})(q,oe):(function(lt,Rt,Dt){let an,vn;const qn=new DataView(lt,0,lt.byteLength);vn=Vn.Utils.dataViewToString(qn,r.default.UTF8);try{an=me(Dt).parse(vn,0),_.addCaptions(_.getCurrentTrackIdx(),0,an),A.buffered&&A.buffered.add(Rt.start,Rt.end)}catch(Yn){e.error(new on.default(wn.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,wn.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+Yn.message,vn))}})(q,oe,je):U.error("No text type defined")}function le(q){return function(oe,Ue,Ge){let Ve;Ve=c.getTTMLRenderingDiv()?ee.createHTMLCaptionsFromScreen(c.getElement(),oe,Ue,Ge):[{start:oe,end:Ue,data:Ge.getDisplayText(),styles:{}}],Ve&&_.addCaptions(q,0,Ve)}}function re(){return isNaN(A.timestampOffset)?0:A.timestampOffset}function me(q){let oe;return q.search(r.default.VTT)>=0?oe=N.get().streaming.text.webvtt.customRenderingEnabled&&I?I:v:(q.search(r.default.TTML)>=0||q.search(r.default.STPP)>=0)&&(oe=g),oe}function ye(q,oe){q===void 0&&q===oe&&(q=A.buffered.start(0),oe=A.buffered.end(A.buffered.length-1)),A.buffered.remove(q,oe),_.deleteCuesFromTrackIdx(M,q,oe)}function te(q){R.forEach((function(oe){const Ue=_.getTrackIdxForId(oe.id);Ue>=0&&_.deleteCuesFromTrackIdx(Ue,q.from,q.to)}))}return A={abort:function(){},addEmbeddedTrack:function(q){if($&&q)if(q.id===r.default.CC1||q.id===r.default.CC3){for(let oe=0;oe<R.length;oe++)if(R[oe].id===q.id)return;R.push(q)}else U.warn("Embedded track "+q.id+" not supported!")},addMediaInfos:function(q,oe,Ue){if(x=x.concat(oe),q===r.default.TEXT&&oe[0].isFragmented&&!oe[0].isEmbedded){W=Ue,A.buffered=(0,Xo.default)(E).create(),Z=u.getTracksFor(r.default.TEXT,D.id).filter((Ve=>Ve.isFragmented));const Ge=u.getCurrentTrackFor(r.default.TEXT,D.id);for(let Ve=0;Ve<Z.length;Ve++)if(Z[Ve]===Ge){we(Ve);break}}for(let Ge=0;Ge<oe.length;Ge++)be(oe[Ge])},append:ce,getConfig:function(){return{fragmentModel:W,fragmentedTracks:Z,videoModel:c}},getStreamId:function(){return D.id},initialize:function(){$||(R=[],M=null,S=0,O=[],b=null,J=null,$=!0,ee=Zo(E).getInstance(),f.on(m.default.VIDEO_CHUNK_RECEIVED,Ce,A),f.on(m.default.BUFFER_CLEARED,te,A))},remove:ye,reset:function(){ie(),x=[],F=null},resetEmbedded:function(){f.off(m.default.VIDEO_CHUNK_RECEIVED,Ce,A),f.off(m.default.BUFFER_CLEARED,te,A),_&&_.deleteAllTextTracks(),$=!1,R=[],O=[null,
21null],b=null,J=null},resetMediaInfos:function(){x=[]},setCurrentFragmentedTrackIdx:we},U=(0,p.default)(E).getInstance().getLogger(A),F=ar(E).getInstance(),ie(),A}ls.__dashjs_factory_name="TextSourceBuffer";var _l=L.default.getClassFactory(ls);class yl{constructor(){this.root=null,this.size=0}addCue(e){const t={start:e.startTime,end:e.endTime,cue:e,maxEnd:e.endTime,left:null,right:null,height:1},[u,c]=this._insert(t,this.root);this.root=u,c&&this.size++}removeCue(e){const[t,u]=this._remove(e,this.root);return this.root=t,u&&this.size--,u}findCuesInRange(e,t){const u=[];return this._searchRange(this.root,e,t,u),u}findCuesAtTime(e){return this.findCuesInRange(e,e)}getAllCues(){const e=[];return this._inorderTraversal(this.root,e),e}getSize(){return this.size}clear(){this.root=null,this.size=0}_compareCues(e,t){return e.startTime!==t.startTime?e.startTime-t.startTime:e.endTime!==t.endTime?e.endTime-t.endTime:typeof VTTCue<"u"&&e instanceof VTTCue&&t instanceof VTTCue||e.text&&t.text?e.text.localeCompare(t.text):0}_compareIntervals(e,t){return this._compareCues(e.cue,t.cue)}_insert(e,t){if(!t)return[e,!0];const u=this._compareIntervals(e,t);if(u<0){const[_]=this._insert(e,t.left);t.left=_}else{if(!(u>0))return[t,!1];{const[_]=this._insert(e,t.right);t.right=_}}t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),t.maxEnd=Math.max(t.maxEnd,e.maxEnd);const c=this._getBalance(t);return c>1?(this._compareIntervals(e,t.left)<0||(t.left=this._leftRotate(t.left)),[this._rightRotate(t),!0]):c<-1?(this._compareIntervals(e,t.right)>0||(t.right=this._rightRotate(t.right)),[this._leftRotate(t),!0]):[t,!0]}_searchRange(e,t,u,c){e&&(this._overlaps(e,t,u)&&c.push(e.cue),e.left&&e.left.maxEnd>=t&&this._searchRange(e.left,t,u,c),e.right&&e.start<=u&&this._searchRange(e.right,t,u,c))}_inorderTraversal(e,t){e&&(this._inorderTraversal(e.left,t),t.push(e.cue),this._inorderTraversal(e.right,t))}_overlaps(e,t,u){if(u===t){const c=t;return e.start<=c&&c<e.end}return e.start<u&&t<e.end}_getHeight(e){return e?e.height:0}_getBalance(e){return e?this._getHeight(e.left)-this._getHeight(e.right):0}_leftRotate(e){const t=e.right,u=t.left;return t.left=e,e.right=u,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}_rightRotate(e){const t=e.left,u=t.right;return t.right=e,e.left=u,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}_remove(e,t){if(!t)return[null,!1];const u=this._compareCues(e,t.cue);if(u<0){const[c,_]=this._remove(e,t.left);return t.left=c,_&&this._updateNode(t),[t,_]}if(u>0){const[c,_]=this._remove(e,t.right);return t.right=c,_&&this._updateNode(t),[t,_]}if(t.left||t.right){if(t.left){if(t.right){const c=this._findMin(t.right);t.cue=c.cue,t.start=c.start,t.end=c.end;const[_]=this._remove(c.cue,t.right);return t.right=_,this._updateNode(t),[t,!0]}return[t.left,!0]}return[t.right,!0]}return[null,!0]}_findMin(e){for(;e.left;)e=e.left;return e}_updateNode(e){e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0)}}var Fi=P(7640);const us=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function cs(n){const e=this.context,t=(0,h.default)(e).getInstance(),u=n.videoModel,c=n.streamInfo,_=n.settings;let v,I,g,D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R,S,b;const J=new Map;function O(Je){const Mt=Je.kind,Nt=Je.id!==void 0?Je.id:Je.lang,kt=Je.lang,ln=Je.isTTML,yn=Je.isEmbedded;return u.addTextTrack(Mt,Nt,kt,ln,yn)}function ee(Je,Mt,Nt,kt,ln,yn){let at=0,Ut=0;Je/Mt>Nt/kt?(Ut=Mt,at=Ut/kt*Nt):(at=Je,Ut=at/Nt*kt);let Xt=0,Be=0,Xe=0,bt=0;return at/Ut>ln?(bt=Ut,Xe=Ut*ln):(Xe=at,bt=at/ln),Xt=(Je-Xe)/2,Be=(Mt-bt)/2,yn?{x:Xt+.1*Xe,y:Be+.1*bt,w:.8*Xe,h:.8*bt}:{x:Xt,y:Be,w:Xe,h:bt}}function $(Je,Mt){const Nt=u.getClientWidth(),kt=u.getClientHeight(),ln=u.getVideoWidth(),yn=u.getVideoHeight(),at=u.getVideoRelativeOffsetTop(),Ut=u.getVideoRelativeOffsetLeft();if(ln!==0&&yn!==0){let Xt=ln/yn,Be=!1;Je.isFromCEA608&&(Xt=1.1666666666666667,Be=!0);const Xe=ee.call(this,Nt,kt,ln,yn,Xt,Be),bt=Xe.w,et=Xe.h,qt=Xe.x,$t=Xe.y;if(bt!=U||et!=F||qt!=f||$t!=A||Mt){if(f=qt+Ut,A=$t+at,U=bt,F=et,B){const Mn=B.style;
21Mn&&(Mn.left=f+"px",Mn.top=A+"px",Mn.width=U+"px",Mn.height=F+"px",Mn.zIndex=K&&document[K]||z?M:null,t.trigger(H.default.CAPTION_CONTAINER_RESIZE))}const rn=Je.activeCues;if(rn){const Mn=rn.length;for(let _e=0;_e<Mn;++_e){const nt=rn[_e];nt.scaleCue(nt)}}}}}function ie(Je){const Mt=U,Nt=F;let kt,ln,yn,at,Ut;if(Je.cellResolution){const Xt=[Mt/Je.cellResolution[0],Nt/Je.cellResolution[1]];if(Je.linePadding){for(kt in Je.linePadding)if(Je.linePadding.hasOwnProperty(kt)){ln=(Je.linePadding[kt]*Xt[0]).toString();const Be=document.getElementsByClassName("spanPadding");for(let Xe=0;Xe<Be.length;Xe++)Be[Xe].style.cssText=Be[Xe].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ln),Be[Xe].style.cssText=Be[Xe].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ln)}}if(Je.fontSize){for(kt in Je.fontSize)if(Je.fontSize.hasOwnProperty(kt)){Je.fontSize[kt][0]==="%"?yn=Je.fontSize[kt][1]/100:Je.fontSize[kt][0]==="c"&&(yn=Je.fontSize[kt][1]),ln=(yn*Xt[1]).toString(),Ut=kt!=="defaultFontSize"?document.getElementsByClassName(kt):document.getElementsByClassName("paragraph");for(let Be=0;Be<Ut.length;Be++)Ut[Be].style.cssText=Ut[Be].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ln)}if(Je.lineHeight){for(kt in Je.lineHeight)if(Je.lineHeight.hasOwnProperty(kt)){Je.lineHeight[kt][0]==="%"?at=Je.lineHeight[kt][1]/100:Je.fontSize[kt][0]==="c"&&(at=Je.lineHeight[kt][1]),ln=(at*Xt[1]).toString(),Ut=document.getElementsByClassName(kt);for(let Be=0;Be<Ut.length;Be++)Ut[Be].style.cssText=Ut[Be].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ln)}}}}if(Je.isd){let Xt=document.getElementById(Je.cueID);Xt&&B.removeChild(Xt),Ce(Je)}}function be(Je,Mt){const Nt=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,kt=/^#(.*)$/;if(Nt.test(Mt)){const ln=Nt.exec(Mt),yn=parseInt(ln[4],10)-1;return"data:image/png;base64,"+btoa(Je.images[yn])}if(kt.test(Mt)){const ln=kt.exec(Mt)[1];return"data:image/png;base64,"+Je.embeddedImages[ln]}return Mt}function Ce(Je){if(B){kn.call(this);const Mt=document.createElement("div");B.appendChild(Mt),Z=(0,Fi.renderHTML)(Je.isd,Mt,(function(Nt){return be(Je,Nt)}),B.clientHeight,B.clientWidth,_.get().streaming.text.imsc.displayForcedOnlyMode,(function(Nt){I.info("renderCaption :",Nt)}),Z,_.get().streaming.text.imsc.enableRollUp),Mt.id=Je.cueID,t.trigger(H.default.CAPTION_RENDERED,{captionDiv:Mt,currentTrackIdx:E})}}function we(Je,Mt){const Nt=Mt.findCuesInRange(Je.startTime-.1,Je.endTime+.1);for(const kt of Nt)if(ce(Je,kt)&&le(Je,kt,us)||ce(kt,Je)&&le(Je,kt,us))return kt;return null}function ce(Je,Mt){return!!Mt&&Mt.endTime>=Je.startTime}function le(Je,Mt,Nt){for(let kt=0;kt<Nt.length;kt++){const ln=Nt[kt];if(JSON.stringify(Je[ln])!==JSON.stringify(Mt[ln]))return!1}return!0}function re(Je,Mt){Mt&&Mt.forEach((Nt=>{Nt.kind&&Nt.kind==="image"&&(Nt.src=be(Je,Nt.src)),re(Je,Nt.contents)}))}function me(Je,Mt,Nt){const kt=Rt(Je),ln=J.get(kt),yn=_.get().streaming.text.dispatchForManualRendering;if(kt&&ln&&Array.isArray(Nt)&&Nt.length!==0){for(let Xt=0;Xt<Nt.length;Xt++){let Be=null;const Xe=Nt[Xt];if(kt.cellResolution=Xe.cellResolution,kt.isFromCEA608=Xe.isFromCEA608,isNaN(Xe.start)||isNaN(Xe.end)||(yn?Be=ye(Xe,Mt):Ge(Xe)&&B?Be=oe(Xe,Mt,kt):Xe.data&&(Be=Ue(Xe,Mt,kt))),Be){if(_.get().streaming.text.extendSegmentedCues){const bt=we(Be,ln.allCues);bt&&(ln.allCues.removeCue(bt),Ut=Be,(at=bt).startTime=Math.min(at.startTime,Ut.startTime),at.endTime=Math.max(at.endTime,Ut.endTime),Be=at)}ln.allCues.addCue(Be)}else I.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}var at,Ut;Yn()}}function ye(Je,Mt){let Nt=Ve(Je,Mt);return Nt.onenter=function(){Ge(Je)&&b&&b.cueID!==Nt.cueID&&q(b),delete Nt.type,b=Nt,te(Nt)},Nt.onexit=function(){q(Nt),b=null},Nt}function te(Je){t.trigger(H.default.CUE_ENTER,Je)}function q(Je){t.trigger(H.default.CUE_EXIT,{cueID:Je.cueID})}function oe(Je,Mt,Nt){const kt=this;let ln=Ve(Je,Mt);return B.style.left=f+"px",B.style.top=A+"px",B.style.width=U+"px",B.style.height=F+"px",ln.onenter=function(){Nt.mode===r.default.TEXT_SHOWING&&(this.isd?(S?requestAnimationFrame((()=>Ce(this))):Ce(this),I.debug("Cue enter id:"+this.cueID)):(B.appendChild(this.cueHTMLElement),ie.call(kt,this),t.trigger(H.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:E})))},ln.onexit=function(){if(B){const yn=B.childNodes;for(let at=0;at<yn.length;++at)yn[at].id===this.cueID&&(I.debug("Cue exit id:"+yn[at].id),B.removeChild(yn[at]),--at)}},ln}function Ue(Je,Mt,Nt){let kt=Ve(Je,Mt);if(Je.styles)try{Je.styles.align!==void 0&&"align"in kt&&(kt.align=Je.styles.align),Je.styles.line!==void 0&&"line"in kt&&(kt.line=Je.styles.line),Je.styles.lineAlign!==void 0&&(kt.lineAlign=Je.styles.lineAlign),Je.styles.snapToLines!==void 0&&"snapToLines"in kt&&(kt.snapToLines=Je.styles.snapToLines),Je.styles.position!==void 0&&"position"in kt&&(kt.position=Je.styles.position),Je.styles.positionAlign!==void 0&&(kt.positionAlign=Je.styles.positionAlign),Je.styles.size!==void 0&&"size"in kt&&(kt.size=Je.styles.size)}catch(ln){I.error(ln)}return kt.onenter=function(){Nt.mode===r.default.TEXT_SHOWING&&t.trigger(H.default.CAPTION_RENDERED,{currentTrackIdx:E})},kt}function Ge(Je){return Je.type==="html"}function Ve(Je,Mt){return Ge(Je)?(function(Nt,kt){let ln=new g(Nt.start+kt,Nt.end+kt,"");return ln.cueHTMLElement=Nt.cueHTMLElement,ln.isd=Nt.isd,ln.images=Nt.images,ln.embeddedImages=Nt.embeddedImages,ln.cueID=Nt.cueID,ln.scaleCue=ie.bind(self),ln.cellResolution=Nt.cellResolution,ln.lineHeight=Nt.lineHeight,ln.linePadding=Nt.linePadding,ln.fontSize=Nt.fontSize,ln.isd&&re(ln,ln.isd.c
21ontents),ln})(Je,Mt):(function(Nt,kt){let ln=new g(Nt.start-kt,Nt.end-kt,Nt.data);return ln.cueID=tn.default.generateUuid(),ln})(Je,Mt)}function je(Je){if(x){const Mt=x.childNodes;for(let Nt=0;Nt<Mt.length;++Nt)Mt[Nt].id===Je.cueID&&(x.removeChild(Mt[Nt]),--Nt)}}function lt(){const Je=u.getTextTracks(),Mt=[];for(const Nt of Je)Nt.manualMode===r.default.TEXT_SHOWING&&Mt.push(Nt);return Mt}function Rt(Je){return Je>=0&&D[Je]?u.getTextTrack(D[Je].kind,D[Je].id,D[Je].lang,D[Je].isTTML,D[Je].isEmbedded):null}function Dt(Je){if(Je===E)return;E=Je;const Mt=Rt(E);an.call(this,Mt),W&&(clearInterval(W),W=null),Mt&&Mt.renderingType==="html"&&($.call(this,Mt,!0),window.ResizeObserver?(R=new window.ResizeObserver((()=>{$.call(this,Mt,!0)})),R.observe(u.getElement())):W=setInterval($.bind(this,Mt),500))}function an(Je){kn.call(this),Je&&Je.renderingType==="html"?Wn.call(this):xn.call(this)}function vn(Je,Mt,Nt,kt=!0){return!!Je&&(isNaN(Mt)||(kt?Je.startTime:Je.endTime)>=Mt)&&(isNaN(Nt)||(kt?Je.endTime:Je.startTime)<=Nt)}function qn(Je,Mt,Nt,kt=!0){if(!Je)return;if(Je.cues&&Je.cues.length>0)for(let yn=Je.cues.length-1;yn>=0;yn--)vn(Je.cues[yn],Mt,Nt,kt)&&(Je.cues[yn].onexit&&Je.cues[yn].onexit(),Je.removeCue(Je.cues[yn]));const ln=J.get(Je);if(ln){const yn=ln.activeCues,at=yn.filter((Ut=>Ut.startTime>=Mt&&Ut.endTime<=Nt));at.forEach((Ut=>{_.get().streaming.text.dispatchForManualRendering?q(Ut):je(Ut)})),ln.activeCues=yn.filter((Ut=>!at.includes(Ut)))}}function Yn(){for(const Je of J.values())Je.lastCueWindowUpdate=-1/0}function Wn(){let Je=document.getElementById("native-cue-style");if(Je)return;Je=document.createElement("style"),Je.id="native-cue-style",document.head.appendChild(Je);const Mt=Je.sheet,Nt=u.getElement();try{Nt&&(Nt.id?Mt.insertRule("#"+Nt.id+"::cue {background: transparent}",0):Nt.classList.length!==0?Mt.insertRule("."+Nt.className+"::cue {background: transparent}",0):Mt.insertRule("video::cue {background: transparent}",0))}catch(kt){I.info(""+kt.message)}}function xn(){const Je=document.getElementById("native-cue-style");Je&&document.head.removeChild(Je)}function kn(){if(B)for(;B.firstChild;)B.removeChild(B.firstChild)}function Un(){return D}return v={addCaptions:me,addTextTrackInfo:function(Je){D.push(Je)},createTracks:function(){D.sort((function(Mt,Nt){return Mt.index-Nt.index})),B=u.getTTMLRenderingDiv(),x=u.getVttRenderingDiv();let Je=-1;for(let Mt=0;Mt<D.length;Mt++){const Nt=O(D[Mt]);N.push(Nt),D[Mt].defaultTrack&&(Nt.default=!0,Je=Mt);const kt=Rt(Mt);kt&&(kt.mode=r.default.TEXT_SHOWING,B&&(D[Mt].isTTML||D[Mt].isEmbedded)?kt.renderingType="html":kt.renderingType="default",J.set(kt,{allCues:new yl,lastCueWindowUpdate:-1/0,activeCues:[]})),me(Mt,0,D[Mt].captionData),t.trigger(H.default.TEXT_TRACK_ADDED)}if(Dt.call(this,Je),Je>=0){let Mt=function(){const Nt=Rt(Je);Nt&&Nt.renderingType==="html"&&$.call(this,Nt,!0),t.off(H.default.PLAYBACK_METADATA_LOADED,Mt,this)};t.on(H.default.PLAYBACK_METADATA_LOADED,Mt,this);for(let Nt=0;Nt<D.length;Nt++){const kt=Rt(Nt);if(kt){const ln=_.get().streaming.text.dispatchForManualRendering;kt.mode=Nt!==Je||ln?r.default.TEXT_HIDDEN:r.default.TEXT_SHOWING,kt.manualMode=Nt===Je?r.default.TEXT_SHOWING:r.default.TEXT_HIDDEN}}}t.trigger(m.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:E,tracks:D,streamId:c.id})},deleteAllTextTracks:function(){const Je=N?N.length:0;for(let Mt=0;Mt<Je;Mt++){const Nt=Rt(Mt);Nt&&qn.call(this,Nt,c.start,c.start+c.duration,!1)}N=[],D=[],W&&(clearInterval(W),W=null),R&&u&&(R.unobserve(u.getElement()),R=null),E=-1,kn.call(this),J.clear()},deleteCuesFromTrackIdx:function(Je,Mt,Nt){const kt=Rt(Je);kt&&qn(kt,Mt,Nt)},disableManualTracks:function(){const Je=lt();if(Je&&Je.length>0){const Mt=Je[0],Nt=J.get(Mt);if(!Nt)return;Nt.activeCues.forEach((kt=>{_.get().streaming.text.dispatchForManualRendering?q(kt):je(kt)})),Nt.activeCues=[]}},getCurrentTrackIdx:function(){return E},getCurrentTextTrackInfo:function(){return D[E]},getStreamId:function(){return c.id},getTextTrackInfos:Un,getTrackIdxForId:function(Je){let Mt=-1;for(let Nt=0;Nt<D.length;Nt++)if(D[Nt].id===Je){Mt=Nt;break}return Mt},initialize:function(){typeof window<"u"&&typeof navigator<"u"&&(g=window.VTTCue||window.TextTrackCue,D=[],N=[],E=-1,f=0,A=0,U=0,F=0,B=null,x=null,W=null,z=!1,M=2147483647,Z=null,S="requestAnimationFrame"in window,J.clear(),document.fullscreenElement!==void 0?K="fullscreenElement":document.webkitIsFullScreen!==void 0?K="webkitIsFullScreen":document.msFullscreenElement?K="msFullscreenElement":document.mozFullScreen&&(K="mozFullScreen"))},manualCueProcessing:function(Je){const Mt=lt();if(Mt&&Mt.length>0){const Nt=Mt[0],kt=J.get(Nt);if(!kt)return;const ln=kt.activeCues,yn=kt.allCues.findCuesAtTime(Je),at=ln.filter((Xt=>!yn.includes(Xt))),Ut=yn.filter((Xt=>!ln.includes(Xt)));at.forEach((Xt=>{_.get().streaming.text.dispatchForManualRendering?q(Xt):je(Xt)})),Ut.forEach((Xt=>{_.get().streaming.text.dispatchForManualRendering?te(Xt):WebVTT.processCues(window,[Xt],x,Xt.cueID)})),kt.activeCues=yn}},setCurrentTrackIdx:Dt,setModeForTrackIdx:function(Je,Mt){const Nt=Rt(Je);Nt&&Nt.mode!==Mt&&(Nt.mode=Mt),Nt&&Nt.manualMode!==Mt&&(Nt.manualMode=Mt)},updateTextTrackWindow:function(Je,Mt=!1){const Nt=Un(),kt=_.get().streaming.text.webvtt.customRenderingEnabled;for(let ln=0;ln<Nt.length;ln++){const yn=Nt[ln],at=Rt(ln),Ut=J.get(at);if(!at||!Ut||!yn.isEmbedded&&kt)continue;const{bufferToKeep:Xt,bufferPruningInterval:Be}=_.get().streaming.buffer,Xe=Date.now();if((Xe-Ut.lastCueWindowUpdate)/1e3<Be&&!Mt)continue;const bt=u.getPlaybackRate()||1,et=Math.max(0,Je-Xt/bt),qt=Je+2*Be/bt;if(at.cues)for(;at.cues.length>0;)at.removeCue(at.cues[0]);at.mode!==r.default.TEXT_DISABLED&&Ut.allCues.findCuesInRange(et,qt).forEach(($t=>{at.addCue($t)})),Ut.lastCueWindowUpdate=Xe}},invalidateCueWindow:Yn},I=(0,p.default)(e).getInstance().getLogger(v),v}cs.__dashjs_factory_name="TextTracks";var Sl=L.default.getClassFactory(cs);function fs(){const n=this.context;let e,t,u,c,_,v;function I(E){const f=E.split(":"),A=f.length-1;return E=60*parseInt(f[A-1],10)+parseFloat(f[A]),A===2&&(E+=3600*parseInt(f[0],10)),E}function g(E){const f=E.split(c),A=f[1].split(v);
21return A.shift(),f[1]=A[0],A.shift(),{cuePoints:f,styles:D(A)}}function D(E){const f={};return E.forEach((function(A){const U=A.split(":");if(U.length>1){const[F,B]=U;switch(F){case"align":case"A":f.align=B;break;case"line":case"L":const[x,W]=B.split(","),K=x.endsWith("%");f.line=x==="auto"?x:parseInt(x,10),K&&(f.snapToLines=!1),W&&(f.lineAlign=W);break;case"position":case"P":const[z,Z]=B.split(",");f.position=parseInt(z,10),Z&&(f.positionAlign=Z);break;case"size":case"S":f.size=parseInt(B,10)}}})),f}function N(E,f){let A,U=f,F="",B="";for(;E[U]!==""&&U<E.length;)U++;if(A=U-f,A>1)for(let x=0;x<A;x++){if(B=E[f+x],B.match(c)){F="";break}F+=B,x!==A-1&&(F+=` 22`)}else B=E[f],B.match(c)||(F=B);return F}return e={parse:function(E){const f=[];let A,U;if(!E)return f;A=(E=E.split(u)).length,U=-1;for(let F=0;F<A;F++){let B=E[F];if(B.length>0&&B!=="WEBVTT"&&B.match(c)){const x=g(B),W=x.cuePoints,K=x.styles,z=N(E,F+1),Z=I(W[0].replace(_,"")),M=I(W[1].replace(_,""));!isNaN(Z)&&!isNaN(M)&&Z>=U&&M>Z?z!==""?(U=Z,f.push({start:Z,end:M,data:z,styles:K})):t.error("Skipping cue due to empty/malformed cue text"):t.error("Skipping cue due to incorrect cue timing")}}return f},getCaptionStyles:D},t=(0,p.default)(n).getInstance().getLogger(e),u=/(?:\r\n|\r|\n)/gm,c=/-->/,_=/(^[\s]+|[\s]+$)/g,v=/\s\b/g,e}fs.__dashjs_factory_name="VTTParser";var Il=L.default.getSingletonFactory(fs);function ds(){let n,e;return n={parse:function(t){let u=[];return e.oncue=function(c){c.start=c.startTime,c.end=c.endTime,c.data=c.text,c.styles={align:c.align,line:c.line,position:c.position,size:c.size},u.push(c)},e.parse(t),u}},(function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}})(),n}ds.__dashjs_factory_name="VttCustomRenderingParser";var Rl=L.default.getSingletonFactory(ds);function gs(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c=0;function _(){const v="cue_TTML_"+c;return c++,v}return t={parse:function(v,I,g,D,N){let E="";const f=[];let A,U,F;const B={},x={};let W="",K="",z={onOpenTag:function(R,S,b){if(b[" imagetype"]&&!b[" imageType"]&&(e.trigger(H.default.CONFORMANCE_VIOLATION,{level:ii.LEVELS.ERROR,event:ii.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),b[" imageType"]=b[" imagetype"]),S==="image"&&(R==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||R==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!b[" imageType"]||b[" imageType"].value!=="PNG")return void u.warn("smpte-tt imageType != PNG. Discarded");W=b["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){W&&(x[W]=K.trim()),K="",W=""},onText:function(R){W&&(K+=R)}};if(!v)throw E="no ttml data to parse",new Error(E);B.data=v,e.trigger(m.default.TTML_TO_PARSE,B);let Z=(0,Fi.fromXML)(B.data,(function(R){E=R}),z);e.trigger(m.default.TTML_PARSED,{ttmlString:B.data,ttmlDoc:Z});const M=Z.getMediaTimeEvents();for(F=0;F<M.length;F++){let R=(0,Fi.generateISD)(Z,M[F],(function(S){E=S}));R.contents.some((S=>S.contents.length))&&(A=M[F]+I,U=F+1<M.length?M[F+1]+I:D,A<U&&f.push({start:A,end:U,type:"html",cueID:_(),isd:R,images:N,embeddedImages:x}))}if(E!=="")throw u.error(E),new Error(E);return f}},u=(0,p.default)(n).getInstance().getLogger(t),t}gs.__dashjs_factory_name="TTMLParser";var Al=L.default.getSingletonFactory(gs);function hs(n){let e=this.context;const t=(0,h.default)(e).getInstance(),u=(0,Ht.default)(e).getInstance(),c=n.adapter,_=n.baseURLController,v="error",I="loaded",g="unloaded";let D,N,E;function f(F,B){let x,W,K=!1;if(_.resolve()){const M=c.getVoRepresentations(F);M&&M.length>0&&(x=_.resolve(M[0].path).url)}const z=F.essentialProperties.filter((M=>M.schemeIdUri&&M.schemeIdUri===r.default.FONT_DOWNLOAD_DVB_SCHEME)),Z=F.supplementalProperties.filter((M=>M.schemeIdUri&&M.schemeIdUri===r.default.FONT_DOWNLOAD_DVB_SCHEME));z.length>0?(K=!0,W=z):W=Z,W.forEach((M=>{if((function(b){return!(!(b.value&&parseInt(b.value)===1&&b.dvbUrl&&b.dvbUrl.length>0&&b.dvbFontFamily&&b.dvbFontFamily.length>0&&b.dvbMimeType)||b.dvbMimeType!==r.default.OFF_MIMETYPE&&b.dvbMimeType!==r.default.WOFF_MIMETYPE)})(M)){let b=(R=M.dvbUrl,S=x,u.isPathAbsolute(R)?R:u.isRelative(R)?S?u.resolve(R,S):u.resolve(R):R);E.push({fontFamily:M.dvbFontFamily,url:b,mimeType:M.dvbMimeType,trackId:F.id,streamId:B,isEssential:K,status:g,fontFace:new FontFace(M.dvbFontFamily,`url(${b})`,{display:"swap"})})}var R,S}))}function A(F,B){const x=E[F];E[F]={...x,status:B}}function U(){E=[]}return D={addFontsFromTracks:function(F,B){if(F&&Array.isArray(F)&&B)for(let x=0;x<F.length;x++)f(F[x],B)},downloadFonts:function(){for(let F=0;F<E.length;F++){let B=E[F];document.fonts.add(B.fontFace),t.trigger(H.default.DVB_FONT_DOWNLOAD_ADDED,B),B.fontFace.load().then((()=>{A(F,I),t.trigger(H.default.DVB_FONT_DOWNLOAD_COMPLETE,B)}),(x=>{A(F,v),N.debug("Font download error: ",x),t.trigger(H.default.DVB_FONT_DOWNLOAD_FAILED,B)}))}},getFonts:function(){return E},getFontsForTrackId:function(F){return E.filter((B=>B.trackId&&B.trackId===F))},reset:function(){(function(){for(const F of E){let B=document.fonts.delete(F.fontFace);N.debug(`Removal of fontFamily: ${F.fontFamily} was ${B?"successful":"unsuccessful"}`)}})(),U()}},N=(0,p.default)(e).getInstance().getLogger(D),U(),D}hs.__dashjs_factory_name="DVBFonts";var Nl=L.default.getClassFactory(hs);function ps(n){let e=this.context;const t=n.adapter,u=n.errHandler,c=n.manifestModel,_=n.mediaController,v=n.baseURLController,I=n.videoModel,g=n.settings;let D,N,E,f,A,U,F,B,x,W,K,z,Z,M;function R(re){if(M.error(`Could not download ${re.isEssential?"an essential":"a"} font - fontFamily: ${re.fontFamily}, url: ${re.url}`),re.isEssential){let me=f[re.streamId].getTrackIdxForId(re.trackId);f[re.streamId].setModeForTrackIdx(me,r.default.TEXT_DISABLED)}}function S(re){if(M.debug(`Successfully downloaded ${re.isEssential?"an essential":"a"} font - fontFamily: ${re.fontFamily}, url: ${re.url}`),re.isEssential){let me=f[re.streamId].getTrackIdxForId(re.trackId);me===f[re.streamId].getCurrentTrackIdx()?f[re.streamId].setModeForTrackIdx(me,r.default.TEXT_SHOWING):f[re.streamId].setModeForTrackIdx(me,r.default.TEXT_HIDDEN)}}function b(re){let me=re.tracks,ye=re.index;const te=re.streamId;if(g.get().streaming.text.defaultEnabled===!1&&!ie()||z)be(te,-1);else{const q=_.getCurrentTrackFor(r.default.TEXT,te);if(q){const oe={lang:q.lang,role:q.roles[0],index:q.index,codec:q.codec,accessibility:q.accessibility[0]};me.some(((Ue,Ge)=>
22{if(_.matchSettings(oe,Ue))return be(te,Ge),ye=Ge,!0}))}x=!1}N[te].lastEnabledIndex=ye,B.trigger(H.default.TEXT_TRACKS_ADDED,{enabled:ie(),index:ye,tracks:me,streamId:te}),K=!0,Z.addFontsFromTracks(me,te),Z.getFonts().forEach((q=>{if(q.isEssential){let oe=f[q.streamId].getTrackIdxForId(q.trackId);f[q.streamId].setModeForTrackIdx(oe,r.default.TEXT_DISABLED)}})),Z.downloadFonts()}function J(re){try{const me=re.streamId,ye=f[me];if(!ye||isNaN(re.time))return;ye.updateTextTrackWindow(re.time),g.get().streaming.text.webvtt.customRenderingEnabled&&ye.manualCueProcessing(re.time)}catch{}}function O(re){try{const me=re.streamId;if(!f[me])return;f[me].disableManualTracks()}catch{}}function ee(re){try{const me=f[re.streamId];if(!me)return;const ye=I.getTime()||0;me.updateTextTrackWindow(ye,!0)}catch(me){M.error(me)}}function $(re){try{if(!re||!re.mediaType||re.mediaType!==r.default.AUDIO||!re.currentMediaInfo)return;const me=f[re.streamId].getCurrentTextTrackInfo();let ye=NaN;x?ye=Ce(re.streamId):we(me)&&re.currentMediaInfo.lang&&re.currentMediaInfo.lang!==me.lang&&(ye=Ce(re.streamId),isNaN(ye)&&(ye=-1)),isNaN(ye)||be(re.streamId,ye)}catch(me){M.error(me)}}function ie(){let re=!0;return x&&!W&&(re=!1),re}function be(re,me){x=me===-1,x&&B.trigger(m.default.BUFFER_LEVEL_UPDATED,{mediaType:r.default.TEXT,bufferLevel:-1},{streamId:re,mediaType:r.default.TEXT}),x&&_&&_.saveTextSettingsDisabled();let ye=ce(re);if(ye===me||!f[re])return;f[re].disableManualTracks(),f[re].invalidateCueWindow();let te=f[re].getCurrentTextTrackInfo(),q=te?I.getTextTrack(te.kind,te.id,te.lang,te.isTTML,te.isEmbedded):null;q&&q.mode!==r.default.TEXT_DISABLED&&f[re].setModeForTrackIdx(ye,r.default.TEXT_HIDDEN),f[re].setCurrentTrackIdx(me),te=f[re].getCurrentTextTrackInfo();const oe=g.get().streaming.text.dispatchForManualRendering;if(te&&!oe&&te.mode!==r.default.TEXT_DISABLED&&f[re].setModeForTrackIdx(me,r.default.TEXT_SHOWING),te&&te.isFragmented&&!te.isEmbedded)(function(Ue,Ge,Ve){if(!E[Ue])return;let je=E[Ue].getConfig().fragmentedTracks;for(let lt=0;lt<je.length;lt++){let Rt=je[lt];if(Ge.lang===Rt.lang&&(Rt.id?Ge.id===Rt.id:Ge.index===Rt.index)){let Dt=_.getCurrentTrackFor(r.default.TEXT,Ue);(Rt.id?Dt.id!==Rt.id:Dt.index!==Rt.index)?(f[Ue].deleteCuesFromTrackIdx(Ve),E[Ue].setCurrentFragmentedTrackIdx(lt)):Ve===-1&&B.trigger(m.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:Ue,mediaType:r.default.TEXT})}}})(re,te,ye);else if(te&&!te.isFragmented)(function(Ue,Ge){B.trigger(m.default.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:Ge},{streamId:Ue,mediaType:r.default.TEXT})})(re,te);else if(!te&&x){const Ue=Ce(re);return void(isNaN(Ue)||be(re,Ue))}_.setTrack(te)}function Ce(re){const me=(function(q){return f[q].getTextTrackInfos().filter(((oe,Ue)=>(oe._indexToSelect=Ue,!!(oe&&oe.roles&&oe.roles.length>0)&&we(oe))))})(re);if(!me||me.length<=0)return NaN;const ye=_.getCurrentTrackFor(r.default.AUDIO,re);if(!ye)return NaN;const te=me.find((q=>ye.lang===q.lang));return te?te._indexToSelect:NaN}function we(re){return!(!re||!re.roles||re.roles.length===0)&&re.roles.some((me=>me.schemeIdUri===r.default.DASH_ROLE_SCHEME_ID&&me.value===de.default.FORCED_SUBTITLE))}function ce(re){return f[re].getCurrentTrackIdx()}function le(){E={},f={},N={},x=!0,K=!1,z=!1}return D={addEmbeddedTrack:function(re,me){const ye=re.id;E[ye]&&E[ye].addEmbeddedTrack(me)},addMediaInfosToBuffer:function(re,me,ye,te=null){const q=re.id;E[q]&&E[q].addMediaInfos(me,ye,te)},createTracks:function(re){const me=re.id;f[me]&&f[me].createTracks()},deactivateStream:function(re){if(!re)return;const me=re.id;E[me]&&E[me].resetMediaInfos(),f[me]&&f[me].deleteAllTextTracks()},enableForcedTextStreaming:function(re){return(0,Tn.checkParameterType)(re,"boolean"),W=re,!0},enableText:function(re,me){return(0,Tn.checkParameterType)(me,"boolean"),ie()!==me&&(me&&be(re,N[re].lastEnabledIndex),me||(N[re].lastEnabledIndex=ce(re),K?be(re,-1):z=!0)),!0},getAllTracksAreDisabled:function(){return x},getCurrentTrackIdx:ce,getTextSourceBuffer:function(re){const me=re.id;if(E&&E[me])return E[me]},initialize:function(){Z=Nl(e).create({adapter:t,baseURLController:v}),B.on(m.default.TEXT_TRACKS_QUEUE_INITIALIZED,b,D),B.on(m.default.DVB_FONT_DOWNLOAD_FAILED,R,D),B.on(m.default.DVB_FONT_DOWNLOAD_COMPLETE,S,D),B.on(m.default.MEDIAINFO_UPDATED,$,D),B.on(m.default.PLAYBACK_TIME_UPDATED,J,D),g.get().streaming.text.webvtt.customRenderingEnabled&&B.on(m.default.PLAYBACK_SEEKING,O,D),B.on(m.default.PLAYBACK_SEEKED,ee,D)},initializeForStream:function(re){const me=re.id,ye=Sl(e).create({videoModel:I,settings:g,streamInfo:re});ye.initialize(),f[me]=ye;const te=_l(e).create({errHandler:u,adapter:t,dvbFonts:Z,manifestModel:c,mediaController:_,videoModel:I,textTracks:ye,vttParser:A,vttCustomRenderingParser:U,ttmlParser:F,streamInfo:re,settings:g});te.initialize(),E[me]=te,N[me]={},N[me].lastEnabledIndex=-1}
22,isTextEnabled:ie,reset:function(){Object.keys(E).forEach((re=>{E[re].resetEmbedded(),E[re].reset()})),Z.reset(),le(),B.off(m.default.TEXT_TRACKS_QUEUE_INITIALIZED,b,D),B.off(m.default.DVB_FONT_DOWNLOAD_FAILED,R,D),B.off(m.default.DVB_FONT_DOWNLOAD_COMPLETE,S,D),B.off(m.default.MEDIAINFO_UPDATED,$,D),B.off(m.default.PLAYBACK_TIME_UPDATED,J,D),g.get().streaming.text.webvtt.customRenderingEnabled&&B.off(m.default.PLAYBACK_SEEKING,O,D),B.off(m.default.PLAYBACK_SEEKED,ee,D)},setTextTrack:be,clearDataForStream:function(re){E[re]&&(E[re].resetEmbedded(),E[re].reset(),delete E[re]),f[re]&&(f[re].deleteAllTextTracks(),delete f[re]),N[re]&&delete N[re]}},W=!1,K=!1,z=!1,A=Il(e).getInstance(),U=Rl(e).getInstance(),F=Al(e).getInstance(),B=(0,h.default)(e).getInstance(),M=(0,p.default)(e).getInstance().getLogger(D),le(),D}ps.__dashjs_factory_name="TextController";var bl=L.default.getClassFactory(ps);function ms(n){n=n||{};const e=this.context,t=(0,p.default)(e).getInstance(),u=n.settings,c=(0,h.default)(e).getInstance();let _,v,I,g,D,N;function E(){return navigator&&navigator.connection&&!isNaN(navigator.connection.downlink)&&navigator.connection.downlink>0?1e3*navigator.connection.downlink:NaN}function f(F,B,x,W){const K=Math.pow(.5,x/W.fast);F.fastEstimate=(1-K)*B+K*F.fastEstimate;const z=Math.pow(.5,x/W.slow);F.slowEstimate=(1-z)*B+z*F.slowEstimate,F.totalWeight+=x}function A(){_={},v={},I={},g={}}const U={addEntry:function(F,B){try{if(!(F&&B&&B.trace&&B.trace.length))return;(function(K){_[K]=_[K]||[],v[K]=v[K]||[],I[K]=I[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0},g[K]=g[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0}})(F);const x=B.tresponse.getTime()-B.trequest.getTime()||1;let W=(function(K,z){return K._fileLoaderType&&K._fileLoaderType===r.default.FILE_LOADER_TYPES.FETCH?(function(Z){const M=Z.trace.reduce(((b,J)=>b+J.b[0]),0),R=Z.trace.reduce(((b,J)=>b+J.d),0);let S=NaN;return u.get().streaming.abr.throughput.useNetworkInformationApi.fetch&&(S=E()),isNaN(S)&&(S=Math.round(8*M/R)),{downloadedBytes:M,value:S,downloadTimeInMs:R}})(K):(function(Z,M){let R=NaN,S=NaN,b=!1;if(u.get().streaming.abr.throughput.useResourceTimingApi&&Z._resourceTimingValues)R=Z._resourceTimingValues.transferSize,S=Z._resourceTimingValues.responseEnd-Z._resourceTimingValues.responseStart,b=!0;else{if(Z.trace.length<=1)return{throughput:NaN,downloadTimeInMs:NaN};R=Z.trace.reduce(((O,ee)=>O+ee.b[0]),0)-Z.trace[0].b[0],S=Math.max(Z.trace.reduce(((O,ee)=>O+ee.d),0)-Z.trace[0].d,1)}let J=NaN;if(!b&&u.get().streaming.abr.throughput.useNetworkInformationApi.xhr&&(J=E()),isNaN(J)){const O=u.get().streaming.abr.throughput.useDeadTimeLatency?S:S+M;J=Math.round(8*R/O)}return{downloadedBytes:R,value:J,downloadTimeInMs:S}})(K,z)})(B,x);if(W.latencyInMs=x,isNaN(W.value)||!isFinite(W.value))return;if(B.cmsd){const K=B.cmsd.dynamic&&B.cmsd.dynamic.etp?B.cmsd.dynamic.etp:null;if(K){const z=u.get().streaming.cmsd.abr.etpWeightRatio;z>0&&z<=1&&(W.value=W.value*(1-z)+K*z)}}if((function(K,z,Z){return u.get().streaming.abr.throughput.useResourceTimingApi&&Z._resourceTimingValues?Z._resourceTimingValues.transferSize===0&&Z._resourceTimingValues.decodedBodySize>0:!isNaN(z)&&(K===r.default.VIDEO?z<u.get().streaming.cacheLoadThresholds[r.default.VIDEO]:K===r.default.AUDIO?z<u.get().streaming.cacheLoadThresholds[r.default.AUDIO]:void 0)})(F,B._tfinish.getTime()-B.trequest.getTime(),B))return void N.debug(`${F} Assuming segment ${B.url} came from cache, ignoring it for throughput calculation`);N.debug(`Added throughput entry for ${F}: ${W.value} kbit/s`),W.serviceLocation=B._serviceLocation,_[F].push(W),v[F].push({value:x}),(function(K){_[K].length>u.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&_[K].shift(),v[K].length>u.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&v[K].shift()})(F),c.trigger(H.default.THROUGHPUT_MEASUREMENT_STORED,{throughputValues:W}),B.type!==ke.HTTPRequest.MPD_TYPE&&(f(I[F],W.value,u.get().streaming.abr.throughput.ewma.weightDownloadTimeMultiplicationFactor*W.downloadTimeInMs,D.bandwidthHalfLife),f(g[F],x,1,D.latencyHalfLife))}catch(x){N.error(x)}},getThroughputDict:function(F){return F?_[F]:_},getEwmaThroughputDict:function(F){return F?I[F]:I},getEwmaLatencyDict:function(F){return F?g[F]:g},getEwmaHalfLife:function(){return D},getLatencyDict:function(F){return F?v[F]:v},reset:A};return N=t.getLogger(U),D={bandwidthHalfLife:{fast:u.get().streaming.abr.throughput.ewma.throughputFastHalfLifeSeconds,slow:u.get().streaming.abr.throughput.ewma.throughputSlowHalfLifeSeconds},latencyHalfLife:{fast:u.get().streaming.abr.throughput.ewma.latencyFastHalfLifeCount,slow:u.get().streaming.abr.throughput.ewma.latencySlowHalfLifeCount}},A(),U}ms.__dashjs_factory_name="ThroughputModel";var Cl=L.default.getClassFactory(ms);function Es(){const n=this.context,e=(0,h.default)(n).getInstance();let t,u,c;function _(){performance.clearResourceTimings()}function v(K){K.metric!==o.HTTP_REQUEST||!K.value||K.value.type!==ke.HTTPRequest.MPD_TYPE&&(K.value.type!==ke.HTTPRequest.MEDIA_SEGMENT_TYPE||K.mediaType!==r.default.AUDIO&&K.mediaType!==r.default.VIDEO)||t.addEntry(K.mediaType,K.value)}function I(K,z,Z=null,M=NaN){let R,S=null,b=t.getEwmaHalfLife(),J=null,O=!0;switch(Z||(Z=c.get().streaming.abr.throughput.averageCalculationMode),K){case r.default.THROUGHPUT_TYPES.BANDWIDTH:S=Z===r.default.THROUGHPUT_CALCULATION_MODES.EWMA?t.getEwmaThroughputDict(z):t.getThroughputDict(z),J=b.bandwidthHalfLife,O=!0,M=isNaN(M)?u.getIsDynamic()?c.get().streaming.abr.throughput.sampleSettings.live:c.get().streaming.abr.throughput.sampleSettings.vod:M;break;case r.default.THROUGHPUT_TYPES.LATENCY:S=Z===r.default.THROUGHPUT_CALCULATION_MODES.EWMA?t.getEwmaLatencyDict(z):t.getLatencyDict(z),J=b.latencyHalfLife,O=!1,M=isNaN(M)?c.get().streaming.abr.throughput.sampleSettings.averageLatencySampleAmount:M}if(!S||S.length===0)return NaN;switch(Z){case r.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:return R=g(S,M,K),D(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:return R=g(S,M,K),N(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_ARITHMETIC_MEAN:return R=g(S,M,K),E(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:return R=g(S,M,K),f(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:return R=g(S,M,K),A(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_HARMONIC_MEAN:return R=g(S,M,K),U(S,R);case r.default.THROUGHPUT_CALCULATION_MODES.EWMA:return F(S,J,O);case r.default.THROUGHPUT_CALCULATION_MODES.ZLEMA:return R=g(S,M,K),B(S,R)}}function g(K,z,Z){if(K){if(z>=K.length)z=K.length;else if(Z===r.default.THROUGHPUT_TYPES.BANDWIDTH&&c.get().streaming.abr.throughput.sampleSettings.enableSampleSizeAdjustment)for(let M=1;M<z;++M){const R=K[K.length-M].value/K[K.length-M-1].value;if((R>=c.get().streaming.abr.throughput.sampleSettings.increaseScale||R<=c.get().streaming.abr.throughput.sampleSettings.decreaseScale)&&(z+=1)===K.length)break}}else z=0;return z}function D(K,z){let Z=K;return z!==0&&Z&&Z.length!==0?(Z=Z.slice(-z),Z.reduce(((M,R)=>M+R.value),0)/Z.length):NaN}function N(K,z){let Z=K;
22if(z===0||!Z||Z.length===0)return NaN;Z=Z.slice(-z);let M=0;return Z.reduce(((R,S)=>{let b=Math.sqrt(S.downloadedBytes);return M+=b,R+S.value*b}),0)/M}function E(K,z){let Z=K;if(z===0||!Z||Z.length===0)return NaN;Z=Z.slice(-z);let M=0;return Z.reduce(((R,S,b)=>{let J=b+1;return M+=J,R+S.value*J}),0)/M}function f(K,z){let Z=K;if(z===0||!Z||Z.length===0)return NaN;Z=Z.slice(-z);const M=Z.reduce(((R,S)=>R+1/S.value),0);return Z.length/M}function A(K,z){let Z=K;if(z===0||!Z||Z.length===0)return NaN;Z=Z.slice(-z);let M=0;const R=Z.reduce(((S,b)=>{let J=Math.sqrt(b.downloadedBytes);return M+=J,S+1/b.value*J}),0);return M/R}function U(K,z){let Z=K;if(z===0||!Z||Z.length===0)return NaN;Z=Z.slice(-z);let M=0;const R=Z.reduce(((S,b,J)=>{let O=J+1;return M+=O,S+1/b.value*O}),0);return M/R}function F(K,z,Z=!0){if(!K||K.totalWeight<=0)return NaN;const M=K.fastEstimate/(1-Math.pow(.5,K.totalWeight/z.fast)),R=K.slowEstimate/(1-Math.pow(.5,K.totalWeight/z.slow));return Z?Math.min(M,R):Math.max(M,R)}function B(K,z){if(z===0||!K||K.length===0)return NaN;let Z=K.slice(-z).map((b=>b.value)),M=2/(Z.length+1),R=Z[Z.length-1],S=Z[Z.length-1];for(let b=0;b<Z.length;b++)R=M*Z[b]+(1-M)*R,S=M*R+(1-M)*S;return S}function x(K,z=null,Z=NaN){const M=I(r.default.THROUGHPUT_TYPES.BANDWIDTH,K,z,Z);return Math.round(M)}const W={getArithmeticMean:D,getAverageLatency:function(K,z=null,Z=NaN){const M=I(r.default.THROUGHPUT_TYPES.LATENCY,K,z,Z);return Math.round(M)},getAverageThroughput:x,getByteSizeWeightedArithmeticMean:N,getByteSizeWeightedHarmonicMean:A,getDateWeightedArithmeticMean:E,getDateWeightedHarmonicMean:U,getEwma:F,getHarmonicMean:f,getRawThroughputData:function(K){return K?t.getThroughputDict(K):[]},getSafeAverageThroughput:function(K,z=null,Z=NaN){let M=x(K,z,Z);return isNaN(M)||(M*=c.get().streaming.abr.throughput.bandwidthSafetyFactor),M},getZlema:B,initialize:function(){t=Cl(n).create({settings:c}),e.on(H.default.METRIC_ADDED,v,W),window.performance?.addEventListener?.("resourcetimingbufferfull",_)},reset:function(){t.reset(),e.off(H.default.METRIC_ADDED,v,W),window.performance?.removeEventListener?.("resourcetimingbufferfull",_)},setConfig:function(K){K.settings&&(c=K.settings),K.playbackController&&(u=K.playbackController)}};return W}Es.__dashjs_factory_name="ThroughputController";var Dl=L.default.getSingletonFactory(Es);function Ts(){const n=this.context,e=(0,h.default)(n).getInstance(),t=(0,T.default)(n).getInstance();let u,c,_,v;function I(x){v=x}function g(x,W,K,z){let Z,M=W.adaptation.period.mpd;const R=M.availabilityStartTime;if(z)Z=K&&M.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(R.getTime()+1e3*(x+M.timeShiftBufferDepth)):M.availabilityEndTime;else if(K){const S=W.availabilityTimeOffset;Z=new Date(R.getTime()+1e3*(x-S))}else Z=R;return Z}function D(x,W){return(x.getTime()-W.mpd.availabilityStartTime.getTime()+1e3*v)/1e3}function N(x,W){return x+(W.adaptation.period.start-W.presentationTimeOffset)}function E(x){const W={start:NaN,end:NaN},K=x[0].getAdapter().getRegularPeriods()[0],z=D(new Date,K);if(!x||x.length===0)return{range:W,now:z};x.forEach((M=>{let R=M.getCurrentRepresentationForType(r.default.VIDEO);if(R||(R=M.getCurrentRepresentationForType(r.default.AUDIO)),!R){const b=M.getAdapter(),J=b.getMediaInfoForType(M.getStreamInfo(),r.default.VIDEO)||b.getMediaInfoForType(M.getStreamInfo(),r.default.AUDIO);R=b.getVoRepresentations(J)[0]}let S={start:NaN,end:NaN};if(R)if(R.segmentInfoType===de.default.SEGMENT_TIMELINE)S=(function(b){const J=b.adaptation.period.mpd.manifest.Period[b.adaptation.period.index].AdaptationSet[b.adaptation.index],O=c.getRepresentationFor(b.index,J),ee=O.SegmentTemplate||O.SegmentList,$=ee.SegmentTimeline,ie=ee.timescale,be=$.S,Ce={start:0,end:0},we=be[0].t,ce=!isNaN(we),le=ce?we:0;let re,me,ye,te,q=0;for(ce&&(Ce.start=N(le/ie,b)),ye=0,te=be.length;ye<te;ye++)re=be[ye],me=0,re.hasOwnProperty("r")&&(me=re.r),q+=re.d*(1+me);return Ce.end=N((le+q)/ie,b),Ce})(R);else{const b=R.adaptation.period;S.start=b.start,S.end=Math.max(z,b.start+b.duration)}!isNaN(S.start)&&(isNaN(W.start)||W.start>S.start)&&(W.start=S.start),!isNaN(S.end)&&(isNaN(W.end)||W.end<S.end)&&(W.end=S.end)})),W.end=Math.min(z,W.end);const Z=A(x,W.end,!0);return W.end=isNaN(Z)?W.end:Z,W.start=K&&K.mpd&&K.mpd.timeShiftBufferDepth&&!isNaN(K.mpd.timeShiftBufferDepth)&&!isNaN(W.end)?Math.max(W.end-K.mpd.timeShiftBufferDepth,W.start):W.start,W.start=A(x,W.start),{range:W,now:z}}function f(x,W){_=x-W.end}function A(x,W,K=!1){try{let z=0,Z=!1,M=NaN;for(;!Z&&z<x.length;){const R=x[z].getStreamInfo();R.start<=W&&(!isFinite(R.duration)||R.start+R.duration>=W)?(M=W,Z=!0):!K&&R.start>W&&(isNaN(M)||R.start<M)?M=R.start:K&&R.start+R.duration<W&&(isNaN(M)||R.start+R.duration>M)&&(M=R.start+R.duration),z+=1}return M}catch{return W}}function U(x){x.offset===void 0||isNaN(x.offset)||I(x.offset/1e3)}function F(){v=0,_=0}function B(){e.off(m.default.UPDATE_TIME_SYNC_OFFSET,U,this),F()}return u={calcAvailabilityEndTimeFromPresentationTime:function(x,W,K){return g(x,W,K,!0)},calcAvailabilityStartTimeFromPresentationTime:function(x,W,K){return g(x,W,K)},calcMediaTimeFromPresentationTime:function(x,W){return x-W.adaptation.period.start+W.presentationTimeOffset},calcPeriodRelativeTimeFromMpdRelativeTime:function(x,W){return W-x.adaptation.period.start},calcPresentationTimeFromMediaTime:N,calcPresentationTimeFromWallTime:D,calcTimeShiftBufferWindow:function(x,W){if(!W)return(function(K){const z={start:NaN,end:NaN};let Z=0,M=NaN;
22return K.forEach((R=>{const S=R.getStreamInfo();Z+=S.duration,(isNaN(M)||S.start<M)&&(M=S.start)})),z.start=M,z.end=M+Z,z})(x);if(t.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){const K=E(x);return f(K.now,K.range),K.range}return(function(K){const z={start:NaN,end:NaN};if(!K||K.length===0)return z;const Z=K[0].getAdapter().getRegularPeriods()[0],M=D(new Date,Z),R=Z.mpd.timeShiftBufferDepth,S=isNaN(R)?0:M-R;if(z.start=A(K,S),z.end=!isNaN(z.start)&&M<z.start?M:A(K,M,!0),!isNaN(R)&&z.end<M-R&&(z.end=NaN),t.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){const b=E(K);if(b.range.end<z.start)return e.trigger(H.default.CONFORMANCE_VIOLATION,{level:ii.LEVELS.WARNING,event:ii.EVENTS.INVALID_DVR_WINDOW}),f(b.now,b.range),b.range}return z})(x)},calcWallTimeForSegment:function(x,W){let K,z,Z;return W&&(K=x.representation.adaptation.period.mpd.suggestedPresentationDelay,z=x.presentationStartTime+K,Z=new Date(x.availabilityStartTime.getTime()+1e3*z)),Z},getClientReferenceTime:function(){return Date.now()-1e3*_+1e3*v},getClientTimeOffset:function(){return v},initialize:function(){F(),e.on(m.default.UPDATE_TIME_SYNC_OFFSET,U,this)},reset:B,setClientTimeOffset:I,setConfig:function(x){x&&x.dashManifestModel&&(c=x.dashManifestModel)}},c=(0,Gn.default)(n).getInstance(),B(),u}Ts.__dashjs_factory_name="TimelineConverter";var vl=L.default.getSingletonFactory(Ts),Ml=class{constructor(){this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}};function _s(){let n,e;return n={initialize:function(t){if(e=new Ml,!t)return null;const u=t.indexOf("#");if(u!==-1){const c=t.substr(u+1).split("&");for(let _=0,v=c.length;_<v;++_){const I=c[_],g=I.indexOf("=");if(g!==-1){const D=I.substring(0,g);e.hasOwnProperty(D)&&(e[D]=I.substr(g+1))}}}},getURIFragmentData:function(){return e}},n}_s.__dashjs_factory_name="URIFragmentModel";var wl=L.default.getSingletonFactory(_s),Pl=P(1349);const Ol=new Map([[r.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[r.default.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[r.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[r.default.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function ys(){let n,e,t,u,c,_,v,I,g,D,N,E;const f=this.context,A=(0,h.default)(f).getInstance(),U=[];function F(O,ee=!1){t&&(ee?t.playbackRate=O:J(r.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,(()=>{t.playbackRate=O})))}function B(){return U.length>0}function x(O){let ee=U.indexOf(O);if(O!==null&&(ee!==-1&&U.splice(ee,1),D.get().streaming.buffer.syntheticStallEvents.enabled&&t&&!B())){const $=()=>{if(F(_||1,D.get().streaming.buffer.syntheticStallEvents.ignoreReadyState),!t.paused){const ie=document.createEvent("Event");ie.initEvent("playing",!0,!1),t.dispatchEvent(ie)}};D.get().streaming.buffer.syntheticStallEvents.ignoreReadyState?$():(I&&I.func&&I.event&&z(I.event,I.func),I=J(r.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,$))}}function W(){if(t&&B()&&t.playbackRate===0){const O=document.createEvent("Event");O.initEvent("waiting",!0,!1),t.dispatchEvent(O)}}function K(O,ee){t&&t.addEventListener(O,ee)}function z(O,ee){t&&t.removeEventListener(O,ee)}function Z(){return t?t.readyState:NaN}function M(){return t?t.buffered:null}function R(){return t?t.clientWidth:NaN}function S(){return t?t.clientHeight:NaN}function b(O,ee,$,ie,be){if(t){for(let Ce=0;Ce<t.textTracks.length;Ce++)if(t.textTracks[Ce].kind===O&&(!ee||t.textTracks[Ce].label==ee)&&t.textTracks[Ce].language===$&&t.textTracks[Ce].isTTML===ie&&t.textTracks[Ce].isEmbedded===be)return t.textTracks[Ce]}return null}function J(O,ee){return O===r.default.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||Z()>=O?(ee(),null):(function($,ie){const be=()=>{z($,be),ie($)};return K($,be),{func:be,event:$}})(Ol.get(O),ee)}return u={addEventListener:K,addTextTrack:function(O,ee,$,ie,be){if(!t)return null;let Ce=b(O,ee,$,ie,be);return Ce||(Ce=t.addTextTrack(O,ee,$),Ce.isEmbedded=be,Ce.isTTML=ie),Ce},appendChild:function(O){t&&(t.appendChild(O),O.isTTML!==void 0&&(t.textTracks[t.textTracks.length-1].isTTML=O.isTTML,t.textTracks[t.textTracks.length-1].isEmbedded=O.isEmbedded))},getBufferRange:M,getClientHeight:S,getClientWidth:R,getElement:function(){return t},getEnded:function(){return t?t.ended:null},getPlaybackQuality:function(){if(!t)return null;let O="webkitDroppedFrameCount"in t&&"webkitDecodedFrameCount"in t,ee=null;return"getVideoPlaybackQuality"in t?ee=t.getVideoPlaybackQuality():O&&(ee={droppedVideoFrames:t.webkitDroppedFrameCount,totalVideoFrames:t.webkitDroppedFrameCount+t.webkitDecodedFrameCount,creationTime:new Date}),ee},getPlaybackRate:function(){return t?t.playbackRate:null},getPlayedRanges:function(){return t?t.played:null},getReadyState:Z,getSource:function(){return t?t.src:null},getTTMLRenderingDiv:function(){return n},getTextTrack:b,getTextTracks:function(){return t?t.textTracks:[]},getTime:function(){return t?isNaN(e)?t.currentTime:e:null},getVideoElementSize:function(){const O=D.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;return{elementWidth:R()*O,elementHeight:S()*O}},getVideoHeight:function(){return t?t.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(t){const O=t.parentNode.host||t.parentNode;return O?t.getBoundingClientRect().left-O.getBoundingClientRect().left:NaN}
22return NaN},getVideoRelativeOffsetTop:function(){if(t){const O=t.parentNode.host||t.parentNode;return O?t.getBoundingClientRect().top-O.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return t?t.videoWidth:NaN},getVttRenderingDiv:function(){return E},initialize:function(){A.on(m.default.PLAYBACK_PLAYING,W,this)},isPaused:function(){return t?t.paused:null},isSeeking:function(){return t?t.seeking||!isNaN(e):null},isStalled:B,pause:function(){t&&(t.pause(),t.autoplay=!1)},play:function(){if(t){t.autoplay=!0;const O=t.play();O&&O.catch&&typeof Promise<"u"&&O.catch((ee=>{ee.name==="NotAllowedError"&&A.trigger(m.default.PLAYBACK_NOT_ALLOWED),c.warn(`Caught pending play exception - continuing (${ee})`)}))}},removeChild:function(O){t&&t.removeChild(O)},removeEventListener:z,reset:function(){clearTimeout(N),A.off(m.default.PLAYBACK_PLAYING,W,this),U.length=0,(function(){try{v&&t&&(v.unobserve(t),v.disconnect(),v=null)}catch{}})()},setConfig:function(O){O&&O.settings&&(D=O.settings)},setCurrentTime:function(O,ee){t&&(g&&g.func&&g.event&&z(g.event,g.func),e=O,g=J(r.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(()=>{if(t)if(t.currentTime!==e)try{e=ee?(function($){const ie=M();let be=$,Ce=9999999999;if(ie)for(let we=0;we<ie.length;we++){const ce=ie.start(we),le=ie.end(we),re=Math.abs(ce-$),me=Math.abs(le-$);if($>=ce&&$<=le)return $;re<Ce&&(Ce=re,be=ce),me<Ce&&(Ce=me,be=le)}return be})(e):e,isNaN(e)||(t.currentTime=e),e=NaN}catch($){t.readyState===0&&$.code===$.INVALID_STATE_ERR&&(N=setTimeout((function(){t.currentTime=e,e=NaN}),400))}else e=NaN})))},setDisableRemotePlayback:function(O){t&&(t.disableRemotePlayback=O)},setElement:function(O){if(!(O==null||O&&/^(VIDEO|AUDIO)$/i.test(O.nodeName)))throw"element is not video or audio DOM type!";t=O,(function(ee){try{if(!v||!ee)return;v.observe(ee)}catch{}})(t)},setPlaybackRate:F,setSource:function(O){t&&(O?t.src=O:(t.removeAttribute("src"),t.load()))},setStallState:function(O,ee){(function($,ie){ie?(function(be){if(be!==null&&t&&!t.seeking&&U.indexOf(be)===-1&&(U.push(be),D.get().streaming.buffer.syntheticStallEvents.enabled&&t&&U.length===1&&(D.get().streaming.buffer.syntheticStallEvents.ignoreReadyState||Z()>=r.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA))){_=t.playbackRate,F(0,!0);const Ce=document.createEvent("Event");Ce.initEvent("waiting",!0,!1),t.dispatchEvent(Ce)}})($):x($)})(O,ee)},setTTMLRenderingDiv:function(O){n=O,n.style.position="absolute",n.style.display="flex",n.style.overflow="hidden",n.style.pointerEvents="none",n.style.top=0,n.style.left=0},setVttRenderingDiv:function(O){E=O},waitForReadyState:J},c=(0,p.default)(f).getInstance().getLogger(u),D=(0,T.default)(f).getInstance(),e=NaN,(function(){try{v=new ResizeObserver((()=>{A.trigger(m.default.VIDEO_ELEMENT_RESIZED)}))}catch{}})(),u}ys.__dashjs_factory_name="VideoModel";var Ll=L.default.getSingletonFactory(ys),Fl=P(8986);function Ui(){const n="You must first call initialize() and set a source before calling this method",e="You must first call initialize() and set a valid source and view before calling this method",t="You must first call attachView() to set the video element before calling this method",u="You must first call attachSource() with a valid source before calling this method",c="MediaPlayer not initialized!",_=this.context,v=(0,h.default)(_).getInstance();let I=(0,T.default)(_).getInstance();const g=(0,p.default)(_).getInstance({settings:I});let D,N,E,f,A,U,F,B,x,W,K,z,Z,M,R,S,b,J,O,ee,$,ie,be,Ce,we,ce,le,re,me,ye,te,q,oe,Ue,Ge,Ve,je,lt,Rt,Dt,an,vn;function qn(){Be(null),at(null),f=null,R&&(R.reset(),R=null),S&&(S.reset(),S=null),$&&$.reset(),I.reset(),J&&(J.reset(),J=null),vn&&(vn.resetLoader(),vn=null)}function Yn(){return!!E&&!!je.getElement()}function Wn(){return(0,Fl.getVersionString)()}function xn(){if(!F)throw e;return me.isPaused()}function kn(){if(!F)throw e;return me.getIsDynamic()}function Un(_e){const nt=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let Kt=oe.getCurrentDVRInfo(nt);return Kt?Je(Kt.range.start+_e,Kt):0}function Je(_e,nt){let Kt=me.getOriginalLiveDelay();return _e>nt.range.end-Kt&&(_e=nt.range.end-Kt),_e}function Mt(_e=""){if(!F)throw e;let nt=yn().currentTime;return _e!==""&&(nt=ce.getTimeRelativeToStreamId(nt,_e)),nt}function Nt(_e){(0,Tn.checkParameterType)(_e,"boolean"),B=_e}function kt(){$.restoreDefaultUTCTimingSources()}function ln(){return oe}function yn(){if(!je.getElement())throw t;return je.getElement()}function at(_e){if(!A)throw c;je.setElement(_e),_e&&($t(),(function(){if(S||typeof dashjs>"u")return;let nt=dashjs.MetricsReporting;typeof nt=="function"&&(S=nt(_).create().createMetricsReporting({debug:g,eventBus:v,mediaElement:yn(),adapter:O,dashMetrics:oe,mediaPlayerModel:ee,events:m.default,constants:r.default,metricsConstants:o}))})(),(function(){if(b||typeof dashjs>"u")return;let nt=dashjs.MssHandler;typeof nt=="function"&&(wn.default.extend(nt.errors),b=nt(_).create({eventBus:v,mediaPlayerModel:ee,dashMetrics:oe,manifestModel:Ue,playbackController:me,streamController:ce,protectionController:R,baseURLController:be,errHandler:ie,events:m.default,constants:r.default,debug:g,initSegmentType:ke.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:fn,ISOBoxer:Vn,settings:I}))})(),ce&&ce.switchToVideoElement(x)),F&&(bt(),et()),Mn(x)}function Ut(_e,nt,Kt=!0){if(!U)throw n;let $e=nt?ce.getStreamById(nt):Xe();return $e?$e.getRepresentationsByType(_e,Kt):[]}function Xt(_e){if(!U)throw n;let nt=ce.getActiveStreamInfo();return nt?M.getTracksFor(_e,nt.id).filter((Kt=>!R||R.areKeyIdsUsable(Kt.normalizedKeyIds))):[]}function Be(_e,nt=NaN){if(!A)throw c;typeof _e=="string"&<.initialize(_e),nt==null&&(nt=NaN),isNaN(nt)||(nt=Math.max(0,nt)),x=nt,E=_e,(U||F)&&(bt(),et()),Yn()&&Mn(x)}
22function Xe(){if(!U)throw n;let _e=ce.getActiveStreamInfo();return _e?ce.getStreamById(_e.id):null}function bt(){F=!1,U=!1,O.reset(),ce.reset(),re.reset(),q.reset(),me.reset(),ye.reset(),te.reset(),W.reset(),K.reset(),M.reset(),Dt.reset(),R&&(I.get().streaming.protection.keepProtectionMediaKeys?R.stop():(R.reset(),R=null,$t())),le.reset(),Ge.reset(),Ve.reset()}function et(){$.resetPlaybackSessionSpecificSettings()}function qt(){return so(_).create({debug:g,errHandler:ie,dashMetrics:oe,mediaPlayerModel:ee,mssHandler:b,settings:I})}function $t(){if(R)return R;if(typeof dashjs>"u")return null;let _e=dashjs.Protection;if(typeof _e=="function"){let nt=_e(_).create();return m.default.extend(_e.events),H.default.extend(_e.events,{publicOnly:!0}),wn.default.extend(_e.errors),R=nt.createProtectionSystem({debug:g,errHandler:ie,videoModel:je,customParametersModel:$,capabilities:Ce,eventBus:v,events:m.default,BASE64:fn,constants:r.default,cmcdController:Ge,settings:I}),Ce||(Ce=(0,dr.default)(_).getInstance()),Ce.setProtectionController(R),R}return null}function rn(){if(!A)throw c;if(J)return J;if(typeof dashjs>"u")return null;let _e=dashjs.OfflineController;if(typeof _e=="function"){m.default.extend(_e.events),H.default.extend(_e.events,{publicOnly:!0}),wn.default.extend(_e.errors);const nt=qt(),Kt=ra(_).create();return Kt.setConfig({manifestModel:Ue,adapter:O,manifestLoader:nt,errHandler:ie,contentSteeringController:te}),J=_e(_).create({debug:g,manifestUpdater:Kt,baseURLController:be,manifestLoader:nt,manifestModel:Ue,mediaPlayerModel:ee,abrController:W,playbackController:me,adapter:O,errHandler:ie,dashMetrics:oe,timelineConverter:Z,segmentBaseController:Dt,schemeLoaderFactory:z,eventBus:v,events:m.default,errors:wn.default,constants:r.default,settings:I,dashConstants:de.default,urlUtils:(0,Ht.default)(_).getInstance()}),J}return null}function Mn(_e=NaN){J&&J.resetRecords(),!U&&E&&(U=!0,N.info("Streaming Initialized"),(function(){const nt=qt();ce||(ce=ns(_).getInstance()),le||(le=bl(_).create({adapter:O,baseURLController:be,errHandler:ie,manifestModel:Ue,mediaController:M,settings:I,videoModel:je})),we.setConfig({adapter:O,capabilities:Ce,customParametersModel:$,errHandler:ie,manifestModel:Ue,protectionController:R,settings:I}),ce.setConfig({abrController:W,adapter:O,baseURLController:be,capabilities:Ce,capabilitiesFilter:we,contentSteeringController:te,customParametersModel:$,dashMetrics:oe,errHandler:ie,manifestLoader:nt,manifestModel:Ue,mediaController:M,mediaPlayerModel:ee,playbackController:me,protectionController:R,segmentBaseController:Dt,serviceDescriptionController:ye,settings:I,textController:le,throughputController:K,timelineConverter:Z,uriFragmentModel:lt,videoModel:je}),re.setConfig({adapter:O,playbackController:me,settings:I,streamController:ce,timelineConverter:Z,videoModel:je}),me.setConfig({adapter:O,dashMetrics:oe,serviceDescriptionController:ye,settings:I,streamController:ce,timelineConverter:Z,videoModel:je}),q.setConfig({mediaPlayerModel:ee,playbackController:me,settings:I,streamController:ce,videoModel:je}),K.setConfig({settings:I,playbackController:me}),W.setConfig({adapter:O,capabilities:Ce,cmsdModel:Ve,customParametersModel:$,dashMetrics:oe,domStorage:Rt,mediaPlayerModel:ee,settings:I,streamController:ce,throughputController:K,videoModel:je}),Ge.setConfig({abrController:W,dashMetrics:oe,errHandler:ie,mediaPlayerModel:ee,playbackController:me,serviceDescriptionController:ye,throughputController:K}),an.setConfig({serviceDescriptionController:ye}),Ve.setConfig({}),M.initialize(),K.initialize(),W.initialize(),ce.initialize(B,f),le.initialize(),re.initialize(),q.initialize(),Ge.initialize(B),Ve.initialize(),te.initialize(),Dt.initialize()})(),typeof E=="string"?ce.load(E,_e):ce.loadWithManifest(E,_e)),!F&&Yn()&&(F=!0,v.trigger(H.default.PLAYBACK_INITIALIZED),N.info("Playback Initialized"))}return D={addABRCustomRule:function(_e,nt,Kt){$.addAbrCustomRule(_e,nt,Kt)},addExternalSubtitle:function(_e){_e instanceof ks.default||N.error("Invalid external subtitle object. Must be an instance of dashjs.ExternalSubtitle"),$.addExternalSubtitle(_e)},addRequestInterceptor:function(_e){$.addRequestInterceptor(_e)},addResponseInterceptor:function(_e){$.addResponseInterceptor(_e)},addUTCTimingSource:function(_e,nt){$.addUTCTimingSource(_e,nt)},attachProtectionController:function(_e){R=_e},attachSource:Be,attachTTMLRenderingDiv:function(_e){if(!je.getElement())throw t;je.setTTMLRenderingDiv(_e)},attachView:at,attachVttRenderingDiv:function(_e){if(!je.getElement())throw t;je.setVttRenderingDiv(_e)},clearDefaultUTCTimingSources:function(){$.clearDefaultUTCTimingSources()},convertToTimeCode:function(_e){_e=Math.max(_e,0);let nt=Math.floor(_e/3600),Kt=Math.floor(_e%3600/60),$e=Math.floor(_e%3600%60);return(nt===0?"":nt<10?"0"+nt.toString()+":":nt.toString()+":")+(Kt<10?"0"+Kt.toString():Kt.toString())+":"+($e<10?"0"+$e.toString():$e.toString())},destroy:function(){qn(),L.default.deleteSingletonInstances(_)},duration:function(){if(!F)throw e;let _e=yn().duration;if(me.getIsDynamic()){const nt=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let Kt=oe.getCurrentDVRInfo(nt);_e=Kt?Kt.range.end-Kt.range.start:0}return _e},enableForcedTextStreaming:function(_e){return!(!ce.getActiveStreamInfo()||!le)&&le.enableForcedTextStreaming(_e)},enableText:function(_e){const nt=ce.getActiveStreamInfo();return!(!nt||!le)&&le.enableText(nt.id,_e)},extend:function(_e,nt,Kt){L.default.extend(_e,nt,Kt,_)},formatUTC:function(_e,nt,Kt,$e=!1){const Gt=new Date(1e3*_e),hn=Gt.toLocaleDateString(nt),Cn=Gt.toLocaleTimeString(nt,{hour12:Kt});return $e?Cn+" "+hn:Cn},getABRCustomRules:function(){return $.getAbrCustomRules()},getActiveStream:Xe,getAutoPlay:function(){return B},getAvailableBaseUrls:function(){const _e=Ue.getValue();return _e?be.getBaseUrls(_e):[]},getAvailableLocations:function(){const _e=Ue.getValue();if(!_e)return[];const nt=O.getLocation(_e),Kt=te.getSynthesizedLocationElements(nt);return nt.concat(Kt)},getAverageLatency:function(_e=r.default.VIDEO,nt=null,Kt=NaN){return K?K.getAverageLatency(_e,nt,Kt):0},getAverageThroughput:function(_e=r.default.VIDEO,nt=null,Kt=NaN){return K?K.getAverageThroughput(_e,nt,Kt):0},getBufferLength:function(_e){const nt=[r.default.VIDEO,r.default.AUDIO,r.default.TEXT];if(_e)return nt.indexOf(_e)!==-1?ln().getCurrentBufferLevel(_e)||NaN:(N.warn("getBufferLength requested for invalid type"),NaN);{const Kt=nt.map(($e=>Xt($e).length>0?ln().getCurrentBufferLevel($e):Number.MAX_VALUE)).reduce((($e,Gt)=>Math.min($e,Gt)));return Kt===Number.MAX_VALUE?NaN:Kt}},getCurrentLiveLatency:function(){if(!A)throw c;return F?me.getCurrentLiveLatency():NaN},getCurrentRepresentationForType:function(_e){if(!U)throw n;if(_e!==r.default.IMAGE&&_e!==r.default.VIDEO&&_e!==r.default.AUDIO)return null;const nt=Xe();if(!nt)return null;if(_e===r.default.IMAGE){const Kt=nt.getThumbnailController();return Kt?Kt.getCurrentTrack():-1}return nt.getCurrentRepresentationForType(_e)},getCurrentSteeringResponseData:function(){if(te)return te.getCurrentSteeringResponseData()},getCurrentTextTrackIndex:function(){let _e=NaN;const nt=ce.getActiveStreamInfo();if(nt&&le)return _e=le.getCurrentTrackIdx(nt.id),_e},getCurrentTrackFor:function(_e){if(!U)throw n;let nt=ce.getActiveStreamInfo();return nt?M.getCurrentTrackFor(_e,nt.id):null},getDashAdapter:function(){return O},getDashMetrics:ln,getDebug:function(){return g},getDvrSeekOffset:Un,getDvrWindow:function(){if(!F)throw e;const _e=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let nt=oe.getCurrentDVRInfo(_e);if(!nt)return{};let Kt=0;const $e=me.getIsDynamic();return $e&&(Kt=nt.manifestInfo.availableFrom.getTime()/1e3),{start:nt.range.start,end:nt.range.end,startAsUtc:$e?Kt+nt.range.start:NaN,endAsUtc:$e?Kt+nt.range.end:NaN,size:nt.range.end-nt.range.start}},getExternalSubtitles:function(){$.getExternalSubtitles()},getInitCache:function(){return ct(_).getInstance()},getInitialMediaSettingsFor:function(_e){if(!A)throw c;return M.getInitialSettings(_e)},getLowLatencyModeEnabled:function(){if(!F)throw e;return me.getLowLatencyModeEnabled()},getManifest:function(){return Ue.getValue()},getOfflineController:function(){return rn()},getPlaybackRate:function(){return yn().playbackRate},getProtectionController:function(){return $t()},getProtectionData:function(){return ce?ce.getProtectionData():null},getRawThroughputData:function(_e=r.default.VIDEO){return K?K.getRawThroughputData(_e):[]},getRepresentationsByType:function(_e,nt=null){return Ut(_e,nt,!0)},getRepresentationsByTypeUnfiltered:function(_e,nt=null){return Ut(_e,nt,!1)},getSafeAverageThroughput:function(_e=r.default.VIDEO,nt=null,Kt=NaN){return K?K.getSafeAverageThroughput(_e,nt,Kt):0},getSettings:function(){return I.get()},getSource:function(){if(!E)throw u;return E},getStreamsFromManifest:function(_e){if(!U)throw n;return O.getStreamsInfo(_e)},getTTMLRenderingDiv:function(){return je?je.getTTMLRenderingDiv():null},getTargetLiveDelay:function(){if(!F)throw e;return me.getOriginalLiveDelay()},getTracksFor:Xt,getTracksForTypeFromManifest:function(_e,nt,Kt){if(!U)throw n;return(Kt=Kt||O.getStreamsInfo(nt,1)[0])?O.getAllMediaInfoForType(Kt,_e,nt):[]},getVersion:Wn,getVideoElement:yn,getVolume:function(){return yn().volume},getXHRWithCredentialsForType:function(_e){return $.getXHRWithCredentialsForType(_e)},initialize:function(_e,nt,Kt,$e=NaN){Ce||(Ce=(0,dr.default)(_).getInstance(),Ce.setConfig({settings:I,protectionController:R})),ie||(ie=Bs(_).getInstance()),Ce.supportsMediaSource()?(A||(A=!0,Z=vl(_).getInstance(),K||(K=Dl(_).getInstance()),W||(W=it(_).getInstance()),z||(z=(0,ho.default)(_).getInstance()),me||(me=go(_).getInstance()),M||(M=co(_).getInstance()),ce||(ce=ns(_).getInstance()),re||(re=Gs(_).getInstance()),q||(q=Xr(_).getInstance()),ye||(ye=_o(_).getInstance()),te||(te=ft(_).getInstance()),we||(we=qr(_).getInstance()),O=ti(_).getInstance(),Ue=oo(_).getInstance(),Ge=(0,Qr.default)(_).getInstance(),Ve=(0,Zr.default)(_).getInstance(),an=Kr(_).getInstance(),oe=xs(_).getInstance({settings:I}),Rt=Tt(_).getInstance({settings:I}),O.setConfig({constants:r.default,cea608parser:new os,errHandler:ie,BASE64:fn}),be||(be=Rn(_).create()),be.setConfig({adapter:O,contentSteeringController:te}),ye.setConfig({adapter:O}),Dt||(Dt=Eo(_).getInstance({dashMetrics:oe,mediaPlayerModel:ee,errHandler:ie,baseURLController:be,events:m.default,eventBus:v,debug:g,boxParser:ar(_).getInstance(),errors:wn.default})),M.setConfig({domStorage:Rt,settings:I,mediaPlayerModel:ee,customParametersModel:$,videoModel:je}),ee.setConfig({playbackController:me,serviceDescriptionController:ye}),te.setConfig({adapter:O,errHandler:ie,dashMetrics:oe,mediaPlayerModel:ee,manifestModel:Ue,serviceDescriptionController:ye,throughputController:K,eventBus:v}),kt(),Nt(Kt===void 0||Kt),rn()),_e&&at(_e),nt&&Be(nt,$e),N.info("[dash.js "+Wn()+"] MediaPlayer has been initialized")):ie.error(new on.default(wn.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,wn.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},isDynamic:kn,isMuted:function(){return yn().muted},isPaused:xn,isReady:Yn,isSeeking:function(){if(!F)throw e;return me.isSeeking()},isTextEnabled:function(){const _e=ce.getActiveStreamInfo();return!(!_e||!le)&&le.isTextEnabled(_e)},off:function(_e,nt,Kt){v.off(_e,nt,Kt)},on:function(_e,nt,Kt,$e){v.on(_e,nt,Kt,$e)},pause:function(){if(!F)throw e;me.pause()},play:function(){if(!F)throw e;(!B||xn()&&F)&&me.play(!0)},preload:function(){if(!je.getElement()&&!U){if(!E)throw u;Mn(x)}},provideThumbnail:function(_e,nt){if(typeof nt!="function")return;if(_e<0)return void nt(null);const Kt=me.getIsDynamic()?Un(_e):_e,$e=ce.getStreamForTime(Kt);if($e===null)return void nt(null);const Gt=$e.getThumbnailController();if(Gt)return Gt.provide(Kt,nt);nt(null)},refreshManifest:function(_e){if(!A)throw c;if(!Yn())return _e(null,u);let nt=this;if(typeof _e=="function"){const Kt=function($e){v.off(m.default.INTERNAL_MANIFEST_LOADED,Kt,nt),$e.error?_e(null,$e.error):_e($e.manifest)};v.on(m.default.INTERNAL_MANIFEST_LOADED,Kt,nt)}ce.refreshManifest()},registerCertificateRequestFilter:function(_e){$.registerCertificateRequestFilter(_e)}
22,registerCertificateResponseFilter:function(_e){$.registerCertificateResponseFilter(_e)},registerCustomCapabilitiesFilter:function(_e){$.registerCustomCapabilitiesFilter(_e)},registerLicenseRequestFilter:function(_e){$.registerLicenseRequestFilter(_e)},registerLicenseResponseFilter:function(_e){$.registerLicenseResponseFilter(_e)},removeABRCustomRule:function(_e){$.removeAbrCustomRule(_e)},removeAllABRCustomRule:function(){$.removeAllAbrCustomRule()},removeExternalSubtitleById:function(_e){$.removeExternalSubtitleById(_e)},removeExternalSubtitleByUrl:function(_e){$.removeExternalSubtitleByUrl(_e)},removeRequestInterceptor:function(_e){$.removeRequestInterceptor(_e)},removeResponseInterceptor:function(_e){$.removeResponseInterceptor(_e)},removeUTCTimingSource:function(_e,nt){$.removeUTCTimingSource(_e,nt)},reset:qn,resetCustomInitialTrackSelectionFunction:function(){$.resetCustomInitialTrackSelectionFunction(null)},resetSettings:function(){I.reset()},restoreDefaultUTCTimingSources:kt,retrieveManifest:function(_e,nt){vn&&vn.resetLoader();const Kt=qt(),$e=()=>{v.off(m.default.INTERNAL_MANIFEST_LOADED,Gt,this),Kt.reset(),vn=null};vn={manifestLoader:Kt,resetLoader:$e};const Gt=hn=>{typeof nt=="function"&&(hn.error?nt(null,hn.error):nt(hn.manifest)),$e()};v.on(m.default.INTERNAL_MANIFEST_LOADED,Gt,this),lt.initialize(_e),Kt.load(_e)},seek:function(_e){if(!F)throw e;if((0,Tn.checkParameterType)(_e,"number"),isNaN(_e))throw r.default.BAD_ARGUMENT_ERROR;_e<0&&(_e=0);let nt=me.getIsDynamic()?Un(_e):_e;const Kt=yn();!me.getIsDynamic()&&Kt.duration&&(nt=Math.min(Kt.duration,nt)),me.seek(nt,!1,!1,!0)},seekToOriginalLive:function(){F&&kn()&&me.seekToOriginalLive()},seekToPresentationTime:function(_e){if(!F)throw e;if((0,Tn.checkParameterType)(_e,"number"),isNaN(_e))throw r.default.BAD_ARGUMENT_ERROR;_e<0&&(_e=0);const nt=yn();if(!me.getIsDynamic()&&nt.duration&&(_e=Math.min(nt.duration,_e)),me.getIsDynamic()){const Kt=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let $e=oe.getCurrentDVRInfo(Kt);if(!$e)return;(_e=Je(_e,$e))<$e.range.start&&(_e=$e.range.start)}me.seek(_e,!1,!1,!0)},setAutoPlay:Nt,setConfig:function(_e){_e&&(_e.capabilities&&(Ce=_e.capabilities),_e.capabilitiesFilter&&(we=_e.capabilitiesFilter),_e.streamController&&(ce=_e.streamController),_e.textController&&(le=_e.textController),_e.gapController&&(re=_e.gapController),_e.throughputController&&(K=_e.throughputController),_e.playbackController&&(me=_e.playbackController),_e.serviceDescriptionController&&(ye=_e.serviceDescriptionController),_e.contentSteeringController&&(te=_e.contentSteeringController),_e.clientDataReportingController&&(an=_e.clientDataReportingController),_e.catchupController&&(q=_e.catchupController),_e.mediaPlayerModel&&(ee=_e.mediaPlayerModel),_e.customParametersModel&&($=_e.customParametersModel),_e.abrController&&(W=_e.abrController),_e.schemeLoaderFactory&&(z=_e.schemeLoaderFactory),_e.mediaController&&(M=_e.mediaController),_e.settings&&(I=_e.settings),_e.dashMetrics&&(oe=_e.dashMetrics))},setCurrentTrack:function(_e,nt=!1){if(!U)throw n;!R||R.areKeyIdsUsable(_e.normalizedKeyIds)?M.setTrack(_e,{noSettingsSave:nt}):N.error(`Can not switch to track with index ${_e.index} because key is not usable`)},setCustomInitialTrackSelectionFunction:function(_e){$.setCustomInitialTrackSelectionFunction(_e)},setInitialMediaSettingsFor:function(_e,nt){if(!A)throw c;let Kt=(function($e){const Gt=I.get().streaming.defaultSchemeIdUri;let hn={};function Cn(On,Dn,Kn){let zn={};if(Dn){if(Dn instanceof Array)throw"Array type not supported for settings!";return Dn instanceof Object?(zn.schemeIdUri=Dn.schemeIdUri?Dn.schemeIdUri:"",zn.value=Dn.value?Dn.value:""):(zn.schemeIdUri=Kn,zn.value=Dn,N.warn("No schemeIdUri provided for "+On+', using default "'+Kn+'"')),zn}return null}return $e.id!==void 0&&(hn.id=$e.id),$e.lang!==void 0&&(hn.lang=$e.lang),isNaN($e.index)||(hn.index=$e.index),$e.viewpoint!==void 0&&(hn.viewpoint=Cn("viewpoint",$e.viewpoint,Gt.viewpoint)),$e.audioChannelConfiguration!==void 0&&(hn.audioChannelConfiguration=Cn("audioChannelConfiguration",$e.audioChannelConfiguration,Gt.audioChannelConfiguration)),$e.role!==void 0&&$e.role!==null&&(hn.role=Cn("role",$e.role,Gt.role),hn.role.schemeIdUri===r.default.DASH_ROLE_SCHEME_ID&&hn.role.value==="Main"&&(hn.role.value=de.default.MAIN)),$e.accessibility!==void 0&&(hn.accessibility=Cn("accessibility",$e.accessibility,Gt.accessibility)),hn})(nt);M.setInitialSettings(_e,Kt)},setMute:function(_e){(0,Tn.checkParameterType)(_e,"boolean"),yn().muted=_e},setPlaybackRate:function(_e){yn().playbackRate=_e},setProtectionData:function(_e){f=Pl.default.sanitizeProtectionDataCertUrls(_e),ce&&ce.setProtectionData(f)},setRepresentationForTypeById:function(_e,nt,Kt=!1){if(_e!==r.default.IMAGE&&_e!==r.default.VIDEO&&_e!==r.default.AUDIO)return;if(!U)throw n;const $e=Xe();if($e)if(_e===r.default.IMAGE){const Gt=$e.getThumbnailController();Gt&&Gt.setTrackById(nt)}else{const Gt=$e.getRepresentationForTypeById(_e,nt);Gt&&W.manuallySetPlaybackQuality(_e,ce.getActiveStreamInfo(),Gt,{forceReplace:Kt})}},setRepresentationForTypeByIndex:function(_e,nt,Kt=!1){if(_e!==r.default.IMAGE&&_e!==r.default.VIDEO&&_e!==r.default.AUDIO)return;if(!U)throw n;const $e=Xe();if($e)if(_e===r.default.IMAGE){const Gt=$e.getThumbnailController();Gt&&Gt.setTrackByIndex(nt)}else{const Gt=$e.getRepresentationForTypeByIndex(_e,nt);Gt&&W.manuallySetPlaybackQuality(_e,ce.getActiveStreamInfo(),Gt,{forceReplace:Kt})}},setTextTrack:function(_e){if(!F)throw e;const nt=ce.getActiveStreamInfo();nt&&le&&le.setTextTrack(nt.id,_e)},setVolume:function(_e){if(typeof _e!="number"||isNaN(_e)||_e<0||_e>1)throw r.default.BAD_ARGUMENT_ERROR;yn().volume=_e},setXHRWithCredentialsForType:function(_e,nt){$.setXHRWithCredentialsForType(_e,nt)},time:Mt,timeAsUTC:function(){if(!F)throw e;if(!me.getIsDynamic()||Mt()<0)return NaN;const _e=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let nt,Kt,$e=oe.getCurrentDVRInfo(_e);return $e?(nt=$e.manifestInfo.availableFrom.getTime()/1e3,Kt=nt+Mt(),Kt):0},timeInDvrWindow:function(){if(!F)throw e;if(!me.getIsDynamic())return Mt();let _e=yn().currentTime;const nt=ce&&ce.hasVideoTrack()?r.default.VIDEO:r.default.AUDIO;let Kt=oe.getCurrentDVRInfo(nt);return _e=Kt===null||_e===0?0:Math.max(0,_e-Kt.range.start),_e},trigger:function(_e,nt,Kt){v.trigger(_e,nt,Kt)},triggerSteeringRequest:function(){if(te)return te.loadSteeringData()},unregisterCertificateRequestFilter:function(_e){$.unregisterCertificateRequestFilter(_e)}
22,unregisterCertificateResponseFilter:function(_e){$.unregisterCertificateResponseFilter(_e)},unregisterCustomCapabilitiesFilter:function(_e){$.unregisterCustomCapabilitiesFilter(_e)},unregisterLicenseRequestFilter:function(_e){$.unregisterLicenseRequestFilter(_e)},unregisterLicenseResponseFilter:function(_e){$.unregisterLicenseResponseFilter(_e)},updateSettings:function(_e){I.update(_e)},updateSource:function(_e){E=_e,ce.load(E)}},N=g.getLogger(D),A=!1,F=!1,U=!1,B=!0,x=NaN,R=null,J=null,f=null,O=null,Dt=null,m.default.extend(H.default),ee=fo(_).getInstance(),$=(0,vr.default)(_).getInstance(),je=Ll(_).getInstance(),lt=wl(_).getInstance(),D}Ui.__dashjs_factory_name="MediaPlayer";const pi=L.default.getClassFactory(Ui);pi.events=H.default,pi.errors=wn.default,L.default.updateClassFactory(Ui.__dashjs_factory_name,pi);var Ul=pi},1191:function(vt,pe,P){P.r(pe);var L=P(7252);class d extends L.default{constructor(){super(),this.AST_IN_FUTURE="astInFuture",this.BASE_URLS_UPDATED="baseUrlsUpdated",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",this.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",this.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",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_LOADING_STARTED="manifestLoadingStarted",this.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.NEW_TRACK_SELECTED="newTrackSelected",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_UPDATED="streamUpdated",this.STREAM_ACTIVATED="streamActivated",this.STREAM_DEACTIVATED="streamDeactivated",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.CUE_ENTER="cueEnter",this.CUE_EXIT="cueExit",this.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.CAN_PLAY_THROUGH="canPlayThrough",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_INITIALIZED="playbackInitialized",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_LOADED_DATA="playbackLoadedData",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_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",this.EVENT_MODE_ON_START="eventModeOnStart",this.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",this.CONFORMANCE_VIOLATION="conformanceViolation",this.REPRESENTATION_SWITCH="representationSwitch",this.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",this.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",this.INBAND_PRFT="inbandPrft",this.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",this.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming"}}let o=new d;pe.default=o},6882:function(vt,pe,P){P.r(pe);var L=P(138),d=P(3346),o=P(8261),p=P(5212);function T(){let y,w,h,m;const r=this.context;function H(){const fe=(function(){if(typeof m!="function")return null;try{return m()}catch{return null}})();return fe&&Object.keys(fe).length>0?fe:h}function G(){const fe=H();if(fe&&fe.version)return parseInt(fe.version,10);const Me=w.get().streaming.cmcd;return Me&&Me.version?parseInt(Me.version,10):p.default.CMCD_DEFAULT_VERSION}function ue(fe,Me,Fe={}){if(!fe||!Me)return;let ot=Me;for(const[X,Se]of Object.entries(Fe))ot=ot.replace(`{${X}}`,Se);const ke=ot.split(".");let Q=fe;for(let X=0;X<ke.length;X++){const Se=ke[X];if(Q==null)return;const Ae=Se.match(/^([^\[]+)\[(\d+)\]$/);if(Ae){const[,xe,gt]=Ae;if(Q=Q[xe],!Array.isArray(Q))return;Q=Q[parseInt(gt,10)]}else Q=Q[Se]}return Q}function ge(fe,Me={}){const Fe=d.default[fe];if(!Fe)return Me.defaultValue!==void 0?Me.defaultValue:void 0;
22const ot=G(),ke={settings:w.get(),manifestParams:H()||{}};if(Fe.version&&!Fe.version.includes(ot))return Me.defaultValue!==void 0?Me.defaultValue:void 0;const Q={};Me.targetIndex!==void 0&&(Q.targetIndex=Me.targetIndex);const X=fe==="applyParametersFromMpd"||(ke.settings?.streaming?.cmcd?.applyParametersFromMpd??!0),Se=[...Fe.sources].sort(((Ae,xe)=>Ae.priority-xe.priority));for(const Ae of Se){if(!X&&Ae.path.startsWith("manifestParams"))continue;const xe=ue(ke,Ae.path,Q);if(xe!=null)return typeof Ae.transform=="function"?Ae.transform(xe):xe}for(const Ae of Se)if((X||!Ae.path.startsWith("manifestParams"))&&Ae.default!==void 0)return Ae.default;return Me.defaultValue!==void 0?Me.defaultValue:void 0}function Ne(){if(G()!==2)return[];const fe=ge("eventTargets");return Array.isArray(fe)?fe:[]}return y={get:ge,getEventTarget:function(fe){const Me=Ne();return fe<0||fe>=Me.length?null:{get:Fe=>ge(Fe,{targetIndex:fe}),has:Fe=>ge(Fe,{targetIndex:fe})!=null,index:fe,raw:Me[fe]}},getEventTargets:Ne,getVersion:function(){return G()},has:function(fe){return ge(fe)!=null},hasManifestParams:function(){const fe=H();return!(!fe||!fe.version)},isEnabled:function(){const fe=w.get().streaming.cmcd;if(fe?.applyParametersFromMpd??1){const Me=H();if(Me&&Me.version)return!0}return(!fe||fe.enabled!==!1)&&ge("enabled")===!0},reset:function(){h=null,m=null},setManifestParams:function(fe){h=fe},setManifestParamsProviderFunction:function(fe){m=fe}},w=(0,o.default)(r).getInstance(),h=null,m=null,y}T.__dashjs_factory_name="CmcdConfigAccessor",pe.default=L.default.getSingletonFactory(T)},3346:function(vt,pe,P){P.r(pe);var L=P(5212);const d={version:{version:[1,2],sources:[{path:"manifestParams.version",priority:1,type:"number"},{path:"settings.streaming.cmcd.version",priority:2,type:"number",default:L.default.CMCD_DEFAULT_VERSION}]},enabled:{version:[1,2],sources:[{path:"settings.streaming.cmcd.enabled",priority:1,type:"boolean",default:!1}]},sessionID:{version:[1,2],sources:[{path:"manifestParams.sessionID",priority:1,type:"string"},{path:"settings.streaming.cmcd.sid",priority:2,type:"string",default:null}]},contentID:{version:[1,2],sources:[{path:"manifestParams.contentID",priority:1,type:"string"},{path:"settings.streaming.cmcd.cid",priority:2,type:"string",default:null}]},mode:{version:[1,2],sources:[{path:"manifestParams.mode",priority:1,type:"string"},{path:"settings.streaming.cmcd.mode",priority:2,type:"string",default:L.default.CMCD_MODE_QUERY}]},rtp:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtp",priority:1,type:"number",default:null}]},rtpSafetyFactor:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtpSafetyFactor",priority:1,type:"number",default:5}]},keys:{version:[1,2],sources:[{path:"manifestParams.keys",priority:1,type:"array",transform:o=>typeof o=="string"?o.split(" "):o},{path:"settings.streaming.cmcd.enabledKeys",priority:2,type:"array",default:L.default.CMCD_KEYS}]},includeInRequests:{version:[1,2],sources:[{path:"manifestParams.includeInRequests",priority:1,type:"array",transform:o=>typeof o=="string"?o.split(" "):o},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]},applyParametersFromMpd:{version:[1,2],sources:[{path:"settings.streaming.cmcd.applyParametersFromMpd",priority:1,type:"boolean",default:!0}]},eventTargets:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets",priority:1,type:"array",default:[]}]},targetEnabled:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabled",priority:1,type:"boolean",default:!0}]}
22,targetUrl:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].url",priority:1,type:"string",default:null}]},targetKeys:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabledKeys",priority:1,type:"array",default:[]}]},targetEvents:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].events",priority:1,type:"array",default:[]}]},targetInterval:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].interval",priority:1,type:"number",default:L.default.CMCD_DEFAULT_TIME_INTERVAL}]},targetBatchSize:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].batchSize",priority:1,type:"number",default:0}]},targetIncludeInRequests:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].includeInRequests",priority:1,type:"array"},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]}};pe.default=d},5212:function(vt,pe,P){P.r(pe);var L=P(8735);pe.default={STREAM:"stream",VIDEO:"video",ENHANCEMENT:"enhancement",AUDIO:"audio",TEXT:"text",MUXED:"muxed",IMAGE:"image",STPP:"stpp",TTML:"ttml",VTT:"vtt",WVTT:"wvtt",CONTENT_STEERING:"contentSteering",LIVE_CATCHUP_MODE_DEFAULT:"liveCatchupModeDefault",LIVE_CATCHUP_MODE_LOLP:"liveCatchupModeLoLP",LIVE_CATCHUP_MODE_STEP:"liveCatchupModeStep",MOVING_AVERAGE_SLIDING_WINDOW:"slidingWindow",MOVING_AVERAGE_EWMA:"ewma",BAD_ARGUMENT_ERROR:"Invalid Arguments",MISSING_CONFIG_ERROR:"Missing config parameter(s)",TRACK_SWITCH_MODE_ALWAYS_REPLACE:"alwaysReplace",TRACK_SWITCH_MODE_NEVER_REPLACE:"neverReplace",TRACK_SELECTION_MODE_FIRST_TRACK:"firstTrack",TRACK_SELECTION_MODE_HIGHEST_BITRATE:"highestBitrate",TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:"highestEfficiency",TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:"lowestStartupDelay",TRACK_SELECTION_MODE_WIDEST_RANGE:"widestRange",CMCD_QUERY_KEY:L.CMCD_PARAM,CMCD_MODE_QUERY:L.CmcdTransmissionMode.QUERY,CMCD_MODE_HEADERS:L.CmcdTransmissionMode.HEADERS,CMCD_MODE_BODY:"body",CMCD_AVAILABLE_REQUESTS:["segment","mpd","xlink","steering","other"],CMCD_DEFAULT_TIME_INTERVAL:L.CMCD_DEFAULT_TIME_INTERVAL,CMCD_REPORTING_MODE:L.CmcdReportingMode,CMCD_KEYS:L.CMCD_KEYS,CMCD_REPORTING_EVENTS:L.CmcdEventType,CMCD_PLAYER_STATES:L.CmcdPlayerState,CMCD_DEFAULT_VERSION:1,CMCD_DEFAULT_INCLUDE_IN_REQUESTS:"segment",CMCD_CONTENT_TYPE_HEADER:{"Content-Type":"text/cmcd"},INITIALIZE:"initialize",TEXT_SHOWING:"showing",TEXT_HIDDEN:"hidden",TEXT_DISABLED:"disabled",ACCESSIBILITY_CEA608_SCHEME:"urn:scte:dash:cc:cea-608:2015",CC1:"CC1",CC3:"CC3",UTF8:"utf-8",SCHEME_ID_URI:"schemeIdUri",START_TIME:"starttime",SERVICE_DESCRIPTION_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:scope:2019",SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:critical:2019",CTA_5004_2023_SCHEME:"urn:mpeg:dash:cta-5004:2023",CTA_5004_2025_SCHEME:"urn:dashif:cta-5004:2025",THUMBNAILS_SCHEME_ID_URIS:["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"],FONT_DOWNLOAD_DVB_SCHEME:"urn:dvb:dash:fontdownload:2014",COLOUR_PRIMARIES_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:ColourPrimaries",URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2014",EXT_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2016",ADV_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2025",URL_QUERY_STATE_PREFIX:/urn:mpeg:dash:state:/,MATRIX_COEFFICIENTS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:MatrixCoefficients",TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:TransferCharacteristics",SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI:"urn:mpeg:dash:ssr:2023",HDR_METADATA_FORMAT_SCHEME_ID_URI:"urn:dvb:dash:hdr-dmi",HDR_METADATA_FORMAT_VALUES:{ST2094_10:"ST2094-10",SL_HDR2:"SL-HDR2",ST2094_40:"ST2094-40"},MEDIA_CAPABILITIES_API:{COLORGAMUT:{SRGB:"srgb",P3:"p3",REC2020:"rec2020"},TRANSFERFUNCTION:{SRGB:"srgb",PQ:"pq",HLG:"hlg"},HDR_METADATATYPE:{SMPTE_ST_2094_10:"smpteSt2094-10",SLHDR2:"slhdr2",SMPTE_ST_2094_40:"smpteSt2094-40"}},XML:"XML",ARRAY_BUFFER:"ArrayBuffer",DVB_REPORTING_URL:"dvb:reportingUrl",DVB_PROBABILITY:"dvb:probability",OFF_MIMETYPE:"application/font-sfnt",WOFF_MIMETYPE:"application/font-woff",VIDEO_ELEMENT_READY_STATES:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},FILE_LOADER_TYPES:{FETCH:"fetch_loader",XHR:"xhr_loader"},THROUGHPUT_TYPES:{LATENCY:"throughput_type_latency",BANDWIDTH:"throughput_type_bandwidth"},THROUGHPUT_CALCULATION_MODES:{EWMA:"throughputCalculationModeEwma",ZLEMA:"throughputCalculationModeZlema",ARITHMETIC_MEAN:"throughputCalculationModeArithmeticMean",BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeByteSizeWeightedArithmeticMean",DATE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeDateWeightedArithmeticMean",HARMONIC_MEAN:"throughputCalculationModeHarmonicMean",BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeByteSizeWeightedHarmonicMean",DATE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeDateWeightedHarmonicMean"},LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE:{MOOF_PARSING:"lowLatencyDownloadTimeCalculationModeMoofParsing",DOWNLOADED_DATA:"lowLatencyDownloadTimeCalculationModeDownloadedData",AAST:"lowLatencyDownloadTimeCalculationModeAast"},RULES_TYPES:{QUALITY_SWITCH_RULES:"qualitySwitchRules",ABANDON_FRAGMENT_RULES:"abandonFragmentRules"},QUALITY_SWITCH_RULES:{BOLA_RULE:"BolaRule",THROUGHPUT_RULE:"ThroughputRule",INSUFFICIENT_BUFFER_RULE:"InsufficientBufferRule",SWITCH_HISTORY_RULE:"SwitchHistoryRule",DROPPED_FRAMES_RULE:"DroppedFramesRule",LEARN_TO_ADAPT_RULE:"L2ARule",LOL_PLUS_RULE:"LoLPRule"},ABANDON_FRAGMENT_RULES:{ABANDON_REQUEST_RULE:"AbandonRequestsRule"},ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",COMMON_ACCESS_TOKEN_HEADER:"common-access-token",DASH_ROLE_SCHEME_ID:"urn:mpeg:dash:role:2011",CODEC_FAMILIES:{MP3:"mp3",AAC:"aac",AC3:"ac3",EC3:"ec3",DTSX:"dtsx",DTSC:"dtsc",AVC:"avc",HEVC:"hevc"}}},2861:function(vt,pe,P){P.r(pe),pe.default={CLEARKEY_KEYSTEM_STRING:"org.w3.clearkey",CLEARKEY_UUID:"e2719d58-a985-b3c9-781a-b030af78d30e",ENCRYPTION_SCHEME_CBCS:"cbcs",ENCRYPTION_SCHEME_CENC:"cenc",FAIRPLAY_KEYSTEM_STRING:"com.apple.fps",FAIRPLAY_UUID:"94ce86fb-07ff-4f43-adb8-93d2fa968ca2",INITIALIZATION_DATA_TYPE_CENC:"cenc",INITIALIZATION_DATA_TYPE_KEYIDS:"
22keyids",INITIALIZATION_DATA_TYPE_SINF:"sinf",INITIALIZATION_DATA_TYPE_WEBM:"webm",MEDIA_KEY_MESSAGE_TYPES:{LICENSE_REQUEST:"license-request",LICENSE_RENEWAL:"license-renewal",LICENSE_RELEASE:"license-release",INDIVIDUALIZATION_REQUEST:"individualization-request"},MEDIA_KEY_STATUSES:{USABLE:"usable",EXPIRED:"expired",RELEASED:"released",OUTPUT_RESTRICTED:"output-restricted",OUTPUT_DOWNSCALED:"output-downscaled",STATUS_PENDING:"status-pending",INTERNAL_ERROR:"internal-error"},PLAYREADY_KEYSTEM_STRING:"com.microsoft.playready",PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:"com.microsoft.playready.recommendation",PLAYREADY_UUID:"9a04f079-9840-4286-ab92-e65be0885f95",ROBUSTNESS_STRINGS:{WIDEVINE:{SW_SECURE_CRYPTO:"SW_SECURE_CRYPTO",SW_SECURE_DECODE:"SW_SECURE_DECODE",HW_SECURE_CRYPTO:"HW_SECURE_CRYPTO",HW_SECURE_DECODE:"HW_SECURE_DECODE",HW_SECURE_ALL:"HW_SECURE_ALL"}},W3C_CLEARKEY_UUID:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",WIDEVINE_KEYSTEM_STRING:"com.widevine.alpha",WIDEVINE_UUID:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"}},1234:function(vt,pe,P){P.r(pe);var L=P(8850),d=P(913),o=P(138),p=P(1191),T=P(5212),y=P(7568),w=P(8735),h=P(649),m=P(1613),r=P(3773),H=P(8898),G=P(893),ue=P(6882);function ge(){let Ne,fe,Me,Fe,ot,ke,Q,X,Se,Ae,xe=this.context,gt=(0,L.default)(xe).getInstance(),Ee=(0,h.default)(xe).getInstance();const mt={[p.default.PLAYBACK_INITIALIZED]:T.default.CMCD_PLAYER_STATES.STARTING,[p.default.PLAYBACK_PAUSED]:T.default.CMCD_PLAYER_STATES.PAUSED,[p.default.PLAYBACK_ERROR]:T.default.CMCD_PLAYER_STATES.FATAL_ERROR,[p.default.PLAYBACK_ENDED]:T.default.CMCD_PLAYER_STATES.ENDED};let He={};function Pe(Te){Me&&Me.update({sta:Te}),Sn(T.default.CMCD_REPORTING_EVENTS.PLAY_STATE)}function Ke(){const Te={version:Ne.getVersion(),transmissionMode:Ne.get("mode")===T.default.CMCD_MODE_HEADERS?w.CMCD_HEADERS:w.CMCD_QUERY,enabledKeys:Ne.get("keys"),eventTargets:Ne.getEventTargets().reduce(((l,C,ne)=>{if(!Ie(ne))return l;const se=Ne.getEventTarget(ne);return l.push({url:se.get("targetUrl"),events:se.get("targetEvents"),interval:se.get("targetInterval")??T.default.CMCD_DEFAULT_TIME_INTERVAL,batchSize:se.get("targetBatchSize")||1,enabledKeys:se.get("targetKeys")}),l}),[])},Le=Ne.get("sessionID");Le&&(Te.sid=Le);const i=Ne.get("contentID");return i&&(Te.cid=i),new w.CmcdReporter(Te,Et)}function Et(Te){return new Promise((Le=>{const i=new m.default;i.url=Te.url,i.method=Te.method,i.headers=Te.headers,i.body=Te.body,i.type=y.HTTPRequest.CMCD_EVENT,Ae.load({request:i,success:()=>Le({status:200}),error:l=>Le({status:l?.status||500})})}))}function Pt(){fe.onPeriodSwitchComplete()}function xt(){fe.onPlaybackStarted()}function Lt(){fe.onPlaybackPlaying(),Pe(T.default.CMCD_PLAYER_STATES.PLAYING)}function sn(Te){if(Te.error?.data?.request?.type!==y.HTTPRequest.CMCD_EVENT){if(Me){const Le=Te.error?.code||Te.error?.data?.code;Le&&Me.update({ec:Le})}Sn(T.default.CMCD_REPORTING_EVENTS.ERROR)}}function nn(){Se&&Me&&(Ne.get("applyParametersFromMpd")??1)&&Ne.hasManifestParams()&&(Se=!1,Me.stop(!0),Me=Ke(),Me.start())}function Sn(Te){if(!Me)return;nn();const Le=fe.getEventModeData(),i=fe.calculateMsd();i.msd!==void 0&&Me.update(i),Me.recordEvent(Te,Le)}function ve(Te){if(Me&&Ie()){nn();try{const Le=fe.deriveCmcdDataForRequest(Te),i=fe.calculateMsd();i.msd!==void 0&&Me.update(i);const l=Me.createRequestReport(Te,Le);Te.url=l.url,Te.headers=l.headers,Te.cmcd=l.customData?.cmcd||{},(function(C){const ne=Ne.get("mode"),se={url:C.url,mediaType:C.mediaType,requestType:C.type,cmcdData:C.cmcd,mode:ne};if(ne===T.default.CMCD_MODE_HEADERS)se.headers=C.headers;else try{const Oe=new URL(C.url);se.cmcdString=Oe.searchParams.get(w.CMCD_PARAM)||""}catch{se.cmcdString=""}gt.trigger(d.default.CMCD_DATA_GENERATED,se)})(Te)}catch(Le){return Q.warn(Le),null}}}function Ie(Te=null){return Te!==null?(function(Le){if(Ne.getVersion()!==2)return Q.warn("CMCD version 2 is required for target configuration"),!1;const i=Ne.getEventTarget(Le),l=i.get("targetEnabled"),C=i.get("targetUrl");return C?l&&C:(Q.warn("Target URL is not configured"),!1)})(Te)&&(function(Le){let i=Ne.getEventTarget(Le).get("targetIncludeInRequests");if(!i)return!0;const l=T.default.CMCD_AVAILABLE_REQUESTS,C=i.filter((ne=>!l.includes(ne)));return C.length===i.length?(Q.error("None of the request types are supported."),!1):(C.forEach((ne=>{Q.warn(`request type ${ne} is not supported.`)})),!0)})(Te):(function(){const Le=Ne.getVersion();return Le!==1&&Le!==2?(Q.error(`version parameter must be 1 or 2, got ${Le}.`),!1):Ne.isEnabled()})()&&(function(){if(Ne.getVersion()===2)return!0;const Le=Ne.get("includeInRequests"),i=T.default.CMCD_AVAILABLE_REQUESTS,l=Le.filter((C=>!i.includes(C)));return l.length===Le.length?(Q.error("None of the request types are supported."),!1):(l.forEach((C=>{Q.warn(`request type ${C} is not supported.`)})),!0)})()}function pt(Te){const Le=fe.onPlaybackRateChanged(Te);Me&&Le&&Me.update(Le)}
22function _t(Te){if(fe.updateCmcdManifestParamsInCmcdConfigAccessor(),Se=!0,Me){const Le=fe.onManifestLoaded(Te);Me.update(Le)}}function Ye(Te){fe.onBufferLevelStateChanged(Te)}function Y(){fe.onPlaybackSeeking(),Pe(T.default.CMCD_PLAYER_STATES.SEEKING)}function k(){fe.onPlaybackSeeked()}function De(){if(fe.wasPlaying()){const Te=fe.getLastMediaTypeRequest();fe.onRebufferingStarted(Te),Pe(T.default.CMCD_PLAYER_STATES.REBUFFERING)}else Pe(T.default.CMCD_PLAYER_STATES.WAITING)}function j(Te){const Le=Te.customData.request.type;if(!Me||!Ie()||!fe.isIncludedInRequestFilter(Le))return Te.cmcd=Te.customData.request.cmcd,Te;let i=Te.customData.request;return ve(i),{...Te,url:i.url,headers:i.headers,cmcd:i.cmcd,customData:{...Te.customData,cmcd:i.cmcd}}}function We(Te){return Te.request?.customData?.request?.type===y.HTTPRequest.CMCD_EVENT||(function(i){if(!Me)return;nn();const l=fe.getEventModeData(),C=fe.calculateMsd();C.msd!==void 0&&Me.update(C);const ne={};if(i.headers)try{const se=i.headers["cmsd-static"];se&&(ne.cmsds=btoa(se));const Oe=i.headers["cmsd-dynamic"];Oe&&(ne.cmsdd=btoa(Oe))}catch(se){Q.warn("Failed to base64 encode CMSD headers, ignoring.",se)}try{Me.recordResponseReceived(i,{...l,...ne})}catch(se){Q.error(se)}})(Te),Te}function st(){gt.off(p.default.PLAYBACK_RATE_CHANGED,pt,ke),gt.off(p.default.MANIFEST_LOADED,_t,ke),gt.off(p.default.BUFFER_LEVEL_STATE_CHANGED,Ye,ke),gt.off(p.default.PLAYBACK_SEEKED,k,ke),gt.off(p.default.PERIOD_SWITCH_COMPLETED,Pt,ke),gt.off(p.default.PLAYBACK_STARTED,xt,ke),gt.off(p.default.MANIFEST_LOADING_STARTED,xt,ke),gt.off(p.default.ERROR,sn,ke),gt.off(p.default.PLAYBACK_PLAYING,Lt,ke),gt.off(p.default.PLAYBACK_SEEKING,Y,ke),gt.off(p.default.PLAYBACK_WAITING,De,ke),Object.keys(mt).forEach((Te=>{gt.off(Te,He[Te],ke)})),Me&&(Me.stop(!0),Me=null),fe.resetInitialSettings()}return fe=(0,H.default)(xe).getInstance(),Ne=(0,ue.default)(xe).getInstance(),ke={applyCmcdToRequest:ve,getCmcdRequestInterceptors:function(){return[j]},getCmcdResponseReceivedInterceptors:function(){return[We]},getCmcdParametersFromManifest:function(){return fe.getCmcdParametersFromManifest()},initialize:function(Te){Se=!1,(function(Le){gt.on(p.default.PLAYBACK_RATE_CHANGED,pt,ke),gt.on(p.default.MANIFEST_LOADED,_t,ke),gt.on(p.default.BUFFER_LEVEL_STATE_CHANGED,Ye,ke),gt.on(p.default.PLAYBACK_SEEKED,k,ke),gt.on(p.default.PERIOD_SWITCH_COMPLETED,Pt,ke),Le?gt.on(p.default.MANIFEST_LOADING_STARTED,xt,ke):gt.on(p.default.PLAYBACK_STARTED,xt,ke),gt.on(p.default.ERROR,sn,ke)})(Te),Ae||(Ae=(0,r.default)(xe).create({errHandler:ot,mediaPlayerModel:X,errors:G.default,dashMetrics:Fe})),Me=Ke(),Me.start(),gt.on(p.default.PLAYBACK_PLAYING,Lt,ke),gt.on(p.default.PLAYBACK_SEEKING,Y,ke),gt.on(p.default.PLAYBACK_WAITING,De,ke),Object.entries(mt).forEach((([Le,i])=>{He[Le]||(He[Le]=()=>Pe(i)),gt.on(Le,He[Le],ke)}))},isCmcdEnabled:Ie,reset:st,setConfig:function(Te){Te&&(Te.dashMetrics&&(Fe=Te.dashMetrics),Te.mediaPlayerModel&&(X=Te.mediaPlayerModel),Te.errHandler&&(ot=Te.errHandler),Te.urlLoader&&(Ae=Te.urlLoader),Te.serviceDescriptionController&&Ne.setManifestParamsProviderFunction((()=>Te.serviceDescriptionController.getServiceDescriptionSettings()?.clientDataReporting?.cmcdParameters||null)),fe.setConfig(Te))}},Q=Ee.getLogger(ke),st(),ke}ge.__dashjs_factory_name="CmcdController",pe.default=o.default.getSingletonFactory(ge)},2473:function(vt,pe,P){P.r(pe);var L=P(138),d=P(5212),o=P(7263);function p(){let T,y;function w(){y={}}return T={reset:function(){w()},processResponseHeaders:function(h){if(!(h&&h.headers&&h.request&&h.request.url))return;const m=h.headers[d.default.COMMON_ACCESS_TOKEN_HEADER];if(m){const r=o.default.getHostFromUrl(h.request.url);r&&(y[r]=m)}},getCommonAccessTokenForUrl:function(h){if(!h)return null;const m=o.default.getHostFromUrl(h);return m?y[m]?y[m]:null:void 0}},w(),T}p.__dashjs_factory_name="CommonAccessTokenController",pe.default=L.default.getSingletonFactory(p)},5313:function(vt,pe,P){P.r(pe);var L=P(138),d=P(7263),o=P(8854),p=P(5212),T=P(7568),y=P(649);function w(){let h,m,r;const H=this.context;function G(ue,ge,Ne,fe,Me){const Fe=(function(ot,ke){let Q=[];return Q=ke===o.default.PERIOD?ot[o.default.SUPPLEMENTAL_PROPERTY]||[]:[...ot[o.default.ESSENTIAL_PROPERTY]||[],...ot[o.default.SUPPLEMENTAL_PROPERTY]||[]],Q.find((X=>X.schemeIdUri===p.default.URL_QUERY_INFO_SCHEME&&X.UrlQueryInfo||X.schemeIdUri===p.default.EXT_URL_QUERY_INFO_SCHEME&&X.ExtUrlQueryInfo))})(ge,Me);(function(ot,ke,Q,X){Q.initialQueryString="";let Se="";const Ae=ot?.ExtUrlQueryInfo||ot?.UrlQueryInfo;Se=Ae&&Ae.queryString?ke&&ke.length>0?ke+"&"+Ae.queryString:Ae.queryString:ke,Ae?.useMPDUrlQuery==="true"&&X&&(Se=Se?Se+"&"+X:X),Q.initialQueryString=Se})(Fe,fe.initialQueryString,ue,Ne),(function(ot,ke,Q){if(!ot)return void(ke.f
22inalQueryString=Q);const X=ot?.ExtUrlQueryInfo?.queryTemplate||ot?.UrlQueryInfo?.queryTemplate||"";ke.finalQueryString=X===o.default.QUERY_PART?ke?.initialQueryString:""})(Fe,ue,fe.finalQueryString),ue.sameOriginOnly=Fe?.ExtUrlQueryInfo?.sameOriginOnly,ue.queryParams=d.default.parseQueryParams(ue?.finalQueryString),ue.includeInRequests=(function(ot,ke){return ot?ot.ExtUrlQueryInfo?.includeInRequests?ot.ExtUrlQueryInfo.includeInRequests.split(" "):[o.default.SEGMENT_TYPE]:ke})(Fe,fe.includeInRequests)}return m=(0,y.default)(H).getInstance().getLogger(h),h={getFinalQueryString:function(ue){try{if(!r)return null;if(ue.type===T.HTTPRequest.MEDIA_SEGMENT_TYPE||ue.type===T.HTTPRequest.INIT_SEGMENT_TYPE){const ge=ue.representation;if(!ge)return null;const Ne=ge.adaptation,fe=Ne.period,Me=r.period[fe.index].adaptation[Ne.index].representation[ge.index],Fe=new URL(ue.url),ot=!Me.sameOriginOnly||r.origin===Fe.origin;if(Me.includeInRequests.includes(o.default.SEGMENT_TYPE)&&ot)return Me.queryParams}else if(ue.type===T.HTTPRequest.MPD_TYPE){if([o.default.MPD_TYPE,o.default.MPD_PATCH_TYPE].some((ge=>r.includeInRequests.includes(ge))))return r.queryParams}else if(ue.type===T.HTTPRequest.CONTENT_STEERING_TYPE&&r.includeInRequests.includes(o.default.STEERING_TYPE))return r.queryParams}catch(ge){return m.error(ge),null}},createFinalQueryStrings:function(ue){r={origin:new URL(ue.url).origin,period:[]};const ge=ue.url.split("?")[1];G(r,ue,ge,{initialQueryString:"",includeInRequests:[]},o.default.MPD),ue.Period.forEach((Ne=>{const fe={adaptation:[]};G(fe,Ne,ge,r,o.default.PERIOD),Ne.AdaptationSet.forEach((Me=>{const Fe={representation:[]};G(Fe,Me,ge,fe,o.default.ADAPTATION_SET),Me.Representation.forEach((ot=>{const ke={};G(ke,ot,ge,Fe,o.default.REPRESENTATION),Fe.representation.push(ke)})),fe.adaptation.push(Fe)})),r.period.push(fe)}))}},h}w.__dashjs_factory_name="ExtUrlQueryInfoController",pe.default=L.default.getSingletonFactory(w)},4469:function(vt,pe,P){P.r(pe),P.d(pe,{default:function(){return De}});class L{constructor(){this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}}L.SSL_CONNECTION_FAILED_PREFIX="SSL",L.DNS_RESOLUTION_FAILED="C00",L.HOST_UNREACHABLE="C01",L.CONNECTION_REFUSED="C02",L.CONNECTION_ERROR="C03",L.CORRUPT_MEDIA_ISOBMFF="M00",L.CORRUPT_MEDIA_OTHER="M01",L.BASE_URL_CHANGED="F00",L.BECAME_REPORTER="S00";var d=L,o=P(913),p=P(138);function T(j){let We,st;const Te=(j=j||{}).eventBus,Le=j.dashMetrics,i=j.metricsConstants,l=j.events;function C(ze){let qe=new d;if(st){for(const V in ze)ze.hasOwnProperty(V)&&(qe[V]=ze[V]);qe.mpdurl||(qe.mpdurl=st.originalUrl||st.url),qe.terror||(qe.terror=new Date),Le.addDVBErrors(qe)}}function ne(ze){ze.error||(st=ze.manifest)}function se(ze){C({errorcode:d.BASE_URL_CHANGED,servicelocation:ze.entry})}function Oe(){C({errorcode:d.BECAME_REPORTER})}function rt(ze){var qe;ze.metric===i.HTTP_REQUEST&&((qe=ze.value).responsecode===0||qe.responsecode==null||qe.responsecode>=400||qe.responsecode<100||qe.responsecode>=600)&&C({errorcode:qe.responsecode||d.CONNECTION_ERROR,url:qe.url,terror:qe.tresponse,servicelocation:qe._serviceLocation})}function ae(ze){let qe;switch(ze.error?ze.error.code:0){case MediaError.MEDIA_ERR_NETWORK:qe=d.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:qe=d.CORRUPT_MEDIA_OTHER;break;default:return}C({errorcode:qe})}return We={initialize:function(){Te.on(l.MANIFEST_UPDATED,ne,We),Te.on(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,se,We),Te.on(l.METRIC_ADDED,rt,We),Te.on(l.METRIC_UPDATED,rt,We),Te.on(l.PLAYBACK_ERROR,ae,We),Te.on(o.default.BECAME_REPORTING_PLAYER,Oe,We)},reset:function(){Te.off(l.MANIFEST_UPDATED,ne,We),Te.off(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,se,We),Te.off(l.METRIC_ADDED,rt,We),Te.off(l.METRIC_UPDATED,rt,We),Te.off(l.PLAYBACK_ERROR,ae,We),Te.off(o.default.BECAME_REPORTING_PLAYER,Oe,We)}},We}T.__dashjs_factory_name="DVBErrorsTranslator";var y=p.default.getSingletonFactory(T),w=P(7377);function h(j){j=j||{};let We,st,Te=!1,Le=this.context,i=j.mediaElement;return We={initialize:function(l){l&&l.length&&(l.forEach((C=>{let ne=C.starttime,se=ne+C.duration;st.add(ne,se)})),Te=!!l[0]._useWallClockTime)},reset:function(){st.clear()},isEnabled:function(){let l,C=st.length;if(!C)return!0;l=Te?new Date().getTime()/1e3:i.currentTime;for(let ne=0;ne<C;ne+=1){let se=st.start(ne),Oe=st.end(ne);if(se<=l&&l<Oe)return!0}return!1}},st=(0,w.default)(Le).create(),We}h.__dashjs_factory_name="RangeController";var m=p.default.getClassFactory(h);function r(){return{serialise:function j(We){let st,Te,Le=[],i=[];for(st in We)if(We.hasOwnProperty(st)&&st.indexOf("_")!==0){if(Te=We[st],Te==null&&(Te=""),Array.isArray(Te)){if(!Te.length)continue;i=[],Te.forEach((function(l){let C=Object.prototype.toString.call(l).slice(8,-1)!=="Object";i.push(C?l:j(l))})),Te=i.map(encodeURIComponent).join(",")}else typeof Te=="string"?Te=encodeURIComponent(Te):Te instanceof Date?Te=Te.toISOString():typeof Te=="number"&&(Te=Math.round(Te));Le.push(st+"="+Te)}return Le.join("&")}}}r.__dashjs_factory_name="MetricSerialiser";var H=p.default.getSingletonFactory(r);function G(){let j,We,st,Te=window.crypto||window.msCrypto,Le=Uint32Array,i=Math.pow(2,8*Le.BYTES_PER_ELEMENT)-1;function l(){Te&&(j||(j=new Le(10)),Te.getRandomValues(j),We=0)}return st={random:function(C,ne){let se;return C||(C=0),ne||(ne=1),Te?(We===j.length&&l(),se=j[We]/i,We+=1):se=M
22ath.random(),se*(ne-C)+C}},l(),st}G.__dashjs_factory_name="RNG";var ue=p.default.getSingletonFactory(G),ge=P(1926),Ne=P(8261);function fe(j){let We;j=j||{};let st,Te,Le,i,l,C,ne,se=this.context,Oe=(0,Ne.default)(se).getInstance(),rt=[];const ae=j.metricsConstants;function ze(){i=!1,l=!1,C=null,ne=null}return We={report:function(qe,V){Array.isArray(V)||(V=[V]),l&&ne.isEnabled()&&V.forEach((function(he){let tt=st.serialise(he);qe!==ae.DVB_ERRORS&&(tt=`metricname=${qe}&${tt}`),tt=`${C}?${tt}`,(function(it,yt,Ze){let ht=new XMLHttpRequest;ht.withCredentials=Te.getXHRWithCredentialsForType(ae.HTTP_REQUEST_DVB_REPORTING_TYPE);const fn=function(){let Nn=rt.indexOf(ht);Nn!==-1&&(rt.splice(Nn,1),!(ht.status>=200&&ht.status<300)&&Ze&&Ze())};rt.push(ht);try{ht.open("GET",it),ht.onloadend=fn,ht.onerror=fn,ht.send()}catch{ht.onerror()}})(tt,0,(function(){l=!1}))}))},initialize:function(qe,V){let he;if(ne=V,C=Oe.get().streaming.dvbReporting.reportingUrl||qe.dvbReportingUrl,!C)throw new Error('MPD parameter missing "dvb:reportingUrl" or URL not provided in player settings');i||(he=qe.dvbProbability,he&&(he===1e3||he/1e3>=Le.random())&&(l=!0),i=!0)},reset:function(){ze()}},st=H(se).getInstance(),Le=ue(se).getInstance(),Te=(0,ge.default)(se).getInstance(),ze(),We}fe.__dashjs_factory_name="DVBReporting";var Me=p.default.getClassFactory(fe);function Fe(j){j=j||{};const We={"urn:dvb:dash:reporting:2014":Me},st=this.context;let Te;const Le=j.debug?j.debug.getLogger(Te):{},i=j.metricsConstants,l=j.mediaPlayerModel||{};return Te={create:function(C,ne){let se;try{se=We[C.schemeIdUri](st).create({metricsConstants:i,mediaPlayerModel:l}),se.initialize(C,ne)}catch(Oe){se=null,Le.error(`ReportingFactory: could not create Reporting with schemeIdUri ${C.schemeIdUri} (${Oe.message})`)}return se},register:function(C,ne){We[C]=ne},unregister:function(C){delete We[C]}},Te}Fe.__dashjs_factory_name="ReportingFactory";var ot=p.default.getSingletonFactory(Fe);function ke(j){let We,st=[];const Te=ot(this.context).getInstance(j);return We={initialize:function(Le,i){Le.some((l=>{let C=Te.create(l,i);if(C)return st.push(C),!0}))},reset:function(){st.forEach((Le=>Le.reset())),st=[]},report:function(Le,i){st.forEach((l=>l.report(Le,i)))}},We}ke.__dashjs_factory_name="ReportingController";var Q=p.default.getClassFactory(ke);function X(){return{reconstructFullMetricName:function(j,We,st){let Te=j;return We&&(Te+="("+We,st&&st.length&&(Te+=","+st),Te+=")"),Te},validateN:function(j){if(!j)throw new Error("missing n");if(isNaN(j))throw new Error("n is NaN");if(j<0)throw new Error("n must be positive");return j}}}X.__dashjs_factory_name="HandlerHelpers";var Se=p.default.getSingletonFactory(X);function Ae(j){let We,st,Te,Le,i,l;j=j||{};let C=this.context,ne=Se(C).getInstance(),se=[];const Oe=j.metricsConstants;function rt(){let ae=(function(){try{return Object.keys(se).map((ze=>se[ze])).reduce(((ze,qe)=>ze.level<qe.level?ze:qe))}catch{return}})();ae&&l!==ae.t&&(l=ae.t,st.report(Le,ae))}return We={initialize:function(ae,ze,qe){ze&&(Te=ne.validateN(qe),st=ze,Le=ne.reconstructFullMetricName(ae,qe),i=setInterval(rt,Te))},reset:function(){clearInterval(i),i=null,Te=0,st=null,l=null},handleNewMetric:function(ae,ze,qe){ae===Oe.BUFFER_LEVEL&&(ze.level<0?delete se[qe]:se[qe]=ze)}},We}Ae.__dashjs_factory_name="BufferLevelHandler";var xe=p.default.getClassFactory(Ae),gt=p.default.getClassFactory((function(j){let We,st,Te=(j=j||{}).eventBus;const Le=j.metricsConstants;function i(){Te.off(o.default.METRICS_INITIALISATION_COMPLETE,i,this),Te.trigger(o.default.BECAME_REPORTING_PLAYER)}return We={initialize:function(l,C){C&&(st=C,Te.on(o.default.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){st=null},handleNewMetric:function(l,C){l===Le.DVB_ERRORS&&st&&st.report(l,C)}},We}));function Ee(j){let We,st,Te,Le,i,l;j=j||{};let C=[],ne=Se(this.context).getInstance();const se=j.metricsConstants;function Oe(){var rt=C;rt.length&&st&&st.report(i,rt),C=[]}return We={initialize:function(rt,ae,ze,qe){ae&&(Te=ne.validateN(ze),st=ae,qe&&qe.length&&(Le=qe),i=ne.reconstructFullMetricName(rt,ze,qe),l=setInterval(Oe,Te))},reset:function(){clearInterval(l),l=null,Te=null,Le=null,C=[],st=null},handleNewMetric:function(rt,ae){rt===se.HTTP_REQUEST&&(Le&&Le!==ae.type||C.push(ae))}},We}Ee.__dashjs_factory_name="HttpListHandler";var mt=p.default.getClassFactory(Ee);function He(){let j,We,st;return j={initialize:function(Te,Le){We=Te,st=Le},reset:function(){st=null,We=void 0},handleNewMetric:function(Te,Le){Te===We&&st&&st.report(We,Le)}},j}He.__dashjs_factory_name="GenericMetricHandler";var Pe=p.default.getClassFactory(He);function Ke(j){let We;const st=(j=j||{}).debug?j.debug.getLogger(We):{};let Te=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/;const Le=this.context;let i={BufferLevel:xe,DVBErrors:gt,HttpList:mt,PlayList:Pe,RepSwitchList:Pe,TcpList:Pe};return We={create:function(l,C){var ne,se=l.match(Te);if(se){try{(ne=i[se[1]](Le).create({eventBus:j.eventBus,metricsConstants:j.metricsConstants}
22)).initialize(se[1],C,se[3],se[5])}catch(Oe){ne=null,st.error(`MetricsHandlerFactory: Could not create handler for type ${se[1]} with args ${se[3]}, ${se[5]} (${Oe.message})`)}return ne}},register:function(l,C){i[l]=C},unregister:function(l){delete i[l]}},We}Ke.__dashjs_factory_name="MetricsHandlerFactory";var Et=p.default.getSingletonFactory(Ke);function Pt(j){j=j||{};let We,st=[];const Te=this.context,Le=j.eventBus,i=j.events;let l=Et(Te).getInstance({debug:j.debug,eventBus:j.eventBus,metricsConstants:j.metricsConstants});function C(ne){st.forEach((se=>{se.handleNewMetric(ne.metric,ne.value,ne.mediaType)}))}return We={initialize:function(ne,se){ne.split(",").forEach(((Oe,rt,ae)=>{let ze;if(Oe.indexOf("(")!==-1&&Oe.indexOf(")")===-1){let qe=ae[rt+1];qe&&qe.indexOf("(")===-1&&qe.indexOf(")")!==-1&&(Oe+=","+qe,delete ae[rt+1])}ze=l.create(Oe,se),ze&&st.push(ze)})),Le.on(i.METRIC_ADDED,C,We),Le.on(i.METRIC_UPDATED,C,We)},reset:function(){Le.off(i.METRIC_ADDED,C,We),Le.off(i.METRIC_UPDATED,C,We),st.forEach((ne=>ne.reset())),st=[]}},We}Pt.__dashjs_factory_name="MetricsHandlersController";var xt=p.default.getClassFactory(Pt);function Lt(j){let We,st,Te,Le;j=j||{};let i=this.context;function l(){We&&We.reset(),st&&st.reset(),Te&&Te.reset()}return Le={initialize:function(C){try{Te=m(i).create({mediaElement:j.mediaElement}),Te.initialize(C.Range),st=Q(i).create({debug:j.debug,metricsConstants:j.metricsConstants,mediaPlayerModel:j.mediaPlayerModel}),st.initialize(C.Reporting,Te),We=xt(i).create({debug:j.debug,eventBus:j.eventBus,metricsConstants:j.metricsConstants,events:j.events}),We.initialize(C.metrics,st)}catch(ne){throw l(),ne}},reset:l},Le}Lt.__dashjs_factory_name="MetricsController";var sn=p.default.getClassFactory(Lt),nn=class{constructor(){this.metrics="",this.Range=[],this.Reporting=[]}},Sn=class{constructor(){this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},ve=class{constructor(){this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}};function Ie(j){let We,st=(j=j||{}).adapter;const Te=j.constants;return We={getMetrics:function(Le){let i=[];return Le&&Le.Metrics&&Le.Metrics.forEach((l=>{var C=new nn,ne=st.getIsDynamic(Le);l.hasOwnProperty("metrics")&&(C.metrics=l.metrics,l.Range&&l.Range.forEach((se=>{var Oe=new Sn;Oe.starttime=(function(rt,ae,ze){let qe,V,he=0;return ae?he=st.getAvailabilityStartTime(rt)/1e3:(qe=st.getRegularPeriods(rt),qe.length&&(he=qe[0].start)),V=he,ze&&ze.hasOwnProperty(Te.START_TIME)&&(V+=ze.starttime),V})(Le,ne,se),se.hasOwnProperty("duration")?Oe.duration=se.duration:Oe.duration=st.getDuration(Le),Oe._useWallClockTime=ne,C.Range.push(Oe)})),l.Reporting&&(l.Reporting.forEach((se=>{var Oe=new ve;se.hasOwnProperty(Te.SCHEME_ID_URI)&&(Oe.schemeIdUri=se.schemeIdUri,se.hasOwnProperty("value")&&(Oe.value=se.value),se.hasOwnProperty(Te.DVB_REPORTING_URL)&&(Oe.dvbReportingUrl=se[Te.DVB_REPORTING_URL]),se.hasOwnProperty(Te.DVB_PROBABILITY)&&(Oe.dvbProbability=se[Te.DVB_PROBABILITY]),C.Reporting.push(Oe))})),i.push(C)))})),i}},We}Ie.__dashjs_factory_name="ManifestParsing";var pt=p.default.getSingletonFactory(Ie);function _t(j){let We;j=j||{};let st={},Te=this.context,Le=j.eventBus;const i=j.events;function l(ne){if(ne.error)return;let se=Object.keys(st);pt(Te).getInstance({adapter:j.adapter,constants:j.constants}).getMetrics(ne.manifest).forEach((Oe=>{const rt=JSON.stringify(Oe);if(st.hasOwnProperty(rt))se.splice(rt,1);else try{let ae=sn(Te).create(j);ae.initialize(Oe),st[rt]=ae}catch{}})),se.forEach((Oe=>{st[Oe].reset(),delete st[Oe]})),Le.trigger(o.default.METRICS_INITIALISATION_COMPLETE)}function C(){Object.keys(st).forEach((ne=>{st[ne].reset()})),st={}}return We={reset:function(){Le.off(i.MANIFEST_UPDATED,l,We),Le.off(i.STREAM_TEARDOWN_COMPLETE,C,We)}},Le.on(i.MANIFEST_UPDATED,l,We),Le.on(i.STREAM_TEARDOWN_COMPLETE,C,We),We}_t.__dashjs_factory_name="MetricsCollectionController";var Ye=p.default.getClassFactory(_t);function Y(){let j,We,st=this.context;return j={createMetricsReporting:function(Te){return We=y(st).getInstance({eventBus:Te.eventBus,dashMetrics:Te.dashMetrics,metricsConstants:Te.metricsConstants,events:Te.events}),We.initialize(),Ye(st).create(Te)}
22,getReportingFactory:function(){return ot(st).getInstance()},getMetricsHandlerFactory:function(){return Et(st).getInstance()}},j}Y.__dashjs_factory_name="MetricsReporting";const k=p.default.getClassFactory(Y);k.events=o.default,p.default.updateClassFactory(Y.__dashjs_factory_name,k);var De=k},913:function(vt,pe,P){P.r(pe);var L=P(7252);class d extends L.default{constructor(){super(),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",this.CMCD_DATA_GENERATED="cmcdDataGenerated"}}let o=new d;pe.default=o},8898:function(vt,pe,P){P.r(pe);var L=P(8735),d=P(7568),o=P(1191),p=P(7263),T=P(5212),y=P(138),w=P(9302),h=P(6882);const m={[d.HTTPRequest.INIT_SEGMENT_TYPE]:"segment",[d.HTTPRequest.MEDIA_SEGMENT_TYPE]:"segment",[d.HTTPRequest.XLINK_EXPANSION_TYPE]:"xlink",[d.HTTPRequest.MPD_TYPE]:"mpd",[d.HTTPRequest.CONTENT_STEERING_TYPE]:"steering",[d.HTTPRequest.OTHER_TYPE]:"other"};function r(){let H,G,ue,ge,Ne,fe,Me,Fe,ot,ke,Q,X,Se,Ae,xe,gt,Ee={},mt={},He=this.context;function Pe(){Me=(0,h.default)(He).getInstance(),We()}function Ke(l){return l!=null&&!isNaN(l)&&isFinite(l)}function Et(l,C){const ne=[];return Ke(l)&&ne.push((0,L.toCmcdValue)(l,{v:!0})),Ke(C)&&ne.push((0,L.toCmcdValue)(C,{a:!0})),ne.length>0?ne:null}function Pt(l,C){xt(C);const ne=j(C),se=(function(Ze){try{return parseInt(Ze.bandwidth/1e3)}catch{return null}})(l),Oe=(function(Ze){try{return isNaN(Ze.duration)?NaN:Math.round(1e3*Ze.duration)}catch{return null}})(l),rt=_t(C),ae=(function(Ze){try{const ht=ge?ge.getPlaybackRate():1,fn=G.getCurrentBufferLevel(Ze);return isNaN(ht)||isNaN(fn)?null:100*parseInt(fn/ht*10)}catch{return null}})(C),ze=Y(C),qe=sn(l.representation?.mediaInfo),V=pt(C),he=nn(C),tt=(function(Ze){if(Ae&&Ae.length!==0){for(let ht of Ae)if(ht.getType()===Ze)return ht.probeNextRequest()}})(C);let it;C===T.default.VIDEO&&(it=L.CmcdObjectType.VIDEO),C===T.default.AUDIO&&(it=L.CmcdObjectType.AUDIO),l.mediaType===T.default.ENHANCEMENT&&(it=L.CmcdObjectType.OTHER),C===T.default.TEXT&&(it=l.representation.mediaInfo.mimeType==="application/mp4"?L.CmcdObjectType.TIMED_TEXT:L.CmcdObjectType.CAPTION);const yt=Me.has("rtp")?Me.get("rtp"):(function(Ze){try{let ht=ge.getPlaybackRate();ht||(ht=1);let{bandwidth:fn,mediaType:Nn,representation:Vt,duration:En}=Ze;if(!Vt.mediaInfo)return NaN;let un=Y(Nn);un===0&&(un=500);let nr=fn*En/1e3/(un/ht/1e3);const wn=Me.get("rtpSafetyFactor",{defaultValue:5});return 100*(parseInt(nr*wn/100)+1)}catch{return NaN}})(l);if(isNaN(yt)||(ne.rtp=yt),tt&&l.url!==tt.url){const Ze=p.default.getRelativeUrl(l.url,tt.url),ht=tt.range?{r:tt.range}:void 0;ne.nor=[(0,L.toCmcdValue)(Ze,ht)]}if(se){const Ze=C===T.default.VIDEO?se:null,ht=C===T.default.AUDIO?se:null;ne.br=Et(Ze,ht)||[(0,L.toCmcdValue)(se,{})]}if(it&&(ne.ot=it),isNaN(Oe)||(ne.d=Oe),!isNaN(rt)){const Ze=C===T.default.VIDEO?rt:null,ht=C===T.default.AUDIO?rt:null;ne.mtp=Et(Ze,ht)||[(0,L.toCmcdValue)(rt,{})]}if(isNaN(ae)||(ne.dl=ae),!isNaN(ze)){const Ze=C===T.default.VIDEO?ze:null,ht=C===T.default.AUDIO?ze:null;ne.bl=Et(Ze,ht)||[(0,L.toCmcdValue)(ze,{})]}if(!isNaN(qe)&&isFinite(qe)){const Ze=C===T.default.VIDEO?qe:null,ht=C===T.default.AUDIO?qe:null;ne.tb=Et(Ze,ht)||[(0,L.toCmcdValue)(qe,{})]}if(V!==null&&!isNaN(V)){const Ze=C===T.default.VIDEO?V:null,ht=C===T.default.AUDIO?V:null;ne.tpb=Et(Ze,ht)||[(0,L.toCmcdValue)(V,{})]}if(he!==null&&!isNaN(he)){const Ze=C===T.default.VIDEO?he:null,ht=C===T.default.AUDIO?he:null;ne.pb=Et(Ze,ht)||[(0,L.toCmcdValue)(he,{})]}if(ke[C]&&(ne.bs=!0,ke[C]=!1),mt[C]){const Ze=C===T.default.VIDEO?mt[C]:null,ht=C===T.default.AUDIO?mt[C]:null;ne.bsd=Et(Ze,ht)||[(0,L.toCmcdValue)(mt[C],{})],delete mt[C]}return!ot[C]&&Q[C]||(ne.su=!0,ot[C]=!1,Q[C]=!0),Object.assign(ne,i()),ne}function xt(l){Q.hasOwnProperty(l)||(Q[l]=!1),ot.hasOwnProperty(l)||(ot[l]=!1),ke.hasOwnProperty(l)||(ke[l]=!1)}function Lt(){const l={},C=ge.getStreamController()?.getActiveStream();if(!C)return l;const ne=C.getCurrentRepresentationForType(T.default.VIDEO),se=C.getCurrentRepresentationForType(T.default.AUDIO),Oe=Et(ne?Math.round(ne.bitrateInKbit):null,se?Math.round(se.bitrateInKbit):null);return Oe&&(l.br=Oe),l}
22function sn(l){try{const C=Ne.getPossibleVoRepresentationsFilteredBySettings(l).map((ne=>ne.bitrateInKbit));return Math.max(...C)}catch{return null}}function nn(l){try{if(!Ae||Ae.length===0)return null;const C=Ae.find((se=>se.getType()===l)),ne=C?.getRepresentationController()?.getCurrentRepresentation()?.bitrateInKbit;return ne===void 0||isNaN(ne)?null:Math.round(ne)}catch{return null}}function Sn(){const l={},C=Et(nn(T.default.VIDEO),nn(T.default.AUDIO));return C&&(l.pb=C),l}function ve(l){if(!Ae||Ae.length===0)return null;const C=Ae.find((se=>se.getType()===l));if(!C)return null;const ne=sn(C.getMediaInfo());return isFinite(ne)&&ne>0?ne:null}function Ie(){const l={},C=Et(ve(T.default.VIDEO),ve(T.default.AUDIO));C&&(l.tb=C);const ne=Et(pt(T.default.VIDEO),pt(T.default.AUDIO));return ne&&(l.tpb=ne),l}function pt(l){try{if(!Ae||Ae.length===0)return null;const C=Ae.find((ne=>ne.getType()===l));if(C){const ne=sn(C.getMediaInfo());return isFinite(ne)&&ne>0?ne:null}return null}catch{return null}}function _t(l){try{return 100*parseInt(fe.getSafeAverageThroughput(l)/100)}catch{return null}}function Ye(){const l={},C=Et(_t(T.default.VIDEO),_t(T.default.AUDIO));return C&&(l.mtp=C),l}function Y(l){try{const C=G.getCurrentBufferLevel(l);return isNaN(C)?null:100*parseInt(10*C)}catch{return null}}function k(){const l={},C=Et(Y(T.default.VIDEO),Y(T.default.AUDIO));return C&&(l.bl=C),l}function De(l){Ee[l]!=null&&(mt[l]=Date.now()-Ee[l],delete Ee[l])}function j(l){const C={};let ne=1e3*ge.getCurrentLiveLatency();if(isNaN(ne)||(C.ltc=ne),typeof document<"u"&&document.hidden&&(C.bg=!0),l&&(function(se){return se===T.default.VIDEO||se===T.default.AUDIO||se===T.default.OTHER})(l)){const se=G.getCurrentDroppedFrames()?.droppedFrames;se>0&&(C.df=se)}return C}function We(){ke={},ot={},Q={},Se=!1,Fe=void 0,X=void 0,Ee={},mt={},xe=void 0,gt=void 0,st()}function st(){if(!ge)return;const l=ge.getStreamController();if(!l||typeof l.getActiveStream!="function")return;const C=l.getActiveStream();C&&(Ae=C.getStreamProcessors())}function Te(){let l={};if(ue){const C=ue.getServiceDescriptionSettings();C.clientDataReporting&&C.clientDataReporting.cmcdParameters&&(l=C.clientDataReporting.cmcdParameters)}return l}function Le(l,C){const ne=C??Me.get("includeInRequests"),se=m[l];return se!==void 0&&ne.includes(se)}function i(){const l={},C=ge.getStreamController()?.getActiveStream();if(!C)return l;const ne=C.getCurrentRepresentationForType(T.default.VIDEO),se=C.getCurrentRepresentationForType(T.default.AUDIO),Oe=ne?ne.bitrateInKbit:0,rt=se?se.bitrateInKbit:0,ae=Et(Oe>0?Math.round(Oe):null,rt>0?Math.round(rt):null);ae&&(l.ab=ae);const ze=C.getRepresentationsByType(T.default.VIDEO)||[],qe=C.getRepresentationsByType(T.default.AUDIO)||[],V=ze.reduce(((ht,fn)=>Math.max(ht,fn.bitrateInKbit)),0),he=qe.reduce(((ht,fn)=>Math.max(ht,fn.bitrateInKbit)),0),tt=Et(V>0?Math.round(V):null,he>0?Math.round(he):null);tt&&(l.tab=tt);const it=ze.length>0?Math.min(...ze.map((ht=>ht.bitrateInKbit))):0,yt=qe.length>0?Math.min(...qe.map((ht=>ht.bitrateInKbit))):0,Ze=Et(it>0?Math.round(it):null,yt>0?Math.round(yt):null);return Ze&&(l.lab=Ze),l}return H={calculateMsd:function(){const l={},C=X?Date.now()-X:null;return C===null||isNaN(C)||(l.msd=C),l},deriveCmcdDataForRequest:function(l){try{l.type,(C=l.mediaType)!==T.default.VIDEO&&C!==T.default.AUDIO||Fe&&Fe!==T.default.AUDIO||(Fe=C);let ne={};if(Le(l.type)){if(l.type===d.HTTPRequest.MPD_TYPE)return(function(){const se=j();return se.ot=L.CmcdObjectType.MANIFEST,se})();if(l.type===d.HTTPRequest.MEDIA_SEGMENT_TYPE)return xt(l.mediaType),Pt(l,l.mediaType);if(l.type===d.HTTPRequest.INIT_SEGMENT_TYPE)return(function(){const se=j();return se.ot=L.CmcdObjectType.INIT,se.su=!0,se})();if(l.type===d.HTTPRequest.OTHER_TYPE||l.type===d.HTTPRequest.XLINK_EXPANSION_TYPE)return(function(){const se=j();return se.ot=L.CmcdObjectType.OTHER,se})();if(l.type===d.HTTPRequest.LICENSE)return(function(){const se=j();return se.ot=L.CmcdObjectType.KEY,se})();if(l.type===d.HTTPRequest.CONTENT_STEERING_TYPE)return(function(se){const Oe=Fe?Pt(se,Fe):j();return Oe.ot=L.CmcdObjectType.OTHER,Oe})(l)}return ne}catch{return null}var C},getCmcdParametersFromManifest:Te,getEventModeData:function(){return{...j(),...i(),...Lt(),...k(),...Ye(),...Sn(),...Ie()}},getLastMediaTypeRequest:function(){return Fe},isIncludedInRequestFilter:Le,onBufferLevelStateChanged:function(l){try{l.state&&l.mediaType&&l.state===o.default.BUFFER_EMPTY&&(ke[l.mediaType]||(ke[l.mediaType]=!0),ot[l.mediaType]||(ot[l.mediaType]=!0))}catch{}},onManifestLoaded:function(l){try{return xe=(0,w.default)(He).getInstance().getIsDynamic(l.data)?`${L.CmcdStreamType.LIVE}`:`${L.CmcdStreamType.VOD}`,gt=l.protocol&&l.protocol==="MSS"?`${L.CmcdStreamingFormat.SMOOTH}`:`${L.CmcdStreamingFormat.DASH}`,{st:xe,sf:gt}}catch{return{}}},onPeriodSwitchComplete:function(){st()},onPlaybackPlaying:function(){for(const l in Ee)Ee.hasOwnProperty(l)&&De(l)},onPlaybackRateChanged:function(l){return l.playbackRate!==void 0?{pr:l.playbackRate}:null},onPlaybackSeeked:function(){Se=!1;for(let l in ke)ke.hasOwnProperty(l)&&(ke[l]=!0);for(let l in ot)ot.hasOwnProperty(l)&&(ot[l]=!0)},onPlaybackSeeking:function(){Se=!0},onPlaybackStarted:function(){X||(X=Date.now())},onRebufferingCompleted:De,onRebufferingStarted:function(l){l&&!Ee[l]&&(Ee[l]=Date.now())},reset:function(){We()},resetInitialSettings:We,setConfig:function(l){l&&(l.abrController&&(Ne=l.abrController),l.dashMetrics&&(G=l.dashMetrics),l.playbackController&&(ge=l.playbackController),l.throughputController&&(fe=l.throughputController),l.serviceDescriptionController&&(ue=l.serviceDescriptionController))}
22,setup:Pe,updateCmcdManifestParamsInCmcdConfigAccessor:function(){const l=Te();Me&&Object.keys(l).length>0?Me.setManifestParams(l):Me&&Me.setManifestParams(null)},wasPlaying:function(){return!Se&&X}},Pe(),H}r.__dashjs_factory_name="CmcdModel",pe.default=y.default.getSingletonFactory(r)},6066:function(vt,pe,P){P.r(pe);var L=P(138),d=P(8850),o=P(3621),p=P(649),T=P(1103);const y=T.CMSD_STATIC.toLowerCase(),w=T.CMSD_DYNAMIC.toLowerCase(),h=["mb","st","sf","v"],m="stream",r={video:T.CmsdObjectType.VIDEO,audio:T.CmsdObjectType.AUDIO,text:T.CmsdObjectType.TIMED_TEXT,stream:m};function H(){const G=this.context,ue=(0,d.default)(G).getInstance();let ge,Ne,fe,Me;function Fe(){fe={},Me={}}function ot(Ae){Ae&&Object.keys(Ae).forEach((xe=>{h.includes(xe)||delete Ae[xe]}))}function ke(Ae){try{return(0,T.decodeCmsdStatic)(Ae)}catch(xe){Ne.error("Failed to parse CMSD-Static response header value:",xe)}}function Q(Ae){try{const xe=(0,T.decodeCmsdDynamic)(Ae);return xe[xe.length-1]?.params||{}}catch(xe){return Ne.error("Failed to parse CMSD-Dynamic response header value:",xe),{}}}function X(Ae){return r[Ae]||T.CmsdObjectType.OTHER}function Se(Ae,xe,gt){const Ee=Ae===T.CMSD_STATIC?fe:Me,mt=Ee[xe]||{},He=Ee[m]||{};return mt[gt]||He[gt]}return ge={setConfig:function(){},initialize:function(){},reset:function(){Fe()},parseResponseHeaders:function(Ae,xe){let gt=null,Ee=null;for(const He in Ae){const Pe=Ae[He];switch(He){case y:gt=ke(Pe),ue.trigger(o.default.CMSD_STATIC_HEADER,gt);break;case w:Ee||(Ee=Q(Pe))}}let mt=m;return gt&>.ot?mt=gt.ot:xe&&(mt=X(xe)),ot(fe[mt]),ot(Me[mt]),gt&&(fe[mt]=Object.assign(fe[mt]||{},gt)),Ee&&(Me[mt]=Object.assign(Me[mt]||{},Ee)),{static:gt,dynamic:Ee}},getMaxBitrate:function(Ae){let xe=X(Ae);return Se(T.CMSD_DYNAMIC,xe,"mb")||-1},getEstimatedThroughput:function(Ae){let xe=X(Ae);return Se(T.CMSD_DYNAMIC,xe,"etp")||null},getResponseDelay:function(Ae){let xe=X(Ae);return Se(T.CMSD_DYNAMIC,xe,"rd")||null},getRoundTripTime:function(Ae){let xe=X(Ae);return Se(T.CMSD_DYNAMIC,xe,"rtt")||null}},Ne=(0,p.default)(G).getInstance().getLogger(ge),Fe(),ge}H.__dashjs_factory_name="CmsdModel",pe.default=L.default.getSingletonFactory(H)},1926:function(vt,pe,P){P.r(pe);var L=P(5717),d=P(138),o=P(8261),p=P(656),T=P(5212),y=P(1234),w=P(5560);function h(){let m,r,H,G,ue,ge,Ne,fe,Me,Fe,ot,ke,Q,X;const Se=this.context,Ae=(0,o.default)(Se).getInstance();function xe(){ge=[],Me=[],Ne=[],fe=[],Fe=[],Q=[],ot=null,r=[],G=X.getCmcdRequestInterceptors(),ue=X.getCmcdResponseReceivedInterceptors(),ke=new Set}function gt(Ke,Et){let Pt=-1;Ke.some(((xt,Lt)=>{if(xt===Et)return Pt=Lt,!0})),Pt<0||Ke.splice(Pt,1)}function Ee(Ke){let Et;for(Et=0;Et<Q.length;Et++)if(Q[Et].rulename===Ke)return Et;return-1}function mt(Ke,Et){let Pt=!1;return ke.forEach((xt=>{xt[Ke]===Et&&(Pt=!0)})),Pt}function He(Ke,Et){Pe(Ke,Et);let Pt=new L.default;Pt.schemeIdUri=Ke,Pt.value=Et,r.push(Pt)}function Pe(Ke,Et){(0,p.checkParameterType)(Ke,"string"),(0,p.checkParameterType)(Et,"string"),r.forEach((function(Pt,xt){Pt.schemeIdUri===Ke&&Pt.value===Et&&r.splice(xt,1)}))}return m={addAbrCustomRule:function(Ke,Et,Pt){if(typeof Ke!="string"||Ke!==T.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&Ke!==T.default.RULES_TYPES.QUALITY_SWITCH_RULES||typeof Et!="string")throw T.default.BAD_ARGUMENT_ERROR;let xt=Ee(Et);xt===-1?Q.push({type:Ke,rulename:Et,rule:Pt}):(Q[xt].type=Ke,Q[xt].rule=Pt)},addExternalSubtitle:function(Ke){if(!(Ke&&Ke.id!==void 0&&Ke.url&&Ke.language&&Ke.mimeType&&Ke.bandwidth!==void 0))return;const Et=new w.default(Ke);mt("url",Et.url)||mt("id",Et.id)||ke.add(Et)},addRequestInterceptor:function(Ke){G.push(Ke)},addResponseInterceptor:function(Ke){ue.push(Ke)},addUTCTimingSource:He,clearDefaultUTCTimingSources:function(){r=[]},getAbrCustomRules:function(){return Q},getCertificateRequestFilters:function(){return Ne},getCertificateResponseFilters:function(){return fe},getCustomCapabilitiesFilters:function(){return Fe},getCustomInitialTrackSelectionFunction:function(){return ot},getExternalSubtitles:function(){return ke},getLicenseRequestFilters:function(){return ge},getLicenseResponseFilters:function(){return Me},getRequestInterceptors:function(){return G},getResponseInterceptors:function(){return ue},getUTCTimingSources:function(){return r},getXHRWithCredentialsForType:function(Ke){const Et=H[Ke];return Et===void 0?H.default:Et},registerCertificateRequestFilter:function(Ke){Ne.push(Ke)},registerCertificateResponseFilter:function(Ke){fe.push(Ke)},registerCustomCapabilitiesFilter:function(Ke){Fe.push(Ke)},registerLicenseRequestFilter:function(Ke){ge.push(Ke)},registerLicenseResponseFilter:function(Ke){Me.push(Ke)},removeAbrCustomRule:function(Ke){if(Ke){let Et=Ee(Ke);Et!==-1&&Q.splice(Et,1)}else Q=[]},removeAllAbrCustomRule:function(){Q=[]},removeExternalSubtitleById:function(Ke){ke.forEach((Et=>{Et.id===Ke&&ke.delete(Et)}))},removeExternalSubtitleByUrl:function(Ke){ke.forEach((Et=>{Et.url===Ke&&ke.delete(Et)}))},removeRequestInterceptor:function(Ke){gt(G,Ke)},removeResponseInterceptor:function(Ke){gt(ue,Ke)},removeUTCTimingSource:Pe,reset:function(){xe()},resetCustomInitialTrackSelectionFunction:function(){ot=null},resetPlaybackSessionSpecificSettings:function(){ke=new Set},restoreDefaultUTCTimingSources:function(){let Ke=Ae.get().streaming.utcSynchronization.defaultTimingSource;He(Ke.scheme,Ke.value)},setConfig:function(){},setCustomInitialTrackSelectionFunction:function(Ke){ot=Ke},setXHRWithCredentialsForType:function Ke(Et,Pt){Et?H[Et]=!!Pt:Object.keys(H).forEac
22h((xt=>{Ke(xt,Pt)}))},unregisterCertificateRequestFilter:function(Ke){gt(Ne,Ke)},unregisterCertificateResponseFilter:function(Ke){gt(fe,Ke)},unregisterCustomCapabilitiesFilter:function(Ke){gt(Fe,Ke)},unregisterLicenseRequestFilter:function(Ke){gt(ge,Ke)},unregisterLicenseResponseFilter:function(Ke){gt(Me,Ke)}},H={default:!1},X=(0,y.default)(Se).getInstance(),xe(),m}h.__dashjs_factory_name="CustomParametersModel",pe.default=d.default.getSingletonFactory(h)},1244:function(vt,pe,P){P.r(pe);var L=P(138),d=P(8261),o=P(5212),p=P(649);function T(){const w=this.context,h=(0,d.default)(w).getInstance();let m,r,H;function G(Fe,ot,ke){Fe.customData.reader.read().then(ke).catch((function(){ue(Fe)}))}function ue(Fe){Fe.customData.onloadend&&Fe.customData.onloadend()}function ge(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Ne(){if(this.customData.abortController)this.customData.abortController.abort();else if(this.customData.reader)try{this.customData.reader.cancel(),this.onabort()}catch{}}function fe(Fe,ot){try{if((Fe=Fe.filter((ke=>ke.bytes>ot/4/Fe.length))).length>1){let ke=0;const Q=(Fe[Fe.length-1].timestamp-Fe[0].timestamp)/Fe.length;return Fe.forEach(((X,Se)=>{const Ae=Fe[Se+1];if(Ae){const xe=Ae.timestamp-X.timestamp;ke+=xe<Q?xe:0}})),ke}return null}catch{return null}}function Me(Fe,ot){return 8*Fe/ot}return H=(0,p.default)(w).getInstance().getLogger(m),m={abort:Ne,calculateDownloadedTime:fe,load:function(Fe,ot){const ke=(function(Se){const Ae=new Headers;if(Se.headers)for(let xe in Se.headers){let gt=Se.headers[xe];gt&&Ae.append(xe,gt)}return Ae})(Fe),Q=(function(Se){let Ae;return typeof window.AbortController=="function"&&(Ae=new AbortController,Se.customData.abortController=Ae,Ae.signal.onabort=Se.customData.onabort),Se.customData.abort=Ne.bind(Se),Ae})(Fe),X=(function(Se,Ae,xe){return new Request(Se.url,{method:Se.method,headers:Ae,credentials:Se.credentials,signal:xe?xe.signal:void 0})})(Fe,ke,Q);fetch(X).then((Se=>{(function(Ae,xe,gt){(function(nn,Sn){nn.status=Sn.status,nn.statusText=Sn.statusText,nn.url=Sn.url;const ve={};for(const Ie of Sn.headers.keys())ve[Ie]=Sn.headers.get(Ie);nn.headers=ve})(gt,Ae);let Ee=0,mt=!1,He=new Uint8Array,Pe=0;xe.customData.reader=Ae.body.getReader();let Ke=[],Et=[],Pt=[],xt=!0;const Lt=h.get().streaming.abr.throughput.lowLatencyDownloadTimeCalculationMode,sn=({value:nn,done:Sn})=>{Sn?(function(){if(He){const ve=(function(){let Ie=null;return Lt===o.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING?Ie=(function(){const pt=(function(_t,Ye){try{let Y,k;if(Y=_t.slice(0,-1),k=Ye.slice(0,-1),Y.length!==k.length&&H.warn(`[FetchLoader] Moof and Mdat data arrays have different lengths. Moof: ${Y.length}, Mdat: ${k.length}`),Y.length<=1)return null;let De=[],j=0,We=0;for(let st=0;st<Y.length;st++)if(Y[st]&&k[st]){let Te=k[st].timestamp-Y[st].timestamp;if(Te>1){const Le=Me(k[st].bytes,Te);De.push(Le),We=0}else{We===0&&(We=Y[st].timestamp,j=0);let Le=k[st].timestamp-We;if(Le>1){j+=k[st].bytes;const i=Me(j,Le);De.push(i),We=0}else j+=k[st].bytes}}return De.length>0?De.reduce(((st,Te)=>st+Te),0)/De.length:null}catch{return null}})(Et,Pt);return pt?8*Ee/pt:null})():Lt===o.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.DOWNLOADED_DATA&&(Ie=fe(Ke,Ee)),Ie})();xe.customData.onprogress({loaded:Ee,total:Ee,lengthComputable:!0,time:ve}),gt.data=He.buffer}xe.customData.onloadend()})():(nn&&nn.length>0&&(function(ve){He=(function(pt,_t){if(pt.length===0)return _t;const Ye=new Uint8Array(pt.length+_t.length);return Ye.set(pt),Ye.set(_t,pt.length),Ye})(He,ve),Ee+=ve.length,Ke.push({timestamp:ge(),bytes:ve.length}),Lt===o.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING&&xt&&r.findLastTopIsoBoxCompleted(["moof"],He,Pe).found&&(xt=!1,Et.push({timestamp:ge()}));const Ie=r.findLastTopIsoBoxCompleted(["moov","mdat"],He,Pe);Ie.found?(function(pt){const _t=(function(Ye){let Y;return Ye===He.length?(Y=He,He=new Uint8Array):(Y=new Uint8Array(He.subarray(0,Ye)),He=He.subarray(Ye)),Y})(pt.startOffsetOfLastFoundTargetBox+pt.sizeOfLastFoundTargetBox);Lt!==o.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING||xt||(xt=!0,Pt.push({timestamp:ge(),bytes:_t.length})),xe.customData.onprogress({data:_t.buffer,lengthComputable:!1,noTrace:!0}),Pe=0})(Ie):(function(pt){Pe=pt.startOffsetOfLastCompletedBox+pt.sizeOfLastCompletedBox,mt||(xe.customData.onprogress({lengthComputable:!1,noTrace:!0}),mt=!0)})(Ie)})(nn),G(xe,0,sn))};
22G(xe,0,sn)})(Se,Fe,ot)})).catch((()=>{ue(Fe)}))},reset:function(){},setConfig:function(Fe){r=Fe.boxParser}},m}T.__dashjs_factory_name="FetchLoader";const y=L.default.getClassFactory(T);pe.default=y},868:function(vt,pe,P){P.r(pe);var L=P(9838),d=P(1244),o=P(7568),p=P(138),T=P(1944),y=P(6066),w=P(7263),h=P(649),m=P(8850),r=P(3621),H=P(8261),G=P(5212),ue=P(1926),ge=P(2473),Ne=P(5313),fe=P(447),Me=P(5099);function Fe(ke){ke=ke||{};const Q=this.context,X=ke.errHandler,Se=ke.dashMetrics,Ae=ke.mediaPlayerModel,xe=ke.boxParser,gt=ke.errors,Ee=(0,m.default)(Q).getInstance(),mt=(0,H.default)(Q).getInstance();let He,Pe,Ke,Et,Pt,xt,Lt,sn,nn,Sn,ve,Ie;function pt(_t,Ye){const Y=function(){We()},k=function(Ze){const ht=new Date;ne&&(ne=!1,(!Ze.lengthComputable||Ze.lengthComputable&&Ze.total!==Ze.loaded)&&(l.firstByteDate=ht,qe.resourceTiming.responseStart=ht.getTime())),Ze.lengthComputable&&(l.bytesLoaded=qe.length=Ze.loaded,l.bytesTotal=qe.resourceTiming.encodedBodySize=Ze.total,qe.length=Ze.total,qe.resourceTiming.encodedBodySize=Ze.loaded),Ze.noTrace||(C.push({s:Oe,d:Ze.time?Ze.time:ht.getTime()-Oe.getTime(),b:[Ze.loaded?Ze.loaded-rt:0],t:Ze.throughput}),l.traces=C,Oe=ht,rt=Ze.loaded),ae&&(clearTimeout(ae),ae=null),mt.get().streaming.fragmentRequestProgressTimeout>0&&(ae=setTimeout((function(){Ie.warn("Abort request "+ze.url+" due to progress timeout"),he.abort(ze),Y()}),mt.get().streaming.fragmentRequestProgressTimeout)),_t.progress&&Ze&&_t.progress(Ze)},De=function(){We(!0)},j=function(Ze){let ht;if(Ze.lengthComputable){let fn=Ze.loaded/Ze.total*100;ht="Request timeout: loaded: "+Ze.loaded+", out of: "+Ze.total+" : "+fn.toFixed(3)+"% Completed"}else ht="Request timeout: non-computable download size";Ie.warn(ht)},We=function(Ze=!1){Pe.indexOf(ze)!==-1&&Pe.splice(Pe.indexOf(ze),1),ae&&(clearTimeout(ae),ae=null),Sn.processResponseHeaders(qe),st(),Te(),(function(ht){const fn=nn.getResponseInterceptors();return fn?fn.reduce(((Nn,Vt)=>Nn.then((En=>Vt(En)))),Promise.resolve(ht)):Promise.resolve(ht)})(qe).then((ht=>{if(qe=ht,(function(Nn,Vt,En){const un=Nn.customData.request,nr=mt.get().streaming.cmsd&&mt.get().streaming.cmsd.enabled?xt.parseResponseHeaders(Vt.headers,un.mediaType):null;Se.addHttpRequest(un,Vt.url,Vt.status,Vt.headers,En,nr)})(ze,qe,C),Ze)return void(_t.abort&&_t.abort(l));l.type===o.HTTPRequest.MPD_TYPE&&(Se.addManifestUpdate(l),Ee.trigger(r.default.MANIFEST_LOADING_FINISHED,{requestObject:l}));const fn=!!qe.data||l.method===o.HTTPRequest.POST;if(qe.status>=200&&qe.status<=299&&fn)_t.success&&_t.success(qe.data,qe.statusText,qe.url),_t.complete&&_t.complete(l,qe.statusText);else{try{qe.status===404&&mt.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&l.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE&&Ae.getRetryAttemptsForType(o.HTTPRequest.MEDIA_SEGMENT_TYPE)===Ye&&Ee.trigger(r.default.ATTEMPT_BACKGROUND_SYNC)}catch{}i()}}))},st=function(){l.startDate=se,l.endDate=new Date,l.firstByteDate=l.firstByteDate||se},Te=function(){qe.resourceTiming.responseEnd=performance.now(),qe.resourceTiming.duration=qe.resourceTiming.responseEnd-qe.resourceTiming.startTime,(function(Ze,ht){if(!mt.get().streaming.abr.throughput.useResourceTimingApi||t
22ypeof performance>"u"||Ze.range)return;const fn=performance.getEntriesByType?.("resource");if(fn===void 0||fn.length<=0)return;let Nn=0,Vt=null;for(;Nn<fn.length;){if(fn[Nn].name===Ze.url){Vt=fn[Nn];break}Nn+=1}(function(En){return En&&!isNaN(En.responseStart)&&En.responseStart>0&&!isNaN(En.responseEnd)&&En.responseEnd>0&&!isNaN(En.transferSize)&&En.transferSize>0})(Vt)&&(Ze.customData.request.resourceTimingValues=Vt,ht.resourceTiming.startTime=Vt.startTime,ht.resourceTiming.encodedBodySize=Vt.encodedBodySize,ht.resourceTiming.responseStart=Vt.responseStart,ht.resourceTiming.responseEnd=Vt.responseEnd,ht.resourceTiming.duration=Vt.duration)})(ze,qe)},Le=function(Ze,ht,fn){return new Promise((Nn=>{(function(Vt){const En=nn.getRequestInterceptors();return En?En.reduce(((un,nr)=>un.then((wn=>nr(wn)))),Promise.resolve(Vt)):Promise.resolve(Vt)})(ht).then((Vt=>{ht=Vt,fn.request=ht,ht.customData.onloadend=Y,ht.customData.onprogress=k,ht.customData.onabort=De,ht.customData.ontimeout=j,fn.resourceTiming.startTime=performance.now(),Ze.load(ht,fn),Nn()}))}))},i=function(){if(Ye>0){Ye--,_t&&_t.request&&(_t.request.retryAttempts+=1);let Ze={config:_t};Et.push(Ze),Ze.timeout=setTimeout((function(){Et.indexOf(Ze)!==-1&&(Et.splice(Et.indexOf(Ze),1),pt(_t,Ye))}),Ae.getRetryIntervalsForType(l.type))}else{if(l.type===o.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;X.error(new T.default(Pt[l.type],l.url+" is not available",{request:l,response:qe})),_t.error&&_t.error(l,"error",qe.statusText,qe),_t.complete&&_t.complete(l,qe.statusText)}},l=_t.request,C=[];let ne,se,Oe,rt,ae,ze,qe;if(l.bytesLoaded=NaN,l.bytesTotal=NaN,l.firstByteDate=null,l.traces=[],ne=!0,se=new Date,Oe=se,rt=0,ae=null,!Se||!X)throw new Error("config object is not correct or missing");const V=(function(Ze){let ht,fn;return!Ze.isPartialSegmentRequest&&Ze.hasOwnProperty("availabilityTimeComplete")&&Ze.availabilityTimeComplete===!1&&window.fetch&&Ze.responseType==="arraybuffer"&&Ze.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE?(sn||(sn=(0,d.default)(Q).create(),sn.setConfig({dashMetrics:Se,boxParser:xe})),ht=sn,fn=G.default.FILE_LOADER_TYPES.FETCH):(Lt||(Lt=(0,L.default)(Q).create()),ht=Lt,fn=G.default.FILE_LOADER_TYPES.XHR),{loader:ht,fileLoaderType:fn}})(l),he=V.loader;var tt;l.fileLoaderType=V.fileLoaderType,l.headers=l.headers||{},(tt=l).retryAttempts===0&&(function(Ze){let ht=ve.getFinalQueryString(Ze);ht&&(Ze.url=w.default.addAdditionalQueryParameterToUrl(Ze.url,ht))})(tt),(function(Ze){if(Ze.queryParams){const ht=[];for(const fn in Ze.queryParams)ht.push({key:fn,value:Ze.queryParams[fn]});Ze.url=w.default.addAdditionalQueryParameterToUrl(Ze.url,ht)}})(tt),(function(Ze){const ht=Sn.getCommonAccessTokenForUrl(Ze.url);ht&&(Ze.headers[G.default.COMMON_ACCESS_TOKEN_HEADER]=ht)})(tt),l.range&&(l.headers.Range="bytes="+l.range);const it=nn.getXHRWithCredentialsForType(l.type);ze=new fe.default({url:l.url,method:l.method||o.HTTPRequest.GET,responseType:l.responseType,headers:l.headers,credentials:it?"include":"omit",timeout:(function(Ze){return Ze.type===o.HTTPRequest.MPD_TYPE?mt.get().streaming.manifestRequestTimeout||0:((ht=Ze)&&ht.type===o.HTTPRequest.INIT_SEGMENT_TYPE||ht.type===o.HTTPRequest.INDEX_SEGMENT_TYPE||ht.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE||ht.type===o.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE||ht.type===o.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)&&mt.get().streaming.fragmentRequestTimeout||0;var ht})(l),body:l.body,customData:{request:l}}),qe=new Me.default({request:ze,resourceTiming:{startTime:performance.now(),encodedBodySize:0},status:0});let yt=new Date().getTime();if(isNaN(l.delayLoadingTime)||yt>=l.delayLoadingTime)return Pe.push(ze),Le(he,ze,qe);{let Ze={httpRequest:ze,httpResponse:qe};return Ke.push(Ze),Ze.delayTimeout=setTimeout((function(){if(Ke.indexOf(Ze)!==-1){Ke.splice(Ke.indexOf(Ze),1);try{se=new Date,Oe=se,Pe.push(Ze.httpRequest),Le(he,Ze.httpRequest,Ze.httpResponse)}catch{Ze.httpRequest.onloadend()}}}),l.delayLoadingTime-yt),Promise.resolve()}}return He={abort:function(){Et.forEach((_t=>{clearTimeout(_t.timeout),_t.config.request&&_t.config.abort&&_t.config.abort(_t.config.request)})),Et=[],Ke.forEach((_t=>clearTimeout(_t.delayTimeout))),Ke=[],Pe.forEach((_t=>{const Ye=_t.customData;Ye&&(Ye.request&&Ye.request.type===o.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE||(Ye.onloadend=Ye.onprogress=void 0,Ye.abort&&Ye.abort()))})),Pe=[]},load:function(_t){return _t.request?pt(_t,Ae.getRetryAttemptsForType(_t.request.type)):(_t.error&&_t.error(_t.request,"error"),Promise.resolve())},reset:function(){Pe=[],Ke=[],Et=[],Lt&&Lt.reset(),sn&&sn.reset(),Lt=null,sn=null},resetInitialSettings:function(){Lt&&Lt.resetInitialSettings()},setConfig:function(_t){_t&&(_t.commonAccessTokenController&&(Sn=_t.commonAccessTokenController),_t.extUrlQueryInfoController&&(ve=_t.extUrlQueryInfoController))}},Ie=(0,h.default)(Q).getInstance().getLogger(He),Pe=[],Ke=[],Et=[],xt=(0,y.default)(Q).getInstance(),nn=(0,ue.default)(Q).getInstance(),Sn=(0,ge.default)(Q).getInstance(),ve=(0,Ne.default)(Q).getInstance(),Pt={[o.HTTPRequest.MPD_TYPE]:gt.DOWNLOAD_ERROR_ID_MANIFEST_CODE,[o.HTTPRequest.XLINK_EXPANSION_TYPE]:gt.DOWNLOAD_ERROR_ID_XLINK_CODE,[o.HTTPRequest.INIT_SEGMENT_TYPE]:gt.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE,[o.HTTPRequest.MEDIA_SEGMENT_TYPE]:gt.DOWNLOAD_ERROR_ID_CONTENT_CODE,[o.HTTPRequest.INDEX_SEGMENT_TYPE]:gt.DOWNLOAD_ERROR_ID_CONTENT_CODE,[o.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:gt.DOWNLOAD_ERROR_ID_CONTENT_CODE,[o.HTTPRequest.OTHER_TYPE]:gt.DOWNLOAD_ERROR_ID_CONTENT_CODE},He}Fe.__dashjs_factory_name="HTTPLoader";const ot=p.default.getClassFactory(Fe);pe.default=ot},1721:function(vt,pe,P){P.r(pe);var L=P(138),d=P(868);function o(){let T,y;function w(){y={}}function h(){w()}return h(),T={getLoader:function(m){for(var r in y)if(y.hasOwnProperty(r)&&m.startsWith(r))return y[r];return d.default},registerLoader:function(m,r){y[m]=r}
22,unregisterLoader:function(m){y[m]&&delete y[m]},unregisterAllLoader:w,reset:h},T}o.__dashjs_factory_name="SchemeLoaderFactory";const p=L.default.getSingletonFactory(o);pe.default=p},3773:function(vt,pe,P){P.r(pe);var L=P(138),d=P(1721);function o(T){T=T||{};const y=this.context;let w,h,m;return h=(0,d.default)(y).getInstance(),w={abort:function(){m&&m.abort()},load:function(r){m||(m=h.getLoader(r&&r.request?r.request.url:null)(y).create({errHandler:T.errHandler,mediaPlayerModel:T.mediaPlayerModel,dashMetrics:T.dashMetrics,boxParser:T.boxParser?T.boxParser:null,constants:T.constants?T.constants:null,dashConstants:T.dashConstants?T.dashConstants:null,urlUtils:T.urlUtils?T.urlUtils:null,errors:T.errors})),m.load(r)},reset:function(){h&&(h.reset(),h=null),m&&typeof m.reset=="function"&&m.reset(),m=null},resetInitialSettings:function(){m&&typeof m.resetInitialSettings=="function"&&m.resetInitialSettings()}},w}o.__dashjs_factory_name="URLLoader";const p=L.default.getClassFactory(o);pe.default=p},9838:function(vt,pe,P){P.r(pe);var L=P(138),d=P(7263);function o(){let T,y;function w(){y&&(y.onloadend=y.onerror=y.onprogress=y.onload=null,y.abort(),y.onabort=y.ontimeout=null,y=null)}return T={load:function(h,m){if(y=null,y=new XMLHttpRequest,y.open(h.method,h.url,!0),h.responseType&&(y.responseType=h.responseType),h.headers)for(let H in h.headers){let G=h.headers[H];G&&y.setRequestHeader(H,G)}y.withCredentials=h.credentials==="include",y.timeout=h.timeout,y.onload=function(){m.url=this.responseURL,m.status=this.status,m.statusText=this.statusText,m.headers=d.default.parseHttpHeaders(this.getAllResponseHeaders()),m.data=this.response},h.customData&&(y.onloadend=h.customData.onloadend,y.onprogress=h.customData.onprogress,y.onabort=h.customData.onabort,y.ontimeout=h.customData.ontimeout);let r=h.body||null;return y.send(r),h.customData.abort=w.bind(this),!0},abort:w,getXhr:function(){return y},reset:function(){w(),T=null},resetInitialSettings:function(){w()}},T}o.__dashjs_factory_name="XHRLoader";const p=L.default.getClassFactory(o);pe.default=p},7037:function(vt,pe,P){P.r(pe),P.d(pe,{default:function(){return wn}});var L=P(8854),d=P(2861);const o={prefixes:["clearkey","dashif","ck"]};class p{static findMp4ProtectionElement(Ot){let St=null;for(let de=0;de<Ot.length;++de){let Ht=Ot[de];Ht.schemeIdUri&&Ht.schemeIdUri.toLowerCase()===L.default.MP4_PROTECTION_SCHEME&&Ht.value&&(Ht.value.toLowerCase()===d.default.ENCRYPTION_SCHEME_CENC||Ht.value.toLowerCase()===d.default.ENCRYPTION_SCHEME_CBCS)&&(St=Ht)}return St}static getPSSHData(Ot){let St=8,de=new DataView(Ot),Ht=de.getUint8(St);return St+=20,Ht>0&&(St+=4+16*de.getUint32(St)),St+=4,Ot.slice(St)}static getPSSHForKeySystem(Ot,St){let de=p.parsePSSHList(St);return Ot&&de.hasOwnProperty(Ot.uuid.toLowerCase())?de[Ot.uuid.toLowerCase()]:null}static parseInitDataFromContentProtection(Ot,St){return"pssh"in Ot&&Ot.pssh?(Ot.pssh.__text=Ot.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),St.decodeArray(Ot.pssh.__text).buffer):null}static parsePSSHList(Ot){if(Ot==null)return[];let St=new DataView(Ot.buffer||Ot),de={},Ht=0;for(;;){let Wt,Jt,tn,Ft,ft,Qt,Fn=Ht;if(Ht>=St.buffer.byteLength)break;if(Wt=St.getUint32(Ht),Jt=Ht+Wt,Ht+=4,St.getUint32(Ht)===1886614376)if(Ht+=4,tn=St.getUint8(Ht),tn===0||tn===1){for(Ht++,Ht+=3,Ft="",ft=0;ft<4;ft++)Qt=St.getUint8(Ht+ft).toString(16),Ft+=Qt.length===1?"0"+Qt:Qt;for(Ht+=4,Ft+="-",ft=0;ft<2;ft++)Qt=St.getUint8(Ht+ft).toString(16),Ft+=Qt.length===1?"0"+Qt:Qt;for(Ht+=2,Ft+="-",ft=0;ft<2;ft++)Qt=St.getUint8(Ht+ft).toString(16),Ft+=Qt.length===1?"0"+Qt:Qt;for(Ht+=2,Ft+="-",ft=0;ft<2;ft++)Qt=St.getUint8(Ht+ft).toString(16),Ft+=Qt.length===1?"0"+Qt:Qt;for(Ht+=2,Ft+="-",ft=0;ft<6;ft++)Qt=St.getUint8(Ht+ft).toString(16),Ft+=Qt.length===1?"0"+Qt:Qt;Ht+=6,Ft=Ft.toLowerCase(),Ht+=4,de[Ft]=St.buffer.slice(Fn,Jt),Ht=Jt}else Ht=Jt;else Ht=Jt}return de}static getLicenseServerUrlFromMediaInfo(Ot,St){try{if(!Ot||Ot.length===0)return null;let de=0,Ht=null;for(;de<Ot.length&&!Ht;){const Wt=Ot[de];if(Wt&&Wt.contentProtection&&Wt.contentProtection.length>0){const Jt=Wt.contentProtection.filter((tn=>tn.schemeIdUri&&tn.schemeIdUri===St));if(Jt&&Jt.length>0){let tn=0;for(;tn<Jt.length&&!Ht;){const Ft=Jt[tn];Ft.laUrl&&Ft.laUrl.__prefix&&o.prefixes.includes(Ft.laUrl.__prefix)&&Ft.laUrl.__text&&(Ht=Ft.laUrl.__text),tn+=1}}}de+=1}
22return Ht}catch{return null}}static hexKidToBufferSource(Ot){const St=Ot.replace(/-/g,"");return new Uint8Array(St.match(/[\da-f]{2}/gi).map((function(de){return parseInt(de,16)}))).buffer}}var T=p,y=class{constructor(Bt,Ot,St=null){this.contentType=Bt,this.robustness=Ot,this.encryptionScheme=St}},w=class{constructor(Bt,Ot,St,de,Ht,Wt){this.initDataTypes=Wt&&Wt.length>0?Wt:[d.default.INITIALIZATION_DATA_TYPE_CENC],Bt&&Bt.length&&(this.audioCapabilities=Bt),Ot&&Ot.length&&(this.videoCapabilities=Ot),this.distinctiveIdentifier=St,this.persistentState=de,this.sessionTypes=Ht}},h=P(1923),m=P(1944),r=class{constructor(Bt,Ot,St,de,Ht,Wt,Jt,tn){this.url=Bt,this.method=Ot,this.responseType=St,this.headers=de,this.withCredentials=Ht,this.messageType=Wt,this.sessionId=Jt,this.data=tn}},H=class{constructor(Bt,Ot,St){this.url=Bt,this.headers=Ot,this.data=St}},G=P(7568),ue=P(1349),ge=P(7263),Ne=P(138),fe=class{constructor(Bt,Ot,St){this.url=Bt,this.method="GET",this.responseType="arraybuffer",this.headers=Ot,this.body=null,this.withCredentials=St}},Me=class{constructor(Bt,Ot,St){this.url=Bt,this.headers=Ot,this.data=St}};function Fe(Bt){const Ot=(Bt=Bt||{}).BASE64,St=Bt.cmcdController,de=Bt.constants,Ht=Bt.customParametersModel,Wt=Bt.debug,Jt=Bt.eventBus,tn=Bt.events,Ft=Bt.protectionKeyController,ft=Bt.settings;let Qt,Fn,bn,Zt,pn,Pn,on,Tn,dn,At,dt,jt,zt,Rn,In=Bt.protectionModel,jn=[];function Jn(){if(!(Jt&&Jt.hasOwnProperty("on")&&Ft&&Ft.hasOwnProperty("getSupportedKeySystemMetadataFromContentProtection")))throw new Error("Missing config parameter(s)")}function Qn(Ct,en){zt||pn?zt&&(At?At.then((()=>{ar()})):ar()):(function(_n,Re){if(pn)return;var ut;pn=!0;const Tt=(function(ct){const wt=[];for(let cn=0;cn<ct.length;cn++){const mn=dr(ct[cn]);wt.push({ks:ct[cn].ks,configs:[mn],protData:ct[cn].protData})}return wt})(_n=(ut=_n).sort(((ct,wt)=>(Qt&&Qt[ct.ks.systemString]&&Qt[ct.ks.systemString].priority>=0?Qt[ct.ks.systemString].priority:ut.length)-(Qt&&Qt[wt.ks.systemString]&&Qt[wt.ks.systemString].priority>=0?Qt[wt.ks.systemString].priority:ut.length))));let It;In.requestKeySystemAccess(Tt).then((ct=>(It=ct.data,(function(wt){let cn=wt&&wt.selectedSystemString?wt.selectedSystemString:wt.keySystem.systemString;return Tn.info("DRM: KeySystem Access Granted for system string ("+cn+")! Selecting key system..."),In.selectKeySystem(wt)})(It)))).then((ct=>{(function(wt,cn){try{zt=wt,pn=!1,Jt.trigger(tn.KEY_SYSTEM_SELECTED,{data:cn});const mn=hr(zt);mn&&mn.serverCertificate&&mn.serverCertificate.length>0&&In.setServerCertificate(Ot.decodeArray(mn.serverCertificate).buffer),zt.systemString===d.default.FAIRPLAY_KEYSTEM_STRING?At=Vn().then((()=>{At=null,ar()})).catch((Hn=>{Tn.warn("DRM: Certificate acquisition failed for FairPlay: "+(Hn&&Hn.message?Hn.message:Hn)+". Proceeding anyway."),At=null,ar()})):(Vn().catch((Hn=>{Tn.error(Hn)})),ar())}catch(mn){Tn.error(mn)}})(ct,It)})).catch((ct=>{(function(wt,cn){zt=null,pn=!1,cn||Jt.trigger(tn.KEY_SYSTEM_SELECTED,{data:null,error:new m.default(h.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,h.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+wt.error)})})(ct,Re)}))})(Ct,en)}function Vn(){if(!zt)return Promise.resolve();const Ct=zt.systemString,en=Fn.get(Ct);if(en&&(en.applied||en.inProgress))return Promise.resolve();const _n=(function(){const Tt=[],It=hr(zt);return It&&Array.isArray(It.certUrls)&&It.certUrls.length&&It.certUrls.forEac
22h((ct=>{Tt.push(ct)})),dn.forEach((ct=>{ct&&ct.contentProtection&&ct.contentProtection.forEach((wt=>{wt&&Array.isArray(wt.certUrls)&&wt.certUrls.length&&wt.schemeIdUri.toLowerCase()===zt.schemeIdURI&&wt.certUrls.forEach((cn=>{Tt.push(cn)}))}))})),ue.default.dedupeCertUrls(Tt)})();if(!_n.length)return Tn.debug("DRM: No Certificate Server URLs found for "+Ct+". Skipping certificate acquisition."),Promise.resolve();Tn.debug("DRM: Found "+_n.length+" certificate candidate(s) for "+Ct+". Starting acquisition.");const Re=hr(zt)||{},ut=en||{applied:!1,inProgress:!0,attempts:0};return ut.inProgress=!0,Fn.set(Ct,ut),er(_n,0,Re,Ct,ut)}function er(Ct,en,_n,Re,ut){if(en>=Ct.length)return(function(ct,wt){return ct.inProgress=!1,ct.error=ct.error||"All certificate candidates failed",Tn.warn("DRM: All certificate candidates failed for "+wt+"."),Promise.reject(new Error(ct.error))})(ut,Re);const Tt=Ct[en],It=isNaN(ft.get().streaming.retryAttempts[G.HTTPRequest.LICENSE_CERTIFICATE])?3:ft.get().streaming.retryAttempts[G.HTTPRequest.LICENSE_CERTIFICATE];return Tn.debug("DRM: Attempting certificate download ("+(en+1)+"/"+Ct.length+") url="+Tt.url),(function(ct,wt){const cn=Ht.getCertificateRequestFilters();let mn=!1;wt&&typeof wt.withCredentials=="boolean"&&(mn=wt.withCredentials);const Hn={};wt&&Kr(Hn,wt.httpRequestHeaders);const Gn=new fe(ct.url,Hn,mn);return vr(cn,Gn).then((()=>Gn))})(Tt,_n).then((ct=>Zn(ct,_n,It))).then((ct=>(function(wt,cn,mn,Hn){if(!wt||!wt.byteLength)throw new Error("Empty certificate response");return Hn.urlUsed=cn.url,Hn.buffer=wt,(function(Gn,sr,$n){return new Promise(((rr,ur)=>{try{const or=In.setServerCertificate(Gn);or&&typeof or.then=="function"?or.then((lr=>{rr(typeof lr!="boolean"||lr)})).catch((lr=>{$n.error=lr&&lr.message?lr.message:lr,ur(lr)})):rr(!0)}catch(or){$n.error=or&&or.message?or.message:or,Tn.warn("DRM: setServerCertificate threw for "+sr+": "+$n.error),ur(or)}}))})(wt,mn,Hn).then((Gn=>{if(!Gn)throw new Error("CDM rejected certificate");Hn.applied=!0,Hn.inProgress=!1}))})(ct,Tt,Re,ut))).then((()=>{(function(ct,wt,cn){const mn=ct.certType?" certType="+ct.certType:"";Tn.info("DRM: Server certificate applied successfully from "+cn.urlUsed+mn+" for "+wt+".")})(Tt,Re,ut)})).catch((ct=>(ut.attempts++,ut.lastError=ct&&ct.message?ct.message:ct,Tn.warn("DRM: Certificate attempt failed ("+Tt.url+"): "+ut.lastError),er(Ct,en+1,_n,Re,ut))))}function Zn(Ct,en,_n){return new Promise(((Re,ut)=>{const Tt=new XMLHttpRequest;Tt.open(Ct.method,Ct.url,!0),Tt.responseType=Ct.responseType;const It=en&&!isNaN(en.httpTimeout)?en.httpTimeout:8e3;It>0&&(Tt.timeout=It),Tt.withCredentials=Ct.withCredentials;for(const wt of Object.keys(Ct.headers))Tt.setRequestHeader(wt,Ct.headers[wt]);const ct=wt=>{if(_n>0){const cn=_n-1,mn=isNaN(ft.get().streaming.retryIntervals[G.HTTPRequest.LICENSE_CERTIFICATE])?500:ft.get().streaming.retryIntervals[G.HTTPRequest.LICENSE_CERTIFICATE];Tn.debug("DRM: Certificate request failed ("+wt+"). Retrying... remaining="+cn),setTimeout((()=>{Zn(Ct,en,cn).then(Re).catch(ut)}),mn)}else ut(new Error(wt))};Tt.onload=function(){if(this.status>=200&&this.status<=299){const wt=ge.default.parseHttpHeaders(Tt.getAllResponseHeaders?Tt.getAllResponseHeaders():null);vr(Ht.getCertificateResponseFilters(),new Me(Tt.responseURL,wt,this.response)).then((()=>{Re(this.response)})).catch((()=>{Re(this.response)}))}else ct("HTTP "+this.status)},Tt.onerror=function(){ct("network error")},Tt.ontimeout=function(){ct("timeout")},Tt.onabort=function(){ct("aborted")};try{Tt.send(Ct.body)}catch(wt){ut(wt)}}))}function ar(){let Ct;for(let _n=0;_n<dt.length;_n++)for(Ct=0;Ct<dt[_n].length;Ct++)if(zt===dt[_n][Ct].ks){en=dt[_n][Ct],Ft.isClearKey(zt)&&(function(Re){if(Re.protData&&Re.protData.hasOwnProperty("clearkeys")&&Object.keys(Re.protData.clearkeys).length!==0){const ut={kids:Object.keys(Re.protData.clearkeys)};Re.initData=new TextEncoder().encode(JSON.stringify(ut))}})(en),en.sessionId?Xn(en):en.initData!==null&&gr(en);break}var en;dt=[]}function dr(Ct){const en=Ct.protData,_n=[],Re=[];let ut=d.default.INITIALIZATION_DATA_TYPE_CENC;Ct.ks&&Ct.ks.systemString===d.default.FAIRPLAY_KEYSTEM_STRING&&(ut=d.default.INITIALIZATION_DATA_TYPE_SINF);const Tt=en&&en.initDataTypes&&en.initDataTypes.length>0?en.initDataTypes:[ut],It=en&&en.audioRobustness&&en.audioRobustness.length>0?en.audioRobustness:jt,ct=en&&en.videoRobustness&&en.videoRobustness.length>0?en.videoRobustness:jt,wt=Ct.sessionType,cn=en&&en.distinctiveIdentifier?en.distinctiveIdentifier:"optional",mn=en&&en.persistentState?en.persistentState:wt==="temporary"?"optional":"required",Hn=Ct.ks&&Ct.ks.systemString===d.default.FAIRPLAY_KEYSTEM_STRING?d.default.ENCRYPTION_SCHEME_CBCS:void 0;return dn.forEach((Gn=>{Gn.type===de.AUDIO?_n.push(new y(Gn.codec,It,Hn)):Gn.type===de.VIDEO&&Re.push(new y(Gn.codec,ct,Hn))})),new w(_n,Re,cn,mn,[wt],Tt)}function Xn(Ct){Jn(),In.loadKeySession(Ct)}function gr(Ct){if(Ct&&(function(_n){if(!_n)return!1;try{const Re=In.getSessionTokens();for(let ut=0;ut<Re.length;ut++)if(Re[ut].getKeyId()===_n)return!0;return!1}catch{return!1}})(Ct.keyId))return;(function(){if(!ft)return;const _n=ft.get().streaming.protection.keepProtectionMediaKeys,Re=ft.get().streaming.protection.keepProtectionMediaKeysMaximumOpenSessions;
22if(typeof Re!="number"||Re<=0)return;if(!_n)return void Tn.warn("DRM: keepProtectionMediaKeysMaximumOpenSessions is set to "+Re+", but keepProtectionMediaKeys is not enabled. Therefore, keepProtectionMediaKeysMaximumOpenSessions will be ignored.");if(!In||typeof In.getSessionTokens!="function")return;const ut=In.getSessionTokens()||[];if(ut.length<Re)return;const Tt=ut[0];Tt&&(Tn.info("DRM: Maximum number of open MediaKeySessions reached ("+Re+"), closing oldest session."),Or(Tt))})();const en=T.getPSSHForKeySystem(zt,Ct?Ct.initData:null);if(en){if(Br(en))return;try{Ct.initData=en,In.createKeySession(Ct)}catch(_n){Jt.trigger(tn.KEY_SESSION_CREATED,{data:null,error:new m.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+_n.message)})}}else Ct&&Ct.initData?In.createKeySession(Ct):Jt.trigger(tn.KEY_SESSION_CREATED,{data:null,error:new m.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(zt?zt.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function hr(Ct){if(Ct){const en=Ct.systemString;if(Qt)return en in Qt?Qt[en]:null}return null}function Br(Ct){if(!Ct)return!1;try{const en=In.getAllInitData();for(let _n=0;_n<en.length;_n++)if(Ft.initDataEquals(Ct,en[_n]))return Tn.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function Or(Ct){Jn(),In.closeKeySession(Ct)}function qr(Ct){Jn(),Ct?(In.setMediaElement(Ct),Jt.on(tn.NEED_KEY,Mr,bn)):Ct===null&&(In.setMediaElement(Ct),Jt.off(tn.NEED_KEY,Mr,bn))}function Qr(Ct){Tn.debug("DRM: onKeyMessage");const en=Ct.data;Jt.trigger(tn.KEY_MESSAGE,{data:en});const _n=en.messageType?en.messageType:d.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,Re=en.message,ut=en.sessionToken,Tt=hr(zt),It=Ft.getLicenseServerModelInstance(zt,Tt,_n),ct={sessionToken:ut,messageType:_n};if(Re&&Re.byteLength!==0){if(!It)return Tn.debug("DRM: License server request not required for this message (type = "+Ct.data.messageType+"). Session ID = "+ut.getSessionId()),void pr(ct);
22if(Ft.isClearKey(zt)){const wt=Ft.processClearKeyLicenseRequest(zt,Tt,Re);if(wt&&wt.keyPairs&&wt.keyPairs.length>0)return Tn.debug("DRM: ClearKey license request handled by application!"),pr(ct),void In.updateKeySession(ut,wt)}(function(wt,cn,mn){const Hn=wt.sessionToken,Gn=wt.messageType?wt.messageType:d.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,sr={sessionToken:Hn,messageType:Gn},$n=zt?zt.systemString:null;let rr=(function(ir,Gr,ti,jr,Ii){let Er=null;const Ri=jr.message;if(ir&&ir.serverURL){const wr=ir.serverURL;typeof wr=="string"&&wr!==""?Er=wr:typeof wr=="object"&&wr.hasOwnProperty(Gr)&&(Er=wr[Gr])}else if(ir&&ir.laURL&&ir.laURL!=="")Er=ir.laURL;else if(Er=T.getLicenseServerUrlFromMediaInfo(dn,zt.schemeIdURI),!Er&&!Ft.isClearKey(zt)){const wr=T.getPSSHData(ti.initData);Er=zt.getLicenseServerURLFromInitData(wr),Er||(Er=jr.laURL)}return Er=Ii.getServerURLFromMessage(Er,Ri,Gr),Er})(mn,Gn,Hn,wt,cn);if(!rr)return void pr(sr,new m.default(h.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));const ur={};let or=!1;mn&&Kr(ur,mn.httpRequestHeaders);const lr=wt.message;Kr(ur,zt.getRequestHeadersFromMessage(lr)),Object.keys(ur).forEach((ir=>{ir.toLowerCase()==="authorization"&&(or=!0)})),mn&&typeof mn.withCredentials=="boolean"&&(or=mn.withCredentials);const Jr=function(ir){if(In)if(ir.status>=200&&ir.status<=299){const Gr=ge.default.parseHttpHeaders(ir.getAllResponseHeaders?ir.getAllResponseHeaders():null);let ti=new H(ir.responseURL,Gr,ir.response);vr(Ht.getLicenseResponseFilters(),ti).then((()=>{const jr=cn.getLicenseMessage(ti.data,$n,Gn);jr!==null?(pr(sr),In.updateKeySession(Hn,jr)):Zr(ir,sr,$n,Gn,cn)}))}else Zr(ir,sr,$n,Gn,cn)},Lr=function(ir){pr(sr,new m.default(h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+$n+' update, XHR aborted. status is "'+ir.statusText+'" ('+ir.status+"), readyState is "+ir.readyState))},_i=function(ir){pr(sr,new m.default(h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+$n+' update, XHR error. status is "'+ir.statusText+'" ('+ir.status+"), readyState is "+ir.readyState))},ci=zt.getLicenseRequestFromMessage(lr),yi=cn.getHTTPMethod(Gn),li=cn.getResponseType($n,Gn),Tr=mn&&!isNaN(mn.httpTimeout)?mn.httpTimeout:8e3,Si=Hn.getSessionId()||null;let fi=new r(rr,yi,li,ur,or,Gn,Si,ci);const ei=isNaN(ft.get().streaming.retryAttempts[G.HTTPRequest.LICENSE])?3:ft.get().streaming.retryAttempts[G.HTTPRequest.LICENSE];vr(Ht.getLicenseRequestFilters(),fi).then((()=>{Xr(fi,ei,Tr,Jr,Lr,_i)}))})(en,It,Tt)}else pr(ct,new m.default(h.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function pr(Ct,en=null){Jt.trigger(tn.LICENSE_REQUEST_COMPLETE,{data:Ct,error:en})}function Xr(Ct,en,_n,Re,ut,Tt){const It=new XMLHttpRequest,ct={url:Ct.url,type:G.HTTPRequest.LICENSE,method:Ct.method,headers:Ct.headers||{}};St.applyCmcdToRequest(ct),Ct.url=ct.url,Ct.headers=ct.headers,It.open(Ct.method,Ct.url,!0),It.responseType=Ct.responseType,It.withCredentials=Ct.withCredentials,_n>0&&(It.timeout=_n);for(const cn in Ct.headers)It.setRequestHeader(cn,Ct.headers[cn]);const wt=function(){en--;const cn=isNaN(ft.get().streaming.retryIntervals[G.HTTPRequest.LICENSE])?1e3:ft.get().streaming.retryIntervals[G.HTTPRequest.LICENSE];Pn=setTimeout((function(){Xr(Ct,en,_n,Re,ut,Tt)}),cn)};It.onload=function(){on=null,this.status>=200&&this.status<=299||en<=0?Re(this):(Tn.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+en),wt())},It.ontimeout=It.onerror=function(){on=null,en<=0?Tt(this):(Tn.warn("License request network request failed . Retrying it... Pending retries: "+en),wt())},It.onabort=function(){ut(this)},Jt.trigger(tn.LICENSE_REQUEST_SENDING,{url:Ct.url,headers:Ct.headers,payload:Ct.data,sessionId:Ct.sessionId}),on=It,It.send(Ct.data)}function Dr(){on&&(on.onloadend=on.onerror=on.onprogress=void 0,on.abort(),on=null),Pn&&(clearTimeout(Pn),Pn=null)}function Kr(Ct,en){if(en)for(const _n in en)Ct[_n]=en[_n]}function Zr(Ct,en,_n,Re,ut){let Tt="NONE",It=null;Ct.response&&(Tt=ut.getErrorResponse(Ct.response,_n,Re),It={serverResponse:Ct.response||null,responseCode:Ct.status||null,responseText:Ct.statusText||null}),pr(en,new m.default(h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+_n+' update, XHR complete. status is "'+Ct.statusText+'" ('+Ct.status+"), readyState is "+Ct.readyState+". Response is "+Tt,It))}function vr(Ct,en){return Ct?Ct.reduce(((_n,Re)=>_n.then((()=>Re(en)))),Promise.resolve()):Promise.resolve()}function Mr(Ct,en){if(ft.get().streaming.protection.ignoreEmeEncryptedEvent)return;if(Tn.debug("DRM: onNeedKey"),Ct.key.initDataType!==d.default.INITIALIZATION_DATA_TYPE_CENC&&Ct.key.initDataType!==d.default.INITIALIZATION_DATA_TYPE_SINF)return void Tn.warn("DRM: Only 'cenc' and 'sinf' initData are supported! Ignoring initData of type: "+Ct.key.initDataType);if(dn.length===0&&(Tn.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(en=en===void 0?1:en+1)<5))return void jn.push(setTimeout((()=>{Mr(Ct,en)}),500));let _n=Ct.key.initData;
22ArrayBuffer.isView(_n)&&(_n=_n.buffer);const Re=Ct.key.initDataType===d.default.INITIALIZATION_DATA_TYPE_SINF;if(zt){const Tt=Re?_n:T.getPSSHForKeySystem(zt,_n);if(Tt&&Br(Tt))return}let ut;Tn.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(_n))),ut=Re?Ft.getSupportedKeySystemMetadataForSinf(_n,Qt,Rn):Ft.getSupportedKeySystemMetadataFromSegmentPssh(_n,Qt,Rn),ut.length!==0?(function(Tt){dt.push(Tt),Qn(Tt,!1)})(ut):Tn.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}function kr(Ct,en){if(Ct.size<=0)return!1;if(en.size>0&&[...Ct].every((Re=>{const ut=en.get(Re);return ut!==void 0&&ut!==""})))return!0;const _n=In.getSessionTokens();if(_n&&_n.length>0){const Re=_n.filter((ut=>[...Ct].includes(ut.normalizedKeyId)));if(Re.some((ut=>!ut.hasTriggeredKeyStatusMapUpdate))||Re.length===0)return!1}return!ft.get().streaming.protection.ignoreKeyStatuses&&Ct&&Ct.size>0&&en&&en.size>0}return bn={areKeyIdsExpired:function(Ct){try{return!!kr(Ct,Zt)&&[...Ct].every((en=>Zt.get(en)===d.default.MEDIA_KEY_STATUSES.EXPIRED))}catch(en){return Tn.error(en),!1}},areKeyIdsUsable:function(Ct){try{return!kr(Ct,Zt)||[...Ct].some((en=>{const _n=Zt.get(en);return _n&&_n!==d.default.MEDIA_KEY_STATUSES.INTERNAL_ERROR&&_n!==d.default.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED}))}catch(en){return Tn.error(en),!0}},clearMediaInfoArray:function(){dn=[]},closeKeySession:Or,createKeySession:gr,getKeySystems:function(){return Ft?Ft.getKeySystems():[]},getProtectionData:function(){return Qt},getSupportedKeySystemMetadataFromContentProtection:function(Ct){return Jn(),Ft.getSupportedKeySystemMetadataFromContentProtection(Ct,Qt,Rn)},handleKeySystemFromManifest:function(){if(!dn||dn.length===0)return;let Ct=[];dn.forEach((en=>{const _n=Ft.getSupportedKeySystemMetadataFromContentProtection(en.contentProtection,Qt,Rn);_n.length>0&&(Ct.length===0&&(Ct=_n),dt.push(_n))}
vendor: 13,046 bytes, line 22
22)),Ct&&Ct.length>0&&Qn(Ct,!0)},initializeForMedia:function(Ct){if(!Ct)throw new Error("mediaInfo can not be null or undefined");Jn(),dn.push(Ct)},loadKeySession:Xn,removeKeySession:function(Ct){Jn(),In.removeKeySession(Ct)},reset:function(){Jt.off(tn.INTERNAL_KEY_MESSAGE,Qr,bn),Jn(),Dr(),qr(null),zt=null,pn=!1,Zt=new Map,Fn=new Map,In&&(In.reset(),In=null),jn.forEach((Ct=>clearTimeout(Ct))),jn=[],dn=[],dt=[]},setKeySystems:function(Ct){Ft&&Ft.setKeySystems(Ct)},setMediaElement:qr,setProtectionData:function(Ct){Qt=Ct,Ft.setProtectionData(Ct)},setRobustnessLevel:function(Ct){jt=Ct},setServerCertificate:function(Ct){return Jn(),In.setServerCertificate(Ct)},setSessionType:function(Ct){Rn=Ct},stop:function(){Dr(),In&&In.stop()},updateKeyStatusesMap:function(Ct){try{if(!Ct||!Ct.sessionToken||!Ct.parsedKeyStatuses)return;Ct.sessionToken.hasTriggeredKeyStatusMapUpdate=!0;const en=Ct.parsedKeyStatuses,_n=ge.default.parseUserAgent(),Re=_n&&_n.browser&&_n.browser.name&&_n.browser.name.toLowerCase()==="edge";en.forEach((ut=>{Re&&zt.uuid===d.default.PLAYREADY_UUID&&ut.keyId&&ut.keyId.byteLength===16&&(function(It){const ct=ge.default.bufferSourceToDataView(It),wt=ct.getUint32(0,!0),cn=ct.getUint16(4,!0),mn=ct.getUint16(6,!0);ct.setUint32(0,wt,!1),ct.setUint16(4,cn,!1),ct.setUint16(6,mn,!1)})(ut.keyId);const Tt=ge.default.bufferSourceToHex(ut.keyId).slice(0,32);Tt&&Tt!==""&&Zt.set(Tt,ut.status)})),Jt.trigger(tn.KEY_STATUSES_MAP_UPDATED,{keyStatusMap:Zt})}catch(en){Tn.error(en)}}},Tn=Wt.getLogger(bn),dt=[],dn=[],Rn="temporary",jt="",on=null,Pn=null,Zt=new Map,Fn=new Map,At=null,Jt.on(tn.INTERNAL_KEY_MESSAGE,Qr,bn),bn}Fe.__dashjs_factory_name="ProtectionController";var ot=Ne.default.getClassFactory(Fe),ke=class{constructor(Bt,Ot){this.keyID=Bt,this.key=Ot}},Q=class{constructor(Bt,Ot){if(Ot&&Ot!=="persistent"&&Ot!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=Bt,this.type=Ot}toJWK(){let Bt,Ot=this.keyPairs.length,St={keys:[]};for(Bt=0;Bt<Ot;Bt++){let tn={kty:"oct",alg:"A128KW",kid:this.keyPairs[Bt].keyID,k:this.keyPairs[Bt].key};St.keys.push(tn)}this.type&&(St.type=this.type);let de=JSON.stringify(St);const Ht=de.length;let Wt=new ArrayBuffer(Ht),Jt=new Uint8Array(Wt);for(Bt=0;Bt<Ht;Bt++)Jt[Bt]=de.charCodeAt(Bt);return Wt}};const X=d.default.CLEARKEY_UUID,Se=d.default.CLEARKEY_KEYSTEM_STRING,Ae="urn:uuid:"+X;function xe(Bt){let Ot;const St=(Bt=Bt||{}).BASE64;return Ot={uuid:X,schemeIdURI:Ae,systemString:Se,getInitData:function(de,Ht){try{let Wt=T.parseInitDataFromContentProtection(de,St);if(!Wt&&Ht){const Jt={kids:[(function(tn){try{let Ft=tn.replace(/-/g,"");return Ft=btoa(Ft.match(/\w{2}/g).map((ft=>String.fromCharCode(parseInt(ft,16)))).join("")),Ft.replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}})(Ht.cencDefaultKid)]};Wt=new TextEncoder().encode(JSON.stringify(Jt))}return Wt}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(de){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(de))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(de,Ht){let Wt=null;if(de){const Jt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Ht))),tn=[];for(let Ft=0;Ft<Jt.kids.length;Ft++){const ft=Jt.kids[Ft],Qt=de.clearkeys&&de.clearkeys.hasOwnProperty(ft)?de.clearkeys[ft]:null;if(!Qt)throw new Error("DRM: ClearKey keyID ("+ft+") is not known!");tn.push(new ke(ft,Qt))}Wt=new Q(tn)}return Wt}},Ot}xe.__dashjs_factory_name="KeySystemClearKey";var gt=Ne.default.getSingletonFactory(xe);const Ee=d.default.W3C_CLEARKEY_UUID,mt=d.default.CLEARKEY_KEYSTEM_STRING,He="urn:uuid:"+Ee;function Pe(Bt){let Ot;const St=Bt.BASE64,de=Bt.debug.getLogger(Ot);return Ot={uuid:Ee,schemeIdURI:He,systemString:mt,getInitData:function(Ht){return T.parseInitDataFromContentProtection(Ht,St)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Ht){return new Uint8Array(Ht)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Ht,Wt){let Jt=null;if(Ht){const tn=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Wt))),Ft=[];for(let ft=0;ft<tn.kids.length;ft++){const Qt=tn.kids[ft],Fn=Ht.clearkeys&&Ht.clearkeys.hasOwnProperty(Qt)?Ht.clearkeys[Qt]:null;if(!Fn)throw new Error("DRM: ClearKey keyID ("+Qt+") is not known!");Ft.push(new ke(Qt,Fn))}Jt=new Q(Ft),de.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 Jt}},Ot}Pe.__dashjs_factory_name="KeySystemW3CClearKey";var Ke=Ne.default.getSingletonFactory(Pe);const Et=d.default.WIDEVINE_UUID,Pt=d.default.WIDEVINE_KEYSTEM_STRING,xt="urn:uuid:"+Et;function Lt(Bt){let Ot;const St=(Bt=Bt||{}).BASE64;return Ot={uuid:Et,schemeIdURI:xt,systemString:Pt,getInitData:function(de){return T.parseInitDataFromContentProtection(de,St)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(de){return new Uint8Array(de)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},Ot}Lt.__dashjs_factory_name="KeySystemWidevine";var sn=Ne.default.getSingletonFactory(Lt);const nn=d.default.PLAYREADY_UUID,Sn=d.default.PLAYREADY_KEYSTEM_STRING,ve="urn:uuid:"+nn;function Ie(Bt){let Ot,St="utf-16";const de=(Bt=Bt||{}).BASE64,Ht=Bt.settings;function Wt(){if(!de||!de.hasOwnProperty("decodeArray")||!de.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return Ot={uuid:nn,schemeIdURI:ve,systemString:Sn,getInitData:function(Jt){const tn=new Uint8Array([112,115,115,104,0,0,0,0]),Ft=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);let ft,Qt,Fn,bn,Zt,pn=0,Pn=null;if(Wt(),!Jt)return null;if("pssh"in Jt&&Jt.pssh)return T.parseInitDataFromContentProtection(Jt,de);if("pro"in Jt&&Jt.pro)Pn=de.decodeArray(Jt.pro.__text);else{if(!("prheader"in Jt)||!Jt.prheader)return null;Pn=de.decodeArray(Jt.prheader.__text)}return ft=Pn.length,Qt=4+tn.length+Ft.length+4+ft,Fn=new ArrayBuffer(Qt),bn=new Uint8Array(Fn),Zt=new DataView(Fn),Zt.setUint32(pn,Qt),pn+=4,bn.set(tn,pn),pn+=tn.length,bn.set(Ft,pn),pn+=Ft.length,Zt.setUint32(pn,ft),pn+=4,bn.set(Pn,pn),pn+=ft,bn.buffer},getRequestHeadersFromMessage:function(Jt){let tn,Ft;const ft={},Qt=new DOMParser;if(Ht&&Ht.get().streaming.protection.detectPlayreadyMessageFormat&&St==="utf-16"&&Jt&&Jt.byteLength%2==1)return ft["Content-Type"]="text/xml; charset=utf-8",ft;const Fn=St==="utf-16"?new Uint16Array(Jt):new Uint8Array(Jt);tn=String.fromCharCode.apply(null,Fn),Ft=Qt.parseFromString(tn,"application/xml");const bn=Ft.getElementsByTagName("name"),Zt=Ft.getElementsByTagName("value");for(let pn=0;pn<bn.length;pn++)ft[bn[pn].childNodes[0].nodeValue]=Zt[pn].childNodes[0].nodeValue;return ft.hasOwnProperty("Content")&&(ft["Content-Type"]=ft.Content,delete ft.Content),ft.hasOwnProperty("Content-Type")||(ft["Content-Type"]="text/xml; charset=utf-8"),ft},getLicenseRequestFromMessage:function(Jt){let tn=null;const Ft=new DOMParser;if(Ht&&Ht.get().streaming.protection.detectPlayreadyMessageFormat&&St==="utf-16"&&Jt&&Jt.byteLength%2==1)return Jt;const ft=St==="utf-16"?new Uint16Array(Jt):new Uint8Array(Jt);Wt();const Qt=String.fromCharCode.apply(null,ft),Fn=Ft.parseFromString(Qt,"application/xml");if(!Fn.getElementsByTagName("PlayReadyKeyMessage")[0])return Jt;{const bn=Fn.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;bn&&(tn=de.decode(bn))}return tn},getLicenseServerURLFromInitData:function(Jt){if(Jt){const tn=new DataView(Jt),Ft=tn.getUint16(4,!0);let ft=6;const Qt=new DOMParser;for(let Fn=0;Fn<Ft;Fn++){const bn=tn.getUint16(ft,!0);ft+=2;const Zt=tn.getUint16(ft,!0);if(ft+=2,bn!==1){ft+=Zt;continue}const pn=Jt.slice(ft,ft+Zt),Pn=String.fromCharCode.apply(null,new Uint16Array(pn)),on=Qt.parseFromString(Pn,"application/xml");if(on.getElementsByTagName("LA_URL")[0]){const Tn=on.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(Tn)return Tn}if(on.getElementsByTagName("LUI_URL")[0]){const Tn=on.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(Tn)return Tn}}}return null},getCDMData:function(Jt){let tn,Ft,ft,Qt;if(Wt(),!Jt)return null;for(tn=[],Qt=0;Qt<Jt.length;++Qt)tn.push(Jt.charCodeAt(Qt)),tn.push(0);for(tn=String.fromCharCode.apply(null,tn),tn=de.encode(tn),Ft='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",tn),ft=[],Qt=0;Qt<Ft.length;++Qt)ft.push(Ft.charCodeAt(Qt)),ft.push(0);return new Uint8Array(ft).buffer},setPlayReadyMessageFormat:function(Jt){if(Jt!=="utf-8"&&Jt!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');St=Jt}},Ot}Ie.__dashjs_factory_name="KeySystemPlayReady";var pt=Ne.default.getSingletonFactory(Ie);const _t=d.default.FAIRPLAY_UUID,Ye=d.default.FAIRPLAY_KEYSTEM_STRING,Y="urn:uuid:"+_t;function k(){let Bt;return Bt={uuid:_t,schemeIdURI:Y,systemString:Ye,getInitData:function(){return null},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/octet-stream"}},getLicenseRequestFromMessage:function(Ot){return new Uint8Array(Ot)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},Bt}k.__dashjs_factory_name="KeySystemFairPlay";var De=Ne.default.getSingletonFactory(k);function j(Bt){const Ot=(Bt=Bt||{}).BASE64,St={};let de;return St[d.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(Ht){return Ot.decodeArray(Ht.license)},getErrorResponse:function(Ht){return Ht}},St[d.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(Ht){return Ht},getErrorResponse:function(Ht){return String.fromCharCode.apply(null,new Uint8Array(Ht))}},de={getServerURLFromMessage:function(Ht){return Ht},getHTTPMethod:function(){return"POST"},getResponseType:function(Ht){return St[Ht].responseType},getLicenseMessage:function(Ht,Wt){return(function(){if(!Ot||!Ot.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")})(),St[Wt].getLicenseMessage(Ht)},getErrorResponse:function(Ht,Wt){return St[Wt].getErrorResponse(Ht)}},de}j.__dashjs_factory_name="DRMToday";var We=Ne.default.getSingletonFactory(j);function st(){let Bt;const Ot="http://schemas.xmlsoap.org/soap/envelope/";function St(Wt){const Jt=String.fromCharCode.apply(null,new Uint8Array(Wt));return decodeURIComponent(escape(Jt))}function de(Wt){if(window.DOMParser){const Jt=St(Wt),tn=new window.DOMParser().parseFromString(Jt,"text/xml"),Ft=tn?tn.getElementsByTagNameNS(Ot,"Envelope")[0]:null,ft=Ft?Ft.getElementsByTagNameNS(Ot,"Body")[0]:null;if(ft&&ft.getElementsByTagNameNS(Ot,"Fault")[0])return null}return Wt}function Ht(Wt){let Jt="",tn="",Ft="",ft=-1,Qt=-1;if(window.DOMParser){const bn=St(Wt),Zt=new window.DOMParser().parseFromString(bn,"text/xml"),pn=Zt?Zt.getElementsByTagNameNS(Ot,"Envelope")[0]:null,Pn=pn?pn.getElementsByTagNameNS(Ot,"Body")[0]:null,on=Pn?Pn.getElementsByTagNameNS(Ot,"Fault")[0]:null,Tn=on?on.getElementsByTagName("detail")[0]:null,dn=Tn?Tn.getElementsByTagName("Exception")[0]:null;let At=null;if(on===null)return bn;At=on.getElementsByTagName("faultstring")[0].firstChild,Jt=At?At.nodeValue:null,dn!==null&&(At=dn.getElementsByTagName("StatusCode")[0],tn=At?At.firstChild.nodeValue:null,At=dn.getElementsByTagName("Message")[0],Ft=At?At.firstChild.nodeValue:null,ft=Ft?Ft.lastIndexOf("[")+1:-1,Qt=Ft?Ft.indexOf("]"):-1,Ft=Ft?Ft.substring(ft,Qt):"")}let Fn=`code: ${tn}, name: ${Jt}`;return Ft&&(Fn+=`, message: ${Ft}`),Fn}return Bt={getServerURLFromMessage:function(Wt){return Wt},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(Wt){return de.call(this,Wt)},getErrorResponse:function(Wt){return Ht.call(this,Wt)}},Bt}st.__dashjs_factory_name="PlayReady";var Te=Ne.default.getSingletonFactory(st);function Le(){let Bt;return Bt={getServerURLFromMessage:function(Ot){return Ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(Ot){return Ot},getErrorResponse:function(Ot){return String.fromCharCode.apply(null,new Uint8Array(Ot))}},Bt}Le.__dashjs_factory_name="Widevine";var i=Ne.default.getSingletonFactory(Le);function l(){let Bt;function Ot(St){const de=atob(St),Ht=new Uint8Array(de.length);for(let Wt=0;Wt<de.length;Wt++)Ht[Wt]=de.charCodeAt(Wt);return Ht.buffer}return Bt={getErrorResponse:function(St){return String.fromCharCode.apply(null,new Uint8Array(St))},getHTTPMethod:function(){return"POST"},getLicenseMessage:function(St){if(!St||!St.byteLength)return St;let de;try{de=String.fromCharCode.apply(null,new Uint8Array(St))}
22catch{const Wt=new Uint8Array(St);let Jt="";for(let tn=0;tn<Wt.length;tn++)Jt+=String.fromCharCode(Wt[tn]);de=Jt}if(!de)return St;if(de=de.trim(),de.substr(0,5)==="<ckc>"&&de.substr(-6)==="</ckc>")return Ot(de.slice(5,-6));try{const Ht=JSON.parse(de),Wt=Ht.ckc||Ht.CkcMessage||Ht.License;if(Wt)return Ot(Wt)}catch{}return/^[A-Za-z0-9+/\r\n]+=*$/.test(de)&&de.length>0?Ot(de):St},getResponseType:function(){return"arraybuffer"},getServerURLFromMessage:function(St){return St}},Bt}l.__dashjs_factory_name="FairPlay";var C=Ne.default.getSingletonFactory(l);function ne(){let Bt;return Bt={getServerURLFromMessage:function(Ot){return Ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(Ot){if(!Ot.hasOwnProperty("keys"))return null;let St=[];for(let de=0;de<Ot.keys.length;de++){let Ht=Ot.keys[de],Wt=Ht.kid.replace(/=/g,""),Jt=Ht.k.replace(/=/g,"");St.push(new ke(Wt,Jt))}return new Q(St)},getErrorResponse:function(Ot){return String.fromCharCode.apply(null,new Uint8Array(Ot))}},Bt}ne.__dashjs_factory_name="ClearKey";var se=Ne.default.getSingletonFactory(ne),Oe=class{constructor(Bt){this.ks=Bt.ks,this.keyId=Bt.keyId,this.initData=Bt.initData,this.protData=Bt.protData,this.cdmData=Bt.cdmData,this.sessionId=Bt.sessionId,this.sessionType=Bt.sessionType}};function rt(){let Bt,Ot,St,de,Ht,Wt,Jt,tn,Ft=this.context;function ft(Zt){for(let pn=0;pn<de.length;pn++)if(de[pn].systemString===Zt)return de[pn];return null}function Qt(Zt,pn){return pn&&Zt in pn?pn[Zt]:null}function Fn(Zt,pn){return Zt&&Zt.sessionId?Zt.sessionId:pn&&pn.sessionId?pn.sessionId:null}function bn(Zt,pn){return Zt&&Zt.sessionType?Zt.sessionType:pn}return Bt={getKeySystemBySystemString:ft,getKeySystems:function(){return de},getLicenseServerModelInstance:function(Zt,pn,Pn){if(Pn===d.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE||Pn===d.default.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST)return null;let on=null;return pn&&pn.hasOwnProperty("drmtoday")?on=We(Ft).getInstance({BASE64:Ht}):Zt.systemString===d.default.WIDEVINE_KEYSTEM_STRING?on=i(Ft).getInstance():Zt.systemString===d.default.FAIRPLAY_KEYSTEM_STRING?on=C(Ft).getInstance():Zt.systemString===d.default.PLAYREADY_KEYSTEM_STRING?on=Te(Ft).getInstance():Zt.systemString===d.default.CLEARKEY_KEYSTEM_STRING&&(on=se(Ft).getInstance()),on},getSupportedKeySystemMetadataForSinf:function(Zt,pn,Pn){const on=ft(d.default.FAIRPLAY_KEYSTEM_STRING);if(!on)return[];const Tn=(function(At){if(!At||At.byteLength<12)return null;let dt;try{const jt=String.fromCharCode.apply(null,new Uint8Array(At)),zt=JSON.parse(jt);if(zt.sinf&&zt.sinf.length>0){const Rn=atob(zt.sinf[0]);dt=new Uint8Array(Rn.length);for(let In=0;In<Rn.length;In++)dt[In]=Rn.charCodeAt(In)}}catch{dt=new Uint8Array(At)}if(!dt||dt.length<12)return null;for(let jt=0;jt<dt.length-28;jt++)if(dt[jt]===116&&dt[jt+1]===101&&dt[jt+2]===110&&dt[jt+3]===99){const zt=jt+12;if(zt+16>dt.length)return null;const Rn=dt.subarray(zt,zt+16),In=Array.from(Rn).map((jn=>jn.toString(16).padStart(2,"0"))).join("");return In.slice(0,8)+"-"+In.slice(8,12)+"-"+In.slice(12,16)+"-"+In.slice(16,20)+"-"+In.slice(20,32)}return null})(Zt),dn=pn&&pn[d.default.FAIRPLAY_KEYSTEM_STRING]||null;return[{ks:on,keyId:Tn,initData:Zt,protData:dn,cdmData:on.getCDMData(dn?dn.cdmData:null),sessionType:Pn}]},getSupportedKeySystemMetadataFromContentProtection:function(Zt,pn,Pn){let on,Tn,dn,At,dt=[];if(!Zt||!Zt.length)return dt;const jt=T.findMp4ProtectionElement(Zt);for(dn=0;dn<de.length;dn++){Tn=de[dn];const zt=Qt(Tn.systemString,pn);for(At=0;At<Zt.length;At++)if(on=Zt[At],on.schemeIdUri.toLowerCase()===Tn.schemeIdURI){let Rn=Tn.getInitData(on,jt);const In=new Oe({ks:de[dn],keyId:on.keyId,initData:Rn,protData:zt,cdmData:Tn.getCDMData(zt?zt.cdmData:null),sessionId:Fn(zt,on),sessionType:bn(zt,Pn)});zt?dt.unshift(In):dt.push(In)}}return dt},getSupportedKeySystemMetadataFromSegmentPssh:function(Zt,pn,Pn){let on,Tn,dn=[],At=T.parsePSSHList(Zt);for(let dt=0;dt<de.length;++dt){on=de[dt],Tn=on.systemString;const jt=Qt(Tn,pn);on.uuid in At&&dn.push({ks:on,initData:At[on.uuid],protData:jt,cdmData:on.getCDMData(jt?jt.cdmData:null),sessionId:Fn(jt),sessionType:bn(jt,Pn)})}return dn},initDataEquals:function(Zt,pn){if(Zt.byteLength===pn.byteLength){let Pn=new Uint8Array(Zt),on=new Uint8Array(pn);for(let Tn=0;Tn<Pn.length;Tn++)if(Pn[Tn]!==on[Tn])return!1;return!0}return!1},initialize:function(){let Zt;de=[],Zt=pt(Ft).getInstance({BASE64:Ht,settings:Wt}),de.push(Zt),Zt=sn(Ft).getInstance({BASE64:Ht}),de.push(Zt),Zt=De(Ft).getInstance(),de.push(Zt),Zt=gt(Ft).getInstance({BASE64:Ht}),de.push(Zt),Jt=Zt,Zt=Ke(Ft).getInstance({BASE64:Ht,debug:Ot}),de.push(Zt),tn=Zt},isClearKey:function(Zt){return Zt===Jt||Zt===tn},processClearKeyLicenseRequest:function(Zt,pn,Pn){try{return Zt.getClearKeysFromProtectionData(pn,Pn)}catch{return St.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(Zt){Zt&&(Zt.debug&&(Ot=Zt.debug,St=Ot.getLogger(Bt)),Zt.BASE64&&(Ht=Zt.BASE64),Zt.settings&&(Wt=Zt.settings))},setKeySystems:function(Zt){de=Zt},setProtectionData:function(Zt){for(var pn,Pn,on=0;on<de.length;on++){var Tn=de[on];Tn.hasOwnProperty("init")&&Tn.init((pn=Tn.systemString,Pn=void 0,Pn=null,Zt&&(Pn=pn in Zt?Zt[pn]:null),Pn))}}},Bt}rt.__dashjs_factory_name="ProtectionKeyController";
vendor: 16,696 bytes, line 22
22var ae=Ne.default.getSingletonFactory(rt),ze=P(445),qe=class{constructor(Bt,Ot){this.initData=Bt,this.initDataType=Ot}},V=class{constructor(Bt,Ot,St,de){this.sessionToken=Bt,this.message=Ot,this.defaultURL=St,this.messageType=de||d.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST}},he=class{constructor(Bt,Ot){this.keySystem=Bt,this.ksConfiguration=Ot,this.nativeMediaKeySystemAccessObject=null,this.selectedSystemString=null}};const tt={};function it(Bt){Bt=Bt||{};const Ot=this.context,St=Bt.eventBus,de=Bt.events,Ht=Bt.debug;let Wt,Jt,tn,Ft,ft,Qt,Fn,bn;function Zt(At,dt,jt,zt){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){const Qn="Insecure origins are not allowed";return St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{error:Qn}),void zt({error:Qn})}const Rn=At[dt].protData&&At[dt].protData.systemStringPriority?At[dt].protData.systemStringPriority:null,In=At[dt].configs,jn=At[dt].ks;let Jn=jn.systemString;(function(Qn,Vn){return new Promise(((er,Zn)=>{pn(Qn,Vn,0,er,Zn)}))})(Rn||(tt[Jn]?tt[Jn]:[Jn]),In).then((Qn=>{const Vn=Qn&&Qn.nativeMediaKeySystemAccessObject&&typeof Qn.nativeMediaKeySystemAccessObject.getConfiguration=="function"?Qn.nativeMediaKeySystemAccessObject.getConfiguration():null,er=new he(jn,Vn);er.selectedSystemString=Qn.selectedSystemString,er.nativeMediaKeySystemAccessObject=Qn.nativeMediaKeySystemAccessObject,St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{data:er}),jt({data:er})})).catch((Qn=>{if(dt+1<At.length)Zt(At,dt+1,jt,zt);else{const Vn="Key system access denied! ";St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{error:Vn+Qn.message}),zt({error:Vn+Qn.message})}}))}function pn(At,dt,jt,zt,Rn){const In=At[jt];Jt.debug(`Requesting key system access for system string ${In}`),navigator.requestMediaKeySystemAccess(In,dt).then((jn=>{zt({nativeMediaKeySystemAccessObject:jn,selectedSystemString:In})})).catch((jn=>{jt+1<At.length?pn(At,dt,jt+1,zt,Rn):Rn(jn)}))}function Pn(At){if(!At||!At.session)return Promise.resolve;const dt=At.session;return dt.removeEventListener("keystatuseschange",At),dt.removeEventListener("message",At),dt.close()}function on(At){for(let dt=0;dt<Qt.length;dt++)if(Qt[dt]===At){Qt.splice(dt,1);break}}function Tn(At,dt){const jt={session:At,keyId:dt.keyId,normalizedKeyId:dt&&dt.keyId&&typeof dt.keyId=="string"?dt.keyId.replace(/-/g,"").toLowerCase():"",initData:dt.initData,sessionId:dt.sessionId,sessionType:dt.sessionType,hasTriggeredKeyStatusMapUpdate:!1,handleEvent:function(zt){switch(zt.type){case"keystatuseschange":this._onKeyStatusesChange(zt);break;case"message":this._onKeyMessage(zt)}},_onKeyStatusesChange:function(zt){St.trigger(de.KEY_STATUSES_CHANGED,{data:this});const Rn=[];zt.target.keyStatuses.forEach((function(){Rn.push(dn(arguments))})),St.trigger(de.INTERNAL_KEY_STATUSES_CHANGED,{parsedKeyStatuses:Rn,sessionToken:jt})},_onKeyMessage:function(zt){let Rn=ArrayBuffer.isView(zt.message)?zt.message.buffer:zt.message;St.trigger(de.INTERNAL_KEY_MESSAGE,{data:new V(this,Rn,void 0,zt.messageType)})},getKeyId:function(){return this.keyId},getSessionId:function(){return At.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return At.expiration},getKeyStatuses:function(){return At.keyStatuses},getUsable:function(){let zt=!1;return At.keyStatuses.forEach((function(){dn(arguments).status===d.default.MEDIA_KEY_STATUSES.USABLE&&(zt=!0)})),zt}};return At.addEventListener("keystatuseschange",jt),At.addEventListener("message",jt),At.closed.then((()=>{on(jt),Jt.debug("DRM: Session closed. SessionID = "+jt.getSessionId()),St.trigger(de.KEY_SESSION_CLOSED,{data:jt.getSessionId()})})),Qt.push(jt),jt}function dn(At){let dt,jt;return At&&At.length>0&&(At[0]&&(typeof At[0]=="string"?dt=At[0]:jt=At[0]),At[1]&&(typeof At[1]=="string"?dt=At[1]:jt=At[1])),{status:dt,keyId:jt}}return Wt={closeKeySession:function(At){Pn(At).catch((function(dt){on(At),St.trigger(de.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+At.getSessionId()+") "+dt.name})}))},createKeySession:function(At){if(!tn||!ft)throw new Error("Can not create sessions until you have selected a key system");const dt=ft.createSession(At.sessionType),jt=Tn(dt,At);let zt;zt=tn.systemString===d.default.CLEARKEY_KEYSTEM_STRING&&(At.initData||At.protData&&At.protData.clearkeys)?d.default.INITIALIZATION_DATA_TYPE_KEYIDS:tn.systemString===d.default.FAIRPLAY_KEYSTEM_STRING?d.default.INITIALIZATION_DATA_TYPE_SINF:d.default.INITIALIZATION_DATA_TYPE_CENC,dt.generateRequest(zt,At.initData).then((function(){Jt.debug("DRM: Session created. SessionID = "+jt.getSessionId()),St.trigger(de.KEY_SESSION_CREATED,{data:jt})})).catch((function(Rn){on(jt),St.trigger(de.KEY_SESSION_CREATED,{data:null,error:new m.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+Rn.name)})}))},getAllInitData:function(){const At=[];for(let dt=0;dt<Qt.length;dt++)Qt[dt].initData&&At.push(Qt[dt].initData);return At},getSessionTokens:function(){return Qt},loadKeySession:function(At){if(!tn||!ft)throw new Error("Can not load sessions until you have selected a key system");const dt=At.sessionId;for(let Rn=0;Rn<Qt.length;Rn++)if(dt===Qt[Rn].sessionId)return void Jt.warn("DRM: Ignoring session ID because we have already seen it!");const jt=ft.createSession(At.sessionType),zt=Tn(jt,At);zt.hasTriggeredKeyStatusMapUpdate=!0,jt.load(dt).then((function(Rn){Rn?(Jt.debug("DRM: Session loaded. SessionID = "+zt.getSessionId()),St.trigger(de.KEY_SESSION_CREATED,{data:zt})):(on(zt),St.trigger(de.KEY_SESSION_CREATED,{data:null,error:new m.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+dt+")")}))})).catch((function(Rn){on(zt),St.trigger(de.KEY_SESSION_CREATED,{data:null,error:new m.default(h.default.KEY_SESSION_CREATED_ERROR_CODE,h.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+dt+")! "+Rn.name)})}))},removeKeySession:function(At){At.session.remove().then((function(){Jt.debug("DRM: Session removed. SessionID = "+At.getSessionId()),St.trigger(de.KEY_SESSION_REMOVED,{data:At.getSessionId()})}),(function(dt){St.trigger(de.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+At.getSessionId()+"). "+dt.name})}))},requestKeySystemAccess:function(At){return new Promise(((dt,jt)=>{Zt(At,0,dt,jt)}))},reset:function(){const At=Qt.length;let dt;if(At!==0){const jt=function(zt){on(zt),Qt.length===0&&(Ft?(Ft.removeEventListener("encrypted",Fn),Ft.setMediaKeys(null).then((function(){St.trigger(de.TEARDOWN_COMPLETE)}))):St.trigger(de.TEARDOWN_COMPLETE))};for(let zt=0;zt<At;zt++)dt=Qt[zt],(function(Rn){Pn(dt),jt(Rn)})(dt)}else St.trigger(de.TEARDOWN_COMPLETE)},selectKeySystem:function(At){return new Promise(((dt,jt)=>{At.nativeMediaKeySystemAccessObject.createMediaKeys().then((zt=>(tn=At.keySystem,ft=zt,Ft?Ft.setMediaKeys(ft):Promise.resolve()))).then((()=>{dt(tn)})).catch((function(){jt({error:"Error selecting keys system ("+At.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(At){Ft!==At&&(Ft&&(Ft.removeEventListener("encrypted",Fn),Ft.setMediaKeys&&Ft.setMediaKeys(null)),Ft=At,Ft&&(Ft.addEventListener("encrypted",Fn),Ft.setMediaKeys&&ft&&Ft.setMediaKeys(ft)))},setServerCertificate:function(At){return new Promise(((dt,jt)=>{ft.setServerCertificate(At).then((function(){Jt.info("DRM: License server certificate successfully updated."),St.trigger(de.SERVER_CERTIFICATE_UPDATED),dt()})).catch((zt=>{jt(zt),St.trigger(de.SERVER_CERTIFICATE_UPDATED,{error:new m.default(h.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,h.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+zt.name)})}))}))},stop:function(){let At;for(let dt=0;dt<Qt.length;dt++)At=Qt[dt],At.getUsable()||(Pn(At),on(At))},updateKeySession:function(At,dt){const jt=At.session;bn.isClearKey(tn)&&(dt=dt.toJWK()),jt.update(dt).then((()=>{St.trigger(de.KEY_SESSION_UPDATED)})).catch((function(zt){St.trigger(de.KEY_ERROR,{error:new m.default(h.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+zt.name,At)})}))}},Jt=Ht.getLogger(Wt),tn=null,Ft=null,ft=null,Qt=[],bn=ae(Ot).getInstance(),Fn={handleEvent:function(At){if(At.type==="encrypted"&&At.initData){let dt=ArrayBuffer.isView(At.initData)?At.initData.buffer:At.initData;St.trigger(de.NEED_KEY,{key:new qe(dt,At.initDataType)})}}},Wt}tt[d.default.PLAYREADY_KEYSTEM_STRING]=[d.default.PLAYREADY_KEYSTEM_STRING,d.default.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],tt[d.default.WIDEVINE_KEYSTEM_STRING]=[d.default.WIDEVINE_KEYSTEM_STRING],tt[d.default.FAIRPLAY_KEYSTEM_STRING]=[d.default.FAIRPLAY_KEYSTEM_STRING],tt[d.default.CLEARKEY_KEYSTEM_STRING]=[d.default.CLEARKEY_KEYSTEM_STRING],it.__dashjs_factory_name="DefaultProtectionModel";var yt=Ne.default.getClassFactory(it);function Ze(Bt){Bt=Bt||{};const Ot=this.context,St=Bt.eventBus,de=Bt.events,Ht=Bt.debug,Wt=Bt.api;let Jt,tn,Ft,ft,Qt,Fn,bn,Zt,pn;function Pn(){try{for(let dn=0;dn<bn.length;dn++)on(bn[dn]);Ft&&Ft.removeEventListener(Wt.needkey,Zt),St.trigger(de.TEARDOWN_COMPLETE)}catch(dn){St.trigger(de.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+dn.message})}}function on(dn){const At=dn.session;At.removeEventListener(Wt.error,dn),At.removeEventListener(Wt.message,dn),At.removeEventListener(Wt.ready,dn),At.removeEventListener(Wt.close,dn);for(let dt=0;dt<bn.length;dt++)if(bn[dt]===dn){bn.splice(dt,1);break}At[Wt.release]()}function Tn(){let dn=null;const At=function(){Ft.removeEventListener("loadedmetadata",dn),Ft[Wt.setMediaKeys](Qt),St.trigger(de.VIDEO_ELEMENT_SELECTED)};Ft.readyState>=1?At():(dn=At.bind(this),Ft.addEventListener("loadedmetadata",dn))}return Jt={getAllInitData:function(){const dn=[];for(let At=0;At<bn.length;At++)dn.push(bn[At].initData);return dn},getSessionTokens:function(){return bn},requestKeySystemAccess:function(dn){return new Promise(((At,dt)=>{let jt=!1;for(let zt=0;zt<dn.length;zt++){const Rn=dn[zt].ks.systemString,In=dn[zt].configs;let jn=null,Jn=null;for(let Qn=0;Qn<In.length;Qn++){const Vn=In[Qn].audioCapabilities,er=In[Qn].videoCapabilities;if(Vn&&Vn.length!==0){jn=[];for(let Xn=0;Xn<Vn.length;Xn++)window[Wt.MediaKeys].isTypeSupported(Rn,Vn[Xn].contentType)&&jn.push(Vn[Xn])}if(er&&er.length!==0){Jn=[];for(let Xn=0;Xn<er.length;Xn++)window[Wt.MediaKeys].isTypeSupported(Rn,er[Xn].contentType)&&Jn.push(er[Xn])}if(!jn&&!Jn||jn&&jn.length===0||Jn&&Jn.length===0)continue;jt=!0;const Zn=new w(jn,Jn),ar=pn.getKeySystemBySystemString(Rn),dr=new he(ar,Zn);St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{data:dr}),At({data:dr});break}}if(!jt){const zt="Key system access denied! -- No valid audio/video content configurations detected!";St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{error:zt}),dt({error:zt})}}))},selectKeySystem:function(dn){return new Promise(((At,dt)=>{try{Qt=dn.mediaKeys=new window[Wt.MediaKeys](dn.keySystem.systemString),ft=dn.keySystem,Fn=dn,Ft&&Tn(),At(ft)}catch{dt({error:"Error selecting keys system ("+ft.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(dn){Ft!==dn&&(Ft&&Ft.removeEventListener(Wt.needkey,Zt),Ft=dn,Ft&&(Ft.addEventListener(Wt.needkey,Zt),Qt&&Tn()))},createKeySession:function(dn){if(!ft||!Qt||!Fn)throw new Error("Can not create sessions until you have selected a key system");let At=null;if(Fn.ksConfiguration.videoCapabilities&&Fn.ksConfiguration.videoCapabilities.length>0&&(At=Fn.ksConfiguration.videoCapabilities[0]),At===null&&Fn.ksConfiguration.audioCapabilities&&Fn.ksConfiguration.audioCapabilities.length>0&&(At=Fn.ksConfiguration.audioCapabilities[0]),At===null)throw new Error("Can not create sessions for unknown content types.");const dt=At.contentType,jt=Qt.createSession(dt,new Uint8Array(dn.initData),dn.cdmData?new Uint8Array(dn.cdmData):null),zt=(function(Rn,In){return{session:Rn,keyId:In.keyId,normalizedKeyId:In&&In.keyId&&typeof In.keyId=="string"?In.keyId.replace(/-/g,"").toLowerCase():"",initData:In.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}},handleEvent:function(jn){switch(jn.type){case Wt.error:let Jn="KeyError";St.trigger(de.KEY_ERROR,{error:new m.default(h.default.MEDIA_KEYERR_CODE,Jn,this)});break;case Wt.message:let Qn=ArrayBuffer.isView(jn.message)?jn.message.buffer:jn.message;St.trigger(de.INTERNAL_KEY_MESSAGE,{data:new V(this,Qn,jn.destinationURL)});break;case Wt.ready:tn.debug("DRM: Key added."),St.trigger(de.KEY_ADDED);break;case Wt.close:tn.debug("DRM: Session closed. SessionID = "+this.getSessionId()),St.trigger(de.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}})(jt,dn);jt.addEventListener(Wt.error,zt),jt.addEventListener(Wt.message,zt),jt.addEventListener(Wt.ready,zt),jt.addEventListener(Wt.close,zt),bn.push(zt),tn.debug("DRM: Session created. SessionID = "+zt.getSessionId()),St.trigger(de.KEY_SESSION_CREATED,{data:zt})},updateKeySession:function(dn,At){const dt=dn.session;pn.isClearKey(ft)?dt.update(new Uint8Array(At.toJWK())):dt.update(new Uint8Array(At)),St.trigger(de.KEY_SESSION_UPDATED)},closeKeySession:on,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:Pn,reset:Pn},tn=Ht.getLogger(Jt),Ft=null,ft=null,Qt=null,Fn=null,bn=[],pn=ae(Ot).getInstance(),Zt={handleEvent:function(dn){if(dn.type===Wt.needkey&&dn.initData){const At=ArrayBuffer.isView(dn.initData)?dn.initData.buffer:dn.initData;St.trigger(de.NEED_KEY,{key:new qe(At,d.default.INITIALIZATION_DATA_TYPE_CENC)})}}},Jt}Ze.__dashjs_factory_name="ProtectionModel_3Feb2014";var ht=Ne.default.getClassFactory(Ze);function fn(Bt){Bt=Bt||{};const Ot=this.context,St=Bt.eventBus,de=Bt.events,Ht=Bt.debug,Wt=Bt.api,Jt=Bt.errHandler;let tn,Ft,ft,Qt,Fn,bn,Zt,pn,Pn;function on(){ft&&At();for(let dt=0;dt<Zt.length;dt++)Tn(Zt[dt]);St.trigger(de.TEARDOWN_COMPLETE)}function Tn(dt){try{ft[Wt.cancelKeyRequest](Qt.systemString,dt.sessionId)}catch(jt){St.trigger(de.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+dt.sessionId+") "+jt.message})}}function dn(dt,jt){if(jt&&dt){const zt=dt.length;for(let Rn=0;Rn<zt;Rn++)if(dt[Rn].sessionId==jt)return dt[Rn];return null}return null}function At(){ft.removeEventListener(Wt.keyerror,Pn),ft.removeEventListener(Wt.needkey,Pn),ft.removeEventListener(Wt.keymessage,Pn),ft.removeEventListener(Wt.keyadded,Pn)}return tn={getAllInitData:function(){const dt=[];for(let jt=0;jt<bn.length;jt++)dt.push(bn[jt].initData);for(let jt=0;jt<Zt.length;jt++)dt.push(Zt[jt].initData);return dt},getSessionTokens:function(){return Zt.concat(bn)},requestKeySystemAccess:function(dt){return new Promise(((jt,zt)=>{let Rn=ft;Rn||(Rn=document.createElement("video"));let In=!1;for(let jn=0;jn<dt.length;jn++){const Jn=dt[jn].ks.systemString,Qn=dt[jn].configs;let Vn=null,er=null;for(let Zn=0;Zn<Qn.length;Zn++){const ar=Qn[Zn].videoCapabilities;if(ar&&ar.length!==0){er=[];for(let hr=0;hr<ar.length;hr++)Rn.canPlayType(ar[hr].contentType,Jn)!==""&&er.push(ar[hr])}if(!er||Vn||er&&er.length===0)continue;In=!0;const dr=new w(Vn,er),Xn=Fn.getKeySystemBySystemString(Jn),gr=new he(Xn,dr);St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{data:gr}),jt({data:gr});break}}if(!In){const jn="Key system access denied! -- No valid audio/video content configurations detected!";St.trigger(de.KEY_SYSTEM_ACCESS_COMPLETE,{error:jn}),zt({error:jn})}}))},selectKeySystem:function(dt){return Qt=dt.keySystem,Promise.resolve(Qt)},setMediaElement:function(dt){if(ft!==dt){if(ft){At();for(var jt=0;jt<Zt.length;jt++)Tn(Zt[jt]);Zt=[]}ft=dt,ft&&(ft.addEventListener(Wt.keyerror,Pn),ft.addEventListener(Wt.needkey,Pn),ft.addEventListener(Wt.keymessage,Pn),ft.addEventListener(Wt.keyadded,Pn),St.trigger(de.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(dt){if(!Qt)throw new Error("Can not create sessions until you have selected a key system");if(pn||Zt.length===0){const jt={sessionId:null,keyId:dt.keyId,normalizedKeyId:dt&&dt.keyId&&typeof dt.keyId=="string"?dt.keyId.replace(/-/g,"").toLowerCase():"",initData:dt.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}}};return bn.push(jt),ft[Wt.generateKeyRequest](Qt.systemString,new Uint8Array(dt.initData)),jt}throw new Error("Multiple sessions not allowed!")}
22,updateKeySession:function(dt,jt){const zt=dt.sessionId;if(Fn.isClearKey(Qt))for(let Rn=0;Rn<jt.keyPairs.length;Rn++)ft[Wt.addKey](Qt.systemString,jt.keyPairs[Rn].key,jt.keyPairs[Rn].keyID,zt);else ft[Wt.addKey](Qt.systemString,new Uint8Array(jt),new Uint8Array(dt.initData),zt);St.trigger(de.KEY_SESSION_UPDATED)},closeKeySession:Tn,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:on,reset:on},Ft=Ht.getLogger(tn),ft=null,Qt=null,bn=[],Zt=[],Fn=ae(Ot).getInstance(),Pn={handleEvent:function(dt){let jt=null;switch(dt.type){case Wt.needkey:let zt=ArrayBuffer.isView(dt.initData)?dt.initData.buffer:dt.initData;St.trigger(de.NEED_KEY,{key:new qe(zt,d.default.INITIALIZATION_DATA_TYPE_CENC)});break;case Wt.keyerror:if(jt=dn(Zt,dt.sessionId),jt||(jt=dn(bn,dt.sessionId)),jt){let Rn=h.default.MEDIA_KEYERR_CODE,In="";switch(dt.errorCode.code){case 1:Rn=h.default.MEDIA_KEYERR_UNKNOWN_CODE,In+="MEDIA_KEYERR_UNKNOWN - "+h.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:Rn=h.default.MEDIA_KEYERR_CLIENT_CODE,In+="MEDIA_KEYERR_CLIENT - "+h.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:Rn=h.default.MEDIA_KEYERR_SERVICE_CODE,In+="MEDIA_KEYERR_SERVICE - "+h.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:Rn=h.default.MEDIA_KEYERR_OUTPUT_CODE,In+="MEDIA_KEYERR_OUTPUT - "+h.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:Rn=h.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,In+="MEDIA_KEYERR_HARDWARECHANGE - "+h.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:Rn=h.default.MEDIA_KEYERR_DOMAIN_CODE,In+="MEDIA_KEYERR_DOMAIN - "+h.default.MEDIA_KEYERR_DOMAIN_MESSAGE}In+=" System Code = "+dt.systemCode,St.trigger(de.KEY_ERROR,{error:new m.default(Rn,In,jt)})}else Ft.error("No session token found for key error");break;case Wt.keyadded:jt=dn(Zt,dt.sessionId),jt||(jt=dn(bn,dt.sessionId)),jt?(Ft.debug("DRM: Key added."),St.trigger(de.KEY_ADDED,{data:jt})):Ft.debug("No session token found for key added");break;case Wt.keymessage:if(pn=dt.sessionId!==null&&dt.sessionId!==void 0,pn?(jt=dn(Zt,dt.sessionId),!jt&&bn.length>0&&(jt=bn.shift(),Zt.push(jt),jt.sessionId=dt.sessionId,St.trigger(de.KEY_SESSION_CREATED,{data:jt}))):bn.length>0&&(jt=bn.shift(),Zt.push(jt),bn.length!==0&&Jt.error(new m.default(h.default.MEDIA_KEY_MESSAGE_ERROR_CODE,h.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),jt){let Rn=ArrayBuffer.isView(dt.message)?dt.message.buffer:dt.message;jt.keyMessage=Rn,St.trigger(de.INTERNAL_KEY_MESSAGE,{data:new V(jt,Rn,dt.defaultURL)})}else Ft.warn("No session token found for key message")}}},tn}fn.__dashjs_factory_name="ProtectionModel_01b";var Nn=Ne.default.getClassFactory(fn);const Vt=[{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"}],En=[{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 un(){let Bt;const Ot=this.context;function St(de,Ht){for(let Wt=0;Wt<Ht.length;Wt++){const Jt=Ht[Wt];if(typeof de[Jt[Object.keys(Jt)[0]]]=="function")return Jt}return null}return Bt={createProtectionSystem:function(de){let Ht=null;const Wt=ae(Ot).getInstance();Wt.setConfig({debug:de.debug,BASE64:de.BASE64,settings:de.settings}),Wt.initialize();let Jt=(function(tn){const Ft=tn.debug,ft=Ft.getLogger(Bt),Qt=tn.eventBus,Fn=tn.errHandler,bn=tn.videoModel?tn.videoModel.getElement():null;return bn&&bn.onencrypted===void 0||bn&&bn.mediaKeys===void 0?St(bn,En)?(ft.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),ht(Ot).create({debug:Ft,eventBus:Qt,events:tn.events,api:St(bn,En)})):St(bn,Vt)?(ft.info("EME detected on this user agent! (ProtectionModel_01b)"),Nn(Ot).create({debug:Ft,eventBus:Qt,errHandler:Fn,events:tn.events,api:St(bn,Vt)})):(ft.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(ft.info("EME detected on this user agent! (DefaultProtectionModel"),yt(Ot).create({debug:Ft,eventBus:Qt,events:tn.events}))})(de);return Jt&&(Ht=ot(Ot).create({BASE64:de.BASE64,cmcdController:de.cmcdController,constants:de.constants,customParametersModel:de.customParametersModel,debug:de.debug,eventBus:de.eventBus,events:de.events,protectionKeyController:Wt,protectionModel:Jt,settings:de.settings}),de.capabilities.setEncryptedMediaSupported(!0)),Ht}},Bt}un.__dashjs_factory_name="Protection";const nr=Ne.default.getClassFactory(un);nr.events=ze.default,nr.errors=h.default,Ne.default.updateClassFactory(un.__dashjs_factory_name,nr);var wn=nr},445:function(vt,pe,P){P.r(pe);var L=P(7252);class d extends L.default{constructor(){super(),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_STATUSES_CHANGED="internalkeyStatusesChanged",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_STATUSES_MAP_UPDATED="keyStatusesMapUpdated",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",this.KEY_SESSION_UPDATED="public_keySessionUpdated"}}let o=new d;pe.default=o},1923:function(vt,pe,P){P.r(pe);var L=P(8748);class d extends L.default{constructor(){super(),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! --"}}let o=new d;pe.default=o},4246:function(vt,pe,P){P.r(pe);var L=P(138);const d={DEFAULT:.5,STRONG:1,WEAK:0};function o(T,y,w,h){let m,r,H,G,ue;return r=T===void 0?null:T,H=(function(ge){let Ne=d.DEFAULT;return ge!==d.DEFAULT&&ge!==d.STRONG&&ge!==d.WEAK||(Ne=ge),Ne})(w),G=y===void 0?null:y,ue=h===void 0?null:h,m={representation:r,reason:G,rule:ue,priority:H},m}o.__dashjs_factory_name="SwitchRequest";const p=L.default.getClassFactory(o);p.NO_CHANGE=null,p.PRIORITY=d,L.default.updateClassFactory(o.__dashjs_factory_name,p),pe.default=p},559:function(vt,pe,P){P.r(pe),P.d(pe,{supportsMediaSource:function(){return y}});var L=P(138),d=P(5212),o=P(2861),p=P(7393),T=P(649);function y(){let h="ManagedMediaSource"in window,m="WebKitMediaSource"in window,r="MediaSource"in window;return h||m||r}function w(){let h,m,r,H,G,ue;const ge=this.context,Ne=(0,p.default)(ge).getInstance();function fe(Q,X){let Se;X===d.default.VIDEO?Se=(function(xe){const gt={video:{}};return xe&&(xe.width&&(gt.video.width=xe.width),xe.height&&(gt.video.height=xe.height),xe.framerate&&(gt.video.framerate=parseFloat(xe.framerate)),xe.hdrMetadataType&&(gt.video.hdrMetadataType=xe.hdrMetadataType),xe.colorGamut&&(gt.video.colorGamut=xe.colorGamut),xe.transferFunction&&(gt.video.transferFunction=xe.transferFunction)),gt})(Q):X===d.default.AUDIO&&(Se=(function(xe){const gt={audio:{}};return xe.samplerate&&(gt.audio.samplerate=xe.samplerate),xe.channels&&(gt.audio.channels=xe.channels),gt})(Q)),Se[X].contentType=Q.codec,Se[X].bitrate=parseInt(Q.bitrate),Se.type="media-source";
22let Ae=Q.codec;return Q.width&&Q.height&&(Ae+=';width="'+Q.width+'";height="'+Q.height+'"'),Se.mediaSourceCodecString=Ae,(function(xe,gt,Ee){if(!gt||!gt.keySystemsMetadata||gt.keySystemsMetadata.length===0)return[xe];const mt=[];return gt.keySystemsMetadata.forEach((He=>{if(!He.ks)return void mt.push({...xe});const Pe=He.protData&&He.protData.systemStringPriority?He.protData.systemStringPriority:null;let Ke=He.ks.systemString;(Pe||[Ke]).forEach((Et=>{const Pt={...xe};Pt.keySystemConfiguration={},Et&&(Pt.keySystemConfiguration.keySystem=Et);let xt="";He.ks.systemString===o.default.WIDEVINE_KEYSTEM_STRING&&(xt=o.default.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);const Lt=He.protData,sn=Lt&&Lt.audioRobustness&&Lt.audioRobustness.length>0?Lt.audioRobustness:xt,nn=Lt&&Lt.videoRobustness&&Lt.videoRobustness.length>0?Lt.videoRobustness:xt;Ee===d.default.AUDIO?Pt.keySystemConfiguration[Ee]={robustness:sn}:Ee===d.default.VIDEO&&(Pt.keySystemConfiguration[Ee]={robustness:nn}),mt.push(Pt)}))})),mt})(Se,Q,X)}function Me(Q){return m.get().streaming.enhancement.codecs.some((X=>Q.includes(X)))}function Fe(Q){if(H&&H.length!==0&&Q)return H.find((X=>{const Se=ot(Q,X,d.default.AUDIO),Ae=ot(Q,X,d.default.VIDEO),xe=ot(Q,X,"keySystemConfiguration");return Se&&Ae&&xe}))}function ot(Q,X,Se){return!Q[Se]&&!X[Se]||!(!Q[Se]||!X[Se])&&Ne.areEqual(Q[Se],X[Se])}function ke(Q,X){return(Q=Q.filter((Se=>!(Se.schemeIdUri&&X.some((Ae=>Ae.schemeIdUri===Se.schemeIdUri)))))).push(...X),Q}return h={areKeyIdsExpired:function(Q){return!!(r&&Q&&Q.normalizedKeyIds&&Q.normalizedKeyIds.size!==0)&&r.areKeyIdsExpired(Q.normalizedKeyIds)},areKeyIdsUsable:function(Q){return!(r&&Q&&Q.normalizedKeyIds&&Q.normalizedKeyIds.size!==0)||r.areKeyIdsUsable(Q.normalizedKeyIds)},isCodecSupportedBasedOnTestedConfigurations:function(Q,X){if(!Q||!Q.codec||Q.isSupported===!1)return!1;const Se=fe(Q,X).map((Ae=>Fe(Ae))).filter((Ae=>Ae!=null));return!(Se&&Se.length>0)||(function(Ae){return Ae.some((xe=>xe&&xe.decodingInfo&&xe.decodingInfo.supported))})(Se)},isProtectionCompatible:function(Q,X){return!X||!(!Q.isEncrypted&&X.isEncrypted)},runCodecSupportCheck:function(Q,X){if(X!==d.default.AUDIO&&X!==d.default.VIDEO)return Promise.resolve();if(m.get().streaming.enhancement.enabled&&Me(Q.codec))return H=H.filter((Ae=>!Me(Ae.mediaSourceCodecString))),Promise.resolve(!0);const Se=fe(Q,X);return(function(Ae,xe){return m.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(Ae.codec&&xe===d.default.AUDIO||xe===d.default.VIDEO&&Ae.codec&&Ae.width&&Ae.height&&Ae.bitrate&&Ae.framerate)})(Q,X)?(function(Ae){return new Promise((xe=>{if(!Ae||Ae.length===0)return void xe();const gt=Ae.map((Ee=>(function(mt){return new Promise((He=>{Fe(mt)?He():navigator.mediaCapabilities.decodingInfo(mt).then((Pe=>{mt.decodingInfo=Pe,H.push(mt),He()})).catch((Pe=>{mt.decodingInfo={supported:!1},H.push(mt),ue.error(Pe),He()}))}))})(Ee)));Promise.allSettled(gt).then((()=>{xe()})).catch((Ee=>{ue.error(Ee),xe()}))}))})(Se):((function(Ae){if(!Ae||!Ae.length)return;const xe=Ae[0];if(Fe(xe))return;let gt={supported:!1};("ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(xe.mediaSourceCodecString)||"MediaSource"in window&&MediaSource.isTypeSupported(xe.mediaSourceCodecString)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(xe.mediaSourceCodecString))&&(gt.supported=!0),xe.decodingInfo=gt,H.push(xe)})(Se),Promise.resolve())},setConfig:function(Q){Q&&(Q.settings&&(m=Q.settings),Q.protectionController&&(r=Q.protectionController))},setEncryptedMediaSupported:function(Q){G=Q},setProtectionController:function(Q){r=Q},supportsChangeType:function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType},supportsEncryptedMedia:function(){return G},supportsEssentialProperty:function(Q){let X=m.get().streaming.capabilities.supportedEssentialProperties;m.get().streaming.capabilities.useMediaCapabilitiesApi&&m.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(X=ke(X,[{schemeIdUri:d.default.COLOUR_PRIMARIES_SCHEME_ID_URI},{schemeIdUri:d.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI},{schemeIdUri:d.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI}])),m.get().streaming.capabilities.useMediaCapabilitiesApi&&m.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(X=ke(X,[{schemeIdUri:d.default.HDR_METADATA_FORMAT_SCHEME_ID_URI}]));try{return Q.inArray(X)}catch{return!0}},supportsMediaSource:y},G=!1,H=[],ue=(0,T.default)(ge).getInstance().getLogger(h),h}w.__dashjs_factory_name="Capabilities",pe.default=L.default.getSingletonFactory(w)},1349:function(vt,pe,P){function L(o){return o?(Array.isArray(o)?o:[o]).map((p=>{if(!p)return null;if(typeof p=="string"){const T=p.trim();return T?{url:T,certType:null}:null}if(typeof p=="object"){let T=(p.__text||p.text||"").trim();T||typeof p.url!="string"||(T=p.url.trim());let y=p.certType||p["@certType"]||null;return y&&typeof y=="string"?(y=y.trim(),y===""&&(y=null)):y=null,T?{url:T,certType:y}:null}return null}
22)).filter(Boolean):[]}function d(o){if(!Array.isArray(o)||o.length===0)return[];const p=new Set,T=[];for(let y=0;y<o.length;y++){const w=o[y];if(!w||!w.url)continue;const h=w.url+"||"+(w.certType||"");p.has(h)||(p.add(h),T.push(w))}return T}P.r(pe),pe.default={normalizeCertUrls:L,dedupeCertUrls:d,sanitizeProtectionDataCertUrls:function(o){return o&&typeof o=="object"&&Object.keys(o).forEach((p=>{const T=o[p];T&&Array.isArray(T.certUrls)&&(T.certUrls=d(L(T.certUrls)))})),o}}},7377:function(vt,pe,P){P.r(pe);var L=P(138),d=P(656);function o(){return{customTimeRangeArray:[],length:0,add:function(p,T){let y;for(y=0;y<this.customTimeRangeArray.length&&p>this.customTimeRangeArray[y].start;y++);for(this.customTimeRangeArray.splice(y,0,{start:p,end:T}),y=0;y<this.customTimeRangeArray.length-1;y++)this.mergeRanges(y,y+1)&&y--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(p,T){for(let y=0;y<this.customTimeRangeArray.length;y++)if(p<=this.customTimeRangeArray[y].start&&T>=this.customTimeRangeArray[y].end)this.customTimeRangeArray.splice(y,1),y--;else{if(p>this.customTimeRangeArray[y].start&&T<this.customTimeRangeArray[y].end){this.customTimeRangeArray.splice(y+1,0,{start:T,end:this.customTimeRangeArray[y].end}),this.customTimeRangeArray[y].end=p;break}p>this.customTimeRangeArray[y].start&&p<this.customTimeRangeArray[y].end?this.customTimeRangeArray[y].end=p:T>this.customTimeRangeArray[y].start&&T<this.customTimeRangeArray[y].end&&(this.customTimeRangeArray[y].start=T)}this.length=this.customTimeRangeArray.length},mergeRanges:function(p,T){let y=this.customTimeRangeArray[p],w=this.customTimeRangeArray[T];return y.start<=w.start&&w.start<=y.end&&y.end<=w.end?(y.end=w.end,this.customTimeRangeArray.splice(T,1),!0):w.start<=y.start&&y.start<=w.end&&w.end<=y.end?(y.start=w.start,this.customTimeRangeArray.splice(T,1),!0):w.start<=y.start&&y.start<=w.end&&y.end<=w.end?(this.customTimeRangeArray.splice(p,1),!0):y.start<=w.start&&w.start<=y.end&&w.end<=y.end&&(this.customTimeRangeArray.splice(T,1),!0)},start:function(p){return(0,d.checkInteger)(p),p>=this.customTimeRangeArray.length||p<0?NaN:this.customTimeRangeArray[p].start},end:function(p){return(0,d.checkInteger)(p),p>=this.customTimeRangeArray.length||p<0?NaN:this.customTimeRangeArray[p].end}}}o.__dashjs_factory_name="CustomTimeRanges",pe.default=L.default.getClassFactory(o)},9026:function(vt,pe,P){P.r(pe);var L=P(138);function d(){let o;const p=/^[a-z][a-z0-9+\-_.]*:/i,T=/^https?:\/\//i,y=/^https:\/\//i,w=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,h=(fe,Me)=>{try{return new window.URL(fe,Me).toString()}catch{return fe}},m=(fe,Me)=>{let Fe=r;if(!Me||!ue(fe))return fe;ge(fe)&&(Fe=H),Ne(fe)&&(Fe=G);const ot=Fe(Me),ke=ot.charAt(ot.length-1)!=="/"&&fe.charAt(0)!=="/"?"/":"";return[ot,fe].join(ke)};function r(fe){const Me=fe.indexOf("/"),Fe=fe.lastIndexOf("/");return Me!==-1?Fe===Me+1?fe:(fe.indexOf("?")!==-1&&(fe=fe.substring(0,fe.indexOf("?"))),fe.substring(0,Fe+1)):""}function H(fe){const Me=fe.match(w);return Me?Me[1]:""}function G(fe){const Me=fe.match(p);return Me?Me[0]:""}function ue(fe){return!p.test(fe)}function ge(fe){return ue(fe)&&fe.charAt(0)==="/"}function Ne(fe){return fe.indexOf("//")===0}return(function(){try{new window.URL("x","http://y"),o=h}catch{}finally{o=o||m}})(),{parseBaseUrl:r,parseOrigin:H,parseScheme:G,isRelative:ue,isPathAbsolute:ge,isSchemeRelative:Ne,isHTTPURL:function(fe){return T.test(fe)},isHTTPS:function(fe){return y.test(fe)},removeHostname:function(fe){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(fe)[2].substring(1)},resolve:function(fe,Me){return o(fe,Me)}}}d.__dashjs_factory_name="DefaultURLUtils",pe.default=L.default.getSingletonFactory(d)},7393:function(vt,pe,P){P.r(pe);var L=P(138),d=P(7316);function o(){let p;return p={areEqual:function(T,y){return d(T,y)}},p}o.__dashjs_factory_name="ObjectUtils",pe.default=L.default.getSingletonFactory(o)},656:function(vt,pe,P){P.r(pe),P.d(pe,{checkInteger:function(){return o},checkIsVideoOrAudioType:function(){return T},checkParameterType:function(){return d},checkRange:function(){return p}});var L=P(5212);
22function d(y,w){if(typeof y!==w)throw L.default.BAD_ARGUMENT_ERROR}function o(y){if(y===null||isNaN(y)||y%1!=0)throw L.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"}function p(y,w,h){if(y<w||y>h)throw L.default.BAD_ARGUMENT_ERROR+" : argument out of range"}function T(y){if(typeof y!="string"||y!==L.default.AUDIO&&y!==L.default.VIDEO)throw L.default.BAD_ARGUMENT_ERROR}},6503:function(vt,pe,P){P.r(pe);var L=P(138),d=P(9026);function o(){let T,y,w=[];const h=this.context;function m(r,H,G){let ue=(function(ge){let Ne;for(Ne=0;Ne<w.length;Ne++)if(w[Ne].regex.test(ge))return w[Ne].utils;return y})(G||H);return ue&&typeof ue[r]=="function"?ue[r](H,G):y[r](H,G)}return y=(0,d.default)(h).getInstance(),T={registerUrlRegex:function(r,H){w.push({regex:r,utils:H})},parseBaseUrl:function(r){return m("parseBaseUrl",r)},parseOrigin:function(r){return m("parseOrigin",r)},parseScheme:function(r){return m("parseScheme",r)},isRelative:function(r){return m("isRelative",r)},isPathAbsolute:function(r){return m("isPathAbsolute",r)},isSchemeRelative:function(r){return m("isSchemeRelative",r)},isHTTPURL:function(r){return m("isHTTPURL",r)},isHTTPS:function(r){return m("isHTTPS",r)},removeHostname:function(r){return m("removeHostname",r)},resolve:function(r,H){return m("resolve",r,H)}},T}o.__dashjs_factory_name="URLUtils";const p=L.default.getSingletonFactory(o);pe.default=p},1613:function(vt,pe,P){P.r(pe);var L=P(2842);class d extends L.default{constructor(p){super(),this.method=p||null}}pe.default=d},447:function(vt,pe,P){P.r(pe),pe.default=class{constructor(L){this.url=L.url,this.method=L.method,this.body=L.body!==void 0?L.body:null,this.responseType=L.responseType!==void 0?L.responseType:null,this.headers=L.headers!==void 0?L.headers:{},this.credentials=L.credentials!==void 0?L.credentials:null,this.mode=L.mode!==void 0?L.mode:null,this.timeout=L.timeout!==void 0?L.timeout:0,this.customData=L.customData!==void 0?L.customData:{}}}},5099:function(vt,pe,P){P.r(pe),pe.default=class{constructor(L){this.request=L.request,this.url=L.url!==void 0?L.url:null,this.redirected=L.redirected!==void 0&&L.redirected,this.status=L.status!==void 0?L.status:null,this.statusText=L.statusText!==void 0?L.statusText:"",this.type=L.type!==void 0?L.type:"",this.headers=L.headers!==void 0?L.headers:{},this.data=L.data!==void 0?L.data:null,this.resourceTiming=L.resourceTiming!==void 0?L.resourceTiming:null}}},1944:function(vt,pe,P){P.r(pe),pe.default=class{constructor(L,d,o){this.code=L||null,this.message=d||null,this.data=o||null}}},5560:function(vt,pe,P){P.r(pe);var L=P(8854);pe.default=class{constructor(d){this.id=d.id,this.url=d.url,this.language=d.language,this.mimeType=d.mimeType,this.bandwidth=d.bandwidth,this.periodId=d.periodId||null}serializeToMpdParserFormat(){return{tagName:L.default.ADAPTATION_SET,mimeType:this.mimeType,lang:this.language,Representation:[{tagName:L.default.REPRESENTATION,id:this.id,bandwidth:this.bandwidth,BaseURL:[{tagName:L.default.BASE_URL,__text:this.url}],mimeType:this.mimeType}]}}}},2842:function(vt,pe,P){P.r(pe);var L=P(7568);class d{constructor(p){this.action=d.ACTION_DOWNLOAD,this.availabilityEndTime=null,this.availabilityStartTime=null,this.bandwidth=NaN,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.duration=NaN,this.endDate=null,this.firstByteDate=null,this.index=NaN,this.isPartialSegmentRequest=!1,this.mediaStartTime=NaN,this.mediaType=null,this.presentationStartTime=NaN,this.range=null,this.representation=null,this.responseType="arraybuffer",this.retryAttempts=0,this.serviceLocation=null,this.startDate=null,this.startTime=NaN,this.timescale=NaN,this.type=null,this.url=p||null,this.wallStartTime=null}isInitializationRequest(){return this.type&&this.type===L.HTTPRequest.INIT_SEGMENT_TYPE}setInfo(p){this.type=p&&p.init?L.HTTPRequest.INIT_SEGMENT_TYPE:L.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=p&&p.url?p.url:null,this.range=p&&p.range?p.range.start+"-"+p.range.end:null,this.mediaType=p&&p.mediaType?p.mediaType:null,this.representation=p&&p.representation?p.representation:null}}d.ACTION_DOWNLOAD="download",d.ACTION_COMPLETE="complete",pe.default=d},7568:function(vt,pe,P){P.r(pe),P.d(pe,{HTTPRequest:function(){return L},HTTPRequestTrace:function(){return d}});class L{constructor(){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.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null,this._resourceTimingValues=null}}class d{constructor(){this.s=null,this.d=null,this.b=[]}}L.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",L.CONTENT_STEERING_TYPE="ContentSteering",L.DVB_REPORTING_TYPE="DVBReporting",L.GET="GET",L.POST="POST",L.HEAD="HEAD",L.INDEX_SEGMENT_TYPE="IndexSegment",L.INIT_SEGMENT_TYPE="InitializationSegment",L.LICENSE="license",L.LICENSE_CERTIFICATE="licenseCertificate",L.MEDIA_SEGMENT_TYPE="MediaSegment",L.MPD_TYPE="MPD",L.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",L.CMCD_EVENT="CmcdEvent",L.OTHER_TYPE="other",L.XLINK_EXPANSION_TYPE="XLinkExpansion"}},Ss={};function cr(vt){var pe=Ss[vt];if(pe!==void 0)return pe.exports;var P=Ss[vt]={exports:{}};return xl[vt](P,P.exports,cr),P.exports}cr.d=function(vt,pe){for(var P in pe)cr.o(pe,P)&&!cr.o(vt,P)&&Object.defineProperty(vt,P,{enumerable:!0,get:pe[P]})},cr.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}
22})(),cr.o=function(vt,pe){return Object.prototype.hasOwnProperty.call(vt,pe)},cr.r=function(vt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(vt,"__esModule",{value:!0})};var Rr={};cr.r(Rr),cr.d(Rr,{Constants:function(){return bs.default},Debug:function(){return Ns.default},ExternalSubtitle:function(){return Ds.default},MediaPlayer:function(){return Bl.MediaPlayer},MediaPlayerFactory:function(){return As},MetricsReporting:function(){return Is.default},Protection:function(){return Rs.default},default:function(){return Gl},supportsMediaSource:function(){return Cs.supportsMediaSource}});var Bl=cr(5393),Is=cr(4469),Rs=cr(7037),kl=cr(9839);let Ti=(function(){const vt="application/dash+xml";let pe;function P(d,o,p){if(!d||!/^VIDEO$/i.test(d.nodeName))return null;if(d._dashjs_player)return d._dashjs_player;let T,y=d.id||d.name||"video element";if(!(o=o||[].slice.call(d.querySelectorAll("source")).filter((function(w){return w.type==vt}))[0])&&d.src)(o=document.createElement("source")).src=d.src;else if(!o&&!d.src)return null;return p=p||{},T=(0,kl.default)(p).create(),T.initialize(d,o.src,d.autoplay),pe||(pe=T.getDebug().getLogger()),pe.debug("Converted "+y+" to dash.js player and added content: "+o.src),d._dashjs_player=T,T}function L(d){return/^VIDEO$/i.test(d.nodeName)?d:L(d.parentNode)}return{create:P,createAll:function(d,o){let p=[];d=d||"[data-dashjs-player]";let T=(o=o||document).querySelectorAll(d);for(let w=0;w<T.length;w++){let h=P(T[w],null);p.push(h)}let y=o.querySelectorAll('source[type="'+vt+'"]');for(let w=0;w<y.length;w++){let h=P(L(y[w]),null);p.push(h)}return p}}})();if(typeof window<"u"&&window){let pe=function(){window.removeEventListener("load",pe),Ti.createAll()},P=function(){window.dashjs&&(window.clearInterval(vt),Ti.createAll())},vt;(!window.dashjs||!window.dashjs.skipAutoCreate)&&window.addEventListener&&(window.document.readyState==="complete"?window.dashjs?Ti.createAll():vt=window.setInterval(P,500):window.addEventListener("load",pe))}var As=Ti,Ns=cr(649),bs=cr(5212),Cs=cr(559),Ds=cr(5560);dashjs.Protection=Rs.default,dashjs.MetricsReporting=Is.default,dashjs.MediaPlayerFactory=As,dashjs.Debug=Ns.default,dashjs.supportsMediaSource=Cs.supportsMediaSource,dashjs.Constants=bs.default,dashjs.ExternalSubtitle=Ds.default;var Gl=dashjs,Hl=(Rr=Rr.default).Constants,Yl=Rr.Debug,Vl=Rr.ExternalSubtitle,ql=Rr.MediaPlayer,Kl=Rr.MediaPlayerFactory,jl=Rr.MetricsReporting,Wl=Rr.Protection,zl=Rr.default,$l=Rr.supportsMediaSource;export{Hl as Constants,Yl as Debug,Vl as ExternalSubtitle,ql as MediaPlayer,Kl as MediaPlayerFactory,jl as MetricsReporting,Wl as Protection,zl as default,$l as supp
22ortsMediaSource};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.