1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2339],{81123:function(e,t,n){!/* 2 @license 3 Shaka Player 4 Copyright 2016 Google LLC 5 SPDX-License-Identifier: Apache-2.0 6*/function(){var e="undefined"!=typeof window?window:n.g,i={};for(var r in(function(e,t,n){function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r,a,o,s,u,l,c,d,h,f="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},p=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function g(e,t){if(t)e:{var n=p;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&f(n,e,{configurable:!0,writable:!0,value:t})}}function m(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function v(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:i(e)}}function y(e){if(!(e instanceof Array)){e=v(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}g("Symbol",function(e){function t(e,t){this.g=e,f(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),g("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=p[t[n]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&f(r.prototype,e,{configurable:!0,writable:!0,value:function(){return m(i(this))}})}return e});var b,w,x="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{e:{var T={};try{T.__proto__={a:!0},r=T.a;break e}catch(e){}r=!1}w=r?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var S=w;function A(e,t){if(e.prototype=x(t.prototype),e.prototype.constructor=e,S)S(e,t);else for(var n in t)if("prototype"!=n){if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n]}e.Oi=t.prototype}function E(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function I(e){if(e.o)throw TypeError("Generator is already running");e.o=!0}function k(e,t){e.i={Jf:t,Qf:!0},e.g=e.m||e.j}function M(e,t,n){return e.g=n,{value:t}}function C(e){e.g=0}function D(e,t,n){e.m=t,void 0!=n&&(e.j=n)}function R(e){e.m=0,e.j=2}function N(e,t,n){e.g=t,e.m=n||0}function L(e,t){return e.m=t||0,t=e.i.Jf,e.i=null,t}function P(e){e.u=[e.i],e.m=0,e.j=0}function _(e,t){var n=e.u.splice(0)[0];(n=e.i=e.i||n)?n.Qf?e.g=e.m||e.j:void 0!=n.B&&e.j<n.B?(e.g=n.B,e.i=null):e.g=e.j:e.g=t}function O(e){this.g=new E,this.h=e}function U(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var a=r.value}catch(t){return e.g.l=null,k(e.g,t),j(e)}
6return e.g.l=null,i.call(e.g,a),j(e)}function j(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,k(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Qf)throw t.Jf;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function B(e){this.next=function(t){return I(e.g),e.g.l?t=U(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=j(e)),t},this.throw=function(t){return I(e.g),e.g.l?t=U(e,e.g.l.throw,t,e.g.s):(k(e.g,t),t=j(e)),t},this.return=function(t){var n;return I(e.g),(n=e.g.l)?U(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),j(e))},this[Symbol.iterator]=function(){return this}}function F(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise(function(i,r){!function e(a){a.done?i(a.value):Promise.resolve(a.value).then(t,n).then(e,r)}(e.next())})}(new B(new O(e)))}function V(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function H(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{Of:r,v:a}}return{Of:-1,v:void 0}}function q(e,t,n){if(null==e)throw TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function G(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}E.prototype.s=function(e){this.h=e},E.prototype.return=function(e){this.i={return:e},this.g=this.j},E.prototype.B=function(e){this.g=e},g("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i(function(){t.l()})}this.g.push(e)};var r=p.setTimeout;n.prototype.i=function(e){r(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i(function(){throw e})},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{switch(typeof e){case"object":var n=null!=e;break;case"function":n=!0;break;default:n=!1}n?this.C(e):this.m(e)}},t.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"function"==typeof t?this.I(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.u()},t.prototype.G=function(){var e=this;r(function(){if(e.A()){var t=p.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.A=function(){if(this.o)return!1;var e=p.CustomEvent,t=p.Event,n=p.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=p.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.od(t.resolve,t.reject)},t.prototype.I=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t(function(e,t){r=e,a=t});return this.od(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.od=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=v(e),a=r.next();!a.done;a=r.next())i(a.value).od(t,n)})},t.all=function(e){var n=v(e),r=n.next();return r.done?i([]):new t(function(e,t){var a=[],o=0;do a.push(void 0),o++,i(r.value).od(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),g("WeakMap",function(e){function t(e){if(this.g=(s+=Math.random()+1).toString(),e){e=v(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){H(e,o)||f(e,o,{value:new n})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
6),n=Object.seal({}),i=new e([[t,2],[n,3]]);if(2!=i.get(t)||3!=i.get(n))return!1;return i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n)}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!H(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.g]=t,this},t.prototype.get=function(e){return i(e)&&H(e,o)?e[o][this.g]:void 0},t.prototype.has=function(e){return i(e)&&H(e,o)&&H(e[o],this.g)},t.prototype.delete=function(e){return!!(i(e)&&H(e,o)&&H(e[o],this.g))&&delete e[o][this.g]},t}),g("Map",function(e){function t(){var e={};return e.lb=e.next=e.head=e}function n(e,t){var n=e.g;return m(function(){if(n){for(;n.head!=e.g;)n=n.lb;for(;n.next!=n.head;)return{done:!1,value:t(n=n.next)};n=null}return{done:!0,value:void 0}})}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e.h[n];if(i&&H(e.h,n))for(e=0;e<i.length;e++){var r=i[e];if(t!=t&&r.key!=r.key||t===r.key)return{id:n,list:i,index:e,entry:r}}return{id:n,list:i,index:-1,entry:void 0}}function r(e){if(this.h={},this.g=t(),this.size=0,e){e=v(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||"s"!=r.value[1])return!1;return!(r=i.next()).done&&4==r.value[0].x&&"t"==r.value[1]&&!!i.next().done}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this.g,lb:this.g.lb,head:this.g,key:e,value:t},n.list.push(n.entry),this.g.lb.next=n.entry,this.g.lb=n.entry,this.size++),this},r.prototype.delete=function(e){return!!(e=i(this,e)).entry&&!!e.list&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.entry.lb.next=e.entry.next,e.entry.next.lb=e.entry.lb,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this.h={},this.g=this.g.lb=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).entry},r.prototype.get=function(e){return(e=i(this,e).entry)&&e.value},r.prototype.entries=function(){return n(this,function(e){return[e.key,e.value]})},r.prototype.keys=function(){return n(this,function(e){return e.key})},r.prototype.values=function(){return n(this,function(e){return e.value})},r.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var o=0;return r}),g("Set",function(e){function t(e){if(this.g=new Map,e){e=v(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return!function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(v([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||r.value[1]!=t)return!1;return!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done}catch(e){return!1}}()?(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach(function(i){return e.call(t,i,i,n)})},t):e}),g("Array.prototype.findIndex",function(e){return e||function(e,t){return K(this,e,t).Of}}),g("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),g("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for(0>(t=t||0)&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}),g("String.prototype.includes",function(e){return e||function(e,t){return -1!==q(this,e,"includes").indexOf(e,t||0)}}),g("Array.prototype.find",function(e){return e||function(e,t){return K(this,e,t).v}}),g("String.prototype.startsWith",function(e){return e||function(e,t){var n=q(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}}),g("Array.prototype.keys",function(e){return e||function(){return G(this,function(e){return e})}}),g("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),g("Array.prototype.values",function(e){return e||function(){return G(this,function(e,t){return t})}});var z="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)H(i,r)&&(e[r]=i[r])}return e};g("Object.assign",function(e){return e||z}),g("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}}),g("Array.prototype.entries",function(e){return e||function(){return G(this,function(e,t){return[e,t]})}}),g("String.prototype.repeat",function(e){return e||function(e){var t=q(this,null,"repeat");if(0>e||1342177279<e)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),g("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),g("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&1/0!==e&&-1/0!==e}}),g("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push(e[t]);return n}}),g("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),g("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),g("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}}),g("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)H(e,t)&&n.push([t,e[t]]);return n}});var X=this||self;function W(e,t){e=e.split(".");var n,i=X;for((e[0]in i)||void 0===i.execScript||i.execScript("var "+e[0]);e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function Y(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function $(e){return e.h/(1-Math.pow(e.g,e.i))}function J(){this.h=new Y(2),this.j=new Y(5),this.g=0,this.i=128e3,this.l=16e3}function Q(){}function Z(){}function ee(){}function et(e){var t=V.apply(1,arguments);ei.has(e)||(ei.add(e),ee.apply(Q,y(t)))}function en(){}Y.prototype.sample=function(e,t){var n=Math.pow(this.g,e);isNaN(t=t*(1-n)+n*this.h)||(this.h=t,this.i+=e)},J.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},J.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},J.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min($(this.h),$(this.j))};var ei=new Set;function er(e){if(eo.has(e))return eo.get(e);
6var t=MediaSource.isTypeSupported(e);return eo.set(e,t),t}function ea(){return!!e.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}e.console&&(ee=function(){return console.warn.apply(console,y(V.apply(0,arguments)))},Z=function(){console.error.apply(console,y(V.apply(0,arguments)))}),W("shaka.config.CodecSwitchingStrategy",{ri:"reload",pg:"smooth"});var eo=new Map;function es(){}function eu(){}function el(){}function ec(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(ed(e)==ed(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=ef(e);t=ef(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ed(e){return e instanceof ArrayBuffer?e:e.buffer}function eh(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function ef(e,t,n){return eg(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function ep(e,t,n){return eg(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eg(e,t,n,i){var r=(e.byteOffset||0)+e.byteLength;return t=Math.max(0,Math.min((e.byteOffset||0)+t,r)),new i(ed(e),t,Math.min(t+Math.max(n,0),r)-t)}function em(){}function ev(e){this.h=new eu,(e=ey[e.toLowerCase()])&&(this.h=e()),this.g=new es,(e=eb)&&(this.g=e())}es.prototype.extract=function(){},es.prototype.decode=function(){return[]},es.prototype.clear=function(){},eu.prototype.init=function(){},eu.prototype.parse=function(){return[]},W("shaka.util.BufferUtils",el),el.toDataView=ep,el.toUint8=ef,el.toArrayBuffer=eh,el.equal=ec,em.prototype.init=function(){},em.prototype.j=function(){},em.prototype.i=function(){},W("shaka.media.IClosedCaptionParser",em),ev.prototype.init=function(e){this.h.init(e)},ev.prototype.j=function(e){e=v(e=this.h.parse(e));for(var t=e.next();!t.done;t=e.next()){var n=ef((t=t.value).packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},ev.prototype.i=function(){this.g.clear()},W("shaka.media.ClosedCaptionParser",ev),ev.findDecoder=function(){return eb},ev.unregisterDecoder=function(){eb=null},ev.registerDecoder=function(e){eb=e},ev.findParser=function(e){return ey[e]},ev.unregisterParser=function(e){delete ey[e]},ev.registerParser=function(e,t){ey[e]=t};var ey={},eb=null;function ew(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function ex(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function eT(e,t,n){if(n||(n=ew),e.length!=t.length)return!1;t=t.slice();var i={};e=v(e);for(var r=e.next();!r.done;i={Yd:i.Yd},r=e.next()){if(i.Yd=r.value,-1==(r=t.findIndex(function(e){return function(t){return n(e.Yd,t)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function eS(e,t,n){if(n||(n=ew),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function eA(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new eH,this.position=null,this.positionAlign=ek,this.size=0,this.textAlign=eM,this.direction=eN,this.writingMode=eL,this.lineInterpretation=eP,this.line=null,this.lineHeight="",this.lineAlign=e_,this.displayAlign=eD,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=eB,this.fontStyle=eF,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={Cg:32,rows:15}}function eE(e,t){return(e=new eA(e,t,"")).lineBreak=!0,e}function eI(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n){if("nestedCues"==n){if(!eS(e.nestedCues,t.nestedCues,eI))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!eS(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}eA.prototype.clone=function(){var e,t=new eA(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},W("shaka.text.Cue",eA),eA.equal=eI,eA.prototype.clone=eA.prototype.clone;var ek="auto";eA.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ek};var eM="center",eC={LEFT:"left",RIGHT:"right",CENTER:eM,START:"start",END:"end"};eA.textAlign=eC;var eD="after",eR={BEFORE:"before",CENTER:"center",AFTER:eD};eA.displayAlign=eR;var eN="ltr";eA.direction={HORIZONTAL_LEFT_TO_RIGHT:eN,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var eL="horizontal-tb";eA.writingMode={HORIZONTAL_TOP_TO_BOTTOM:eL,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var eP=0;eA.lineInterpretation={LINE_NUMBER:eP,PERCENTAGE:1};
6var e_="start",eO={CENTER:"center",START:e_,END:"end"};eA.lineAlign=eO;var eU={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};eA.defaultTextColor=eU;var ej={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};eA.defaultTextBackgroundColor=ej;var eB=400;eA.fontWeight={NORMAL:eB,BOLD:700};var eF="normal",eV={NORMAL:eF,ITALIC:"italic",OBLIQUE:"oblique"};function eH(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=eK,this.scroll=eq}eA.fontStyle=eV,eA.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},W("shaka.text.CueRegion",eH);var eK=1;eH.units={PX:0,PERCENTAGE:eK,LINES:2};var eq="";function eG(){}function ez(e,t,n){eW[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,Rd:t}}function eX(e,t){for(var n=e.toLowerCase().split(";")[0],i=v([eQ,eJ,e$,eY]),r=i.next();!r.done;r=i.next())if(r=eW[n+"-"+r.value]){var a=r.Rd(),o=a.isSupported(e,t);if(a.destroy(),o)return r.Rd}return null}eH.scrollMode={NONE:eq,UP:"up"},eG.prototype.destroy=function(){},W("shaka.transmuxer.TransmuxerEngine",eG),eG.findTransmuxer=eX,eG.unregisterTransmuxer=function(e,t){delete eW[e.toLowerCase().split(";")[0]+"-"+t]},eG.registerTransmuxer=ez,eG.prototype.destroy=eG.prototype.destroy;var eW={},eY=1,e$=2,eJ=3,eQ=4;eG.PluginPriority={FALLBACK:eY,PREFERRED_SECONDARY:e$,PREFERRED:eJ,APPLICATION:eQ};var eZ=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* 7 @license 8 Copyright 2006 The Closure Library Authors 9 SPDX-License-Identifier: Apache-2.0 10*/function e0(e){var t;e instanceof e0?(e1(this,e.Wa),this.Pb=e.Pb,this.Ya=e.Ya,e2(this,e.fc),this.ya=e.ya,e4(this,e.g.clone()),this.zb=e.zb):e&&(t=String(e).match(eZ))?(e1(this,t[1]||"",!0),this.Pb=e3(t[2]||""),this.Ya=e3(t[3]||"",!0),e2(this,t[4]),this.ya=e3(t[5]||"",!0),e4(this,t[6]||"",!0),this.zb=e3(t[7]||"")):this.g=new tn(null)}function e1(e,t,n){e.Wa=n?e3(t,!0):t,e.Wa&&(e.Wa=e.Wa.replace(/:$/,""))}function e2(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.fc=t}else e.fc=null}function e4(e,t,n){t instanceof tn?e.g=t:(n||(t=e5(t,te)),e.g=new tn(t))}function e3(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function e5(e,t,n){return null!=e?(e=encodeURI(e).replace(t,e8),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function e8(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(b=e0.prototype).Wa="",b.Pb="",b.Ya="",b.fc=null,b.ya="",b.zb="",b.toString=function(){var e=[],t=this.Wa;if(t&&e.push(e5(t,e6,!0),":"),t=this.Ya){e.push("//");var n=this.Pb;n&&e.push(e5(n,e6,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.fc)&&e.push(":",String(t))}return(t=this.ya)&&(this.Ya&&"/"!=t.charAt(0)&&e.push("/"),e.push(e5(t,"/"==t.charAt(0)?e7:e9,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.zb)&&e.push("#",e5(t,tt)),e.join("")},b.resolve=function(e){var t=this.clone();"data"===t.Wa&&(t=new e0);var n=!!e.Wa;n?e1(t,e.Wa):n=!!e.Pb,n?t.Pb=e.Pb:n=!!e.Ya,n?t.Ya=e.Ya:n=null!=e.fc;var i=e.ya;if(n)e2(t,e.fc);else if(n=!!e.ya){if("/"!=i.charAt(0)){if(this.Ya&&!this.ya)i="/"+i;else{var r=t.ya.lastIndexOf("/");-1!=r&&(i=t.ya.substr(0,r+1)+i)}}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.ya=i:n=""!==e.g.toString(),n?e4(t,e.g.clone()):n=!!e.zb,n&&(t.zb=e.zb),t},b.clone=function(){return new e0(this)};var e6=/[#\/\?@]/g,e9=/[#\?:]/g,e7=/[#\?]/g,te=/[#\?@]/g,tt=/#/g;function tn(e){this.g=e||null}function ti(e){if(!e.sa&&(e.sa={},e.Gc=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),r=r||"",e.add(a,decodeURIComponent(r.replace(/\+/g," ")))}}function tr(e,t,n){var i=V.apply(3,arguments);
10if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,ta)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(b=tn.prototype).sa=null,b.Gc=null,b.add=function(e,t){ti(this),this.g=null;var n=this.sa.hasOwnProperty(e)?this.sa[e]:null;return n||(this.sa[e]=n=[]),n.push(t),this.Gc++,this},b.set=function(e,t){return ti(this),this.g=null,this.sa.hasOwnProperty(e)?this.sa[e]=[t]:this.add(e,t),this},b.toString=function(){if(this.g)return this.g;if(!this.sa)return"";var e,t=[];for(e in this.sa)for(var n=encodeURIComponent(e),i=this.sa[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},b.clone=function(){var e=new tn;if(e.g=this.g,this.sa){var t,n={};for(t in this.sa)n[t]=this.sa[t].concat();e.sa=n,e.Gc=this.Gc}return e},tr.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},W("shaka.util.Error",tr);var ta=!0;function to(e,t){return e.concat(t)}function ts(){}function tu(e){return null!=e}function tl(e,t){if(0==t.length)return e;if(1==e.length&&1==t.length)return e=new e0(e[0]),t=new e0(t[0]),[e.resolve(t).toString()];var n=t.map(function(e){return new e0(e)});return e.map(function(e){var t=new e0(e);return n.map(function(e){return t.resolve(e).toString()})}).reduce(to,[])}function tc(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function td(e,t){if(1==t.length)return t[0];if(null!=(e=th(e,t)))return e;throw new tr(2,4,4025,t)}function th(e,t){for(var n=v(tg[e]),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=v(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==tf?"":null}tr.Severity={RECOVERABLE:1,CRITICAL:2},tr.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},tr.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_
10LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};var tf="text",tp={ka:"video",T:"audio",ea:tf,zc:"image",Th:"application"},tg={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function tm(){}function tv(e,t){var n=e;return t&&!tA.includes(e)&&(n+='; codecs="'+t+'"'),n}function ty(e,t){return t&&(e+='; codecs="'+t+'"'),e}function tb(e,t,n){var i=tv(e,t);return eX(t=ty(e,t))?(e=eX(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function tw(e){var t=tS(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"dvh1"===e:case"dvhe"===e:return"dovi"}return e}function tx(e){return e.split(";")[0]}function tT(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function tS(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}W("shaka.util.MimeUtils",tm),tm.getFullTypeWithAllCodecs=ty,tm.getFullType=tv,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var tA=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function tE(e){this.i=null,this.j=e,this.u=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.A="",this.o=new Map}function tI(e){return!!tM[e]||("application/cea-608"==e||"application/cea-708"==e)&&!!eb}
10function tk(e,t,n){if(e.A=t,t=e.o.get(t))for(var i=v(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(e){return e.endTime<=n}))&&e.j.append(r)}tE.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},tE.prototype.remove=function(e,t){var n=this;return F(function(i){if(1==i.g)return M(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),C(i)})},W("shaka.text.TextEngine",tE),tE.prototype.destroy=tE.prototype.destroy,tE.findParser=function(e){return tM[e]},tE.unregisterParser=function(e){delete tM[e]},tE.registerParser=function(e,t){tM[e]=t};var tM={};function tC(){}function tD(e,t){return e=tL(e),t=tL(t),e.split("-")[0]==t.split("-")[0]}function tR(e,t){return e=tL(e),t=tL(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function tN(e,t){return e=tL(e),t=tL(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function tL(e){var t=e.split("-x-"),n=t[0].split("-");return e=n[0]||"",n=n[1]||"",t=t[1]?"x-"+t[1]:"",e=e.toLowerCase(),e=tj.get(e)||e,((n=n.toUpperCase())?e+"-"+n:e)+(t?"-"+t:"")}function tP(e,t){return e=tL(e),(t=tL(t))==e?4:tR(t,e)?3:tN(t,e)?2:tR(e,t)?1:0}function t_(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),e=tj.get(e)||e}function tO(e){return e.language?tL(e.language):e.audio&&e.audio.language?tL(e.audio.language):e.video&&e.video.language?tL(e.video.language):"und"}function tU(e,t){e=tL(e);var n=new Set,i=v(t);for(t=i.next();!t.done;t=i.next())n.add(tL(t.value));for(t=(i=v(n)).next();!t.done;t=i.next())if((t=t.value)==e)return t;for(t=(i=v(n)).next();!t.done;t=i.next())if(tR(t=t.value,e))return t;for(t=(i=v(n)).next();!t.done;t=i.next())if(tN(t=t.value,e))return t;for(t=(n=v(n)).next();!t.done;t=n.next())if(tR(e,t=t.value))return t;return null}W("shaka.util.LanguageUtils",tC),tC.findClosestLocale=tU,tC.getLocaleForVariant=tO,tC.getLocaleForText=function(e){return tL(e.language||"und")},tC.getBase=t_,tC.relatedness=tP,tC.areSiblings=function(e,t){var n=t_(e),i=t_(t);return e!=n&&t!=i&&n==i},tC.normalize=tL,tC.isSiblingOf=tN,tC.isParentOf=tR,tC.areLanguageCompatible=tD,tC.areLocaleCompatible=function(e,t){return(e=tL(e))==(t=tL(t))};var tj=new Map([["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"],["bih","bh"],["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","
10sa"],["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"],["tib","bo"],["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"]]);function tB(){this.g={}}function tF(e){this.h=e,this.g=null}function tV(e){this.h=e,this.g=null}function tH(){return!!e.MediaSource&&!!MediaSource.isTypeSupported}function tK(e){return""!=t0().canPlayType(e)}function tq(){return!!navigator.userAgent.match(/Edge?\//)}function tG(){return tZ("Xbox One")}function tz(){return tZ("Tizen")}function tX(){return tZ("Tizen 3")}function tW(){return tZ("Tizen 2")}function tY(){return tZ("Web0S")&&tZ("Chrome/38.0.2125.122 Safari/537.36")}function t$(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tz()&&!tZ("PC=EOS")&&!tZ("VirginMedia")&&!tZ("SOPOpenBrowser")&&!tJ()&&!tZ("AFT")}function tJ(){return tZ("PlayStation 4")}function tQ(){if(!t$())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e?parseInt(e[1],10):(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function tZ(e){return(navigator.userAgent||"").includes(e)}function t0(){return t2||(t1||(t1=new tV(function(){t2=null})),(t2=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(t2=document.createElement("video")),t1.U(1)),t2}(b=tB.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},b.get=function(e){return(e=this.g[e])?e.slice():null},b.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter(function(e){return e!=t}),0==this.g[e].length&&delete this.g[e])},b.forEach=function(e){for(var t in this.g)e(t,this.g[t])},b.size=function(){return Object.keys(this.g).length},b.keys=function(){return Object.keys(this.g)},tF.prototype.U=function(t){var n=this;this.stop();var i=!0,r=null;return this.g=function(){e.clearTimeout(r),i=!1},r=e.setTimeout(function(){i&&n.h()},1e3*t),this},tF.prototype.stop=function(){this.g&&(this.g(),this.g=null)},tV.prototype.kc=function(){return this.stop(),this.h(),this},tV.prototype.U=function(e){var t=this;return this.stop(),this.g=new tF(function(){t.h()}).U(e),this},tV.prototype.La=function(e){var t=this;return this.stop(),this.g=new tF(function(){t.g.U(e),t.h()}).U(e),this},tV.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},W("shaka.util.Timer",tV),tV.prototype.stop=tV.prototype.stop,tV.prototype.tickEvery=tV.prototype.La,tV.prototype.tickAfter=tV.prototype.U,tV.prototype.tickNow=tV.prototype.kc;var t1=null,t2=null;function t4(){}function t3(e,t,n,i,r){var a=e.variants;if((t.length||n.length)&&(a=function(e,t,n){var i={};t=v(t);for(var r=t.next();!r.done;i={ce:i.ce},r=t.next())if(i.ce=r.value,(r=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.ce)}}(i))).length){e=r;break}for(i={},t=(n=v(n)).next();!t.done;i={Xd:i.Xd},t=n.next())if(i.Xd=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Xd)}}(i))).length){e=t;break}return e}(a,t,n)),r.length){for(t=new tB,a=(n=v(a)).next();!a.done;a=n.next())a=a.value,t.push(String(a.video.width||0),a);var o=[];t.forEach(function(e,t){e=0;var n=[],i={};t=v(t);for(var a=t.next();!a.done;i={yc:i.yc},a=t.next())i.yc=a.value,(a=r.filter(function(e){return function(t){return e.yc.decodingInfos[0][t]}}(i)).length)>e?(e=a,n=[i.yc]):a==e&&n.push(i.yc);o.push.apply(o,y(n))}),a=o}for(i&&(a=nd(a,i)),t=new Set,i=new Set,a=(n=v(a)).next();!a.done;a=n.next())(a=a.value).audio&&t.add(a.audio),a.video&&i.add(a.video);t=Array.from(t).sort(function(e,t){return e.bandwidth-t.bandwidth}),a=new Map,t=v(t);for(var s=t.next();!s.done;s=t.next())s=(n=s.value).language+(n.channelsCount||0)+n.roles.join(",")+n.label,a.has(s)?a.get(s).bandwidth>n.bandwidth&&a.set(s,n):a.set(s,n);
10for(a=[].concat(y(a.values())),n=Array.from(i).sort(function(e,t){return e.bandwidth&&t.bandwidth?e.bandwidth-t.bandwidth:e.width-t.width}),i=ea(),t=[],s=(n=v(n)).next();!s.done;s=n.next())if(s=s.value,t.length){var u=t[t.length-1];if(!i){var l=tw(u.codecs),c=tw(s.codecs);if(l!==c)continue}s.width>u.width||s.height>u.height?t.push(s):s.width==u.width&&s.height==u.height&&(l=tw(u.codecs))==(c=tw(s.codecs))&&s.bandwidth<u.bandwidth&&t.push(s)}else t.push(s);var d=a.map(function(e){return e.id}),h=t.map(function(e){return e.id});e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,(!t||!!d.includes(t.id))&&(!e||!!h.includes(e.id))})}function t5(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y=e.video;return(!y||!y.width||!y.height||(i=y.width,r=t.minWidth,a=Math.min(t.maxWidth,n.width),i>=r&&i<=a&&(o=y.height,s=t.minHeight,u=Math.min(t.maxHeight,n.height),o>=s&&o<=u)&&(l=y.width*y.height,c=t.minPixels,d=t.maxPixels,l>=c&&l<=d)))&&(!e||!e.video||!e.video.frameRate||(h=e.video.frameRate,f=t.minFrameRate,p=t.maxFrameRate,h>=f&&h<=p))&&(g=e.bandwidth,m=t.minBandwidth,v=t.maxBandwidth,g>=m&&g<=v)}function t8(e,t){return F(function(n){if(1==n.g)return M(n,t9(e.variants,t,!1,[]),2);e.variants=e.variants.filter(function(e){var t=e.video;if(t){var n=nt(t.codecs);if(t.codecs.includes(",")){var i=t.codecs.split(",");n=nt(n=td("video",i)),i=ne(i=td("audio",i));var r=tb(t.mimeType,i,"audio");if(!er(r))return!1;n=[n,i].join()}if(!er(i=tb(t.mimeType,n,"video")))return!1;t.codecs=n}if(n=e.audio){if(i=ne(n.codecs),!er(r=tb(n.mimeType,i,"audio")))return!1;n.codecs=i}return tG()&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&(t.codecs.includes("avc1.")||t.codecs.includes("avc3."))?(np(e),!1):((t=e.decodingInfos.some(function(e){return e.supported}))||np(e),t)}),C(n)})}function t6(e,t){var n,i,r;return F(function(a){switch(a.g){case 1:if(n=function e(t){var n=[];for(i in t)n.push(i);n.sort();var i=[];n=v(n);for(var r=n.next();!r.done;r=n.next()){var a=r.value;r=JSON.stringify(a),a=(a=t[a])instanceof Object?e(a):JSON.stringify(a),i.push(r+":"+a)}return"{"+i.join(",")+"}"}(t),D(a,2),(i=nm)[n]){e.decodingInfos.push(i[n]),a.B(4);break}return M(a,navigator.mediaCapabilities.decodingInfo(t),5);case 5:r=a.h,i[n]=r,e.decodingInfos.push(r);case 4:N(a,0);break;case 2:L(a),JSON.stringify(t),C(a)}})}function t9(e,t,n,i){var r,a,o,s,u,l,c,d,h,f,p,g;return F(function(m){switch(m.g){case 1:if(e.some(function(e){return e.decodingInfos.length}))return m.return();r={},o=(a=v(i)).next();case 2:if(o.done){m.B(4);break}r.Zd=o.value,s=!1,l=(u=v(e)).next();case 5:var y;if(l.done){m.B(7);break}h=(d=v(t7(c=l.value,t,n).filter((y=r,function(e){return(e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)===y.Zd})))).next();case 8:if(h.done){m.B(10);break}return M(m,t6(c,h.value),9);case 9:h=d.next(),m.B(8);break;case 10:c.decodingInfos.length&&(s=!0),l=u.next(),m.B(5);break;case 7:if(s)return m.return();r={Zd:r.Zd},o=a.next(),m.B(2);break;case 4:l=(f=v(e)).next();case 12:if(l.done){m.B(0);break}h=(g=v(t7(p=l.value,t,n).filter(function(e){return!(e=e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(h.done){l=f.next(),m.B(12);break}return M(m,t6(p,h.value),16);case 16:h=g.next(),m.B(15)}})}function t7(e,t,n){var i=e.audio,r=e.video;if(n={type:n?"file":"media-source"},r){var a=r.codecs;if(r.codecs.includes(",")){var o=r.codecs.split(",");a=nt(a=td("video",o)),o=ne(o=td("audio",o)),o=tb(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=nt(a),a=tb(r.mimeType,a,"video"),n.video={contentType:a,width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":n.video.transferFunction="srgb";break;case"PQ":n.video.transferFunction="pq";break;case"HLG":n.video.transferFunction="hlg"}}if(i&&(a=ne(i.codecs),a=tb(i.mimeType,a,"audio"),n.audio={contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio}),!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[n];e=[],a=new Map,o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=s.value;a.get(u.keySystem)||a.set(u.keySystem,[]),a.get(u.keySystem).push(u)}o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],u=v(a.
10keys());for(var l=u.next();!l.done;l=u.next()){var c=l.value;l=Object.assign({},n);var d=a.get(c);for(c={keySystem:c,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(d=v(d)).next();!s.done;s=d.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,f=v(s.initData),p=f.next();!p.done;p=f.next())h.add(p.value.initDataType);c.initDataType=s.initData[0].initDataType}s.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),s.persistentStateRequired&&(c.persistentState="required"),s.sessionType&&(c.sessionTypes=[s.sessionType]),i&&(""!=s.audioRobustness?c.audio?c.audio.robustness=c.audio.robustness||s.audioRobustness:c.audio={robustness:s.audioRobustness}:c.audio||(c.audio={})),r&&(""!=s.videoRobustness?c.video?c.video.robustness=c.video.robustness||s.videoRobustness:c.video={robustness:s.videoRobustness}:c.video||(c.video={}))}l.keySystemConfiguration=c,e.push(l)}return e}function ne(e){return"fLaC"===e?"flac":"Opus"===e?"opus":tz()&&"ac-3"==e.toLowerCase()?"ec-3":e}function nt(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+"."+parseInt(t.shift(),10).toString(16)+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function nn(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=v(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=v(n.roles)).next();!h.done;h=d.next())c.add(h.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null),t&&(e.audioId=t.
10id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function ni(e){return{id:e.id,active:!1,type:tf,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function nr(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=e.segmentIndex.get(0));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function na(e){return e.__shaka_id||(e.__shaka_id=nv++),e.__shaka_id}function no(e){var t=nu(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function ns(e){var t=nu(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function nu(e){var t=e.language;return{id:na(e),active:!1,type:"",bandwidth:0,language:tL(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioR
10oles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function nl(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function nc(e){return e.filter(function(e){return nl(e)})}function nd(e,t){var n=e.filter(function(e){return e.audio&&e.audio.channelsCount}),i=new Map,r=[];n=v(n);for(var a=n.next();!a.done;a=n.next()){var o=(a=a.value).audio.channelsCount;i.has(o)||i.set(o,[]),i.get(o).push(a),o<=t&&r.push(a)}return r.length?r:0==(t=Array.from(i.keys())).length?e:i.get(Math.min.apply(Math,y(t)))}function nh(e,t,n,i){var r=e,a=e.filter(function(e){return e.primary});a.length&&(r=a);var o=r.length?r[0].language:"";if(r=r.filter(function(e){return e.language==o}),t){var s=tU(tL(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return tL(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=nf(r,n)).length)return e}else if((e=r.filter(function(e){return 0==e.roles.length})).length)return e;return(e=r.map(function(e){return e.roles}).reduce(to,[])).length?nf(r,e[0]):r}function nf(e,t){return e.filter(function(e){return e.roles.includes(t)})}function np(e){var t=[];return e.audio&&t.push(ng(e.audio)),e.video&&t.push(ng(e.video)),t.join(", ")}function ng(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}W("shaka.util.StreamUtils",t4),t4.meetsRestrictions=t5;var nm={},nv=0,ny=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),nb=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function nw(){var e=this;this.m=null,this.o=!1,this.i=new J,this.u=null,navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(e.o&&e.g.useNetworkInformation){e.i=new J,e.g&&e.i.configure(e.g.advanced);var t=e.chooseVariant();t&&e.m(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.u)),this.l=[],this.A=1,this.F=!1,this.h=this.j=this.g=this.s=null,this.C=new tV(function(){if(e.g.restrictToElementSize){var t=e.chooseVariant();t&&e.m(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}})}function nx(e){var t=e.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.g.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function nT(e,t,n,i){return e&&(t=t.filter(function(t){return t5(t,e,{width:i,height:n})})),t.sort(function(e,t){return e.bandwidth-t.bandwidth})}(b=nw.prototype).stop=function(){this.m=null,this.o=!1,this.l=[],this.A=1,this.j=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.C.stop()},b.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null),this.C=null},b.init=function(e){this.m=e},b.chooseVariant=function(){var t=1/0,n=1/0;if(this.g.restrictToScreenSize){var i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio;t=e.screen.height*i,n=e.screen.width*i}if(this.h&&this.g.restrictToElementSize&&(i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,t=Math.min(t,this.j.clientHeight*i),n=Math.min(n,this.j.clientWidth*i)),i=nT(this.g.restrictions,this.l,1/0,1/0),1/0!=t||1/0!=n){i=v(i=function(e){var t=[];e=v(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(e,t){return e.width-t.width})}(i));for(var r=i.next();!r.done;r=i.next())if((r=r.value).height>=t&&r.width>=n){t=r.height,n=r.width;break}i=nT(this.g.restrictions,this.l,t,n)}for(t=this.i.getBandwidthEstimate(nx(this)),this.l.length&&!i.length&&(i=[(i=nT(null,this.l,1/0,1/0))[0]]),n=i[0]||null,r=0;r<i.length;r++){for(var a=i[r],o=isNaN(this.A)?1:Math.abs(this.A),s=o*a.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},l=r+1;l<i.length;l++)if(a.bandwidth!=i[l].bandwidth){u=i[l];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,t>=s&&t<=o&&n.bandwidth!=a.bandwidth&&(n=a)}return this.s=Date.now(),n},b.enable=function(){this.o=!0},b.disable=function(){this.o=!1},b.segmentDownloaded=function(e,t){if(this.i.sample(e,t),null!=this.s&&this.o)e:{if
10(this.F){if(Date.now()-this.s<1e3*this.g.switchInterval)break e}else{if(!((e=this.i).g>=e.i))break e;this.F=!0}e=this.chooseVariant(),this.i.getBandwidthEstimate(nx(this)),e&&this.m(e,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}},b.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(nx(this))},b.setVariants=function(e){this.l=e},b.playbackRateChanged=function(e){this.A=e},b.setMediaElement=function(t){var n=this;this.j=t,this.h&&(this.h.disconnect(),this.h=null),this.j&&"ResizeObserver"in e&&(this.h=new ResizeObserver(function(){n.C.U(nS)}),this.h.observe(this.j))},b.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},W("shaka.abr.SimpleAbrManager",nw),nw.prototype.configure=nw.prototype.configure,nw.prototype.setMediaElement=nw.prototype.setMediaElement,nw.prototype.playbackRateChanged=nw.prototype.playbackRateChanged,nw.prototype.setVariants=nw.prototype.setVariants,nw.prototype.getBandwidthEstimate=nw.prototype.getBandwidthEstimate,nw.prototype.segmentDownloaded=nw.prototype.segmentDownloaded,nw.prototype.disable=nw.prototype.disable,nw.prototype.enable=nw.prototype.enable,nw.prototype.chooseVariant=nw.prototype.chooseVariant,nw.prototype.init=nw.prototype.init,nw.prototype.release=nw.prototype.release,nw.prototype.stop=nw.prototype.stop;var nS=1;function nA(e,t){this.g=e,this.h=t}function nE(e,t){var n=new nA(5,0),i=nM,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function nI(e,t,n,i){ee([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function nk(e,t,n,i){Z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(""))}nA.prototype.toString=function(){return"v"+this.g+"."+this.h};var nM=null;function nC(e,t){for(this.h=e,this.g=new Set([e]),t=(e=v(t=t||[])).next();!t.done;t=e.next())this.add(t.value)}function nD(e,t,n){if(n=void 0===n||n,!(i=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(i=e.audio&&t.audio)){i=e.audio;var i,r=t.audio;i=!(!((!i.channelsCount||!r.channelsCount||2<i.channelsCount||2<r.channelsCount)&&i.channelsCount!=r.channelsCount||n&&!nR(i,r))&&nN(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=e.video&&t.video)&&(e=e.video,t=t.video,i=!((!n||nR(e,t))&&nN(e.roles,t.roles))),!i}function nR(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(e){return tS(e)[0]}),t=t.codecs.split(",").map(function(e){return tS(e)[0]}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function nN(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=v(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function nL(e){var t=void 0===t?"reload":t;this.h=e,this.g=t,this.i=new nP(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"","",t)}function nP(e,t,n,i,r,a){this.l=e,this.m=t,this.g=n,this.h=i,this.i=void 0===r?"":r,this.j=void 0===a?"reload":a}function n_(){this.g=nj,this.h=(new Map).set(nj,2).set(nU,1)}function nO(e,t,n){e.h.set(nj,n).set(nU,t)}W("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),nC.prototype.add=function(e,t){return t=void 0===t||t,!!nD(this.h,e,void 0===t||t)&&(this.g.add(e),!0)},nC.prototype.values=function(){return this.g.values()},nL.prototype.create=function(e){var t=this,n="smooth"==this.g&&ea(),i=e.filter(function(e){return nD(t.h,e,!n)});return i.length?new nC(i[0],i):this.i.create(e)},nP.prototype.create=function(t){var n,i,r,a,o,s,u,l,c,d=[];n=t,d=(r=tU(tL(this.l),n.map(function(e){return tO(e)})))?n.filter(function(e){return r==tO(e)}):[];var h=t.filter(function(e){return e.primary});(a=d=d.length?d:h.length?h:t,o=this.m,t=a.filter(function(e){return!!e.audio&&(o?e.audio.roles.includes(o):0==e.audio.roles.length)})).length&&(d=t),this.h&&(s=d,"AUTO"==(u=this.h)&&(u=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR"),t=s.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==u})).length&&(d=t),this.g&&(t=nd(d,this.g)).length&&(d=t),this.i&&(l=d,c=this.i,t=l.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==c.toLowerCase()})).length&&(d=t),t="smooth"==this.j&&ea(),h=new nC(d[0]),d=v(d);for(var f=d.next();!f.done;f=d.next())h.add(f.value,!t);return h};var nU=0,nj=1;function nB(e,t){var n=nV();this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function nF(e){var t,n;return F(function(i){if(1==i.g){if(e.g>=e.l){if(e.i)e.g=1,e.h=e.j;else throw new tr(2,7,1010)}return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),M(i,new Promise(function(e){new tV(e).U(n/1e3)}),2))}e.h*=e.m,C(i)})}function nV(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function nH(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function nK(e,t){this.promise=e,this.i=t,this.g=!1}function nq(e){return new nK(Promise.reject(e),function(){return Promise.resolve()})}function nG(){var e=Promise.reject(new tr(2,7,7001));return e.catch(function(){}),new nK(e,function(){return Promise.resolve()})}function nz(e){return new nK(Promise.resolve(e),function(){return Promise.resolve()})}function nX(e){return new nK(e,function(){return e.catch(function(){})})}function nW(e){return new nK(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function nY(t,n){if(n){if(n instanceof Map)for(var i=v(n.keys()),r=i.next();!r.done;r=i.next())Object.defineProperty(this,r=r.value,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0})}this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function n$(e){var t,n=new nY(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}nH.prototype.resolve=function(){},nH.prototype.reject=function(){},nK.prototype.abort=function(){return this.g=!0,this.i()},nK.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},nK.prototype.ga=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);if(i&&i.promise&&i.abort)return n.resolve(i.promise),function(){return i.abort()};return n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})}}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new nH,o=new tr(2,7,7001);return this.promise.then(n(!0),n(!1)),new nK(a,function(){return i()})},W("shaka.util.AbortableOperation",nK),nK.prototype.chain=nK.prototype.ga,nK.prototype.finally=nK.prototype.finally,nK.all=nW,
10nK.prototype.abort=nK.prototype.abort,nK.notAbortable=nX,nK.completed=nz,nK.aborted=nG,nK.failed=nq,nY.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},nY.prototype.stopImmediatePropagation=function(){this.g=!0},nY.prototype.stopPropagation=function(){},W("shaka.util.FakeEvent",nY);var nJ={Vh:"abrstatuschanged",Wh:"adaptation",Xh:"buffering",Yh:"downloadfailed",Zh:"downloadheadersreceived",$h:"drmsessionupdate",bi:"emsg",pi:"prft",Error:"error",ci:"expirationupdated",di:"gapjumped",fi:"keystatuschanged",hi:"loaded",ii:"loading",ki:"manifestparsed",li:"manifestupdated",mi:"mediaqualitychanged",Metadata:"metadata",ni:"onstatechange",oi:"onstateidle",si:"ratechange",ti:"segmentappended",ui:"sessiondata",vi:"stalldetected",wi:"statechanged",xi:"streaming",yi:"textchanged",zi:"texttrackvisibility",Ai:"timelineregionadded",Bi:"timelineregionenter",Ci:"timelineregionexit",Di:"trackschanged",Fi:"unloading",Hi:"variantchanged"};function nQ(){this.ca=new tB,this.Ed=this}function nZ(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function n0(e){var t,n={};for(t in e)n[t]=e[t];return n}function n1(){this.g=[]}function n2(e,t){e.g.push(t.finally(function(){ex(e.g,t)}))}function n4(e,t,n,i){nQ.call(this),this.i=!1,this.m=new n1,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.u=i||null,this.o=!1}function n3(e,t,n,i){n=n||n7;var r=ie[e];(!r||n>=r.priority)&&(ie[e]={priority:n,Rd:t,yh:void 0!==i&&i})}function n5(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function n8(){this.g=0}function n6(e,t,n){nK.call(this,e,t),this.h=n}nQ.prototype.addEventListener=function(e,t){this.ca&&this.ca.push(e,t)},nQ.prototype.removeEventListener=function(e,t){this.ca&&this.ca.remove(e,t)},nQ.prototype.dispatchEvent=function(e){if(!this.ca)return!0;var t=this.ca.get(e.type)||[],n=this.ca.get("All");for(n&&(t=t.concat(n)),n=(t=v(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Ed,e.currentTarget=this.Ed;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},nQ.prototype.release=function(){this.ca=null},n1.prototype.destroy=function(){for(var e=[],t=v(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},A(n4,nQ),(b=n4.prototype).kf=function(e){this.o=e},b.zh=function(e){this.g.add(e)},b.Ph=function(e){this.g.delete(e)},b.zg=function(){this.g.clear()},b.Ah=function(e){this.h.add(e)},b.Qh=function(e){this.h.delete(e)},b.Ag=function(){this.h.clear()},b.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),nQ.prototype.release.call(this),this.m.destroy()},b.request=function(e,t,n){var i=this,r=new n8;if(this.i){var a=Promise.reject(new tr(2,7,7001));return a.catch(function(){}),new n6(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?nZ(t.retryParameters):nV(),t.uris=nZ(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.ga(function(){return n.body&&(n.body=eh(n.body)),e(t,n,i)})}var a=nz(void 0);e.u&&r(e.u),e=v(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.ga(void 0,function(e){if(e instanceof tr&&7001==e.code)throw e;throw new tr(2,1,1006,e)})}(this,e,t,n)).ga(function(){return function e(t,n,i,r,a,o,s){t.o&&(i.uris[a]=i.uris[a].replace("http://","https://"));var u=new e0(i.uris[a]),l=u.Wa,c=!1;l||(e1(u,l=(l=location.protocol).slice(0,-1)),i.uris[a]=u.toString());var d=(l=ie[l=l.toLowerCase()])?l.Rd:null;if(!d)return nq(new tr(2,1,1e3,u));var h,f=l.yh,p=null,g=null,m=!1,v=!1;return nX(nF(r)).ga(function(){if(t.i)return nG();h=Date.now();var e=d(i.uris[a],i,n,function(e,i,r){p&&p.stop(),g&&g.U(o/1e3),t.l&&n==n9&&(t.l(e,i),c=!0,s.g=r)},function(e){t.j&&t.j(e,i,n),v=!0});if(!f)return e;var r=i.retryParameters.connectionTimeout;r&&(p=new tV(function(){m=!0,e.abort()})).U(r/1e3);var o=i.retryParameters.stallTimeout;return o&&(g=new tV(function(){m=!0,e.abort()})),e}).ga(function(e){p&&p.stop(),g&&g.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-h);var r={response:e,ih:c};return!v&&t.j&&t.j(e.headers,i,n),r},function(u){if(p&&p.stop(),g&&g.stop(),t.s){var l=null,c=0;u instanceof tr&&(l=u,1001==u.code&&(c=u.data[1])),t.s(i,l,c,m)}if(t.i)return nG();if(m&&(u=new tr(1,1,1003,i.uris[a],n)),u instanceof tr){if(7001==u.code)throw u;if(1010==u.code)throw o;if(1==u.severity)return l=(new Map).set("error",u),l=new nY("retry",l),t.dispatchEvent(l),a=(a+1)%i.uris.length,e(t,n,i,r,a,u,s)}throw u})}(i,e,t,new nB(t.retryParameters,!1),0,null,r)}),s=o.ga(function(t){return function(e,t,n,i){var r=nz(void 0),a={};e=v(e.h);for(var o=e.next();!o.done;a={ae:a.ae},o=e.next())a.ae=o.value,r=r.ga(function(e){return function(){var r=n.response;return r.data&&(r.data=eh(r.data)),e.ae(t,r,i)}}(a));return r.ga(function(){return n},function(e){var t=2;if(e instanceof tr){if(7001==e.code)throw e;t=e.severity}throw new tr(t,1,1007,e)})}(i,e,t,n)}),u=Date.now(),l=0;a.promise.then(function(){l=Date.now()-u},function(){});var c=0;o.promise.then(function(){c=Date.now()},function(){});var d=s.ga(function(n){var r=Date.now()-c,a=n.response;
10return a.timeMs+=l,a.timeMs+=r,n.ih||!i.l||a.fromCache||"HEAD"==t.method||e!=n9||i.l(a.timeMs,a.data.byteLength),a},function(e){throw e&&(e.severity=2),e});return a=new n6(d.promise,function(){return d.abort()},r),n2(this.m,a),a},W("shaka.net.NetworkingEngine",n4),n4.prototype.request=n4.prototype.request,n4.prototype.destroy=n4.prototype.destroy,n4.makeRequest=n5,n4.defaultRetryParameters=function(){return nV()},n4.prototype.clearAllResponseFilters=n4.prototype.Ag,n4.prototype.unregisterResponseFilter=n4.prototype.Qh,n4.prototype.registerResponseFilter=n4.prototype.Ah,n4.prototype.clearAllRequestFilters=n4.prototype.zg,n4.prototype.unregisterRequestFilter=n4.prototype.Ph,n4.prototype.registerRequestFilter=n4.prototype.zh,n4.unregisterScheme=function(e){delete ie[e]},n4.registerScheme=n3,n4.prototype.setForceHTTPS=n4.prototype.kf,n4.NumBytesRemainingClass=n8,A(n6,nK),n4.PendingRequest=n6;var n9=1;n4.RequestType={MANIFEST:0,SEGMENT:n9,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7},n4.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var n7=3;n4.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:n7};var ie={};function it(e){this.g=!1,this.h=new nH,this.i=e}function ii(e,t){if(e.g){if(t instanceof tr&&7003==t.code)throw t;throw new tr(2,7,7003,t)}}function ir(){this.g=new tB}function ia(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(void 0==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(e){return!n.has(e)}),!function(e){var t=io;if(void 0==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}io=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}it.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))},(b=ir.prototype).release=function(){this.vb(),this.g=null},b.D=function(e,t,n,i){this.g&&(e=new ia(e,t,n,i),this.g.push(t,e))},b.ma=function(e,t,n,i){var r=this;this.D(e,t,function i(a){r.Ob(e,t,i),n(a)},i)},b.Ob=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=v(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Ob(),this.g.remove(t,r))}},b.vb=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,y(t.g[e]));for(n=(t=v(n)).next();!n.done;n=t.next())n.value.Ob();this.g.g={}}},W("shaka.util.EventManager",ir),ir.prototype.removeAll=ir.prototype.vb,ir.prototype.unlisten=ir.prototype.Ob,ir.prototype.listenOnce=ir.prototype.ma,ir.prototype.listen=ir.prototype.D,ir.prototype.release=ir.prototype.release,ia.prototype.Ob=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var io=void 0;function is(e,t){var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function iu(e){this.h=e,this.g=void 0}function il(e){for(var t=new Map,n=v(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function ic(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function id(){}function ih(t){if(!t)return"";if(239==(t=ef(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!tJ())return(t=(new TextDecoder).decode(t)).includes("�")&&Z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if(0==(128&t[i])?r=t[i]:t.length>=i+2&&192==(224&t[i])&&128==(192&t[i+1])?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&224==(240&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&240==(241&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])&&128==(192&t[i+3])&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3),65535>=r)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10))+String.fromCharCode(56320+a)}}return n}
10function ip(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new tr(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=ep(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return iy.value()(i)}function ig(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=ef(e);if(239==n[0]&&187==n[1]&&191==n[2])return ih(n);if(254==n[0]&&255==n[1])return ip(n.subarray(2),!1);if(255==n[0]&&254==n[1])return ip(n.subarray(2),!0);if(0==n[0]&&0==n[2])return ip(e,!1);if(0==n[1]&&0==n[3])return ip(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return ih(e);throw new tr(2,2,2003)}function im(t){if(e.TextEncoder&&!tJ()){var n=new TextEncoder;return eh(n.encode(t))}t=unescape(t=encodeURIComponent(t)),n=new Uint8Array(t.length);for(var i=0;i<t.length;i++)n[i]=t[i].charCodeAt(0);return eh(n)}function iv(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}iu.prototype.value=function(){return void 0==this.g&&(this.g=this.h()),this.g},W("shaka.util.StringUtils",id),id.resetFromCharCode=function(){iy.g=void 0},id.toUTF16=iv,id.toUTF8=im,id.fromBytesAutoDetect=ig,id.fromUTF16=ip,id.fromUTF8=ih;var iy=new iu(function(){for(var e={qb:65536};0<e.qb;e={qb:e.qb},e.qb/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}(e.qb))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.qb)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.qb));return n}}(e);return null});function ib(e,t){this.h=ep(e),this.i=t==ix,this.g=0}function iw(){return new tr(2,3,3e3)}(b=ib.prototype).oa=function(){return this.g<this.h.byteLength},b.la=function(){return this.g},b.getLength=function(){return this.h.byteLength},b.ua=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw iw()}},b.Ua=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw iw()}},b.L=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw iw()}},b.Yf=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw iw()}},b.hc=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw iw()}if(2097151<t)throw new tr(2,3,3001);return this.g+=8,4294967296*t+e},b.mb=function(e){if(this.g+e>this.h.byteLength)throw iw();var t=ef(this.h,this.g,e);return this.g+=e,t},b.skip=function(e){if(this.g+e>this.h.byteLength)throw iw();this.g+=e},b.Gh=function(e){if(this.g<e)throw iw();this.g-=e},b.seek=function(e){if(0>e||e>this.h.byteLength)throw iw();this.g=e},b.Yc=function(){for(var e=this.g;this.oa()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=ef(this.h,e,this.g-e),this.g+=1,ih(e)},W("shaka.util.DataViewReader",ib),ib.prototype.readTerminatedString=ib.prototype.Yc,ib.prototype.seek=ib.prototype.seek,ib.prototype.rewind=ib.prototype.Gh,ib.prototype.skip=ib.prototype.skip,ib.prototype.readBytes=ib.prototype.mb,ib.prototype.readUint64=ib.prototype.hc,ib.prototype.readInt32=ib.prototype.Yf,ib.prototype.readUint32=ib.prototype.L,ib.prototype.readUint16=ib.prototype.Ua,ib.prototype.readUint8=ib.prototype.ua,ib.prototype.getLength=ib.prototype.getLength,ib.prototype.getPosition=ib.prototype.la,ib.prototype.hasMoreData=ib.prototype.oa;var ix=1;function iT(){this.i=[],this.h=[],this.g=!1}function iS(e){for(var t=iC(e);e.reader.oa()&&!e.parser.g;)e.parser.Wc(e.start+t,e.reader,e.partialOkay)}function iA(e){for(var t=iC(e),n=e.reader.L(),i=0;i<n&&(e.parser.Wc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function iE(e){var t=iC(e);for(e.reader.skip(78);e.reader.oa()&&!e.parser.g;)e.parser.Wc(e.start+t,e.reader,e.partialOkay)}function iI(e){return function(t){e(t.reader.mb(t.reader.getLength()-t.reader.la()))}}function ik(e){var t=0;e=v(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function iM(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function iC(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}ib.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ix},(b=iT.prototype).box=function(e,t){return e=ik(e),this.i[e]=iD,this.h[e]=t,this},b.O=function(e,t){return e=ik(e),this.i[e]=iR,this.h[e]=t,this},b.stop=function(){this.g=!0},b.parse=function(e,t,n){for(e=new ib(e,0),this.g=!1;e.oa()&&!this.g;)this.Wc(0,e,t,n)},b.Wc=function(e,t,n,i){var r=t.la();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.L(),o=t.L(),s=iM(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.la()+8>t.getLength()){this.g=!0;return}a=t.hc(),u=!0}var l=this.h[o];if(l){var c=null,d=null;if(this.i[o]==iR){if(i&&t.la()+4>t.getLength()){this.g=!0;return}c=(d=t.L())>>>24,d&=16777215}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:(t=0<(i=o-t.la())?t.mb(i):new Uint8Array(0),l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new ib(t,0),size:a,start:r+e,has64BitSize:u}))}else t.skip(Math.min(r+a-t.la(),t.getLength()-t.la()))}},W("shaka.util.Mp4Parser",iT),iT.headerSize=iC,iT.typeToString=iM,iT.allData=iI,iT.visualSampleEntry=iE,iT.sampleDescription=iA,iT.children=iS,iT.prototype.parseNext=iT.prototype.Wc,iT.prototype.parse=iT.prototype.parse,iT.prototype.stop=iT.prototype.stop,iT.prototype.fullBox=iT.prototype.O,iT.prototype.box=iT.prototype.box;var iD=0,iR=1;function iN(){}function iL(e){return e=ef(e),btoa(e=iy.value()(e))}function iP(e,t){return t=void 0==t||t,e=iL(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function i_(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}function iO(t){for(var n=t.length/2,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.parseInt(t.substr(2*r,2),16);return i}function iU(e){var t=ef(e);e="",t=v(t);for(var n=t.next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function ij(){for(var e=V.apply(0,arguments),t=0,n=v(e),i=n.next();!i.done;i=n.next())t+=i.value.byteLength;for(t=new Uint8Array(t),n=0,i=(e=v(e)).next();!i.done;i=e.next())i=i.value,t.set(ef(i),n),n+=i.byteLength;return t}function iB(e){var t=this;this.g=[],this.h=[],this.data=[],(new iT).box("moov",iS).box("moof",iS).O("pss
10h",function(e){if(!(1<e.version)){var n=ef(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(iU(e.reader.mb(16))),0<e.version){n=e.reader.L();for(var i=0;i<n;i++){var r=iU(e.reader.mb(16));t.h.push(r)}}}}).parse(e)}function iF(e,t,n,i){var r=e.length,a=t.length+16+r;0<i&&(a+=4+16*n.size);var o=new Uint8Array(a),s=ep(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,1886614376),u+=4,1>i?s.setUint32(u,0):s.setUint32(u,16777216),u+=4,o.set(t,u),u+=t.length,0<i)for(s.setUint32(u,n.size),u+=4,n=(t=v(n)).next();!n.done;n=t.next())n=iO(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function iV(e,t){return 1!=(e=iK(e,t)).length?null:e[0]}function iH(e,t,n){return 1!=(e=iq(e,t,n)).length?null:e[0]}function iK(e,t){var n=[];e=v(e.childNodes);for(var i=e.next();!i.done;i=e.next())(i=i.value)instanceof Element&&i.tagName==t&&n.push(i);return n}function iq(e,t,n){var i=[];e=v(e.childNodes);for(var r=e.next();!r.done;r=e.next())(r=r.value)instanceof Element&&r.localName==n&&r.namespaceURI==t&&i.push(r);return i}function iG(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function iz(e,t,n){t=v(t);for(var i=t.next();!i.done;i=t.next())if(i=i.value,e.hasAttributeNS(i,n))return e.getAttributeNS(i,n);return null}function iX(e){return Array.from(e.childNodes).every(iW)?e.textContent.trim():null}function iW(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function iY(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.getAttribute(t))&&(r=n(e)),null==r?i:r}function i$(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),isNaN(e=Date.parse(e))?null:e/1e3):null}function iJ(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e))&&isFinite(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null))?e:null}function iQ(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t&&isFinite(e=Number(t[1]))&&isFinite(t=Number(t[2]))?{start:e,end:t}:null}function iZ(e){return 0==(e=Number(e))%1?e:null}function i0(e){return 0==(e=Number(e))%1&&0<e?e:null}function i1(e){return 0==(e=Number(e))%1&&0<=e?e:null}function i2(e){return isNaN(e=Number(e))?null:e}function i4(e){return!!e&&"true"===e.toLowerCase()}function i3(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function i5(e,t){var n=new DOMParser,i=i6.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch(e){return null}if(!(n=e.documentElement)||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function i8(e,t){try{var n=ig(e);return i5(n,t)}catch(e){return null}}W("shaka.util.Uint8ArrayUtils",iN),iN.concat=ij,iN.toHex=iU,iN.fromHex=iO,iN.fromBase64=i_,iN.toBase64=iP,iN.toStandardBase64=iL;var i6=new iu(function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function i9(e,t){var n=this;t=void 0===t?1:t,this.C=e,this.G=new Set,this.m=this.s=null,this.ja=this.ba=!1,this.H=0,this.g=null,this.A=new ir,this.i=new Map,this.u=new Map,this.l=new nH,this.h=null,this.o=function(t){2==t.severity&&n.l.reject(t),e.onError(t)},this.V=new Map,this.ca=new Map,this.W=new tV(function(){var e,t,i;return t=(e=n).V,void((i=e.ca).clear(),t.forEach(function(e,t){return i.set(t,e)}),(t=Array.from(i.values())).length&&t.every(function(e){return"expired"==e})&&e.o(new tr(2,6,6014)),e.C.Pd(ic(i)))}),this.M=!1,this.K=[],this.N=!1,this.da=new tV(function(){(function(e){e.i.forEach(function(t,n){var i=t.Xe,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Xe=r)})})(n)}).La(t),this.l.catch(function(){}),this.j=new it(function(){var e;return e=n,F(function(t){switch(t.g){case 1:return e.A.release(),e.A=null,e.l.reject(),e.da.stop(),e.da=null,e.W.stop(),e.W=null,M(t,rf(e),2);case 2:if(!e.m){t.B(3);break}return D(t,4),M(t,e.m.setMediaKeys(null),6);case 6:N(t,5);break;case 4:L(t);case 5:e.m=null;case 3:e.g=null,e.G.clear(),e.s=null,e.u=new Map,e.h=null,e.o=function(){},e.C=null,e.Z=!1,e.F=null,C(t)}})}),this.Z=!1,this.I=this.F=null}
10function i7(e,t,n){e.u=new Map,n=v(n);for(var i=n.next();!i.done;i=n.next())e.u.set(i.value,{initData:null,initDataType:null});for(i=(n=v(e.h.persistentSessionsMetadata)).next();!i.done;i=n.next())i=i.value,e.u.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.M=0<e.u.size,re(e,t)}function re(t,n){var i,r,a,o,s,u,l,c,d,h,f,p;return F(function(g){if(1==g.g){if(i=function(t){if(0==(t=il(t.h.clearKeys)).size)return null;var n=[],i=[];t.forEach(function(e,t){var r=t;22!=r.length&&(r=iP(iO(t),!1)),22!=(t=e).length&&(t=iP(iO(e),!1)),e={kty:"oct",kid:r,k:t},n.push(e),i.push(e.kid)}),t=JSON.stringify({keys:n});var r=JSON.stringify({kids:i});return r=[{initData:ef(im(r)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:r,keyIds:new Set(i)}}(t))for(a=(r=v(n)).next();!a.done;a=r.next())(o=a.value).video&&(o.video.drmInfos=[i]),o.audio&&(o.audio.drmInfos=[i]);for((s=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}))||function(e,t){var n=[];for(t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),t=(e=v(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,il(t.h.servers)),u=new Set,a=(l=v(n)).next();!a.done;a=l.next())for(d=(c=v(rm(a.value))).next();!d.done;d=c.next())h=d.value,u.add(h);for(d=(f=v(u)).next();!d.done;d=f.next())!function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&(n=n.get(a)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.videoRobustness||(t.videoRobustness=i.videoRobustness),t.audioRobustness||(t.audioRobustness=i.audioRobustness),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(d.value,il(t.h.servers),il(t.h.advanced||{}),t.h.keySystemsMapping);return M(g,t9(n,t.M,t.Z,t.h.preferredKeySystems),2)}return s||Object.keys(t.h.servers).length?(p=rs(t,void 0,n),g.return(s?p:p.catch(function(){}))):(t.ba=!0,g.return(Promise.resolve()))})}function rt(e){var t;return F(function(n){switch(n.g){case 1:if(e.m.mediaKeys)return n.return();if(!e.F){n.B(2);break}return M(n,e.F,3);case 3:return ii(e.j),n.return();case 2:return D(n,4),e.F=e.m.setMediaKeys(e.s),M(n,e.F,6);case 6:N(n,5);break;case 4:t=L(n),e.o(new tr(2,6,6003,t.message));case 5:ii(e.j),C(n)}})}function rn(e){var t,n,i,r;return F(function(a){switch(a.g){case 1:if(!e.s||!e.g)return a.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){a.B(2);break}return t=n5([e.g.serverCertificateUri],e.h.retryParameters),D(a,3),M(a,e.C.Kb.request(5,t).promise,5);case 5:n=a.h,e.g.serverCertificate=ef(n.data),N(a,4);break;case 3:throw i=L(a),new tr(2,6,6017,i);case 4:if(e.j.g)return a.return();case 2:if(!e.g.serverCertificate||!e.g.serverCertificate.length)return a.return();return D(a,6),M(a,e.s.setServerCertificate(e.g.serverCertificate),8);case 8:N(a,0);break;case 6:throw r=L(a),new tr(2,6,6004,r.message)}})}function ri(e){var t,n,i,r;return F(function(a){if(1==a.g)return e.u.size?(e.u.forEach(function(t,n){rc(e,n,t)}),M(a,e.l,3)):a.B(2);if(2!=a.g){if(0<(e.g&&e.g.keyIds||new Set([])).size&&function(e){for(var t=v(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.V.get(n.value))return!1;return!0}(e))return a.return(e.l);e.l=new nH,e.l.catch(function(){})}for(i=(n=v(t=(e.g?e.g.initData:[])||[])).next();!i.done;i=n.next())rr(e,(r=i.value).initDataType,r.initData);return t.length||e.l.resolve(),a.return(e.l)})}function rr(e,t,n){if(n.length){var i=e.i.values();i=v(i);for(var r=i.next();!r.done;r=i.next())if(ec(n,r.value.initData)&&!tW())return;0<e.i.size&&rv(e)&&(e.l.resolve(),e.l=new nH,e.l.catch(function(){})),function(e,t,n,i){try{var r=e.s.createSession(i)}catch(t){e.o(new tr(2,6,6005,t.message));return}e.A.D(r,"message",function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.N?e.K.push(t):rd(e,t)}),e.A.D(r,"keystatuseschange",function(t){return rh(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Xe:1/0,bb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){t=n,n instanceof tr||(t=new tr(2,6,6016,n)),e.o(t);return}e.h.logLicenseExchange&&iP(n),r.generateRequest(t,n).catch(function(t){if(!e.j.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=4294967296),i="0x"+i.toString(16)}e.o(new tr(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}function ra(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function ro(e){return e=e.i.keys(),Array.from(e=is(e,function(e){return e.sessionId}))}function rs(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m;return F(function(y){switch(y.g){case 1:var b,w,x,T,S,A,E,I,k,C,R,P,_,O,U,j;if(i=new Map,n.length){r=function(e,t,n){for(var i=v(t),r=i.next();!r.done;r=i.next()){var a=v(rm(r.value));for(r=a.next();!r.done;r=a.next())r=r.value,n.has(r.keySystem)||n.set(r.keySystem,[]),n.get(r.keySystem).push(r)}if(1==n.size&&n.has(""))throw new tr(2,6,6e3);for(i={},r=(e=v(e.h.preferredKeySystems)).next();!r.done;i={$d:i.$d},r=e.next())for(i.$d=r.value,r=(a=v(t)).next();!r.done;r=a.next())if(r=r.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.$d}}(i)))return r.keySystemAccess;for(r=(e=v([!0,!1])).next();!r.done;r=e.next())for(i=r.value,r=(a=v(t)).next();!r.done;r=a.next()){var o=v(r.value.decodingInfos);for(r=o.next();!r.done;r=o.next()){var s=r.value;if(s.supported&&s.keySystemAccess){var u=v(r=n.get(s.keySystemAccess.keySystem));for(r=u.next();!r.done;r=u.next())if(!!r.value.licenseServerUri==i)return s.keySystemAccess}}}return null}(e,n,i),y.B(2);break}return M(y,(b=e,w=t,F(function(e){switch(e.g){case 1:if(1==w.size&&w.has(""))throw new tr(2,6,6e3);
10for(S=(T=v(w.values())).next();!S.done;S=T.next())0==(A=S.value).audioCapabilities.length&&delete A.audioCapabilities,0==A.videoCapabilities.length&&delete A.videoCapabilities;I=(E=v(b.h.preferredKeySystems)).next();case 2:if(I.done){e.B(4);break}if(k=I.value,!w.has(k)){e.B(3);break}return C=w.get(k),D(e,6),M(e,navigator.requestMediaKeySystemAccess(k,[C]),8);case 8:return x=e.h,e.return(x);case 6:L(e);case 7:ii(b.j);case 3:I=E.next(),e.B(2);break;case 4:P=(R=v([!0,!1])).next();case 9:if(P.done){e.B(11);break}_=P.value,I=(O=v(w.keys())).next();case 12:if(I.done){P=R.next(),e.B(9);break}if(U=I.value,(j=w.get(U)).drmInfos.some(function(e){return!!e.licenseServerUri})!=_){e.B(13);break}return D(e,15),M(e,navigator.requestMediaKeySystemAccess(U,[j]),17);case 17:return x=e.h,e.return(x);case 15:L(e);case 16:ii(b.j);case 13:I=O.next(),e.B(12);break;case 11:return e.return(x)}})),3);case 3:r=y.h;case 2:if(!(a=r))throw new tr(2,6,6001);for(ii(e.j),D(y,4),e.G.clear(),s=(o=a.getConfiguration()).audioCapabilities||[],u=o.videoCapabilities||[],c=(l=v(s)).next();!c.done;c=l.next())d=c.value,e.G.add(d.contentType.toLowerCase());for(c=(h=v(u)).next();!c.done;c=h.next())f=c.value,e.G.add(f.contentType.toLowerCase());if(n.length){var B=a.keySystem,V=i.get(a.keySystem),H=[],K=[],q=[],G=[],z=new Set;ry(V,H,q,K,G,z);var X=e.M?"persistent-license":"temporary";for(B={keySystem:B,licenseServerUri:H[0],distinctiveIdentifierRequired:V[0].distinctiveIdentifierRequired,persistentStateRequired:V[0].persistentStateRequired,sessionType:V[0].sessionType||X,audioRobustness:V[0].audioRobustness||"",videoRobustness:V[0].videoRobustness||"",serverCertificate:q[0],serverCertificateUri:K[0],initData:G,keyIds:z},H=(V=v(V)).next();!H.done;H=V.next())(H=H.value).distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=H.distinctiveIdentifierRequired),H.persistentStateRequired&&(B.persistentStateRequired=H.persistentStateRequired);V=B}else V=a.keySystem,B=t.get(a.keySystem),H=[],K=[],q=[],G=[],z=new Set,ry(B.drmInfos,H,q,K,G,z),V={keySystem:V,licenseServerUri:H[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:q[0],serverCertificateUri:K[0],initData:G,keyIds:z};if(e.g=V,!e.g.licenseServerUri)throw new tr(2,6,6012,e.g.keySystem);return M(y,a.createMediaKeys(),6);case 6:if(p=y.h,ii(e.j),e.s=p,!(""!=e.h.minHdcpVersion&&"getStatusForPolicy"in e.s)){y.B(7);break}return D(y,8),M(y,e.s.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),10);case 10:if("usable"!=y.h)throw new tr(2,6,6018);ii(e.j),N(y,7,4);break;case 8:if((g=L(y,4))instanceof tr)throw g;throw new tr(2,6,6019,g.message);case 7:return e.ba=!0,M(y,rn(e),11);case 11:ii(e.j),N(y,0);break;case 4:if(m=L(y),ii(e.j,m),e.g=null,e.G.clear(),m instanceof tr)throw m;throw new tr(2,6,6002,m.message)}})}function ru(e){rv(e)&&e.l.resolve()}function rl(e,t){new tV(function(){t.loaded=!0,ru(e)}).U(rw)}function rc(e,t,n){var i,r,a,o,s,u,l;return F(function(c){switch(c.g){case 1:try{i=e.s.createSession("persistent-license")}catch(t){return r=new tr(2,6,6005,t.message),e.o(r),c.return(Promise.reject(r))}return e.A.D(i,"message",function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.N?e.K.push(t):rd(e,t)}),e.A.D(i,"keystatuseschange",function(t){return rh(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Xe:1/0,bb:null,type:"persistent-license"},e.i.set(i,a),D(c,2),M(c,i.load(t),4);case 4:return o=c.h,ii(e.j),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.o(new tr(s,6,6013)),a.loaded=!0),rl(e,a),ru(e),c.return(i);case 2:u=L(c),ii(e.j,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.o(new tr(l,6,6005,u.message)),a.loaded=!0,ru(e);case 3:return c.return(Promise.resolve())}})}function rd(e,t){var n,i,r,a,o,s,u,l,c,d,h,f;F(function(p){switch(p.g){case 1:if(n=t.target,e.h.logLicenseExchange&&iP(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=n5([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),ra(e.g.keySystem)){var g=ip(o.body,!0,!0);if(g.includes("PlayReadyKeyMessage")){g=i5(g,"PlayReadyKeyMessage");for(var m=v(g.getElementsByTagName("HttpHeader")),y=m.next();!y.done;y=m.next())y=y.value,o.headers[y.getElementsByTagName("name")[0].textContent]=y.getElementsByTagName("value")[0].textContent;o.body=i_(g.getElementsByTagName("Challenge")[0].textContent)}else o.headers["Content-Type"]="text/xml; charset=utf-8"}return s=Date.now(),D(p,2),M(p,e.C.Kb.request(2,o).promise,4);case 4:u=p.h,N(p,3);break;case 2:return l=L(p),c=new tr(2,6,6007,l),e.o(c),i&&i.bb&&i.bb.reject(c),p.return();case 3:if(e.j.g)return p.return();return e.H+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&iP(u.data),D(p,5),M(p,n.update(u.data),7);case 7:N(p,6);break;case 5:return d=L(p),h=new tr(2,6,6008,d.message),e.o(h),i&&i.bb&&i.bb.reject(h),p.return();case 6:if(e.j.g)return p.return();f=new nY("drmsessionupdate"),e.C.onEvent(f),i&&(i.bb&&i.bb.resolve(),rl(e,i)),C(p)}})}function rh(e,t){t=t.target;var n=e.i.get(t),i=!1;
10t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(ra(e.g.keySystem)&&16==r.byteLength&&(tq()||tJ())){var o=(a=ep(r)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(i=!0),r=iU(r).slice(0,32),e.V.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.bb&&(e.i.delete(t),t.close().catch(function(){})),rv(e)&&(e.l.resolve(),e.W.U(rx))}function rf(e){var t;return F(function(n){return t=Array.from(e.i.entries()),e.i.clear(),M(n,Promise.all(t.map(function(t){var n=(t=v(t)).next().value,i=t.next().value;return F(function(t){if(1==t.g){var r;return D(t,2),e.ja||e.u.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?M(t,F(function(e){return 1==e.g?(r=new Promise(function(e,t){new tV(t).U(rb)}),D(e,2),M(e,Promise.race([Promise.all([n.close(),n.closed]),r]),4)):2!=e.g?N(e,0):void(L(e),C(e))}),5):M(t,n.remove(),5)}if(2!=t.g)return N(t,0);L(t),C(t)})})),0)})}function rp(e,t){return!e.length||!t.length||e===t||0<rg(e,t).length}function rg(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r={},a=v(t),o=a.next();!o.done;r={Va:r.Va},o=a.next())if(o=o.value,i.keySystem==o.keySystem){r.Va=[],r.Va=r.Va.concat(i.initData||[]),r.Va=r.Va.concat(o.initData||[]),r.Va=r.Va.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Va.findIndex(function(e){return e.keyId===t.keyId})}}(r)),a=i.keyIds&&o.keyIds?new Set([].concat(y(i.keyIds),y(o.keyIds))):i.keyIds||o.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioRobustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:r.Va,keyIds:a});break}}return n}function rm(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function rv(e){return function(e,t){e=v(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),function(e){return e.loaded})}function ry(e,t,n,i,r,a){var o={};e=v(e);for(var s=e.next();!s.done;o={va:o.va},s=e.next()){if(o.va=s.value,t.includes(o.va.licenseServerUri)||t.push(o.va.licenseServerUri),i.includes(o.va.serverCertificateUri)||i.push(o.va.serverCertificateUri),o.va.serverCertificate&&(n.some(function(e){return function(t){return ec(t,e.va.serverCertificate)}}(o))||n.push(o.va.serverCertificate)),o.va.initData){s={};for(var u=v(o.va.initData),l=u.next();!l.done;s={gd:s.gd},l=u.next())s.gd=l.value,r.some(function(e){return function(t){var n=e.gd;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&ec(t.initData,n.initData)}}(s))||r.push(s.gd)}if(o.va.keyIds)for(u=(s=v(o.va.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}(b=i9.prototype).destroy=function(){return this.j.destroy()},b.configure=function(e){this.h=e},b.Bc=function(e){var t=this;return F(function(n){if(1==n.g)return t.s?(t.m=e,t.A.ma(t.m,"play",function(){for(var e=v(t.K),n=e.next();!n.done;n=e.next())rd(t,n.value);t.N=!0,t.K=[]}),"webkitCurrentPlaybackTargetIsWireless"in t.m&&t.A.D(t.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rf(t)}),t.I=t.g&&t.g.initData.find(function(e){return 0<e.initData.length})||null,t.I||"com.apple.fps"!==t.g.keySystem||t.u.size?M(n,rt(t),2):n.B(2)):(t.A.ma(e,"encrypted",function(){t.o(new tr(2,6,6010))}),n.return());ri(t).catch(function(){}),t.I||t.u.size||t.h.parseInbandPsshEnabled||t.A.D(t.m,"encrypted",function(e){return F(function(n){if(1==n.g)return M(n,rt(t),2);rr(t,e.initDataType,ef(e.initData)),C(n)})}),C(n)})},b.Be=function(){var e=this,t=this.i.keys();return Array.from(t=is(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},b.Mc=function(){var e=1/0,t=this.i.keys();t=v(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},b.ud=function(){return ic(this.ca)};var rb=1,rw=5,rx=.5,rT=new iu(function(){return eh(new Uint8Array([0]))});function rS(){}function rA(e,t,n,i){var r,a,o,s;return F(function(u){if(1==u.g)return i&&(r=rk[i.toLowerCase()])?u.return(r):(a=rI(e))&&(o=rM[a])?u.return(o):i?u.B(2):M(u,rE(e,t,n),3);
10if(2!=u.g&&(i=u.h)&&(s=rk[i]))return u.return(s);throw new tr(2,4,4e3,e)})}function rE(e,t,n){var i,r;return F(function(a){return 1==a.g?((i=n5([e],n)).method="HEAD",M(a,t.request(0,i).promise,2)):(r=a.h.headers["content-type"],a.return(r?r.toLowerCase().split(";").shift():""))})}function rI(e){return 1==(e=new e0(e).ya.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}W("shaka.media.ManifestParser",rS),rS.unregisterParserByMime=function(e){delete rk[e]},rS.registerParserByMime=function(e,t){rk[e]=t},rS.registerParserByExtension=function(e,t){rM[e]=t},rS.AccessibilityPurpose={Gi:"visually impaired",ei:"hard of hearing"};var rk={},rM={};function rC(e,t,n){0!=(t=(e=ep(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var rD=new iu(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function rR(e,t,n,i,r,a,o){this.Ca=e,this.Ka=t,this.pa=n,this.Qe=void 0===i?null:i,this.timescale=void 0===r?null:r,this.g=void 0===a?null:a,this.aes128Key=void 0===o?null:o}function rN(e,t,n,i,r,a,o,s,u,l,c,d,h,f,p){l=void 0===l?[]:l,f=void 0===f?rL:f,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Ka=i,this.pa=r,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.i=l,this.tilesLayout=void 0===c?"":c,this.A=void 0===d?null:d,this.g=void 0===h?null:h,this.status=f,this.m=!1,this.s=!0,this.o=!1,this.aes128Key=void 0===p?null:p,this.u=null,this.l=0}rR.prototype.Oc=function(){return this.Ka},rR.prototype.Lc=function(){return this.pa},W("shaka.media.InitSegmentReference",rR),rR.prototype.getEndByte=rR.prototype.Lc,rR.prototype.getStartByte=rR.prototype.Oc,(b=rN.prototype).Ca=function(){return this.C()},b.getStartTime=function(){return this.startTime},b.Mg=function(){return this.endTime},b.Oc=function(){return this.Ka},b.Lc=function(){return this.pa},b.dh=function(){return this.tilesLayout},b.bh=function(){return this.A},b.Fb=function(){return this.status},b.qh=function(){this.status=rP},b.Pe=function(){this.m=!0},b.nh=function(){return this.m},b.Tf=function(){this.s=!1},b.mh=function(){return this.s},b.Sf=function(){this.o=!0},b.jh=function(){return this.o},b.hg=function(e){this.u=e},b.$g=function(){return this.u},b.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=v(this.i),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},b.nf=function(e){null==this.g?Z("Sync attempted without sync time!"):.001<=Math.abs(e=this.g-e-this.startTime)&&this.offset(e)},W("shaka.media.SegmentReference",rN),rN.prototype.syncAgainst=rN.prototype.nf,rN.prototype.offset=rN.prototype.offset,rN.prototype.getThumbnailSprite=rN.prototype.$g,rN.prototype.setThumbnailSprite=rN.prototype.hg,rN.prototype.hasByterangeOptimization=rN.prototype.jh,rN.prototype.markAsByterangeOptimization=rN.prototype.Sf,rN.prototype.isIndependent=rN.prototype.mh,rN.prototype.markAsNonIndependent=rN.prototype.Tf,rN.prototype.isPreload=rN.prototype.nh,rN.prototype.markAsPreload=rN.prototype.Pe,rN.prototype.markAsUnavailable=rN.prototype.qh,rN.prototype.getStatus=rN.prototype.Fb,rN.prototype.getTileDuration=rN.prototype.bh,rN.prototype.getTilesLayout=rN.prototype.dh,rN.prototype.getEndByte=rN.prototype.Lc,rN.prototype.getStartByte=rN.prototype.Oc,rN.prototype.getEndTime=rN.prototype.Mg,rN.prototype.getStartTime=rN.prototype.getStartTime,rN.prototype.getUris=rN.prototype.Ca;var rL=0,rP=1;function r_(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function rO(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t>=e.start(0)}function rU(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;var n=0;e=v(rj(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function rj(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function rB(){}function rF(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function rV(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function rH(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function rK(e){for(var t=0,n=[];rF(e,t);){var i=rH(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),a=rH(r,4);(a=function(e){var t={key:e.type,description:"",data:""};if("TXXX"===e.type){if(2>e.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=ih(ef(e.data,1,n));return e=ih(ef(e.data,2+n)).replace(/\0*$/,""),t.description=i,t.data=e,t}return"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(n=e.data.subarray(1).indexOf(0))?null:(i=ih(ef(e.data,1,n)),e=ih(ef(e.data,2+n)).replace(/\0*$/,""),t.description=i,t.data=e,t):"PRIV"===e.type?2>
10e.size||-1===(i=e.data.indexOf(0))?null:(i=ih(ef(e.data,0,i)),t.description=i,"com.apple.streaming.transportStreamTimestamp"==i?(e=1&(i=e.data.subarray(i.length+1))[3],i=((i[4]<<23)+(i[5]<<15)+(i[6]<<7)+i[7])/45,e&&(i+=47721858.84),t.data=i):(e=eh(e.data.subarray(i.length+1)),t.data=e),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(e=ih(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=ih(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=eh(e.data),t):null}(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:a,data:r.subarray(10,10+a)}))&&n.push(a),t+=r.size+10}rV(e,t)&&(t+=10)}return n}function rq(e,t){for(var n=t=void 0===t?0:t,i=0;rF(e,t);)e[t+5]>>6&1&&(i+=10),i+=10+rH(e,t+6),rV(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}function rG(e,t){var n=null,i=null,r=null,a=e.L();return 1&t&&(r=e.hc()),2&t&&e.skip(4),8&t&&(n=e.L()),16&t&&(i=e.L()),{trackId:a,Hf:n,Fg:i,Ii:r}}function rz(e,t){return 1==t?{baseMediaDecodeTime:4294967296*(t=e.L())+(e=e.L())}:{baseMediaDecodeTime:e.L()}}function rX(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.L(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.Ua())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function rW(e,t,n){var i=e.L(),r=[],a=null;1&n&&(a=e.L()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={gf:null,sampleSize:null,Sd:null};256&n&&(s.gf=e.L()),512&n&&(s.sampleSize=e.L()),1024&n&&e.skip(4),2048&n&&(s.Sd=0==t?e.L():e.Yf()),r.push(s)}return{Ni:i,$f:r,Eg:a}}function rY(e,t){1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.L();return 1==t?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),{trackId:n,width:t=e.Ua()+e.Ua()/16,height:e=e.Ua()+e.Ua()/16}}function r$(e,t){return e.skip(87),{aa:t+"."+this.g(e.ua())+this.g(e.ua())+this.g(e.ua())}}function rJ(e){return{aa:iM(e=e.L())}}function rQ(e,t){if(this.j=e,void 0===t?0:t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=ef(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function rZ(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);0!==i&&(n.set(e.j.subarray(t,t+i)),e.h=new ib(n,0).L(),e.g=8*i,e.i-=i)}function r0(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,rZ(e)}e.h<<=t,e.g-=t}function r1(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&rZ(e),0<(n=t-n)?i<<n|r1(e,n):i}function r2(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&2147483648>>>t))return e.h<<=t,e.g-=t,t;return rZ(e),t+r2(e)}function r4(e){r0(e,1+r2(e))}function r3(e){var t=r2(e);return r1(e,t+1)-1}function r5(e){return 1&(e=r3(e))?1+e>>>1:-1*(e>>>1)}function r8(e){return 1===r1(e,1)}function r6(e){return r1(e,8)}function r9(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=r5(e))+256)%256),n=0===i?n:i}function r7(){this.s=null,this.u=!1,this.j=this.A=null,this.i=[],this.l=this.m=null,this.g=[],this.o=null,this.h=[]}function ae(e){if(1!=(e[0]<<16|e[1]<<8|e[2]))return null;var t={data:new Uint8Array(0),Xf:e[4]<<8|e[5],pts:null,dts:null};if(t.Xf&&t.Xf>e.byteLength-6)return null;var n=e[7];return(192&n&&(t.pts=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,t.dts=t.pts,64&n&&(t.dts=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)),n=e[8]+9,e.byteLength<=n)?null:(t.data=e.subarray(n),t)}function at(e){return!(0>an(e))}function an(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;n++}return -1}rN.Status={Uh:rL,Ei:rP,ji:2},W("shaka.util.Id3Utils",rB),rB.getID3Data=rq,rB.getID3Frames=rK,W("shaka.util.ExpGolomb",rQ),(b=r7.prototype).clearData=function(){this.i=[],this.g=[],this.h=[]},b.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,an(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71==e[r]){var a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2];if(1<(48&e[r+3])>>4){var s=r+5+e[r+4];if(s==r+188)continue}else s=r+4;switch(o){case 0:a&&(s+=e[s]+1),this.s=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.s:a&&(s+=e[s]+1),o={audio:-1,video:-1,Dd:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<u;
10){var l=(31&a[s+1])<<8|a[s+2],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(-1==o.audio&&0<c)for(var d=s+5,h=c;2<h;){switch(a[d]){case 106:o.audio=l,o.audioCodec="ac3";break;case 122:o.audio=l,o.audioCodec="ec3"}var f=a[d+1]+2;d+=f,h-=f}break;case 15:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 21:-1==o.Dd&&(o.Dd=l);break;case 27:-1==o.video&&(o.video=l,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=l,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=l,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=l,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.A=a.video,this.j=a.videoCodec),-1!=a.audio&&(this.m=a.audio,this.l=a.audioCodec),-1!=a.Dd&&(this.o=a.Dd),i&&!this.u&&(i=!1,r=t-188),this.u=!0;break;case this.A:s=e.subarray(s,r+188),a?this.i.push(s):this.i.length&&(a=this.i[this.i.length-1])&&(this.i[this.i.length-1]=ij(a,s));break;case this.m:s=e.subarray(s,r+188),a?this.g.push(s):this.g.length&&(a=this.g[this.g.length-1])&&(this.g[this.g.length-1]=ij(a,s));break;case this.o:s=e.subarray(s,r+188),a?this.h.push(s):this.h.length&&(a=this.h[this.h.length-1])&&(this.h[this.h.length-1]=ij(a,s));break;default:i=!0}}return this},b.xh=function(e,t){return nE("TsParser","Please use parseNalus function instead."),this.ec(e,t)},b.ec=function(e,t,n){var i=e.pts?e.pts/9e4:null,r=(e=e.data).byteLength,a=1;"hvc"==this.j&&(a=2);for(var o,s=0,u=[],l=-1,c=0,d=0;d<r;++d){var h=e[d];if(h){if(2<=s&&1==h&&n){if(0==(t=d-(3<s?3:s)))return[];return n.data=ij(n.data,e.subarray(0,t)),n.ha=ij(n.ha,e.subarray(0,t)),[]}if(2<=s&&1==h){if(0<=l?(s=d-((3<s?3:s)+1),u.push({data:e.subarray(l+a,s+1),ha:e.subarray(l,s+1),type:c,time:i})):n&&0<(l=d-s)&&(n.data=ij(n.data,e.subarray(0,l))),d>=r-a)return u;l=++d,c="hvc"==this.j?e[d]>>1&63:31&e[d]}s=0}else s++;d>=r-1&&0<=l&&0<=s&&(o={data:e.subarray(l+a,r),ha:e.subarray(l,r),type:c,time:i},t&&this.ec(t,null,o))}return o&&u.push(o),!u.length&&n&&(n.data=ij(n.data,e),n.ha=ij(n.ha,e)),u},b.getMetadata=function(){for(var e=[],t=v(this.h),n=t.next();!n.done;n=t.next())(n=ae(n.value))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:rK(n.data),dts:n.dts,pts:n.pts});return e},b.Ab=function(){for(var e=[],t=v(this.g),n=t.next();!n.done;n=t.next())(n=ae(n.value))&&e.push(n);return e},b.bc=function(){for(var e=[],t=v(this.i),n=t.next();!n.done;n=t.next()){var i=ae(n=n.value);i&&null!=i.pts&&null!=i.dts?e.push(i):e.length&&(n=i?i.data:n)&&((i=e.pop()).data=ij(i.data,n),e.push(i))}return e},b.getStartTime=function(){for(var e=null,t=v(this.Ab()),n=t.next();!n.done;n=t.next()){var i=n.value;i&&null!=i.pts&&(i=Math.min(i.dts,i.pts)/9e4,null==e||e>i)&&(e=i)}for(t=null,n=(i=v(this.bc())).next();!n.done;n=i.next())(n=n.value)&&null!=n.pts&&(n=Math.min(n.dts,n.pts)/9e4,null==t||t>n)&&(t=n);return{audio:e,video:t}},b.Kc=function(){return{audio:this.l,video:this.j}},b.yd=function(){for(var e=[],t=this.bc(),n=0;n<t.length;n++){var i=t[n],r=void 0;n+1<t.length&&(r=t[n+1]),e.push.apply(e,y(this.ec(i,r)))}return e},b.gh=function(){nE("TsParser","Please use getVideoInfo function instead.");var e=this.Fe();return{height:e.height,width:e.width}},b.Fe=function(){return"hvc"==this.j?function(e){var t={height:null,width:null,aa:null};if(!(e=e.yd()).length||!(e=e.find(function(e){return 33==e.type})))return t;var n=new rQ(e.ha,!0);r6(n),r6(n),r1(n,4);var i=r1(n,3);r8(n);var r=r1(n,2),a=r1(n,1),o=r1(n,5),s=r1(n,32);e=r6(n);for(var u=r6(n),l=r6(n),c=r6(n),d=r6(n),h=r6(n),f=r6(n),p=[],g=[],m=0;m<i;m++)p.push(r8(n)),g.push(r8(n));if(0<i)for(m=i;8>m;m++)r1(n,2);for(m=0;m<i;m++)p[m]&&r1(n,88),g[m]&&r6(n);r3(n),3==(i=r3(n))&&r1(n,1),p=r3(n),g=r3(n);var v=m=0,y=0,b=0;return r8(n)&&(m+=r3(n),v+=r3(n),y+=r3(n),b+=r3(n)),t.width=String(p-(m+v)*(1===i||2===i?2:1)),t.height=String(g-(y+b)*(1===i?2:1)),n=function(e){for(var t=0,n=0;32>n;n++)t|=(e>>n&1)<<31-n;return t>>>0}(s),a=1==a?"H":"L",r="hvc1."+["","A","B","C"][r]+o+"."+n.toString(16).toUpperCase()+"."+a+f,h&&(r+="."+h.toString(16).toUpperCase()),d&&(r+="."+d.toString(16).toUpperCase()),c&&(r+="."+c.toString(16).toUpperCase()),l&&(r+="."+l.toString(16).toUpperCase()),u&&(r+="."+u.toString(16).toUpperCase()),e&&(r+="."+e.toString(16).toUpperCase()),t.aa=r,t}(this):function(e){var t={height:null,width:null,aa:null};if(!(e=e.yd()).length||!(e=e.find(function(e){return 7==e.type})))return t;var n=r6(e=new rQ(e.data)),i=r6(e),r=r6(e);if(r4(e),ai.includes(n)){var a=r3(e);if(3===a&&r0(e,1),r4(e),r4(e),r0(e,1),r8(e)){a=3!==a?8:12;for(var o=0;o<a;o++)r8(e)&&(6>o?r9(e,16):r9(e,64))}}if(r4(e),0===(a=r3(e)))r3(e);else if(1===a)for(r0(e,1),r4(e),r4(e),a=r3(e),o=0;o<a;o++)r4(e);r4(e),r0(e,1),a=r3(e),o=r3(e);var s=r1(e,1);0===s&&r0(e,1),r0(e,1);var u=0,l=0,c=0,d=0;return r8(e)&&(u=r3(e),l=r3(e),c=r3(e),d=r3(e)),t.height=String((2-s)*(o+1)*16-2*c-2*d),t.width=String(16*(a+1)-2*u-2*l),t.aa="avc1."+("0"+n.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2),t}(this)},W("shaka.util.TsParser",r7),r7.syncOffset=an,r7.probe=at,r7.prototype.getVideoInfo=r7.prototype.Fe,r7.prototype.getVideoResolution=r7.prototype.gh,r7.prototype.getVideoNalus=r7.prototype.yd,r7.prototype.getCodecs=r7.prototype.Kc,r7.prototype.getStartTime=r7.prototype.getStartTime,r7.prototype.getVideoData=r7.prototype.bc,r7.prototype.getAudioData=r7.prototype.Ab,r7.prototype.getMetadata=r7.prototype.getMetadata,r7.prototype.parseNalus=r7.prototype.ec,r7.prototype.parseAvcNalus=r7.prototype.xh,r7.prototype.parse=r7.prototype.parse,r7.prototype.clearData=r7.prototype.clearData,r7.Timescale=9e4;var ai=[100,110,122,244,44,83,86,118,128,138,139,134];function ar(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if("undefined"==typeof libDPIModule&&ee("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!=typeof LcevcDil)this.h=LcevcDil,this.j=!0,nE("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ee("Could not find LCEVC Library on this page"),e=!1;break e}void 0===this.h.SupportObject?(ee("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||ee(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function aa(e){e.g&&e.i.classList.add("shaka-hidden")}
10function ao(e,t,n){var i=as,r=ah;switch(t.mimeType){case"video/webm":i=au;break;case"video/mp4":i=al}switch(n){case"DASH":r=ad;break;case"HLS":r=ac}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(i),e.j||e.g.setStreamingFormat(r))}ar.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},W("shaka.lcevc.Dec",ar),ar.prototype.release=ar.prototype.release;var as=0,au=1,al=2,ac=0,ad=1,ah=-1;function af(e,t,n,i){var r=this;this.i=e,this.A=null,this.F=t,this.g={},this.G={},this.ba={},this.h=null,this.V=!1,this.da=n||function(){},this.M=i||null,this.j={},this.C=new ir,this.o={},this.H=null,this.K=new nH,this.W="",this.ja=!1,this.l=ap(this,this.K),this.u=!1,this.I=new it(function(){var e,t,n,i,a,o,s,u;return e=r,F(function(r){if(1==r.g){for(n in t=[],e.j)for(a=(i=e.j[n])[0],e.j[n]=i.slice(0,1),a&&t.push(a.p.catch(ts)),s=(o=v(i.slice(1))).next();!s.done;s=o.next())s.value.p.reject(new tr(2,7,7003,void 0));for(u in e.h&&t.push(e.h.destroy()),e.F&&t.push(e.F.destroy()),e.o)t.push(e.o[u].destroy());return M(r,Promise.all(t),2)}e.C&&(e.C.release(),e.C=null),e.i&&(e.i.removeAttribute("src"),e.i.load(),e.i=null),e.A=null,e.l=null,e.h=null,e.F=null,e.g={},e.o={},e.H=null,e.j={},e.M=null,C(r)})}),this.s=!1,this.N="UNKNOWN",this.Z=this.ca=!1,this.wa=new nH,this.m=!1}function ap(e,t){var n=new MediaSource;return e.C.ma(n,"sourceopen",function(){URL.revokeObjectURL(e.W),t.resolve()}),e.C.ma(e.i,"playing",function(){e.ja=!0}),e.W=aR(n),e.i.src=e.W,n}function ag(e,t,n,i){var r=tv(n.mimeType,i);if(t==tf)am(e,r,e.s,n.external);else{var a=e.A.forceTransmux;(!er(r)||!e.s&&tA.includes(r))&&(a=!0);var o=ty(n.mimeType,i);if(a){if(a=th("audio",(i||"").split(",")),i=th("video",(i||"").split(",")),a&&i){e.m=!0,ag(e,"audio",n,a),ag(e,"video",n,i);return}(i=eX(o))&&(r=i(),e.o[t]=r,r=r.convertCodecs(t,o))}o=r+e.A.sourceBufferExtraFeatures,ii(e.I);try{var s=e.l.addSourceBuffer(o)}catch(t){throw new tr(2,3,3015,t,"The mediaSource_ status was"+e.l.readyState+"expected 'open'")}e.s&&(s.mode=aN),e.C.D(s,"error",function(){e.j[t][0].p.reject(new tr(2,3,3014,e.i.error?e.i.error.code:0))}),e.C.D(s,"updateend",function(){return aI(e,t)}),e.g[t]=s,e.G[t]=r,e.ba[t]=!!n.drmInfos.length}}function am(e,t,n,i){e.h||(e.h=new tE(e.F));var r=e.h;i=i||e.V,e=e.N,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=(0,tM[t])(),r.i.setSequenceMode?r.i.setSequenceMode(n):ee('Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):ee('Text parsers should have a "setManifestType" method!'),r.u=i)}function av(e){return!e.u&&(!e.l||"ended"==e.l.readyState)}function ay(e,t){return e=e.u||!Object.keys(e.g).length?null:t==tf?e.h.g:!(e=aw(e,t))||1==e.length&&1e-6>e.end(0)-e.start(0)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null}function ab(e,t){return e.u?null:t==tf?e.h.h:r_(aw(e,t))}function aw(e,t){try{return e.g[t].buffered}catch(e){return null}}function ax(e,t,n,i,r,a,o,s,u,l){var c,d,h,f,p,g,m,y,b,w;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,F(function(x){var T,S,A,E,I,k,D,R,N,L,P,_;switch(x.g){case 1:if(t!=(c=tp).ea){x.B(2);break}if(!e.s){x.B(3);break}return M(x,e.wa,4);case 4:d=x.h,e.h.s=d;case 3:return M(x,(T=e.h,S=n,A=i?i.startTime:null,E=i?i.endTime:null,F(function(e){return 1==e.g?M(e,Promise.resolve(),2):T.i&&T.j?null==A||null==E?(T.i.parseInit(ef(S)),e.return()):void(I=T.u?A:T.s,k={periodStart:T.s,segmentStart:A,segmentEnd:E,vttOffset:I},D=T.i.parseMedia(ef(S),k).filter(function(e){return e.startTime>=T.l&&e.startTime<T.m}),T.j.append(D),null==T.g&&(T.g=Math.max(A,T.l)),T.h=Math.min(E,T.m),C(e)):e.return()})),5);case 5:case 8:return x.return();case 2:if(l||!e.m){x.B(6);break}return M(x,ax(e,c.T,n,i,r,a,o,s,u,!0),7);case 7:return M(x,ax(e,c.ka,n,i,r,a,o,s,u,!0),8);case 6:if(!e.g[t])return x.return();if(h=e.g[t].timestampOffset,f=e.G[t],e.o[t]&&(f=e.o[t].getOrginalMimeType()),i&&null!=(p=function(e,t,n,i,r,a){var o=null,s=ef(n);if(tA.includes(r))(a=rK(s)).length&&i&&((t=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&t.data&&(o=Math.round(t.data)/1e3),e.da([{cueTime:i.startTime,data:s,frames:a,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(r.includes("/mp4")&&i&&0==i.timestampOffset&&i.h&&i.h.timescale){var u=i.h.timescale;if(!isNaN(u)){var l=0,c=!1;(new iT).box("moof",iS).box("traf",iS).O("tfdt",function(e){l=rz(e.reader,e.version).baseMediaDecodeTime/u,c=!0,e.parser.stop()}).parse(n,!0),c&&(o=l)}}else r.includes("/mp4")||r.includes("/webm")||!at(s)||(null!=(t=(s=(new r7).parse(s)).getStartTime()[t])&&(o=t),(s=s.getMetadata()).length&&e.da(s,a,i?i.endTime:null));return o}(e,t,n,i,f,h))&&((.1<=Math.abs(h-(g=i.startTime-p))||o||s)&&(h=g,e.Z&&(ak(e,t,function(){return aA(e,t)}),ak(e,t,function(){return aE(e,t,h)}))),m=t==c.ka||!(c.ka in e.g),e.s&&m&&e.wa.resolve(h)),a&&t==c.ka&&(e.h||am(e,"application/cea-608",e.s,!1),e.H||(y=f.split(";",1)[0],e.H=new ev(y)),i?(b=e.H.j(n)).length&&function(e,t,n,i,r){var a=n+" "+i,o=new Map;t=v(t);for(var s=t.next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=v(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.A&&e.j.append([u]))}for(a=(r=v(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=v(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.o.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}(e.h,b,i.startTime,i.endTime,h):e.H.init(n)),!e.o[t]){x.B(9);break}return M(x,e.o[t].transmux(n,r,i,e.l.duration,t),10);case 10:n=x.h;case 9:return R=e,N=n,L=i?i.startTime:null,P=t,_=R.ba[P],R.A.insertFakeEncryptionInInit&&null==L&&_&&(tz()||tG())&&"mp4"==R.G[P].split(";")[0].split("/")[1]&&(N=function(e){function t(){r=!0}function n(e){a.push(e),iS(e)}e=ef(e);var i,r=!1,a=[],o=[];if((new iT).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).O("stsd",function(e){i=e,a.push(e),iA(e)}).O("encv",t).O("enca",t).O("hev1",function(e){o.push({box:e,Lb:1701733238})}).O("hvc1",function(e){o.push({box:e,Lb:1701733238})}).O("avc1",function(e){o.push({box:e,Lb:1701733238})}).O("avc3",function(e){o.push({box:e,Lb:1701733238})}).O("ac-3",function(e){o.push({box:e,Lb:1701733217})}).O("ec-3",function(e){o.push({box:e,Lb:1701733217})}).O("mp4a",function(e){o.push({box:e,Lb:1701733217})}).parse(e),r)return e;if(0==o.length||!i)throw iU(e),new tr(2,3,3019);o.reverse();
10for(var s=v(o),u=s.next();!u.done;u=s.next())e=function(e,t,n,i,r){var a=rD.value(),o=e.subarray(n.start,n.start+n.size),s=ep(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=ep(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),rC(u,0,u.byteLength),r=new Uint8Array(e.byteLength+u.byteLength),n=tG()?n.start:n.start+n.size,a=e.subarray(n),r.set(e.subarray(0,n)),r.set(u,n),r.set(a,n+u.byteLength),i=(e=v(i)).next();!i.done;i=e.next())rC(r,(i=i.value).start,i.size+u.byteLength);return u=ep(r,t.start),t=iC(t),e=u.getUint32(t),u.setUint32(t,e+1),r}(e,i,(u=u.value).box,a,u.Lb);return e}(N)),n=N,i&&e.s&&t!=c.ea&&(o||s)&&(w=i.startTime,ak(e,t,function(){return aA(e,t)}),ak(e,t,function(){return aE(e,t,w)})),M(x,ak(e,t,function(){var i=n;if("video"==t&&e.M){var r=e.M;r.g&&r.g.appendBuffer(i,"video",r.o,-h)}e.g[t].appendBuffer(i)}),11);case 11:C(x)}})}function aT(e,t){var n;return F(function(i){return 1==i.g?t==(n=tp).ea?e.h?M(i,e.h.remove(0,1/0),0):i.return():M(i,ak(e,t,function(){return aS(e,t,0,e.l.duration)}),4):e.m?M(i,ak(e,n.T,function(){return aS(e,n.T,0,e.l.duration)}),0):i.B(0)})}function aS(e,t,n,i){i<=n?aI(e,t):e.g[t].remove(n,i)}function aA(e,t){var n=e.g[t].appendWindowStart,i=e.g[t].appendWindowEnd;e.g[t].abort(),e.g[t].appendWindowStart=n,e.g[t].appendWindowEnd=i,aI(e,t)}function aE(e,t,n){0>n&&(n+=.001),e.g[t].timestampOffset=n,aI(e,t)}function aI(e,t){if(!e.u){var n=e.j[t][0];n&&(n.p.resolve(),aC(e,t))}}function ak(e,t,n){return ii(e.I),n={start:n,p:new nH},e.j[t].push(n),1==e.j[t].length&&aD(e,t),n.p}function aM(e,t){var n,i,r,a,o,s;return F(function(u){switch(u.g){case 1:for(r in ii(e.I),n=[],i={},e.g)i.tc=new nH,a={start:function(e){return function(){return e.tc.resolve()}}(i),p:i.tc},e.j[r].push(a),n.push(i.tc),1==e.j[r].length&&a.start(),i={tc:i.tc};return D(u,2),M(u,Promise.all(n),4);case 4:N(u,3);break;case 2:throw L(u);case 3:return D(u,5,6),M(u,t(),6);case 6:for(o in P(u),e.g)aC(e,o);_(u,0);break;case 5:throw s=L(u),new tr(2,3,3015,s,e.i.error||"No error in the media element")}})}function aC(e,t){e.j[t].shift(),aD(e,t)}function aD(e,t){var n=e.j[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new tr(2,3,3017,t)):n.p.reject(new tr(2,3,3015,i,e.i.error||"No error in the media element")),aC(e,t)}}(b=af.prototype).destroy=function(){return this.I.destroy()},b.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,u,l=this;return F(function(c){if(1==c.g)return r=tp,M(c,l.K,2);for(l.s=t,l.N=n,l.ca=i,l.Z=!l.s&&"HLS"==l.N&&!l.ca,o=(a=v(e.keys())).next();!o.done;o=a.next())s=o.value,u=e.get(s),ag(l,s,u,u.codecs),l.m?(l.j[r.T]=[],l.j[r.ka]=[]):l.j[s]=[];C(c)})},b.configure=function(e){this.A=e},b.hb=function(){var e={total:this.u?[]:rj(this.i.buffered),audio:this.u?[]:rj(aw(this,"audio")),video:this.u?[]:rj(aw(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},b.remove=function(e,t,n){var i,r=this;return F(function(a){return 1==a.g?e==(i=tp).ea?M(a,r.h.remove(t,n),0):M(a,ak(r,e,function(){return aS(r,e,t,n)}),4):r.m?M(a,ak(r,i.T,function(){return aS(r,i.T,t,n)}),0):a.B(0)})},b.flush=function(e){var t,n=this;return F(function(i){return 1==i.g?e==(t=tp).ea?i.return():M(i,ak(n,e,function(){n.i.currentTime-=.001,aI(n,e)}),2):n.m?M(i,ak(n,t.T,function(){var e=t.T;n.i.currentTime-=.001,aI(n,e)}),0):i.B(0)})},b.endOfStream=function(e){var t=this;return F(function(n){return M(n,aM(t,function(){av(t)||"closed"===t.l.readyState||(e?t.l.endOfStream(e):t.l.endOfStream())}),0)})},b.Ja=function(e){var t=this;return F(function(n){return M(n,aM(t,function(){if(e<t.l.duration)for(var n in t.g){var i={start:function(){},p:new nH};t.j[n].unshift(i)}t.l.duration=e}),0)})},b.getDuration=function(){return this.l.duration};var aR=e.URL.createObjectURL,aN="sequence";function aL(e,t,n){this.i=e,this.m=t,this.s=this.j=1/0,this.g=1,this.h=this.l=null,this.o=0,this.C=!0,this.F=0,this.u=void 0===n||n,this.G=0,this.A=!1}function aP(e,t,n){this.l=n,this.j=e,this.s=aO(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.u=t,this.i=function(){}}function a_(e){this.g=e}function aO(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=v(rj(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function aU(e,t,n,i,r){var a=this;this.u=r,this.g=e,this.A=t,this.s=n,this.l=new ir,this.j=!1,this.F=e.readyState,this.C=this.i=0,this.h=i,this.o=!1,this.l.D(e,"waiting",function(){return aj(a)}),this.m=new tV(function(){aj(a)}).La(this.s.gapJumpTimerTime)}function aj(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(r=!e.h)){var t,n,i,r,a=(r=e.h).j,o=aO(a),s=a.g.currentTime,u=Date.now()/1e3;
10(r.g!=s||r.s!=o)&&(r.m=u,r.g=s,r.s=o,r.h=!1),(o=(s=u-r.m)>=r.u&&o&&!r.h)&&(r.i(r.g,s),r.h=!0,r.g=a.g.currentTime,r.o++,r.l(new nY("stalldetected"))),r=!o}r&&(r=e.g.currentTime,t=a=e.g.buffered,n=r,i=e.s.gapDetectionThreshold,null==(o=!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)?null:0<=(t=rj(t).findIndex(function(e,t,r){return e.start>n&&(0==t||r[t-1].end-n<=i)}))?t:null)||0==o&&!e.o||(s=a.start(o))>=e.A.ib()||.001>s-r||(0!=o&&a.end(o-1),e.g.currentTime=s,r==e.i&&(e.i=s),e.C++,e.u(new nY("gapjumped"))))}}}function aB(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=aF.value().get(t),n.ma(e,t,i))}(b=aL.prototype).getDuration=function(){return this.j},b.Sg=function(){return this.g},b.gg=function(e){this.i=e},b.Ja=function(e){this.j=e},b.Xg=function(){return this.i},b.eg=function(e){this.o=e},b.ic=function(e){this.C=e},b.Td=function(e){this.s=e},b.fg=function(e){this.m=e},b.Lg=function(){return this.m},b.Wf=function(e,t){if(0!=e.length){var n=e[e.length-1].end+t;this.Md(e[0].start+t),this.g=e.reduce(function(e,t){return Math.max(e,t.end-t.start)},this.g),this.h=Math.max(this.h,n),null!=this.i&&this.u&&!this.A&&(this.i=(Date.now()+this.o)/1e3-this.h-this.g)}},b.Vc=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.o)/1e3;e=v(e);for(var r=e.next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.g=Math.max(this.g,r.endTime-r.startTime));this.Md(t),this.h=Math.max(this.h,n),null!=this.i&&this.u&&!this.A&&(this.i=i-this.h-this.g)}},b.Id=function(){this.A=!0},b.Md=function(e){this.l=null==this.l?e:Math.min(this.l,e)},b.Ue=function(e){this.g=Math.max(this.g,e)},b.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},b.R=function(){return 1/0==this.j&&!this.C},b.Ib=function(){return 1/0!=this.j&&!this.C},b.jb=function(){return Math.max(this.F,this.Eb()-this.s)},b.ig=function(e){this.F=e},b.Eb=function(){return this.R()||this.Ib()?Math.min(Math.max(0,(Date.now()+this.o)/1e3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j},b.Nc=function(e){var t=Math.max(this.l,this.F);return 1/0==this.s?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Eb()-this.s+e,this.ib()))},b.$b=function(){return this.Nc(0)},b.ib=function(){return Math.max(0,this.Eb()-(this.R()||this.Ib()?this.m:0))},b.ng=function(){return null!=this.i&&(null==this.h||!this.u)},b.dg=function(e){this.G=e},W("shaka.media.PresentationTimeline",aL),aL.prototype.setAvailabilityTimeOffset=aL.prototype.dg,aL.prototype.usingPresentationStartTime=aL.prototype.ng,aL.prototype.getSeekRangeEnd=aL.prototype.ib,aL.prototype.getSeekRangeStart=aL.prototype.$b,aL.prototype.getSafeSeekRangeStart=aL.prototype.Nc,aL.prototype.getSegmentAvailabilityEnd=aL.prototype.Eb,aL.prototype.setUserSeekStart=aL.prototype.ig,aL.prototype.getSegmentAvailabilityStart=aL.prototype.jb,aL.prototype.isInProgress=aL.prototype.Ib,aL.prototype.isLive=aL.prototype.R,aL.prototype.offset=aL.prototype.offset,aL.prototype.notifyMaxSegmentDuration=aL.prototype.Ue,aL.prototype.notifyMinSegmentStartTime=aL.prototype.Md,aL.prototype.lockStartTime=aL.prototype.Id,aL.prototype.notifySegments=aL.prototype.Vc,aL.prototype.notifyTimeRange=aL.prototype.Wf,aL.prototype.getDelay=aL.prototype.Lg,aL.prototype.setDelay=aL.prototype.fg,aL.prototype.setSegmentAvailabilityDuration=aL.prototype.Td,aL.prototype.setStatic=aL.prototype.ic,aL.prototype.setClockOffset=aL.prototype.eg,aL.prototype.getPresentationStartTime=aL.prototype.Xg,aL.prototype.setDuration=aL.prototype.Ja,aL.prototype.setPresentationStartTime=aL.prototype.gg,aL.prototype.getMaxSegmentDuration=aL.prototype.Sg,aL.prototype.getDuration=aL.prototype.getDuration,aP.prototype.release=function(){this.l=this.j=null,this.i=function(){}},aU.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.m&&(this.m.stop(),this.m=null),this.h&&(this.h.release(),this.h=null),this.g=this.A=this.u=null},aU.prototype.Ye=function(){this.o=!0,aj(this)};var aF=new iu(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function aV(e,t,n,i){var r=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return null==r.l&&(r.l=i()),r.l},this.o=!1,this.h=new ir,this.i=new az(e),aB(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){aq(r,r.j())})}function aH(e){return e.o?e.g.currentTime:e.j()}function aK(e,t){0<e.g.readyState?aX(e.i,t):aB(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){aq(e,e.j())})}function aq(e,t){.001>Math.abs(e.g.currentTime-t)?aG(e):(e.h.ma(e.g,"seeking",function(){aG(e)}),aX(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function aG(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function az(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new tV(function(){0>=t.i?t.g.stop():t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)})}function aX(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.La(.1)}function aW(e){this.g=e,this.j=!1,this.h=null,this.i=new ir}function aY(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.A=t.minBufferTime||0,this.l=n,this.u=r,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var i=t.stallSkip;return(t=new aP(new a_(e),t.stallThreshold,n)).i=function(){i?e.currentTime+=i:(e.pause(),e.play())},t}(e,n,a),this.j=new aU(e,t.presentationTimeline,n,this.o,a),this.h=new aV(e,function(){e:{var e=o.j;e.j=!0,e.o=!1;var t=aH(o.h);if(.001<Math.abs((e=aJ(o,t))-t)&&(t=Date.now()/1e3,!o.s||o.s<t-1)){o.s=t,aK(o.h,e),e=void 0;break e}o.u(),e=void 0}return e},function(e){var t=o.j;t.g.seeking&&!t.j&&(t.j=!0,t.i=e)},function(){var e=i;return null==e?e=1/0>o.g.getDuration()?o.g.$b():o.g.ib():0>e&&(e=o.g.ib()+e),a$(o,aQ(o,e))}),this.m=new tV(function(){if(0!=o.i.readyState&&!o.i.paused){var e=aH(o.h),t=o.g.$b(),n=o.g.ib();3>n-t&&(t=n-3),e<t&&(e=aJ(o,e),o.i.currentTime=e)}})}function a$(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function aJ(e,t){var n=Math.max(e.A,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.$b(),a=e.g.ib(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.Nc(n),u=e.g.Nc(i);return n=e.g.Nc(n+i),t>=o?a$(e,t):t>a?a:t<r?rO(e.i.buffered,u)?u:n:t>=s||rO(e.i.buffered,t)?t:n}function aQ(e,t){var n=e.g.$b();return t<n?n:t>(e=e.g.ib())?e:t}function aZ(e){this.g=e,this.l=null,this.i=0,this.m=!1}function a0(e,t,n){return new aZ([new rN(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function a1(e,t,n){this.i=e,this.g=t,this.h=n}function a2(){aZ.call(this,[]),this.h=[]}function a4(e){var t=this;this.g=e,this.j=!1,this.i=this.g.xd(),this.h=new tV(function(){t.g.Uf(.25*t.i)})}function a3(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.xd()!=t&&e.g.mf(t);return}catch(e){}e.h.La(.25),0!=e.g.xd()&&e.g.mf(0)}function a5(e){var t=this;this.h=e,this.g=new Set,this.i=new tV(function(){a8(t,!1)}).La(.25)}function a8(e,t){for(var n=v(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function a6(e){nQ.call(this),this.g=new Map,this.h=e}function a9(e){nQ.call(this);var t=this;this.g=new Set,this.i=e,this.h=new tV(function(){for(var e=t.i(),n=v(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime<e.start&&(t.g.delete(i),i=new nY("regionremove",new Map([["region",i]])),t.dis
10patchEvent(i))}).La(2)}function a7(e,t){nQ.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Rb:null,Qb:on,Hb:function(e,t){return oe(n,"enter",e,t)}},{Rb:ot,Qb:on,Hb:function(e,t){return oe(n,"enter",e,t)}},{Rb:oi,Qb:on,Hb:function(e,t){return oe(n,"enter",e,t)}},{Rb:on,Qb:ot,Hb:function(e,t){return oe(n,"exit",e,t)}},{Rb:on,Qb:oi,Hb:function(e,t){return oe(n,"exit",e,t)}},{Rb:ot,Qb:oi,Hb:function(e,t){return oe(n,"skip",e,t)}},{Rb:oi,Qb:ot,Hb:function(e,t){return oe(n,"skip",e,t)}}],this.h=new ir,this.h.D(this.i,"regionremove",function(e){n.g.delete(e.region)})}function oe(e,t,n,i){t=new nY(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}aV.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},az.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},(b=aW.prototype).de=function(){var e=this;aB(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){null==e.h||0==e.h?e.j=!0:(e.i.ma(e.g,"seeking",function(){e.j=!0}),e.g.currentTime=Math.max(0,e.g.currentTime+e.h))})},b.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},b.ee=function(e){this.h=this.j?this.h:e},b.md=function(){return(this.j?this.g.currentTime:this.h)||0},b.yf=function(){return 0},b.xf=function(){return 0},b.Vf=function(){},(b=aY.prototype).de=function(){this.m.La(.25)},b.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},b.ee=function(e){aK(this.h,e)},b.md=function(){var e=aH(this.h);return 0<this.i.readyState&&!this.i.paused?aQ(this,e):e},b.yf=function(){return this.o?this.o.o:0},b.xf=function(){return this.j.C},b.Vf=function(){this.j.Ye()},(b=aZ.prototype).Db=function(){return this.g.length},b.release=function(){this.m||(this.g=[],this.l&&this.l.stop(),this.l=null)},b.rh=function(){this.m=!0},b.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},b.get=function(e){return 0==this.g.length?null:0>(e-=this.i)||e>=this.g.length?null:this.g[e]},b.offset=function(e){if(!this.m)for(var t=v(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},b.Kd=function(e){if(!this.m&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(e){return Math.round(1e3*e.startTime)/1e3<t}),this.g.push.apply(this.g,y(e))}},b.Uc=function(e,t){var n=this;e=e.filter(function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)}),this.Kd(e),this.Za(t)},b.Za=function(e){if(!this.m){var t=this.g.length;this.g=this.g.filter(function(t){return t.endTime>e}),this.i+=t-this.g.length}},b.Xb=function(e,t,n){if(n=void 0!==n&&n,!this.m){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=t)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=e)this.g.shift(),n||this.i++;else break;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new rN(e.startTime,t,e.C,e.Ka,e.pa,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.i,e.tilesLayout,e.A,e.g,e.status,e.aes128Key),this.g[this.g.length-1].l=e.l)}},b.Vd=function(e,t){var n=this;this.m||(this.l&&this.l.stop(),this.l=new tV(function(){var e=t();e?n.g.push.apply(n.g,y(e)):(n.l.stop(),n.l=null)}),this.l.La(e))},aZ.prototype[Symbol.iterator]=function(){return this.Bb(0)},aZ.prototype.Bb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),i=-1;if(n&&0<n.i.length)for(var r=n.i.length-1;0<=r;--r){var a=n.i[r];if(e>=a.startTime&&e<a.endTime){for(;r&&!a.s;)r--,a=n.i[r];if(!a.s)return Z("No independent partial segment found!"),null;t++,i=r-1;break}}return new a1(this,t,i)},W("shaka.media.SegmentIndex",aZ),aZ.forSingleSegment=a0,aZ.prototype.getIteratorForTime=aZ.prototype.Bb,aZ.prototype.updateEvery=aZ.prototype.Vd,aZ.prototype.fit=aZ.prototype.Xb,aZ.prototype.evict=aZ.prototype.Za,aZ.prototype.mergeAndEvict=aZ.prototype.Uc,aZ.prototype.offset=aZ.prototype.offset,aZ.prototype.get=aZ.prototype.get,aZ.prototype.find=aZ.prototype.find,aZ.prototype.markImmutable=aZ.prototype.rh,aZ.prototype.release=aZ.prototype.release,a1.prototype.Dg=function(){return this.g},a1.prototype.current=function(){var e=this.i.get(this.g);return e&&0<e.i.length&&e.Ca().length&&this.h>=e.i.length&&(this.g++,this.h=0,e=this.i.get(this.g)),e&&0<e.i.length?e.i[this.h
10]:e},a1.prototype.next=function(){var e=this.i.get(this.g);return e&&0<e.i.length?(this.h++,e.Ca().length&&this.h==e.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0),{value:e=this.current(),done:!e}},W("shaka.media.SegmentIterator",a1),a1.prototype.next=a1.prototype.next,a1.prototype.current=a1.prototype.current,a1.prototype.currentPosition=a1.prototype.Dg,A(a2,aZ),(b=a2.prototype).clone=function(){var e=new a2;return e.h=this.h.slice(),e},b.release=function(){for(var e=v(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},b.find=function(e){for(var t=0,n=v(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.i+i.Db()}return null},b.get=function(e){for(var t=0,n=v(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;t+=i.i+i.Db()}return null},b.offset=function(){},b.Kd=function(){},b.Za=function(){},b.Uc=function(){},b.Xb=function(){},b.Vd=function(){},W("shaka.media.MetaSegmentIndex",a2),a2.prototype.updateEvery=a2.prototype.Vd,a2.prototype.fit=a2.prototype.Xb,a2.prototype.mergeAndEvict=a2.prototype.Uc,a2.prototype.evict=a2.prototype.Za,a2.prototype.merge=a2.prototype.Kd,a2.prototype.offset=a2.prototype.offset,a2.prototype.get=a2.prototype.get,a2.prototype.find=a2.prototype.find,a2.prototype.release=a2.prototype.release,a4.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},a4.prototype.set=function(e){this.i=e,a3(this)},a4.prototype.td=function(){return this.g.td()},a5.prototype.release=function(){this.i.stop();for(var e=v(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},A(a6,nQ),a6.prototype.release=function(){this.g.clear(),nQ.prototype.release.call(this)},a6.prototype.j=function(e){for(var t=v(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;e:{for(var i=n.Xc,r=i.length-1;0<=r;r--){var a=i[r];if(a.position<=e){i=a.Qe;break e}}i=null}if((r=i)&&(r=!((r=n.Ff)===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width)),r)e:{if(r=e,a=i.contentType,(a=this.h()[a])&&0<a.length){var o=a[a.length-1].end;if(r>=a[0].start&&r<o){r=!0;break e}}r=!1}r&&(n.Ff=i,JSON.stringify(i),n=new nY("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}},A(a9,nQ),a9.prototype.release=function(){this.g.clear(),this.h.stop(),nQ.prototype.release.call(this)},A(a7,nQ),a7.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,nQ.prototype.release.call(this)},a7.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=v(this.i.g),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?ot:e>i.endTime?oi:on;this.g.set(i,a);for(var o=v(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Rb==r&&s.Qb==a&&s.Hb(i,t)}}};var ot=1,on=2,oi=3;function or(e,t,n){this.j=e,this.h=t,this.i=0,this.l=n,this.g=new Map}function oa(e){if(0!==e.g.size){for(var t=v(e.g.keys()),n=t.next();!n.done;n=t.next())(n=n.value)&&oo(e,n);e.i=0}}function oo(e,t){var n=e.g.get(t);e.g.delete(t),n&&n.abort()}function os(e){this.i=e,this.g=this.h=null}function ou(e,t,n,i,r){return e=n5(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function ol(e,t){var n=this;this.g=t,this.m=e,this.i=null,this.u=1,this.o=this.j=null,this.F=0,this.C=!1,this.h=new Map,this.A=!1,this.G=null,this.s=!1,this.l=new it(function(){var e,t,i,r,a;return e=n,F(function(n){if(1==n.g){for(t=[],r=(i=v(e.h.values())).next();!r.done;r=i.next())oS(a=r.value),t.push(oA(a));return M(n,Promise.all(t),2)}e.h.clear(),e.g=null,e.m=null,e.i=null,C(n)})})}function oc(e,t){var n=e.h.get("video");if(n){var i=n.stream;i&&(t?(t=i.trickModeVideo)&&!n.Nb&&(of(e,t,!1,0,!1),n.Nb=i):(i=n.Nb)&&(n.Nb=null,of(e,i,!0,0,!1)))}}function od(e,t,n,i,r,a){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,a=void 0!==a&&a,e.j=t,e.A&&(t.video&&of(e,t.video,n,i,r,a),t.audio&&of(e,t.audio,n,i,r,a))}function oh(e,t){F(function(n){if(1==n.g)return e.o=t,e.A?t.segmentIndex?n.B(2):M(n,t.createSegmentIndex(),2):n.return();of(e,t,!0,0,!1),C(n)})}function of(e,t,n,i,r,a){var o,s,u,l,c,d,h,f,p,g,m,v,y=e.h.get(t.type);y||t.type!=tf?y&&(y.Nb&&(t.trickModeVideo?(y.Nb=t,t=t.trickModeVideo):y.Nb=null),y.stream!=t||r)&&(y.Ia&&(c=y.Ia,(d=t)&&d!==c.h&&(oa(c),c.h=d)
10),t.type==tf&&(r=tv(t.mimeType,t.codecs),am(e.g.S,r,e.m.sequenceMode,t.external)),y.stream.closeSegmentIndex&&y.stream.closeSegmentIndex(),y.stream=t,y.Y=null,y.zf=!!a,n&&(y.Ec?y.Wd=!0:y.ta?(y.ob=!0,y.rd=i,y.Wd=!0):(oS(y),ox(e,y,!0,i).catch(function(t){e.g&&e.g.onError(t)}))),(o=e,s=y,F(function(e){if(1==e.g)return s.Ga?(u=s.stream,l=s.Ga,u.segmentIndex?e.B(2):M(e,u.createSegmentIndex(),2)):e.return();if(s.Ga!=l||s.stream!=u)return e.return();var t=o.g.wd(),n=ab(o.g.S,s.type),i=s.stream.segmentIndex.find(s.xa?s.xa.endTime:t),r=null==i?null:s.stream.segmentIndex.get(i);i=r&&r.pa?r.pa-r.Ka:null,r&&!i&&(i=(r.endTime-r.getStartTime())*(s.stream.bandwidth||0)/8),i?((r=r.h)&&(i+=(r.pa?r.pa-r.Ka:null)||0),t=8*i/(r=o.g.getBandwidthEstimate())<(n||0)-t-Math.max(o.m.minBufferTime||0,o.i.rebufferingGoal)||s.Ga.h.g>i):t=!1,t&&s.Ga.abort(),C(e)})).catch(function(t){e.g&&e.g.onError(t)})):(h=t,F(function(t){switch(t.g){case 1:return f=tp,e.F++,p=e.F,D(t,2),M(t,aT(e.g.S,f.ea),4);case 4:N(t,3);break;case 2:g=L(t),e.g&&e.g.onError(g);case 3:m=tv(h.mimeType,h.codecs),am(e.g.S,m,e.m.sequenceMode,h.external),(e.g.S.F.isTextVisible()||e.i.alwaysStreamText)&&e.F==p&&(v=og(e,h),e.h.set(f.ea,v),oT(e,v,0)),C(t)}}))}function op(e,t){t.Ec||t.ob||(t.ta?(t.ob=!0,t.rd=0):null==ay(e.g.S,t.type)?null==t.cb&&oT(e,t,0):(oS(t),ox(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function og(e,t){return{stream:t,type:t.type,Y:null,Ia:om(e,t),xa:null,Tc:null,Me:null,Ke:null,Je:null,Nb:null,endOfStream:!1,ta:!1,cb:null,ob:!1,rd:0,Wd:!1,Ec:!1,ad:!0,Te:!1,df:!1,Qc:!1,Ga:null}}function om(e,t){return"video"!==t.type&&"audio"!==t.type?null:0<e.i.segmentPrefetchLimit?new or(e.i.segmentPrefetchLimit,t,function(t,n,i){return ow(e,t,n,i)}):null}function ov(e,t,n,i,r,a,o){var s,u,l,c,d,h;return o=void 0!==o&&o,F(function(f){switch(f.g){case 1:var p,g,m,v,y,b;return s=i.closedCaptions&&0<i.closedCaptions.size,l=null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length||e.i.dispatchAllEmsgBoxes,c=e.i.parsePrftBox&&!e.C,(l||c)&&(u=new iT),l&&u.O("emsg",function(t){var n=i.emsgSchemeIdUris;if(0===t.version)var a=t.reader.Yc(),o=t.reader.Yc(),s=t.reader.L(),u=t.reader.L(),l=t.reader.L(),c=t.reader.L(),d=r.startTime+u/s;else s=t.reader.L(),u=(d=t.reader.hc()/s+r.timestampOffset)-r.startTime,l=t.reader.L(),c=t.reader.L(),a=t.reader.Yc(),o=t.reader.Yc();t=t.reader.mb(t.reader.getLength()-t.reader.la()),(n&&n.includes(a)||e.i.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.vh():(n=(new Map).set("detail",{startTime:d,endTime:d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}),(n=new nY("emsg",n)).cancelable=!0,e.g.onEvent(n),n.defaultPrevented||"https://aomedia.org/emsg/ID3"!=a&&"https://developer.apple.com/streaming/emsg-id3"!=a||(a=rK(t)).length&&r&&e.g.wh([{cueTime:r.startTime,data:t,frames:a,dts:r.startTime,pts:r.startTime}],0,r.endTime)))}),c&&u.O("prft",function(t){if(!e.C&&r.h.timescale){var n=t.reader,i=t.version;n.L(),t=n.L();var a=n.L();t=1e3*t+a/4294967296*1e3,n=0===i?n.L():4294967296*(i=n.L())+(n=n.L()),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/r.h.timescale*1e3)}),n=new nY("prft",n),e.g.onEvent(n),e.C=!0}}),(l||c)&&u.parse(a),M(f,(p=e,g=t,m=n,F(function(e){if(1==e.g)return(v=Math.max(p.i.bufferBehind,p.m.presentationTimeline.g),null==(y=ay(p.g.S,g.type)))?e.return():.01>=(b=m-y-v)?e.return():M(e,p.g.S.remove(g.type,y,y+b),2);ii(p.l),C(e)})),2);case 2:return ii(e.l),d=t.ad,t.ad=!1,h=t.zf,t.zf=!1,M(f,e.g.Af(t.type,a),3);case 3:return M(f,ax(e.g.S,t.type,a,r,i,s,d,h,o),4);case 4:ii(e.l),C(f)}})}function oy(e){return e&&e.type==tf&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function ob(t,n,i,r,a){var o,s,u,l,c;return F(function(d){switch(d.g){case 1:if(i instanceof rR&&(o=i.g))return d.return(o);if(s=null,n.Ia&&i instanceof rN){var h,f,p,g,m,v,y=n.Ia;if(y.g.has(i)){var b=y.g.get(i);r&&(b.h=r),y.g.delete(i),s=b.g}else s=null}return s||(s=ow(t,i,n.stream,r,a)),n.Ga=s,M(d,s.promise,2);case 2:if(u=d.h,n.Ga=null,l=u.data,!i.aes128Key){d.B(3);break}return c=n.Y,M(d,(h=l,f=i.aes128Key,F(function(t){if(1==t.g)return(p=f).cryptoKey?t.B(2):M(t,p.fetchKey(),3);if(!(g=p.iv))for(g=ef(new ArrayBuffer(16)),m=p.firstMediaSequenceNumber+c.g,v=g.byteLength-1;0<=v;v--)g[v]=255&m,m>>=8;
10return t.return(e.crypto.subtle.decrypt({name:"AES-CBC",iv:g},p.cryptoKey,h))})),4);case 4:l=d.h;case 3:return d.return(l)}})}function ow(e,t,n,i,r){r=r?0:1;var a=t instanceof rN?t:void 0;return t=ou(t.Ca(),t.Ka,t.pa,e.i.retryParameters,i),e.g.Kb.request(n9,t,{type:r,stream:n,segment:a})}function ox(e,t,n,i){var r,a;return F(function(o){return 1==o.g?(t.ob=!1,t.Wd=!1,t.rd=0,t.Ec=!0,t.xa=null,t.Tc=null,t.Y=null,t.Ia&&oa(t.Ia),i?(r=e.g.wd(),a=e.g.S.getDuration(),M(o,e.g.S.remove(t.type,r+i,a),3)):M(o,aT(e.g.S,t.type),4)):3!=o.g?(ii(e.l),n?M(o,e.g.S.flush(t.type),3):o.B(3)):void(ii(e.l),t.Ec=!1,t.endOfStream=!1,t.ta||t.cb||oT(e,t,0),C(o))})}function oT(t,n,i){var r=n.type;(r!=tf||t.h.has(r))&&(n.cb=new tF(function(){var i;return F(function(r){if(1==r.g){var a,o,s,u,l;return D(r,2),M(r,F(function(i){switch(i.g){case 1:if(ii(t.l),n.ta||null==n.cb||n.Ec)return i.return();if(n.cb=null,!n.ob){i.B(2);break}return M(i,ox(t,n,n.Wd,n.rd),3);case 3:return i.return();case 2:if(n.stream.segmentIndex){i.B(4);break}return a=n.stream,M(i,n.stream.createSegmentIndex(),5);case 5:if(a!=n.stream)return a.closeSegmentIndex&&a.closeSegmentIndex(),n.ta||n.cb||oT(t,n,0),i.return();case 4:D(i,6),null!=(o=function(t,n){if(oy(n))return w=t.g.S,x=n.stream.originalId||"",T=ab(w,"video")||0,tk(w.h,x,T),null;n.type==tf&&(S=t.g.S).h&&tk(S.h,"",0);var i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S,A,E,I=t.g.wd(),k=n.xa?n.xa.endTime:I,C=(A=t.g.S,E=n.type,A.u?0:E==tf?null==(A=A.h).h||A.h<I?0:A.h-Math.max(I,A.g):rU(A=aw(A,E),I)),O=Math.max(t.m.minBufferTime||0,t.i.rebufferingGoal,t.i.bufferingGoal)*t.u,U=t.m.presentationTimeline.getDuration()-k,j=ab(t.g.S,n.type);if(1e-6>U&&j)return n.endOfStream=!0,"video"==n.type&&(t=t.h.get(tf))&&oy(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,C>=O)return t.i.updateIntervalSeconds/2;if(!(C=function(e,t,n,i){if(t.Y)return t.Y.current();if(t.xa||i)return n=t.xa?t.xa.endTime:i,t.Te=!0,t.Y=t.stream.segmentIndex.Bb(n),t.Y&&t.Y.next().value;i=Math.max(n-(e=e.i.inaccurateManifestTolerance),0);var r=null;return e&&(t.Y=t.stream.segmentIndex.Bb(i),r=t.Y&&t.Y.next().value),r||(t.Y=t.stream.segmentIndex.Bb(n),r=t.Y&&t.Y.next().value),r}(t,n,I,j)))return t.i.updateIntervalSeconds;for(O=1/0,j=(U=v(U=Array.from(t.h.values()))).next();!j.done;j=U.next())oy(j=j.value)||j.Y&&!j.Y.current()||(O=Math.min(O,j.xa?j.xa.endTime:I));return k>=O+t.m.presentationTimeline.g?t.i.updateIntervalSeconds:(n.Ia&&n.Y&&function(e,t){if(e.h.segmentIndex){var n=e.h.segmentIndex.Bb(Math.max(t.startTime,e.i));if(n)for(;e.g.size<e.j&&null!=t;){var i=!0;t.m&&null!=t.pa&&(i=!1),2==t.Fb()&&(i=!1),i&&!e.g.has(t)&&(function(e,t,n){e.g=e.i(t,n,function(t){return F(function(n){return e.h?M(n,e.h(t),0):n.B(0)})})}(i=new os(e.l),t,e.h),e.g.set(t,i)),e.i=t.startTime,t=n.next().value}}}(n.Ia,C),(i=t,r=n,a=I,o=C,F(function(t){switch(t.g){case 1:var n,w,x,T,S,A,E,I,k,C,O,U,j,B,V,H;if(s=tp,u=r.stream,l=r.Y,r.ta=!0,D(t,2),2==o.Fb())throw new tr(1,1,1011);return M(t,(n=i,w=r,x=o,F(function(e){var t,i,r,a,o,s,u,l,c,d,h,f,p;return 1==e.g?(T=tp,S=[],A=Math.max(0,x.appendWindowStart-.1),E=x.appendWindowEnd+.01,I=tS(w.stream.codecs)[0],k=tx(w.stream.mimeType),(C=x.timestampOffset)==w.Me&&A==w.Ke&&E==w.Je&&I==w.Le&&k==w.Rf)?e.B(2):((O=w.Le&&w.Rf&&(t=n.g.S,i=w.type,r=w.stream,a=tS(tT(t.G[i]))[0],o=tx(t.G[i]),s=tv(r.mimeType,r.codecs),u=t.A.forceTransmux,(!er(s)||!t.s&&tA.includes(s))&&(u=!0),r=ty(r.mimeType,r.codecs),u&&(u=eX(r))&&(s=(u=u()).convertCodecs(i,r),u.destroy()),i=tS(tT(s))[0],s=tx(s),(a!==i||o!==s)&&("smooth"!==t.A.codecSwitchingStrategy||!ea()||t.m)))&&(U=null,w.type===T.ka?U=n.h.get(T.T):w.type===T.T&&(U=n.h.get(T.ka)),U&&(U.Tc=null,op(n,U),oA(U).catch(function(){}))),j=function(){var e,t,i,r;return F(function(a){if(1==a.g){var o,s,u,l,c;return e=new Map,n.j.audio&&e.set(T.T,n.j.audio),n.j.video&&e.set(T.ka,n.j.video),D(a,2),w.Ke=A,w.Je=E,w.Le=I,w.Rf=k,w.Me=C,t=n.m.sequenceMode||"HLS"==n.m.type,M(a,(o=n.g.S,s=w.type,u=w.stream,F(function(n){if(1==n.g){var i,r,a,d,h,f,p,g,m,y,b,w,x,T;return s==(l=tp).ea?(t||(o.h.s=C),(i=o.h).l=A,i.m=E,n.return()):(c=[],M(n,(r=o,a=s,d=u,h=e,F(function(e){if(1==e.g){var t,n;return(f=tS(tT(r.G[a]))[0],p=tx(r.G[a]),m=tv(d.mimeType,d.codecs),y=r.A.forceTransmux,(!er(m)||!r.s&&tA.includes(m))&&(y=!0),b=ty(d.mimeType,d.codecs),y&&(w=eX(b))&&(m=(g=w()).convertCodecs(a,b)),x=tS(tT(m))[0],T=tx(m),f===x&&p===T)?e.return(!1):"smooth"===r.A.codecSwitchingStrategy&&ea()&&!r.m?M(e,(t=m,n=g,ak(r,a,function(){a!==tf&&(ea()&&(r.o[a]&&r.o[a].destroy(),n&&(r.o[a]=n),r.g[a].changeType(t+r.A.sourceBufferExtraFeatures),r.G[a]=t),aI(r,a))})),3):(g&&g.destroy(),M(e,aM(r,function(){var e,t,n,i,a,o,s,u,l,c,d,f,p,g,m,y,b,w,x,T,S,A;return F(function(E){switch(E.g){case 1:for(o in e=tp,r.u=!0,r.m=!1,t=r.i.currentTime,n=r.i.autoplay,i=r.i.paused,r.ja&&(r.i.autoplay=!1),R(E),r.C.vb(),a=[],r.o)a.push(r.o[o].destroy());for(s in r.j)for(l=(u=r.j[s])[0],r.j[s]=u.slice(0,1),l&&a.push(l.p.cat
10ch(ts)),d=(c=v(u.slice(1))).next();!d.done;d=c.next())d.value.p.reject(new tr(2,7,7003,void 0));for(f in r.g){p=r.g[f];try{r.l.removeSourceBuffer(p)}catch(e){}}return M(E,Promise.all(a),4);case 4:return r.o={},r.g={},g=r.l.duration,r.K=new nH,r.l=ap(r,r.K),M(E,r.K,5);case 5:for(r.l.duration=g,m=new nH,y=r.l.sourceBuffers,b=h.size,w=0,r.C.D(y,"addsourcebuffer",function(){++w===b&&m.resolve()}),T=(x=v(h.keys())).next();!T.done;T=x.next())S=T.value,A=h.get(S),ag(r,S,A,A.codecs),r.m?(r.j[e.T]=[],r.j[e.ka]=[]):r.j[S]=[];return r.i.currentTime=t,M(E,m,2);case 2:P(E),r.u=!1,ii(r.I),r.C.ma(r.i,"canplay",function(){ii(r.I),r.i.autoplay=n,i||r.i.play()}),_(E,0)}})}),3))}return e.return(!0)})),2))}return n.h||(c.push(ak(o,s,function(){return aA(o,s)})),o.m&&c.push(ak(o,l.T,function(){return aA(o,l.T)}))),t||(c.push(ak(o,s,function(){return aE(o,s,C)})),o.m&&c.push(ak(o,l.T,function(){return aE(o,l.T,C)}))),c.push(ak(o,s,function(){o.g[s].appendWindowStart=0,o.g[s].appendWindowEnd=E,o.g[s].appendWindowStart=A,aI(o,s)})),o.m&&c.push(ak(o,l.T,function(){var e=l.T;o.g[e].appendWindowStart=0,o.g[e].appendWindowEnd=E,o.g[e].appendWindowStart=A,aI(o,e)})),M(n,Promise.all(c),0)})),4)}if(2!=a.g)return O&&(i=null,w.type===T.ka?i=n.h.get(T.T):w.type===T.T&&(i=n.h.get(T.ka)),i&&(i.ob=!1,i.ta=!1,op(n,i))),N(a,0);throw r=L(a),w.Ke=null,w.Je=null,w.Le=null,w.Me=null,r})},M(e,j(),2)):(l=x.h,c=w.Tc,(l&&c?l.Oc()==c.Oc()&&l.Lc()==c.Lc()&&eS(l.Ca(),c.Ca())&&ec(l.g,c.g):l==c)||!(w.Tc=x.h)||(B=ob(n,w,x.h,void 0,!0),V=function(){var e,t,i,r,a;return F(function(o){switch(o.g){case 1:return D(o,2),M(o,B,4);case 4:return e=o.h,ii(n.l),t=null,i=new Map,(new iT).box("moov",iS).box("trak",iS).box("mdia",iS).O("mdhd",function(e){t=rX(e.reader,e.version).timescale}).box("hdlr",function(e){(e=e.reader).skip(8);var n=String.fromCharCode((e=e.mb(4))[0]);switch(n+=String.fromCharCode(e[1])+String.fromCharCode(e[2])+String.fromCharCode(e[3])){case"soun":i.set(T.T,t);break;case"vide":i.set(T.ka,t)}t=null}).parse(e),i.has(w.type)?x.h.timescale=i.get(w.type):null!=t&&(x.h.timescale=t),r=w.stream.closedCaptions&&0<w.stream.closedCaptions.size,M(o,n.g.Af(w.type,e),5);case 5:return M(o,ax(n.g.S,w.type,e,null,w.stream,r),6);case 6:N(o,0);break;case 2:throw a=L(o),w.Tc=null,a}})},n.g.uh(x.startTime,x.h),S.push(V())),n.m.sequenceMode&&(H=w.xa?w.xa.l:null,x.l!=H||w.Te)&&(w.Te=!1,S.push((d=n.g.S,h=w.type,f=x.startTime,F(function(e){return 1==e.g?h==(p=tp).ea?e.return():(ak(d,h,function(){return aA(d,h)}),d.m&&ak(d,p.T,function(){return aA(d,p.T)}),M(e,ak(d,h,function(){return aE(d,h,f)}),2)):d.m?M(e,ak(d,p.T,function(){return aE(d,p.T,f)}),0):e.B(0)})))),M(e,Promise.all(S),0))})),4);case 4:if(ii(i.l),i.s)return t.return();if(c="video/mp4"==u.mimeType||"audio/mp4"==u.mimeType,d=e.ReadableStream,i.i.lowLatencyMode&&d&&c&&("HLS"!=i.m.type||o.o))return f=new Uint8Array(0),g=p=!1,m=function(e){var t,n,s;return F(function(l){var c,d,h;return p?l.return():(g=!0,ii(i.l),i.s)?l.return():(c=f,d=e,(h=new Uint8Array(c.length+d.length)).set(c),h.set(d,c.length),f=h,t=!1,n=0,(new iT).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(f,!1,!0),t)?(s=f.subarray(0,n),f=f.subarray(n),M(l,ov(i,r,a,u,o,s,!0),0)):l.B(0)})},M(t,ob(i,r,o,m),9);return M(t,ob(i,r,o),7);case 7:if(h=t.h,ii(i.l),i.s)return t.return();return ii(i.l),r.ob?(r.ta=!1,oT(i,r,0),t.return()):M(t,ov(i,r,a,u,o,h),6);case 9:if(y=t.h,g){t.B(6);break}return p=!0,ii(i.l),i.s?t.return():r.ob?(r.ta=!1,oT(i,r,0),t.return()):M(t,ov(i,r,a,u,o,y),6);case 6:if(ii(i.l),i.s)return t.return();r.xa=o,l.next(),r.ta=!1,r.df=!1,JSON.stringify(i.g.S.hb()[r.type]),r.ob||i.g.Ye(o.startTime,o.endTime,r.type),oT(i,r,0),N(t,0);break;case 2:if(b=L(t),ii(i.l,b),i.s)return t.return();if(r.ta=!1,7001==b.code)r.ta=!1,oS(r),oT(i,r,0),t.B(0);else if(r.type==s.ea&&i.i.ignoreTextStreamFailures)i.h.delete(s.ea),t.B(0);else{if(3017!=b.code)return r.Qc=!0,b.severity=2,M(t,oE(i,r,b),0);(function(e,t,n){if(!Array.from(e.h.values()).some(function(e){return e!=t&&e.df})){var i=Math.round(100*e.u);if(20<i)e.u-=.2;else if(4<i)e.u-=.04;else{t.Qc=!0,e.s=!0,e.g.onError(n);return}t.df=!0}oT(e,t,4)})(i,r,b),t.B(0)}}})).catch(function(){}),null)}(t,n))&&(oT(t,n,o),n.Qc=!1),N(i,7);break;case 6:return s=L(i),M(i,oE(t,n,s),8);case 8:return i.return();case 7:if(u=Array.from(t.h.values()),!t.A||!u.every(function(e){return e.endOfStream})){i.B(0);break}return M(i,t.g.S.endOfStream(),10);case 10:ii(t.l),0!=(l=t.g.S.getDuration())&&l<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.Ja(l),C(i)}}),4)}if(2!=r.g)return N(r,0);i=L(r),t.g&&t.g.onError(i),C(r)})}).U(i))}function oS(e){null!=e.cb&&(e.cb.stop(),e.cb=null)}function oA(e){return F(function(t){return e.Ga?M(t,e.Ga.abort(),0):t.B(0)})}function oE(e,t,n){var i;return F(function(r){if(1==r.g)return M(r,nF(e.G),2);ii(e.l),i=0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime,1===n.category&&0<i&&(n.handled=e.g.le(t.stream,i),n.handled&&(n.severity=1)),e.g.onError(n),n.handled||e.i.failureCallback(n),C(r)})}function oI(e,t){var n=sq(),i=this;this.j=t,this.i=e,this.l=n,this.o=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then(function(){var e;return e=i,F(function(t){if(e.s.g)t=t.B(0);else{if(0==e.m.length||e.g&&!e.g.Gb)var n,i,r,a=!1;else{e.g&&(e.g.$a.Mb(),e.g=null);var o=(a=e.m.shift()).create(e.l);o?(a.$a.dc(),e.g={node:o.node,payload:o.payload,Gb:o.Gb,$a:a.$a}
10):a.$a.Qd(),a=!0}a?a=Promise.resolve():e.g?(n=e,a=F(function(e){switch(e.g){case 1:return n.i=n.j.Ug(n.i,n.l,n.g.node,n.g.payload),D(e,2),n.h=n.j.Gg(n.i,n.l,n.g.payload),M(e,n.h.promise,4);case 4:n.h=null,n.i==n.g.node&&(n.g.$a.Od(),n.g=null),N(e,0);break;case 2:return 7001==(i=L(e)).code?n.g.$a.Mb():n.g.$a.onError(i),n.g=null,n.h=null,r=n,M(e,n.j.handleError(n.l,i),5);case 5:r.i=e.h,C(e)}})):(e.j.th(e.i),e.o=new nH,a=e.o),t=M(t,a,1)}return t})}),this.s=new it(function(){var e,t,n;return e=i,F(function(i){if(1==i.g)return e.h&&e.h.abort(),oM(e),M(i,e.u,2);for(e.g&&e.g.$a.Mb(),n=(t=v(e.m)).next();!n.done;n=t.next())n.value.$a.Mb();e.g=null,e.m=[],e.j=null,C(i)})})}function ok(e,t){var n={dc:function(){},Od:function(){},Mb:function(){},onError:function(){},Qd:function(){},Mi:function(){}};return e.m.push({create:t,$a:n}),e.h&&e.h.abort(),oM(e),n}function oM(e){e.o&&(e.o.resolve(),e.o=null)}function oC(e){switch(e.toLowerCase()){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function oD(e,t){e=v(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).isContainer)oD(n.nestedCues,t);else{var i=n.clone();i.nestedCues=[],i.payload=function e(t){if(t.lineBreak)return"\n";if(t.nestedCues.length)return t.nestedCues.map(e).join("");var n=[],i=700<=t.fontWeight,r="italic"==t.fontStyle,a=t.textDecoration.includes("underline");return i&&n.push(["b"]),r&&n.push(["i"]),a&&n.push(["u"]),i="",(r=oC(t.color))&&(i+="."+r),(r=oC(t.backgroundColor))&&(i+=".bg_"+r),i&&n.push(["c",i]),n.reduceRight(function(e,t){var n=v(t);return t=n.next().value,n=n.next().value,"<"+t+(void 0===n?"":n)+">"+e+"</"+t+">"},t.payload)}(n),t.push(i)}return t}function oR(e){this.g=null;for(var t=v(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function oN(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=v(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function oL(){}function oP(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function o_(t,n){var i=this;this.j=!1,this.i=[],this.A=t,this.m=n,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.m.appendChild(this.g),this.u=new tV(function(){oO(i)}).La(.25),this.h=new Map,this.s=new ir,this.s.D(document,"fullscreenchange",function(){oO(i,!0)}),this.l=null,"ResizeObserver"in e&&(this.l=new ResizeObserver(function(){oO(i,!0)}),this.l.observe(this.g)),this.o=new Map}function oO(e,t){if(e.g){var n=e.A.currentTime;if(!e.j||(void 0===t?0:t)){t=v(e.o.values());for(var i=t.next();!i.done;i=t.next())oP(i.value);oP(e.g),e.h.clear(),e.o.clear()}if(e.j){t=new Map,i=v(e.h.keys());for(var r=i.next();!r.done;r=i.next())r=r.value,t.set(r,e.h.get(r));!function e(t,n,i,r,a){var o=!1,s=[],u=[];n=v(n);for(var l=n.next();!l.done;l=n.next()){l=l.value,a.push(l);var c=t.h.get(l),d=l.startTime<=r&&l.endTime>r,h=c?c.og:null;c&&(s.push(c.ke),c.Zc&&s.push(c.Zc),d||(o=!0,t.h.delete(l),c=null)),d&&(u.push(l),c?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,h)||(o=!0):(function(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var a=document.createElement(r);if("br"!=r&&function(e,t,n,i,r){var a,o,s,u=t.style,l=0==n.nestedCues.length,c=1<i.length;u.whiteSpace="pre-wrap";var d=n.payload.replace(/\s+$/g,function(e){return"\xa0".repeat(e.length)});if(u.webkitTextStrokeColor=n.textStrokeColor,u.webkitTextStrokeWidth=n.textStrokeWidth,u.color=n.color,u.direction=n.direction,u.opacity=n.opacity,u.paddingLeft=oU(n.linePadding,n,e.m),u.paddingRight=oU(n.linePadding,n,e.m),u.textCombineUpright=n.textCombineUpright,u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage+"')",u.backgroundRepeat="no-repeat",u.backgroundSize="contain",u.backgroundPosition="center",u.width="100%",u.height="100%";else{if(n.nestedCues.length)var h=t;else h=document.createElement("span"),t.appendChild(h);n.border&&(h.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,function(e){return e.backgroundColor}))?h.style.backgroundColor=t:d&&(h.style.backgroundColor="rgba(0, 0, 0, 0.8)")),d&&(h.textContent=d)}c&&!i[i.length-1].isContainer?u.display="inline":(u.display="flex",u.flexDirection="column",u.alignItems="center",u.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),l||(u.margin="0"),u.fontFamily=n.fontFamily,u.fontWeight=n.fontWeight.toString(),u.fontStyle=n.fontStyle,u.letterSpacing=n.letterSpacing,u.fontSize=oU(n.fontSize,n,e.m),null!=n.line&&(e=n.lineInterpretation,0==n.line&&e==eP&&(e=1),1==e&&(u.position="absolute",n.writingMode==eL?(u.width="100%",n.lineAlign==e_?u.top=n.line+"%":"end"==n.lineAlign&&(u.bottom=100-n.line+"%")):"vertical-lr"==n.writingMode?(u.height="100%",
10n.lineAlign==e_?u.left=n.line+"%":"end"==n.lineAlign&&(u.right=100-n.line+"%")):(u.height="100%",n.lineAlign==e_?u.right=n.line+"%":"end"==n.lineAlign&&(u.left=100-n.line+"%")))),u.lineHeight=n.lineHeight,null!=n.position&&(n.writingMode==eL?u.paddingLeft=n.position:u.paddingTop=n.position),o=(a=n).direction,s=a.positionAlign,a=a.textAlign,"line-left"==(e=s!==ek?s:"left"===a||"start"===a&&o===eN||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===eN?"line-right":"center")?u.cssFloat="left":"line-right"==e&&(u.cssFloat="right"),u.textAlign=n.textAlign,u.textDecoration=n.textDecoration.join(" "),u.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&u.writingMode==n.writingMode||(u.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==eL?u.width=n.size+"%":u.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){if(r=(n=t.region).id+"_"+n.width+"x"+n.height+(n.heightUnits==eK?"%":"px")+"-"+n.viewportAnchorX+"x"+n.viewportAnchorY+(n.viewportAnchorUnits==eK?"%":"px"),e.o.has(r))n=e.o.get(r);else{var o=document.createElement("span"),s=n.heightUnits==eK?"%":"px",u=n.widthUnits==eK?"%":"px",l=n.viewportAnchorUnits==eK?"%":"px";o.id="shaka-text-region---"+r,o.classList.add("shaka-text-region"),o.style.height=n.height+s,o.style.width=n.width+u,o.style.position="absolute",o.style.top=n.viewportAnchorY+l,o.style.left=n.viewportAnchorX+l,o.style.display="flex",o.style.flexDirection="column",o.style.alignItems="center",o.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.o.set(r,o),n=o}}r=a,i&&((r=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.h.set(t,{ke:a,og:r,Zc:n})}(t,l,a),h=(c=t.h.get(l)).og,o=!0)),0<l.nestedCues.length&&h&&e(t,l.nestedCues,h,r,a),a.pop()}if(o){for(a=(r=v(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(u.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),l=(u=v(u)).next();!l.done;l=u.next())(r=t.h.get(l.value)).Zc?(i.appendChild(r.Zc),r.Zc.appendChild(r.ke)):i.appendChild(r.ke)}}(e,e.i,e.g,n,[])}}}function oU(e,t,n){var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;var r=i.value;switch(i.unit){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return e}}function oj(e,t){this.h=e,this.g=t,this.j="",this.o=void 0,this.i=!1,this.m=!0,this.l=!1}function oB(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.o,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function oF(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,oB(e)),n.pr=e.h.vd();var r=n.ot===oK||n.ot===oq;if(e.l&&r&&(n.bs=!0,n.su=!0,e.l=!1),null==n.su&&(n.su=e.m),i)Object.keys(e=function(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};t=v(t);for(var o=t.next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=oV(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(n)).length&&Object.assign(t.headers,e);else{var a=oV(n);a&&(t.uris=t.uris.map(function(e){return oH(e,a)}))}}}function oV(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}var i=[],r={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=v(a);for(var o=a.next();!o.done;o=a.next()){var s,u=e[o=o.value];if(!Number.isNaN(s=u)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==u)&&("pr"!=o||1!==u)){var l=r[o];l&&(u=l(u));var c=void 0;c="string"==(l=typeof u)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(u):"boolean"===l?o:"symbol"===l?o+"="+u.description:o+"="+u,i.push(c)}}return i.join(",")}function oH(e,t){return!t||e.includes("offline:")?e:((e=new e0(e)).g.set("CMCD",t),e.toString())}os.prototype.abort=function(){this.g&&this.g.abort()},(b=ol.prototype).destroy=function(){return this.l.destroy()},b.configure=function(e){this.i=e,this.G=new nB({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var t=v(this.h.keys()),n=t.next();!n.done;n=t.next())if((n=this.h.get(n.value)).Ia){var i=n.Ia,r=e.segmentPrefetchLimit;i.j=r;for(var a=Array.from(i.g.keys());a.length>r;){var o=a.pop();o&&oo(i,o)}0<e.segmentPrefetchLimit||(n.Ia=null)}else 0<e.segmentPrefetchLimit&&(n.Ia=om(this,n.stream))},b.start=function(){var e=this;return F(function(t){if(1==t.g){var n,i,r,a,o,s,u,l,c;return M(t,(n=e,F(function(e){if(1==e.g){if(i=tp,!n.j)throw new tr(2,5,5006);return r=new Map,a=new Set,n.j.audio&&(r.set(i.T,n.j.audio),a.add(n.j.audio)),n.j.video&&(r.set(i.ka,n.j.video),a.add(n.j.video)),n.o&&(r.set(i.ea,n.o),a.add(n.o)),M(e,n.g.S.init(r,n.m.sequenceMode,n.m.type,n.m.ignoreManifestTimestampsInSegmentsMode),2)}for(ii(n.l),n.updateDuration(),s=(o=v(r.keys())).next();!s.done;s=o.next())u=s.value,l=r.get(u),n.h.has(u)||(c=og(n,l),n.h.set(u,c),oT(n,c,0));C(e)})),2)}ii(e.l),e.A=!0,C(t)})},b.ad=function(){if(this.g)for(var e=this.g.wd(),t=v(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=null;n.Y&&(r=n.Y.current()),(!r||r.startTime>e||r.endTime<e)&&(n.Y=null),(r=!(r=this.g.S).u&&(i==tf?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:rO(r=aw(r,i),e)))||((null!=ab(this.g.S,i)||n.ta)&&op(this,n),n.Ga&&(n.Ga.abort(),n.Ga=null),i===tf&&(i=this.g.S).H&&i.H.i(),n.ad=!0)}},b.updateDuration=function(){var e=this.m.presentationTimeline.getDuration();1/0>e?this.g.S.Ja(e):this.g.S.Ja(4294967296)},oI.prototype.destroy=function(){return this.s.destroy()},(b=oR.prototype).remove=function(e,t){return!!this.g&&(oN(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},b.append=function(e){var t=oD(e,[]),n=[];e=this.g.cues?Array.from(this.g.cues):[];var i={};t=v(t);for(var r=t.next();!r.done;i={Sb:i.Sb},r=t.next())i.Sb=r.value,e.some(function(e){return function(t){return t.startTime==e.Sb.startTime&&t.endTime==e.Sb.endTime&&t.text==e.Sb.payload}}(i))||(r=function(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}(i.Sb))&&n.push(r);for(i=(e=v(e=n.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:("line"in VTTCue.prototype)?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)}))).next();!i.done;i=e.next())this.g.addCue(i.value)},b.destroy=function(){return this.g&&(oN(this.g,function(){return!0}),this.g.mode="disabled"),this.g=null,Promise.resolve()},b.isTextVisible=function(){return"showing"==this.g.mode},b.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},W("shaka.text.SimpleTextDisplayer",oR),oR.prototype.setTextVisibility=oR.prototype.setTextVisibility,oR.prototype.isTextVisible=oR.prototype.isTextVisible,oR.prototype.destroy=oR.prototype.destroy,oR.prototype.append=oR.prototype.append,oR.prototype.remove=oR.prototype.remove,W("shaka.util.Dom",oL),oL.removeAllChildren=oP,(b=o_.prototype).append=function(e){var t=[].concat(y(this.i)),n={};e=v(e);for(var i=e.next();!i.done;n={fd:n.fd},i=e.next())n.fd=i.value,t.some(function(e){return function(t){return eI(t,e.fd)}}(n))||this.i.push(n.fd);oO(this)},b.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.u&&this.u.stop(),this.h.clear(),this.s&&(this.s.release(),this.s=null),this.l&&(this.l.disconnect(),this.l=null)},b.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter(function(n){return n.startTime<e||n.endTime>=t}),oO(this,n>this.i.length),!0},b.isTextVisible=function(){return this.j},b.setTextVisibility=function(e){this.j=e},W("shaka.text.UITextDisplayer",o_),o_.prototype.setTextVisibility=o_.prototype.setTextVisibility,o_.prototype.isTextVisible=o_.prototype.isTextVisible,o_.prototype.remove=o_.prototype.remove,o_.prototype.destroy=o_.prototype.destroy,o_.prototype.append=o_.prototype.append,W("shaka.text.WebVttGenerator",function(){}),oj.prototype.configure=function(e){this.g=e};var oK="v",oq="av";function oG(){}function oz(e,t,n,i,r){var a,o=r in i,s=!0;for(a in t){var u=r+"."+a,l=o?i[r]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=nZ(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=nZ(l)),u=oz(e[a],t[a],l,i,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(Z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&ee("Unexpected number of arguments for "+u),e[a]=t[a]):(Z("Invalid config, unrecognized key "+u),s=!1)}return s}function oX(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)(0==r||"\\"!=e[r-1])&&(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function oW(){}function oY(e){return e=ig(e),new e0(e).Ya}function o$(e,t,n){function i(e){ep(a).setUint32(o,e.byteLength,!0),o+=4,a.set(ef(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new tr(2,6,6015);r="string"==typeof t?iv(t,!0):t,e=iv(e=ig(e),!0);var r,a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function oJ(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ig(e).split("skd://").pop(),o$(e,n,t))}function oQ(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function oZ(){}function o0(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:nV(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=oY(t),t=o$(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:tG(),minHdcpVersion:""},i={retryParameters:nV(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){return e},sequenceMode:!1,enableAudioGroups:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:!(tX()||tW()||tY()||tJ()),ignoreManifestTimestampsInSegmentsMode:!1},mss:{manifestPreprocessor:function(e){return e},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},r={retryParameters:nV(),failureCallback:function(e){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};(tZ("Web0S")||tz()||tZ("CrKey"))&&(r.stallSkip=0);var a={trackSelectionCallback:function(e){return F(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return F(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?M(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5};t={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0};var o="reload";tW()||tX()||tZ("Tizen 4")||tY()||navigator.userAgent.match(/webOS\/4/i)||navigator.userAgent.match(/webOS\/5/i)||(o="smooth");var s={drm:n,manifest:i,streaming:r,mediaSource:{codecSwitchingStrategy:o,sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:a,abrFactory:function(){return new nw}
10,abr:t,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};return a.trackSelectionCallback=function(e){return F(function(t){return t.return(function(e,t){var n=e.filter(function(e){return"variant"==e.type}),i=[],r=tU(t,n.map(function(e){return e.language}));r&&(i=n.filter(function(e){return tL(e.language)==r})),0==i.length&&(i=n.filter(function(e){return e.primary})),0==i.length&&(n.map(function(e){return e.language}),i=n);var a=i.filter(function(e){return e.height&&480>=e.height});for(a.length&&(a.sort(function(e,t){return t.height-e.height}),i=a.filter(function(e){return e.height==a[0].height})),t=[],i.length&&(n=Math.floor(i.length/2),i.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(i[n])),i=(e=v(e)).next();!i.done;i=e.next())(i=i.value).type!=tf&&"image"!=i.type||t.push(i);return t}(e,s.preferredAudioLanguage))})},s}function o1(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return oz(e,t,n||o0(),i,"")}function o2(){this.g=null,this.h=[]}function o4(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=v(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function o3(){this.i=this.h=null,this.g=[]}function o5(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function o8(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.M=this.N=this.H=this.I=this.K=this.l=this.o=NaN,this.g=new o2,this.h=new o3}function o6(t,n){nQ.call(this);var i,r,a=this;this.l=sX,this.sd=this.h=null,this.ba=!1,this.Fd=new ir,this.Ac=new ir,this.o=new ir,this.lc=this.i=this.Hd=this.I=this.j=this.ja=this.K=this.mg=this.V=this.wa=this.M=this.zd=this.H=this.Ub=this.C=this.G=this.m=this.F=null,this.Ic=!1,this.Oe=this.s=null,this.bf=1e9,this.g=sp(this),this.af={width:1/0,height:1/0},this.u=null,this.eb=new nP(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.mediaSource.codecSwitchingStrategy),this.fb=this.g.preferredTextLanguage,this.Hc=this.g.preferredTextRole,this.Dc=this.g.preferForcedSubs,this.Cc=[],this.Jc=null,n&&n(this),this.V=(i=this,new oj({getBandwidthEstimate:function(){return i.s?i.s.getBandwidthEstimate():NaN},hb:function(){return i.hb()},getCurrentTime:function(){return i.h?i.h.currentTime:0},vd:function(){return i.vd()},Cb:function(){return i.Cb()},ub:function(){return i.ub()},R:function(){return i.R()}},i.g.cmcd)),this.F=(r=this,new n4(function(e,t){r.s&&r.s.segmentDownloaded(e,t)},function(e,t,n){e=(new Map).set("headers",e).set("request",t).set("requestType",n),r.dispatchEvent(o7("downloadheadersreceived",e))},function(e,t,n,i){e=(new Map).set("request",e).set("error",t).set("httpResponseCode",n).set("aborted",i),r.dispatchEvent(o7("downloadfailed",e))},function(e,t,n){var i=r.V;if(n=void 0===n?{}:n,i.g.enabled){if("HEAD"===t.method)oF(i,t);else switch(e){case 0:try{if(i.g.enabled){if(n.type){e:{switch(n.type){case 4:var a="d";break e;case 3:case 2:a="h";break e;case 5:a="s";break e}a=void 0}i.o=a}oF(i,t,{ot:"m",su:!i.i})}}catch(e){et("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case n9:e=n;try{if(i.g.enabled){var o=e.segment;a=0,o&&(a=o.endTime-o.startTime);var s={d:1e3*a,st:i.h.R()?"l":"v"};s.ot=function(e){if(0===e.type)return"i";if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?oq:oK;if("audio"==t)return"a";if("text"==t)return"application/mp4"===e.mimeType?"tt":"c"}}(e);var u=s.ot===oK||"a"===s.ot||s.ot===oq||"tt"===s.ot,l=e.stream;l&&(u&&(s.bl=function(e,t){if(!(t=e.h.hb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}
10))?1e3*(e.end-n):NaN}(i,l.type)),l.bandwidth&&(s.br=l.bandwidth/1e3)),u&&"tt"!==s.ot&&(s.tb=function(e,t){var n=e.h.ub();if(!n.length)return NaN;e=n[0],n=v(n);for(var i=n.next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case oK:return e.videoBandwidth||NaN;case"a":return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,s.ot)/1e3),oF(i,t,s)}}catch(e){et("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:oF(i,t,{ot:"k"});break;case 4:oF(i,t,{ot:"o"})}}})),this.F.kf(this.g.streaming.forceHTTPS),this.A=null,sQ&&(this.A=sQ()),this.Fd.D(e,"online",function(){sR(a),a.ef()}),this.N={name:"detach"},this.W={name:"attach"},this.da={name:"unload"},this.ff={name:"manifest-parser"},this.Ze={name:"manifest"},this.Tb={name:"media-source"},this.Se={name:"drm-engine"},this.Z={name:"load"},this.pf={name:"src-equals-drm-engine"},this.Vb={name:"src-equals"};var o=new Map;o.set(this.W,function(e,t){var n,i,r;return nX((n=a,i=e,r=t,null==i.mediaElement&&(i.mediaElement=r.mediaElement,n.Ac.D(i.mediaElement,"error",function(){var e=sP(n);e&&sN(n,e)})),n.h=i.mediaElement,Promise.resolve()))}),o.set(this.N,function(e,t){return e.mediaElement&&(a.Ac.vb(),e.mediaElement=null),a.A&&!t.Gd&&a.A.release(),a.h=null,nX(e=Promise.resolve())}),o.set(this.da,function(e,t){return nX(se(a,e,t))}),o.set(this.Tb,function(e){var t,n,i,r,o,s;return nX((t=a,n=e,e=F(function(e){if(1==e.g){var a,u,l,c;return r=(i=t.g.textDisplayFactory)(),t.We=i,(a=n.mediaElement,u=r,l=function(e,n,i){st(t,e,n,i)},c=t.K,o=new af(a,u,l,c)).configure(t.g.mediaSource),s=t.g.manifest.segmentRelativeVttTiming,o.V=s,M(e,o.K,2)}t.G=o,C(e)})))}),o.set(this.ff,function(e,t){var n,i,r,o,s,u,l;return nX((n=a,i=e,r=t,e=F(function(e){if(1==e.g)return i.mimeType=r.mimeType,i.uri=r.uri,o=i.uri,s=n.F,n.lc=o,u=n,M(e,rA(o,s,n.g.manifest.retryParameters,i.mimeType),2);u.Hd=e.h,n.I=n.Hd(),l=nZ(n.g.manifest),r.mediaElement&&"AUDIO"===r.mediaElement.nodeName&&(l.disableVideo=!0),n.I.configure(l),C(e)})))}),o.set(this.Ze,function(e){var t,n,i,r,o,s,u,l;return t=a,s=(n=e).uri,n=t.F,t.wa=new a9(function(){return t.wb()}),t.wa.addEventListener("regionadd",function(e){sL(t,"timelineregionadded",e=e.region),t.A&&t.A.onDashTimedMetadata(e)}),t.ja=null,t.g.streaming.observeQualityChanges&&(t.ja=new a6(function(){return t.hb()}),t.ja.addEventListener("qualitychange",function(e){var n=e.quality;e=e.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",e),t.dispatchEvent(o7("mediaqualitychanged",n))})),u={networkingEngine:n,filter:function(e){return sg(t,e)},makeTextStreamsForClosedCaptions:function(e){return function(e,t){for(var n=new Set,i=v(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);
10for(r=(i=v(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=v(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new a2,l=r.closedCaptions.get(o);s={id:e.bf++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:tf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},t.textStreams.push(s),n.add(o)}}}(t,e)},onTimelineRegionAdded:function(e){var n=t.wa;e:{for(var i=v(n.g),r=i.next();!r.done;r=i.next())if((r=r.value).schemeIdUri==e.schemeIdUri&&r.id==e.id&&r.startTime==e.startTime&&r.endTime==e.endTime){i=r;break e}i=null}null==i&&(n.g.add(e),e=new nY("regionadd",new Map([["region",e]])),n.dispatchEvent(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return sN(t,e)},isLowLatencyMode:function(){return t.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return t.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){t.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){t.j&&t.j.updateDuration()},newDrmInfo:function(e){var n=t.m?t.m.g:null;n&&t.m.s&&sv(t,n.keySystem,e)},onManifestUpdated:function(){var e=(new Map).set("isLive",t.R());t.dispatchEvent(o7("manifestupdated",e)),t.A&&t.A.onManifestUpdated(t.R())},getBandwidthEstimate:function(){return t.s.getBandwidthEstimate()}},l=Date.now()/1e3,new nK(F(function(e){if(1==e.g)return i=t,M(e,t.I.start(s,u),2);if(i.i=e.h,r=o7("manifestparsed"),t.dispatchEvent(r),0==t.i.variants.length)throw new tr(2,4,4036);(function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))})(t.i),o=Date.now()/1e3-l,t.u.F=o,C(e)}),function(){return t.I.stop()})}),o.set(this.Se,function(e){var t,n,i,r;return nX((t=a,n=e,e=F(function(e){return 1==e.g?(i=Date.now()/1e3,r=!0,t.m=sr(t,{Kb:t.F,onError:function(e){sN(t,e)},Pd:function(e){s_(t,e)},onExpirationUpdated:function(e,n){sO(t,e,n)},onEvent:function(e){t.dispatchEvent(e),"drmsessionupdate"==e.type&&r&&(r=!1,t.u.j=Date.now()/1e3-i,t.K&&aa(t.K))}}),t.m.configure(t.g.drm),M(e,i7(t.m,t.i.variants,t.i.offlineSessionIds),2)):3!=e.g?M(e,t.m.Bc(n.mediaElement),3):M(e,sg(t,t.i),0)})))}),o.set(this.Z,function(e,t){var n,i,r,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S;return nX((n=a,i=e,r=t,F(function(e){var t,a,A,E,I,k,D,R,N,L,P,_,O;switch(e.g){case 1:for(i.startTime=r.startTime,null!=n.Jc&&(i.startTime=n.Jc,n.Jc=null),o=i.mediaElement,s=i.uri,n.lc=s,n.H=new a4({xd:function(){return o.playbackRate},td:function(){return o.defaultPlaybackRate},mf:function(e){o.playbackRate=e},Uf:function(e){o.currentTime+=e}}),u=function(){return sw(n)},l=function(){return sb(n)},n.o.D(o,"playing",u),n.o.D(o,"pause",u),n.o.D(o,"ended",u),n.o.D(o,"ratechange",l),function(e,t){if(t.lcevc.enabled){var n=e.ub();n&&n[0]&&n[0].videoMimeType==sZ.ts&&(tq()||navigator.userAgent.match(/Edge\//))&&(t.mediaSource.forceTransmux||ee("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled.")),o9(e),null==e.K&&(e.K=new ar(e.h,e.mg,t.lcevc),e.G&&(e.G.M=e.K))}else o9(e)}(n,n.g),c=n.g.abrFactory,n.s&&n.Oe==c||(n.Oe=c,n.s=c(),"function"!=typeof n.s.setMediaElement&&(nE("AbrManager","Please use an AbrManager with setMediaElement function."),n.s.setMediaElement=function(){}),n.s.configure(n.g.abr)),n.eb=new nP(n.g.preferredAudioLanguage,n.g.preferredVariantRole,n.g.preferredAudioChannelCount,n.g.preferredVideoHdrLevel,n.g.preferredAudioLabel,n.g.mediaSource.codecSwitchingStrategy),n.fb=n.g.preferredTextLanguage,n.Hc=n.g.preferredTextRole,n.Dc=n.g.preferForcedSubs,sU(n.i.presentationTimeline,n.g.playRangeStart,n.g.playRangeEnd),n.s.init(function(e,t,i){n.j&&e!=n.j.j&&sA(n,e,!0,void 0!==t&&t,void 0===i?0:i)}),n.s.setMediaElement(o),t3(n.i,n.g.preferredVideoCodecs,n.g.preferredAudioCodecs,n.g.preferredAudioChannelCount,n.g.preferredDecodingAttributes),n.j=(t=n,new ol(t.i,{wd:function(){return t.C?t.C.md():0}
10,getBandwidthEstimate:function(){return t.s.getBandwidthEstimate()},S:t.G,Kb:t.F,onError:function(e){return sN(t,e)},onEvent:function(e){return t.dispatchEvent(e)},vh:function(){t.I&&t.I.update&&t.I.update()},Ye:function(e,n,i){t.C&&t.C.Vf(),so(t),e=(new Map).set("start",e).set("end",n).set("contentType",i),t.dispatchEvent(o7("segmentappended",e))},uh:function(e,n){var i,r,a,o,s,u;(n=n.Qe)&&t.ja&&(i=t.ja,r=n,a=i,o=r.contentType,(s=a.g.get(o))||(s={Xc:[],Ff:null,contentType:o},a.g.set(o,s)),function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.Xc;t.Xc=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.Xc=[]}(i,u=s),i={Qe:r,position:e},0<=(r=(u=u.Xc).findIndex(function(t){return t.position>=e}))?u.splice(r,u[r].position==e?1:0,i):u.push(i))},Af:function(e,n){var i=t.m;if(i.h.parseInbandPsshEnabled&&!i.I&&["audio","video"].includes(e)){n=new iB(ef(n));var r=0,a=v(n.data);for(e=a.next();!e.done;e=a.next())r+=e.value.length;if(0==r)i=Promise.resolve();else{for(r=new Uint8Array(r),a=0,e=(n=v(n.data)).next();!e.done;e=n.next())e=e.value,r.set(e,a),a+=e.length;rr(i,"cenc",r),i=i.l}}else i=Promise.resolve();return i},wh:function(e,n,i){st(t,e,n,i)},le:function(e,n){return t.le(e,n)}})),n.j.configure(n.g.streaming),n.l=sW,o.textTracks&&n.o.D(o.textTracks,"addtrack",function(e){e.track&&"chapters"===(e=e.track).kind&&si(n,e)}),n.dispatchEvent(o7("streaming")),d=null,(h=n.j.j)||(d=sT(n)?n.s.chooseVariant():null),f=[],m=(g=v([(p=h||d).video,p.audio])).next();!m.done;m=g.next())(y=m.value)&&!y.segmentIndex&&f.push(y.createSegmentIndex());if(!(0<f.length)){e.B(2);break}return M(e,Promise.all(f),2);case 2:if(sU(n.i.presentationTimeline,n.g.playRangeStart,n.g.playRangeEnd),n.C=(a=n,A=i.startTime,new aY(a.h,a.i,a.g.streaming,A,function(){a.Ub&&a8(a.Ub,!0),a.j&&a.j.ad(),a.M&&so(a)},function(e){return a.dispatchEvent(e)})),n.Ub=(E=n,I=i.Ud,(I=new a7(E.wa,E.R()||0<I)).addEventListener("enter",function(e){sL(E,"timelineregionenter",e.region)}),I.addEventListener("exit",function(e){sL(E,"timelineregionexit",e.region)}),I.addEventListener("skip",function(e){var t=e.region;e.seeking||(sL(E,"timelineregionenter",t),sL(E,"timelineregionexit",t))}),(k=new a5(E.h)).g.add(I),E.ja&&k.g.add(E.ja),k),b=Math.max(n.i.minBufferTime,n.g.streaming.rebufferingGoal),sa(n,b),h||(sA(n,d,!0,!1,0),!n.g.streaming.startAtSegmentBoundary)){e.B(4);break}return M(e,(D=d,R=n.C.md(),F(function(e){return 1==e.g?(N=D.audio,L=D.video,P=function(e,t){var n,i,r;return F(function(a){return 1==a.g?e?M(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Bb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},M(e,P(N,R),2)):3!=e.g?(_=e.h,M(e,P(L,R),3)):null!=(O=e.h)&&null!=_?e.return(Math.max(O,_)):null!=O?e.return(O):null!=_?e.return(_):e.return(R)})),6);case 6:w=e.h,n.C.ee(w);case 4:return n.C.de(),n.ac().find(function(e){return e.active})||((x=nh(n.i.textStreams,n.fb,n.Hc,n.Dc)[0]||null)&&o5(n.u.h,x,!0),d&&(x?(d.audio&&function(e,t,n){if(0==e.g.autoShowText)return!1;if(1==e.g.autoShowText)return!0;var i=tL(e.g.preferredTextLanguage);return(n=tL(n.language),2==e.g.autoShowText)?tD(n,i):3==e.g.autoShowText?(e=tL(t.language),tD(n,i)&&!tD(e,n)):(ee("Invalid autoShowText setting!"),!1)}(n,d.audio,x)&&(n.ba=!0),n.ba&&n.G.F.setTextVisibility(!0),sC(n)):n.ba=!1),x&&(n.g.streaming.alwaysStreamText||n.Ie())&&oh(n.j,x)),M(e,n.j.start(),7);case 7:n.g.abr.enabled&&(n.s.enable(),sD(n)),sI(n),sT(n),n.i.variants.some(function(e){return e.primary}),(T=n.R())&&(n.g.streaming.liveSync||n.i.serviceDescription)&&(S=function(){return sx(n)},n.o.D(o,"timeupdate",S)),n.A&&n.A.onManifestUpdated(T),n.Ic=!0,n.o.ma(o,"loadedmetadata",function(){n.u.m=Date.now()/1e3-r.Ud}),C(e)}})))}),o.set(this.pf,function(e,t){var n,i,r,o,s,u,l,c;return nX((n=a,i=e,r=t,e=F(function(e){return 1==e.g?(o=tp,s=Date.now()/1e3,u=!0,n.m=sr(n,{Kb:n.F,onError:function(e){sN(n,e)},Pd:function(e){s_(n,e)},onExpirationUpdated:function(e,t){sO(n,e,t)},onEvent:function(e){n.dispatchEvent(e),"drmsessionupdate"==e.type&&u&&(u=!1,n.u.j=Date.now()/1e3-s)}}),n.m.configure(n.g.drm),"application/x-mpegurl"==(l=sZ[rI(r.uri||"")])&&t$()&&(l="application/vnd.apple.mpegurl"),l||(l="video/mp4"),c={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:r.mimeType?tx(r.mimeType):l,codecs:r.mimeType?tT(r.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:o.ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},n.m.Z=!0,M(e,i7(n.m,[c],[]),2)):M(e,n.m.Bc(i.mediaElement),0)})))}),o.set(this.Vb,function(e,t){return function(e,t,n){function i(){return sw(e)}t.uri=n.uri,t.startTime=n.startTime,e.lc=t.uri;var r=t.mediaElement;e.C=new aW(r);var a=!1;e.Cc.push(function(){a=!0}),null!=t.startTime&&e.C.ee(t.startTime),e.H=new a4({xd:function(){return r.playbackRate},td:function(){return r.defaultPlaybackRate},mf:function(e){r.playbackRate=e},Uf:function(e){r.currentTime+=e}}),sa(e,e.g.streaming.rebufferingGoal),e.o.D(r,"playing",i),e.o.D(r,"pause",i),e.o.D(r,"ended",i),e.o.D(r,"ratechange",function(){return sb(e)}),"none"!=r.preload&&e.o.ma(r,"loadedmetadata",function(){e.u.m=Date.now()/1e3-n.Ud}),r.audioTracks&&(e.o.D(r.audioTracks,"addtrack",function(){return sI(e)}),e.o.D(r.audioTracks,"removetrack",function(){return sI(e)}),e.o.D(r.audioTracks,"change",function(){return sI(e)})),r.textTracks&&(e.o.D(r.textTracks,"addtrack",function(t){if(t.track)switch((t=t.track).kind){case"metadata":(function(e,t){if("metadata"==t.kind){t.mode="hidden",e.o.D(t,"cuechange",function(){if(t.activeCues)for(var n=v(t.activeCues),i=n.next();!i.done;i=n.next())sn(e,(i=i.value).startTime,i.endTime,i.type,i.value),e.A&&e.A.onCueMetadataChange(i.value)});var n=new tV(function(){var t=Array.from(e.h.textTracks).filter(function(e){return"metadata"==e.kind});t=v(t);for(var n=t.next();!n.done;n=t.next())n.value.mode="hidden"}).kc().U(.5);e.Cc.push(function(){n.stop()})}})(e,t);break;case"chapters":si(e,t);break;default:sI(e)}}),e.o.D(r.textTracks,"removetrack",function(){return sI(e)}),e.o.D(r.textTracks,"change",function(){return sI(e)}));var o=rI(t.uri);r.src=function(e,t,n){try{if(!e.g.enabled)return t;var i=oB(e);e:{switch(n.toLowerCase()){case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":var r=oq;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/d
10ash+xml":case"video/vnd.mpeg.dash.mpd":r="m";break e}r=void 0}i.ot=r,i.su=!0;var a=oV(i);return oH(t,a)}catch(e){return et("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.V,t.uri,sZ[o]),(tz()||tZ("Web0S"))&&r.load(),e.l=sY,e.dispatchEvent(o7("streaming"));var s=new nH;return aB(r,HTMLMediaElement.HAVE_METADATA,e.o,function(){e.C.de(),s.resolve()}),aB(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.o,function(){var t;return F(function(n){var i,o,s,u;return 1==n.g?(""!=(o=(i=e).g.preferredAudioLanguage)&&i.ag(o,i.g.preferredVariantRole),(t=su(e)).find(function(e){return"disabled"!=e.mode})?(0<t.length&&(e.ba=!0),n.B(2)):M(n,new Promise(function(t){e.o.ma(r.textTracks,"change",t),new tV(t).U(1)}),2)):a?n.return():void(""!=(u=(s=e).g.preferredTextLanguage)&&s.bg(u,s.g.preferredTextRole,s.g.preferForcedSubs),C(n))})}),r.error?s.reject(sP(e)):"none"==r.preload&&(ee('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),s.resolve()),e.o.ma(r,"error",function(){s.reject(sP(e))}),new nK(s,function(){return s.reject(new tr(2,7,7001)),Promise.resolve()}).ga(function(){if(e.R()&&e.g.streaming.liveSync&&e.o.D(r,"timeupdate",function(){return sx(e)}),e.A){var t=e.R();if(e.A.onManifestUpdated(t),t){var n=e.wb().end;e.o.D(r,"progress",function(){var t=e.wb().end;n!=t&&(e.A.onManifestUpdated(e.R()),n=t)})}}e.Ic=!0})}(a,e,t)}),this.Xa=new oI(this.N,{Ug:function(e,t,n,i){var r=null;return e==a.N&&(r=n==a.N?a.N:a.W),e==a.W&&(r=n==a.N||t.mediaElement!=i.mediaElement?a.N:n==a.W?a.W:n==a.Tb||n==a.Z?a.Tb:n==a.Vb?a.pf:null),e==a.Tb&&(r=n==a.Z&&t.mediaElement==i.mediaElement?a.ff:a.da),e==a.ff&&(r=sK(a.Z,a.Ze,a.da,n,t,i)),e==a.Ze&&(r=sK(a.Z,a.Se,a.da,n,t,i)),e==a.Se&&(r=sK(a.Z,a.Z,a.da,n,t,i)),e==a.pf&&(r=n==a.Vb&&t.mediaElement==i.mediaElement?a.Vb:a.da),(e==a.Z||e==a.Vb)&&(r=a.da),e==a.da&&(r=i.mediaElement&&t.mediaElement==i.mediaElement?a.W:a.N),r},Gg:function(e,t,n){return a.dispatchEvent(o7("onstatechange",(new Map).set("state",e.name))),o.get(e)(t,n)},handleError:function(e){return F(function(t){return 1==t.g?M(t,se(a,e,sq()),2):t.return(e.mediaElement?a.W:a.N)})},th:function(e){a.dispatchEvent(o7("onstateidle",(new Map).set("state",e.name)))}}),this.Cd=new tV(function(){return function(e){for(var t=Date.now()/1e3,n=!1,i=v(e.i.variants),r=i.next();!r.done;r=i.next())0<(r=r.value).disabledUntilTime&&r.disabledUntilTime<=t&&(r.disabledUntilTime=0,n=!0,function(e){var t="";e.video&&(t+="video:"+e.video.id),e.audio&&(t=t+(t?"&":"")+"audio:"+e.audio.id)}(r));e.i.variants.every(function(e){return 0===e.disabledUntilTime})&&e.Cd.stop(),n&&sS(e,!0,void 0,!1,!1)}(a)}),t&&this.Bc(t,!0)}function o9(e){null!=e.K&&(aa(e.K),e.K.release(),e.K=null)}function o7(e,t){return new nY(e,t)}function se(e,t,n){var i,r,a,o,s,u,l,c,d;return F(function(h){switch(h.g){case 1:return e.l!=sz&&(e.l=sX),i=e.Cc.map(function(e){return e()}),e.Cc=[],M(h,Promise.all(i),2);case 2:if(e.dispatchEvent(o7("unloading")),t.mimeType=null,t.startTime=null,t.uri=null,e.wa&&(e.wa.release(),e.wa=null),t.mediaElement&&e.o.vb(),e.Cd.stop(),e.Ub&&(e.Ub.release(),e.Ub=null),e.zd&&(e.zd.stop(),e.zd=null),!e.I){h.B(3);break}return M(h,e.I.stop(),4);case 4:e.I=null,e.Hd=null;case 3:if(!e.s){h.B(5);break}return M(h,e.s.stop(),5);case 5:if(!e.j){h.B(7);break}return M(h,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.H&&(e.H.release(),e.H=null),e.C&&(e.C.release(),e.C=null),!e.G){h.B(9);break}return M(h,e.G.destroy(),10);case 10:e.G=null;case 9:if(e.A&&!n.Gd&&e.A.onAssetUnload(),!t.mediaElement||!t.mediaElement.src){h.B(11);break}return M(h,new Promise(function(e){return new tV(e).U(.1)}),12);case 12:for(t.mediaElement.removeAttribute("src"),t.mediaElement.load();t.mediaElement.lastChild;)t.mediaElement.removeChild(t.mediaElement.firstChild);case 11:if(!e.m){h.B(13);break}return M(h,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.lc=null,e.M=null,e.i){for(a=(r=v(e.i.variants)).next();!a.done;a=r.next())for(u=(s=v([(o=a.value).audio,o.video])).next();!u.done;u=s.next())(l=u.value)&&l.segmentIndex&&l.segmentIndex.release();for(u=(c=v(e.i.textStreams)).next();!u.done;u=c.next())(d=u.value).segmentIndex&&d.segmentIndex.release()}e.i=null,e.u=new o8,e.We=null,sy(e),C(h)}})}function st(e,t,n,i){t=v(t);for(var r=t.next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=v(r.frames),u=s.next();!u.done;u=s.next())sn(e,a,o,"org.id3",u.value);e.A&&e.A.onHlsTimedMetadata(r,a)}}function sn(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(o7("metadata",t))}function si(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new tV(function(){t.mode="hidden"}).kc().U(.5);e.Cc.push(function(){n.stop()})}}function sr(e,t){return new i9(t,e.g.drm.updateExpirationTime)}function sa(e,t){e.M=new n_,e.M.g=nU,nO(e.M,t,Math.min(.5,t/2)),sy(e),e.zd=new tV(function(){so(e)}).La(.25)}function so(e){switch(e.l){case sY:if(e.h.ended)var t=!0;else{var n=r_(e.h.buffered);t=null!=n&&n>=e.h.duration-1}break;case sW:e:if(e.h.ended||av(e.G))t=!0;else{if(e.i.presentationTimeline.R()){n=e.i.presentationTimeline.Eb();var i=r_(e.h.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=rU(e.h.buffered,e.h.currentTime);var r=t,a=(n=e.M).h.get(n.g);t=n.g,i=r||i>=a?nj:nU,n.g=i,t!=i&&sy(e)}function ss(e){if(e.I){var t=nZ(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.I.configure(t)}if(e.m&&e.m.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{sm(e,e.i)}catch(t){sN(e,t)}e.s&&sT(e),(t=e.j.j)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&sS(e)}if(e.F&&e.F.kf(e.g.streaming.forceHTTPS),e.G&&(e.G.configure(e.g.mediaSource),e.G.V=e.g.manifest.segmentRelativeVttTiming,t=e.g.textDisplayFactory,e.We!=t)){var n=t(),i=e.G,r=i.F;i.F=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.h&&(i.h.j=n),e.We=t,e.j&&(n=(t=e.j).h.get(tf))&&of(t,n.stream,!0,0,!0)}e.s&&(e.s.configure(e.g.abr),e.g.abr.enabled?e.s.enable():e.s.disable(),sD(e)),e.M&&(t=e.g.streaming.rebufferingGoal,e.i&&
10(t=Math.max(t,e.i.minBufferTime)),nO(e.M,t,Math.min(.5,t/2))),e.i&&sU(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.A&&e.A.configure(e.g.ads),e.V&&e.V.configure(e.g.cmcd)}function su(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function sl(e){return Array.from(e.h.textTracks).filter(function(e){return"chapters"==e.kind})}function sc(e,t){var n,i;return F(function(r){switch(r.g){case 1:if(i=s0[n=rI(t)])return r.return(i);return D(r,2),M(r,rE(t,e.F,e.g.streaming.retryParameters),4);case 4:i=r.h,N(r,3);break;case 2:L(r);case 3:if(i)return r.return(i);throw new tr(1,2,2011,n)}})}function sd(e,t,n,i,r,a,o){var s,u;return F(function(l){if(1==l.g)return"text/vtt"!=r||o.length?M(l,sh(e,t,e.F,e.g.streaming.retryParameters),3):l.B(2);2!=l.g&&(s=sf(e,l.h,r,o),t=aR(new Blob([s],{type:"text/vtt"})),r="text/vtt"),u=document.createElement("track");var c=e.V,d=t;try{if(c.g.enabled){var h=oB(c);h.ot="c",h.su=!0;var f=oV(h),p=oH(d,f)}else p=d}catch(e){et("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),p=d}return u.src=p,u.label=a,u.kind=i,u.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(u),l.return(u)})}function sh(e,t,n,i){var r,a,o;return F(function(s){if(1==s.g){r=n9,(a=n5([t],i)).method="GET";var u=e.V;try{u.g.enabled&&oF(u,a,{ot:"c",su:!0})}catch(e){et("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return M(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function sf(e,t,n,i){var r=tM[n];if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=ef(t),function(e,t){function n(e){for(var n=e,i=v(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(i=Math.floor(n/60%60))?"0":"")+i+":"+(10>(r=Math.floor(n%60))?"0":"")+r+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var i=oD(e,[]);e="WEBVTT\n\n",i=v(i);for(var r=i.next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --> "+n(r.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case eM:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n"+r.payload+"\n\n";return e}(t=n.parseMedia(t,e),i);throw new tr(2,2,2014,n)}function sp(e){var t=o0();return t.streaming.failureCallback=function(t){if(e.R()){var n=null;1001==t.code||1002==t.code?n=1:1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.ef(n))}},t.textDisplayFactory=function(){return e.sd?new o_(e.h,e.sd):new oR(e.h)},t}function sg(e,t){return F(function(n){if(1==n.g){var i;return M(n,(i=t,F(function(e){if(1==e.g)return M(e,F(function(e){var t,n,r,a,o,s,u,l,c;return 1==e.g?M(e,t8(i,0<i.offlineSessionIds.length),2):((t=i).textStreams=t.textStreams.filter(function(e){return tI(e=tv(e.mimeType,e.codecs))}),M(e,(n=i,F(function(e){switch(e.g){case 1:r=[],o=(a=v(n.imageStreams)).next();case 2:var t;if(o.done){e.B(4);break}if(u=(s=o.value).mimeType,ny.has(u)){e.B(5);break}if(!(l=nb.get(u))){ny.set(u,!1),e.B(5);break}return M(e,(t=l,new Promise(function(e){var n=new Image;n.src=t,"decode"in n?n.decode().then(function(){e(!0)}).catch(function(){e(!1)}):n.onload=n.onerror=function(){e(2===n.height)}})),7);case 7:c=e.h,ny.set(u,c);case 5:ny.get(u)&&r.push(s),o=a.next(),e.B(2);break;case 4:n.imageStreams=r,C(e)}})),0))}),2);if(!i.variants.some(nl))throw new tr(2,4,4032);C(e)})),2)}sm(e,t),C(n)})}function sm(e,t){if(e.l!=sz){for(var n=e.g.restrictions,i=e.af,r=!1,a=v(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=t5(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.j&&sI(e),(n=e.m?e.m.g:null)&&e.m.s)for(r=(i=v(t.variants)
10).next();!r.done;r=i.next())r=r.value,sv(e,n.keySystem,r.video),sv(e,n.keySystem,r.audio);sj(e,t)}}function sv(e,t,n){if(n){n=v(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){i=v(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,rr(e.m,r.initDataType,r.initData)}}}function sy(e){var t=e.Ge();if(e.u&&e.M&&e.C){var n=e.H;n.j=t,a3(n),e.V&&(n=e.V,t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t),sw(e)}t=(new Map).set("buffering",t),e.dispatchEvent(o7("buffering",t))}function sb(e){var t=e.h.playbackRate;0!=t&&(e.H&&e.H.set(t),t=o7("ratechange"),e.dispatchEvent(t))}function sw(e){if(e.u&&e.M){var t=e.u.g,n="playing";e.M.g==nU?n="buffering":e.h.paused?n="paused":e.h.ended&&(n="ended");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(o7("statechanged",n)))}}function sx(e){if(e.R()){var t=e.wb();if(Number.isFinite(t.end)&&!(e.h.currentTime<t.start)){if(e.g.streaming.liveSync)var n=e.g.streaming.liveSyncMaxLatency,i=e.g.streaming.liveSyncPlaybackRate;else e.i&&e.i.serviceDescription&&(n=e.i.serviceDescription.maxLatency||e.g.streaming.liveSyncMaxLatency,i=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSyncPlaybackRate);var r=e.h.playbackRate,a=t.end-e.h.currentTime,o=0;if(e.l==sY){var s=e.h.buffered;0<s.length&&(o=Math.max(i,(o=s.end(s.length-1))-t.end))}n&&i&&a-o>n?r!=i&&e.lg(i):1!==r&&0!==r&&e.Bf()}}}function sT(e){try{sj(e,e.i)}catch(t){return sN(e,t),!1}var t=nc(e.i.variants);return t=e.eb.create(t),e.s.setVariants(Array.from(t.values())),!0}function sS(e,t,n,i,r){var a;t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r,(a=sT(e)?e.s.chooseVariant():null)&&sA(e,a,r,t,n,i)}function sA(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.j;if(t==o)i&&od(e.j,t,i,r,!0);else{var s=e.u.h;s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),od(e.j,t,i,r,a,n),i=null,o&&(i=nn(o)),t=nn(t),n?(n=(new Map).set("oldTrack",i).set("newTrack",t),e.K&&ao(e.K,t,e.De()),sB(e,n=o7("adaptation",n))):sk(e,i,t)}}function sE(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});t.enabled=!0,t.id!==n.id&&(n.enabled=!1),sk(e,n=ns(n),t=ns(t))}function sI(e){sB(e,o7("trackschanged"))}function sk(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.K&&ao(e.K,n,e.De()),sB(e,n=o7("variantchanged",t))}function sM(e){sB(e,o7("textchanged"))}function sC(e){sB(e,o7("texttrackvisibility"))}function sD(e){e.g.abr.enabled||sR(e);var t=(new Map).set("newStatus",e.g.abr.enabled);sB(e,o7("abrstatuschanged",t))}function sR(e,t){if(t=void 0===t||t,e.l==sW){e.Cd.stop();for(var n=v(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&sT(e)}}function sN(e,t){if(e.l!=sz){2===t.severity&&sR(e,!1);var n=o7("error",(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function sL(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(o7(t,n))}function sP(e){if(!e.h.error)return null;var t=e.h.error.code;if(1==t)return null;var n=e.h.error.msExtendedCode;return n&&(0>n&&(n+=4294967296),n=n.toString(16)),new tr(2,3,3016,t,n,e.h.error.message)}function s_(e,t){if(e.j){var n=o7("keystatuschanged");e.dispatchEvent(n);var i=Object.keys(t),r=1==i.length&&"00"==i[0];if(n=!1,i.length){i=v(e.i.variants);for(var a=i.next();!a.done;a=i.next()){a=a.value;var o=[];a.audio&&o.push(a.audio),a.video&&o.push(a.video),o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0,u=v(u.keyIds);for(var l=u.next();!l.done;l=u.next())l=l.value,l=t[r?"00":l],a.allowedByKeySystem=a.allowedByKeySystem&&!!l&&!s$.includes(l)}s!=a.allowedByKeySystem&&(n=!0)}}}(!n||sT(e))&&((t=e.j.j)&&!t.allowedByKeySystem&&sS(e),n&&sI(e))}}function sO(e,t,n){e.I&&e.I.onExpirationUpdated&&e.I.onExpirationUpdated(t,n),t=o7("expirationupdated"),e.dispatchEvent(t)}function sU(e,t,n){0<t&&(e.R()||e.ig(t)),n<(t=e.getDuration())&&(e.R()||e.Ja(n))}function sj(e,t){var n=Object.keys(e=e.m?e.m.ud():{});n=n.length&&"00"==n[0];var i=!1,r=!1,a=new Set,o=new Set;t=v(t.variants);for(var s=t.next();!s.done;s=t.next()){s=s.value;var u=[];s.audio&&u.push(s.audio),s.video&&u.push(s.video),u=v(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).keyIds.size){l=v(l.keyIds);for(var c=l.next();!c.done;c=l.next()){c=c.value;var d=e[n?"00":c];d?s$.includes(d)&&o.add(d):a.add(c)}}s.allowedByApplication?s.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)},new tr(2,4,4012,e)}function sB(e,t){F(function(n){if(1==n.g)return M(n,Promise.resolve(),2);e.l!=sz&&e.dispatchEvent(t),C(n)})}function sF(e){var t=new Set;e=v(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(tL(n.language)):t.add("und");return t}function sV(e){var t=new Map,n=new Map;e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",a=[];i.language&&(r=tL(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set),a=v(a);for(var o=a.next();!o.done;o=a.next())o=o.value,t.get(r).add(o),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(o,i.label))}var s=[];return t.forEach(function(e,t){e=v(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=null;n.has(t)&&n.get(t).has(i)&&(r=n.get(t).get(i)),s.push({language:t,role:i,label:r})}}),s}function sH(){return new tr(2,7,7e3)}function sK(e,t,n,i,r,a){return i==e&&r.mediaElement==a.mediaElement&&r.uri==a.uri&&r.mimeType==a.mimeType?t:n}function sq(){return{mediaElement:null,mimeType:null,startTime:null,Ud:NaN,uri:null,Gd:!0}}function sG(e){return new Promise(function(t,n){e.Mb=function(){return n(sH())},e.Od=function(){return t()},e.onError=function(e){return n(e)},e.Qd=function(){return n(sH())}})}W("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",pg:"s",OTHER:"o"}),W("shaka.util.ConfigUtils",oG),oG.convertToConfigObject=oX,oG.mergeConfigObjects=oz,W("shaka.util.FairPlayUtils",oW),oW.commonFairPlayResponse=function(e,t){if(2===e){try{var n=ih(t.data)}catch(e){return}e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0);try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch(e){}e&&(t.data=eh(i_(n)))}},oW.expressplayFairPlayRequest=function(e,t){oQ(e,t)},oW.conaxFairPlayRequest=function(e,t){oQ(e,t)},oW.ezdrmFairPlayRequest=function(e,t){oQ(e,t)},oW.verimatrixFairPlayRequest=function(e,t){2===e&&(e=iP(e=ef(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=im("spc="+e))},oW.expressplayInitDataTransform=function(e,t,n){return oJ(e,t,n)},oW.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=ig(t).split("skd://").pop().split("?").shift(),i=e.atob(i);var r=new ArrayBuffer(2*i.length);r=new Uint16Array(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return o$(t,r,n)},oW.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ig(e).split(";").pop(),o$(e,n,t))},oW.verimatrixInitDataTransform=function(e,t,n){return oJ(e,t,n)}
10,oW.initDataTransform=o$,oW.defaultGetContentId=oY,oW.isFairPlaySupported=function(){var e;return F(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(t,2),M(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(L(t),t.return(!1))})},W("shaka.util.PlayerConfiguration",oZ),oZ.mergeConfigObjects=o1,oZ.createDefault=o0,A(o6,nQ),(b=o6.prototype).destroy=function(){var e,t,n=this;return F(function(i){switch(i.g){case 1:if(n.l==sz)return i.return();return o9(n),n.l=sz,(e=sq()).Gd=!1,t=ok(n.Xa,function(){return{node:n.N,payload:e,Gb:!1}}),M(i,new Promise(function(e){t.dc=function(){},t.Od=function(){e()},t.Mb=function(){e()},t.onError=function(){e()},t.Qd=function(){e()}}),2);case 2:return M(i,n.Xa.destroy(),3);case 3:if(n.Fd&&(n.Fd.release(),n.Fd=null),n.Ac&&(n.Ac.release(),n.Ac=null),n.o&&(n.o.release(),n.o=null),n.Oe=null,n.g=null,n.u=null,n.sd=null,n.V=null,!n.F){i.B(4);break}return M(i,n.F.destroy(),5);case 5:n.F=null;case 4:n.s&&(n.s.release(),n.s=null),nQ.prototype.release.call(n),C(i)}})},b.Bc=function(e,t){if(t=void 0===t||t,this.l==sz)return Promise.reject(sH());var n=sq();n.mediaElement=e,tH()||(t=!1);var i=t?this.Tb:this.W;return(e=ok(this.Xa,function(){return{node:i,payload:n,Gb:!1}})).dc=function(){},sG(e)},b.vg=function(e){this.mg=e},b.detach=function(){var e=this;if(this.l==sz)return Promise.reject(sH());var t=ok(this.Xa,function(){return{node:e.N,payload:sq(),Gb:!1}});return t.dc=function(){},sG(t)},b.uf=function(e,t){var n=this;if(e=void 0===e||e,t=void 0!==t&&t,this.l==sz)return Promise.reject(sH());this.Ic=!1,tH()||(e=!1),o9(this);var i=sq();return i.Gd=t,(t=ok(this.Xa,function(t){var r=t.mediaElement&&e?n.Tb:t.mediaElement?n.W:n.N;return i.mediaElement=t.mediaElement,{node:r,payload:i,Gb:!1}})).dc=function(){},sG(t)},b.Sh=function(e){this.Jc=e},b.load=function(e,t,n){var i=this;if(this.Jc=null,this.Ic=!1,this.l==sz)return Promise.reject(sH());this.dispatchEvent(o7("loading"));var r=sq();r.uri=e,r.Ud=Date.now()/1e3,n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var a=!function(e,t){if(!tH())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n=sZ[n=rI(i)]),n){if(""==(t.mediaElement||t0()).canPlayType(n))return!1;if(!tH()||!(n in rk||rI(i) in rM)||("application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n)&&e.g.streaming.preferNativeHls)return!0;if(t$())return e.g.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.Z:this.Vb,o=ok(this.Xa,function(e){return null==e.mediaElement?null:(r.mediaElement=e.mediaElement,{node:a,payload:r,Gb:!0})});return this.u=new o8,o.dc=function(){},new Promise(function(e,t){o.Qd=function(){return t(new tr(2,7,7002))},o.Od=function(){e(),i.dispatchEvent(o7("loaded"))},o.Mb=function(){return t(sH())},o.onError=function(e){return t(e)}})},b.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=oX(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(nE("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(nE("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&e.streaming.lowLatencyMode&&(void 0==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),void 0==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01),void 0==e.streaming.segmentPrefetchLimit&&(e.streaming.segmentPrefetchLimit=2));var n=o1(this.g,e,sp(this));return ss(this),n},b.getConfiguration=function(){var e=sp(this);return o1(e,this.g,sp(this)),e},b.Jg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.h.currentTime+t,this.wb().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},b.Fh=function(){for(var e in this.g)delete this.g[e];o1(this.g,sp(this),sp(this)),ss(this)},b.Pg=function(){return this.l},b.De=function(){return this.i?this.i.type:null},b.Tg=function(){return this.h},b.Cb=function(){return this.F},b.Ce=function(){return this.lc},b.Lf=function(){return this.A?this.A:null},b.R=function(){return this.i?this.i.presentationTimeline.R():!!this.h&&!!this.h.src&&1/0==this.h.duration},b.Ib=function(){return!!this.i&&this.i.presentationTimeline.Ib()},b.kh=function(){if(this.i){var e=this.i.variants;return!!e.length&&!e[0].video}return!!this.h&&!!this.h.src&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},b.wb=function(){if(!this.Ic)return{start:0,end:0};if(this.i){var e=this.i.presentationTimeline;return{start:e.$b(),end:e.ib()}}return this.h&&this.h.src&&(e=this.h.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},b.hh=function(){this.R()&&(this.h.currentTime=this.wb().end)},b.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},b.drmInfo=function(){return this.m?this.m.g:null},b.Mc=function(){return this.m?this.m.Mc():1/0},b.Be=function(){return this.m?this.m.Be():[]},b.ud=function(){return this.m?this.m.ud():{}},b.Ge=function(){return!!this.M&&this.M.g==nU},b.vd=function(){return this.h?this.H?this.H.i:1:0},b.lg=function(e){0==e?ee("A trick play rate of 0 is unsupported!"):(this.h.paused&&this.h.play(),this.H.set(e),this.l==sW&&(this.s.playbackRateChanged(e),oc(this.j,1<Math.abs(e))))},b.Bf=function(){var e=this.H.td();this.l==sY&&this.H.set(e),this.l==sW&&(this.H.set(e),this.s.playbackRateChanged(e),oc(this.j,!1))},b.ub=function(){if(this.i){for(var e=this.j?this.j.j:null,t=[],n=0,i=v(this.i.variants),r=i.next();!r.done;r=i.next())if(nl(r=r.value)){var a=nn(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){return ns(e)}):[]},b.ac=function(){if(this.i){for(var e=this.j?this.j.o:null,t=[],n=v(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=ni(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?su(this).map(function(e){return no(e)}):[]},b.Og=function(){return this.i?this.i.imageStreams.map(function(e){return nr(e)}):[]},b.ah=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,x,T=this;return F(function(S){return 1==S.g?T.i?(n=T.i.imageStreams.find(function(t){return t.id==e}))?n.segmentIndex?S.B(3):M(S,n.createSegmentIndex(),3):S.return(null):S.B(2):2!=S.g?null==(i=n.segmentIndex.find(t))?S.return(null):(a=(r=n.segmentIndex.get(i)).tilesLayout||n.tilesLayout,o=/(\d+)x(\d+)/.exec(a))?(s=n.width||0,u=n.height||0,l=parseInt(o[1],10),c=parseInt(o[2],10),d=s/l,h=u/c,f=l*c,p=r.j-r.startTime,g=r.A||p/f,m=r.startTime,y=v=0,1<f&&(b=Math.floor((t-r.startTime)/g),m=r.startTime+b*g,v=b%l*d,y=Math.floor(b/l)*h),w=!1,(x=r.u)&&(w=!0,h=x.height,v=x.positionX,y=x.positionY,d=x.width),S.return({imageHeight:u,imageWidth:s,height:h,positionX:v,positionY:y,startTime:m,duration:g,uris:r.Ca(),width:d,sprite:w})):S.return(null):S.return(null)})},b.cg=function(e){if(this.i&&this.j){var t=this.i.textStreams.find(function(t){return t.id==e.id});t&&t!=this.j.o&&(o5(this.u.h,t,!1),oh(this.j,t),sM(this),this.fb=t.language)}else if(this.h&&this.h.src&&this.h.textTracks){t=v(t=su(this));for(var n=t.next();!n.done;n=t.next())na(n=n.value)==e.id?n.mode=this.ba?"showing":"hidden":n.mode="disabled";sM(this)}},b.hf=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.g.abr.enabled&&ee("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=this.i.variants.find(function(t){return t.id==e.id});i&&nl(i)&&(sA(this,i,!1,t,n),this.eb=new nL(i),sT(this))}else if(this.h&&this.h.audioTracks){for(n=(t=v(t=Array.from(this.h.audioTracks))).next();!n.done;n=t.next())if(na(n=n.value)==e.id){sE(this,n);break}}},b.Ig=function(){return sV(this.ub())},b.Zg=function(){return sV(this.ac())},b.Hg=function(){return Array.from(sF(this.ub()))},b.Yg=function(){return Array.from(sF(this.ac()))},b.ag=function(e,t,n,i){if(n=void 0===n?0:n,i=void 0===i?0:i,this.i&&this.C){this.eb=new nP(e,t||"",n,"","",this.g.mediaSource.codecSwitchingStrategy),e=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},t=this.j.j;var r=this.eb.create(this.i.variants);n=null,r=v(r.values());for(var a=r.next();!a.done;a=r.next())a=a.value,(!n||e(n,t)>e(a,t))&&(n=a);n?(e=nn(n),this.hf(e,!0,i)):sS(this)}else this.h&&this.h.audioTracks&&(i=nh(this.ub(),e,t||"",!1)[0])&&this.hf(i)},b.bg=function(e,t,n){n=void 0!==n&&n,this.i&&this.C?(this.fb=e,this.Hc=t||"",this.Dc=n,(e=nh(this.i.textStreams,this.fb,this.Hc,this.Dc)[0]||null)&&e!=this.j.o&&(o5(this.u.h,e,!1),this.g.streaming.alwaysStreamText||this.Ie())&&(oh(this.j,e),sM(this))):(e=nh(this.ac(),e,t||"",n)[0])&&this.cg(e)},b.Ih=function(e,t,n){if(t=void 0===t||t,n=void 0===n?0:n,this.i&&this.C){for(var i=null,r=v(this.i.variants),a=r.next();!a.done;a=r.next())if((a=a.value).audio.label==e){i=a;break}null!=i&&(this.eb=new nP(i.language,"",0,"",e,this.g.mediaSource.codecSwitchingStrategy),sS(this,t,n))}else if(this.h&&this.h.audioTracks){for(n=Array.from(this.h.audioTracks),t=null,i=(n=v(n)).next();!i.done;i=n.next())(i=i.value).label==e&&(t=i);t&&sE(this,t)}},b.Ie=function(){var e=this.ba;return this.G?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?su(this).some(function(e){return"showing"==e.mode}):e},b.Mf=function(){return this.h&&this.h.src&&this.h.textTracks?sl(this).map(function(e){return no(e)}):[]},b.Kg=function(e){var t=tL(e),n=sl(this).filter(function(e){return tL(e.language)==t});if(!n||!n.length)return[];e=[];var i=new Set;n=v(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&r.cues){r=v(r.cues);for(var a=r.next();!a.done;a=r.next()){var o=a.value;
10(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},i.has(a)||(e.push(o),i.add(a))}}return e},b.Nh=function(e){if(e=!!e,this.ba!=e){if(this.ba=e,this.l==sW){var t,n;this.G.F.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.o||0<(e=nh(this.i.textStreams,this.fb,this.Hc,this.Dc)).length&&(oh(this.j,e[0]),sM(this)):((n=(t=this.j).h.get(tf))&&(oS(n),oA(n).catch(function(){}),t.h.delete(tf)),t.o=null))}else if(this.h&&this.h.src&&this.h.textTracks){var i=su(this);i=v(i);for(var r=i.next();!r.done;r=i.next())"disabled"!=(r=r.value).mode&&(r.mode=e?"showing":"hidden")}sC(this)}},b.Wg=function(){if(!this.R())return null;var e=this.Xa.l,t=0;if(this.C)t=this.C.md();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.i+t)):this.h&&this.h.getStartDate?isNaN((e=this.h.getStartDate()).getTime())?null:new Date(e.getTime()+1e3*t):null},b.Nf=function(){if(!this.R())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var e=this.h.getStartDate();return isNaN(e.getTime())?null:e}return null},b.hb=function(){if(this.l==sW)return this.G.hb();var e={total:[],audio:[],video:[],text:[]};return this.l==sY&&(e.total=rj(this.h.buffered)),e},b.getStats=function(){if(this.l!=sW&&this.l!=sY)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};sw(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.u;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.C&&(this.u.M=this.C.xf(),this.u.N=this.C.yf()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.u;var i=Number(n.totalVideoFrames);t.K=Number(n.droppedVideoFrames),t.I=i,this.u.H=Number(n.corruptedVideoFrames)}n=this.m&&(n=this.m).H?n.H:NaN,this.u.s=n,this.l==sW&&((n=this.j.j)&&(this.u.A=(this.H?this.H.i:1)*n.bandwidth),n&&n.video&&(t=this.u,i=n.video.height||NaN,t.o=n.video.width||NaN,t.l=i),this.R()&&(n=this.Nf().valueOf()+1e3*this.wb().end,this.u.C=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g),n=this.s.getBandwidthEstimate(),this.u.u=n),this.l==sY&&(n=this.u,t=e.videoHeight||NaN,n.o=e.videoWidth||NaN,n.l=t);var r=this.u;e=r.o,n=r.l,t=r.A,i=r.I;var a=r.K,o=r.H,s=r.N,u=r.M,l=r.u,c=r.i,d=r.m,h=r.F,f=r.j,p=o4(r.g,"playing"),g=o4(r.g,"paused"),m=o4(r.g,"buffering"),y=r.s,b=r.C,w=r.G,x=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=v(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(r.g),T=[];r=v(r.h.g);for(var S=r.next();!S.done;S=r.next())T.push({timestamp:(S=S.value).timestamp,id:S.id,type:S.type,fromAdaptation:S.fromAdaptation,bandwidth:S.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:a,corruptedFrames:o,stallsDetected:s,gapsJumped:u,estimatedBandwidth:l,completionPercent:c,loadLatency:d,manifestTimeSeconds:h,drmTimeSeconds:f,playTime:p,pauseTime:g,bufferingTime:m,licenseTime:y,liveLatency:b,maxSegmentDuration:w,stateHistory:x,switchHistory:T}},b.sg=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,f=this;return F(function(p){switch(p.g){case 1:if(f.l!=sW&&f.l!=sY)throw new tr(1,7,7004);if(i){p.B(2);break}return M(p,sc(f,e),3);case 3:i=p.h;case 2:if(s=[],f.A&&(s=f.A.getCuePoints()),f.l!=sY){p.B(4);break}return o&&(n="forced"),M(p,sd(f,e,t,n,i,a||"",s),5);case 5:if(u=f.ac().find(function(e){return e.language==t&&e.label==(a||"")&&e.kind==n}))return sI(f),p.return(u);throw new tr(1,2,2012);case 4:if(l=tp,1/0==(c=f.i.presentationTimeline.getDuration()))throw new tr(1,4,4033);if(!s.length){p.B(6);break}return M(p,sh(f,e,f.F,f.g.streaming.retryParameters),7);case 7:d=sf(f,p.h,i,s),e=aR(new Blob([d],{type:"text/vtt"})),i="text/vtt";case 6:if(!tI(tv((h={id:f.bf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:a0(0,c,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:l.ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0}).mimeType,h.codecs)))throw new tr(2,2,2014,i);return f.i.textStreams.push(h),sI(f),p.return(ni(h))}})},b.tg=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b=this;return F(function(w){switch(w.g){case 1:if(b.l!=sW&&b.l!=sY)throw new tr(1,7,7004);if(b.l==sY)throw new tr(1,2,2016);if(t){w.B(2);break}return M(w,sc(b,e),3);case 3:t=w.h;case 2:if("text/vtt"!=t)throw new tr(1,2,2017,e);if(n=tp,1/0==(i=b.i.presentationTimeline.getDuration()))throw new tr(1,4,4045);return M(w,sh(b,e,b.F,b.g.streaming.retryParameters),4);case 4:if(r=w.h,!(a=tM[t]))throw new tr(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:i,vttOffset:0},u=ef(r),l=o.parseMedia(u,s),c=[],d={},f=(h=v(l)).next();!f.done;d={pc:d.pc},f=h.next())p=f.value,d.pc=tl([e],[p.payload])[0],g=new rN(p.startTime,p.endTime,function(e){return function(){return[e.pc]}}(d),0,null,null,0,0,1/0),d.pc.includes("#xywh")&&4===(m=d.pc.split("#xywh=")[1].split(",")).length&&g.hg({height:parseInt(m[3],10),positionX:parseInt(m[0],10),positionY:parseInt(m[1],10),width:parseInt(m[2],10)}),c.push(g);return y={id:b.bf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new aZ(c),mimeType:t||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.zc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0},b.i.imageStreams.push(y),sI(b),w.return(nr(y))}})},b.rg=function(e,t,n){var i,r,a,o=this;return F(function(s){switch(s.g){case 1:if(o.l!=sW&&o.l!=sY)throw new tr(1,7,7004);if(n){s.B(2);break}return M(s,sc(o,e),3);case 3:n=s.h;case 2:return i=[],o.A&&(i=o.A.getCuePoints()),M(s,sd(o,e,t,"chapters",n,"",i),4);case 4:if(r=s.h,!(a=o.Mf().find(function(e){return e.language==t}))){s.B(5);break}return M(s,new Promise(function(e,t){o.o.ma(r,"load",e),o.o.ma(r,"error",function(){t(new tr(1,2,2015))})}),6);case 6:return s.return(a);case 5:throw new tr(1,2,2012)}})},b.lf=function(e,t){this.af.width=e,this.af.height=t},b.ef=function(e){if(this.l==sW){var t=this.j;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.s)t=!1;else{for(var n=v(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).Qc||i.ta||i.cb||(i.Qc=!1,oT(t,i,e));t=!0}}else t=!1;return t},b.Qg=function(){return ee("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},b.Rg=function(){return this.Hd},b.jg=function(e){this.sd=e},b.le=function(e,t){if(!this.g.abr.enabled||this.l===sz||!navigator.onLine)return!1;if(this.i.variants.some(function(t){return!!(t=t[e.type])&&t.id!==e.id&&("audio"!=e.type||e.language===t.language)})){for(var n=v(this.i.variants),i=n.next();!i.done;i=n.next()){var r=(i=i.value)[e.type];r&&r.id===e.id&&(i.disabledUntilTime=Date.now()/1e3+t)}return this.Cd.La(1),sS(this,!0,t=this.hb().video.reduce(function(e,t){return e+t.end-t.start}
10,0),!0,!1),!0}return!1},W("shaka.Player",o6),o6.prototype.setVideoContainer=o6.prototype.jg,o6.prototype.getManifestParserFactory=o6.prototype.Rg,o6.prototype.getManifest=o6.prototype.Qg,o6.prototype.retryStreaming=o6.prototype.ef,o6.prototype.setMaxHardwareResolution=o6.prototype.lf,o6.prototype.addChaptersTrack=o6.prototype.rg,o6.prototype.addThumbnailsTrack=o6.prototype.tg,o6.prototype.addTextTrackAsync=o6.prototype.sg,o6.prototype.getStats=o6.prototype.getStats,o6.prototype.getBufferedInfo=o6.prototype.hb,o6.prototype.getPresentationStartTimeAsDate=o6.prototype.Nf,o6.prototype.getPlayheadTimeAsDate=o6.prototype.Wg,o6.prototype.setTextTrackVisibility=o6.prototype.Nh,o6.prototype.getChapters=o6.prototype.Kg,o6.prototype.getChaptersTracks=o6.prototype.Mf,o6.prototype.isTextTrackVisible=o6.prototype.Ie,o6.prototype.selectVariantsByLabel=o6.prototype.Ih,o6.prototype.selectTextLanguage=o6.prototype.bg,o6.prototype.selectAudioLanguage=o6.prototype.ag,o6.prototype.getTextLanguages=o6.prototype.Yg,o6.prototype.getAudioLanguages=o6.prototype.Hg,o6.prototype.getTextLanguagesAndRoles=o6.prototype.Zg,o6.prototype.getAudioLanguagesAndRoles=o6.prototype.Ig,o6.prototype.selectVariantTrack=o6.prototype.hf,o6.prototype.selectTextTrack=o6.prototype.cg,o6.prototype.getThumbnails=o6.prototype.ah,o6.prototype.getImageTracks=o6.prototype.Og,o6.prototype.getTextTracks=o6.prototype.ac,o6.prototype.getVariantTracks=o6.prototype.ub,o6.prototype.cancelTrickPlay=o6.prototype.Bf,o6.prototype.trickPlay=o6.prototype.lg,o6.prototype.getPlaybackRate=o6.prototype.vd,o6.prototype.isBuffering=o6.prototype.Ge,o6.prototype.getKeyStatuses=o6.prototype.ud,o6.prototype.getActiveSessionsMetadata=o6.prototype.Be,o6.prototype.getExpiration=o6.prototype.Mc,o6.prototype.drmInfo=o6.prototype.drmInfo,o6.prototype.keySystem=o6.prototype.keySystem,o6.prototype.goToLive=o6.prototype.hh,o6.prototype.seekRange=o6.prototype.wb,o6.prototype.isAudioOnly=o6.prototype.kh,o6.prototype.isInProgress=o6.prototype.Ib,o6.prototype.isLive=o6.prototype.R,o6.prototype.getAdManager=o6.prototype.Lf,o6.prototype.getAssetUri=o6.prototype.Ce,o6.prototype.getNetworkingEngine=o6.prototype.Cb,o6.prototype.getMediaElement=o6.prototype.Tg,o6.prototype.getManifestType=o6.prototype.De,o6.prototype.getLoadMode=o6.prototype.Pg,o6.prototype.resetConfiguration=o6.prototype.Fh,o6.prototype.getBufferFullness=o6.prototype.Jg,o6.prototype.getConfiguration=o6.prototype.getConfiguration,o6.prototype.configure=o6.prototype.configure,o6.prototype.load=o6.prototype.load,o6.prototype.updateStartTime=o6.prototype.Sh,o6.prototype.unload=o6.prototype.uf,o6.prototype.detach=o6.prototype.detach,o6.prototype.attachCanvas=o6.prototype.vg,o6.prototype.attach=o6.prototype.Bc,o6.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,F(function(o){if(1==o.g){var s,u,l,c,d,h,f;return t={},e?M(o,F(function(e){return 1==e.g?(s="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),l={initDataTypes:["cenc"],videoCapabilities:u=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}]},c=[{videoCapabilities:u,persistentState:"required",sessionTypes:["persistent-license"]},l],d=new Map,h=function(e){var t,n,i;return F(function(r){switch(r.g){case 1:if(D(r,2),"org.w3.clearkey"===e&&tQ())throw Error("Unsupported keySystem");return M(r,navigator.requestMediaKeySystemAccess(e,c),4);case 4:return i=!!(n=(t=r.h).getConfiguration().sessionTypes)&&n.includes("persistent-license"),tX()&&(i=!1),d.set(e,{persistentState:i}),M(r,t.createMediaKeys(),5);case 5:N(r,0);break;case 2:L(r),d.set(e,null),C(r)}})},f=s.map(function(e){return h(e)}),M(e,Promise.all(f),2)):e.return(ic(d))}),3):o.B(2)}2!=o.g&&(t=o.h);var p={};if(tH()){for(var g in rk)p[g]=!0;for(var m in rM)p[m]=!0}g={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"},m=v(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var b=m.next();!b.done;b=m.next())p[b=b.value]=tH()?!!rk[b]:tK(b);for(var w in g)p[w]=tH()?!!rM[w]:tK(g[w]);for(n=p,w='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(tA)),p={},g=(w=v(w)).next();!g.done;g=w.next())p[g=g.value]=tH()?!!tI(g)||er(g)||!!eX(g):tK(g),p[m=g.split(";")[0]]=p[m]||p[g];for(a in i={manifest:n,media:p,drm:t},r=sJ)i[a]=r[a]();return o.return(i)})},o6.isBrowserSupported=function(){if(e.Promise||ee("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||tZ("Trident/"))return!1;var t=tQ();return(!t||!(13>t))&&!!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)&&(!!tH()||tK("application/x-mpegurl"))},o6.setAdManagerFactory=function(e){sQ=e},o6.registerSupportPlugin=function(e,t){sJ[e]=t},o6.prototype.destroy=o6.prototype.destroy;var sz=0,sX=1,sW=2,sY=3;o6.LoadMode={DESTROYED:sz,NOT_LOADED:sX,MEDIA_SOURCE:sW,SRC_EQUALS:sY},o6.version="v4.5.0",nM=new function(e){this.g=e,this.i=nI,this.h=nk}
10(new nA(Number("4"),Number("5")));var s$=["output-restricted","internal-error"],sJ={},sQ=null,sZ={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},s0={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function s1(){this.h=[],this.j=this.i=this.g=0}function s2(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.l=this.h.getVolume(),this.j=new ir,this.j.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.j.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function s4(t,n,i,r,a){var o=this;this.o=t,this.i=n,this.A=!1,this.s=this.C=null,this.F=NaN,this.m=a,this.j=null,this.h=new ir,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),(t=new google.ima.AdDisplayContainer(this.o,this.i)).initialize(),this.l=new google.ima.AdsLoader(t),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v4.5.0"),this.g=null,this.u=r||new google.ima.AdsRenderingSettings,this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){(function(t,n){if(t.m(new nY("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.F))),t.C.customPlayheadTracker){var i={currentTime:t.i.currentTime};t.g=n.getAdsManager(i,t.u),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.D(t.i,"timeupdate",function(){t.i.duration&&(i.currentTime=t.i.currentTime)}),t.h.D(t.i,"volumechange",function(){t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume)})}else t.g=n.getAdsManager(t.i,t.u);t.m(new nY("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[],r=v(r);for(var a=r.next();!a.done;a=r.next())n.push({start:a.value,end:null});t.m(new nY("ad-cue-points-changed",(new Map).set("cuepoints",n)))}(function(e){function t(t,n){t=(new Map).set("originalEvent",t),e.m(new nY(n,t))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(t){s3(e,t)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(t){s8(e,t)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(t){s8(e,t)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){t(e,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(e){t(e,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){t(e,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(e){t(e,"ad-complete")}
10),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(t){s6(e,t)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(t){s6(e,t)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(e){t(e,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){t(e,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){t(e,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(e){t(e,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){t(e,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){t(e,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(e){t(e,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){t(e,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){t(e,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(e){t(e,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){t(e,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){t(e,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(e){t(e,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(e){t(e,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){t(e,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(e){t(e,"ad-interaction")})})(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,s5(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.D(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,s5(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in e?(t.s=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,s5(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.s.observe(t.i)):t.h.D(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,s5(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.A?t.g.start():t.h.ma(t.i,"play",function(){t.A=!0,t.g.start()})}catch(e){s6(t,null)}})(o,t)}),this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){s3(o,e)}),this.h.D(this.i,"ended",function(){o.l.contentComplete()}),this.h.ma(this.i,"play",function(){o.A=!0})}function s3(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.m(new nY("ad-error",t)),s6(e,null),e.m(new nY("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function s5(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function s8(e,t){var n=t.getAd();n?(e.j=new s2(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.m(new nY("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause(),e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))):ee("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function s6(e,t){e.m(new nY("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.ended||e.i.play())}function s9(e,t,n,i,r){this.h=e,this.g=r,this.i=t,this.j=n,this.l=i}function s7(e,t,n,i){this.A=e,this.I=t,this.g=n,this.l=null,this.W=NaN,this.i=i,this.H=!1,this.u=null,this.j=[],this.M=[],this.K=this.C=this.h=null,this.F=new Map,this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.o=new ir}function ue(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function ut(e){var t=e.g.currentTime;if(0!=t&&null==e.u){for(var n,i,r=v(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=v(a.ads),s=o.next();!s.done;s=o.next())if(s=s.value,i){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=s,n=a;break}}else s.startTimeInSeconds<t&&(i=s,n=a)}
10n&&i&&!e.M.includes(i.adId)&&(e.u=t,e.g.currentTime=n.startTimeInSeconds)}}function un(e){if(e.g.duration&&(e.h||e.j.length)){var t=e.g.currentTime,n=!1;if(e.h){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,a=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),ua(e,"firstQuartile")):t>=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),ua(e,"midpoint")):t>=a&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),ua(e,"thirdQuartile")),i=e.h.getRemainingTime(),0<(r=e.h.getDuration())&&(0>=i||i>r)&&ui(e)}if(!e.h||!e.h.isLinear()){e:for(r=(i=v(e.j)).next();!r.done&&(r=r.value,!(e.h&&e.h.isLinear()));r=i.next())for(a=0;a<r.ads.length;a++){var o=r.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.M.includes(o.adId)){if(e.g.ended)continue;e.g.currentTime=s;break e}ui(e),e.K=r,e.h=new s9(o,a+1,r.ads.length,!0,e.g),e.C=o,0===a&&ua(e,"breakStart"),ur(e);break}}if(!e.h){for(r=(i=v(e.j)).next();!r.done&&(r=r.value,!e.h);r=i.next())for(a=0;a<r.nonLinearAdsList.length;a++)if((o=r.nonLinearAdsList[a]).nonLinearAdList.length){s=r.startTimeInSeconds;var u=e.F.get(ue(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){ui(e),s=e,u=v(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).data.source.length){var c=document.createElement("img");c.setAttribute("src",l.data.source[0].url),c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",s.A.appendChild(c)}e.K=r,e.h=new s9(o,a+1,r.ads.length,!1,e.g),e.C=o,0===a&&ua(e,"breakStart"),ur(e);break}}}n&&!e.h&&(t=e.g.currentTime,e.u&&e.u>t&&(e.g.currentTime=e.u),e.u=null)}}}function ui(e){if(e.h){for(;e.A.lastChild;)e.A.removeChild(e.A.firstChild);e.H||e.M.push(e.C.adId),ua(e,"complete");for(var t=v(e.m),n=t.next();!n.done;n=t.next())n=n.value,e.o.Ob(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.h.getPositionInSequence())===(n=e.h.getSequenceLength())&&ua(e,"breakEnd"),e.h=null,e.C=null,e.K=null}}function ur(e){ua(e,"impression"),ua(e,"start"),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted&&ua(e,"mute")}}),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted||ua(e,"unmute")}}),e.m.push({target:e.g,type:"play",listener:function(){ua(e,"resume")}}),e.m.push({target:e.g,type:"pause",listener:function(){ua(e,"pause")}});for(var t=v(e.m),n=t.next();!n.done;n=t.next())n=n.value,e.o.D(n.target,n.type,n.listener)}function ua(e,t){var n=e.C.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.K.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n){n=v(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&""!=i&&((i=n5([i],nV())).method="POST",e.I.request(7,i))}switch(t){case"impression":e.i(new nY("ad-impression"));break;case"start":e.i(new nY("ad-started",(new Map).set("ad",e.h)));break;case"mute":e.i(new nY("ad-muted"));break;case"unmute":e.i(new nY("ad-volume-changed"));break;case"resume":e.i(new nY("ad-resumed"));break;case"pause":e.i(new nY("ad-paused"));break;case"firstQuartile":e.i(new nY("ad-first-quartile"));break;case"midpoint":e.i(new nY("ad-midpoint"));break;case"thirdQuartile":e.i(new nY("ad-third-quartile"));break;case"complete":e.i(new nY("ad-complete")),e.i(new nY("ad-stopped"));break;case"breakStart":e.A.setAttribute("ad-active","true");break;case"breakEnd":e.A.removeAttribute("ad-active")}}function uo(e,t){this.g=e,this.i=null,this.h=t}function us(e,t,n,i){var r=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.u=this.m=this.o=null,this.A="",this.C=[],this.h=new ir,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new nY("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t,n;t=r,n=e,t.i(new nY("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.F))),n=n.getStreamData().url,t.j.resolve(n),t.j=null,t.G||t.h.D(t.l,"seeked",function(){var e=t.l.currentTime;if(0!=e){t.g.streamTimeForContentTime(e);var n=t.g.previousCuePointForStreamTime(e);n&&!n.played&&(t.o=e,t.l.currentTime=n.start)}})}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.A.length?r.j.resolve(r.A):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){e=e.getAd(),r.m=new uo(e,r.l),r.u&&(r.m.i=r.u),r.i(new nY("ad-started",(new Map).set("ad",r.m))),r.s.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.s.removeAttribute("ad-active");var e=r.l.currentTime;r.o&&r.o>e&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.u=e.getStreamData().adProgressData,r.m&&(r.m.i=r.u)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new nY("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new nY("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new nY("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new nY("ad-complete")),r.i(new nY("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new nY("ad-skipped")),r.i(new nY("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=v(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.C=e,r.i(new nY("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function uu(){nQ.call(this),this.g=this.i=this.h=null,this.j=new s1,this.m=navigator.language,this.l=null}function ul(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.j.h.push(t.loadTime);break;case"ad-started":e.j.g++;break;case"ad-complete":e.j.i++;break;case"ad-skipped":e.j.j++}e.dispatchEvent(t)}function uc(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof nY){var n={};for(i in t)(e=t[i])&&"object"==typeof e?"detail"==i&&(n[i]=e):i in Event||(n[i]=e);return n}if(t instanceof Error){var i=new Set(["name","message","stack"]);for(n in t)i.add(n);for(n=(e=v(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())i.add(n.value);for(e={},n=(i=v(i)).next();!n.done;n=i.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=v(rj(t))).next();!n.done;n=t.next())e=(n=n.value).end,i.start.push(n.start),i.end.push(e);t=i}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}})}function ud(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n,i=NaN;else if("-Infinity"==t)i=-1/0;else if("Infinity"==t)i=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)i={length:(n=t).length,start:function(e){return n.start[e]},end:function(e){return n.end[e]}};else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)i=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(i in t=Error((e=t.contents).message),e)t[i]=e[i];i=t}else i=t;return i})}(b=s2.prototype).getDuration=function(){return this.g.getDuration()},b.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},b.getRemainingTime=function(){return this.h.getRemainingTime()},b.isPaused=function(){return this.i},b.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},b.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return this.h.getAdSkippableState()},b.skip=function(){return this.h.skip()},b.pause=function(){return this.h.pause()},b.play=function(){return this.h.resume()},b.getVolume=function(){return this.h.getVolume()},b.setVolume=function(e){return this.h.setVolume(e)},b.isMuted=function(){return 0==this.h.getVolume()},b.isLinear=function(){return this.g.isLinear()},b.resize=function(e,t){var n=!1,i=this.m;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},b.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},b.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.g.getTitle()},b.getDescription=function(){return this.g.getDescription()},b.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},b.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},b.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},b.getAdId=function(){return this.g.getAdId()},b.getCreativeAdId=function(){return this.g.getCreativeAdId()},b.getAdvertiserName=function(){return this.g.getAdvertiserName()},b.getMediaUrl=function(){return this.g.getMediaUrl()},b.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},b.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},b.release=function(){this.h=this.g=null},W("shaka.ads.ClientSideAd",s2),s2.prototype.release=s2.prototype.release,s2.prototype.getPodIndex=s2.prototype.getPodIndex,s2.prototype.getTimeOffset=s2.prototype.getTimeOffset,s2.prototype.getMediaUrl=s2.prototype.getMediaUrl,s2.prototype.getAdvertiserName=s2.prototype.getAdvertiserName,s2.prototype.getCreativeAdId=s2.prototype.getCreativeAdId,s2.prototype.getAdId=s2.prototype.getAdId,s2.prototype.getVastMediaWidth=s2.prototype.getVastMediaWidth,s2.prototype.getVastMediaHeight=s2.prototype.getVastMediaHeight,s2.prototype.getVastMediaBitrate=s2.prototype.getVastMediaBitrate,s2.prototype.getDescription=s2.prototype.getDescription,s2.prototype.getTitle=s2.prototype.getTitle,s2.prototype.getPositionInSequence=s2.prototype.getPositionInSequence,s2.prototype.getSequenceLength=s2.prototype.getSequenceLength,s2.prototype.setMuted=s2.prototype.setMuted,s2.prototype.resize=s2.prototype.resize,s2.prototype.isLinear=s2.prototype.isLinear,s2.prototype.isMuted=s2.prototype.isMuted,s2.prototype.setVolume=s2.prototype.setVolume,s2.prototype.getVolume=s2.prototype.getVolume,s2.prototype.play=s2.prototype.play,s2.prototype.pause=s2.prototype.pause,s2.prototype.skip=s2.prototype.skip,s2.prototype.canSkipNow=s2.prototype.canSkipNow,s2.prototype.getTimeUntilSkippable=s2.prototype.getTimeUntilSkippable,s2.prototype.isSkippable=s2.prototype.isSkippable,s2.prototype.isPaused=s2.prototype.isPaused,s2.prototype.getRemainingTime=s2.prototype.getRemainingTime,s2.prototype.getMinSuggestedDuration=s2.prototype.getMinSuggestedDuration,s2.prototype.getDuration=s2.prototype.getDuration,s4.prototype.configure=function(e){this.C=e},s4.prototype.stop=function(){this.g&&this.g.stop(),this.o&&oP(this.o)},s4.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy()},(b=s9.prototype).getDuration=function(){return this.h.durationInSeconds},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},b.isPaused=function(){return this.g.paused},b.isSkippable=function(){return!!this.h.skipOffset},b.getTimeUntilSkippable=function(){return this.h.skipOffset?Math.max(this.getRemainingTime()-this.h.skipOffset,0):this.getRemainingTime()},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.g.currentTime+=this.getRemainingTime()},b.pause=function(){return this.g.pause()},b.play=function(){return this.g.play()},b.getVolume=function(){return this.g.volume},b.setVolume=function(e){this.g.volume=e},b.isMuted=function(){return this.g.muted},b.isLinear=function(){return this.l},b.resize=function(){},b.setMuted=function(e){this.g.muted=e},b.getSequenceLength=function(){return this.j?this.j:1},b.getPositionInSequence=function(){return this.i?this.i:1},b.getTitle=function(){return this.h.adTitle},b.getDescription=function(){return""},b.getVastMediaBitrate=function(){return 0},b.getVastMediaHeight=function(){return 0},b.getVastMediaWidth=function(){return 0},b.getAdId=function(){return this.h.adId},b.getCreativeAdId=function(){return this.h.creativeId},b.getAdvertiserName=function(){return""},b.getMediaUrl=function(){return null},b.getTimeOffset=function(){return 0},b.getPodIndex=function(){return 0},b.release=function(){this.j=this.i=this.g=this.h=null},W("shaka.ads.MediaTailorAd",s9),s9.prototype.release=s9.prototype.release,s9.prototype.getPodIndex=s9.prototype.getPodIndex,s9.prototype.getTimeOffset=s9.prototype.getTimeOffset,s9.prototype.getMediaUrl=s9.prototype.getMediaUrl,s9.prototype.getAdvertiserName=s9.prototype.getAdvertiserName,s9.prototype.getCreativeAdId=s9.prototype.getCreativeAdId,s9.prototype.getAdId=s9.prototype.getAdId,s9.prototype.getVastMediaWidth=s9.prototype.getVastMediaWidth,s9.prototype.getVastMediaHeight=s9.prototype.getVastMediaHeight,s9.prototype.getVastMediaBitrate=s9.prototype.getVastMediaBitrate,s9.prototype.getDescription=s9.prototype.getDescription,s9.prototype.getTitle=s9.prototype.getTitle,s9.prototype.getPositionInSequence=s9.prototype.getPositionInSequence,s9.prototype.getSequenceLength=s9.prototype.getSequenceLength,s9.prototype.setMuted=s9.prototype.setMuted,s9.prototype.resize=s9.prototype.resize,s9.prototype.isLinear=s9.prototype.isLinear,s9.prototype.isMuted=s9.prototype.isMuted,s9.prototype.setVolume=s9.prototype.setVolume,s9.prototype.getVolume=s9.prototype.getVolume,s9.prototype.play=s9.prototype.play,s9.prototype.pause=s9.prototype.pause,s9.prototype.skip=s9.prototype.skip,s9.prototype.canSkipNow=s9.prototype.canSkipNow,s9.prototype.getTimeUntilSkippable=s9.prototype.getTimeUntilSkippable,s9.prototype.isSkippable=s9.prototype.isSkippable,s9.prototype.isPaused=s9.prototype.isPaused,s9.prototype.getRemainingTime=s9.prototype.getRemainingTime,s9.prototype.getMinSuggestedDuration=s9.prototype.getMinSuggestedDuration,s9.prototype.getDuration=s9.prototype.getDuration,s7.prototype.stop=function(){for(var e=v(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ob(t.target,t.type,t.listener);ui(this),this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.u=null,this.j=[],this.M=[],this.F.clear()},s7.prototype.release=function(){this.stop(),this.o&&this.o.release()},s7.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,u,l,c,d,h,f,p;this.H=e,""!=this.N&&(t=this,n=this.N,i=this.V,F(function(e){if(1==e.g)return r=n5([n],nV()),a=t.I.request(7,r),D(e,2),M(e,a.promise,4);if(2!=e.g){var g;if(o=e.h,s=[],0<(u=JSON.parse(ih(o.data))).avails.length){if(JSON.stringify(t.j)!=JSON.stringify(u.avails)){for(t.j=u.avails,c=(l=v(t.j)).next();!c.done;c=l.next())for(h=(d=v(c.value.nonLinearAdsList)).next();!h.done;h=d.next())for(p=(f=v(h.value.nonLinearAdList)).next();!p.done;p=f.next())(function(e,t){var n,i,r,a;F(function(o){return 1==o.g?t.staticResource?(n=ue(t),e.F.get(n))?o.return():(i=n5([t.staticResource],nV()),r=e.I.request(7,i),D(o,2),e.F.set(n,[]),M(o,r.promise,4)):o.return():2!=o.g?(a=JSON.parse(ih(o.h.data)).apps,e.F.set(n,a),N(o,0)):void(L(o),e.F.delete(n),C(o))})})(t,p.value);s=t.getCuePoints(),t.i(new nY("ad-cue-points-changed",(new Map).set("cuepoints",s)))}}else t.j.length&&t.i(new nY("ad-cue-points-changed",(new Map).set("cuepoints",s))),ui(t),t.j=[];return i&&(t.H||0<s.length)&&(un(g=t),g.H||(ut(g),g.o.D(g.g,"seeked",function(){ut(g)}),g.o.D(g.g,"ended",function(){ui(g)})),g.o.D(g.g,"timeupdate",function(){un(g)})),N(e,0)}L(e),C(e)}),this.V=!1)},s7.prototype.getCuePoints=function(){for(var e=[],t=v(this.j),n=t.next();!n.d
10one;n=t.next()){n=v(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e},(b=uo.prototype).getDuration=function(){return this.i?this.i.duration:-1},b.getMinSuggestedDuration=function(){return this.getDuration()},b.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},b.isPaused=function(){return this.h.paused},b.isSkippable=function(){return this.g.isSkippable()},b.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},b.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},b.skip=function(){this.h.currentTime+=this.getRemainingTime()},b.pause=function(){return this.h.pause()},b.play=function(){return this.h.play()},b.getVolume=function(){return this.h.volume},b.setVolume=function(e){this.h.volume=e},b.isMuted=function(){return this.h.muted},b.isLinear=function(){return!0},b.resize=function(){},b.setMuted=function(e){this.h.muted=e},b.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},b.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},b.getTitle=function(){return this.g.getTitle()},b.getDescription=function(){return this.g.getDescription()},b.getVastMediaBitrate=function(){return 0},b.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},b.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},b.getAdId=function(){return this.g.getAdId()},b.getCreativeAdId=function(){return this.g.getCreativeAdId()},b.getAdvertiserName=function(){return this.g.getAdvertiserName()},b.getMediaUrl=function(){return null},b.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},b.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},b.release=function(){this.h=this.i=this.g=null},W("shaka.ads.ServerSideAd",uo),uo.prototype.release=uo.prototype.release,uo.prototype.getPodIndex=uo.prototype.getPodIndex,uo.prototype.getTimeOffset=uo.prototype.getTimeOffset,uo.prototype.getMediaUrl=uo.prototype.getMediaUrl,uo.prototype.getAdvertiserName=uo.prototype.getAdvertiserName,uo.prototype.getCreativeAdId=uo.prototype.getCreativeAdId,uo.prototype.getAdId=uo.prototype.getAdId,uo.prototype.getVastMediaWidth=uo.prototype.getVastMediaWidth,uo.prototype.getVastMediaHeight=uo.prototype.getVastMediaHeight,uo.prototype.getVastMediaBitrate=uo.prototype.getVastMediaBitrate,uo.prototype.getDescription=uo.prototype.getDescription,uo.prototype.getTitle=uo.prototype.getTitle,uo.prototype.getPositionInSequence=uo.prototype.getPositionInSequence,uo.prototype.getSequenceLength=uo.prototype.getSequenceLength,uo.prototype.setMuted=uo.prototype.setMuted,uo.prototype.resize=uo.prototype.resize,uo.prototype.isLinear=uo.prototype.isLinear,uo.prototype.isMuted=uo.prototype.isMuted,uo.prototype.setVolume=uo.prototype.setVolume,uo.prototype.getVolume=uo.prototype.getVolume,uo.prototype.play=uo.prototype.play,uo.prototype.pause=uo.prototype.pause,uo.prototype.skip=uo.prototype.skip,uo.prototype.canSkipNow=uo.prototype.canSkipNow,uo.prototype.getTimeUntilSkippable=uo.prototype.getTimeUntilSkippable,uo.prototype.isSkippable=uo.prototype.isSkippable,uo.prototype.isPaused=uo.prototype.isPaused,uo.prototype.getRemainingTime=uo.prototype.getRemainingTime,uo.prototype.getMinSuggestedDuration=uo.prototype.getMinSuggestedDuration,uo.prototype.getDuration=uo.prototype.getDuration,(b=us.prototype).configure=function(){},b.stop=function(){this.A="",this.o=null,this.C=[]},b.release=function(){this.stop(),this.h&&this.h.release()},b.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},b.getCuePoints=function(){return this.C},A(uu,nQ),(b=uu.prototype).setLocale=function(e){this.m=e},b.configure=function(e){this.l=e,this.h&&this.h.configure(this.l),this.g&&this.g.configure(this.l)},b.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new tr(2,10,1e4);this.h&&this.h.release(),this.h=new s4(t,n,this.m,i,function(e){return ul(r,e)}),this.h.configure(this.l)},b.release=function(){this.h&&(this.h.release(),this.h=null),this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),nQ.prototype.release.call(this)},b.onAssetUnload=function(){this.h&&this.h.stop(),this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new nY("ad-stopped")),this.j=new s1},b.requestClientSideAds=function(e){if(!this.h)throw new tr(1,10,10001);var t=this.h;t.g&&t.g.destroy(),t.l&&t.l.contentComplete(),t.F=Date.now()/1e3,t.l.requestAds(e)},b.updateClientSideAdsRenderingSettings=function(e){if(!this.h)throw new tr(1,10,10001);var t=this.h;t.u=e,t.g&&t.g.updateAdsRenderingSettings(t.u)}
10,b.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new s7(e,t,n,function(e){return ul(i,e)})},b.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new tr(1,10,10005);var i,r,a,o,s,u,l,c,d,h=this.i;return n=void 0===n?"":n,h.l?e=Promise.reject(new tr(1,10,10004)):(h.l=new nH,i=e,F(function(e){if(1==e.g)return(r=n5([i],nV())).method="POST",t&&(a=JSON.stringify(t),r.body=im(a)),o=h.I.request(7,r),D(e,2),M(e,o.promise,4);if(2!=e.g){if((s=JSON.parse(ih(e.h.data))).manifestUrl&&s.trackingUrl)u=new e0(i),l=new e0(s.trackingUrl),h.N=u.resolve(l).toString(),c=Date.now()/1e3-h.W,h.i(new nY("ads-loaded",(new Map).set("loadTime",c))),d=new e0(s.manifestUrl),h.l.resolve(u.resolve(d).toString()),h.l=null;else throw Error("Insufficient data from MediaTailor.");return N(e,0)}if(L(e),!h.G.length)return h.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),h.l=null,e.return();h.l.resolve(h.G),h.l=null,C(e)}),h.G=n||"",h.W=Date.now()/1e3,e=h.l),e},b.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new tr(2,10,10002);this.g&&this.g.release(),this.g=new us(t,n,this.m,function(e){return ul(i,e)}),this.g.configure(this.l)},b.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new tr(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ee('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.5.0",(n=this.g).j?e=Promise.reject(new tr(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new nH,n.g.requestStream(e),n.A=t||"",n.F=Date.now()/1e3,e=n.j),e},b.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new tr(1,10,10003);(e.mpt||e.mpv)&&ee('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v4.5.0",this.g.g.replaceAdTagParameters(e)},b.getServerSideCuePoints=function(){return nE("AdManager","Please use getCuePoints function."),this.getCuePoints()},b.getCuePoints=function(){var e=[];return this.g&&(e=e.concat(this.g.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},b.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},b.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},b.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(t,n,e.startTime)}},b.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},b.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},W("shaka.ads.AdManager",uu),uu.prototype.onCueMetadataChange=uu.prototype.onCueMetadataChange,uu.prototype.onHlsTimedMetadata=uu.prototype.onHlsTimedMetadata,uu.prototype.onDashTimedMetadata=uu.prototype.onDashTimedMetadata,uu.prototype.onManifestUpdated=uu.prototype.onManifestUpdated,uu.prototype.getStats=uu.prototype.getStats,uu.prototype.getCuePoints=uu.prototype.getCuePoints,uu.prototype.getServerSideCuePoints=uu.prototype.getServerSideCuePoints,uu.prototype.replaceServerSideAdTagParameters=uu.prototype.replaceServerSideAdTagParameters,uu.prototype.requestServerSideStream=uu.prototype.requestServerSideStream,uu.prototype.initServerSide=uu.prototype.initServerSide,uu.prototype.requestMediaTailorStream=uu.prototype.requestMediaTailorStream,uu.prototype.initMediaTailor=uu.prototype.initMediaTailor,uu.prototype.updateClientSideAdsRenderingSettings=uu.prototype.updateClientSideAdsRenderingSettings,uu.prototype.requestClientSideAds=uu.prototype.requestClientSideAds,uu.prototype.onAssetUnload=uu.prototype.onAssetUnload,uu.prototype.release=uu.prototype.release,uu.prototype.initClientSide=uu.prototype.initClientSide,uu.prototype.configure=uu.prototype.configure,uu.prototype.setLocale=uu.prototype.setLocale,uu.ADS_LOADED="ads-loaded",uu.AD_STARTED="ad-started",uu.AD_FIRST_QUARTILE="ad-first-quartile",uu.AD_MIDPOINT="ad-midpoint",uu.AD_THIRD_QUARTILE="ad-third-quartile",uu.AD_COMPLETE="ad-complete",uu.AD_STOPPED="ad-stopped",uu.AD_SKIPPED="ad-skipped",uu.AD_VOLUME_CHANGED="ad-volume-changed",uu.AD_MUTED="ad-muted",uu.AD_PAUSED="ad-paused",uu.AD_RESUMED="ad-resumed",uu.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",uu.CUEPOINTS_CHANGED="ad-cue-points-changed",uu.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",uu.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",uu.AD_CLICKED="ad-clicked",uu.AD_PROGRESS="ad-progress",uu.AD_BUFFERING="ad-buffering",uu.AD_IMPRESSION="ad-impression",uu.AD_DURATION_CHANGED="ad-duration-changed",uu.AD_CLOSED="ad-closed",uu.AD_LOADED="ad-loaded",uu.ALL_ADS_COMPLETED="all-ads-completed",uu.AD_LINEAR_CHANGED="ad-linear-changed",uu.AD_METADATA="ad-metadata",uu.AD_RECOVERABLE_ERROR="ad-recoverable-error",uu.AD_ERROR="ad-error",uu.AD_BREAK_READY="ad-break-ready",uu.AD_INTERACTION="ad-interaction",sQ=function(){return new uu};var uh="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),uf="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),up=["loop","playbackRate"],ug=["pause","play"],um={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getL
10oadMode:10,getManifestType:10},uv={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},uy={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ub=[["getConfiguration","configure"]],uw=[["isTextTrackVisible","setTextTrackVisibility"]],ux="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),uT=["attach","attachCanvas","detach","load","unload"];function uS(e,t,n,i,r,a,o){var s=this;this.G=e,this.M=o,this.j=new tV(t),this.N=n,this.u=!1,this.s=i,this.F=r,this.I=a,this.h=this.m=!1,this.K="",this.o=null,this.A=function(){return uM(s)},this.C=function(e,t){switch((e=ud(t)).type){case"event":var n=e.targetName,i=n$(e.event);s.s(n,i);break;case"update":for(i in n=e.update)for(var r in e=s.g[i]||{},n[i])e[r]=n[i][r];s.u&&(s.N(),s.u=!1);break;case"asyncComplete":if(i=e.id,r=e.error,e=s.i[i],delete s.i[i],e){if(r){for(n in i=new tr(r.severity,r.category,r.code),r)i[n]=r[n];e.reject(i)}else e.resolve()}}},this.g={video:{},player:{}},this.H=0,this.i={},this.l=null,u_.add(this)}function uA(e,t,n){uL=n,n.addUpdateListener(e.A),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),uM(e),uD(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function uE(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new tr(2,8,n,t))}function uI(e,t){var n=e.I();e.l=new nH,e.u=!0,uA(e,n,t)}function uk(e){var t=uL;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function uM(e){var t=!!uL&&"connected"==uL.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};uC(e)}e.h=t,e.K=t?uL.receiver.friendlyName:"",e.j.kc()}function uC(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new tr(1,7,7e3))}}function uD(e,t){t=uc(t);var n=uL;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},en)}catch(i){throw t=new tr(2,8,8005,i),n=new nY("error",(new Map).set("detail",t)),e.s("player",n),e.Yb(),t}}(b=uS.prototype).destroy=function(){return u_.delete(this),uC(this),uL&&uk(this),this.j&&(this.j.stop(),this.j=null),this.F=this.s=null,this.h=this.m=!1,this.C=this.A=this.l=this.i=this.g=this.o=null,Promise.resolve()},b.Ea=function(){return this.h},b.cf=function(){return this.K},b.init=function(){if(this.G.length){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.kc();var t=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=v(u_),n=t.next();!n.done;n=t.next())uI(n.value,e)},function(e){for(var t=v(u_),n=t.next();!n.done;n=t.next())n=n.value,uN="available"==e,n.j.kc()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),uN&&this.j.U(uR),(t=uL)&&t.status!=chrome.cast.SessionStatus.STOPPED?uI(this,t):uL=null}else e.__onGCastApiAvailable!==uO&&(uP=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=uO)}},b.jf=function(e){this.o=e,this.h&&uD(this,{type:"appData",appData:this.o})},b.cast=function(e){var t=this;return F(function(n){if(!t.m)throw new tr(1,8,8e3);if(!uN)throw new tr(1,8,8001);if(t.h)throw new tr(1,8,8002);return t.l=new nH,chrome.cast.requestSession(function(n){return uA(t,e,n)},function(e){return uE(t,e)}),M(n,t.l,0)})},b.Yb=function(){if(this.h){if(uC(this),uL){uk(this);try{uL.stop(function(){},function(){})}catch(e){}uL=null}uM(this)}},b.get=function(e,t){var n=this;if("video"==e){if(ug.includes(t))return function(){return n.Zf.apply(n,[e,t].concat(y(V.apply(0,arguments))))}}else if("player"==e){if(uy[t]&&!this.get("player","isLive")())return function(){};if(ux.includes(t))return function(){return n.Zf.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(uT.includes(t))return function(){return n.Ch.apply(n,[e,t].concat(y(V.apply(0,arguments))))};if(um[t]||uv[t])return function(){return n.g[e][t]}}return this.g[e][t]},b.set=function(e,t,n){this.g[e][t]=n,uD(this,{type:"set",targetName:e,property:t,value:n})},b.Zf=function(e,t){uD(this,{type:"call",targetName:e,methodName:t,args:V.apply(2,arguments)})},b.Ch=function(e,t){var n=V.apply(2,arguments),i=new nH,r=this.H.toString();this.H++,this.i[r]=i;try{uD(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var uR=.02,uN=!1,uL=null,uP=null,u_=new Set;function uO(t){if(uP?e.__onGCastApiAvailable=uP:delete e.__onGCastApiAvailable,uP=null,t)for(var n=v(u_),i=n.next();!i.done;
10i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function uU(e,t,n,i){i=void 0!==i&&i,nQ.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.A=i,this.u=new Map,this.g=new uS(n,function(){return uF(r)},function(){return uV(r)},function(e,t){return uK(r,e,t)},function(){return uH(r)},function(){return uB(r)},i),function(e){e.g.init(),e.m=new ir;for(var t,n,i=v(uh),r=i.next();!r.done;r=i.next())e.m.D(e.i,r.value,function(t){e.g.Ea()||(t=n$(t),e.j.dispatchEvent(t))});for(var a in nJ)e.m.D(e.h,nJ[a],function(t){e.g.Ea()||e.o.dispatchEvent(t)});for(var o in e.l={},i={},e.i)i.qc=o,Object.defineProperty(e.l,i.qc,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.j.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.j.removeEventListener(t,n,i)};if(e.g.Ea()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.Ea()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.qc)}}(i),set:function(t){return function(n){var i=t.qc;e.g.Ea()?e.g.set("video",i,n):e.i[i]=n}}(i)}),i={qc:i.qc};e.s={},uj(e,function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.u.has(t)&&(t=e.u.get(t)),"addEventListener"==t)return function(t,n,i){return e.o.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.o.removeEventListener(t,n,i)};if("getMediaElement"==t)return function(){return e.l};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Cb()};if("getDrmEngine"==t)return function(){return e.h.m};if("getAdManager"==t)return function(){return e.h.Lf()};if("setVideoContainer"==t)return function(t){return e.h.jg(t)};if(e.g.Ea()){if("getManifest"==t||"drmInfo"==t)return function(){return ee(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return ee(t+"() does not work while casting!"),Promise.resolve()}}return e.g.Ea()&&0==Object.keys(e.g.g.video).length&&(um[t]||uv[t])||!e.g.Ea()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})}),t=e,n=new Map,uj(t,function(e,i){n.has(i)?(i=n.get(i),e.length<i.length?t.u.set(e,i):t.u.set(i,e)):n.set(i,e)}),e.j=new nQ,e.j.Ed=e.l,e.o=new nQ,e.o.Ed=e.s}(this)}function uj(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!a.has(e)}var i,r=e.h,a=new Set;for(i in r)n(i)&&(a.add(i),t(i,r[i]));for(e=Object.getPrototypeOf(r),i=Object.getPrototypeOf({});e&&e!=i;){for(var o=v(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,r[s]));e=Object.getPrototypeOf(e)}}function uB(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Ce(),startTime:null};e.i.pause();for(var n=v(up),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=v(ub)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=v(uw)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function uF(e){var t=new nY("caststatuschanged");e.dispatchEvent(t)}function uV(e){var t=new nY(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function uH(e){for(var t=v(ub),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;i=null,n||(i=e.g.get("video","currentTime")),r&&(e.i.autoplay=!1,t=e.h.load(r,i));var o={};for(i=(n=v(up)).next();!i.done;i=n.next())o[i=i.value]=e.g.get("video",i);t.then(function(){if(e.i){for(var t=v(up),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=o[n];for(n=(t=v(uw)).next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}e.i.autoplay=a,r&&e.i.play()}},function(t){t=(new Map).set("detail",t),t=new nY("error",t),e.h.dispatchEvent(t)})}
10function uK(e,t,n){e.g.Ea()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function uq(e,t,n,i){nQ.call(this);var r=this;this.g=e,this.h=t,this.j=new ir,this.H={video:e,player:t},this.C=n||function(){},this.I=i||function(e){return e},this.i=null,this.F=!1,this.o=!0,this.m=0,this.A=!1,this.u=!0,this.s=this.l=null,this.G=new tV(function(){uW(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return uG(e)},t.onSenderDisconnected=function(){return uG(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&uQ(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),uQ(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(t){return function(e,t){var n=ud(t.data);switch(n.type){case"PLAY":e.g.play(),uZ(e);break;case"PAUSE":e.g.pause(),uZ(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;null!=t&&(e.g.currentTime=Number(t)),i&&"PLAYBACK_START"==i?(e.g.play(),uZ(e)):i&&"PLAYBACK_PAUSE"==i&&(e.g.pause(),uZ(e));break;case"STOP":e.h.uf().then(function(){e.h&&uZ(e)});break;case"GET_STATUS":u$(e,Number(n.requestId));break;case"VOLUME":t=(i=n.volume).level,i=i.muted;var r=e.g.volume,a=e.g.muted;null!=t&&(e.g.volume=Number(t)),null!=i&&(e.g.muted=i),r==e.g.volume&&a==e.g.muted||uZ(e);break;case"LOAD":e.m=0,e.A=!1,e.u=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),a=n.autoplay||!0,e.C(t.customData),a&&(e.g.autoplay=!0),e.h.load(r,i).then(function(){e.h&&u$(e)}).catch(function(t){var i="LOAD_FAILED";7==t.category&&7e3==t.code&&(i="LOAD_CANCELLED"),uQ(e,{requestId:Number(n.requestId),type:i},e.s)});break;default:uQ(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p=ud(t.data);switch(p.type){case"init":e.m=0,e.A=!1,e.u=!0,n=p.initState,i=p.appData,F(function(t){switch(t.g){case 1:for(r in n.player)a=n.player[r],e.h[r](a);return e.C(i),o=e.g.autoplay,n.manifest?(e.g.autoplay=!1,D(t,5),M(t,e.h.load(n.manifest,n.startTime),7)):M(t,Promise.resolve(),3);case 7:N(t,3);break;case 5:return s=L(t),u=(new Map).set("detail",s),l=new nY("error",u),e.h&&e.h.dispatchEvent(l),t.return();case 3:if(!e.h)return t.return();for(c in n.video)d=n.video[c],e.g[c]=d;for(h in n.playerAfterLoad)f=n.playerAfterLoad[h],e.h[h](f);e.g.autoplay=o,n.manifest&&(e.g.play(),uZ(e)),C(t)}}),uW(e);break;case"appData":e.C(p.appData);break;case"set":var g=p.targetName,m=p.property;if(p=p.value,"video"==g){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==m){t.setSystemVolumeLevel(p);break}if("muted"==m){t.setSystemVolumeMuted(p);break}}e.H[g][m]=p;break;case"call":(g=e.H[p.targetName])[p.methodName].apply(g,p.args);break;case"asyncCall":g=p.targetName,m=p.methodName,"player"==g&&"load"==m&&(e.m=0,e.A=!1);var v=p.id,y=t.senderId;p=(t=e.H[g])[m].apply(t,p.args),"player"==g&&"load"==m&&(p=p.then(function(){e.u=!0})),p.then(function(){return uJ(e,y,v,null)},function(t){return uJ(e,y,v,t)})}}(e,t)},t.start(),t=v(uh);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(t){return uX(e,"video",t)});for(var i in nJ)e.j.D(e.h,nJ[i],function(t){return uX(e,"player",t)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.lf(3840,2160):e.h.lf(1920,1080),e.j.D(e.g,"loadeddata",function(){e.A=!0}),e.j.D(e.h,"loading",function(){e.o=!1,uz(e)}),e.j.D(e.g,"playing",function(){e.o=!1,uz(e)}),e.j.D(e.g,"pause",function(){uz(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,uz(e)}),e.j.D(e.g,"ended",function(){new tV(function(){e.g&&e.g.ended&&(e.o=!0,uz(e))}).U(u1)})}(this)}function uG(e){e.m=0,e.u=!0,e.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,uz(e)}function uz(e){var t;F(function(n){return 1==n.g?M(n,Promise.resolve(),2):e.h?void(t=new nY("caststatuschanged"),e.dispatchEvent(t),uY(e)||uZ(e),C(n)):n.return()})}function uX(e,t,n){e.h&&(uW(e),uQ(e,{type:"event",targetName:t,event:n},e.l))}function uW(e){e.G.U(u0);for(var t={video:{},player:{}},n=v(uf),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];if(e.h.R())for(var r in uy)0==e.m%uy[r]&&(t.player[r]=e.h[r]());for(var a in um)0==e.m%um[a]&&(t.player[a]=e.h[a]());for(var o in(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),uQ(e,{type:"update",update:t},e.l),uv)0==e.m%uv[o]&&((t={player:{}}).player[o]=e.h[o](),uQ(e,{type:"update",update:t},e.l));e.A&&(e.m+=1),uY(e)}function uY(e){return!!(e.u&&(e.g.duration||e.h.R()))&&(u$(e),e.u=!1,!0)}function u$(e,t){var n={contentId:e.h.Ce(),streamType:e.h.R()?"LIVE":"BUFFERED",contentType:""};e.h.R()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),uZ(e,void 0===t?0:t,n)}function uJ(e,t,n,i){e.h&&uQ(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function uQ(e,t,n,i){e.F&&(e=uc(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function uZ(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?u2:e.h.Ge()?u3:e.g.paused?u5:u4,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),uQ(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}A(uU,nQ),(b=uU.prototype).destroy=function(e){return e&&this.g.Yb(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,nQ.prototype.release.call(this),Promise.all(e)},b.fh=function(){return this.l},b.Vg=function(){return this.s},b.xg=function(){return this.g.m&&uN},b.Ea=function(){return this.g.Ea()},b.cf=function(){return this.g.cf()},b.cast=function(){var e,t=this;return F(function(n){return 1==n.g?(e=uB(t),M(n,t.g.cast(e),2)):t.h?M(n,t.h.uf(),0):n.return()})},b.jf=function(e){this.g.jf(e)},b.Oh=function(){!function(e){if(e.h){var t=e.I();chrome.cast.requestSession(function(n){return uA(e,t,n)},function(t){return uE(e,t)})}}(this.g)},b.Yb=function(){this.g.Yb()},b.yg=function(e,t){t=void 0!==t&&t;var n=this;return F(function(i){if(1==i.g)return e==n.C&&t==n.A?i.return():(n.C=e,n.A=t,n.g.Yb(),M(i,n.g.destroy(),2));n.g=null,n.g=new uS(e,function(){return uF(n)},function(){return uV(n)},function(e,t){return uK(n,e,t)},function(){return uH(n)},function(){return uB(n)},t),n.g.init(),C(i)})},W("shaka.cast.CastProxy",uU),uU.prototype.changeReceiverId=uU.prototype.yg,uU.prototype.forceDisconnect=uU.prototype.Yb,uU.prototype.suggestDisconnect=uU.prototype.Oh,uU.prototype.setAppData=uU.prototype.jf,uU.prototype.cast=uU.prototype.cast,uU.prototype.receiverName=uU.prototype.cf,uU.prototype.isCasting=uU.prototype.Ea,uU.prototype.canCast=uU.prototype.xg,uU.prototype.getPlayer=uU.prototype.Vg,uU.prototype.getVideo=uU.prototype.fh,uU.prototype.destroy=uU.prototype.destroy,A(uq,
10nQ),(b=uq.prototype).isConnected=function(){return this.F},b.lh=function(){return this.o},b.Lh=function(e){this.i=e},b.Bg=function(){this.i=null},b.Mh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},b.Kh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},b.Jh=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},b.destroy=function(){var e,t=this;return F(function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.G&&(t.G.stop(),t.G=null),t.g=null,t.H=null,t.C=null,t.F=!1,t.o=!0,t.l=null,t.s=null,nQ.prototype.release.call(t),M(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),C(n)})},W("shaka.cast.CastReceiver",uq),uq.prototype.destroy=uq.prototype.destroy,uq.prototype.setContentArtist=uq.prototype.Jh,uq.prototype.setContentImage=uq.prototype.Kh,uq.prototype.setContentTitle=uq.prototype.Mh,uq.prototype.clearContentMetadata=uq.prototype.Bg,uq.prototype.setContentMetadata=uq.prototype.Lh,uq.prototype.isIdle=uq.prototype.lh,uq.prototype.isConnected=uq.prototype.isConnected;var u0=.5,u1=5,u2="IDLE",u4="PLAYING",u3="BUFFERING",u5="PAUSED";function u8(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=u6(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],f=-1,p=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}for(g=h.length-1;0<=g;g--)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}if(-1===f||-1===p)h=u9(i,r),e.nestedCues.push(h);else{for(;f<=p;f++)if(g=h[f]){var m=g.l,v=g.i,y=g.j,b=g.h;(m!=s||v!=u||y!=l||b!=c)&&(d.payload&&e.nestedCues.push(d),d=u6(i,r,m,v,y,b),s=m,u=v,l=y,c=b),d.payload+=g.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=u9(i,r),e.nestedCues.push(d)),d=u6(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function u6(e,t,n,i,r,a){return e=new eA(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function u9(e,t){return(e=new eA(e,t,"")).lineBreak=!0,e}function u7(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function le(e,t){this.i=[],this.g=1,this.h=0,this.u=e,this.s=t,this.j=this.m=!1,this.l="white",this.o="black",ln(this)}function lt(e,t,n){var i="CC"+(e.u<<1|e.s+1),r=new eA(t,n,"");return r.lineInterpretation=1,r.line=e.g/16*100,u8(r,i,e.i,t,n)}function ln(e){la(e,0,15),e.g=1}function li(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case lo:i=lc.has(n)?lc.get(n):String.fromCharCode(n);break;case ls:i=ld.get(n);break;case lu:e.i[e.g].pop(),i=lh.get(n);break;case ll:e.i[e.g].pop(),i=lf.get(n)}i&&e.i[e.g].push(new u7(i,e.m,e.j,e.o,e.l))}}function lr(e,t,n,i){if(!(0>n||0>t)){if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(e){return e});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(e){return e})}}function la(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var lo=0,ls=1,lu=2,ll=3,lc=new Map([[39,"â"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"â"]]),ld=new Map([[48,"\xae"],[49,"\xb0"],[50,"\xbd"],[51,"\xbf"],[52,"â¢"],[53,"\xa2"],[54,"\xa3"],[55,"âª"],[56,"\xe0"],[57,"â "],[58,"\xe8"],[59,"\xe2"],[60,"\xea"],[61,"\xee"],[62,"\xf4"],[63,"\xfb"]]),lh=new Map([[32,"\xc1"],[33,"\xc9"],[34,"\xd3"],[35,"\xda"],[36,"\xdc"],[37,"\xfc"],[38,"â"],[39,"\xa1"],[40,"*"],[41,"'"],[42,"â"],[43,"\xa9"],[44,"â "],[45,"\xb7"],[46,"â"],[47,"â"],[48,"\xc0"],[49,"\xc2"],[50,"\xc7"],[51,"\xc8"],[52,"\xca"],[53,"\xcb"],[54,"\xeb"],[55,"\xce"],[56,"\xcf"],[57,"\xef"],[58,"\xd4"],[59,"\xd9"],[60,"\xf9"],[61,"\xdb"],[62,"\xab"],[63,"\xbb"]]),lf=new Map([[32,"\xc3"],[33,"\xe3"],[34,"\xcd"],[35,"\xcc"],[36,"\xec"],[37,"\xd2"],[38,"\xf2"],[39,"\xd5"],[40,"\xf5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xc4"],[49,"\xe4"],[50,"\xd6"],[51,"\xf6"],[52,"\xdf"],[53,"\xa5"],[54,"\xa4"],[55,"â"],[56,"\xc5"],[57,"\xe5"],[58,"\xd8"],[59,"\xf8"],[60,"â"],[61,"â"],[62,"â"],[63,"â"]]);function lp(e,t){this.h=ly,this.o=new le(e,t),this.i=new le(e,t),this.g=this.j=new le(e,t),this.l=0,this.m=null}
10function lg(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==lw&&e.h!==lx&&(r=lt(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,la(n,0,15),(n=e.j).g=0<n.h?n.h:0,la(n,0,15),i.g=15),e.h=lw,i.h=t,r}function lm(e){e.h=lb,e.g=e.j,e.g.h=0}function lv(e){et("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=lx}var ly=0,lb=1,lw=3,lx=4,lT="black green blue cyan red yellow magenta black".split(" "),lS="white green blue cyan red yellow magenta white_italics".split(" ");function lA(){this.l=!1,this.A=this.F=0,this.C=lN,this.i=[],this.g=this.h=this.j=0,this.u=this.o=!1,this.s="white",this.m="black",lE(this)}function lE(e){e.i=[];for(var t=0;16>t;t++)e.i.push(lI())}function lI(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function lk(e,t){lM(e)&&(e.i[e.h][e.g]=new u7(t,e.u,e.o,e.m,e.s),e.g++)}function lM(e){var t=e.g<e.A&&0<=e.g;return e.h<e.F&&0<=e.h&&t}function lC(e,t,n){var i=new eA(e.j,t,"");return i.textAlign=e.C===lD?"left":e.C===lR?"right":eM,(n=u8(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}lA.prototype.isVisible=function(){return this.l};var lD=0,lR=1,lN=2;function lL(){this.i=[],this.h=null,this.g=0}function lP(e){this.g=0,this.h=e}function l_(e){if(!e.oa())throw new tr(2,2,3e3);return e.h[e.g++]}function lO(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function lU(e,t){for(var n=[],i=0;8>i;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}
10function lj(e,t,n){var i=null;t=v(lU(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=lC(a,n,e.i)),e.h[r]=null}return i}function lB(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function lF(e,t,n){var i={0:0,1:0,2:1,3:1};return lH[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}lP.prototype.oa=function(){return this.g<this.h.length},lP.prototype.la=function(){return this.g},lP.prototype.skip=function(e){if(this.g+e>this.h.length)throw new tr(2,2,3e3);this.g+=e};var lV=new Map([[32," "],[33,"\xa0"],[37,"â¦"],[42,"Å "],[44,"Å"],[48,"â"],[49,"â"],[50,"â"],[51,"â"],[52,"â"],[53,"â¢"],[57,"â¢"],[58,"Å¡"],[60,"Å"],[61,"â "],[63,"Ÿ"],[118,"â
"],[119,"â
"],[120,"â
"],[121,"â
"],[122,"â"],[123,"â"],[124,"â"],[125,"â"],[126,"â"],[127,"â"]]),lH="black blue green cyan red magenta yellow white".split(" ");function lK(){this.h=[],this.g=[],this.i=new lL,this.l=0,this.m=new Map([["CC1",new lp(0,0)],["CC2",new lp(0,1)],["CC3",new lp(1,0)],["CC4",new lp(1,1)]]),this.s=this.o=0,this.j=new Map,this.u=!0,lq(this)}function lq(e){e.o=0,e.s=0;for(var t=v(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=ly,n.g=n.j,n.m=null,ln(n.i),ln(n.j),ln(n.o);e.u=!0}function lG(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function lz(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(y(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(i=0,e=n;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function lX(){this.j=new Map,this.i=this.h=0,this.g=lW}lK.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,lq(this),e=v(this.j.values());for(var t=e.next();!t.done;t=e.next())lB(t.value)},lK.prototype.extract=function(e,t){if(this.u){for(var n=v(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.u=!1}if(181===(e=new ib(e,0)).ua()&&49===e.Ua()&&1195456820===e.L()&&3===e.ua()&&0!=(64&(n=e.ua())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.ua(),a=(4&r)>>2,o=e.ua(),s=e.ua();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,Na:o,gb:s,order:this.h.length}):(this.g.push({pts:t,type:r,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},lK.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t,n,i=[];this.h.sort(e),this.g.sort(e);for(var r=v(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if(16==(112&t.Na)){var i=t.Na>>3&1;0===n?e.o=i:e.s=i}if(n=e.m.get("CC"+(n<<1|(n?e.s:e.o)+1)),255===t.Na&&255===t.gb||!t.Na&&!t.gb||!lG(t.Na)||!lG(t.gb))return 45<=++e.l&&lq(e),null;if(e.l=0,t.Na&=127,t.gb&=127,!t.Na&&!t.gb)return null;if(e=null,16==(112&t.Na))e:{if(i=t.Na,e=t.gb,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,16==(240&i)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1];var r=(30&e)>>1;i="white";var a=!1;7>r?i=lS[r]:7===r&&(a=!0),e=1==(1&e),n.h!==lx&&(r=n.g,n.h===lw&&t!==r.g&&(n=1+t-r.h,lr(r,n,1+r.g-r.h,r.h),la(r,0,n-1),la(r,t+1,15-t)),r.g=t,r.m=e,r.j=a,r.l=i,r.o="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",li(n.g,lo,32),i=!1,"white_italics"===(t=lS[(14&e)>>1])&&(t="white",i=!0),n.g.m=1==(1&e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",0==(7&i)&&(t=lT[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))li(n.g,ls,e);else if(18==(246&i)&&32==(224&e))li(n.g,1&i?ll:lu,e);else if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.gb){case 32:lm(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=lg(n,2,e);break;case 38:i=lg(n,3,e);break;case 39:i=lg(n,4,e);break;case 40:li(n.g,lo,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:ln(n.o),lv(n);break;case 43:lv(n);break;case 44:t=n.i,i=null,n.h!==lx&&(i=lt(t,n.l,e)),la(t,0,15);break;case 45:t=n.g,n.h!==lw?i=null:(i=lt(t,n.l,e),a=t.g-t.h+1,lr(t,a-1,a,t.h),la(t,0,a-1),la(t,t.g,15-t.g),n.l=e);break;case 46:la(n.j,0,15);break;case 47:t=null,n.h!==lx&&(t=lt(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,lm(n),n.l=e,i=t}e=i;break e}e=null}else i=t.gb,li(n.g,lo,t.Na),li(n.g,lo,i);return e}(this,a.value))&&i.push(a);for(a=(r=v(this.g)).next();!a.done;a=r.next())t=this.i,3===(n=a.value).type?(t.g=2*(63&n.value)-1,t.h=[]):t.h&&(0<t.g&&(t.h.push(n),t.g--),0===t.g&&(t.i.push(new lP(t.h)),t.h=null,t.g=0));
10for(a=(r=v(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.oa();){var i=l_(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&l_(t).value),0!=r){e.j.has(r)||e.j.set(r,new lO(r));for(var o=e.j.get(r),s=t.la();t.la()-s<a;){r=t;var u=l_(r),l=u.value,c=u.pts;if(16===l){var d=l_(r);l=l<<16|d.value}if(0<=l&&31>=l){var h=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!lM(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.A-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(r=lC(f,h,o.i)),f.h+1>=f.F){h=f;for(var p=0,g=1;16>g;g++,p++)h.i[p]=h.i[g];for(g=0;1>g;g++,p++)h.i[p]=lI()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(r=lC(f,h,o.i)),f.i[f.h]=lI(),f.g=0;break;case 12:f.isVisible()&&(r=lC(f,h,o.i)),lE(f),(h=f).h=0,h.g=0}var m=r}else m=null}else if(128<=l&&159>=l)m=function(e,t,n,i){if(128<=n&&135>=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=l_(t).value,t=null,n=v(lU(e,n));for(var r=n.next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=lC(r,i,e.i)),lE(r);return t}if(137===n)for(t=l_(t).value,n=(t=v(lU(e,t))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=l_(t).value,t=null,r=(n=v(lU(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=lC(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=l_(t).value,t=null,r=(n=v(lU(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=lC(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return t=l_(t).value,lj(e,t,i);if(143===n)return i=lj(e,255,i),lB(e),i;if(144===n)t.skip(1),i=l_(t).value,e.g&&(e.g.o=0<(128&i),e.g.u=0<(64&i));
10else if(145===n)i=l_(t).value,n=l_(t).value,t.skip(1),e.g&&(t=lF((48&n)>>4,(12&n)>>2,3&n),e.g.s=lF((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=l_(t).value,t=l_(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=l_(t).value,t.skip(1),e.g&&(e.g.C=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new lA;a.j=i,e.h[n]=a}i=l_(t).value,l_(t),l_(t),a=l_(t).value;var o=l_(t).value;t=l_(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.u=!1,t.o=!1,t.s="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.F=(15&a)+1,t.A=(63&o)+1,e.g=e.h[n]}}}return null}(o,r,l,c);else{if(4096<=l&&4127>=l)h=255&l,8<=h&&15>=h?r.skip(1):16<=h&&23>=h?r.skip(2):24<=h&&31>=h&&r.skip(3);else if(4224<=l&&4255>=l)h=255&l,128<=h&&135>=h?r.skip(4):136<=h&&143>=h&&r.skip(5);else if(32<=l&&127>=l)r=l,o.g&&(127===r?lk(o.g,"âª"):lk(o.g,String.fromCharCode(r)));else if(160<=l&&255>=l)o.g&&lk(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g){if(lV.has(r)){var y=lV.get(r);lk(o.g,y)}else lk(o.g,"_")}}else 4256<=l&&4351>=l&&o.g&&(160!=(255&l)?lk(o.g,"_"):lk(o.g,"[CC]"));m=null}(r=m)&&n.push(r)}}}}catch(e){if(e instanceof tr&&3e3===e.code)et("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,y(a));return this.i.i=[],this.h=[],this.g=[],i},W("shaka.cea.CeaDecoder",lK),eb=function(){return new lK},lX.prototype.init=function(e){function t(e){(e=e.name)in lJ&&(n.g=lJ[e])}var n=this,i=[],r=[];if((new iT).box("moov",iS).box("mvex",iS).O("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.L(),t=t.L(),n.h=e,n.i=t}).box("trak",iS).O("tkhd",function(e){e=rY(e.reader,e.version),i.push(e.trackId)}).box("mdia",iS).O("mdhd",function(e){e=rX(e.reader,e.version),r.push(e.timescale)}).box("minf",iS).box("stbl",iS).O("stsd",iA).box("avc1",t).box("avc3",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("encv",iE).box("sinf",iS).box("frma",function(e){(e=rJ(e.reader).aa)in lJ&&(n.g=lJ[e])}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new tr(2,2,2010);this.g==lW&&ee("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},lX.prototype.parse=function(e){var t=this;if(this.g==lW)return[];var n=[],i=this.h,r=this.i,a=0,o=[],s=null,u=9e4;return(new iT).box("moof",function(e){a=e.start,o=[],iS(e)}).box("traf",iS).O("trun",function(e){e=rW(e.reader,e.version,e.flags),o.push(e)}).O("tfhd",function(e){i=(e=rG(e.reader,e.flags)).Hf||t.h,r=e.Fg||t.i,e=e.trackId,t.j.has(e)&&(u=t.j.get(e))}).O("tfdt",function(e){s=rz(e.reader,e.version).baseMediaDecodeTime}).box("mdat",function(e){if(null===s)throw ee("Unable to find base media decode time for CEA captions!"),new tr(2,2,2010);(function(e,t,n,i,r,a,o,s,u){var l=0,c=a,d=s.map(function(e){return e.$f});for((d=[].concat.apply([],y(d))).length&&(c=d[0].sampleSize||a),t.skip(o+s[0].Eg);t.oa();){o=t.L();var h=t.ua(),f=null;switch(f=!1,s=1,e.g){case lY:f=6==(f=31&h);break;case l$:s=2,t.skip(1),f=39==(f=h>>1&63)||40==f;break;default:return}if(f)for(h=0,l<d.length&&(h=d[l].Sd||0),h=(n+h)/i,f=(s=v(lz(t.mb(o-s)))).next();!f.done;f=s.next())u.push({packet:f.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(c-=o+4)&&(n=l<d.length?n+(d[l].gf||r):n+r,c=++l<d.length&&d[l].sampleSize||a)}})(t,e.reader,s,u,i,r,a-e.start-8,o,n)}).parse(e,!1),n},W("shaka.cea.Mp4CeaParser",lX);var lW=0,lY=1,l$=2,lJ={avc1:1,avc3:1,hev1:2,hvc1:2,dvh1:2,dvhe:2};function lQ(){}function lZ(t,n,i){var r=function(e){var t=[];e=v(e);for(var n=e.next();!n.done;n=e.next())(n=function(e){var t=e.getAttribute("schemeIdUri"),n=iG(e,"urn:mpeg:cenc:2013","default_KID"),i=iq(e,"urn:mpeg:cenc:2013","pssh").map(iX);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new tr(2,4,4009);var r=[];try{r=i.map(function(e){return{initDataType:"cenc",initData:i_(e),keyId:null}})}catch(e){throw new tr(2,4,4007)}return{node:e,$c:t,keyId:n,init:0<r.length?r:null}}(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,u=new Set(r.map(function(e){return e.keyId}));if(u.delete(null),1<u.size)throw new tr(2,4,4010);
10if(!n){if(1<(o=r.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.$c})).length)throw new tr(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw ee("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new tr(2,4,4042);var n=iH(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.getAttribute("schemeIdUri")||!(n=iH(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.getAttribute("IV"),n=n.getAttribute("keyUriTemplate"),!t||!n))throw new tr(2,4,4051);if(16!=(t=iO(t.substr(2))).byteLength)throw new tr(2,4,4048);return{oh:n,iv:t}}(o[0])),(o=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.$c?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.$c})).length&&0==(t=function(e,t,n,i){var r=[];t=v(t);for(var a=t.next();!a.done;a=t.next()){var o,s=n[(a=a.value).$c];if(s){if(o=iH(a.node,"urn:microsoft:playready","pro")){o=i_(o.textContent);var u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);o=[{initData:iF(o,u,new Set,0),initDataType:"cenc",keyId:a.keyId}]}else o=null;if(u=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===a.$c){if(0==(u=i).size)u=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);u=[{initData:iF(new Uint8Array([]),l,u,1),initDataType:"cenc",keyId:a.keyId}]}}o=tc(s,a.init||e||o||u),(s=l2.get(s))&&(o.licenseServerUri=s(a)),r.push(o)}}return r}(a,o,i,u)).length&&(t=[tc("",a)])}if(r.length&&!s&&(n||!o.length))for(t=[],i=(n=v(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&t.push(tc(i,a));if(u=Array.from(u)[0]||null)for(i=(n=v(t)).next();!i.done;i=n.next())for(r=(i=v(i.value.initData)).next();!r.done;r=i.next())r.value.keyId=u;return{Gf:u,Ji:a,drmInfos:t,fe:s,Kf:!0}}function l0(e){var t=iH(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=iH(e.node,"urn:microsoft:playready","pro"))&&(e=(function(e){var t=0,n=ep(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,0!=(1&r)||r+e>n.byteLength){n=[];break e}var a=ef(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=i_(e.textContent)).filter(function(e){return e.type===l1})[0])&&(e=i5(e=ip(e.value,!0),"WRMHEADER"))?function(e){e=v(e.getElementsByTagName("DATA"));for(var t=e.next();!t.done;t=e.next()){t=v(t.value.childNodes);for(var n=t.next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent}return""}(e):""}ey["video/mp4"]=function(){return new lX},lQ.prototype.init=function(){},lQ.prototype.parse=function(e){var t=[];if(!at(e=ef(e)))return t;var n=(e=(new r7).parse(e)).Kc(),i=e.yd();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=v(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=v(lz(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},W("shaka.cea.TsCeaParser",lQ),ey["video/mp2t"]=function(){return new lQ};var l1=1,l2=(new Map).set("com.widevine.alpha",function(e){var t=iH(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=iH(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""}).set("com.microsoft.playready",l0).set("com.microsoft.playready.recommendation",l0).set("com.microsoft.playready.software",l0).set("com.microsoft.playready.hardware",l0).set("org.w3.clearkey",function(e){var t=iH(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=iH(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.getAttribute("Lic_type")&&e.textContent?e.textContent:""});function l4(t,n,i,r,a){var o={RepresentationID:n,Number:i,Bandwidth:r,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,i,r){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&"bigint"!=typeof a&&(.2<=Math.abs(a-Math.round(a))&&ee("Calculated $Time$ values must be close to integers"),a=Math.round(a)),r){case void 0:case"d":case"i":case"u":default:t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase()}return Array(Math.max(0,(i=e.parseInt(i,10)||1)-t.length)+1).join("0")+t})}function l3(e,t){var n=l5(e,t,"timescale"),i=1;n&&(i=i0(n)||1);var r=l5(e,t,"duration");n=i0(r||""),"image"==e.J.contentType&&(n=i2(r||"")),n&&(n/=i);var a=l5(e,t,"startNumber");r=Number(l5(e,t,"presentationTimeOffset"))||0;var o=i1(a||"");if((null==a||null==o)&&(o=1),a=l8(e,t,"SegmentTimeline"),t=null,a){t=i,e=e.X.duration||1/0,a=iK(a,"S");for(var s=[],u=-r,l=0;l<a.length;++l){var c=a[l],d=a[l+1],h=iY(c,"t",i1),f=iY(c,"d",i1);if(c=iY(c,"r",iZ),null!=h&&(h-=r),!f)break;
10if(h=null!=h?h:u,0>(c=c||0)){if(d){if(null==(d=iY(d,"t",i1))||h>=d)break;c=Math.ceil((d-h)/f)-1}else{if(1/0==e||h/t>=e)break;c=Math.ceil((e*t-h)/f)-1}}for(0<s.length&&h!=u&&(s[s.length-1].end=h/t),d=0;d<=c;++d)u=h+f,s.push({start:h/t,end:u/t,wf:h}),h=u}t=s}return{timescale:i,qa:n,jc:o,nb:r/i||0,vf:r,timeline:t}}function l5(e,t,n){return[t(e.J),t(e.fa),t(e.na)].filter(tu).map(function(e){return e.getAttribute(n)}).reduce(function(e,t){return e||t})}function l8(e,t,n){return[t(e.J),t(e.fa),t(e.na)].filter(tu).map(function(e){return iV(e,n)}).reduce(function(e,t){return e||t})}function l6(e){this.h=ep(e),this.g=new ib(this.h,0)}function l9(e){var t=l7(e);if(7<t.length)throw new tr(2,3,3002);var n=0;t=v(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=l7(e);e:{i=v(ce);for(var r=i.next();!r.done;r=i.next())if(ec(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.la();else{if(8==t.length&&224&t[1])throw new tr(2,3,3001);for(r=i=0;r<t.length;r++){var a=t[r];i=0==r?a&(1<<8-t.length)-1:256*i+a}t=i}return t=e.g.la()+t<=e.h.byteLength?t:e.h.byteLength-e.g.la(),i=ep(e.h,e.g.la(),t),e.g.skip(t),new ct(n,i)}function l7(e){var t=e.g.la(),n=e.g.ua();if(0==n)throw new tr(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),ef(e.h,t,n)}l6.prototype.oa=function(){return this.g.oa()};var ce=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ct(e,t){this.id=e,this.g=t}function cn(e){if(8<e.g.byteLength)throw new tr(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new tr(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function ci(e,t,n){if(!(t=l8(e,t,"Initialization")))return null;var i=e.J.za,r=t.getAttribute("sourceURL");r&&(i=tl(e.J.za,[r])),r=0;var a=null;return(t=iY(t,"range",iQ))&&(r=t.start,a=t.end),new rR(function(){return i},r,a,cu(e),null,null,n)}function cr(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,v,y,b,w,x;return F(function(T){if(1==T.g)return s=e.presentationTimeline,u=!e.sb||!e.X.He,l=e.X.start,c=e.X.duration,d=e.J.mimeType.split("/")[1],f=null,p=[(h=t)(i,r,a,!1),"webm"==d?h(n.Ca(),n.Ka,n.pa,!0):null],h=null,M(T,Promise.all(p),2);if(m=(g=T.h)[0],v=g[1]||null,y=null,b=l-o,w=l,x=c?l+c:1/0,"mp4"==d)var S=function(e,t,n,i,r,a,o){var s,u=(new iT).O("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.L();if(0==u)throw new tr(2,3,3005);if(0==o.version)var l=o.reader.L(),c=o.reader.L();else l=o.reader.hc(),c=o.reader.hc();o.reader.skip(2);var d=o.reader.Ua();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.L(),f=(2147483648&h)>>>31;h&=2147483647;var p=o.reader.L();if(o.reader.skip(4),1==f)throw new tr(2,3,3006);s.push(new rN(l/u+n,(l+p)/u+n,function(){return a},e,e+h-1,t,n,i,r)),l+=p,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)});if(e&&u.parse(e),s)return s;throw new tr(2,3,3004)}(m,r,i,n,b,w,x);else{if(440786851!=l9(S=new l6(v)).id)throw new tr(2,3,3008);var A=l9(S);if(408125543!=A.id)throw new tr(2,3,3009);S=A.g.byteOffset,A=new l6(A.g);for(var E=null;A.oa();){var I=l9(A);if(357149030==I.id){E=I;break}}if(!E)throw new tr(2,3,3010);for(A=null,E=new l6(E.g),I=1e6;E.oa();){var k=l9(E);if(2807729==k.id)I=cn(k);else if(17545==k.id){if(4==k.g.byteLength)A=k.g.getFloat32(0);else if(8==k.g.byteLength)A=k.g.getFloat64(0);else throw new tr(2,3,3003)}}if(null==A)throw new tr(2,3,3011);if(A*=E=I/1e9,475249515!=(I=l9(new l6(m))).id)throw new tr(2,3,3007);S=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new l6(e.g);for(var d=null,h=null;e.oa();){var f=l9(e);if(187==f.id){var p=function(e){var t=new l6(e.g);if(179!=(e=l9(t)).id)throw new tr(2,3,3013);if(e=cn(e),183!=(t=l9(t)).id)throw new tr(2,3,3012);t=new l6(t.g);for(var n=0;t.oa();){var i=l9(t);if(241==i.id){n=cn(i);break}}return{Rh:e,Bh:n}}(f);p&&(f=n*p.Rh,p=t+p.Bh,null!=d&&c.push(new rN(d+o,f+o,l,h,p-1,a,o,s,u)),d=f,h=p)}}return null!=d&&c.push(new rN(d+o,i+o,l,h,null,a,o,s,u)),c}(I,S,E,A,i,n,b,w,x)}return y=S,s.Vc(y),f=new aZ(y),u&&f.Xb(w,x,!0),T.return(f)})}function ca(e){return e.bd}function co(e){var t=l8(e,ca,"RepresentationIndex");return e=l5(e,ca,"indexRange"),e=iQ(e||""),t&&(e=iY(t,"range",iQ,e)),e}function cs(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=tf&&"mp4"!=n&&"webm"!=n)throw new tr(2,4,4006);if("webm"==n&&!t)throw new tr(2,4,4005)}function cu(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.Nd,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function cl(e){return e.xb}function cc(e){return e.cd}function cd(e,t,n,i,r,a,o,s,u){aZ.call(this,[]),this.h=e,this.F=t,this.u=n,this.A=i,this.j=r,this.o=a,this.C=o,this.s=u,s&&cf(this)}function ch(e,t,n,i,r){if(e.h){var a=(n=e.h.timeline)[n.length-1];0<(t=t.timeline.filter(function(e){return e.start>=a.end})).length&&e.h.timeline.push.apply(e.h.timeline,y(t)),e.o!==i&&(e.o=i)}else e.h=t,e.j=n,e.o=i;r&&cf(e)}function cf(e){if(!e.m){for(var t=e.h.timeline;t.length;)if(t[t.length-1].start>=e.o)t.pop();else break;e.Za(e.j),0!==t.length&&1/0!==e.o&&(t[t.length-1].end=e.o-e.j)}}function cp(){this.j=[],this.g=[],this.i=[],this.l=[],this.h=[],this.m=new Set}function cg(e){var t,n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S,A;return F(function(E){switch(E.g){case 1:if(t=tp,1==e.length)return E.return(e[0]);for(n=e.map(function(e){return e.filter(function(e){return e.type==t.T})}),i=e.map(function(e){return e.filter(function(e){return e.type==t.ka})}),r=e.map(function(e){return e.filter(function(e){return e.type==t.ea})}),a=e.map(function(e){return e.filter(function(e){return e.type==t.zc})}),s=(o=v(r)).next();!s.done;s=o.next())s.value.push(cR(t.ea));for(l=(u=v(a)).next();!l.done;l=u.next())l.value.push(cR(t.zc));return M(E,cm([],n,0,cw,cT),2);case 2:return c=E.h,M(E,cm([],i,0,cw,cT),3);case 3:return d=E.h,M(E,cm([],r,0,cw,cT),4);case 4:return h=E.h,M(E,cm([],a,0,cw,cT),5);case 5:if(f=E.h,p=0,d.length&&c.length)for(b=(y=v(c)).next();!b.done;b=y.next())for(w=b.value,T=(x=v(d)).next();!T.done;T=x.next())S=T.value,A=p++,S.variantIds.push(A),w.variantIds.push(A);else for(m=(g=v(d.concat(c))).next();!m.done;m=g.next())m.value.variantIds=[p++];return E.return(d.concat(c).concat(h).concat(f))}})}function cm(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x;return F(function(T){switch(T.g){case 1:for(s=0,a=tp,o=[];s<t.length;s++)s>=n?o.push(new Set(t[s])):o.push(new Set);l=(u=v(e)).next();case 2:var S,A,E,I,k;if(l.done){T.B(4);break}return M(T,(S=l.value,A=t,E=n,I=r,k=o,F(function(e){return 1==e.g?(cS(A,S),S.matchedStreams?S.segmentIndex?M(e,cv(S,E),2):e.B(2):e.return(!1)):(cy(S,E,I,k),e.return(!0))})),5);case 5:if(!T.h)throw new tr(2,4,4037);l=u.next(),T.B(2);break;case 4:for(d=(c=v(o)).next();!d.done;d=c.next())for(f=(h=v(d.value)).next();!f.done;f=h.next())(p=function(e,t,n,i,r){var a=n(e);return(cS(t,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return F(function(e){return a.segmentIndex?e.B(0):(a.segmentIndex=new a2,M(e,cv(a,0),0))})}),a.matchedStreams&&a.matchedStreams.length)?(cy(a,0,i,r),a):null}(f.value,t,i,r,o))&&e.push(p);for(d=(g=v(o)).next();!d.done;d=g.next())for(m=d.value,y={},f=(b=v(m)).next();!f.done;y={rb:y.rb},f=b.next())if(y.rb=f.value,w=y.rb.type==a.ea&&!y.rb.language,x=y.rb.type==a.zc&&!y.rb.tilesLayout,!w&&!x&&e.some(function(e){return function(t){return t.mimeType==e.rb.mimeType&&tw(t.codecs)==tw(e.rb.codecs)}}(y)))throw new tr(2,4,4037);return T.return(e)}})}function cv(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){for(n=[],a=(r=v(i=e.matchedStreams)).next();!a.done;a=r.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return M(l,Promise.all(n),2)}if(e.segmentIndex instanceof a2)for(s=t;s<i.length;s++)(u=i[s]).segmentIndex&&e.segmentIndex.h.push(u.segmentIndex);C(l)})}function cy(e,t,n,i){for(var r=e.matchedStreams,a=0;a<r.length;a++)if(a>=t){var o=r[a];n(e,o);var s=!0;"audio"==e.type&&0==tP(e.language,o.language)&&(s=!1),s&&i[a].delete(o)}}function cb(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=v(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function cw(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function cx(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris)))),e.keyIds=(n=e.keyIds,i=t.keyIds,new Set([].concat(y(n),y(i)))),null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||"");var n,i,r=rg(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new tr(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map),r=v(t.closedCaptions);for(var a=r.next();!a.done;a=r.next()){var o=v(a.value);a=o.next().value,o=o.next().value,e.closedCaptions.set(a,o)}}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=cb(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),cx(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&cx(e.trickModeVideo,t)}function cT(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(y(e.keyIds),y(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,y(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=v(t.closedCaptions)).next();!n.done;n=t.next()){var i=v(n.value);n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}}function cS(e,t){var n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){var r=t,a={audio:cA,video:cA,text:cE,image:cI}[r.type],o={audio:ck,video:cM,text:cC,image:cD}[r.type],s=null;i=v(i.value);for(var u=i.next();!u.done;u=i.next())a(r,u=u.value)&&(!s||o(r,s,u))&&(s=u);if(!(r=s))return;n.push(r)}t.matchedStreams=n}function cA(e,t){function n(e){if(!cj.has(e)){var t=tw(e);cj.set(e,t)}return cj.get(e)}return t.mimeType==e.mimeType&&n(t.codecs)==n(e.codecs)&&(!e.drmInfos||!!rp(e.drmInfos,t.drmInfos))}function cE(e,t){return!!e.language&&(!t.language||0!=tP(e.language,t.language)&&t.kind==e.kind)}function cI(e){return!!e.tilesLayout}function ck(e,t,n){if(e.id==n.id)return!0;var i=tP(e.language,t.language),r=tP(e.language,n.language);return r>i||!(r<i)&&(e.roles.length?(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length||!(r.length<i.length)&&n.roles.length<t.roles.length):!n.roles.length&&!!t.roles.length||(!n.roles.length||!!t.roles.length)&&(!t.primary&&!!n.primary||(!t.primary||!!n.primary)&&((i=cL(e.channelsCount,t.channelsCount,n.channelsCount))==c_||i!=cU&&((i=cL(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==c_||i!=cU&&!!e.bandwidth&&cP(e.bandwidth,t.bandwidth,n.bandwidth)==c_))))}function cM(e,t,n){if(e.id==n.id)return!0;var i=cL(e.width*e.height,t.width*t.height,n.width*n.height);if(i==c_)return!0;
10if(i==cU)return!1;if(e.frameRate){if((i=cL(e.frameRate,t.frameRate,n.frameRate))==c_)return!0;if(i==cU)return!1}return!!e.bandwidth&&cP(e.bandwidth,t.bandwidth,n.bandwidth)==c_}function cC(e,t,n){if(e.id==n.id)return!0;var i=tP(e.language,t.language),r=tP(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function cD(e,t,n){return e.id==n.id||cL(e.width*e.height,t.width*t.height,n.width*n.height)==c_}function cR(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}function cN(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new aZ([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1}}function cL(e,t,n){if(t==e&&e!=n)return cU;if(n==e&&e!=t)return c_;if(t>e){if(n<=e||n-e<t-e)return c_;if(n-e>t-e)return cU}
10else{if(n>e)return cU;if(e-n<e-t)return c_;if(e-n>e-t)return cU}return cO}function cP(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?c_:t<e?cU:cO}A(cd,aZ),(b=cd.prototype).Db=function(){return this.h?this.h.timeline.length:0},b.release=function(){aZ.prototype.release.call(this),this.h=null},b.Za=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length;i+=1)if(n[i].end+this.j<=e)t+=1;else break;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,0===this.Db()&&this.release())}},b.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>this.o)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],a=r.start+this.j;if(r=r.end+this.j,i<n&&(r=t[i+1].start+this.j),e>=a&&e<r)return i+this.i}return null},b.get=function(e){var t=this,n=e-this.i;if(0>n||n>=this.Db()||!this.h)return null;var i=this.g[n];if(!i){i=this.h.timeline[n];var r=e+this.h.jc,a=this.h.vf+i.wf;i=new rN(this.j+i.start,this.j+i.end,function(){var e,n,i,o,s;return t.h?(e=t.h.Re,n=t.F,i=r,o=t.u,s=a,tl(t.A,[e=l4(e,n,i,o||null,s)]).map(function(e){return e.toString()})):[]},0,null,this.C,this.j-this.h.nb,this.j,this.o,[],"",null,null,rL,this.s),this.g[n]=i}return i},(b=cp.prototype).release=function(){for(var e=v(this.g.concat(this.i,this.l,this.h)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.g=[],this.i=[],this.l=[],this.h=[],this.j=[]},b.eh=function(){return this.j},b.Ee=function(){return this.l.slice()},b.Ng=function(){return this.h},b.Df=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S,A,E,I,k,D,R,N=this;return F(function(L){switch(L.g){case 1:if(n=tp,function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.audioStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.channelsCount==s.channelsCount&&r.language==s.language&&r.bandwidth==s.bandwidth&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&eT(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.audioStreams=n}}(e),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.videoStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&eT(r.roles,s.roles)&&function(e,t){if(!e&&!t)return!0;if(e&&!t||t&&!e||e.size!=t.size)return!1;e=v(e);for(var n=e.next();!n.done;n=e.next()){var i=v(n.value);if(n=i.next().value,i=i.next().value,!t.has(n)||(n=t.get(n))!=i||void 0==n)return!1}return!0}(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.videoStreams=n}}(e),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.textStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.language==s.language&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.bandwidth==s.bandwidth&&eT(r.roles,s.roles)&&(a=!0);a||n.push(r)}t.textStreams=n}}(e),function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;for(var n=[],i=v(t.imageStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=v(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&(a=!0);a||n.push(r)}t.imageStreams=n}}(e),!t&&1==e.length){i=e[0],N.g=i.audioStreams,N.i=i.videoStreams,N.l=i.textStreams,N.h=i.imageStreams,L.B(2);break}for(a=0,r=-1;a<e.length;a++)o=e[a],N.m.has(o.id)||(N.m.add(o.id),-1==r&&(r=a));if(-1==r)return L.return();for(s=e.map(function(e){return e.audioStreams}),u=e.map(function(e){return e.videoStreams}),l=e.map(function(e){return e.textStreams}),c=e.map(function(e){return e.imageStreams}),h=(d=v(l)).next();!h.done;h=d.next())h.value.push(cN(n.ea));for(p=(f=v(c)).next();!p.done;p=f.next())p.value.push(cN(n.zc));return M(L,cm(N.g,s,r,cb,cx),3);case 3:return M(L,cm(N.i,u,r,cb,cx),4);case 4:return M(L,cm(N.l,l,r,cb,cx),5);case 5:return M(L,cm(N.h,c,r,cb,cx),2);case 2:if(g=0,m=[],N.i.length&&N.g.length)for(S=(T=v(N.g)).next();!S.done;S=T.next())for(A=S.value,I=(E=v(N.i)).next();!I.done;I=E.next())k=I.value,D=rg(A.drmInfos,k.drmInfos),A.drmInfos.length&&k.drmInfos.length&&!D.length||(
10R=g++,m.push({id:R,language:A.language,disabledUntilTime:0,primary:A.primary,audio:A,video:k,bandwidth:(A.bandwidth||0)+(k.bandwidth||0),drmInfos:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(b=(y=v(N.i.concat(N.g))).next();!b.done;b=y.next())w=b.value,x=g++,m.push({id:x,language:w.language,disabledUntilTime:0,primary:w.primary,audio:w.type==n.T?w:null,video:w.type==n.ka?w:null,bandwidth:w.bandwidth||0,drmInfos:w.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});N.j=m,C(L)}})},W("shaka.util.PeriodCombiner",cp),cp.prototype.combinePeriods=cp.prototype.Df,cp.prototype.getImageStreams=cp.prototype.Ng,cp.prototype.getTextStreams=cp.prototype.Ee,cp.prototype.getVariants=cp.prototype.eh;var c_=1,cO=0,cU=-1,cj=new Map;function cB(){var e=this;this.h=this.g=null,this.s=[],this.i=null,this.H=1,this.l={},this.K={},this.j=new cp,this.C=0,this.G=new Y(5),this.F=new tV(function(){var t,n,i;t=e,F(function(e){switch(e.g){case 1:return n=0,D(e,2),M(e,cF(t),4);case 4:n=e.h,N(e,3);break;case 2:if(i=L(e),t.h){if(t.g.raiseFatalErrorOnManifestUpdateRequestFailure)return t.h.onError(i),e.return();i.severity=1,t.h.onError(i)}case 3:if(!t.h)return e.return();t.h.onManifestUpdated(),cK(t,n),C(e)}})}),this.A=new n1,this.u=null,this.I=[],this.m=1/0,this.o=!1}function cF(e){var t,n,i,r;return F(function(a){if(1==a.g)return t=n5(e.s,e.g.retryParameters),n=Date.now(),M(a,cX(e,t,0,{type:4}),2);if(3!=a.g){var o,s,u,l,c,d,h;return(i=a.h,e.h)?(i.uri&&!e.s.includes(i.uri)&&e.s.unshift(i.uri),M(a,(o=e,s=i.data,u=i.uri,F(function(e){if(1==e.g){if(!(l=i8(s,"MPD")))throw new tr(2,4,4001,u);return o.g.dash.disableXlinkProcessing?e.return(cV(o,l,u)):(c=o.g.dash.xlinkFailGracefully,d=function e(t,n,i,r,a,o){if(o=void 0===o?0:o,iG(t,"http://www.w3.org/1999/xlink","href")){var s=function(t,n,i,r,a,o){for(var s=iG(t,"http://www.w3.org/1999/xlink","href"),u=iG(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=v(Array.from(t.attributes)),c=l.next();!c.done;c=l.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&t.removeAttributeNS(c.namespaceURI,c.localName);if(5<=o)return nq(new tr(2,4,4028));if("onLoad"!=u)return nq(new tr(2,4,4027));var d=tl([r],[s]);return a.request(0,n5(d,n)).ga(function(r){if(!(r=i8(r.data,t.tagName)))return nq(new tr(2,4,4001,s));for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);for(;r.childNodes.length;){var u=r.childNodes[0];r.removeChild(u),t.appendChild(u)}for(u=(r=v(Array.from(r.attributes))).next();!u.done;u=r.next())t.setAttributeNode(u.value.cloneNode(!1));return e(t,n,i,d[0],a,o+1)})}(t,n,i,r,a,o);return i&&(s=s.ga(void 0,function(){return e(t,n,i,r,a,o)})),s}s=[];for(var u=v(Array.from(t.childNodes)),l=u.next();!l.done;l=u.next())(l=l.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==iG(l,"http://www.w3.org/1999/xlink","href")?t.removeChild(l):"SegmentTimeline"!=l.tagName&&s.push(e(l,n,i,r,a,o)));return nW(s).ga(function(){return t})}(l,o.g.retryParameters,c,u,o.h.networkingEngine),n2(o.A,d),M(e,d.promise,2))}return h=e.h,e.return(cV(o,h,u))})),3)):a.return(0)}return r=(Date.now()-n)/1e3,e.G.sample(1,r),a.return(r)})}function cV(t,n,i){var r,a,o,s,u,l,c,d,h,f,p,g,m,b,w,x,T,S,A,E,I,k,R,P,_,O,U,j;return F(function(B){switch(B.g){case 1:if((r=t.g.dash.manifestPreprocessor)&&r(n),a=[i],0<(o=iK(n,"Location").map(iX).filter(tu)).length&&(s=tl(a,o),a=t.s=s),l=tl(a,(u=iK(n,"BaseURL")).map(iX)),c=0,u&&u.length&&(c=iY(u[0],"availabilityTimeOffset",i2)||0),d=t.g.dash.ignoreMinBufferTime,h=0,d||(h=iY(n,"minBufferTime",iJ)||0),t.C=iY(n,"minimumUpdatePeriod",iJ,-1),f=iY(n,"availabilityStartTime",i$),p=iY(n,"timeShiftBufferDepth",iJ),g=t.g.dash.ignoreSuggestedPresentationDelay,m=null,g||(m=iY(n,"suggestedPresentationDelay",iJ)),b=t.g.dash.ignoreMaxSegmentDuration,w=null,b||(w=iY(n,"maxSegmentDuration",iJ)),x=n.getAttribute("type")||"static",t.i)for(T=t.i.presentationTimeline,A=(S=v(Object.values(t.l))).next();!A.done;A=S.next())(E=A.value).segmentIndex&&E.segmentIndex.Za(T.jb());else I=t.g.defaultPresentationDelay||1.5*h,k=null!=m?m:I,T=new aL(f,k,t.g.dash.autoCorrectDrift);return T.ic("static"==x),T.R()&&!isNaN(t.g.availabilityWindowOverride)&&(p=t.g.availabilityWindowOverride),null==p&&(p=1/0),T.Td(p),_=(P=function(t,n,i,r){var a=iY(r,"mediaPresentationDuration",iJ),o=[],s=0;r=iK(r,"Period");for(var u=0;u<r.length;u++){var l=r[u],c=r[u+1],d=iY(l,"start",iJ,s),h=l.id,f=iY(l,"duration",iJ),p=null;if(c){var g=iY(c,"start",iJ);null!=g&&(p=g-d)}else null!=a&&(p=a-d);if(null==p&&(p=f),!(null!==t.u&&null!==h&&null!==d&&d<t.u)||t.I.includes(h)||u+1==r.length){if(null!==d&&(null===t.u||d>t.u)&&(t.u=d),s=function(t,n,i,r){n.na=cq(r.node,null,i),n.X=r,n.na.Wb=n.Wb,n.na.id||(n.na.id="__shaka_period_"+r.start);
10var a=iK(r.node,"EventStream");i=n.presentationTimeline.jb(),a=v(a);for(var o=a.next();!o.done;o=a.next())(function(e,t,n,i,r){var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=iY(i,"timescale",i1)||1;i=v(iK(i,"Event"));for(var u=i.next();!u.done;u=i.next()){var l=iY(u=u.value,"presentationTime",i1)||0,c=iY(u,"duration",i1)||0;c=(l=l/s+t)+c/s,null!=n&&(l=Math.min(l,t+n),c=Math.min(c,t+n)),c<r||(u={schemeIdUri:a,value:o,startTime:l,endTime:c,id:u.getAttribute("id")||"",eventElement:u},e.h.onTimelineRegionAdded(u))}})(t,r.start,r.duration,o.value,i);if(i=iK(r.node,"AdaptationSet").map(function(i){return function(t,n,i){function r(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.fa=cq(i,n.na,null);var a=!1,o=iK(i,"Role"),s=o.map(function(e){return e.getAttribute("value")}).filter(tu),u=void 0,l=n.fa.contentType==tf;l&&(u="subtitle"),o=v(o);for(var c=o.next();!c.done;c=o.next()){var d=(c=c.value).getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(c=c.getAttribute("value")){case"main":a=!0;break;case"caption":case"subtitle":u=c}}d=iK(i,"EssentialProperty"),o=null,c=!1,d=v(d);for(var h=d.next();!h.done;h=d.next()){var f=(h=h.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==f?o=h.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==f?p=r(parseInt(h.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=f&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=f&&(c=!0)}for(h=(d=v(d=iK(i,"SupplementalProperty"))).next();!h.done;h=d.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(h=h.value).getAttribute("schemeIdUri")&&(p=r(parseInt(h.getAttribute("value"),10)));d=iK(i,"Accessibility");var p,g,m=new Map;for(h=(d=v(d)).next();!h.done;h=d.next())if(h=(f=h.value).getAttribute("schemeIdUri"),f=f.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==h){if(h=1,null!=f){f=f.split(";");for(var b=v(f),w=b.next();!w.done;w=b.next()){var x=w.value,T=w=void 0;x.includes("=")?(w=(x=x.split("="))[0].startsWith("CC")?x[0]:"CC"+x[0],T=x[1]||"und"):(w="CC"+h,2==f.length?h+=2:h++,T=x),m.set(w,tL(T))}}else m.set("CC1","und")}else if("urn:scte:dash:cc:cea-708:2015"==h){if(h=1,null!=f)for(w=(f=v(f.split(";"))).next();!w.done;w=f.next())w=w.value,x=b=void 0,w.includes("=")?(b="svc"+(w=w.split("="))[0],x=w[1].split(",")[0].split(":").pop()):(b="svc"+h,h++,x=w),m.set(b,tL(x));else m.set("svc1","und")}else"urn:mpeg:dash:role:2011"==h?null!=f&&(s.push(f),"captions"==f&&(u="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==h&&("1"==f?g="visually impaired":"2"==f&&(g="hard of hearing"));if(c)return null;var S=lZ(c=iK(i,"ContentProtection"),t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),A=tL(n.fa.language||"und"),E=i.getAttribute("label");if((c=iK(i,"Label"))&&c.length&&(c=c[0]).textContent&&(E=c.textContent),0==(i=(c=iK(i,"Representation")).map(function(i){return(i=function(t,n,i,r,a,o,s,u,l,c,d){if(n.J=cq(c,n.fa,null),t.m=Math.min(t.m,n.J.Wb),!function(e){var t=e.bd?1:0;return 0==(t+=(e.xb?1:0)+(e.cd?1:0))?e.contentType==tf||"application"==e.contentType:(1!=t&&(e.bd&&(e.xb=null),e.cd=null),!0)}(n.J))return null;var h,f,p=n.X.start;n.bandwidth=iY(c,"bandwidth",i0)||0;var g=n.J.contentType,m=g==tf||"application"==g;g="image"==g;try{var y=void 0;if(i.fe){var b=tl(n.J.za,[i.fe.oh]),w=n5(b,t.g.retryParameters);y={method:"AES-128",iv:i.fe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;return F(function(a){if(1==a.g)return M(a,cX(t,w,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new tr(2,4,4049);return i={name:"AES-CBC"},r=y,M(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,y.fetchKey=void 0,C(a)})}}}if(b=function(e,n,i,r){return function(e,t,n,i,r){var a,o,s,u;return F(function(l){return 1==l.g?(a=n9,o=r?0:1,s=ou(t,n,i,e.g.retryParameters),M(l,cX(e,s,a,{type:o}),2)):(u=l.h,l.return(u.data))})}(t,e,n,i,r)},n.J.bd)var x,T,S,A,E,I,k,D,R=(x=b,T=y,S=Number(l5(n,ca,"presentationTimeOffset"))||0,A=l5(n,ca,"timescale"),E=1,A&&(E=i0(A)||1),I=S/E||0,k=ci(n,ca,T),function(e,t){if(cs(e,t),!co(e))throw new tr(2,4,4002)}(n,k),D=n0(n),{Zb:function(){var e=l8(D,ca,"RepresentationIndex"),t=D.J.za;return e&&(e=e.getAttribute("sourceURL"))&&(t=tl(D.J.za,[e])),e=co(D),cr(D,x,k,t,e.start,e.end,I)}});else if(n.J.xb)R=function(e,t,n){var i=ci(e,cl,n),r=function(e){var t=function(e){return[e.J.xb,e.fa.xb,e.na.xb].filter(tu).map(function(e){return iK(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){return t.getAttribute("indexRange")&&!e.Pf&&(e.Pf=!0),{sh:t.getAttribute("media"),start:(t=iY(t,"mediaRange",iQ,{start:0,end:null})).start,end:t.end}})}(e),n=(e=l3(e,cl)).jc;0==n&&(n=1);var i=0;return e.qa?i=e.qa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{qa:e.qa,startTime:i,jc:n,nb:e.nb,timeline:e.timeline,cc:t}}(e);if(!r.qa&&!r.timeline&&1<r.cc.length||!r.qa&&!e.X.duration&&!r.timeline&&1==r.cc.length||r.timeline&&0==r.timeline.length)throw new tr(2,4,4002);var a=null,o=null;e.na.id&&e.J.id&&(o=t[e.na.id+","+e.J.id])&&(a=o.segmentIndex);var s=function(e,t,n,i,r,a){var o=i.cc.length;i.timeline&&i.timeline.length!=i.cc.length&&(o=Math.min(i.timeline.length,i.cc.length));for(var s=e-i.nb,u=t?e+t:1/0,l=[],c=i.startTime,d={},h=0;h<o;d={xc:d.xc,vc:d.vc},h++){d.vc=i.cc[h];var f=void 0;f=null!=i.qa?c+i.qa:i.timeline?i.timeline[h].end:c+t,d.xc=null,l.push(new rN(e+c,e+f,function(e){return function(){return null==e.xc&&(e.xc=tl(n,[e.vc.sh])),e.xc}}(d),d.vc.start,d.vc.end,r,s,e,u,[],"",null,null,rL,a)),c=f}return l}(e.X.start,e.X.duration,e.J.za,r,i,n);return t=!a,a?a.Uc(s,e.presentationTimeline.jb()):a=new aZ(s),e.presentationTimeline.Vc(s),e.sb&&e.X.He||a.Xb(e.X.start,e.X.duration?e.X.start+e.X.duration:1/0,t),o&&(o.segmentIndex=a),{Zb:function(){return a&&0!=a.Db()||a.Kd(s),Promise.resolve(a)}}}(n,t.l,y);else if(n.J.cd)R=function(t,n,i,r,a,o,s){var u=function(e,t){var n=l5(e,cc,"initialization");if(!n)return null;var i=e.J.id,r=e.bandwidth||null,a=e.J.za;return new rR(function(){return tl(a,[l4(n,i,null,r,null)])},0,null,cu(e),null,null,t)}(t,s),l=function(e){var t=l3(e,cc),n=l5(e,cc,"media");return e=l5(e,cc,"index"),{qa:t.qa,timescale:t.timescale,jc:t.jc,nb:t.nb,vf:t.vf,timeline:t.timeline,Re:n,Rc:e}}(t);(function(e){var t=e.Rc?1:0;
10if(0==(t+=(e.timeline?1:0)+(e.qa?1:0))||(1!=t&&(e.Rc&&(e.timeline=null),e.qa=null),!e.Rc&&!e.Re))throw new tr(2,4,4002)})(l);var c=n0(t);if(l.Rc)return cs(t,u),{Zb:function(){var e=l4(l.Rc,c.J.id,null,c.bandwidth||null,null);return e=tl(c.J.za,[e]),cr(c,n,u,e,0,null,l.nb)}};if(l.qa)return r||"image"===t.fa.contentType||(t.presentationTimeline.Ue(l.qa),t.presentationTimeline.Md(t.X.start)),{Zb:function(){return function(t,n,i,r,a,o){function s(t){var i=(t-g)*p,a=i+n.nb,s=i+d,u=Math.min(i=s+p,l());return(s=new rN(s,u,function(){var n=a*m;return"BigInt"in e&&n>Number.MAX_SAFE_INTEGER&&(n=BigInt(a)*BigInt(m)),tl(x,[n=l4(y,w,t,b,n)])},0,null,r,T,d,l(),[],"",null,null,rL,o)).j=i,s}function u(){var e=[Math.max(c.jb(),d),Math.min(c.Eb(),l())].map(function(e){return e-d});return[Math.ceil(e[0]/p),Math.ceil(e[1]/p)-1].map(function(e){return e+g})}function l(){var e=null!=h&&a[h]||f;return e?d+e:1/0}var c=t.presentationTimeline,d=t.X.start,h=t.na.id,f=t.X.duration,p=n.qa,g=n.jc,m=n.timescale,y=n.Re,b=t.bandwidth||null,w=t.J.id,x=t.J.za,T=d-n.nb,S=u();t=t.sb?Math.max(S[0],S[1]-i+1):S[0],S=S[1],i=[];for(var A=t;A<=S;++A){var E=s(A);i.push(E)}var I=new aZ(i);if(i=c.Eb()<l(),A=c.R(),i||A){var k=Math.max(t,S+1);I.Vd(p,function(){var e=c.jb();I.Za(e);var t=v(u());t.next(),t=t.next().value;for(var n=[];k<=t;){var i=s(k);n.push(i),k++}return e>l()&&!n.length?null:n})}return Promise.resolve(I)}(c,l,a,u,o,s)}};var d=null;r=r=null,t.na.id&&t.J.id&&(r=i[r=t.na.id+","+t.J.id])&&(d=r.segmentIndex);var h=t.X.start,f=t.X.duration?h+t.X.duration:1/0,p=!(t.sb&&t.X.He);return d?(ch(i=d,l,h,f,p),i.Za(t.presentationTimeline.jb())):d=new cd(l,t.J.id,t.bandwidth,t.J.za,h,f,u,p,s),l.timeline&&"image"!==t.fa.contentType&&t.presentationTimeline.Wf(l.timeline,h),r&&t.sb&&(r.segmentIndex=d),{Zb:function(){return d instanceof cd&&0==d.Db()&&ch(d,l,h,f,p),Promise.resolve(d)}}}(n,b,t.l,!!t.i,t.g.dash.initialSegmentLimit,t.K,y);else{var N=n.J.za,L=n.X.duration||0;R={Zb:function(){return Promise.resolve(a0(p,L,N))}}}}catch(e){if((m||g)&&4002==e.code)return null;throw e}b=function(e,t,n,i){var r=lZ(e,n,i);
10if(t.Kf)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==r.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=r.drmInfos),t.Kf=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(e){return r.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==t.drmInfos.length))throw new tr(2,4,4008);return r.Gf||t.Gf}(b=iK(c,"ContentProtection"),i,t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),b=new Set(b?[b]:[]);var P=!1;iK(c,"SupplementalProperty").some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")})&&(P=!0);var _=!1;if(m&&(_=u.includes("forced_subtitle")||u.includes("forced-subtitle")),g&&((c=iK(c,"EssentialProperty").find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))}))&&(h=c.getAttribute("value")),!h))return null;c=n.J.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(c.includes("hvc1.2.4.L153.B0")||c.includes("hev1.2.4.L153.B0"))&&(f="PQ");var O=(c=n.J.id?n.na.id+","+n.J.id:"")&&t.l[c]?t.l[c]:{id:t.H++,originalId:n.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){O.segmentIndex&&(O.segmentIndex.release(),O.segmentIndex=null)},segmentIndex:null,mimeType:n.J.mimeType,codecs:n.J.codecs,frameRate:n.J.frameRate,pixelAspectRatio:n.J.pixelAspectRatio,bandwidth:n.bandwidth,width:n.J.width,height:n.J.height,kind:r,encrypted:0<i.drmInfos.length,drmInfos:i.drmInfos,keyIds:b,language:a,originalLanguage:n.fa.language,label:o,type:n.fa.contentType,primary:s,trickModeVideo:null,emsgSchemeIdUris:n.J.emsgSchemeIdUris,roles:u,forced:_,channelsCount:n.J.Nd,audioSamplingRate:n.J.audioSamplingRate,spatialAudio:P,closedCaptions:l,hdr:f,tilesLayout:h,matchedStreams:[],accessibilityPurpose:d,external:!1};return O.createSegmentIndex=function(){var e;return F(function(t){if(1==t.g)return O.segmentIndex?t.B(0):(e=O,M(t,R.Zb(),3));e.segmentIndex=t.h,C(t)})},c&&n.sb&&!t.l[c]&&(t.l[c]=O),O}(t,n,S,u,A,E,a,s,m,i,g))&&(i.hdr=i.hdr||p),i}).filter(function(e){return!!e})).length){if(o="image"==n.fa.contentType,t.g.dash.ignoreEmptyAdaptationSet||l||o)return null;throw new tr(2,4,4003)}if(!n.fa.contentType||"application"==n.fa.contentType)for(n.fa.contentType=cz(i[0].mimeType,i[0].codecs),h=(l=v(i)).next();!h.done;h=l.next())h.value.type=n.fa.contentType;for(l=n.fa.id||"__fake__"+t.H++,h=(d=v(i)).next();!h.done;h=d.next()){for(h=h.value,b=(f=v(S.drmInfos)).next();!b.done;b=f.next())(b=b.value).keyIds=b.keyIds&&h.keyIds?new Set([].concat(y(b.keyIds),y(h.keyIds))):b.keyIds||h.keyIds;t.g.dash.enableAudioGroups&&(h.groupId=l)}return c=c.map(function(e){return e.getAttribute("id")}).filter(tu),{id:l,contentType:n.fa.contentType,language:A,Ki:a,streams:i,drmInfos:S.drmInfos,tf:o,Eh:c}}(t,n,i)}).filter(tu),n.sb){for(r=[],o=(a=v(i)).next();!o.done;o=a.next()){o=v(o.value.Eh);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new tr(2,4,4018)}for(r=i.filter(function(e){return!e.tf}),i=i.filter(function(e){return e.tf}),a=(i=v(i)).next();!a.done;a=i.next()){o=(a=a.value).tf.split(" "),s=v(r);for(var u=s.next();!u.done;u=s.next()){var l=u.value;if(o.includes(l.id)){u={},l=v(l.streams);for(var c=l.next();!c.done;u={ld:u.ld},c=l.next())u.ld=c.value,u.ld.trickModeVideo=a.streams.find(function(e){return function(t){return tw(e.ld.codecs)==tw(t.codecs)}}(u))}}}if(a=t.g.disableAudio?[]:cH(r,"audio"),s=t.g.disableVideo?[]:cH(r,"video"),o=t.g.disableText?[]:cH(r,tf),i=t.g.disableThumbnails?[]:cH(r,"image"),!s.length&&!a.length)throw new tr(2,4,4004);for(r=[],u=(a=v(a)).next();!u.done;u=a.next())r.push.apply(r,y(u.value.streams));for(a=[],u=(s=v(s)).next();!u.done;u=s.next())a.push.apply(a,y(u.value.streams));for(s=[],u=(o=v(o)).next();!u.done;u=o.next())s.push.apply(s,y(u.value.streams));for(o=[],u=(i=v(i)).next();!u.done;u=i.next())o.push.apply(o,y(u.value.streams));return{id:n.na.id,audioStreams:r,videoStreams:a,textStreams:s,imageStreams:o}}(t,n,i,{start:d,duration:p,node:l,He:null==p||!c}),o.push(s),n.na.id&&p&&(t.K[n.na.id]=p),null==p){s=null;break}s=d+p}}return t.I=o.map(function(e){return e.id}),null!=a?{periods:o,duration:a,If:!1}:{periods:o,duration:s,If:!0}}(t,R={sb:"static"!=x,presentationTimeline:T,na:null,X:null,fa:null,J:null,bandwidth:0,Pf:!1,Wb:c,profiles:(n.getAttribute("profiles")||"").split(",")},l,n)).duration,O=P.periods,"static"!=x&&P.If||T.Ja(_||1/0),t.m&&!t.o&&t.h.isAutoLowLatencyMode()&&(t.h.enableLowLatencyMode(),t.o=t.h.isLowLatencyMode()),t.o?T.dg(t.m):t.m&&ee("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),T.Ue(w||1),M(B,t.j.Df(O,R.sb),2);case 2:if(t.o&&(h=0),t.o&&t.m&&(t.C=t.m),t.i){t.i.variants=t.j.j,0<(U=t.j.Ee()).length&&(t.i.textStreams=U),t.i.imageStreams=t.j.h,t.h.filter(t.i),B.B(3);break}var V,H,K,q,G,z,X,W,Y,$,J,Q=T,Z=t.j.j,et=t.j.Ee(),en=t.j.h,ei=h||0,er=t.g.dash.sequenceMode,ea=iV(n,"ServiceDescription");if(ea){var eo=iV(ea,"Latency");ea=iV(ea,"PlaybackRate"),eo=eo&&eo.getAttribute("max")||ea?{maxLatency:eo=eo&&eo.getAttribute("max")?parseInt(eo.getAttribute("max"),10)/1e3:null,maxPlaybackRate:ea=ea?parseFloat(ea.getAttribute("max")):null}:null}else eo=null;if(t.i={presentationTimeline:Q,variants:Z,textStreams:et,imageStreams:en,offlineSessionIds:[],minBufferTime:ei,sequenceMode:er,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:eo},!T.ng()){B.B(4);break}return M(B,(V=t,H=l,K=iK(n,"UTCTiming"),F(function(e){switch(e.g){case 1:q=K.map(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}),G=V.g.dash.clockSyncUri,!q.length&&G&&q.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:G}),X=(z=v(q)).next();case 2:if(X.done){e.B(4);break}switch(W=X.value,D(e,5),Y=W.scheme,$=W.value,Y){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return e.B(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return e.B(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return J=Date.parse($),e.return(isNaN(J)?0:J-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ee("NTP UTCTiming scheme is not supported");break;default:ee("Unrecognized scheme in UTCTiming element",Y)}e.B(9);break;case 7:return M(e,cG(V,H,$,"HEAD"),10);case 10:case 11:return e.return(e.h);case 8:return M(e,cG(V,H,$,"GET"),11);case 9:N(e,3);break;case 5:L(e);case 3:X=z.next(),e.B(2);break;case 4:return ee("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),e.return(0)}})),5);case 5:if(j=B.h,!t.h)return B.return();T.eg(j);case 4:T.Id();case 3:t.h.makeTextStreamsForClosedCaptions(t.i),C(B)}})}function cH(e,t){return e.filter(function(e){return e.contentType==t})}function cK(e,t){0>e.C||e.F.U(Math.max(e.C-t,$(e.G)))}function cq(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Nd:null,audioSamplingRate:null,Wb:0},n=n||t.za;var i=iK(e,"BaseURL"),r=i.map(iX),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=iY(e,"frameRate",i3)||t.frameRate,l=e.getAttribute("sar")||t.pixelAspectRatio,c=iK(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice();c=v(c);for(var h=c.next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);c=function(e){e=v(e);for(var t=e.next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;
10case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(c=iK(e,"AudioChannelConfiguration"))||t.Nd,h=iY(e,"audioSamplingRate",i1)||t.audioSamplingRate,a||(a=cz(o,s));var f=iV(e,"SegmentBase"),p=iV(e,"SegmentTemplate"),g=f&&iY(f,"availabilityTimeOffset",i2)||0,m=p&&iY(p,"availabilityTimeOffset",i2)||0;return i=i&&i.length&&iY(i[0],"availabilityTimeOffset",i2)||0,i=t.Wb+i+g+m,{za:tl(n,r),bd:f||t.bd,xb:iV(e,"SegmentList")||t.xb,cd:p||t.cd,width:iY(e,"width",i1)||t.width,height:iY(e,"height",i1)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:l,emsgSchemeIdUris:d,id:e.getAttribute("id"),language:e.getAttribute("lang"),Nd:c,audioSamplingRate:h,Wb:i}}function cG(e,t,n,i){var r,a,o,s,u;return F(function(l){if(1==l.g)return(r=n5(tl(t,[n]),e.g.retryParameters)).method=i,a=e.h.networkingEngine.request(4,r),n2(e.A,a),M(l,a.promise,2);if(o=l.h,"HEAD"==i){if(!o.headers||!o.headers.date)return l.return(0);s=o.headers.date}else s=ih(o.data);return isNaN(u=Date.parse(s))?l.return(0):l.return(u-Date.now())})}function cz(e,t){return tI(t=tv(e,t))?tf:e.split("/")[0]}function cX(e,t,n,i){return t=e.h.networkingEngine.request(n,t,i),n2(e.A,t),t.promise}function cW(){}(b=cB.prototype).configure=function(e){this.g=e},b.start=function(e,t){var n,i=this;return F(function(r){if(1==r.g)return i.o=t.isLowLatencyMode(),i.s=[e],i.h=t,M(r,cF(i),2);if(n=r.h,i.h&&cK(i,n),!i.h)throw new tr(2,7,7001);return r.return(i.i)})},b.stop=function(){for(var e=v(Object.values(this.l)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.j&&this.j.release(),this.g=this.h=null,this.s=[],this.i=null,this.l={},this.j=null,null!=this.F&&(this.F.stop(),this.F=null),this.A.destroy()},b.update=function(){var e,t=this;return F(function(n){return 1==n.g?(D(n,2),M(n,cF(t),4)):2!=n.g?N(n,0):(e=L(n),t.h&&e)?void(t.h.onError(e),C(n)):n.return()})},b.onExpirationUpdated=function(){},W("shaka.dash.DashParser",cB),rM.mpd=function(){return new cB},rk["application/dash+xml"]=function(){return new cB},rk["video/vnd.mpeg.dash.mpd"]=function(){return new cB},W("shaka.dependencies",cW),cW.has=function(e){return cJ.has(e)},cW.add=function(e,t){if(!c$[e])throw Error(e+" is not supported");e==cY?nE("mux.js","mux.js is no longer used in Shaka Player."):cJ.set(e,function(){return t})};var cY="muxjs",c$={Li:cY,ISOBoxer:"ISOBoxer"};cW.Allowed=c$;var cJ=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function cQ(e,t){return e.filter(function(e){return e.name==t})}function cZ(e,t){return e.filter(function(e){return c8(e,"TYPE")==t})}function c0(e,t){return(e=cQ(e,t)).length?e[0]:null}function c1(e,t,n){return n=void 0===n?0:n,(e=c0(e,t))?Number(e.value):n}function c2(e,t){return tl([e],[t])[0]}function c4(e,t,n,i){this.h=e,this.type=t,this.g=n,this.segments=i||null}function c3(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function c5(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function c8(e,t){if(!(e=e.getAttribute(t)))throw new tr(2,4,4023,t);return e.value}function c6(e,t,n,i){i=void 0===i?[]:i,this.g=n,this.l=null,this.j=e,this.m=t,this.h=i}function c9(e,t){this.name=e,this.value=t}function c7(e){this.h=e||"",this.g=0}function de(e){dt(e,/[ \t]+/gm)}function dt(e,t){return(t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g)?null:(e.g+=t.length,t.results)}function dn(e){return e.g==e.h.length?null:(e=dt(e,/[^ \t\n]*/gm))?e[0]:null}function di(){this.g=0}function dr(e,t,n){var i=(t=(t=ih(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new tr(2,4,4015);t=0;for(var r=!0,a=v(i),o=a.next();!o.done;o=a.next())if(o=o.value,/^#(?!EXT)/m.test(o)||r)r=!1;else if(o=da(e,o),--e.g,ds.includes(o.name)){t=1;break}else"EXT-X-STREAM-INF"==o.name&&(r=!0);for(o=0,a=[],r=!0;o<i.length;o++){var s=i[o],u=i[o+1];if(/^#(?!EXT)/m.test(s)||r)r=!1;else{if(s=da(e,s),du.includes(s.name)){if(1!=t)throw new tr(2,4,4017);var l=i.splice(o,i.length-o);i=n,r=[],o=[],u=[],s=null,l=v(l);for(var c=l.next();!c.done;c=l.next())c=c.value,/^(#EXT)/.test(c)?(c=da(e,c),ds.includes(c.name)?a.push(c):"EXT-X-MAP"==c.name?s=c:"EXT-X-PART"==c.name?u.push(c):"EXT-X-PRELOAD-HINT"
10==c.name?"PART"==c5(c,"TYPE")?u.push(c):"MAP"==c5(c,"TYPE")&&(c.name="EXT-X-MAP",s=c):o.push(c)):/^#(?!EXT)/m.test(c)||(c=c.trim(),s&&o.push(s),r.push(new c6(i,c,o,u)),o=[],u=[]);return u.length&&(s&&o.push(s),r.push(new c6("","",o,u))),new c4(n,t,a,r)}a.push(s),"EXT-X-STREAM-INF"==s.name&&(s.g.push(new c9("URI",u)),r=!0)}}return new c4(n,t,a)}function da(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new tr(2,4,4016,t);t=n[1];var i=n[2];if(n=[],i){(a=dt(i=new c7(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var r,a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=dt(i,o);)n.push(new c9(a[1],a[2]||a[3])),de(i)}return new c3(e,t,n,r)}c3.prototype.toString=function(){var e="#"+this.name,t=this.g?this.g.map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},c3.prototype.getAttribute=function(e){var t=this.g.filter(function(t){return t.name==e});return t.length?t[0]:null},p.Object.defineProperties(c6.prototype,{i:{configurable:!0,enumerable:!0,get:function(){return!this.l&&this.j&&this.m&&(this.l=c2(this.j,this.m),this.m=this.j=null),this.l||""}}});var ds="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),du="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function dl(){}function dc(e){try{var t=dd(e);return nz({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return nq(e)}}function dd(t){var n=t.split(":");if(2>n.length||"data"!=n[0]||2>(n=n.slice(1).join(":").split(",")).length)throw new tr(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),i=(n=i.split(";"))[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?i_(t):im(t),contentType:i}}function dh(){var e=this;this.g=this.i=null,this.Xa=1,this.s=new Map,this.A=new Map,this.G=new Map,this.G.set("video",new Map),this.G.set("audio",new Map),this.G.set(tf,new Map),this.G.set("image",new Map),this.ja=new Set,this.h=new Map,this.j=null,this.N="",this.Z=new di,this.C=-1,this.K=1/0,this.fb=!1,this.m=new tV(function(){var t,n,i,r,a,o;t=e,F(function(e){switch(e.g){case 1:if(!t.i)return e.return();return D(e,2),n=Date.now(),M(e,t.update(),4);case 4:i=Date.now(),dB(t)&&(r=(i-n)/1e3,t.wa.sample(1,r),a=Math.max(0,t.l-$(t.wa)),t.m.U(a)),N(e,3);break;case 2:if(o=L(e),!t.i)return e.return();if(t.g.raiseFatalErrorOnManifestUpdateRequestFailure)return t.i.onError(o),e.return();o.severity=1,t.i.onError(o),t.m.U(.1);case 3:if(!t.i)return e.return();t.i.onManifestUpdated(),C(e)}})}),this.da=dG,this.F=null,this.ca=0,this.l=1/0,this.W=this.V=this.H=0,this.I=new n1,this.M=new Map,this.u=new Map,this.ba=new Map,this.eb=this.o=!1,this.wa=new Y(5)}function df(e,t){return dB(e)?e.G.get(t.type):t.Jd}function dp(e,t,n){t.Jb+=n,t.kb+=n,t=v(e=df(e,t));for(var i=t.next();!i.done;i=t.next()){var r=v(i.value);i=r.next().value,r=r.next().value,e.set(i,r+n)}}function dg(e){if(dB(e)){if(e.da==dX){for(var t,n=t=1/0,i=v(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&(t=Math.min(t,r.kb),n=Math.min(n,r.Jb));t-=n,e.g.hls.useSafariBehaviorForLive&&(t=e.j.m),isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.j.Td(t)}}else e.j.Ja(dx(e));e.j.Id()}function dm(e,t){var n=new Map;t=v(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=c5(r,"NAME");var a=c5(r,"VALUE");r=c5(r,"IMPORT"),i&&a&&n.set(i,a),r&&(i=e.s.get(r))&&n.set(r,i)}return n}function dv(e,t){var n=[];return e.g.disableVideo||n.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||n.push(e.g.hls.defaultAudioCodec),dy(e=c5(t,"CODECS",n.join(",")).split(/\s*,\s*/))}function dy(e){var t=new Set,n=[];e=v(e);for(var i=e.next();!i.done;i=e.next()){var r=tS(i=i.value)[0];t.has(r)||(n.push(i),t.add(r))}return n}function db(e,t){var n=c8(t,"GROUP-ID"),i="",r=c8(t,"TYPE").toLowerCase();"subtitles"==r&&(r=tf);var a=r;if(a==tf?i=c5(t,"CODECS")||"":n&&e.u.has(n)&&(i=e.u.get(n)),r=dP(c8(t,"URI"),e.s),e.h.has(r))return e.h.get(r);var o=c5(t,"LANGUAGE"),s=c5(t,"NAME"),u="YES"==c5(t,"DEFAULT"),l="audio"==a&&(l=c5(t,"CHANNELS"))?parseInt(l.split("/")[0],10):null,c="audio"==a&&!!(c=c5(t,"CHANNELS"))&&c.includes("/JOC"),d=c
105(t,"CHARACTERISTICS"),h="YES"==c5(t,"FORCED");return(t="audio"==a&&(t=c5(t,"SAMPLE-RATE"))?parseInt(t,10):null,i=dw(e,r,i,a,o,u,s,l,null,d,h,t,c),e.A.has(n)?e.A.get(n).push(i):e.A.set(n,[i]),e.h.has(r))?e.h.get(r):(e.h.set(r,i),i)}function dw(e,t,n,i,r,a,o,s,u,l,c,d,h){var f=c2(e.N,t),p=dI(e,n,i,r,a,o,s,u,l,c,d,h),g={stream:p,type:i,dd:t,nd:f,Jb:0,kb:0,Jd:new Map,qd:!1,pd:!1,Pc:!1,me:-1,Sa:-1,Ta:-1,Ne:!1},m=null,y=new AbortController;return p.createSegmentIndex=function(){return m||(y=new AbortController,m=new Promise(function(f){var m,b,w,x,T,S,A,E,I,k,D,R,N,L;f((m=y.signal,F(function(f){if(1==f.g)return M(f,dj(e,g.nd,!0),2);if(3!=f.g)return(b=f.h,m.aborted)?f.return():(w=b.uri,x=dr(e.Z,b.data,w),T=dB(e),M(f,dA(e,x,t,w,n,i,r,a,o,s,u,l,c,d,h),3));if(S=f.h,m.aborted)return f.return();if(A=S.stream,dB(e)&&!T&&dD(e,x),g.nd=w,g.Jb=S.Jb,g.kb=S.kb,g.qd=S.qd,g.pd=S.pd,g.Pc=S.Pc,g.Jd=S.Jd,g.Sa=S.Sa,g.Ta=S.Ta,g.Ne=!0,p.segmentIndex=A.segmentIndex,p.encrypted=A.encrypted,p.drmInfos=A.drmInfos,p.keyIds=A.keyIds,p.mimeType=A.mimeType,p.bandwidth=A.bandwidth,p.drmInfos.length&&e.i.newDrmInfo(p),i==(E=tp).ka||i==E.T)for(k=(I=v(e.h.values())).next();!k.done;k=I.next())(D=k.value).Ne||D.type!=i||(D.stream.mimeType=A.mimeType);i==E.ea&&(R=A.segmentIndex.get(0))&&R.h&&(p.mimeType="application/mp4"),function(e){if(!e.F)return!1;var t=[],n=[];e=v(e.F.variants);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return(!(0<t.length)||!!t.some(function(e){return e.segmentIndex}))&&(!(0<n.length)||!!n.some(function(e){return e.segmentIndex}))}(e)&&(e.fb?dS(e,[g]):(e.fb=!0,N=Array.from(e.h.values()).filter(function(e){return e.stream.segmentIndex}),dS(e,N),dg(e),0<(L=e.l)&&e.m.U(L))),C(f)})))}))},p.closeSegmentIndex=function(){m&&!p.segmentIndex&&y.abort(),p.segmentIndex&&(p.segmentIndex.release(),p.segmentIndex=null),m=null},g}function dx(e){var t=1/0;e=v(e.h.values());for(var n=e.next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&(t=Math.min(t,n.kb));return t}function dT(e,t){var n=[];t=v(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&function(e,t){e=v(e.g);for(var n=e.next();!n.done;n=e.next())t(n.value)}(i.segmentIndex,function(e){n.push(e)});e.j.Vc(n)}function dS(e,t){if(!dB(e))for(var n=dx(e),i=v(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Xb(0,n);dT(e,t.map(function(e){return e.stream})),e.g.hls.ignoreManifestProgramDateTime?function(e,t){for(var n=-1==e.C,i=v(t),r=i.next();!r.done;r=i.next()){var a=(r=r.value).stream.segmentIndex,o=df(e,r);if(a=a.g[0]||null){o=v(o);for(var s=o.next();!s.done;s=o.next()){var u=(s=v(s.value)).next().value;if(s.next().value==a.startTime){n&&(e.C=Math.max(e.C,u)),r.me=u;break}}}}if(!(0>e.C))for(r=(t=v(t)).next();!r.done;r=t.next())(i=(n=r.value).stream.segmentIndex)&&(i.g.splice(0,e.C-n.me),(i=i.g[0]||null)&&(i=-i.startTime,n.stream.segmentIndex.offset(i),dp(e,n,i)))}(e,t):function(e,t){if(1/0==e.K){t=v(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value.stream.segmentIndex.g[0]||null;null!=i&&null!=i.g&&(e.K=Math.min(e.K,i.g))}}if(1/0!=(t=e.K))for(n=(i=v(e.h.values())).next();!n.done;n=i.next()){var r=(n=n.value).stream.segmentIndex;if(null!=r){var a=r.g[0]||null;if(null==a.g)Z("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.dd,"Expect AV sync issues!");else for(dp(e,n,a.g-t-a.startTime),r=(n=v(r)).next();!r.done;r=n.next())r.value.nf(t)}}}(e,t)}function dA(e,t,n,i,r,a,o,s,u,l,c,d,h,f,p,g){var m,v,y,b,w,x,T,S,A,E,I,k,C,D,R,N,L,P,_,O;return F(function(U){if(1==U.g){if(1!=t.type)throw new tr(2,4,4017);m=dm(e,cQ(t.g,"EXT-X-DEFINE"));var j,B,V,H,K,q,G,z,X,W,Y,$,J=c0(t.g,"EXT-X-PLAYLIST-TYPE"),Q=c0(t.g,"EXT-X-ENDLIST");return Q=J&&"VOD"==J.value||Q,J=J&&"EVENT"==J.value&&!Q,J=!Q&&!J,Q?dF(e,dG):J?dF(e,dX):dF(e,dz),dB(e)&&dC(e,t),g?U.B(2):M(U,(j=e,B=a,V=r,H=t,K=m,F(function(e){return 1==e.g?(q=n9,G=Math.trunc((H.segments.length-1)/2),z=dP(H.segments[G].i,K),X=new e0(z).ya.split(".").pop(),(W=dK[B][X])||(W=dH[X])||(W=d_(B,V)))?e.return(W):((Y=n5([z],j.g.retryParameters)).method="HEAD",M(e,dV(j,Y,q,{type:1}),2)):($=e.h.headers["content-type"])?e.return($.split(";")[0]):e.return(dO(B))})),3)}if(2!=U.g&&(g=U.h),y=(v=dk(t,g)).drmInfos,b=v.keyIds,w=v.encrypted,x=v.ug,w&&!y.length&&!x)throw new tr(2,4,4026);return T=dB(e)?e.G.get(a):new Map,A=(S=dL(e,t,a,g,T,m)).segments,E=S.bandwidth,dB(e)&&dC(e,t),I=A[0].startTime,k=A[A.length-1].endTime,C=new aZ(A),R=!!(D=c0(t.g,"EXT-X-SERVER-CONTROL"))&&null!=D.getAttribute("CAN-SKIP-UNTIL"),N=!!D&&null!=D.getAttribute("CAN-BLOCK-RELOAD"),P=(L=dE(c1(t.g,"EXT-X-MEDIA-SEQUENCE",0),A)).Sa,_=L.Ta,(O=dI(e,r,a,o,s,u,l,c,d,h,f,p)).segmentIndex=C,O.encrypted=w,O.drmInfos=y,O.keyIds=b,O.mimeType=g,O.bandwidth=E,U.return({stream:O,type:a,dd:n,nd:i,Jb:I,kb:k,qd:R,pd:N,Pc:!1,me:-1,Sa:P,Ta:_,Jd:T,Ne:!1})})}function dE(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Sa:++e,Ta:n};var i=(t=t[t.length-1]).i;return t.i.length?(n=i.length-1,i[i.length-1].m||(e++,n=0)):(e++,t.o&&(n=0)),{Sa:e,Ta:n}}function dI(e,t,n,i,r,a,o,s,u,l,c,d){var h=d_(n,t)||dO(n),f=[];if(u){u=v(u.split(","));for(var p=u.next();!p.done;p=u.next())f.push(p.value)}return u=n==tf?"subtitle":void 0,f.length||"subtitle"!==u||f.push("subtitle"),{id:e.Xa++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==tf?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:tL(i||"und"),originalLanguage:i,label:a,type:n,primary:r,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:f,forced:l,channelsCount:o,audioSamplingRate:c,spatialAudio:d,closedCaptions:s,hdr:void 0,tilesLayout:void 0,accessibilityPurpose:null,external:!1}}function dk(e,t){var n=[];if(e.segments){e=v(e.segments);for(var i=e.next();!i.done;i=e.next())i=cQ(i.value.g,"EXT-X-KEY"),n.push.apply(n,y(i))}i=e=!1;var r=[],a=new Set;n=v(n);for(var o=n.next();!o.done;o=n.next()){var s=c8(o=o.value,"METHOD");if("NONE"!=s){if(e=!0,"AES-128"==s)i=!0;else if(o=(s=dq[s=c5(o,"KEYFORMAT")||"identity"])?s(o,t):null){if(o.keyIds){s=v(o.keyIds);for(var u=s.next();!u.done;u=s.next())a.add(u.value)}r.push(o)}}}return{drmInfos:r,keyIds:a,encrypted:e,ug:i}}function dM(t,n,i){if(!e.crypto||!e.crypto.subtle)throw ee("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new tr(2,4,4042);
10var r=0,a=c5(n,"IV","");if(a){var o=iO(a.substr(2));if(16!=o.byteLength)throw new tr(2,4,4048)}else r=c1(i.g,"EXT-X-MEDIA-SEQUENCE",0);var s=n5([n=c2(i.h,c8(n,"URI"))],t.g.retryParameters),u={method:"AES-128",iv:o,firstMediaSequenceNumber:r,fetchKey:function(){var n,i,r;return F(function(a){if(1==a.g)return M(a,dV(t,s,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new tr(2,4,4049);return i={name:"AES-CBC"},r=u,M(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,u.fetchKey=void 0,C(a)})}};return u}function dC(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=c0(i[r].g,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=c0(t.g,"EXT-X-TARGETDURATION")))throw new tr(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=c0(t.g,"EXT-X-PART-INF"))&&(e.H=Number(c8(r,"PART-TARGET"))),t=c0(t.g,"EXT-X-SERVER-CONTROL"),e.o&&e.H?(e.l=e.eb?5*e.H<=n?Math.min(e.H,e.l):Math.min(n,e.l):Math.min(e.H,e.l),e.W=t?Number(c8(t,"PART-HOLD-BACK")):0):(e.l=Math.min(n,e.l),n=t?t.getAttribute("HOLD-BACK"):null,e.V=n?Number(n.value):0),e.ca=Math.max(i,e.ca)}function dD(e,t){if(e.g.defaultPresentationDelay)t=e.g.defaultPresentationDelay;else if(e.W)t=e.W;else if(e.V)t=e.V;else{t=t.segments.length;var n=e.g.hls.liveSegmentsDelay;n>t-2&&(n=Math.max(1,t-2)),t=e.ca*n}e.j.gg(0),e.j.fg(t),e.j.ic(!1)}function dR(e,t,n,i){var r=c0(n,"EXT-X-MAP");if(!r)return null;var a=c8(r,"URI");if(i=[a=dP(c2(t.h,a),i),c5(r,"BYTERANGE","")].join("-"),!e.ba.has(i)){var o,s,u,l,c,d=void 0;n=v(n);for(var h=n.next();!h.done;h=n.next())"EXT-X-KEY"==(h=h.value).name&&"AES-128"==c8(h,"METHOD")&&h.id<r.id&&(d=dM(e,h,t));o=a,s=r,u=d,l=0,c=null,(s=c5(s,"BYTERANGE"))&&(c=Number((l=s.split("@"))[0]),c=(l=Number(l[1]))+c-1,u&&(s=c+1-l)%16&&(c+=16-s%16)),t=new rR(function(){return[o]},l,c,null,null,null,u),e.ba.set(i,t)}return e.ba.get(i)}function dN(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.pa+1)+t-1),[n,i]}function dL(t,n,i,r,a,o){var s=n.segments,u=void 0,l=c1(n.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),c=c1(n.g,"EXT-X-MEDIA-SEQUENCE",0),d=c0(n.g,"EXT-X-SKIP"),h=d?Number(c5(d,"SKIPPED-SEGMENTS")):0,f=c+h,p=0;dB(t)&&a.has(f)&&(p=a.get(f));var g=[],m=null;d=[];for(var y=0;y<s.length;y++){var b=s[y],w=0==y?p:m.endTime;f=c+h+y,c0(b.g,"EXT-X-DISCONTINUITY")&&l++;for(var x=v(b.g),T=x.next();!T.done;T=x.next())"EXT-X-KEY"==(T=T.value).name&&(u="AES-128"==c8(T,"METHOD")?dM(t,T,n):void 0);a.set(f,w),x=dR(t,n,b.g,o),!t.o&&t.i.isAutoLowLatencyMode()&&(t.i.enableLowLatencyMode(),t.o=t.i.isLowLatencyMode()),(w=function(t,n,i,r,a,o,s,u,l,c){var d=r.g,h=c0(d,"EXTINF"),f=0,p=0,g=null;r.h.length&&!t.o&&ee("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var m=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=c0(d,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(m=i$(y.value))}var b=rL;if(c0(d,"EXT-X-GAP")&&(b=2),!h){if(0==r.h.length)throw new tr(2,4,4024,"EXTINF");if(!t.o)return null}var w=[];y=!1;var x=null,T=!1,S=!1;if(t.o&&r.h.length){f=("video/mp4"==l||"audio/mp4"==l)&&e.ReadableStream,l=m;for(var A={},E=0;E<r.h.length;A={sc:A.sc,jd:A.jd},E++){var I=r.h[E],k=0==E?i:w[w.length-1],M=0==E?a:k.endTime,C=Number(c5(I,"DURATION"))||t.H;if(C){var D=M+C,R=0,N=null;if("EXT-X-PRELOAD-HINT"==I.name?(R=(R=c5(I,"BYTERANGE-START"))?Number(R):0,(k=c5(I,"BYTERANGE-LENGTH"))?N=R+Number(k)-1:R&&(N=Number.MAX_SAFE_INTEGER)):(R=(N=v(dN(k,R=c5(I,"BYTERANGE")))).next().value,N=N.next().value),A.jd=c5(I,"URI"),A.jd){k=rL,"YES"==c5(I,"GAP")&&(k=2,T=!0),A.sc=null;var L=function(e){return function(){return null==e.sc&&(e.sc=c2(s,e.jd)),[e.sc]}}(A);f&&0<=R&&null!=N&&(x=L,y=!0),M=new rN(M,D,L,R,N,n,0,0,1/0,[],"",null,l,k,c),"EXT-X-PRELOAD-HINT"==I.name&&(M.Pe(),S=!0),"YES"!=c5(I,"INDEPENDENT")&&0<E&&M.Tf(),w.push(M),l&&(l+=C)}}}}if(h){if(0==(h=Number(h.value.split(",")[0])))return null;f=a+h}else{if(!w.length)return null;f=w[w.length-1].endTime}y&&(T||0!=w[0].Ka?(y=!1,x=null):w=[]),(h=c0(d,"EXT-X-BYTERANGE"))?(p=(g=v(dN(i,h.value))).next().value,g=g.next().value):w.length&&(p=w[0].Ka,g=w[w.length-1].pa),i="",h=null,"image"==u&&(i="1x1",u=c0(d,"EXT-X-TILES"))&&(i=c8(u,"LAYOUT"),(u=c5(u,"DURATION"))&&(h=Number(u)));var P=null;return n=new rN(a,f,function(){return x?x():(null==P&&(P=dP(r.i,o)),P.length?[P]:[])},p,g,n,0,0,1/0,w,i,h,m,b,c),y&&(t.eb=!0,n.Sf(),S&&n.Pe()),n}(t,x,m,b,w,o,n.h,i,r,u))&&((m=c1(b.g,"EXT-X-BITRATE"))?d.push({bitrate:m,duration:w.endTime-w.startTime}):d.length&&(m=d.pop(),m.duration+=w.endTime-w.startTime,d.push(m)),m=w,w.l=l,t.g.hls.ignoreManifestProgramDateTime&&null!=t.C&&f<t.C||g.push(w))}if(n=void 0,d.length&&(n=d.reduce(function(e,t){return e+t.duration},0),n=Math.round(d.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),d=g.some(function(e){return null!=e.g})){for(i={},r=0;r<g.length;i={oc:i.oc,nc:i.nc,ed:i.ed,pb:i.pb,mc:i.mc},r++)if(i.pb=g[r],null==i.pb.g)for(i.nc=0,i.oc=r,a=function(e){return function(){var t=g[e.oc];if(t){if(null!=t.g)return t.g+e.nc;e.nc-=t.endTime-t.startTime,e.oc+=1}return null}}(i),i.mc=0,i.ed=r,o=function(e){return function(){var t=g[e.ed];if(t){if(t!=e.pb&&(e.mc+=t.endTime-t.startTime),null!=t.g)return t.g+e.mc;--e.ed}return null}}(i);null==i.pb.g;)i.pb.g=o(),null==i.pb.g&&(i.pb.g=a())}if(d)for(r=(i=v(g)).next();!r.done;r=i.next())for(r=(a=r.value).g,o=(a=v(a.i)).next();!o.done;o=a.next())(o=o.value).g=r,r+=o.endTime-o.startTime;if(t=t.K,d&&1/0!=t)for(r=(d=v(g)).next();!r.done;r=d.next())r.value.nf(t);return{segments:g,bandwidth:n}}function dP(e,t){if(!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n){n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(a)e=e.replace(i,a);else throw new tr(2,4,4039,r)}}return e}function d_(e,t){if(e==tf){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":null:"image/jpeg"}function dO(e){return e==tf?"text/vtt":dK[e].mp4}function dU(e,t,n,i,r){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0)}function dj(e,t,n){return dV(e,n5([t],e.g.retryParameters),0,{type:n?2:3})}function dB(e){return e.da!=dG}function dF(e,t){e.da=t,e.j&&e.j.ic(!dB(e)),dB(e)||e.m.stop()}function dV(e,t,n,i){if(!e.I)throw new tr(2,7,7001);return t=e.i.networkingEngine.request(n,t,i),n2(e.I,t),t.promise}W("shaka.net.DataUriPlugin",dl),dl.parse=dc,n3("data",dc),(b=dh.prototype).configure=function(e){this.g=e},b.start=function(e,t){var n,i=this;return F(function(r){var a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S,A,E,I,k,R,N,P,_,O,U,j,B,V,H,K;
10return 1==r.g?(i.i=t,i.o=t.isLowLatencyMode(),M(r,dj(i,e),2)):3!=r.g?(n=r.h,i.N=n.uri,M(r,(a=i,o=n.data,s=e,F(function(e){switch(e.g){case 1:l=cQ((u=dr(a.Z,o,a.N)).g,"EXT-X-DEFINE");for(var t,n,i,r,q,G,z,X,W,Y,$,J,Q,Z,ee,et,en,ei,er,ea,eo=v(l),es=eo.next();!es.done;es=eo.next()){var eu=es.value;es=c5(eu,"NAME"),eu=c5(eu,"VALUE"),es&&eu&&(a.s.has(es)||a.s.set(es,eu))}if(c=[],d=[],h=[],1==u.type)return M(e,(t=a,n=u,F(function(e){if(1==e.g)return(q={type:(r=tx(i=t.g.hls.mediaPlaylistFullMimeType)).split("/")[0],mimeType:r,codecs:tT(i),language:null,height:null,width:null,channelCount:null,sampleRate:null},n.segments.length)?(G=n.segments[0],X=dH[z=new e0(G.i).ya.split(".").pop()])?e.return({type:"audio",mimeType:X,codecs:"",language:null,height:null,width:null,channelCount:null,sampleRate:null}):(W=[G.i],(Y=dR(t,n,G.g,new Map))&&(W=Y.Ca()),$=n9,J=n5(W,t.g.retryParameters),M(e,dV(t,J,$,{type:Y?0:1}),2)):e.return(q);if((Z=(Q=e.h).headers["content-type"])&&(Z=Z.split(";")[0].toLowerCase()),"ts"==z||"video/mp2t"==Z){var a=ef(Q.data),o=(new r7).parse(a);a=o.Kc(),o=o.Fe();var s=[],u=!1,l=!1;switch(a.audio){case"aac":s.push("mp4a.40.2"),u=!0;break;case"mp3":s.push("mp4a.40.34"),u=!0;break;case"ac3":s.push("ac-3"),u=!0;break;case"ec3":s.push("ec-3"),u=!0}switch(a.video){case"avc":o.aa?s.push(o.aa):s.push("avc1.42E01E"),l=!0;break;case"hvc":o.aa?s.push(o.aa):s.push("hvc1.1.6.L93.90"),l=!0}if(ee=s.length?{type:u&&!l?"audio":"video",mimeType:"video/mp2t",codecs:s.join(", "),language:null,height:o.height,width:o.width,channelCount:null,sampleRate:null}:null)return e.return(ee)}else if(("mp4"==z||"video/mp4"==Z||"audio/mp4"==Z)&&(et=function(e){function t(e){return n(e.name)}function n(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":i.push(e+".42E01E"),a=!0;break;case"hev1":case"hvc1":i.push(e+".1.6.L93.90"),a=!0;break;case"dvh1":case"dvhe":i.push(e+".05.04"),a=!0;break;case"vp09":i.push(e+".00.10.08"),a=!0;break;case"av01":i.push(e+".0.01M.08"),a=!0;break;case"mp4a":i.push("mp4a.40.2"),r=!0;break;case"ac-3":case"ec-3":case"opus":case"flac":i.push(e),r=!0}}var i=[],r=!1,a=!1,o=null,s=null,u=null,l=null,c=null;return((new iT).box("moov",iS).box("trak",iS).O("tkhd",function(e){s=String((e=rY(e.reader,e.version)).height),u=String(e.width)}).box("mdia",iS).O("mdhd",function(e){o=rX(e.reader,e.version).language}).box("minf",iS).box("stbl",iS).O("stsd",iA).box("mp4a",function(e){var n=e.reader;n.skip(6),n.skip(2),n.skip(8);var i=n.Ua();n.skip(2),n.skip(2),n.skip(2),n=n.Ua()+n.Ua()/65536,l=i,c=n,e.reader.oa()?iS(e):t(e)}).box("esds",function(e){e=function(e){var t="mp4a";return e.skip(11),{aa:t+="."+this.g(e.ua())+"."+this.g(e.ua()>>>2&63).replace(/^0/,"")}}(e.reader),i.push(e.aa),r=!0}).box("ac-3",t).box("ec-3",t).box("opus",t).box("Opus",t).box("fLaC",t).box("avc1",function(e){e=r$(e.reader,e.name),i.push(e.aa),a=!0}).box("avc3",function(e){e=r$(e.reader,e.name),i.push(e.aa),a=!0}).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vp09",t).box("av01",t).box("enca",iE).box("encv",iE).box("sinf",iS).box("frma",function(e){n(e=rJ(e.reader).aa)}).parse(e.data,!0),i.length)?{type:(e=r&&!a)?"audio":"video",mimeType:e?"audio/mp4":"video/mp4",codecs:dy(i).join(", "),language:o,height:s,width:u,channelCount:l,sampleRate:c}:null}(Q)))return e.return(et);return e.return(q)})),5);for(f=cQ(u.g,"EXT-X-MEDIA"),p=cQ(u.g,"EXT-X-STREAM-INF"),g=cQ(u.g,"EXT-X-IMAGE-STREAM-INF"),m=cQ(u.g,"EXT-X-SESSION-KEY"),es=(eo=v(p)).next();!es.done;es=eo.next()){var el=es.value;eu=c5(el,"AUDIO"),es=c5(el,"VIDEO");var ec=c5(el,"SUBTITLES");if(el=dv(a,el),ec){var ed=th(tf,el);a.u.set(ec,ed),ex(el,ed)}eu&&((ec=th("audio",el))||(ec=a.g.hls.defaultAudioCodec),a.u.set(eu,ec)),es&&((eu=th("video",el))||(eu=a.g.hls.defaultVideoCodec),a.u.set(es,eu))}for(b=(y=v(cQ(u.g,"EXT-X-SESSION-DATA"))).next();!b.done;b=y.next())x=c5(w=b.value,"DATA-ID"),T=c5(w,"URI"),S=c5(w,"LANGUAGE"),A=c5(w,"VALUE"),E=(new Map).set("id",x),T&&E.set("uri",c2(a.N,T)),S&&E.set("language",S),A&&E.set("value",A),I=new nY("sessiondata",E),a.i&&a.i.onEvent(I);for(function(e,t){t=t.filter(function(e){var t=c5(e,"URI")||"";return"SUBTITLES"!=c5(e,"TYPE")&&""!=t}),t=v(t);for(var n=t.next();!n.done;n=t.next())db(e,n.value)}(a,f),es=(eo=v(eo=cZ(f,"CLOSED-CAPTIONS"))).next();!es.done;
10es=eo.next())es=tL((ec=c5(eu=es.value,"LANGUAGE"))||"und"),ec||(ec=c5(eu,"NAME"))&&(es=ec),ec=c8(eu,"GROUP-ID"),eu=c8(eu,"INSTREAM-ID").replace("SERVICE","svc"),a.M.get(ec)||a.M.set(ec,new Map),a.M.get(ec).set(eu,es);return c=function(e,t,n){var i=[],r=new Set;if(0<n.length){n=v(n);for(var a=n.next();!a.done;a=n.next()){var o=c8(a=a.value,"METHOD");if("NONE"!=o&&"AES-128"!=o&&(a=(o=dq[o=c5(a,"KEYFORMAT")||"identity"])?o(a,""):null)){if(a.keyIds){o=v(a.keyIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}i.push(a)}}}return t=(t=t.map(function(t){var n,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w=c5(t,"FRAME-RATE"),x=Number(c5(t,"AVERAGE-BANDWIDTH"))||Number(c8(t,"BANDWIDTH")),T=c5(t,"RESOLUTION"),S=(T=v(T?T.split("x"):[null,null])).next().value,A=T.next().value,E=c5(t,"VIDEO-RANGE");T=(o=dv(n=e,a=t),s=c5(a,"AUDIO"),u=c5(a,"VIDEO"),l=(l=s||u)&&n.A.has(l)?n.A.get(l):[],s={audio:s?l:[],video:u?l:[]},u=!1,c=c8(a,"URI"),d=s.audio.find(function(e){return e&&e.dd==c}),h=th("video",o),(f=th("audio",o))&&!h?(l="audio",u=0<s.audio.length):!l.length&&f&&h?(l="video",o=[[h,f].join()]):s.audio.length&&d?(l="audio",u=!0):l=s.video.length&&!s.audio.length?"audio":"video",u||(s[(p=n,g=a,m=o,y=l,b=dP(c8(g,"URI"),p.s),n=p.h.has(b)?p.h.get(b):(g=c5(g,"CLOSED-CAPTIONS"),g="video"==y&&g&&"NONE"!=g?p.M.get(g):null,m=td(y,m),y=dw(p,b,m,y,null,!1,null,null,g,null,!1,null,!1),p.h.has(b))?p.h.get(b):(p.h.set(b,y),y)).stream.type]=[n]),t=s).audio,t=t.video;for(var I=v(t),k=I.next();!k.done;k=I.next())dU(k.value.stream,S,A,w,E);for(w=e.g.disableAudio,(!T.length||w)&&(T=[null]),w=e.g.disableVideo,(!t.length||w)&&(t=[null]),w=[],S=(T=v(T)).next();!S.done;S=T.next())for(S=S.value,E=(A=v(t)).next();!E.done;E=A.next()){var M=E.value;(E=S?S.stream:null)&&(E.drmInfos=i,E.keyIds=r),(I=M?M.stream:null)&&(I.drmInfos=i,I.keyIds=r),k=S?S.stream.drmInfos:null;var C=M?M.stream.drmInfos:null;M=(M?M.dd:"")+" - "+(S?S.dd:""),E&&I&&!rp(k,C)||e.ja.has(M)||(E={id:e.Xa++,language:E?E.language:"und",disabledUntilTime:0,primary:!!E&&E.primary||!!I&&I.primary,audio:E,video:I,bandwidth:x,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.push(E),e.ja.add(M))}return w}).reduce(to,[])).filter(function(e){return null!=e})}(a,p,m),d=function(e,t){var n=cZ(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return db(e,t).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}),n=v(n);for(var i=n.next();!i.done;i=n.next()){var r=c8(i.value,"GROUP-ID");if((i=e.u.get(r))&&(r=e.A.get(r))){r=v(r);for(var a=r.next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=d_(tf,i)||dO(tf)}}return t.filter(function(e){return e})}(a,f),M(e,(en=a,ei=g,F(function(e){return 1==e.g?(er=ei.map(function(e){var t,n;return F(function(i){if(1==i.g){var r,a,o,s,u,l,c,d,h;return en.g.disableThumbnails?i.return(null):(D(i,2),M(i,(r=en,a=e,F(function(e){return 1==e.g?(o=dP(c8(a,"URI"),r.s),s=c5(a,"CODECS","jpeg")||"",r.h.has(o))?e.return(r.h.get(o)):(l=dw(r,o,s,"image",u=c5(a,"LANGUAGE"),!1,c5(a,"NAME"),null,null,c5(a,"CHARACTERISTICS"),!1,null,!1),r.h.has(o)?e.return(r.h.get(o)):(c=c5(a,"RESOLUTION"))?M(e,l.stream.createSegmentIndex(),3):e.B(2)):(2!=e.g&&(d=l.stream.segmentIndex.get(0).tilesLayout)&&(l.stream.width=Number(c.split("x")[0])*Number(d.split("x")[0]),l.stream.height=Number(c.split("x")[1])*Number(d.split("x")[1])),(h=c5(a,"BANDWIDTH"))&&(l.stream.bandwidth=Number(h)),r.h.set(o,l),e.return(l))})),4))}if(2!=i.g)return t=i.h,i.return(t.stream);if(n=L(i),en.g.hls.ignoreImageStreamFailures)return i.return(null);throw n})}),M(e,Promise.all(er),2)):(ea=e.h,e.return(ea.filter(function(e){return e})))})),4);case 4:h=e.h,e.B(3);break;case 5:return R=(k=e.h).type,N=k.mimeType,P=k.codecs,_=k.language,O=k.height,U=k.width,j=k.channelCount,B=k.sampleRate,M(e,dA(a,u,s,s,P,R,_,!0,"Media Playlist",j,new Map,null,!1,B,!1,N),6
10);case 6:V=e.h,a.h.set(s,V),"video"==R&&dU(V.stream,U,O,null,null),c.push({id:0,language:tL(_||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==R?V.stream:null,video:"video"==R?V.stream:null,bandwidth:V.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new tr(2,7,7001);a.j=new aL(null,0),a.j.ic(!0),1==u.type&&(dB(a)&&(dD(a,u),H=a.l,a.m.U(H)),K=Array.from(a.h.values()),dS(a,K),dg(a)),a.F={presentationTimeline:a.j,variants:c,textStreams:d,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null},a.i.makeTextStreamsForClosedCaptions(a.F),C(e)}})),3)):r.return(i.F)})},b.stop=function(){this.m&&(this.m.stop(),this.m=null);var e=[];return this.I&&(e.push(this.I.destroy()),this.I=null),this.g=this.i=null,this.ja.clear(),this.F=null,this.h.clear(),this.A.clear(),this.u.clear(),this.s.clear(),Promise.all(e)},b.update=function(){var e,t,n,i,r,a,o,s,u=this;return F(function(l){if(1==l.g){if(!dB(u))return l.return();for(e=[],t=Array.from(u.h.values()),u.l=1/0,r=(i=v(n=t.filter(function(e){return e.stream.segmentIndex}))).next();!r.done;r=i.next())a=r.value,e.push(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,b,w,x,T,S,A,E;return F(function(I){var k;if(1==I.g)return n=t.nd,i=new e0(n),r=new tn,t.pd&&(0<=t.Sa&&r.add("_HLS_msn",String(t.Sa)),0<=t.Ta&&r.add("_HLS_part",String(t.Ta))),t.qd&&r.add("_HLS_skip","YES"),ti(r),r.Gc&&e4(i,r),M(I,dj(e,i.toString(),!0),2);if(a=I.h,!t.stream.segmentIndex)return I.return();if(1!=(o=dr(e.Z,a.data,a.uri)).type)throw new tr(2,4,4017);s=dm(e,cQ(o.g,"EXT-X-DEFINE")),u=t.stream,l=df(e,t),d=(c=dk(o,u.mimeType)).keyIds,h=c.drmInfos,(k=u.keyIds).size===d.size&&[].concat(y(k)).every(function(e){return d.has(e)})||(u.keyIds=d,u.drmInfos=h,e.i.newDrmInfo(u)),p=(f=dL(e,o,u.type,u.mimeType,l,s)).segments,g=f.bandwidth,u.bandwidth=g,u.segmentIndex.Uc(p,e.j.jb()),p.length&&(m=c1(o.g,"EXT-X-MEDIA-SEQUENCE",0),b=(v=c0(o.g,"EXT-X-SKIP"))?Number(c5(v,"SKIPPED-SEGMENTS")):0,x=(w=dE(m,p)).Sa,T=w.Ta,t.Sa=x+b,t.Ta=T,S=l.get(m),u.segmentIndex.Za(S)),A=p[0],t.Jb=A.startTime,E=p[p.length-1],t.kb=E.endTime,c0(o.g,"EXT-X-ENDLIST")&&(t.Pc=!0),dC(e,o),C(I)})}(u,a));return M(l,Promise.all(e),2)}dT(u,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.Pc}),n.length&&!o&&(dF(u,dW.qg),s=n.map(function(e){return e.kb}),u.j.Ja(Math.min.apply(Math,y(s))),u.i.updateDuration()),o&&dg(u),C(l)})},b.onExpirationUpdated=function(){},W("shaka.hls.HlsParser",dh);var dH={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},dK={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},dq={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new tr(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new tr(2,4,4041);return tc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=c8(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=tc("com.widevine.alpha",[{initDataType:"cenc",initData:t=ef((t=dd(t=c8(e,"URI"))).data)}]),(e=c5(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=c8(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?tc("com.microsoft.playready",[{initDataType:"cenc",initData:e=iF(e=ef((e=dd(e=c8(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]):null},identity:function(e){return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(e=c8(e,"METHOD"))?tc("org.w3.clearkey",null):null}},dG="VOD",dz="EVENT",dX="LIVE",dW={qg:dG};function dY(e){if(e=d$(e))e:{e=v(e.getElementsByTagName("DATA"));for(var t=e.next();!t.done;t=e.next())if(t=iV(t.value,"LA_URL")){e=t.textContent;break e}e=""}else e="";return e}function d$(e){return(e=(function(e){var t=0,n=ep(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,0!=(1&r)||r+e>n.byteLength){n=[];break e}var a=ef(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=i_(e.textContent)).filter(function(e){return e.type===dJ})[0])&&(e=i5(e=ip(e.value,!0),"WRMHEADER"))?e:null}rM.m3u8=function(){return new dh},rk["application/x-mpegurl"]=function(){return new dh},rk["application/vnd.apple.mpegurl"]=function(){return new dh};var dJ=1,dQ=(new Map).set("com.microsoft.playready",dY).set("com.microsoft.playready.recommendation",dY).set("com.microsoft.playready.softw
10are",dY).set("com.microsoft.playready.hardware",dY);function dZ(e){if(!d9){d9=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]);hc=d6("ftyp",t,new Uint8Array([0,0,0,1]),t,n),t=d6("dref",hd),hh=d6("dinf",t)}this.g=e}function d0(e){for(var t=new Uint8Array([]),n=v(e.g),i=n.next();!i.done;i=n.next()){var r=t;t=i.value,i=d6;var a=t.id+1,o=t.stream.width||0,s=t.stream.height||0;"audio"==t.type&&(s=o=0);var u=t.duration*t.timescale,l=Math.floor(u/(d7+1));switch(u=Math.floor(u%(d7+1)),a=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(d5(a,4)),[0,0,0,0],y(d5(l,4)),y(d5(u,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(d5(o,2)),[0,0],y(d5(s,2)),[0,0])),a=d6("tkhd",a),o=d6,s=Math.floor((l=t.duration*t.timescale)/(d7+1)),l=Math.floor(l%(d7+1)),u=(u=t.stream.language).charCodeAt(0)-96<<10|u.charCodeAt(1)-96<<5|u.charCodeAt(2)-96,s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(d5(t.timescale,4)),y(d5(s,4)),y(d5(l,4)),y(d5(u,2)),[0,0])),s=d6("mdhd",s),l=t,u=new Uint8Array([]),l.type){case"video":u=ht;break;case"audio":u=hn}l=d6("hdlr",u);e:{switch(t.type){case"video":t=d6("minf",d6("vmhd",hs),hh,d1(t));break e;case"audio":t=d6("minf",d6("smhd",hu),hh,d1(t));break e}t=new Uint8Array([])}t=o("mdia",s,l,t),i=i("trak",a,t),t=ij(r,i)}for(i=e.g[0],n=d6,r=Math.floor((a=i.duration*i.timescale)/(d7+1)),a=Math.floor(a%(d7+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(d5(i.timescale,4)),y(d5(r,4)),y(d5(a,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])),r=d6("mvhd",r),a=new Uint8Array([]),o=(e=v(e.g)).next();!o.done;o=e.next())o=new Uint8Array([0,0,0,0].concat(y(d5(o.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),a=ij(a,o=d6("trex",o));if(e=d6("mvex",a),a=new Uint8Array([]),i.encrypted){for(o=(i=v(i.stream.drmInfos)).next();!o.done;o=i.next())if((o=o.value).initData)for(s=(o=v(o.initData)).next();!s.done;s=o.next())a=ij(a,s.value.initData)}return e=n("moov",r,t,e,a),(n=new Uint8Array(hc.byteLength+e.byteLength)).set(hc),n.set(e,hc.byteLength),n}function d1(e){var t=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){t=e.stream.width||0;var n=e.stream.height||0;if(0<e.ia.byteLength)var i=d6("avcC",e.ia);else{i=d6;for(var r=7,a=[],o=[],s=0,u=0,l=0,c=0;c<e.Ma.length;c++){var d=d8(e.Ma[c]);switch(31&d[0]){case 7:a.push(d),r+=d.length+2;break;case 8:o.push(d),r+=d.length+2}}for(0<a.length&&(s=a[0][1],l=a[0][2],u=a[0][3]),r=new Uint8Array(r),c=0,r[c++]=1,r[c++]=s,r[c++]=l,r[c++]=u,r[c++]=255,r[c++]=224|a.length,s=0;s<a.length;s++)r[c++]=(65280&a[s].length)>>8,r[c++]=255&a[s].length,r.set(a[s],c),c+=a[s].length;for(a=0,r[c++]=o.length;a<o.length;a++)r[c++]=(65280&o[a].length)>>8,r[c++]=255&o[a].length,r.set(o[a],c),c+=o[a].length;i=i("avcC",r)}t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(d5(t,2)),y(d5(n,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),n="avc1",o=new Uint8Array([]),e.encrypted&&(o=d4(e),n="encv"),t=d6(n,t,i,o)}else e.codecs.includes("hvc1")&&(n=e.stream.width||0,i=e.stream.height||0,t=new Uint8Array([]),0<e.ia.byteLength&&(t=d6("hvcC",e.ia)),n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(d5(n,2)),y(d5(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",o=new Uint8Array([]),e.encrypted&&(o=d4(e),i="encv"),t=d6(i,n,t,o));break;case"audio":e.codecs.includes("mp3")?e=d6(".mp3",d2(e)):(e.codecs.includes("ac-3")?(t=d6("dac3",e.$),n="ac-3"):e.codecs.includes("ec-3")?(t=d6("dec3",e.$),n="ec-3"):(0<e.$.byteLength?t=d6("esds",e.$):(t=d6,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=td("audio",e.codecs.split(",")),o=(u={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[a],("mp4a.40.5"===s||"mp4a.40.29"===s)&&(o=u[2*a]),a=parseInt(s.split(".").pop(),10),n=new Uint8Array([0,0,0,0,3,25].concat(y(d5(n,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a<<3|o>>>1,o<<7|i<<3,6,1,2])),t=t("esds",n)),n="mp4a"),i=new Uint8Array([]),e.encrypted&&(i=d4(e),n="enca"),e=d6(n,d2(e),t,i)),t=e}return e=d6("stsd",hl,t),d6("stbl",e,d6("stts",hi),d6("stsc",hr),d6("stsz",ho),d6("stco",ha))}function d2(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(y(d5(e.stream.audioSamplingRate||44100,2)),[0,0]))}function d4(e){for(var t=e.codecs.substring(0,e.codecs.indexOf(".")),n=0,i=0;i<t.length;i+=1)n|=t.charCodeAt(i)<<8*(t.length-i-1);t=d6("frma",t=new Uint8Array([].concat(y(d5(n,4))))),n=d6("schm",n=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0])),i=d6;
10var r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=v(e.stream.drmInfos);for(var a=e.next();!a.done;a=e.next())if((a=a.value)&&a.keyIds&&a.keyIds.size){a=v(a.keyIds);for(var o=a.next();!o.done;o=a.next())r=d8(o.value)}return r=d6("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),r),d6("sinf",t,n,i("schi",r))}function d3(e){var t=new Uint8Array([]);e=v(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i,r=d6,a=new Uint8Array([0,0,0,0].concat(y(d5(n.data?n.data.ab:0,4))));a=d6("mfhd",a);var o=n.data?n.data.Ha:[],s=new Uint8Array(4+o.length);for(i=0;i<o.length;i++){var u=o[i].flags;s[i+4]=u.Ba<<4|u.Fa<<2|u.Da}var l=(o=d6("sdtp",s)).length+92;s=d6,i=d6("tfhd",i=new Uint8Array([0,0,0,58].concat(y(d5(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var c=Math.floor((u=n.data?n.data.baseMediaDecodeTime:0)%(d7+1));u=d6("tfdt",u=new Uint8Array([1,0,0,0].concat(y(d5(Math.floor(u/(d7+1)),4)),y(d5(c,4)))));var d=l,h=12+16*(c=(l=n.data?n.data.Ha:[]).length),f=new Uint8Array(h);for(d+=8+h,f.set(["video"===n.type?1:0,0,15,1].concat(y(d5(c,4)),y(d5(d,4))),0),d=0;d<c;d++){var p=l[d];h=d5(p.duration,4);var g=d5(p.size,4),m=p.flags;p=d5(p.Oa,4),f.set([].concat(y(h),y(g),[m.Pa<<2|m.Ba,m.Fa<<6|m.Da<<4|m.Qa,61440&m.Aa,15&m.Aa],y(p)),12+16*d)}for(r=r("moof",a,o=s("traf",i,u,l=d6("trun",f),o)),a=n.data?n.data.Ha:[],n=new Uint8Array([]),o=(a=v(a)).next();!o.done;o=a.next())n=ij(n,o.value.data);t=ij(t,r,n=d6("mdat",n))}return t}function d5(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function d8(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function d6(e){var t=V.apply(1,arguments),n=he[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],he[e]=n);for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var d9=!1,d7=4294967295,he={},ht=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),hn=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),hi=new Uint8Array([0,0,0,0,0,0,0,0]),hr=new Uint8Array([0,0,0,0,0,0,0,0]),ha=new Uint8Array([0,0,0,0,0,0,0,0]),ho=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),hs=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),hu=new Uint8Array([0,0,0,0,0,0,0,0]),hl=new Uint8Array([0,0,0,0,0,0,0,1]),hc=new Uint8Array([]),hd=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),hh=new Uint8Array([]);function hf(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.A=new Y(5),this.o=new tV(function(){var t,n;t=e,F(function(e){switch(e.g){case 1:return D(e,2),M(e,hp(t),4);case 4:N(e,3);break;case 2:n=L(e),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();C(e)}})}),this.u=new n1,this.m=new Map}function hp(e){var t,n,i,r,a,o;return F(function(s){if(1==s.g)return t=n5(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5}),n2(e.u,r),M(s,r.promise,2);if(a=s.h,!e.h)return s.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var u,l=a.uri,c=i8(a.data,"SmoothStreamingMedia");if(!c)throw new tr(2,4,4046,l);if((l=e.g.mss.manifestPreprocessor)&&l(c),e.i||(e.i=new aL(null,0)),l=iY(c,"IsLive",i4,!1))throw new tr(2,4,4047);e.i.ic(!l);var d=iY(c,"TimeScale",i1,1e7),h=iY(c,"DVRWindowLength",i1);l&&(0===h||isNaN(h))&&(h=1/0);var f=iY(c,"CanSeek",i4,!1);for(0===h&&f&&(h=1/0),f=null,h&&0<h&&(f=h/d),l&&!isNaN(e.g.availabilityWindowOverride)&&(f=e.g.availabilityWindowOverride),null==f&&(f=1/0),e.i.Td(f),h=iY(c,"Duration",i1,1/0),l||e.i.Ja(h/d),l={variants:[],textStreams:[],timescale:d,duration:h/d},f=iK(c,"Protection"),d=e.g.mss.keySystemsBySystemId,h=[],u=(f=v(f)).next();!u.done;u=f.next())h=h.concat(iK(u.value,"ProtectionHeader"));if(h.length){for(u=0,f=[];u<h.length;u++){var p=h[u],g=p.getAttribute("SystemID").toLowerCase(),m=d[g];if(m){var b=d$(p);if(b)e:{b=v(b.getElementsByTagName("DATA"));for(var w=b.next();!w.done;w=b.next())if(w=iV(w.value,"KID")){b=i_(w.textContent),b=new Uint8Array([b[3],b[2],b[1],b[0],b[5],b[4],b[7],b[6]].concat(y(b.slice(8)))),b=iU(b);break e}b=null}else b=null;w=i_(p.textContent),g=iO(g.replace(/-/g,"")),g=[{initData:iF(w,g,new Set,0),initDataType:"cenc",keyId:b}],g=tc(m,g),b&&g.keyIds.add(b),(m=dQ.get(m))&&(g.licenseServerUri=m(p)),f.pu
10sh(g)}}d=f}else d=[];for(u=d,f=[],d=[],h=[],p=(c=v(c=iK(c,"StreamIndex"))).next();!p.done;p=c.next()){m=iK(p=p.value,"QualityLevel"),g=l.timescale,b=l.duration,w=iK(p,"c");for(var x=[],T=0,S=0;S<w.length;++S){var A=w[S],E=w[S+1],I=iY(A,"t",i1),k=iY(A,"d",i1);if(A=iY(A,"r",iZ),!k)break;if(I=null!=I?I:T,0>(A=A||0)){if(E){if(null==(E=iY(E,"t",i1))||I>=E)break;A=Math.ceil((E-I)/k)-1}else{if(1/0==b||I/g>=b)break;A=Math.ceil((b*g-I)/k)-1}}for(E=0;E<=A;++E)T=I+k,x.push({start:I/g,end:T/g,wf:I}),I=T}for(g=x,b=(m=v(m)).next();!b.done;b=m.next())(b=function(e,t,n,i,r,a){var o=t.getAttribute("Type");if("audio"!==o&&"video"!==o&&"text"!==o)return ee("Ignoring unrecognized type:",o),null;var s=t.getAttribute("Language"),u=e.s++,l=iY(n,"Bitrate",i0),c=iY(n,"MaxWidth",i0),d=iY(n,"MaxHeight",i0),h=iY(n,"Channels",i0),f=iY(n,"SamplingRate",i0),p=a.duration;i.length&&(p=i[i.length-1].end-i[0].start);var g=e.i.getDuration();e.i.Ja(Math.min(p,g));var m={id:u,originalId:t.getAttribute("Name")||String(u),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:c||void 0,height:d||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:tL(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:h,audioSamplingRate:f,spatialAudio:!1,closedCaptions:null,hdr:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:p,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1};if((r=t.getAttribute("Subtype"))&&((r=hm[r])&&m.roles.push(r),"main"===r&&(m.primary=!0)),(null===(r=n.getAttribute("FourCC"))||""===r)&&(r=t.getAttribute("FourCC")),!r){if("audio"===o)r="AAC";else if("video"===o)return ee('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!hg.includes(r.toUpperCase()))return ee("Codec not supported:",r),null;switch(n=function(e,t,n,i){if(e=e.getAttribute("CodecPrivateData"))return e;if("audio"!==t)return null;t=i.channelsCount||2;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return(i=r[e=i.audioSamplingRate||44100],"AACH"===n)?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,(t=new Uint16Array(2))[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):((n=new Uint8Array(2))[0]=16|i>>1,n[1]=i<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,r,m),m.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return ee("Quality unsupported without CodecPrivateData",o),null;m.type="audio",m.mimeType="mss/audio/mp4",m.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(r,n);break;case"video":if(!n)return ee("Quality unsupported without CodecPrivateData",o),null;m.type="video",m.mimeType="mss/video/mp4",m.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":m.type=tf,m.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(m.codecs="stpp")}return m.createSegmentIndex=function(){if(m.segmentIndex)return Promise.resolve();if(e.m.has(m.id))var n=e.m.get(m.id);else n=[],"video"==m.type&&(n=m.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n={id:m.id,type:m.type,codecs:m.codecs,encrypted:m.encrypted,timescale:m.mssPrivateData.timescale,duration:m.mssPrivateData.duration,Ma:n,$:new Uint8Array([]),ia:new Uint8Array([]),data:null,stream:m},n=d0(new dZ([n])),e.m.set(m.id,n);return n=function(e,t,n,i,r){var a=i.getAttribute("Url").replace("{bitrate}",String(n.bandwidth));i=[];var o={};r=v(r);for(var s=r.next();!s.done;o={wc:o.wc},s=r.next())o.wc=s.value,i.push(new rN(o.wc.start,o.wc.end,function(t){return function(){return tl(e.l,[a.replace("{start time}",String(t.wc.wf))])}}(o),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new rR(function(){return[]},0,null,null,void 0,n),m,t,i),m.segmentIndex=new aZ(n),Promise.resolve()},m.closeSegmentIndex=function(){m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null)},m}(e,p,b.value,g,u,l))&&("audio"!=b.type||e.g.disableAudio?"video"!=b.type||e.g.disableVideo?b.type!=tf||e.g.disableText||h.push(b):d.push(b):f.push(b))}for(c=[],u=(f=v(0<f.length?f:[null])).next();!u.done;u=f.next())for(u=u.value,b=(p=v(0<d.length?d:[null])).next();!b.done;b=p.next())g=(m=c).push,b=b.value,w=0,u&&u.bandwidth&&0<u.bandwidth&&(w+=u.bandwidth),b&&b.bandwidth&&0<b.bandwidth&&(w+=b.bandwidth),b={id:e.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!b&&b.primary,audio:u,video:b,bandwidth:w,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},g.call(m,b);l.variants=c,l.textStreams=h,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},e.i.Id()),Promise.resolve(),o=(Date.now()-i)/1e3,e.A.sample(1,o),C(s)})}(b=hf.prototype).configure=function(e){this.g=e},b.start=function(e,t){var n=this;return F(function(i){if(1==i.g)return n.l=[e],n.h=t,M(i,hp(n),2);if(!n.h)throw new tr(2,7,7001);return i.return(n.j)})},b.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.u.destroy()},b.update=function(){var e,t=this;return F(function(n){return 1==n.g?(D(n,2),M(n,hp(t),4)):2!=n.g?N(n,0):(e=L(n),t.h&&e)?void(t.h.onError(e),C(n)):n.return()})},b.onExpirationUpdated=function(){},W("shaka.mss.MssParser",hf);var hg="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),hm={CAPT:"main",SUBT:"alternate",DESC:"main"};function hv(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=ig(t)}catch(e){}throw new tr(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function hy(){}function hb(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,x,T,S,A,E=new hE;
10il(t.headers).forEach(function(e,t){E.append(t,e)});var I=new hS,k={Cf:!1,kg:!1};if(a=e,o=n,s={body:t.body||void 0,headers:E,method:t.method,signal:I.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u=k,l=i,c=r,d=t.streamDataCallback,e=F(function(e){switch(e.g){case 1:return h=hT,f=hA,v=m=0,y=Date.now(),D(e,2),M(e,h(a,s),4);case 4:if(c(hw((p=e.h).headers)),"HEAD"==s.method){e.B(5);break}return b=p.clone().body.getReader(),x=(w=p.headers.get("Content-Length"))?parseInt(w,10):0,T=function(e){!function t(){var n,i;return F(function(r){switch(r.g){case 1:return D(r,2),M(r,b.read(),4);case 4:n=r.h,N(r,3);break;case 2:return L(r),r.return();case 3:if(n.done||(m+=n.value.byteLength,!d)){r.B(5);break}return M(r,d(n.value),5);case 5:(100<(i=Date.now())-y||n.done)&&(l(i-y,m-v,x-m),v=m,y=i),n.done?e.close():(e.enqueue(n.value),t()),C(r)}})}()},new f({start:T}),M(e,p.arrayBuffer(),6);case 6:g=e.h;case 5:N(e,3);break;case 2:if(S=L(e),u.Cf)throw new tr(1,1,7001,a,o);if(u.kg)throw new tr(1,1,1003,a,o);throw new tr(1,1,1002,a,S,o);case 3:return A=hw(p.headers),e.return(hv(A,g,p.status,a,p.url,o))}}),e=new nK(e,function(){return k.Cf=!0,I.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var R=new tV(function(){k.kg=!0,I.abort()});R.U(t/1e3),e.finally(function(){R.stop()})}return e}function hw(e){var t={};return e.forEach(function(e,n){t[n.trim()]=e}),t}function hx(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&!!new Response("").body&&!(!e.fetch||!e.AbortController)}rM.ism=function(){return new hf},rk["application/vnd.ms-sstr+xml"]=function(){return new hf},W("shaka.net.HttpFetchPlugin",hy),hy.isSupported=hx,hy.parse=hb;var hT=e.fetch,hS=e.AbortController,hA=e.ReadableStream,hE=e.Headers;function hI(){}function hk(e,t,n,i,r){var a=new hC,o=Date.now(),s=0,u=new Promise(function(u,l){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){l(new tr(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){2!=a.readyState||c||(r(hM(a)),c=!0)},a.onload=function(){var t=hM(a),i=a.response;try{var r=hv(t,i,a.status,e,a.responseURL,n);u(r)}catch(e){l(e)}},a.onerror=function(t){l(new tr(1,1,1002,e,t,n))},a.ontimeout=function(){l(new tr(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(i(t-o,e.loaded-s,e.total-e.loaded),s=e.loaded,o=t)},t.headers)a.setRequestHeader(d.toLowerCase(),t.headers[d]);a.send(t.body)});return new nK(u,function(){return a.abort(),Promise.resolve()})}function hM(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={},t=v(t);for(var n=t.next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}hx()&&(n3("http",hb,2,!0),n3("https",hb,2,!0),n3("blob",hb,2,!0)),W("shaka.net.HttpXHRPlugin",hI),hI.parse=hk;var hC=e.XMLHttpRequest;function hD(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function hR(e){return e.Ca().map(function(e){return"{"+encodeURI(e)+"}"}).join("")+":"+e.Ka+":"+e.pa}function hN(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function hL(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function hP(e){var t=this;this.o=e,this.j=new Map,this.i=new it(function(){return h_(t).catch(function(){})}),this.h=[],this.m=function(){},this.l=function(){},this.g=new hN}function h_(e){var t=e.h.map(function(e){return e()});return e.h=[],Promise.all(t)}function hO(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new nH,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function hU(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return F(function(i){if(1==i.g)return null==r.result?(n(),i.return()):M(i,t((e=r.result).key,e.value,e),2);e.continue(),C(i)})}})}function hj(e){this.h=e,this.g=[]}function hB(e,t){return hF(e,t,"readwrite")}function hF(e,t,n){n=e.h.transaction([t],n);var i=new hO(n,t);return e.g.push(i),i.promise().then(function(){ex(e.g,i)},function(){ex(e.g,i)}),i}function hV(e,t,n){this.h=new hj(e),this.i=t,this.g=n}function hH(e){return Promise.reject(new tr(2,9,9011,"Cannot add new value to "+e))}function hK(e,t,n,i){t=(e=hB(e.h,t)).store();var r={};n=v(n);for(var a=n.next();!a.done;r={hd:r.hd},a=n.next())r.hd=a.value,t.delete(r.hd).onsuccess=function(e){return function(){return i(e.hd)}}(r);return e.promise()}function hq(e,t,n){var i,r,a,o,s,u,l;return F(function(c){if(1==c.g){for(r=(i=hF(e.h,t,"readonly")).store(),a={},o=[],s={},l=(u=v(n)).next();!l.done;s={uc:s.uc,rc:s.rc},l=u.next())s.rc=l.value,s.uc=r.get(s.rc),s.uc.onsuccess=function(e){return function(){void 0==e.uc.result&&o.push(e.rc),a[e.rc]=e.uc.result}}(s);return M(c,i.promise(),2)}if(o.length)throw new tr(2,9,9012,"Could not find values for "+o);return c.return(n.map(function(e){return a[e]}))})}function hG(e){this.g=new hj(e)}function hz(){this.g=new Map}function hX(e){var t=null;
10if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ra:n,ra:i},ra:e})})}),t)return t;throw new tr(2,9,9013,"Could not find a cell that supports add-operations")}function hW(e,t,n){if(!(e=e.g.get(t)))throw new tr(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new tr(2,9,9013,"Could not find cell with name "+n);return t}function hY(e,t){h$.set(e,t)}n3("http",hk,1,!0),n3("https",hk,1,!0),n3("blob",hk,1,!0),hN.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},hP.prototype.destroy=function(){return this.i.destroy()},hO.prototype.abort=function(){var e=this;return F(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return D(t,2),M(t,e.g,4)}if(2!=t.g)return N(t,0);L(t),C(t)})},hO.prototype.store=function(){return this.h},hO.prototype.promise=function(){return this.g},hj.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(b=hV.prototype).destroy=function(){return this.h.destroy()},b.hasFixedKeySpace=function(){return!0},b.addSegments=function(){return hH(this.i)},b.removeSegments=function(e,t){return hK(this,this.i,e,t)},b.getSegments=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,hq(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.Ef(e)})))})},b.addManifests=function(){return hH(this.g)},b.updateManifest=function(){return Promise.reject(new tr(2,9,9016,"Cannot modify values in "+this.g))},b.updateManifestExpiration=function(e,t){var n=hB(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},b.removeManifests=function(e,t){return hK(this,this.g,e,t)},b.getManifests=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,hq(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.Fc(e)}))))})},b.getAllManifests=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=hF(n.h,n.g,"readonly"),t=new Map,M(i,hU(e,function(e,i){var r;return F(function(a){if(1==a.g)return M(a,n.Fc(i),2);r=a.h,t.set(e,r),C(a)})}),2)):3!=i.g?M(i,e.promise(),3):i.return(t)})},b.Ef=function(e){return e},b.Fc=function(e){return Promise.resolve(e)},b.add=function(e,t){var n,i,r,a,o,s,u,l=this;return F(function(c){if(1==c.g){for(i=(n=hB(l.h,e)).store(),r=[],a={},s=(o=v(t)).next();!s.done;a={kd:a.kd},s=o.next())u=s.value,a.kd=i.add(u),a.kd.onsuccess=function(e){return function(){r.push(e.kd.result)}}(a);return M(c,n.promise(),2)}return c.return(r)})},hG.prototype.destroy=function(){return this.g.destroy()},hG.prototype.getAll=function(){var e,t,n=this;return F(function(i){return 1==i.g?(e=hF(n.g,"session-ids","readonly"),t=[],M(i,hU(e,function(e,n){t.push(n)}),2)):3!=i.g?M(i,e.promise(),3):i.return(t)})},hG.prototype.add=function(e){var t=hB(this.g,"session-ids"),n=t.store();e=v(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},hG.prototype.remove=function(e){var t,n=this;return F(function(i){return 1==i.g?M(i,hU(t=hB(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):M(i,t.promise(),0)})},hz.prototype.destroy=function(){for(var e=[],t=v(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},hz.prototype.init=function(){var e=this;h$.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=v(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},W("shaka.offline.StorageMuxer",hz),hz.unregister=function(e){h$.delete(e)},hz.register=hY,hz.prototype.destroy=hz.prototype.destroy;var h$=new Map;function hJ(){hV.apply(this,arguments)}function hQ(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new tr(2,9,9004,"Could not parse uri "+e)}function hZ(){hV.apply(this,arguments)}function h0(){hV.apply(this,arguments)}function h1(){this.m=this.j=this.i=this.h=this.g=this.l=null}function h2(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function h4(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var i=e[3];return i&&null!=t?new h2(t,n,i,Number(e[4])):null}function h3(e,t){this.h=e,this.g=t}function h5(e,t){var n=new aL(null,0);n.Ja(t.duration);var i=t.streams.filter(function(e){return"audio"==e.type}),r=t.streams.filter(function(e){return"video"==e.type});i=function(e,t,n,i){for(var r=new Set,a=v(t),o=a.next();!o.done;o=a.next()){var s=v(o.value.variantIds);for(o=s.next();!o.done;o=s.next())r.add(o.value)}for(o=(a=v(n)).next();!o.done;o=a.next())for(o=(s=v(o.value.variantIds)).next();!o.done;o=s.next())r.add(o.value);for(a=new Map,o=(r=v(r)).next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(r=(t=v(t)).next();!r.done;r=t.next())for(r=r.value,o=h8(e,r,i),r=(s=v(r.variantIds)).next();!r.done;r=s.next())(r=a.get(r.value)).language=o.language,r.primary=r.primary||o.primary,r.audio=o;for(t=(n=v(n)).next();!t.done;t=n.next())for(r=t.value,t=h8(e,r,i),r=(o=v(r.variantIds)).next();!r.done;r=o.next())(r=a.get(r.value)).primary=r.primary||t.primary,r.video=t;return a}(e,i,r,n),r=t.streams.filter(function(e){return e.type==tf}).map(function(t){return h8(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return h8(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=v(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null}}function h8(e,t,n){var i=t.segments.map(function(t){var n,i,r,a,o,s;return n=e,i=t,r=new h2("segment",n.h,n.g,i.dataKey),new rN(i.startTime,i.endTime,function(){return[r.toString()]},0,null,null!=i.initSegmentKey?(a=n,o=i.initSegmentKey,s=new h2("segment",a.h,a.g,o),new rR(function(){return[s.toString()]},0,null)):null,i.timestampOffset,i.appendWindowStart,i.appendWindowEnd,[],i.tilesLayout||"")});return n.Vc(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new aZ(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,accessibilityPurpose:null,external:t.external}}function h6(){this.g=null}function h9(){}function h7(e){var t,n,i,r=h4(e);return e=r&&"manifest"==r.g?nz(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):r&&"segment"==r.g?(r.key(),n=r,i=new hz,nz(void 0).ga(function(){return i.init()}).ga(function(){return hW(i,n.Ra(),n.ra())}).ga(function(e){return e.getSegments([n.key()])}).ga(function(e){return{uri:n,data:e[0].data,headers:{}}}).finally(function(){return i.destroy()})):nq(new tr(2,1,9004,e))}function fe(e,t,n){var i,r,a,o;return F(function(s){switch(s.g){case 1:i=[];for(var u,l,c,d,h,f=[],p=v(n),g=p.next();!g.done;g=p.next()){g=g.value;for(var m=!1,y=v(f),b=y.next();!b.done;b=y.next())if(function(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&eT(e.audioCapabilities,t.audioCapabilities,n)&&eT(e.videoCapabilities,t.videoCapabilities,n)}((b=b.value).info,g)){b.sessionIds.push(g.sessionId),m=!0;break}m||f.push({info:g,sessionIds:[g.sessionId]})}a=(r=v(f)).next();case 2:if(a.done){s.B(4);break}return M(s,(u=e,l=t,c=a.value,F(function(e){switch(e.g){case 1:var t,n,i,r,a,o,s;return d=new i9({Kb:l,onError:function(){},Pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(e,2),d.configure(u),M(e,(t=d,n=c.info.keySystem,i=c.info.licenseUri,r=c.info.serverCertificate,a=c.info.audioCapabilities,o=c.info.videoCapabilities,s=new Map,(a={audioCapabilities:a,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:n}).drmInfos=[{keySystem:n,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioR
10obustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),rs(t,s,[])),4);case 4:N(e,3);break;case 2:return L(e),M(e,d.destroy(),5);case 5:case 9:return e.return([]);case 3:return D(e,6),M(e,rn(d),8);case 8:N(e,7);break;case 6:return L(e),M(e,d.destroy(),9);case 7:return h=[],M(e,Promise.all(c.sessionIds.map(function(e){return F(function(t){if(1==t.g){var n,i,r,a;return D(t,2),M(t,(n=d,F(function(t){return 1==t.g?M(t,rc(n,e,{initData:null,initDataType:null}),2):3!=t.g?(i=t.h)?(r=[],(a=n.i.get(i))&&(a.bb=new nH,r.push(a.bb)),r.push(i.remove()),M(t,Promise.all(r),3)):t.return():void(n.i.delete(i),C(t))})),4)}if(2!=t.g)return h.push(e),N(t,0);L(t),C(t)})})),10);case 10:return M(e,d.destroy(),11);case 11:return e.return(h)}})),5);case 5:o=s.h,i=i.concat(o),a=r.next(),s.B(2);break;case 4:return s.return(i)}})}function ft(e,t){var n=h5(new h3(e.Ra(),e.ra()),t),i=t.appMetadata||{};return n=fn(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function fn(e){var t=[],n=nc(e.variants);n=v(n);for(var i=n.next();!i.done;i=n.next())t.push(nn(i.value));for(n=(e=v(e.textStreams)).next();!n.done;n=e.next())t.push(ni(n.value));return t}function fi(){this.g={}}function fr(e,t){return null==(e=e.g[t])&&(e=0),e}function fa(e){var t=this;if(e&&e.constructor!=o6)throw new tr(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Cb()):(this.h=o0(),this.g=new n4),this.i=[],this.j=[];var n=!e;this.l=new it(function(){var e,i,r,a,o;return F(function(s){switch(s.g){case 1:return M(s,Promise.all(t.j.map(function(e){return h_(e)})),2);case 2:for(e=function(){},i=[],a=(r=v(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return M(s,Promise.all(i),3);case 3:if(!n){s.B(4);break}return M(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,C(s)}})})}function fo(){if(tH())e:{for(var e=v(h$.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function fs(e){var t,n,i;return F(function(r){switch(r.g){case 1:return M(r,(t=new hz).init(),2);case 2:return M(r,hX(t),3);case 3:return n=r.h,i=new h2("manifest",n.path.Ra,n.path.ra,e),M(r,t.destroy(),4);case 4:return M(r,(new fa).remove(i.toString()),0)}})}function fu(e,t,n,i,r,a){var o,s,u,l,c,d,h,f,p,g;return F(function(m){switch(m.g){case 1:for(o=!1,D(m,2),s=!0,l=(u=v(n.streams)).next();!l.done;l=u.next())for(d=(c=v(l.value.segments)).next();!d.done;d=c.next())null!=(f=(h=d.value).pendingSegmentRefId?i[h.pendingSegmentRefId]:null)&&(h.dataKey=f,h.pendingSegmentRefId=void 0),null!=(f=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=f,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),M(m,e.updateManifest(t,n),4);case 4:o=!0,a(),N(m,0);break;case 2:return p=L(m),M(m,fs(t),5);case 5:if(o){m.B(6);break}return g=Object.values(i),M(m,e.removeSegments(g,function(){}),6);case 6:throw p}})}function fl(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function fc(e){return e.variants.some(function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some(function(e){return e.initData&&e.initData.length})})}function fd(e,t){for(var n=[],i=v(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:tv(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:tv(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function fh(e){if(e.l.g)throw new tr(2,9,7001)}function ff(){if(!fo())throw new tr(2,9,9e3)}function fp(e,t){return F(function(n){return 1==n.g?(e.i.push(t),R(n),M(n,t,4)):2!=n.g?n.return(n.h):(P(n),ex(e.i,t),_(n,0))})}function fg(e){for(var t=new Set,n=v(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(i=(n=v(e.imageStreams)).next();!i.done;i=n.next())t.add(i.value);
10for(n=(e=v(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}A(hJ,hV),hJ.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return F(function(o){return i=(n=hB(a.h,a.g)).store(),r=new nH,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new tr(2,9,9012,"Could not find values for "+e))},M(o,Promise.all([n.promise(),r]),0)})},hJ.prototype.Fc=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n)i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime,r=function(e,t){(function(e){var t=e.streams.filter(function(e){return"audio"==e.contentType});if(e=e.streams.filter(function(e){return"video"==e.contentType}),!t.every(function(e){return e.variantIds})||!e.every(function(e){return e.variantIds})){for(var n=v(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=v(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){var r=n++,a=v(e);for(i=a.next();!i.done;i=a.next())i.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=(a=v(t)).next();!i.done;i=a.next())i.value.variantIds.push(r);if(e.length&&t.length)for(i=(t=v(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=v(e)).next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}})(e);for(var n=v(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(n){return function(e,t,n){var i=e.initSegmentUri?hQ(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(e){var n=hQ(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:""}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}(n,e.startTime,t)})}(e.periods[n],i),t.push(r);return M(o,cg(t),2)}return a=o.h,o.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:a,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},hJ.prototype.Ef=function(e){return{data:e.data}},A(hZ,hV),hZ.prototype.Fc=function(e){var t,n,i,r,a;return F(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n){i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var s=e.periods[n],u=[],l=v(s.streams),c=l.next();!c.done;c=l.next())0!=(c=c.value).variantIds.length&&u.push(function(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:""}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}(c,s.startTime,s.startTime+i));r=u,t.push(r)}return M(o,cg(t),2)}return a=o.h,o.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:a,sequenceMode:!1})})},A(h0,hV),(b=h0.prototype).hasFixedKeySpace=function(){return!1},b.addSegments=function(e){return this.add(this.i,e)},b.addManifests=function(e){return this.add(this.g,e)},b.updateManifest=function(e,t){var n,i;return n=this,(i=(n=hB(n.h,n.g)).store()).get(e).onsuccess=function(){i.put(t,e)},n.promise()},b.Fc=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(b=h1.prototype).init=function(){var t=this,n=new nH,i=!1,r=new tV(function(){i=!0,n.reject(new tr(2,9,9017))});r.U(5);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!i){var e=a.result;t.l=e;var o=e.objectStoreNames;o=o.contains("manifest")&&o.contains("segment")?new hJ(e,"segment","manifest"):null,t.g=o,o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new hZ(e,"segment-v2","manifest-v2"):null,t.h=o,o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new hZ(e,"segment-v3","manifest-v3"):null,t.i=o,o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new h0(e,"segment-v5","manifest-v5"):null,t.j=o,e=e.objectStoreNames.contains("session-ids")?new hG(e):null,t.m=e,r.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=v(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(n.reject(new tr(2,9,9001,a.error)),r.stop(),e.preventDefault())},n},b.destroy=function(){var e=this;return F(function(t){switch(t.g){case 1:if(!e.g){t.B(2);break}return M(t,e.g.destroy(),2);case 2:if(!e.h){t.B(4);break}return M(t,e.h.destroy(),4);case 4:if(!e.i){t.B(6);break}return M(t,e.i.destroy(),6);case 6:if(!e.j){t.B(8);break}return M(t,e.j.destroy(),8);case 8:if(!e.m){t.B(10);break}
10return M(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),C(t)}})},b.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},b.getEmeSessionCell=function(){return this.m},b.erase=function(){var t=this;return F(function(n){switch(n.g){case 1:if(!t.g){n.B(2);break}return M(n,t.g.destroy(),2);case 2:if(!t.h){n.B(4);break}return M(n,t.h.destroy(),4);case 4:if(!t.i){n.B(6);break}return M(n,t.i.destroy(),6);case 6:if(!t.j){n.B(8);break}return M(n,t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),M(n,(i=new nH,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new tr(2,9,9001,r.error)),e.preventDefault()},i),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,M(n,t.init(),0)}})},hY("idb",function(){return tZ("CrKey")||tG()||!e.indexedDB?null:new h1}),h2.prototype.Ra=function(){return this.i},h2.prototype.ra=function(){return this.h},h2.prototype.key=function(){return this.l},h2.prototype.toString=function(){return this.j},(b=h6.prototype).configure=function(){},b.start=function(e,t){var n,i,r,a,o,s=this;return F(function(u){switch(u.g){case 1:if(n=h4(e),s.g=n,null==n||"manifest"!=n.g)throw new tr(2,1,9004,e);return i=new hz,R(u),M(u,i.init(),4);case 4:return M(u,hW(i,n.Ra(),n.ra()),5);case 5:return r=u.h,M(u,r.getManifests([n.key()]),6);case 6:return a=u.h[0],o=h5(new h3(n.Ra(),n.ra()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return P(u),M(u,i.destroy(),7);case 7:_(u,0)}})},b.stop=function(){return Promise.resolve()},b.update=function(){},b.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return F(function(l){switch(l.g){case 1:return n=u.g,i=new hz,D(l,2,3),M(l,i.init(),5);case 5:return M(l,hW(i,n.Ra(),n.ra()),6);case 6:return r=l.h,M(l,r.getManifests([n.key()]),7);case 7:if(o=(a=l.h[0]).sessionIds.includes(e),s=void 0==a.expiration||a.expiration>t,!o||!s){l.B(3);break}return M(l,r.updateManifestExpiration(n.key(),t),3);case 3:return P(l),M(l,i.destroy(),10);case 10:_(l,0);break;case 2:L(l),l.B(3)}})},rk["application/x-offline-manifest"]=function(){return new h6},W("shaka.offline.OfflineScheme",h9),h9.plugin=h7,n3("offline",h7),(b=fa.prototype).destroy=function(){return this.l.destroy()},b.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=oX(e,t)),o1(this.h,e)},b.getConfiguration=function(){var e=o0();return o1(e,this.h,o0()),e},b.Cb=function(){return this.g},b.store=function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,y,b,w,x,T,S,A,E,I=this,k=this.getConfiguration(),R=new hP(this.g);return this.j.push(R),i=this,r=e,a=t||{},o=function(){var t;return F(function(i){return 1==i.g?M(i,rA(e,I.g,k.manifest.retryParameters,n||null),2):(t=i.h,i.return(t()))})},s=k,u=R,t=F(function(e){var t,n,S,A,E,I,k,R,O,U,j,B,V,H,K,q,G,z,X,W,Y,$,J,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,eg,em,ev,ey,eb,ew,eT,eS,eA,eE,eI,ek,eM,eC,eD,eR,eN,eL;switch(e.g){case 1:return ff(),c=l=null,d=new hz,p=f=h=null,D(e,2,3),M(e,o(),5);case 5:return l=e.h,M(e,(t=i,n=r,S=l,A=s,F(function(e){if(1==e.g)return E=null,I={networkingEngine:t.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){E=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return A.abr.defaultBandwidthEstimate}},S.configure(A.manifest),fh(t),M(e,S.start(n,I),2);if(3!=e.g)return k=e.h,fh(t),M(e,Promise.all(is(fg(k),function(e){return e.createSegmentIndex()})),3);if(fh(t),E)throw E;return e.return(k)})),6);case 6:if(g=e.h,fh(i),!(!g.presentationTimeline.R()&&!g.presentationTimeline.Ib()))throw new tr(2,9,9005,r);return M(e,(R=i,O=g,U=function(e){p=p||e},j=s,F(function(e){switch(e.g){case 1:var t,n,i;return(B=new i9({Kb:R.g,onError:U,Pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(j.drm),M(e,(t=B,n=O.variants,i=j.offline.usePersistentLicense,t.ja=!0,t.u=new Map,t.M=i,re(t,n)),2);case 2:return M(e,rn(B),3);case 3:return M(e,ri(B),4);case 4:return e.return(B)}})),7);case 7:if(c=e.h,fh(i),p)throw p;return M(e,(V=g,H=s,F(function(e){switch(e.g){case 1:var t;return K={width:1/0,height:1/0},t=H.restrictions,V.variants=V.variants.filter(function(e){return t5(e,t,K)}),M(e,t8(V,H.offline.usePersistentLicense),2);case 2:for(q=[],G=H.preferredAudioChannelCount,z=H.preferredDecodingAttributes,t3(V,H.preferredVideoCodecs,H.preferredAudioCodecs,G,z),W=(X=v(V.variants)
10).next();!W.done;W=X.next())Y=W.value,q.push(nn(Y));for(J=($=v(V.textStreams)).next();!J.done;J=$.next())Q=J.value,q.push(ni(Q));for(ee=(Z=v(V.imageStreams)).next();!ee.done;ee=Z.next())et=ee.value,q.push(nr(et));return M(e,H.offline.trackSelectionCallback(q),3);case 3:for(en=e.h,ei=V.presentationTimeline.getDuration(),er=0,eo=(ea=v(en)).next();!eo.done;eo=ea.next())er+=eo.value.bandwidth*ei/8;return D(e,4),M(e,H.offline.downloadSizeCallback(er),6);case 6:if(!e.h)throw new tr(2,9,9014);N(e,5);break;case 4:if((es=L(e))instanceof tr)throw es;throw new tr(2,9,9015);case 5:for(eu=new Set,el=new Set,ec=new Set,eo=(ed=v(en)).next();!eo.done;eo=ed.next())"variant"==(eh=eo.value).type&&eu.add(eh.id),"text"==eh.type&&el.add(eh.id),"image"==eh.type&&ec.add(eh.id);V.variants=V.variants.filter(function(e){return eu.has(e.id)}),V.textStreams=V.textStreams.filter(function(e){return el.has(e.id)}),V.imageStreams=V.imageStreams.filter(function(e){return ec.has(e.id)}),function(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=v(t),i=n.next();!i.done;i=n.next()){i=v(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=v(e)).next();!n.done;n=t.next())for(i=(n=v(e)).next();!i.done;i=n.next());}(V),C(e)}})),8);case 8:return M(e,d.init(),9);case 9:return fh(i),M(e,hX(d),10);case 10:return h=e.h,fh(i),y=(m=function(e,t,n,i,r,a){var o,s,u,l,c={offlineUri:null,originalManifestUri:n,duration:(o=t).presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:o=fn(o),appMetadata:i,isIncomplete:!1},d=r.offline.progressCallback;(s=a).m=function(e,t){c.size=t,d(c,e)},s.l=function(t,n){h&&r.offline.usePersistentLicense&&f==n&&rr(e,"cenc",t)};var h=fl(t)&&!fc(t),f=null;h&&(f=fm.get(e.g.keySystem));for(var p=new fi,g=v(t.textStreams),m=g.next();!m.done;m=g.next())p.g[m.value.id]=52;for(m=(g=v(t.imageStreams)).next();!m.done;m=g.next())u=p,l=m.value,u.g[l.id]=l.bandwidth||2048;
10for(g=(m=v(t.variants)).next();!g.done;g=m.next())!function(e,t){var n=t.audio,i=t.video;if(n&&!i&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&i&&(e.g[i.id]=i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),e.g[n.id]=r,e.g[i.id]=a}}(p,g.value);return a=(p=function(e,t,n,i){var r=new Map,a=fg(n),o=new Map;a=v(a);for(var s=a.next();!s.done;s=a.next()){var u=function(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,external:i.external},s=r.offline.numberOfParallelDownloads,u=0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.jb(),function(n){var r=hR(n),l=void 0;if(!a.has(r)){var c=n.endTime-n.startTime;c=fr(t,i.id)*c,c=hL(e.g,c),a.set(r,new hD(n,c,u,!1))}n.h&&(l=hR(n.h),a.has(l)||(c=.5*fr(t,i.id),c=hL(e.g,c),a.set(l,new hD(n.h,c,u,!0)))),o.segments.push({pendingInitSegmentRefId:l,initSegmentKey:l?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:r,dataKey:0}),u=(u+1)%s}),o}(e,t,n,s=s.value,i,r);o.set(s.id,u)}for(t=(e=v(n.variants)).next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),rf:Array.from(r.values())}}(a,p,t,r)).streams,p=p.rf,m=e.g,g=r.offline.usePersistentLicense,m&&g&&(m.initData=[]),{ph:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Mc(),streams:a,sessionIds:g?ro(e):[],drmInfo:m,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},rf:p}}(c,g,r,a,s,u)).ph,b=m.rf,M(e,h.ra.addManifests([y]),11);case 11:if(w=e.h,fh(i),f=w[0],fh(i),p)throw p;return M(e,(ep=i,eg=b,em=f,ev=y,ey=u,eb=s,ew=h.ra,eT=g,eS=c,F(function(e){switch(e.g){case 1:if(eA={},eE=0,eI=function(e,t){var n,i,r,a,o,s,u;return F(function(l){if(1==l.g){var c;for(n={},r=(i=v(e)).next();!r.done;n={yb:n.yb},r=i.next())n.yb=r.value,a=ou((c=n.yb).g.Ca(),c.g.Ka,c.g.pa,eb.streaming.retryParameters),o=n.yb.i,s=n.yb.h,u=function(e){return function(t){var n;return F(function(i){if(1==i.g)return M(i,ew.addSegments([{data:t}]),2);n=i.h,fh(ep),eA[hR(e.yb.g)]=n[0],eE+=t.byteLength,C(i)})}}(n),function(e,t,n,i,r,a){ii(e.i);var o=(e.j.get(t)||Promise.resolve()).then(function(){var t,o,s,u,l,c,d;return F(function(h){if(1==h.g)return M(h,function(e,t){var n,i,r,a;return F(function(o){return 1==o.g?(n=n9,i=e.o.request(n,t),r=function(){return i.abort()},e.h.push(r),M(o,i.promise,2)):(a=o.h,ex(e.h,r),o.return(a.data))})}(e,n),2);if(t=h.h,e.i.g)throw new tr(2,9,7001);if(r)for(u in o=ef(t),(s=new iB(o)).data)l=Number(u),c=s.data[l],d=s.g[l],e.l(c,d);e.g.close(i,t.byteLength);var f=e.g;return e.m(0==f.i?0:f.j/f.i,e.g.h),h.return(a(t))})});e.j.set(t,o)}(ey,n.yb.groupId,a,o,s,u);return M(l,F(function(e){return 1==e.g?M(e,Promise.all(ey.j.values()),2):e.return(ey.g.h)}),2)}return t?(fh(ep),function(e,t,n,i){if(t.expiration=n.Mc(),n=ro(n),t.sessionIds=i.offline.usePersistentLicense?n:[],fl(e)&&i.offline.usePersistentLicense&&!n.length)throw new tr(2,9,9007)}(eT,ev,eS,eb),M(l,ew.updateManifest(em,ev),0)):l.B(0)})},ek=!1,D(e,2),!fl(eT)||!ek||fc(eT)){e.B(4);break}return M(e,eI(eg.filter(function(e){return e.h}),!0),5);case 5:return fh(ep),eg=eg.filter(function(e){return!e.h}),eM=eA,eC=eE,eA={},eE=0,M(e,fu(ew,em,ev,eM,eC,function(){return fh(ep)}),6);case 6:fh(ep);case 4:if(ek){e.B(7);break}return M(e,eI(eg,!1),8);case 8:return fh(ep),eD=eA,eR=eE,eA={},eE=0,M(e,fu(ew,em,ev,eD,eR,function(){return fh(ep)}),9);case 9:fh(ep);case 7:N(e,0);break;case 2:return eN=L(e),eL=Object.values(eA),M(e,ew.removeSegments(eL,function(){}),10);case 10:throw eN}})),12);case 12:return fh(i),x=new h2("manifest",h.path.Ra,h.path.ra,f),e.return(ft(x,y));case 3:return P(e),M(e,d.destroy(),13);case 13:if(!l){e.B(14);break}return M(e,l.stop(),14);case 14:if(!c){e.B(16);break}return M(e,c.destroy(),16);case 16:_(e,0);break;case 2:if(T=L(e),null==f){e.B(18);break}return M(e,fs(f),18);case 18:throw p||T}}),(t=new nK(t,function(){return h_(R)})).finally(function(){ex(I.j,R)}),S=this,E=(A=t).promise,S.i.push(E),A.finally(function(){ex(S.i,E)})},b.remove=function(e){var t,n,i,r,a,o,s;return fp(this,(t=this,n=e,F(function(e){switch(e.g){case 1:if(ff(),null==(i=h4(n))||"manifest"!=i.g)throw new tr(2,9,9004,n);return r=i,a=new hz,R(e),M(e,a.init(),4);case 4:return M(e,hW(a,r.Ra(),r.ra()),5);
10case 5:return o=e.h,M(e,o.getManifests([r.key()]),6);case 6:var u,l,c;return s=e.h[0],M(e,Promise.all([(u=t,l=s,c=a,F(function(e){var t,n,i,r,a,o,s;return M(e,(t=u.g,n=u.h.drm,i=c,r=l,F(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new tr(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),M(e,fe(n,t,o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:fd(r,!1),videoCapabilities:fd(r,!0)}})),2)):e.return():3!=e.g?(s=e.h,M(e,a.remove(s),3)):M(e,a.add(o.filter(function(e){return!s.includes(e.sessionId)})),0)})),0)})),function(e,t,n){function i(){}var r=function(e){var t=new Set;e=v(e.streams);for(var n=e.next();!n.done;n=e.next()){n=v(n.value.segments);for(var i=n.next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}(n);return ft(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return P(e),M(e,a.destroy(),8);case 8:_(e,0)}})))},b.Dh=function(){var e,t,n,i,r,a,o,s,u,l,c;return fp(this,(e=this,F(function(d){switch(d.g){case 1:return ff(),t=e.g,n=e.h.drm,i=new hz,r=!1,R(d),M(d,i.init(),4);case 4:a=[],function(e,t){e.g.forEach(function(e){t(e.getEmeSessionCell())})}(i,function(e){return a.push(e)}),s=(o=v(a)).next();case 5:if(s.done){d.B(2);break}return M(d,(u=s.value).getAll(),8);case 8:return l=d.h,M(d,fe(n,t,l),9);case 9:return c=d.h,M(d,u.remove(c),10);case 10:c.length!=l.length&&(r=!0),s=o.next(),d.B(5);break;case 2:return P(d),M(d,i.destroy(),11);case 11:_(d,3);break;case 3:return d.return(!r)}})))},b.list=function(){var e,t,n;return fp(this,F(function(i){switch(i.g){case 1:return ff(),e=[],t=new hz,R(i),M(i,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach(function(e,n){e.getCells().forEac
10h(function(e,i){t({Ra:n,ra:i},e)})})}(t,function(t,i){n=n.then(function(){return F(function(n){if(1==n.g)return M(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=ft(new h2("manifest",t.Ra,t.ra,i),n),e.push(n)}),C(n)})})}),M(i,n,2);case 2:return P(i),M(i,t.destroy(),6);case 6:_(i,3);break;case 3:return i.return(e)}}))},W("shaka.offline.Storage",fa),fa.deleteAll=function(){var e;return F(function(t){var n,i,r;return 1==t.g?(e=new hz,R(t),M(t,(n=e,F(function(e){return 1==e.g?((r=0<(i=Array.from(n.g.values())).length)||h$.forEach(function(e){(e=e())&&i.push(e)}),M(e,Promise.all(i.map(function(e){return e.erase()})),2)):r?e.B(0):M(e,Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.g?(P(t),M(t,e.destroy(),5)):_(t,0)})},fa.prototype.list=fa.prototype.list,fa.prototype.removeEmeSessions=fa.prototype.Dh,fa.prototype.remove=fa.prototype.remove,fa.prototype.store=fa.prototype.store,fa.prototype.getNetworkingEngine=fa.prototype.Cb,fa.prototype.getConfiguration=fa.prototype.getConfiguration,fa.prototype.configure=fa.prototype.configure,fa.prototype.destroy=fa.prototype.destroy,fa.support=fo;var fm=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function fv(){}function fy(e,t){for(e={priority:t||0,wg:e},t=0;t<fb.length;t++)if(fb[t].priority<e.priority){fb.splice(t,0,e);return}fb.push(e)}sJ.offline=fo,W("shaka.polyfill",fv),fv.register=fy,fv.installAll=function(){for(var e=v(fb),t=e.next();!t.done;t=e.next()){t=t.value;try{t.wg()}catch(e){ee("Error installing polyfill!",e)}}};var fb=[];function fw(){this.g=new fT}function fx(){e.AbortController||(e.AbortController=fw,e.AbortSignal=fT)}function fT(){nQ.call(this),this.h=!1,this.g=void 0,this.onabort=null}function fS(){}function fA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=v(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())!function(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||void 0==e?this.removeAttribute(t):this.setAttribute(t,e)}})}(t.value)}function fE(){}function fI(){g0()}function fk(){}function fM(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",fC),document.addEventListener("webkitfullscreenerror",fC),document.addEventListener("mozfullscreenchange",fC),document.addEventListener("mozfullscreenerror",fC),document.addEventListener("MSFullscreenChange",fC),document.addEventListener("MSFullscreenError",fC)}}function fC(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function fD(){}function fR(){var e=!0;(t$()||tZ("PlayStation 5")||tJ()||tZ("Web0S")||tz()||tZ("CrKey")||tZ("PC=EOS")||tZ("Hisense")||tZ("VIDAA"))&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),fL=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=fN)}function fN(t){var n,i,r,a,o,s,u,l,c,d,h,f,p;return F(function(g){switch(g.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},!t)return g.return(n);if(i=t.video,r=t.audio,"media-source"==t.type){if(!tH())return g.return(n);if(i){if(tZ("CrKey")){if(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var m=i.contentType;i.width&&i.height&&(m+="; width="+i.width+"; height="+i.height),i.framerate&&(m+="; framerate="+i.framerate),"pq"===i.transferFunction&&(m+="; eotf=smpte2084"),a=cast.__platform__.canDisplayType(m)}else a=er(i.contentType)}else tz()?(o=i.contentType,i.width&&i.height&&(o+="; width="+i.width+"; height="+i.height),i.framerate&&(o+="; framerate="+i.framerate),i.bitrate&&(o+="; bitrate="+i.bitrate),a=er(o)):a=er(i.contentType);if(!a)return g.return(n)}if(r&&!er(r.contentType))return g.return(n)}else if("file"!=t.type)return g.return(n);else if(i&&!tK(i.contentType)||r&&!tK(r.contentType))return g.return(n);if(!t.keySystemConfiguration)return n.supported=!0,g.return(Promise.resolve(n));if(s=t.keySystemConfiguration,u=[],l=[],s.audio&&(c={robustness:s.audio.robustness||"",contentType:t.audio.contentType},u.push(c)),s.video&&(d={robustness:s.video.robustness||"",contentType:t.video.contentType},l.push(d)),h={initDataTypes:[s.initDataType],distinctiveIdentifier:s.distinctiveIdentifier,persistentState:s.persistentState,sessionTypes:s.sessionTypes},u.length&&(h.audioCapabilities=u),l.length&&(h.videoCapabilities=l),f=(t.video?t.video.contentType:"")+"#"+(t.audio?t.audio.contentType:"")+"#"+t.keySystemConfiguration.keySystem,D(g,3),f in fP){p=fP[f],g.B(5);break}return M(g,navigator.requestMediaKeySystemAccess(s.keySystem,[h]),6);case 6:p=g.h,fP[f]=p;case 5:N(g,4);break;case 3:L(g);case 4:p&&(n.supported=!0,n.keySystemAccess=p);case 2:return g.return(n)}})}fw.prototype.abort=function(e){var t=this.g;t.h||(t.h=!0,t.g=e,void 0===t.g&&(t.g=new DOMException("signal is aborted without reason","AbortError")),e=new nY("abort"),t.onabort&&t.onabort(e),t.dispatchEvent(e))},p.Object.defineProperties(fw.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),fv.AbortController=fw,fw.install=fx,A(fT,nQ),p.Object.defineProperties(fT.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),fy(fx),fv.Aria=fS,fS.install=fA,fy(fA),fv.EncryptionScheme=fE,fE.install=fI,fy(fI,-2),fv.Fullscreen=fk,fk.install=fM,fy(fM),fv.MediaCapabilities=fD,fD.install=fR;var fL=null;fD.originalMcap=fL;var fP={};function f_(){}function fO(){var t,n,i,r,a,o=tQ();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(t=MediaSource.isTypeSupp
10orted,MediaSource.isTypeSupported=function(e){var n=e.split(/ *; */);return n.shift(),n.some(function(e){return e.startsWith("codecs=")})?cast.__platform__.canDisplayType(e):t(e)}):o?12>=o?(fU(),n=SourceBuffer.prototype.remove,SourceBuffer.prototype.remove=function(e,t){return n.call(this,e,t-.001)}):15>=o&&fU():tq()?(i=MediaSource.isTypeSupported,MediaSource.isTypeSupported=function(e){return"mp2t"!=e.split(";")[0].split("/")[1]&&i(e)}):(tW()||tX()||tZ("Tizen 4"))&&(r=MediaSource.isTypeSupported,MediaSource.isTypeSupported=function(e){return"opus"!=tS(e)[0]&&r(e)})),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(a=MediaSource.isTypeSupported,tZ("Web0S")||(MediaSource.isTypeSupported=function(e){var t=e.split(/ *; */),n=t.findIndex(function(e){return e.startsWith("codecs=")});if(0>n)return a(e);var i=t[n].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),r=i.findIndex(function(e){return e.startsWith("vp09")});return 0<=r&&(i[r]="vp9",t[n]='codecs="'+i.join(",")+'"',e=t.join("; ")),a(e)}))}function fU(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,V.apply(0,arguments));return t.abort=function(){},t}}function fj(){}function fB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):void 0!=e.orientation&&function(){function t(){switch(e.orientation){case -90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new fF;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new nY("change");n.dispatchEvent(e)})}())}function fF(){nQ.call(this),this.type="",this.angle=0}function fV(){}function fH(e,t){try{var n=new fG(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function fK(e){var t=this.mediaKeys;return t&&t!=e&&fX(t,null),delete this.mediaKeys,(this.mediaKeys=e)?fX(e,this):Promise.resolve()}function fq(e){if(ep(e=ef(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=ip(e.subarray(4),!0),e=im(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=eh(e),this.dispatchEvent(t)}function fG(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=v(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=v(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(o=(n=v(n.videoCapabilities)).next();!o.done;o=n.next())(a=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function fz(e){this.h=new WebKitMediaKeys(e),this.g=new ir}function fX(e,t){if(e.g.vb(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",fq);try{return aB(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function fW(e){nQ.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new ir,this.sessionId="",this.expiration=NaN,this.closed=new nH,this.keyStatuses=new f$}function fY(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.g=t,t=new nY("keystatuseschange"),e.dispatchEvent(t)}function f$(){this.size=0,this.g=void 0}function fJ(){}function fQ(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=fZ,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=f0,e.MediaKeys=f1,e.MediaKeySystemAccess=f2,e.shakaMediaKeysPolyfill=!0)}function fZ(){return Promise.reject(Error("The key system specified is not supported."))}function f0(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function f1(){throw TypeError("Illegal constructor.")}function f2(){throw this.keySystem="",TypeError("Illegal constructor.")}function f4(){}function f3(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
10(HTMLMediaElement.prototype.webkitGenerateKeyRequest)po="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=f8,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=f6,e.MediaKeys=f7,e.MediaKeySystemAccess=f9,e.shakaMediaKeysPolyfill=!0}}function f5(e){var t=po;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function f8(e,t){try{var n=new f9(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function f6(e){var t=this.mediaKeys;return t&&t!=e&&pe(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&pe(e,this),Promise.resolve()}function f9(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=v(t);for(var a=t.next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=v(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=v(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i){this.h=o;return}}throw n="Unsupported keySystem",("org.w3.clearkey"==e||"com.widevine.alpha"==e)&&(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function f7(e){this.l=e,this.h=null,this.g=new ir,this.i=[],this.j=new Map}function pe(e,t){e.h=t,e.g.vb();var n=po;t&&(e.g.D(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=eh(t.initData),e.h.dispatchEvent(n)}),e.g.D(t,n+"keymessage",function(t){var n=pt(e,t.sessionId);n&&(t=(new Map).set("messageType",void 0==n.keyStatuses.Fb()?"licenserequest":"licenserenewal").set("message",t.message),t=new nY("message",t),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.D(t,n+"keyadded",function(t){(t=pt(e,t.sessionId))&&(pr(t,"usable"),t.g&&t.g.resolve(),t.g=null)}),e.g.D(t,n+"keyerror",function(t){var n=pt(e,t.sessionId);n&&n.handleError(t)}))}function pt(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function pn(e,t,n){nQ.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new nH,this.keyStatuses=new pa}function pi(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l){if(n)var i=ef(im("LOAD_SESSION|"+n));else{var r=im("PERSISTENT|");i=ij(r,t)}}else i=ef(t)}catch(e){return Promise.reject(e)}e.h=new nH;var a=f5("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new tV(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).U(.01)}return e.h}function pr(e,t){var n=e.keyStatuses;n.size=void 0==t?0:1,n.g=t,t=new nY("keystatuseschange"),e.dispatchEvent(t)}function pa(){this.size=0,this.g=void 0}fD.memoizedMediaKeySystemAccessRequests_=fP,fy(fR,-1),fv.MediaSource=f_,f_.install=fO,fy(fO),fv.Orientation=fj,fj.install=fB,A(fF,nQ),fF.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},fF.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},fy(fB),fv.PatchedMediaKeysApple=fV,fV.uninstall=function(){a&&(a=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",o),HTMLMediaElement.prototype.setMediaKeys=s,e.MediaKeys=u,e.MediaKeySystemAccess=l,navigator.requestMediaKeySystemAccess=c,o=c=s=l=u=null,e.shakaMediaKeysPolyfill=!1)},fV.install=function(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&((void 0===t?0:t)&&(a=!0,o=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),s=HTMLMediaElement.prototype.setMediaKeys,u=e.MediaKeys,l=e.MediaKeySystemAccess,c=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=fK,e.MediaKeys=fz,e.MediaKeySystemAccess=fG,navigator.requestMediaKeySystemAccess=fH,e.shakaMediaKeysPolyfill=!0)},fG.prototype.createMediaKeys=function(){return Promise.resolve(new fz(this.keySystem))},fG.prototype.getConfiguration=function(){return this.g},fz.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new fW(this.h,e)},fz.prototype.setServerCertificate=function(){return Promise.resolve(!1)},fz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},A(fW,nQ),(b=fW.prototype).generateRequest=function(e,t){var n=this;this.h=new nH;try{var i=this.l.createSession("video/mp4",ef(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=(new Map).set("messageType",void 0==n.keyStatuses.Fb()?"license-request":"license-renewal").set("message",eh(e.message)),e=new nY("message",e),n.dispatchEvent(e)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(fY(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
10if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:fY(n,"output-not-allowed");break;default:fY(n,"internal-error")}}),fY(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},b.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},b.update=function(e){this.g=new nH;try{this.i.update(ef(e))}catch(e){this.g.reject(e)}return this.g},b.close=function(){try{this.i.close(),this.closed.resolve(),this.j.vb()}catch(e){this.closed.reject(e)}return this.closed},b.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(b=f$.prototype).Fb=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,rT.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=rT.value();return!!(this.g&&ec(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){},fv.PatchedMediaKeysNop=fJ,fJ.install=fQ,f1.prototype.createSession=function(){},f1.prototype.setServerCertificate=function(){},f1.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},f2.prototype.getConfiguration=function(){},f2.prototype.createMediaKeys=function(){},fy(fQ,-10),fv.PatchedMediaKeysWebkit=f4,f4.install=f3,f9.prototype.createMediaKeys=function(){return Promise.resolve(new f7(this.g))},f9.prototype.getConfiguration=function(){return this.h},f7.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new pn(t,this.l,e),this.i.push(e),e},f7.prototype.setServerCertificate=function(){return Promise.resolve(!1)},f7.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},A(pn,nQ),(b=pn.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?pr(this,"output-restricted"):1==t?pr(this,"expired"):pr(this,"internal-error"))},b.generateRequest=function(e,t){return pi(this,t,null)},b.load=function(e){return"persistent-license"==this.l?pi(this,null,e):Promise.reject(Error("Not a persistent session."))},b.update=function(e){var t=new nH;return function e(t,n,i){if(t.g)t.g.then(function(){return e(t,n,i)}).catch(function(){return e(t,n,i)});else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var r=ih(i),a=JSON.parse(r);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=i_(a.keys[0].k),a=i_(a.keys[0].kid)}else r=ef(i),a=null;var o=f5("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},b.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=f5("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},b.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(b=pa.prototype).Fb=function(){return this.g},b.forEach=function(e){this.g&&e(this.g,rT.value())},b.get=function(e){if(this.has(e))return this.g},b.has=function(e){var t=rT.value();return!!(this.g&&ec(e,t))},b.entries=function(){},b.keys=function(){},b.values=function(){};var po="";function ps(){}function pu(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=pc,Object.defineProperty(t,"disablePictureInPicture",{get:ph,set:pf,enumerable:!0,configurable:!0}),document.exitPictureInPicture=pd,document.addEventListener("webkitpresentationmodechanged",pl,!0))}}function pl(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function pc(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function pd(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function ph(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function pf(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function pp(){}function pg(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=pm))}function pm(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function pv(){}function py(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=pb)}function pb(){return new Promise(function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(t,n){e({usage:t,quota:n})},t)})}function pw(){}function px(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:pT})}function pT(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function pS(){}function pA(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function pE(){}function pI(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||tY())&&(t.getVideoPlaybackQuality=pk)}}function pk(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function pM(){}function pC(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=pD;else if(6==n)t=pR;else{try{var i=!!pD(1,2,"")}catch(e){i=!1}i&&(t=pD)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function pD(t,n,i){return new e.TextTrackCue(t,n,i)}function pR(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function pN(){}fy(f3),fv.PiPWebkit=ps,ps.install=pu,fy(pu),fv.RandomUUID=pp,pp.install=pg,fy(pg),fv.StorageEstimate=pv,pv.install=py,fy(py),fv.Symbol=pw,pw.install=px,fy(px),fv.VideoPlayPromise=pS,pS.install=pA,fy(pA),fv.VideoPlaybackQuality=pE,pE.install=pI,fy(pI),fv.VTTCue=pM,pM.install=pC,fy(pC),pN.prototype.parseInit=function(){},pN.prototype.setSequenceMode=function(){},pN.prototype.setManifestType=function(){},pN.prototype.parseMedia=function(e,t){var n=null,i=[];e=ih(e).split(/\r?\n/),e=v(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=pL.exec(r))){var a=pP.exec(r[1]);a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),r=new eA(a,t.segmentEnd?t.segmentEnd:a+2,r[2]),n&&(n.endTime=a,i.push(n)),n=r}return n&&i.push(n),i},W("shaka.text.LrcTextParser",pN),pN.prototype.parseMedia=pN.prototype.parseMedia,pN.prototype.setManifestType=pN.prototype.setManifestType,pN.prototype.setSequenceMode=pN.prototype.setSequenceMode,pN.prototype.parseInit=pN.prototype.parseInit;var pL=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,pP=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function p_(){}function pO(e,t){t=v(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&ex(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&ex(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&ex(e.textDecoration,"overline")}}function pU(e,t,n,i,r){return r=void 0===r||r,(e=pB(e,n,i))?e:r?pj(t,n,i):null}function pj(e,t,n){return e?iz(e,p5,n)||pF(e,t,n):null}
10function pB(e,t,n){return iz(e,p5,n)||pF(e,t,n)}function pF(e,t,n){e=pV(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=iG(e[r],"urn:ebu:tt:style",n);a||(a=iz(e[r],p5,n)),a||(a=pB(e[r],t,n)),a&&(i=a)}return i}function pV(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=r?iG(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e){for(r=(t=v(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=v(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}}return a}function pH(e,t){var n=pK(e.getAttribute("begin"),t),i=pK(e.getAttribute("end"),t);return e=pK(e.getAttribute("dur"),t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function pK(e,t){var n=null;if(p$.test(e)){n=Number((e=p$.exec(e))[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);a+=(Number(e[5])||0)/t.h,r+=a/t.frameRate,n=r+60*i+3600*n}else if(pJ.test(e))n=pq(pJ,e);else if(pQ.test(e))n=pq(pQ,e);else if(pZ.test(e))n=Number((e=pZ.exec(e))[1])/t.frameRate;else if(p0.test(e))n=Number((e=p0.exec(e))[1])/t.g;else if(p1.test(e))n=pq(p1,e);else if(e)throw new tr(2,2,2001,"Could not parse cue time range in TTML");return n}function pq(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function pG(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}tM["application/x-subtitle-lrc"]=function(){return new pN},p_.prototype.parseInit=function(){},p_.prototype.setSequenceMode=function(){},p_.prototype.setManifestType=function(){},p_.prototype.parseMedia=function(e,t){var n=ih(e);if(e=[],""==n)return e;var i=i5(n,"tt");if(!i)throw new tr(2,2,2005,"Failed to parse TTML.");if(!(n=i.getElementsByTagName("body")[0]))return[];var r=iz(i,p3,"frameRate"),a=iz(i,p3,"subFrameRate"),o=iz(i,p3,"frameRateMultiplier"),s=iz(i,p3,"tickRate"),u=iz(i,p3,"cellResolution"),l=i.getAttribute("xml:space")||"default",c=iz(i,p5,"extent");if("default"!=l&&"preserve"!=l)throw new tr(2,2,2005,"Invalid xml:space value: "+l);l="default"==l,r=new pG(r,a,o,s),u=u&&(u=/^(\d+) (\d+)$/.exec(u))?{Cg:parseInt(u[1],10),rows:parseInt(u[2],10)}:null,a=(a=i.getElementsByTagName("metadata")[0])?Array.from(a.childNodes).filter(function(e){return e instanceof Element}):[],o=Array.from(i.getElementsByTagName("style")),i=Array.from(i.getElementsByTagName("region")),s=[];for(var d=v(i),h=d.next();!h.done;h=d.next()){var f=h.value;h=new eH;var p=f.getAttribute("xml:id");if(p){h.id=p;var g,m,y=null;c&&(y=pz.exec(c)||pY.exec(c)),p=y?Number(y[1]):null,y=y?Number(y[2]):null,(g=pj(f,o,"extent"))&&null!=(g=(m=pz.exec(g))||pY.exec(g))&&(h.width=Number(g[1]),h.height=Number(g[2]),m||(null!=p&&(h.width=100*h.width/p),null!=y&&(h.height=100*h.height/y)),h.widthUnits=m||null!=p?eK:0,h.heightUnits=m||null!=y?eK:0),(f=pj(f,o,"origin"))&&null!=(g=(m=pz.exec(f))||pY.exec(f))&&(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2]),m||(null!=y&&(h.viewportAnchorY=100*h.viewportAnchorY/y),null!=p&&(h.viewportAnchorX=100*h.viewportAnchorX/p)),h.viewportAnchorUnits=m||null!=p?eK:0)}else h=null;h&&s.push(h)}if(iK(n,"p").length)throw new tr(2,2,2001,"<p> can only be inside <div> in TTML");for(d=(c=v(iK(n,"div"))).next();!d.done;d=c.next())if(iK(d.value,"span").length)throw new tr(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,u,l,c,d){var h,f,p,g,m=t.parentNode;if(t.nodeType==Node.COMMENT_NODE)return null;if(t.nodeType==Node.TEXT_NODE){if(!d)return null;var y=document.createElement("span");y.textContent=t.textContent}else y=t;for(var b=null,w=v(p8),x=w.next();!x.done&&!(b=pV(y,"backgroundImage",r,"#",x.value)[0]);x=w.next());if(("p"==t.nodeName||b)&&(d=!0),t=d,w="default"==(y.getAttribute("xml:space")||(u?"default":"preserve")),x=Array.from(y.childNodes).every(function(e){return e.nodeType==Node.TEXT_NODE}),u=[],!x)for(var T=v(y.childNodes),S=T.next();!S.done;S=T.next())(S=e(S.value,n,i,r,a,o,s,w,l,y,d))&&u.push(S);r=null!=c,T=/\S/.test(y.textContent);var A=y.hasAttribute("begin")||y.hasAttribute("end")||y.hasAttribute("dur");if(!(A||T||"br"==y.tagName||0!=u.length||r&&!w))return null;for(T=(S=pH(y,i)).start,S=S.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)T=(h=m,f=i,p=T,g=S,h=pH(h,f),null==p?p=h.start:null!=h.start&&(p+=h.start),null==g?g=h.end:null!=h.start&&(g+=h.start),S={start:p,end:g}).start,S=S.end,m=m.parentNode;if(null==T&&(T=0),T+=n.periodStart,S=null==S?1/0:S+n.periodStart,T=Math.max(T,n.segmentStart),S=Math.min(S,n.segmentEnd),!A&&0<u.length)for(T=1/0,S=0,i=(n=v(u)).next();!i.done;i=n.next())T=Math.min(T,(i=i.value).startTime),S=Math.max(S,i.endTime);if("br"==y.tagName)return(a=new eA(T,S,"")).lineBreak=!0,a;if(n="",x&&(n=y.textContent,w&&(n=(n=n.trim()).replace(/\s+/g," "))),(n=new eA(T,S,n)).nestedCues=u,d||(n.isContainer=!0),l&&(n.cellResolution=l),l=pV(y,"region",o,"")[0],y.hasAttribute("region")&&l&&l.getAttribute("xml:id")){var E=l.getAttribute("xml:id");n.region=s.filter(function(e){return e.id==E})[0]}return s=l,c&&r&&!y.getAttribute("region")&&!y.getAttribute("style")&&(s=pV(c,"region",o,"")[0]),function(e,t,n,i,r,a,o){if(a=a||o,"rtl"==pU(t,n,r,"direction",a)&&(e.direction="rtl"),"tb"==(o=pU(t,n,r,"writingMode",a))||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=eN),(o=pU(t,n,r,"textAlign",!0))?(e.positionAlign=p4[o],e.lineAlign=p2[o],e.textAlign=eC[o.toUpperCase()]):e.textAlign=eM,(o=pU(t,n,r,"displayAlign",!0))&&(e.displayAlign=eR[o.toUpperCase()]),(o=pU(t,n,r,"color",a))&&(e.color=o),(o=pU(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o),(o=pU(t,n,r,"border",a))&&(e.border=o),o=pU(t,n,r,"fontFamily",a))switch(o){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=o}if((o=pU(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=pU(t,n,r,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=pU(t,n,r,"lineHeight",a))&&o.match(pW)&&(e.lineHeight=o
10),(o=pU(t,n,r,"fontSize",a))&&(o.match(pW)||o.match(pX))&&(e.fontSize=o),(o=pU(t,n,r,"fontStyle",a))&&(e.fontStyle=eV[o.toUpperCase()]),i){o=i.getAttribute("imageType")||i.getAttribute("imagetype");var s=i.getAttribute("encoding");i=i.textContent.trim(),"PNG"==o&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)}switch((i=pU(t,n,r,"textOutline",a))&&((i=i.split(" "))[0].match(pW)?e.textStrokeColor=e.color:(e.textStrokeColor=i[0],i.shift()),i[0]&&i[0].match(pW)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=pU(t,n,r,"letterSpacing",a))&&i.match(pW)&&(e.letterSpacing=i),(i=pU(t,n,r,"linePadding",a))&&i.match(pW)&&(e.linePadding=i),(i=pU(t,n,r,"opacity",a))&&(e.opacity=parseFloat(i)),(i=pj(n,r,"textDecoration"))&&pO(e,i),(i=pB(t,r,"textDecoration"))&&pO(e,i),(i=pU(t,n,r,"textCombine",a))&&(e.textCombineUpright=i),pU(t,n,r,"ruby",a)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(n,y,s,b,a,t,0==u.length),n}(n,t,r,a,o,i,s,l,u,null,!1))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},W("shaka.text.TtmlTextParser",p_),p_.prototype.parseMedia=p_.prototype.parseMedia,p_.prototype.setManifestType=p_.prototype.setManifestType,p_.prototype.setSequenceMode=p_.prototype.setSequenceMode,p_.prototype.parseInit=p_.prototype.parseInit;var pz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,pX=/^(\d{1,2}(?:\.\d+)?|100)%$/,pW=/^(\d+px|\d+em|\d*\.?\d+c)$/,pY=/^(\d+)px (\d+)px$/,p$=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,pJ=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,pQ=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pZ=/^(\d*(?:\.\d*)?)f$/,p0=/^(\d*(?:\.\d*)?)t$/,p1=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),p2={left:e_,center:"center",right:"end",start:e_,end:"end"},p4={left:"line-left",center:"center",right:"line-right"},p3=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],p5=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],p8=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function p6(){this.g=new p_}function p9(){this.h=!1,this.g="UNKNOWN"}function p7(e){for(var t=v(Object.entries(eU)),n=t.next();!n.done;n=t.next()){var i=v(n.value);n=i.next().value,i=i.next().value;var r=new eA(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=v(Object.entries(ej))).next();!n.done;n=t.next())n=(i=v(n.value)).next().value,i=i.next().value,(r=new eA(0,0,"")).backgroundColor=i,e.set("."+n,r)}function ge(e,t,n){0===n.size&&p7(n);e:{for(var i=[],r=-1,a="",o=0;o<e.length;o++)if("/"===e[o]&&0<o&&"<"===e[o-1]){var s=e.indexOf(">",o);if(s<=o)break e;if((s=e.substring(o+1,s))&&"c"===s){var u=i.pop();u?u===s?(a+="/"+s+">",o+=s.length+1):u.startsWith("c.")?(o+=s.length+1,a+="/"+u+">"):a+=e[o]:a+=e[o]}else a+=e[o]}else"<"===e[o]?"c"!=e[r=o+1]&&(r=-1):">"===e[o]&&0<r&&(i.push(e.substr(r,o-r)),r=-1),a+=e[o];e=a}for(r=0,i=e,e=[],a=-1;r<i.length;r++)"<"===i[r]?a=r+1:">"===i[r]&&0<a&&((a=i.substr(a,r-a)).match(ga)&&e.push(a),a=-1);for(r=(e=v(e)).next();!r.done;r=e.next())r=r.value,i=i.replace("<"+r+">",'<div time="'+r+'">')+"</div>";e=i;e:{for(s=0,r=e,a=[],o=-1,e="",i=!1;s<r.length;s++)if("/"===r[s]){if(-1===(u=r.indexOf(">",s))){e=r;break e}if((u=r.substring(s+1,u))&&"v"==u){i=!0;var l=null;if(a.length&&(l=a[a.length-1]),l){if(l===u)e+="/"+u+">";else{if(!l.startsWith("v")){e+=r[s];continue}e+="/"+l+">"}s+=u.length+1}else e+=r[s]}else e+=r[s]}else"<"===r[s]?"v"!=r[o=s+1]&&(o=-1):">"===r[s]&&0<o&&(a.push(r.substr(o,s-o)),o=-1),e+=r[s];for(a=(r=v(a)).next();!a.done;a=r.next())o=(a=a.value).replace(" ",".voice-"),e=(e=e.replace("<"+a+">","<"+o+">")).replace("</"+a+">","</"+o+">"),i||(e+="</"+o+">")}if(i=i5("<span>"+e+"</span>","span")){if(1==(i=i.childNodes).length&&((r=i[0]).nodeType==Node.TEXT_NODE||r.nodeType==Node.CDATA_SECTION_NODE)){t.payload=gr(e);return}for(i=(e=v(i)).next();!i.done;i=e.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",t.nodeType===Node.ELEMENT_NODE&&t.nodeName)for(var a=v(t.nodeName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',i.has(s)||(s="v[voice="+u+"]")}switch(i.has(s)&&(s=i.get(s))&&(r.backgroundColor=gt(s.backgroundColor,r.backgroundColor),r.color=gt(s.color,r.color),r.fontFamily=gt(s.fontFamily,r.fontFamily),r.fontSize=gt(s.fontSize,r.fontSize),r.fontWeight=s.fontWeight,r.fontStyle=s.fontStyle,r.opacity=s.opacity,r.rubyTag=s.rubyTag,r.textCombineUpright=s.textCombineUpright,r.textShadow=s.textShadow,r.wrapLine=s.wrapLine),o){case"br":r=eE(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=700;break;case"i":r.fontStyle="italic";break;case"u":r.textDecoration.push("underline");break;case"font":(o=t.getAttribute("color"))&&(r.color=o);break;case"div":if(!(o=t.getAttribute("time")))break;
10(o=gi(new c7(o)))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(a=t.childNodes,iW(t)||1==a.length&&iW(a[0]))for(a=!0,t=(i=v(t.textContent.split("\n"))).next();!t.done;t=i.next())t=t.value,a||(a=eE(r.startTime,r.endTime),n.nestedCues.push(a)),0<t.length&&((a=r.clone()).payload=gr(t),n.nestedCues.push(a)),a=!1;else for(n.nestedCues.push(r),t=(n=v(a)).next();!t.done;t=n.next())e(t.value,r,i)}(i.value,t,n)}else t.payload=gr(e)}function gt(e,t){return e&&0<e.length?e:t}function gn(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?"middle"==(t=i[1])?e.textAlign=eM:e.textAlign=eC[t.toUpperCase()]:(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":ek)):(i=/^region:(.*)$/.exec(t))?(r=n,a=i[1],(t=(r=r.filter(function(e){return e.id==a})).length?r[0]:null)&&(e.region=t)):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=eO[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=eP,e.line=Number(n[1]),n[2]&&(e.lineAlign=eO[n[2].toUpperCase()]))}function gi(e){if(null==(e=dt(e,ga)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function gr(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\xa0","‎":"â","‏":"â"},n=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return t[e]||"'"}):e||""}tM["application/ttml+xml"]=function(){return new p_},p6.prototype.parseInit=function(e){var t=!1;if((new iT).box("moov",iS).box("trak",iS).box("mdia",iS).box("minf",iS).box("stbl",iS).O("stsd",iA).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new tr(2,2,2007)},p6.prototype.setSequenceMode=function(){},p6.prototype.setManifestType=function(){},p6.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new iT).box("mdat",iI(function(e){i=!0,r=r.concat(n.g.parseMedia(e,t))})).parse(e,!1),!i)throw new tr(2,2,2007);return r},W("shaka.text.Mp4TtmlParser",p6),p6.prototype.parseMedia=p6.prototype.parseMedia,p6.prototype.setManifestType=p6.prototype.setManifestType,p6.prototype.setSequenceMode=p6.prototype.setSequenceMode,p6.prototype.parseInit=p6.prototype.parseInit,tM['application/mp4; codecs="stpp"']=function(){return new p6},tM['application/mp4; codecs="stpp.ttml"']=function(){return new p6},tM['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new p6},tM['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new p6},p9.prototype.parseInit=function(){},p9.prototype.setSequenceMode=function(e){this.h=e},p9.prototype.setManifestType=function(e){this.g=e},p9.prototype.parseMedia=function(e,t){var n=(e=(e=ih(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new tr(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&this.h){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=n[0].match(/MPEGTS:(\d+)/m);if(i&&r){if(null==(e=gi(new c7(i[1]))))throw new tr(2,2,2e3);for(r=Number(r[1]),i=t.segmentStart-t.periodStart;95443.7176888889<=i;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}}else n[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(e=t.segmentStart);for(t=[],i=(r=v(n[0].split("\n"))).next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new c7(i);var a=new eH;dn(i),de(i);for(var o=dn(i);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),de(i),o=dn(i)}t.push(a)}for(p7(r=new Map),i=[],a=(n=v(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(u=1,s=[],o=-1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=v(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=r.get(o))||(l=new eA(0,0,""));for(var c=!1,d=0;d<u.length;d++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[d]);if(h){var f=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=f;break;case"color":c=!0,l.color=f;break;case"font-family":c=!0,l.fontFamily=f;break;case"font-size":c=!0,l.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(c=!0,l.fontWeight=700);break;case"font-style":switch(f){case"normal":c=!0,l.fontStyle=eF;break;case"italic":c=!0,l.fontStyle="italic";break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(f);break;case"text-combine-upright":c=!0,l.textCombineUpright=f;break;case"text-shadow":c=!0,l.textShadow=f;break;case"white-space":c=!0,l.wrapLine="noWrap"!=f}}}c&&r.set(o,l)}}if(c=e,1==a.length&&!a[0]||/^NOTE($|[ \t])/.test(a[0])||"STYLE"==a[0]||"REGION"==a[0])a=null;else if(s=null,a[0].includes("-->")||(s=a[0],a.splice(0,1)),u=gi(o=new c7(a[0])),d=dt(o,/[ \t]+--\x3e[ \t]+/g),l=gi(o),null==u||null==d||null==l)ee("Failed to parse VTT time code. Cue skipped:",s,a),a=null;else{for(u+=c,l+=c,c=a.slice(1).join("\n").trim(),r.has("global")?((a=r.get("global").clone()).startTime=u,a.endTime=l,a.payload=""):a=new eA(u,l,""),ge(c,a,r),de(o),u=dn(o);u;)gn(a,u,t),de(o),u=dn(o);null!=s&&(a.id=s)}a&&i.push(a)}return i},W("shaka.text.VttTextParser",p9),p9.prototype.parseMedia=p9.prototype.parseMedia,p9.prototype.setManifestType=p9.prototype.setManifestType,p9.prototype.setSequenceMode=p9.prototype.setSequenceMode,p9.prototype.parseInit=p9.prototype.parseInit;var ga=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function go(){this.g=null}function gs(){}
10function gu(e){if(null==(e=dt(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function gl(){this.g=new p9}function gc(e){var t="WEBVTT\n\n";if(""==e)return t;e=(e=e.replace(/\r+/g,"")).trim(),e=v(e.split("\n\n"));for(var n=e.next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return t}function gd(){}function gh(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function gf(e){return 3600*((e=gv.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}tM["text/vtt"]=function(){return new p9},tM['text/vtt; codecs="vtt"']=function(){return new p9},tM['text/vtt; codecs="wvtt"']=function(){return new p9},go.prototype.parseInit=function(e){var t=this,n=!1;if((new iT).box("moov",iS).box("trak",iS).box("mdia",iS).O("mdhd",function(e){e=rX(e.reader,e.version),t.g=e.timescale}).box("minf",iS).box("stbl",iS).O("stsd",iA).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new tr(2,2,2008)},go.prototype.setSequenceMode=function(){},go.prototype.setManifestType=function(){},go.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new tr(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new iT).box("moof",iS).box("traf",iS).O("tfdt",function(e){o=!0,i=rz(e.reader,e.version).baseMediaDecodeTime}).O("tfhd",function(e){l=rG(e.reader,e.flags).Hf}).O("trun",function(e){s=!0,r=rW(e.reader,e.version,e.flags).$f}).box("mdat",iI(function(e){u=!0,n=e})).parse(e,!1),!u&&!o&&!s)throw new tr(2,2,2008);e=i;for(var c=new ib(n,0),d=v(r),h=d.next();!h.done;h=d.next()){var f=(h=h.value).gf||l,p=h.Sd?i+h.Sd:e;e=p+(f||0);var g=0;do{var m=c.L();g+=m;var y=c.L(),b=null;"vttc"==iM(y)?8<m&&(b=c.mb(m-8)):c.skip(m-8),f&&b&&(m=function(e,t,n){var i,r,a;return(new iT).box("payl",iI(function(e){i=ih(e)})).box("iden",iI(function(e){r=ih(e)})).box("sttg",iI(function(e){a=ih(e)})).parse(e),i?function(e,t,n,i,r){if(i=new eA(i,r,""),ge(e,i,new Map),t&&(i.id=t),n)for(t=dn(e=new c7(n));t;)gn(i,t,[]),de(e),t=dn(e);return i}(i,r,a,t,n):null}(b,t.periodStart+p/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(tu)},W("shaka.text.Mp4VttParser",go),go.prototype.parseMedia=go.prototype.parseMedia,go.prototype.setManifestType=go.prototype.setManifestType,go.prototype.setSequenceMode=go.prototype.setSequenceMode,go.prototype.parseInit=go.prototype.parseInit,tM['application/mp4; codecs="wvtt"']=function(){return new go},gs.prototype.parseInit=function(){},gs.prototype.setSequenceMode=function(){},gs.prototype.setManifestType=function(){},gs.prototype.parseMedia=function(e){var t=ih(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=v(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){n=n.value.split("\n");var i=new c7(n[0]),r=gu(i),a=dt(i,/,/g);if(i=gu(i),null==r||null==a||null==i)throw new tr(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new eA(r,i,n.slice(1).join("\n").trim()))}return e},W("shaka.text.SbvTextParser",gs),gs.prototype.parseMedia=gs.prototype.parseMedia,gs.prototype.setManifestType=gs.prototype.setManifestType,gs.prototype.setSequenceMode=gs.prototype.setSequenceMode,gs.prototype.parseInit=gs.prototype.parseInit,tM["text/x-subviewer"]=function(){return new gs},gl.prototype.parseInit=function(){},gl.prototype.setSequenceMode=function(){},gl.prototype.setManifestType=function(){},gl.prototype.parseMedia=function(e,t){return e=ef(im(e=gc(e=ih(e)))),this.g.parseMedia(e,t)},W("shaka.text.SrtTextParser",gl),gl.srt2webvtt=gc,gl.prototype.parseMedia=gl.prototype.parseMedia,gl.prototype.setManifestType=gl.prototype.setManifestType,gl.prototype.setSequenceMode=gl.prototype.setSequenceMode,gl.prototype.parseInit=gl.prototype.parseInit,tM["text/srt"]=function(){return new gl},gd.prototype.parseInit=function(){},gd.prototype.setSequenceMode=function(){},gd.prototype.setManifestType=function(){},gd.prototype.parseMedia=function(e){var t="",n="";e=ih(e).split(/\r?\n\s*\r?\n/),e=v(e);for(var i=e.next();!i.done;i=e.next()){var r=gp.exec(i.value);r&&(i=r[1],r=r[2],"V4 Styles"==i||"V4+ Styles"==i?t=r:"Events"==i&&(n=r))}e=[],i=null,t=v(t.split(/\r?\n/));for(var a=t.next();!a.done;a=t.next())if(r=a.value,!/^\s*;
10/.test(r)&&(a=gg.exec(r))){if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(gm);else if("Style"==r){r=a.split(gm),a={};for(var o=0;o<i.length&&o<r.length;o++)a[i[o]]=r[o];e.push(a)}}for(i=[],t=null,r={},a=(n=v(n.split(/\r?\n/))).next();!a.done;r={be:r.be},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=gg.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(gm);else if("Dialogue"==a){o=o.split(gm),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];s=gf(a.Start);var u=gf(a.End);o=new eA(s,u,o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),r.be=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.be}}(r)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=gh(n))&&(e.color=n),(n=t.BackColour)&&(n=gh(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=eD,e.textAlign="start";break;case 2:e.displayAlign=eD,e.textAlign=eM;break;case 3:e.displayAlign=eD,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=eM;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=eM;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,a),i.push(o)}}return i},W("shaka.text.SsaTextParser",gd),gd.prototype.parseMedia=gd.prototype.parseMedia,gd.prototype.setManifestType=gd.prototype.setManifestType,gd.prototype.setSequenceMode=gd.prototype.setSequenceMode,gd.prototype.parseInit=gd.prototype.parseInit;var gp=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,gg=/^\s*([^:]+):\s*(.*)/,gm=/\s*,\s*/,gv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function gy(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&0<(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)?{Bd:n,P:e}:null}function gb(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var r=((192&e[t+2])>>>6)+1,a=(1&e[t+2])<<2;return{sampleRate:n[i],channelCount:a|=(192&e[t+3])>>>6,aa:"mp4a.40."+r}}function gw(e){this.i=e,this.h=0,this.g=new Map}function gx(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(3<=n)return null;var i=63&e[t+4],r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,$:e,P:r}}function gT(e){this.i=e,this.h=0,this.g=new Map}function gS(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]<<0))return null;var n=new rQ(e.subarray(t+2));r0(n,2),r0(n,3);var i=r1(n,11)+1<<1,r=r1(n,2);if(3==r){r=[24e3,22060,16e3][r=r1(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=r1(n,2);var o=r1(n,3),s=r1(n,1);return(n=r1(n,5),t+i>e.byteLength)?null:(e=Math.floor(i*r/(16*[1,2,3,6][a])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,r<<6|n<<1|0,0|o<<1|s<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,$:e,P:i})}function gA(e){this.i=e,this.h=0,this.g=new Map}tM["text/x-ssa"]=function(){return new gd},(b=gw.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&er(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(tT(t)||"mp4a.40.2")+'"':t},b.getOrginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){for(var r=ef(e),a=rq(r),o=a.length;o<r.length&&!function(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}(r,o);o++);
10if(e=1e3*n.endTime,(a=rK(a)).length&&n&&(n=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=n.data),!(n=gb(r,o)))return Promise.reject(new tr(2,3,3018));for(t.audioSamplingRate=n.sampleRate,t.channelsCount=n.channelCount,a=[];o<r.length;){var s=gy(r,o);if(!s)return Promise.reject(new tr(2,3,3018));var u=s.Bd+s.P;o+u<=r.length&&a.push({data:r.subarray(o+s.Bd,o+u),size:s.P,duration:1024,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),o+=u}return r=n.sampleRate,e=Math.floor(e*r/1e3),i={id:t.id,type:"audio",codecs:n.aa,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Ma:[],$:new Uint8Array([]),ia:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,Ha:a},stream:t},e=new dZ([i]),this.g.has(t.id)?i=this.g.get(t.id):(i=d0(e),this.g.set(t.id,i)),t=d3(e),this.h++,Promise.resolve(t=ij(i,t))},W("shaka.transmuxer.AacTransmuxer",gw),gw.prototype.transmux=gw.prototype.transmux,gw.prototype.getOrginalMimeType=gw.prototype.getOrginalMimeType,gw.prototype.convertCodecs=gw.prototype.convertCodecs,gw.prototype.isSupported=gw.prototype.isSupported,gw.prototype.destroy=gw.prototype.destroy,ez("audio/aac",function(){return new gw("audio/aac")},eY),(b=gT.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&er(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':t},b.getOrginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){e=ef(e);for(var r=rq(e),a=r.length;a<e.length&&!function(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=5;0<a;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=4278190080>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(16>r)return!0}return!1}(e,a);a++);var o=1e3*n.endTime;(r=rK(r)).length&&n&&(n=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=n.data),n=0,r=new Uint8Array([]);for(var s=[];a<e.length;){var u=gx(e,a);if(!u)return Promise.reject(new tr(2,3,3018));t.audioSamplingRate=u.sampleRate,t.channelsCount=u.channelCount,n=u.sampleRate,r=u.$,s.push({data:e.subarray(a,a+u.P),size:u.P,duration:1536,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=u.P}return e=Math.floor(o*n/1e3),i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:i,Ma:[],$:r,ia:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,Ha:s},stream:t},e=new dZ([i]),this.g.has(t.id)?i=this.g.get(t.id):(i=d0(e),this.g.set(t.i
10d,i)),t=d3(e),this.h++,Promise.resolve(t=ij(i,t))},W("shaka.transmuxer.Ac3Transmuxer",gT),gT.prototype.transmux=gT.prototype.transmux,gT.prototype.getOrginalMimeType=gT.prototype.getOrginalMimeType,gT.prototype.convertCodecs=gT.prototype.convertCodecs,gT.prototype.isSupported=gT.prototype.isSupported,gT.prototype.destroy=gT.prototype.destroy,ez("audio/ac3",function(){return new gT("audio/ac3")},eY),(b=gA.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&er(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},b.getOrginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){e=ef(e);for(var r=rq(e),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]<<0);a++);var o=1e3*n.endTime;(r=rK(r)).length&&n&&(n=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=n.data),n=0,r=new Uint8Array([]);for(var s=[];a<e.length;){var u=gS(e,a);if(!u)return Promise.reject(new tr(2,3,3018));t.audioSamplingRate=u.sampleRate,t.channelsCount=u.channelCount,n=u.sampleRate,r=u.$,s.push({data:e.subarray(a,a+u.P),size:u.P,duration:1536,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=u.P}return e=Math.floor(o*n/1e3),i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:i,Ma:[],$:r,ia:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,Ha:s},stream:t},e=new dZ([i]),this.g.has(t.id)?i=this.g.get(t.id):(i=d0(e),this.g.set(t.i
10d,i)),t=d3(e),this.h++,Promise.resolve(t=ij(i,t))},W("shaka.transmuxer.Ec3Transmuxer",gA),gA.prototype.transmux=gA.prototype.transmux,gA.prototype.getOrginalMimeType=gA.prototype.getOrginalMimeType,gA.prototype.convertCodecs=gA.prototype.convertCodecs,gA.prototype.isSupported=gA.prototype.isSupported,gA.prototype.destroy=gA.prototype.destroy,ez("audio/ec3",function(){return new gA("audio/ec3")},eY);var gE=[100,110,122,244,44,83,86,118,128,138,139,134];function gI(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==a){var o=e[t+3]>>6;r=1e3*gM[14*(3===n?3-i:3===i?3:4)+r-1],a=gC[3*(3===n?0:2===n?1:2)+a],n=gD[n][i];var s=gR[i],u=Math.floor(n*r/a+(e[t+2]>>1&1))*s,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&87>=l&&2===i&&224e3<=r&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,P:u,Hh:8*n*s}}return null}function gk(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}var gM=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],gC=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],gD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],gR=[0,1,1,4];function gN(e){this.i=e,this.h=0,this.g=new Map}function gL(e){this.h=e,this.g=null}function gP(e){this.h=e,(this.g=cJ.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var e=!0,n=0;16>n;n++)this.usertype[n]!==gO[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function g_(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}(b=gN.prototype).destroy=function(){this.g.clear()},b.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&er(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},b.getOrginalMimeType=function(){return this.i},b.transmux=function(e,t,n,i){for(n=rq(e=ef(e)).length;n<e.length;n++){var r,a=n;if(a+1<e.length&&gk(e,a)){var o=gI(e,a),s=4;o&&o.P&&(s=o.P),a+=s,a=a===e.length||a+1<e.length&&gk(e,a)}else a=!1;if(a)break}for(a=[];n<e.length;){if(!(o=gI(e,n)))return Promise.reject(new tr(2,3,3018));r||(r=o),n+o.P<=e.length&&a.push({data:e.subarray(n,n+o.P),size:o.P,duration:1152,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),n+=o.P}return r?(e=9e4*r.Hh/r.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r.sampleRate,duration:i,Ma:[],$:new Uint8Array([]),ia:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,Ha:a},stream:t},r=new dZ([i]),this.g.has(t.id)?i=this.g.get(t.id):(i=d0(r),this.g.set(t.i
10d,i)),t=d3(r),this.h++,Promise.resolve(t=ij(i,t))):Promise.reject(new tr(2,3,3018))},W("shaka.transmuxer.Mp3Transmuxer",gN),gN.prototype.transmux=gN.prototype.transmux,gN.prototype.getOrginalMimeType=gN.prototype.getOrginalMimeType,gN.prototype.convertCodecs=gN.prototype.convertCodecs,gN.prototype.isSupported=gN.prototype.isSupported,gN.prototype.destroy=gN.prototype.destroy,ez("audio/mpeg",function(){return new gN("audio/mpeg")},eY),(b=gL.prototype).destroy=function(){},b.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=tT(e).split(","),n=th("audio",t);return t=th("video",t),!!n&&!t&&"mp3"==tw(n)&&er(this.convertCodecs("audio",e))},b.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},b.getOrginalMimeType=function(){return this.h},b.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new r7,e=ef(e),"mp3"!=(e=this.g.parse(e)).Kc().audio||"audio"!=r)return Promise.reject(new tr(2,3,3018));for(r=new Uint8Array([]),t=(e=v(e.Ab())).next();!t.done;t=e.next())if(t=t.value.data)for(n=0;n<t.length;)(i=gI(t,n))?(n+i.P<=t.length&&(r=ij(r,t.subarray(n,n+i.P))),n+=i.P):n++;return Promise.resolve(r)},W("shaka.transmuxer.MpegTsTransmuxer",gL),gL.prototype.transmux=gL.prototype.transmux,gL.prototype.getOrginalMimeType=gL.prototype.getOrginalMimeType,gL.prototype.convertCodecs=gL.prototype.convertCodecs,gL.prototype.isSupported=gL.prototype.isSupported,gL.prototype.destroy=gL.prototype.destroy,ez("video/mp2t",function(){return new gL("video/mp2t")},e$),(b=gP.prototype).destroy=function(){},b.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?er(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),er(t)||er(e)))},b.convertCodecs=function(e,t){return t.replace("mss/","")},b.getOrginalMimeType=function(){return this.h},b.transmux=function(e,t,n){if(!n)return Promise.resolve(ef(e));if(!t.mssPrivateData)return Promise.reject(new tr(2,3,3020));try{var i,r=this.g.parseBuffer(e),a=r.fetch("tfhd");a.track_ID=t.id+1;var o=r.fetch("tfdt"),s=r.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=r.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var h=r.fetch("saio");if(null===h){(h=this.g.createFullBox("saio",s)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var f=this.g.createFullBox("saiz",s);if(f.version=0,f.flags=0,f.sample_count=d.sample_count,f.default_sample_info_size=0,f.sample_info_size=[],2&d.flags)for(i=0;i<d.sample_count;i+=1)f.sample_info_size[i]=10+6*d.entry[i].NumberOfEntries;else f.default_sample_info_size=8}}a.flags&=16777214,a.flags|=131072,u.flags|=1;var p=r.fetch("moof");u.data_offset=p.getLength()+8;var g=r.fetch("saio");null!==g&&(g.offset[0]=g_(p,"traf")+g_(s,"senc")+16);var m=ef(r.write());return Promise.resolve(m)}catch(e){return e instanceof tr?Promise.reject(e):Promise.reject(new tr(2,3,3022))}},W("shaka.transmuxer.MssTransmuxer",gP),gP.prototype.transmux=gP.prototype.transmux,gP.prototype.getOrginalMimeType=gP.prototype.getOrginalMimeType,gP.prototype.convertCodecs=gP.prototype.convertCodecs,gP.prototype.isSupported=gP.prototype.isSupported,gP.prototype.destroy=gP.prototype.destroy;var gO=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function gU(e){this.j=e,this.g=0,this.h=new Map,this.i=null}ez("mss/audio/mp4",function(){return new gP("mss/audio/mp4")},eY),ez("mss/video/mp4",function(){return new gP("mss/video/mp4")},eY),(b=gU.prototype).destroy=function(){this.h.clear()},b.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=tT(e).split(","),i=th("audio",n);return n=th("video",n),(!i||!!gj.includes(i=tw(i)))&&(!n||!!gB.includes(i=tw(n)))&&(t?er(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),er(t)||er(e)))},b.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=tT(t).replace("mp4a.40.34","mp3"),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},b.getOrginalMimeType=function(){return this.j},b.transmux=function(e,t,n,i,r){this.i?this.i.clearData():this.i=new r7,e=ef(e);var a=this.i.parse(e);e=[];var o=a.Kc();try{var s=null;if("video"==r){switch(o.video){case"avc":for(var u=[],l=null,c=[],d=a.bc(),h=0;h<d.length;h++){var f=d[h],p=void 0;h+1<d.length&&(p=d[h+1]);var g=a.ec(f,p);c=c.concat(g);var m=function(e){var t=!1,n=new Uint8Array([]),i=e.find(function(e){return 7==e.type}),r=!1;e=v(e);for(var a=e.next();!a.done;a=e.next()){a=a.value;var o=!1;switch(a.type){case 1:o=r=!0;var s,u=a.data;i&&4<u.length&&(r6(s=new rQ(u)),r3(s),2===(u=r3(s))||4===u||7===u||9===u)&&(t=!0);break;case 5:t=o=r=!0;break;case 6:case 7:case 8:case 12:o=!0;break;case 9:r=o=!0;break;default:o=!1}r&&o&&(o=a.ha.byteLength,(u=new Uint8Array(4))[0]=o>>24&255,u[1]=o>>16&255,u[2]=o>>8&255,u[3]=255&o,n=ij(n,u,a.ha))}return n.byteLength?{data:n,Sc:t}:null}(g);m&&(null==l&&(l=f.dts),p=void 0,p=h+1<d.length?(d[h+1].dts||0)-(f.dts||0):1<d.length?(f.dts||0)-(d[h-1].dts||0):9e4*(n.endTime-n.startTime),u.push({data:m.data,size:m.data.byteLength,duration:p,Oa:Math.round((f.pts||0)-(f.dts||0)),flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:m.Sc?2:1,Qa:m.Sc?0:1}}))}var b=function(e){if(!e.length)return null;var t=e.find(function(e){return 7==e.type});if(e=e.find(function(e){return 8==e.type}),!t||!e)return null;var n=new rQ(t.data),i=r6(n);if(r6(n),r6(n),r4(n),gE.includes(i)&&(3===(i=r3(n))&&r0(n,1),r4(n),r4(n),r0(n,1),r8(n))){i=3!==i?8:12;for(var r=0;r<i;r++)r8(n)&&(6>r?r9(n,16):r9(n,64))}if(r4(n),0===(i=r3(n)))r3(n);else if(1===i)for(r0(n,1),r4(n),r4(n),i=r3(n),r=0;r<i;r++)r4(n);r4(n),r0(n,1),i=r3(n);var a=r3(n),o=r1(n,1);0===o&&r0(n,1),r0(n,1);var s=r=0,u=0,l=0;return r8(n)&&(r=r3(n),s=r3(n),u=r3(n),l=r3(n)),n=(2-o)*(a+1)*16-2*u-2*l,i=16*(i+1)-2*r-2*s,r=[],t=t.ha,r.push(t.byteLength>>>8&255),r.push(255&t.byteLength),r=r.concat.apply(r,y(t)),t=[],e=e.ha,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,y(e)),e=new Uint8Array([1,r[3],r[4],r[5],255,225].concat(r,[1],t)),{height:n,width:i,ia:e}}(c);if(!b||null==l)throw new tr(2,3,3018);
10t.height=b.height,t.width=b.width,s={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ma:[],$:new Uint8Array([]),ia:b.ia,data:{ab:this.g,baseMediaDecodeTime:l,Ha:u},stream:t};break;case"hvc":for(m=0,d=[],f=null,g=[],u=a.bc();m<u.length;m++){l=u[m],b=void 0,m+1<u.length&&(b=u[m+1]),c=a.ec(l,b),g=g.concat(c),b=!1,h=new Uint8Array([]);var w=!1;p=v(c);for(var x=p.next();!x.done;x=p.next()){var T=x.value;switch(T.type){case 1:case 0:var S=w=!0;break;case 19:case 20:case 21:b=S=w=!0;break;case 32:case 33:case 34:case 39:case 40:S=!0;break;case 35:w=S=!0;break;default:S=!1}if(w&&S){var A=T.ha.byteLength,E=new Uint8Array(4);E[0]=A>>24&255,E[1]=A>>16&255,E[2]=A>>8&255,E[3]=255&A,h=ij(h,E,T.ha)}}var I=h.byteLength?{data:h,Sc:b}:null;I&&(null==f&&null!=l.dts&&(f=l.dts),b=void 0,b=m+1<u.length?(u[m+1].dts||0)-(l.dts||0):1<u.length?(l.dts||0)-(u[m-1].dts||0):9e4*(n.endTime-n.startTime),d.push({data:I.data,size:I.data.byteLength,duration:b,Oa:Math.round((l.pts||0)-(l.dts||0)),flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:I.Sc?2:1,Qa:I.Sc?0:1}}))}var k=function(e){if(!e.length)return null;var t,n,i,r,a,o,s,u,l,c,d=e.find(function(e){return 32==e.type}),h=e.find(function(e){return 33==e.type}),f=e.find(function(e){return 34==e.type});if(!d||!h||!f)return null;var p=(t=d.ha,n=new rQ(t,!0),r6(n),r6(n),r1(n,4),r1(n,2),r1(n,6),t=r1(n,3),n=r8(n),{Ve:t+1,qf:n});e=function(e){r6(e=new rQ(e,!0)),r6(e);var t=0,n=0,i=0,r=0;r1(e,4);var a=r1(e,3);r8(e);for(var o=r1(e,2),s=r1(e,1),u=r1(e,5),l=r6(e),c=r6(e),d=r6(e),h=r6(e),f=r6(e),p=r6(e),g=r6(e),m=r6(e),v=r6(e),y=r6(e),b=r6(e),w=[],x=[],T=0;T<a;T++)w.push(r8(e)),x.push(r8(e));if(0<a)for(T=a;8>T;T++)r1(e,2);for(T=0;T<a;T++)w[T]&&r1(e,88),x[T]&&r6(e);r3(e),3==(w=r3(e))&&r1(e,1),x=r3(e),T=r3(e),r8(e)&&(t+=r3(e),n+=r3(e),i+=r3(e),r+=r3(e));var S=r3(e),A=r3(e),E=r3(e);if(r8(e))for(var I=0;I<=a;I++)r3(e),r3(e),r3(e);else r3(e),r3(e),r3(e);if(r3(e),r3(e),r3(e),r3(e),r3(e),r3(e),r8(e)&&r8(e))for(I=0;4>I;I++)for(var k=0;k<(3===I?2:6);k++)if(r8(e)){var M=Math.min(64,1<<4+(I<<1));1<I&&r5(e);for(var C=0;C<M;C++)r5(e)}else r3(e);for(r8(e),r8(e),r8(e)&&(r6(e),r3(e),r3(e),r8(e)),I=r3(e),M=k=0;M<I;M++)if(C=!1,0!==M&&(C=r8(e)),C){M===I&&r3(e),r8(e),r3(e);for(var D=C=0;D<=k;D++){var R=r8(e),N=!1;R||(N=r8(e)),(R||N)&&C++}k=C}else{for(R=0,k=(D=r3(e))+(C=r3(e));R<D;R++)r3(e),r8(e);for(D=0;D<C;D++)r3(e),r8(e)}if(r8(e))for(I=r3(e),k=0;k<I;k++){for(M=0;M<E+4;M++)r1(e,1);r1(e,1)}if(E=0,r8(e),r8(e),r8(e)){if(r8(e)&&255===r6(e)&&(r1(e,16),r1(e,16)),r8(e)&&r8(e),r8(e)&&(r1(e,3),r8(e),r8(e)&&(r6(e),r6(e),r6(e))),r8(e)&&(r3(e),r3(e)),r8(e),r8(e),r8(e),(I=r8(e))&&(r3(e),r3(e),r3(e),r3(e)),r8(e)&&(r1(e,32),r1(e,32),r8(e)&&r3(e),r8(e))){for(M=!1,I=r8(e),k=r8(e),(I||k)&&((M=r8(e))&&(r6(e),r1(e,5),r8(e),r1(e,5)),r1(e,4),r1(e,4),M&&r1(e,4),r1(e,5),r1(e,5),r1(e,5)),C=0;C<=a;C++)if(R=!0,D=1,r8(e)||(R=r8(e)),N=!1,R?r3(e):N=r8(e),N||(D=r3(e)+1),I||k){for(R=0;R<D;R++)r3(e),r3(e),M&&(r3(e),r3(e));r8(e)}}r8(e)&&(r8(e),r8(e),r8(e),E=r3(e),r3(e),r3(e),r3(e),r3(e))}return{te:b,ze:o,Ae:s,ye:u,ue:l,ve:c,we:d,xe:h,ne:f,oe:p,pe:g,qe:m,re:v,se:y,Ld:E,je:0,ie:w,he:S,ge:A,width:x-(t+n)*(1===w||2===w?2:1),height:T-(i+r)*(1===w?2:1)}}(h.ha);var g=(i=f.ha,r=new rQ(i,!0),r6(r),r6(r),r3(r),r3(r),r8(r),r8(r),r1(r,3),r8(r),r8(r),r3(r),r3(r),r5(r),r8(r),r8(r),r8(r)&&r3(r),r5(r),r5(r),r8(r),r8(r),r8(r),r8(r),i=r8(r),r=r8(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{$e:a});return o=d.ha,s=h.ha,u=f.ha,l={Ve:p.Ve,qf:p.qf,ze:e.ze,Ae:e.Ae,te:e.te,ye:e.ye,ue:e.ue,ve:e.ve,we:e.we,xe:e.xe,ne:e.ne,oe:e.oe,pe:e.pe,qe:e.qe,re:e.re,se:e.se,je:e.je,Ld:e.Ld,ie:e.ie,he:e.he,ge:e.ge,$e:g.$e},(c=new Uint8Array(23+(5+o.byteLength)+(5+s.byteLength)+(5+u.byteLength)))[0]=1,c[1]=(3&l.ze)<<6|(l.Ae?1:0)<<5|31&l.ye,c[2]=l.ue,c[3]=l.ve,c[4]=l.we,c[5]=l.xe,c[6]=l.ne,c[7]=l.oe,c[8]=l.pe,c[9]=l.qe,c[10]=l.re,c[11]=l.se,c[12]=l.te,c[13]=240|(3840&l.Ld)>>8,c[14]=255&l.Ld,c[15]=252|3&l.$e,c[16]=252|3&l.ie,c[17]=248|7&l.he,c[18]=248|7&l.ge,c[19]=0,c[20]=0,c[21]=(3&l.je)<<6|(7&l.Ve)<<3|(l.qf?1:0)<<2|3,c[22]=3,c[23]=160,c[24]=0,c[25]=1,c[26]=(65280&o.byteLength)>>8,c[27]=(255&o.byteLength)>>0,c.set(o,28),c[23+(5+o.byteLength)]=161,c[o.byteLength+29]=0,c[o.byteLength+30]=1,c[o.byteLength+31]=(65280&s.b
10yteLength)>>8,c[o.byteLength+32]=(255&s.byteLength)>>0,c.set(s,o.byteLength+33),c[23+(o.byteLength+10+s.byteLength)]=162,c[o.byteLength+10+s.byteLength+24]=0,c[o.byteLength+10+s.byteLength+25]=1,c[o.byteLength+10+s.byteLength+26]=(65280&u.byteLength)>>8,c[o.byteLength+10+s.byteLength+27]=(255&u.byteLength)>>0,c.set(u,o.byteLength+10+s.byteLength+28),d=c,{height:e.height,width:e.width,ia:d}}(g);if(!k||null==f)throw new tr(2,3,3018);t.height=k.height,t.width=k.width,s={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ma:[],$:new Uint8Array([]),ia:k.ia,data:{ab:this.g,baseMediaDecodeTime:f,Ha:d},stream:t}}s&&(e.push(s),s=null)}if("audio"==r){switch(o.audio){case"aac":for(var M,C=[],D=null,R=v(a.Ab()),N=R.next();!N.done;N=R.next()){var L=N.value,P=L.data;if(P){var _=0;if(!(M=gb(P,_)))throw new tr(2,3,3018);for(t.audioSamplingRate=M.sampleRate,t.channelsCount=M.channelCount,null==D&&null!==L.pts&&(D=L.pts);_<P.length;){var O=gy(P,_);if(O){var U=O.Bd+O.P;_+U<=P.length&&C.push({data:P.subarray(_+O.Bd,_+U),size:O.P,duration:1024,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),_+=U}else _++}}}if(!M||null==D){if(!a.bc().length)throw new tr(2,3,3018);D=9e4*n.startTime;var j=th("audio",t.codecs.split(","));if(!j||!t.channelsCount||!t.audioSamplingRate)throw new tr(2,3,3018);M={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,aa:j};var B=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}(j,t.channelsCount);if(!B)throw new tr(2,3,3018);var F=D+9e4*(n.endTime-n.startTime);for(a=D;a<F;)C.push({data:B,size:B.byteLength,duration:1024,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=1024/M.sampleRate*9e4}var V=M.sampleRate;a=D/9e4*V,s={id:t.id,type:"audio",codecs:M.aa,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:V,duration:i,Ma:[],$:new Uint8Array([]),ia:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,Ha:C},stream:t};break;case"ac3":M=[],V=0,C=new Uint8Array([]),D=null,_=v(a.Ab());for(var H=_.next();!H.done;H=_.next()){var K=H.value,q=K.data;for(null==D&&null!==K.pts&&(D=K.pts),a=0;a<q.length;){var G=gx(q,a);G?(t.audioSamplingRate=G.sampleRate,t.channelsCount=G.channelCount,V=G.sampleRate,C=G.$,M.push({data:q.subarray(a,a+G.P),size:G.P,duration:1536,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=G.P):a++}}if(0==V||0==C.byteLength||null==D)throw new tr(2,3,3018);a=D/9e4*V,s={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:V,duration:i,Ma:[],$:C,ia:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,Ha:M},stream:t};break;case"ec3":M=[],V=0,D=new Uint8Array([]),C=null;for(var z=v(a.Ab()),X=z.next();!X.done;X=z.next()){var W=X.value,Y=W.data;for(null==C&&null!==W.pts&&(C=W.pts),a=0;a<Y.length;){var $=gS(Y,a);$?(t.audioSamplingRate=$.sampleRate,t.channelsCount=$.channelCount,V=$.sampleRate,D=$.$,M.push({data:Y.subarray(a,a+$.P),size:$.P,duration:1536,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=$.P):a++}}if(0==V||0==D.byteLength||null==C)throw new tr(2,3,3018);a=C/9e4*V,s={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:V,duration:i,Ma:[],$:D,ia:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,Ha:M},stream:t};break;case"mp3":M=[],V=null;for(var J,Q=v(a.Ab()),Z=Q.next();!Z.done;Z=Q.next()){var ee=Z.value,et=ee.data;if(et)for(null==V&&null!==ee.pts&&(V=ee.pts),a=0;a<et.length;){var en=gI(et,a);en?(J||(J=en),a+en.P<=et.length&&M.push({data:et.subarray(a,a+en.P),size:en.P,duration:1152,Oa:0,flags:{Pa:0,Fa:0,Da:0,Aa:0,Ba:2,Qa:0}}),a+=en.P):a++}}if(!J||null==V)throw new tr(2,3,3018);var ei=J.sampleRate;a=V/9e4*ei,s={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ei,duration:i,Ma:[],$:new Uint8Array([]),ia:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,Ha:M},stream:t}}s&&e.push(s)}}catch(e){return Promise.reject(e)}return e.length?(e=new dZ(e),this.h.has(t.id)?i=this.h.get(t.id):(i=d0(e),this.h.set(t.id,i)),t=d3(e),this.g++,Promise.resolve(t=ij(i,t))):Promise.reject(new tr(2,3,3018))},W("shaka.transmuxer.TsTransmuxer",gU),gU.prototype.transmux=gU.prototype.transmux,gU.prototype.getOrginalMimeType=gU.prototype.getOrginalMimeType,gU.prototype.convertCodecs=gU.prototype.convertCodecs,gU.prototype.isSupported=gU.prototype.isSupported,gU.prototype.destroy=gU.prototype.destroy;var gj=["aac","ac-3","ec-3","mp3"],gB=["avc","hevc"];function gF(){}function gV(){d?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(d=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=gH):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function gH(e,t){var n,i=this;
10return F(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),M(r,d.call(i,e,t),2)):gQ(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=d,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=gK,r.return(gK.call(i,e,t)))})}function gK(e,t){var n,i,r,a,o,s,u,l,c,h,f=this;return F(function(p){if(1==p.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=gJ(e),i=[],a=(r=v(t)).next();!a.done;a=r.next())s=gq((o=a.value).videoCapabilities,n),u=gq(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((l=Object.assign({},o)).videoCapabilities=s,l.audioCapabilities=u,i.push(l));if(!i.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return M(p,d.call(f,e,i),2)}return h=p.h,p.return(new g$(h,n))})}function gq(e,t){return e?e.filter(function(e){return!e.encryptionScheme||e.encryptionScheme==t}):e}function gG(){}function gz(){h?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(h=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=gX):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function gX(e){var t,n,i,r=this;return F(function(a){switch(a.g){case 1:return console.assert(r==navigator.mediaCapabilities,'bad "this" for decodingInfo'),M(a,h.call(r,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&gQ(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=h,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=gW,n){a.B(3);break}return i=t,M(a,gY(e),4);case 4:return i.keySystemAccess=a.h,a.return(t);case 3:return a.return(gW.call(r,e))}})}function gW(e){var t,n,i,r,a,o,s,u,l=this;return F(function(c){switch(c.g){case 1:return console.assert(l==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(i=(n=e.keySystemConfiguration).keySystem,r=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=gJ(i),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},r&&r!=t||a&&a!=t)?c.return(o):M(c,h.call(l,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new g$(s.keySystemAccess,t),c.B(3);break}if(!e.keySystemConfiguration){c.B(3);break}return u=s,M(c,gY(e),5);case 5:u.keySystemAccess=c.h;case 3:return c.return(s)}})}function gY(e){var t,n;return F(function(i){if(1==i.g){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},a.length&&(r.audioCapabilities=a),o.length&&(r.videoCapabilities=o),t=r,M(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function g$(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function gJ(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function gQ(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function gZ(){}function g0(){gV(),gz()}ez("video/mp2t",function(){return new gU("video/mp2t")},eJ),W("EmeEncryptionSchemePolyfill",gF),gF.install=gV,W("McEncryptionSchemePolyfill",gG),gG.install=gz,g$.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=v(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=v(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},g$.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},W("EncryptionSchemePolyfills",gZ),gZ.install=g0,void 0!==n&&n.exports&&(n.exports=gZ)}).call(i,e,e,void 0),i.shaka)t[r]=i.shaka[r]}()}}]);
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.