livefootballtv-tizen 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ !function(){var e="undefined"!=typeof window?window:global,t={};if(!function(q,r,a){function o(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var u="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var l=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof q&&q,"object"==typeof self&&self,"object"==typeof r&&r];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function s(e,t){if(t)e:{var n=l;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&&u(n,e,{configurable:!0,writable:!0,value:t})}}function c(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function we(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:o(e)}}function le(e){if(!(e instanceof Array)){e=we(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",function(e){function n(e,t){this.g=e,u(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new n(i+(t||"")+"_"+r++,t)}}),s("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 i=l[t[n]];"function"==typeof i&&"function"!=typeof i.prototype[e]&&u(i.prototype,e,{configurable:!0,writable:!0,value:function(){return c(o(this))}})}return e});var e,d,f="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)e=Object.setPrototypeOf;else{e:{var p={};try{p.__proto__={a:!0},d=p.a;break e}catch(e){}d=!1}e=d?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var g=e;function m(e,t){if(e.prototype=f(t.prototype),e.prototype.constructor=e,g)g(e,t);else for(var n in t){var i;"prototype"!=n&&(Object.defineProperties?(i=Object.getOwnPropertyDescriptor(t,n))&&Object.defineProperty(e,n,i):e[n]=t[n])}e.ej=t.prototype}function v(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function y(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}function w(e,t){e.i={Mf:t,Xf:!0},e.g=e.m||e.j}function xe(e,t,n){return e.g=n,{value:t}}function Te(e){e.g=0}function Se(e,t,n){e.m=t,null!=n&&(e.j=n)}function M(e,t){e.m=0,e.j=t||0}function Ae(e,t,n){e.g=t,e.m=n||0}function Ee(e,t){return e.m=t||0,t=e.i.Mf,e.i=null,t}function Ce(e){e.u=[e.i],e.m=0,e.j=0}function Me(e,t){var n=e.u.splice(0)[0];(n=e.i=e.i||n)?n.Xf?e.g=e.m||e.j:null!=n.B&&e.j<n.B?(e.g=n.B,e.i=null):e.g=e.j:e.g=t}function x(e){this.g=new v,this.h=e}function S(t,e,n,i){try{var r=e.call(t.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return t.g.o=!1,r;var a=r.value}catch(e){return t.g.l=null,w(t.g,e),A(t)}return t.g.l=null,i.call(t.g,a),A(t)}function A(t){for(;t.g.g;)try{var e=t.h(t.g);if(e)return t.g.o=!1,{value:e.value,done:!1}}catch(e){t.g.h=void 0,w(t.g,e)}if(t.g.o=!1,t.g.i){if(e=t.g.i,t.g.i=null,e.Xf)throw e.Mf;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function E(i){this.next=function(e){return y(i.g),e=i.g.l?S(i,i.g.l.next,e,i.g.s):(i.g.s(e),A(i))},this.throw=function(e){return y(i.g),e=i.g.l?S(i,i.g.l.throw,e,i.g.s):(w(i.g,e),A(i))},this.return=function(e){return e=e,y((t=i).g),(n=t.g.l)?S(t,"return"in n?n.return:function(e){return{value:e,done:!0}},e,t.g.return):(t.g.return(e),A(t));var t,n},this[Symbol.iterator]=function(){return this}}function C(t){function r(e){return t.next(e)}function a(e){return t.throw(e)}return new Promise(function(n,i){!function e(t){t.done?n(t.value):Promise.resolve(t.value).then(r,a).then(e,i)}(t.next())})}function Ie(e){return C(new E(new x(e)))}function D(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e,t,n){for(var i=(e=e instanceof String?String(e):e).length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{Uf:r,v:a}}return{Uf:-1,v:void 0}}function _(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function j(t,n){t instanceof String&&(t+="");var i=0,r=!1,e={next:function(){var e;return!r&&i<t.length?(e=i++,{value:n(e,t[e]),done:!1}):{done:r=!0,value:void 0}}};return e[Symbol.iterator]=function(){return e},e}v.prototype.s=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.B=function(e){this.g=e},s("Promise",function(e){function o(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 t(){this.g=null}function s(t){return t instanceof o?t:new o(function(e){e(t)})}if(e)return e;t.prototype.h=function(e){var t;null==this.g&&(this.g=[],(t=this).i(function(){t.l()})),this.g.push(e)};var n=l.setTimeout,r=(t.prototype.i=function(e){n(e,0)},t.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},t.prototype.j=function(e){this.i(function(){throw e})},o.prototype.j=function(){function e(t){return function(e){i||(i=!0,t.call(n,e))}}var n=this,i=!1;return{resolve:e(this.F),reject:e(this.l)}},o.prototype.F=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof o)this.H(e);else{switch(typeof e){case"object":var t=null!=e;break;case"function":t=!0;break;default:t=!1}t?this.C(e):this.m(e)}},o.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.I(t,e):this.m(e)},o.prototype.l=function(e){this.s(2,e)},o.prototype.m=function(e){this.s(1,e)},o.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()},o.prototype.G=function(){var t=this;n(function(){var e;t.A()&&void 0!==(e=l.console)&&e.error(t.i)},1)},o.prototype.A=function(){if(this.o)return!1;var e=l.CustomEvent,t=l.Event,n=l.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=l.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},o.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)r.h(this.g[e]);this.g=null}},new t);return o.prototype.H=function(e){var t=this.j();e.rd(t.resolve,t.reject)},o.prototype.I=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},o.prototype.then=function(e,t){function n(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(e){r(e)}}:e}var i,r,a=new o(function(e,t){i=e,r=t});return this.rd(n(e,i),n(t,r)),a},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.rd=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?r.h(n):this.g.push(n),this.o=!0},o.resolve=s,o.reject=function(n){return new o(function(e,t){t(n)})},o.race=function(r){return new o(function(e,t){for(var n=we(r),i=n.next();!i.done;i=n.next())s(i.value).rd(e,t)})},o.all=function(e){var t=we(e),a=t.next();return a.done?s([]):new o(function(n,e){for(var i=[],r=0;i.push(void 0),r++,s(a.value).rd(function(t){return function(e){i[t]=e,0==--r&&n(i)}}(i.length-1),e),!(a=t.next()).done;);})},o}),s("WeakMap",function(i){function e(e){if(this.g=(s+=Math.random()+1).toString(),e){e=we(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"==t&&null!==e||"function"==t}function a(e){var t;R(e,o)||(t=new n,u(e,o,{value:t}))}function t(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&a(e),t(e))})}if(function(){if(i&&Object.seal)try{var e=Object.seal({}),t=Object.seal({}),n=new i([[e,2],[t,3]]);return 2!=n.get(e)||3!=n.get(t)?void 0:(n.delete(e),n.set(t,4),!n.has(e)&&4==n.get(t))}catch(e){return}}())return i;var o="$jscomp_hidden_"+Math.random(),s=(t("freeze"),t("preventExtensions"),t("seal"),0);return e.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(a(e),R(e,o))return e[o][this.g]=t,this;throw Error("WeakMap key fail: "+e)},e.prototype.get=function(e){return r(e)&&R(e,o)?e[o][this.g]:void 0},e.prototype.has=function(e){return r(e)&&R(e,o)&&R(e[o],this.g)},e.prototype.delete=function(e){return!!(r(e)&&R(e,o)&&R(e[o],this.g))&&delete e[o][this.g]},e}),s("Map",function(r){function n(){var e={};return e.sb=e.next=e.head=e}function e(e,t){var n=e.g;return c(function(){if(n){for(;n.head!=e.g;)n=n.sb;if(n.next!=n.head)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}})}function i(e,t){var n=t&&typeof t,i=("object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t,e.h[n]);if(i&&R(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 t(e){if(this.h={},this.g=n(),this.size=0,e){e=we(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}if(function(){if(r&&"function"==typeof r&&r.prototype.entries&&"function"==typeof Object.seal)try{var e=Object.seal({x:4}),t=new r(we([[e,"s"]]));if("s"!=t.get(e)||1!=t.size||t.get({x:4})||t.set({x:4},"t")!=t||2!=t.size)return;var n=t.entries(),i=n.next();return i.done||i.value[0]!=e||"s"!=i.value[1]?void 0:!((i=n.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!n.next().done)}catch(e){return}}())return r;var a=new WeakMap,o=(t.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,sb:this.g.sb,head:this.g,key:e,value:t},n.list.push(n.entry),this.g.sb.next=n.entry,this.g.sb=n.entry,this.size++),this},t.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.sb.next=e.entry.next,e.entry.next.sb=e.entry.sb,e.entry.head=null,this.size--,!0)},t.prototype.clear=function(){this.h={},this.g=this.g.sb=n(),this.size=0},t.prototype.has=function(e){return!!i(this,e).entry},t.prototype.get=function(e){return(e=i(this,e).entry)&&e.value},t.prototype.entries=function(){return e(this,function(e){return[e.key,e.value]})},t.prototype.keys=function(){return e(this,function(e){return e.key})},t.prototype.values=function(){return e(this,function(e){return e.value})},t.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)},t.prototype[Symbol.iterator]=t.prototype.entries,0);return t}),s("Set",function(r){function e(e){if(this.g=new Map,e){e=we(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(r&&"function"==typeof r&&r.prototype.entries&&"function"==typeof Object.seal)try{var e=Object.seal({x:4}),t=new r(we([e]));if(!t.has(e)||1!=t.size||t.add(e)!=t||1!=t.size||t.add({x:4})!=t||2!=t.size)return;var n=t.entries(),i=n.next();return i.done||i.value[0]!=e||i.value[1]!=e?void 0:!(i=n.next()).done&&i.value[0]!=e&&4==i.value[0].x&&i.value[1]==i.value[0]&&n.next().done}catch(e){return}}()?r:(e.prototype.add=function(e){return this.g.set(e=0===e?0:e,e),this.size=this.g.size,this},e.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},e.prototype.clear=function(){this.g.clear(),this.size=0},e.prototype.has=function(e){return this.g.has(e)},e.prototype.entries=function(){return this.g.entries()},e.prototype.keys=e.prototype.values=function(){return this.g.values()},e.prototype[Symbol.iterator]=e.prototype.values,e.prototype.forEach=function(t,n){var i=this;this.g.forEach(function(e){return t.call(n,e,e,i)})},e)}),s("Array.prototype.findIndex",function(e){return e||function(e,t){return L(this,e,t).Uf}}),s("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),s("Array.prototype.includes",function(e){return e||function(e,t){var n=this,i=(n=n instanceof String?String(n):n).length;for((t=t||0)<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}}),s("String.prototype.includes",function(e){return e||function(e,t){return-1!==_(this,e,"includes").indexOf(e,t||0)}}),s("Array.prototype.find",function(e){return e||function(e,t){return L(this,e,t).v}}),s("String.prototype.startsWith",function(e){return e||function(e,t){var n=_(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 r<=a}}),s("Array.prototype.keys",function(e){return e||function(){return j(this,function(e){return e})}}),s("WeakSet",function(i){function e(e){if(this.g=new WeakMap,e){e=we(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return function(){if(i&&Object.seal)try{var e=Object.seal({}),t=Object.seal({}),n=new i([e]);return!n.has(e)||n.has(t)?void 0:(n.delete(e),n.add(t),!n.has(e)&&n.has(t))}catch(e){return}}()?i:(e.prototype.add=function(e){return this.g.set(e,!0),this},e.prototype.has=function(e){return this.g.has(e)},e.prototype.delete=function(e){return this.g.delete(e)},e)}),s("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}});var O="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)R(i,r)&&(e[r]=i[r])}return e},B=(s("Object.assign",function(e){return e||O}),s("Array.prototype.values",function(e){return e||function(){return j(this,function(e,t){return t})}}),s("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(e){return Promise.resolve(t()).then(function(){return e})},function(e){return Promise.resolve(t()).then(function(){throw e})})}}),s("Array.prototype.entries",function(e){return e||function(){return j(this,function(e,t){return[e,t]})}}),s("String.prototype.repeat",function(e){return e||function(e){var t=_(this,null,"repeat");if(e<0||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),s("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),s("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}}),s("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)R(e,t)&&n.push(e[t]);return n}}),s("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),s("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),s("Math.trunc",function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return e<0?-t:t}}),s("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)R(e,t)&&n.push([t,e[t]]);return n}}),this||self);function t(e,t){e=e.split(".");var n,i=B;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;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 F(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function H(e){return e.h/(1-Math.pow(e.g,e.i))}function G(){this.h=new F(2),this.j=new F(5),this.g=0,this.i=128e3,this.l=16e3}function K(){}function Y(){}function X(){}function $(e){var t=D.apply(1,arguments);Q.has(e)||(Q.add(e),X.apply(K,le(t)))}function J(){}F.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)},G.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)},G.prototype.sample=function(e,t){var n;t<this.l||(n=8e3*t/e,e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n))},G.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(H(this.h),H(this.j))};var Q=new Set;function Z(e){return te.has(e)?te.get(e):q.ManagedMediaSource?(t=ManagedMediaSource.isTypeSupported(e),te.set(e,t),t):!!q.MediaSource&&(t=MediaSource.isTypeSupported(e),te.set(e,t),t);var t}function ee(){return!!q.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}q.console&&(X=function(){return console.warn.apply(console,le(D.apply(0,arguments)))},Y=function(){console.error.apply(console,le(D.apply(0,arguments)))});var te=new Map;function se(){}function ue(){}function ge(){}function me(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(ve(e)==ve(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=ne(e);t=ne(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ve(e){return e instanceof ArrayBuffer?e:e.buffer}function ye(e){return e instanceof ArrayBuffer?e:(0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e:new Uint8Array(e)).buffer}function ne(e,t,n){return Re(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function be(e,t,n){return Re(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function De(e,t,n){return Re(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function Re(e,t,n,i){var r=ve(e),a=1,o=("BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT),((e.byteOffset||0)+e.byteLength)/a);return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function Le(){}function Ne(e){this.l=new ue,(e=Pe[e.toLowerCase()])&&(this.l=e()),this.g=new se,(e=_e)&&(this.g=e())}se.prototype.extract=function(){},se.prototype.decode=function(){return[]},se.prototype.clear=function(){},se.prototype.getStreams=function(){return[]},ue.prototype.init=function(){},ue.prototype.parse=function(){return[]},t("shaka.util.BufferUtils",ge),ge.toDataView=De,ge.toUint16=be,ge.toUint8=ne,ge.toArrayBuffer=ye,ge.equal=me,Le.prototype.init=function(){},Le.prototype.i=function(){},Le.prototype.h=function(){},Le.prototype.j=function(){},t("shaka.media.IClosedCaptionParser",Le),Ne.prototype.init=function(e){this.l.init(e)},Ne.prototype.i=function(e){for(var t=(e=we(e=this.l.parse(e))).next();!t.done;t=e.next()){var n=ne((t=t.value).packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},Ne.prototype.h=function(){this.g.clear()},Ne.prototype.j=function(){return this.g.getStreams()},t("shaka.media.ClosedCaptionParser",Ne),Ne.findDecoder=function(){return _e},Ne.unregisterDecoder=function(){_e=null},Ne.registerDecoder=function(e){_e=e},Ne.findParser=function(e){return Pe[e]},Ne.unregisterParser=function(e){delete Pe[e]},Ne.registerParser=function(e,t){Pe[e]=t};var Pe={},_e=null;function je(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Oe(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function Ue(e,t,n){if(n=n||je,e.length!=t.length)return!1;t=t.slice();for(var i={},r=(e=we(e)).next();!r.done;i={ae:i.ae},r=e.next()){if(i.ae=r.value,-1==(r=t.findIndex(function(t){return function(e){return n(t.ae,e)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function Be(e,t,n){if(n=n||je,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 T(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new it,this.position=null,this.positionAlign=He,this.size=0,this.textAlign=Ge,this.direction=ze,this.writingMode=We,this.lineInterpretation=Ye,this.line=null,this.lineHeight="",this.lineAlign=$e,this.displayAlign=qe,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=et,this.fontStyle=tt,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={Kb:32,rows:15}}function Fe(e,t){return(e=new T(e,t,"")).lineBreak=!0,e}function Ve(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(!Be(e.nestedCues,t.nestedCues,Ve))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(!Be(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}T.prototype.clone=function(){var e,t=new T(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},t("shaka.text.Cue",T),T.equal=Ve;var He="auto",Ge=(T.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:He},"center"),Ke={LEFT:"left",RIGHT:"right",CENTER:Ge,START:"start",END:"end"},qe=(T.textAlign=Ke,"after"),Xe={BEFORE:"before",CENTER:"center",AFTER:qe},ze=(T.displayAlign=Xe,"ltr"),We=(T.direction={HORIZONTAL_LEFT_TO_RIGHT:ze,HORIZONTAL_RIGHT_TO_LEFT:"rtl"},"horizontal-tb"),Ye=(T.writingMode={HORIZONTAL_TOP_TO_BOTTOM:We,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"},0),$e=(T.lineInterpretation={LINE_NUMBER:Ye,PERCENTAGE:1},"start"),Je={CENTER:"center",START:$e,END:"end"},Qe=(T.lineAlign=Je,{white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"}),Ze=(T.defaultTextColor=Qe,{bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"}),et=(T.defaultTextBackgroundColor=Ze,400),tt=(T.fontWeight={NORMAL:et,BOLD:700},"normal"),nt={NORMAL:tt,ITALIC:"italic",OBLIQUE:"oblique"};function it(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=rt,this.scroll=at}T.fontStyle=nt,T.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},t("shaka.text.CueRegion",it);var rt=1,at=(it.units={PX:0,PERCENTAGE:rt,LINES:2},"");function ot(){}function st(e,t,n){lt[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,Vd:t}}function ut(e,t){for(var n=e.toLowerCase().split(";")[0],i=we([ft,ht,dt,ct]),r=i.next();!r.done;r=i.next())if(r=lt[n+"-"+r.value]){var a=r.Vd(),o=a.isSupported(e,t);if(a.destroy(),o)return r.Vd}return null}it.scrollMode={NONE:at,UP:"up"},ot.prototype.destroy=function(){},t("shaka.transmuxer.TransmuxerEngine",ot),ot.findTransmuxer=ut,ot.unregisterTransmuxer=function(e,t){delete lt[e.toLowerCase().split(";")[0]+"-"+t]},ot.registerTransmuxer=st;var lt={},ct=1,dt=2,ht=3,ft=4,pt=(ot.PluginPriority={FALLBACK:ct,PREFERRED_SECONDARY:dt,PREFERRED:ht,APPLICATION:ft},RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"));function gt(e){e instanceof gt?(mt(this,e.ab),this.Wb=e.Wb,vt(this,e.ob),yt(this,e.nc),this.Ga=e.Ga,bt(this,e.g.clone()),this.Lb=e.Lb):e&&(e=String(e).match(pt))?(mt(this,e[1]||"",!0),this.Wb=wt(e[2]||""),vt(this,e[3]||"",!0),yt(this,e[4]),this.Ga=wt(e[5]||"",!0),bt(this,e[6]||"",!0),this.Lb=wt(e[7]||"")):this.g=new Ct(null)}function mt(e,t,n){e.ab=n?wt(t,!0):t,e.ab&&(e.ab=e.ab.replace(/:$/,""))}function vt(e,t,n){e.ob=n?wt(t,!0):t}function yt(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.nc=t}else e.nc=null}function bt(e,t,n){t instanceof Ct?e.g=t:(n||(t=xt(t,It)),e.g=new Ct(t))}function wt(e,t){return e?(t?decodeURI:decodeURIComponent)(e):""}function xt(e,t,n){return null!=e?(e=encodeURI(e).replace(t,Tt),e=n?e.replace(/%25([0-9a-fA-F]{2})/g,"%$1"):e):null}function Tt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(e=gt.prototype).ab="",e.Wb="",e.ob="",e.nc=null,e.Ga="",e.Lb="",e.toString=function(){var e,t=[],n=this.ab;return n&&t.push(xt(n,St,!0),":"),(n=this.ob)&&(t.push("//"),(e=this.Wb)&&t.push(xt(e,St,!0),"@"),t.push(encodeURIComponent(n).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.nc)&&t.push(":",String(n))),(n=this.Ga)&&(this.ob&&"/"!=n.charAt(0)&&t.push("/"),t.push(xt(n,"/"==n.charAt(0)?Et:At,!0))),(n=this.g.toString())&&t.push("?",n),(n=this.Lb)&&t.push("#",xt(n,kt)),t.join("")},e.resolve=function(e){var t=this.clone(),n=("data"===t.ab&&(t=new gt),!!e.ab),i=(n?mt(t,e.ab):n=!!e.Wb,n?t.Wb=e.Wb:n=!!e.ob,n?vt(t,e.ob):n=null!=e.nc,e.Ga);if(n)yt(t,e.nc);else if(n=!!e.Ga)if("/"!=i.charAt(0)&&(this.ob&&!this.Ga?i="/"+i:-1!=(r=t.Ga.lastIndexOf("/"))&&(i=t.Ga.substr(0,r+1)+i)),".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){for(var r=0==i.lastIndexOf("/",0),i=i.split("/"),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.Ga=i:n=""!==e.g.toString(),n?bt(t,e.g.clone()):n=!!e.Lb,n&&(t.Lb=e.Lb),t},e.clone=function(){return new gt(this)};var St=/[#\/\?@]/g,At=/[#\?:]/g,Et=/[#\?]/g,It=/[#\?@]/g,kt=/#/g;function Ct(e){this.g=e||null}function Mt(e){if(!e.xa&&(e.xa={},e.Nc=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i,r=t[n].indexOf("="),a=null;0<=r?(i=t[n].substring(0,r),a=t[n].substring(r+1)):i=t[n],i=decodeURIComponent(i.replace(/\+/g," ")),a=a||"",e.add(i,decodeURIComponent(a.replace(/\+/g," ")))}}function Dt(e){return Mt(e),e.Nc}function ke(e,t,n){var i=D.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,Rt)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(e=Ct.prototype).xa=null,e.Nc=null,e.add=function(e,t){Mt(this),this.g=null;var n=this.xa.hasOwnProperty(e)?this.xa[e]:null;return n||(this.xa[e]=n=[]),n.push(t),this.Nc++,this},e.set=function(e,t){return Mt(this),this.g=null,this.xa.hasOwnProperty(e)?this.xa[e]=[t]:this.add(e,t),this},e.get=function(e){return Mt(this),this.xa[e]||[]},e.toString=function(){if(this.g)return this.g;if(!this.xa)return"";var e,t=[];for(e in this.xa)for(var n=encodeURIComponent(e),i=this.xa[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},e.clone=function(){var e=new Ct;if(e.g=this.g,this.xa){var t,n={};for(t in this.xa)n[t]=this.xa[t].concat();e.xa=n,e.Nc=this.Nc}return e},ke.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},t("shaka.util.Error",ke);var Rt=!0;function Lt(e,t){if(0==t.length)return e;if(1==e.length&&1==t.length)return n=new gt(e[0]),t=new gt(t[0]),[n.resolve(t).toString()];t=t.map(function(e){return new gt(e)});for(var n=[],i=(e=we(e)).next();!i.done;i=e.next())for(var i=new gt(i.value),r=we(t),a=r.next();!a.done;a=r.next())n.push(i.resolve(a.value).toString());return n}function Nt(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function Pt(e,t){if(1==t.length)return t[0];if(null!=(e=_t(e,t)))return e;throw new ke(2,4,4025,t)}function _t(e,t){for(var n=we(Ot[e]),i=n.next();!i.done;i=n.next())for(var i=i.value,r=we(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim();return e==ce?"":null}ke.Severity={RECOVERABLE:1,CRITICAL:2},ke.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},ke.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,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,TRANSMUXING_NO_VIDEO_DATA:3023,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_LIMIT: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 ce="text",jt={$:"video",P:"audio",na:ce,he:"image",fi:"application"},Ot={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ut(){}function Bt(e,t){var n=e;return t&&!zt.includes(e)&&(n+='; codecs="'+t+'"'),n}function Ft(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Vt(e,t,n){var i=Bt(e,t);return ut(t=Ft(e,t))?(e=ut(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function Ht(e){var t=Xt(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 Gt(e){for(var t=[],n=(e=we(e.split(","))).next();!n.done;n=e.next())n=Xt(n.value),t.push(n[0]);return t.sort().join(",")}function Kt(e){return e.split(";")[0]}function qt(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Xt(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}t("shaka.util.MimeUtils",Ut),Ut.getFullTypeWithAllCodecs=Ft,Ut.getFullType=Bt,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var zt=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Wt(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 Yt(e){return!!Qt[e]||("application/cea-608"==e||"application/cea-708"==e)&&!!_e}function $t(e,t,n){if(e.A=t,t=e.o.get(t))for(var i=we(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)}function Jt(e,t,n,i,r){for(var a=n+" "+i,o=new Map,s=(t=we(t)).next();!s.done;s=t.next()){var s=(u=s.value).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;for(var r=(n=we(n.nestedCues)).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=we(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=we(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))}Wt.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},Wt.prototype.remove=function(t,n){var i=this;return Ie(function(e){if(1==e.g)return xe(e,Promise.resolve(),2);!i.j||!i.j.remove(t,n)||null==i.g||n<=i.g||t>=i.h||(t<=i.g&&n>=i.h?i.g=i.h=null:t<=i.g&&n<i.h?i.g=n:t>i.g&&n>=i.h&&(i.h=t)),Te(e)})},t("shaka.text.TextEngine",Wt),Wt.findParser=function(e){return Qt[e]},Wt.unregisterParser=function(e){delete Qt[e]},Wt.registerParser=function(e,t){Qt[e]=t};var Qt={};function Zt(e,t){return e.concat(t)}function en(){}function tn(e){return null!=e}function nn(){}function rn(e,t){return e=de(e),t=de(t),e.split("-")[0]==t.split("-")[0]}function an(e,t){return e=de(e),t=de(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function on(e,t){return e=de(e),t=de(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function de(e){var t=void 0===(t=(e=we(e.split("-x-"))).next().value)?"":t,n=(e=void 0===(e=e.next().value)?"":e,we(t.split("-")));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=dn.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function sn(e,t){return e=de(e),(t=de(t))==e?4:an(t,e)?3:on(t,e)?2:an(e,t)?1:0}function un(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),dn.get(e)||e}function ln(e){return e.language?de(e.language):e.audio&&e.audio.language?de(e.audio.language):e.video&&e.video.language?de(e.video.language):"und"}function cn(e,t){e=de(e);var n=new Set,i=we(t);for(t=i.next();!t.done;t=i.next())n.add(de(t.value));for(t=(i=we(n)).next();!t.done;t=i.next())if((t=t.value)==e)return t;for(t=(i=we(n)).next();!t.done;t=i.next())if(an(t=t.value,e))return t;for(t=(i=we(n)).next();!t.done;t=i.next())if(on(t=t.value,e))return t;for(t=(n=we(n)).next();!t.done;t=n.next())if(an(e,t=t.value))return t;return null}t("shaka.util.LanguageUtils",nn),nn.findClosestLocale=cn,nn.getLocaleForVariant=ln,nn.getLocaleForText=function(e){return de(e.language||"und")},nn.getBase=un,nn.relatedness=sn,nn.areSiblings=function(e,t){var n=un(e),i=un(t);return e!=n&&t!=i&&n==i},nn.normalize=de,nn.isSiblingOf=on,nn.isParentOf=an,nn.areLanguageCompatible=rn,nn.areLocaleCompatible=function(e,t){return(e=de(e))==(t=de(t))};var dn=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","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["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 hn(){this.g={}}function fn(e){var a=new WeakSet;return function e(t){switch(typeof t){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return t;default:if(!t||t.buffer&&t.buffer.constructor==ArrayBuffer)return t;if(a.has(t))return null;var n=t.constructor==Array;if(t.constructor!=Object&&!n)return null;a.add(t);var i,r=n?[]:{};for(i in t)r[i]=e(t[i]);return n&&(r.length=t.length),r}}(e)}function pn(e){var t,n={};for(t in e)n[t]=e[t];return n}function gn(e){this.h=e,this.g=null}function I(e){this.h=e,this.g=null}function mn(){var e=q.ManagedMediaSource||q.MediaSource;return!(!e||!e.isTypeSupported)}function vn(e){return""!=Mn().canPlayType(e)}function yn(){return!!navigator.userAgent.match(/Edge?\//)}function bn(){return Cn("Xbox One")}function wn(){return Cn("Tizen")}function xn(){return Cn("Tizen 3")}function Tn(){return Cn("Tizen 2")}function Sn(){return Cn("Web0S")&&Cn("Chrome/38.0.2125.122 Safari/537.36")}function An(){return Cn("CrKey")}function En(){return navigator.vendor&&navigator.vendor.includes("Apple")&&!wn()&&!Cn("PC=EOS")&&!Cn("PC=APL")&&!Cn("VirginMedia")&&!Cn("SOPOpenBrowser")&&!In()&&!Cn("AFT")&&!Cn("WPE")}function In(){return Cn("PlayStation 4")}function kn(){if(!En())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return(e=e||navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function Cn(e){return(navigator.userAgent||"").includes(e)}function Mn(){return Rn||(Dn=Dn||new I(function(){Rn=null}),(Rn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Rn=document.createElement("video")),Dn.U(1),Rn)}(e=hn.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},e.get=function(e){return(e=this.g[e])?e.slice():null},e.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])},e.forEach=function(e){for(var t in this.g)e(t,this.g[t])},e.size=function(){return Object.keys(this.g).length},e.keys=function(){return Object.keys(this.g)},gn.prototype.U=function(e){var t=this,n=(this.stop(),!0),i=null;return this.g=function(){q.clearTimeout(i),n=!1},i=q.setTimeout(function(){n&&t.h()},1e3*e),this},gn.prototype.stop=function(){this.g&&(this.g(),this.g=null)},I.prototype.qc=function(){return this.stop(),this.h(),this},I.prototype.U=function(e){var t=this;return this.stop(),this.g=new gn(function(){t.h()}).U(e),this},I.prototype.$a=function(e){var t=this;return this.stop(),this.g=new gn(function(){t.g.U(e),t.h()}).U(e),this},I.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},t("shaka.util.Timer",I),I.prototype.tickEvery=I.prototype.$a,I.prototype.tickAfter=I.prototype.U,I.prototype.tickNow=I.prototype.qc;var Dn=null,Rn=null;function Ln(){}function Nn(e,t,n,a){var i=e.variants;if((t.length||n.length)&&(i=function(e,t,n){for(var i={},r=(t=we(t)).next();!r.done;i={ge:i.ge},r=t.next())if(i.ge=r.value,(r=e.filter(function(t){return function(e){return e.video&&e.video.codecs.startsWith(t.ge)}}(i))).length){e=r;break}for(i={},n=we(n),t=n.next();!t.done;i={$d:i.$d},t=n.next())if(i.$d=t.value,(t=e.filter(function(t){return function(e){return e.audio&&e.audio.codecs.startsWith(t.$d)}}(i))).length){e=t;break}return e}(i,t,n)),a.length){for(t=new hn,i=(n=we(i)).next();!i.done;i=n.next())i=i.value,t.push(String(i.video.width||0),i);var o=[];t.forEach(function(e,t){e=0;for(var n=[],i={},r=(t=we(t)).next();!r.done;i={Gc:i.Gc},r=t.next())i.Gc=r.value,e<(r=a.filter(function(t){return function(e){return t.Gc.decodingInfos[0][e]}}(i)).length)?(e=r,n=[i.Gc]):r==e&&n.push(i.Gc);o.push.apply(o,le(n))}),i=o}n=new Set,t=new Set;for(i=(s=we(i)).next();!i.done;i=s.next())(i=i.value).audio&&n.add(i.audio),i.video&&t.add(i.video);n=Array.from(n).sort(function(e,t){return e.bandwidth-t.bandwidth});var r=[];for(i=new Map,s=(n=we(n)).next();!s.done;s=n.next()){var s,u,l=(s=s.value).language+(s.channelsCount||0)+(s.audioSamplingRate||0)+s.roles.join(",")+s.label+s.groupId+s.fastSwitching,c=i.get(l)||[];(!c.length||Ht((u=c[c.length-1]).codecs)==Ht(s.codecs)&&s.bandwidth>u.bandwidth)&&(c.push(s),r.push(s.id)),i.set(l,c)}n=Array.from(t).sort(function(e,t){return e.bandwidth&&t.bandwidth?e.bandwidth-t.bandwidth:e.width-t.width}),t=ee();var d=[];for(i=new Map,s=(n=we(n)).next();!s.done;s=n.next()){if(s=s.value,l=Math.round(s.frameRate||0)+(s.hdr||"")+s.fastSwitching,(c=i.get(l)||[]).length){if(u=c[c.length-1],!t&&Ht(u.codecs)!==Ht(s.codecs))continue;s.width>u.width||s.height>u.height?(c.push(s),d.push(s.id)):s.width==u.width&&s.height==u.height&&(Ht(u.codecs)==Ht(s.codecs)&&s.bandwidth>u.bandwidth&&(c.push(s),d.push(s.id)))}else c.push(s),d.push(s.id);i.set(l,c)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,!(t&&!r.includes(t.id)||e&&!d.includes(e.id))})}function Pn(e,t,n){function i(e,t,n){return t<=e&&e<=n}var r=e.video;return!(r&&r.width&&r.height&&(!i(r.width,t.minWidth,Math.min(t.maxWidth,n.width))||!i(r.height,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function _n(e,t,n){for(var i=!1,r=(e=we(e)).next();!r.done;r=e.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=Pn(r,t,n),a!=r.allowedByApplication&&(i=!0)}return i}function jn(n,l){return Ie(function(e){return 1==e.g?xe(e,On(n,l,0<l.offlineSessionIds.length),2):(l.textStreams=l.textStreams.filter(function(e){return Yt(e=Bt(e.mimeType,e.codecs))}),xe(e,(t=l,Ie(function(e){switch(e.g){case 1:i=[],r=we(t.imageStreams),a=r.next();case 2:if(a.done){e.B(4);break}if(o=a.value,"application/mp4"==(s=o.mimeType)&&"mjpg"==o.codecs&&(s="image/jpg"),ri.has(s)){e.B(5);break}if(u=ai.get(s))return xe(e,(n=u,new Promise(function(e){var t=new Image;t.src=n,"decode"in t?t.decode().then(function(){e(!0)}).catch(function(){e(!1)}):t.onload=t.onerror=function(){e(2===t.height)}})),7);ri.set(s,!1),e.B(5);break;case 7:u=e.h,ri.set(s,u);case 5:ri.get(s)&&i.push(o),a=r.next(),e.B(2);break;case 4:t.imageStreams=i,Te(e)}var n})),0));var t,i,r,a,o,s,u})}function On(t,n,i){var r,a,o,s,u;return Ie(function(e){if(1==e.g)return xe(e,Bn(n.variants,i,!1,[]),2);r=null,t&&(a=t.g)&&(r=a.keySystem),o=jt,s=bn(),u=Cn("Firefox")&&Cn("Android"),n.variants=n.variants.filter(function(e){var t=e.video,n=t&&t.width||0,i=t&&t.height||0;if(s&&t&&(1920<n||1080<i)&&(t.codecs.includes("avc1.")||t.codecs.includes("avc3.")))return ei(e),!1;if(t){if(n=Hn(t.codecs),t.codecs.includes(",")){i=t.codecs.split(",");n=Hn(n=Pt(o.$,i)),i=Vn(i=Pt(o.P,i));if(!Z(Vt(t.mimeType,i,o.P)))return!1;n=[n,i].join()}if(!Z(i=Vt(t.mimeType,n,o.$)))return!1;t.codecs=n}if(t=e.audio,u&&t&&t.encrypted&&t.codecs.toLowerCase().includes("opus"))return ei(e),!1;if(t){if(n=Vn(t.codecs),!Z(i=Vt(t.mimeType,n,o.P)))return!1;t.codecs=n}return(t=e.decodingInfos.some(function(e){return!(!e.supported||r&&(e=e.keySystemAccess)&&e.keySystem!=r)}))||ei(e),t}),Te(e)})}function Un(t,n){var i,r,a,o,s,u,l;return Ie(function(e){if(1==e.g)return i=function e(t){var n=[];for(i in t)n.push(i);n.sort();for(var i=[],r=(n=we(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(",")+"}"}(n),(r=ni)[i]?(t.decodingInfos.push(r[i]),e.B(0)):xe(e,function(e){for(var t=[""],n=(e.video&&(t=qt(e.video.contentType).split(",")),[""]),i=(e.audio&&(n=qt(e.audio.contentType).split(",")),[]),r=(t=we(t)).next();!r.done;r=t.next()){r=r.value;for(var a={},o=we(n),s=o.next();!s.done;a={Gb:a.Gb},s=o.next())s=s.value,a.Gb=fn(e),e.video&&(a.Gb.video.contentType=Bt(Kt(a.Gb.video.contentType),r)),e.audio&&(a.Gb.audio.contentType=Bt(Kt(a.Gb.audio.contentType),s)),i.push(new Promise(function(n){return function(t,e){navigator.mediaCapabilities.decodingInfo(n.Gb).then(function(e){t(e)}).catch(e)}}(a)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}(n),3);if((a=e.h)&&a.length){for(o=null,s=we(a),u=s.next();!u.done;u=s.next())l=u.value,o?(o.supported=o.supported&&l.supported,o.powerEfficient=o.powerEfficient&&l.powerEfficient,o.smooth=o.smooth&&l.smooth,l.keySystemAccess||(o.keySystemAccess=null)):o=l;o&&(r[i]=o,t.decodingInfos.push(o))}Te(e)})}function Bn(n,i,r,a){var o,s,u,l,c,d,h,f,p,g,m,v,y,b;return Ie(function(e){switch(e.g){case 1:if(n.some(function(e){return e.decodingInfos.length}))return e.return();o={},s=we(a),u=s.next();case 2:if(u.done){e.B(4);break}o.be=u.value,l=!1,c=we(n),d=c.next();case 5:if(d.done){e.B(7);break}h=d.value,f=Fn(h,i,r).filter((t=o,function(e){return(e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)===t.be})),f=we(f),p=f.next();case 8:if(p.done){e.B(10);break}return v=p.value,xe(e,Un(h,v),9);case 9:p=f.next(),e.B(8);break;case 10:h.decodingInfos.length&&(l=!0),d=c.next(),e.B(5);break;case 7:if(l)return e.return();o={be:o.be},u=s.next(),e.B(2);break;case 4:g=we(n),d=g.next();case 12:if(d.done){e.B(0);break}m=d.value,v=Fn(m,i,r).filter(function(e){return!(e=e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!a.includes(e)}),y=we(v),p=y.next();case 15:if(p.done){d=g.next(),e.B(12);break}return b=p.value,xe(e,Un(m,b),16);case 16:p=y.next(),e.B(15)}var t})}function Fn(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(",")&&(a=Hn(a=Pt("video",o=r.codecs.split(","))),o=Vn(o=Pt("audio",o)),o=Vt(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}),a=Hn(a),a=Vt(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=Vn(i.codecs),a=Vt(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;for(var o,s=(o=we(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"];for(var l=(u=we(a.keys())).next();!l.done;l=u.next()){for(var c=l.value,l=Object.assign({},n),d=a.get(c),c={keySystem:c,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(d=we(d)).next();!s.done;s=d.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,f=we(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 Vn(e){return"fLaC"!==e||kn()?"Opus"===e?"opus":e:"flac"}function Hn(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=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 Gn(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=[],u=(o&&s.push(o),a&&s.push(a),[]),l=(n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null,[]),c=(t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null,new Set);if(t)for(var d=we(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=we(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,videoLayout: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,e.videoLayout=n.videoLayout||null),t&&(e.audioId=t.id,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 Kn(e){return{id:e.id,active:!1,type:ce,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout: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 qn(e){var t=e.width||null,n=e.height||null,i=null,r=(e.segmentIndex&&(i=e.segmentIndex.get(0)),e.tilesLayout);return(r=i?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,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.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 Xn(e){return e.__shaka_id||(e.__shaka_id=ii++),e.__shaka_id}function zn(e){var t=Yn(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 Wn(e){var t=Yn(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 Yn(e){var t=e.language;return{id:Xn(e),active:!1,type:"",bandwidth:0,language:de(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles: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 $n(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function Jn(e){return e.filter($n)}function Qn(e,t,n,i){var r,a=e,o=e.filter(function(e){return e.primary}),s=(a=o.length?o:a).length?a[0].language:"",a=a.filter(function(e){return e.language==s});if(!t||(r=cn(de(t),e.map(function(e){return e.language})))&&(a=e.filter(function(e){return de(e.language)==r})),a=a.filter(function(e){return e.forced==i}),n){if((e=Zn(a,n)).length)return e}else if((e=a.filter(function(e){return 0==e.roles.length})).length)return e;return(e=a.map(function(e){return e.roles}).reduce(Zt,[])).length?Zn(a,e[0]):a}function Zn(e,t){return e.filter(function(e){return e.roles.includes(t)})}function ei(e){var t=[];return e.audio&&t.push(ti(e.audio)),e.video&&t.push(ti(e.video)),t.join(", ")}function ti(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"}t("shaka.util.StreamUtils",Ln),Ln.meetsRestrictions=Pn;var ni={},ii=0,ri=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ai=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function oi(){var t=this;this.s=null,this.o=!1,this.i=new G,this.A=null,navigator.connection&&navigator.connection.addEventListener&&(this.A=function(){var e;t.o&&t.g.useNetworkInformation&&(t.i=new G,t.g&&t.i.configure(t.g.advanced),(e=t.chooseVariant())&&navigator.onLine&&t.s(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch))},navigator.connection.addEventListener("change",this.A)),this.m=[],this.C=1,this.G=!1,this.h=this.l=this.g=this.u=null,this.F=new I(function(){var e;t.g.restrictToElementSize&&(e=t.chooseVariant())&&t.s(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}),this.j=null}function si(e){if(e.G){if(Date.now()-e.u<1e3*e.g.switchInterval)return}else{var t=e.i;if(!(t.g>=t.i))return;e.G=!0}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.s(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}function ui(e,t,n,i,r){var a;return e.j&&(a=e.j.Rf())&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a})),(n=t?n.filter(function(e){return Pn(e,t,{width:r,height:i})}):n).sort(function(e,t){return e.bandwidth-t.bandwidth})}(e=oi.prototype).stop=function(){this.s=null,this.o=!1,this.m=[],this.C=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.F.stop(),this.j=null},e.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.A),this.A=null),this.F=null},e.init=function(e){this.s=e},e.chooseVariant=function(e){e=void 0!==e&&e;var t,n=1/0,i=1/0;if(this.g.restrictToScreenSize&&(i=this.g.ignoreDevicePixelRatio?1:q.devicePixelRatio,n=q.screen.height*i,i*=q.screen.width),this.h&&this.g.restrictToElementSize&&(t=this.g.ignoreDevicePixelRatio?1:q.devicePixelRatio,n=Math.min(n,this.l.clientHeight*t),i=Math.min(i,this.l.clientWidth*t)),t=r=(r=this.m.filter(function(e){return!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length?r:this.m,e&&r.length!=this.m.length&&(t=this.m.filter(function(e){return!!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})),e=ui(this,this.g.restrictions,t,1/0,1/0),1/0!=n||1/0!=i){for(e=function(e){for(var t=[],n=(e=we(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})}(e),r=(e=we(e)).next();!r.done;r=e.next())if((r=r.value).height>=n&&r.width>=i){n=r.height,i=r.width;break}e=ui(this,this.g.restrictions,t,n,i)}for(n=this.getBandwidthEstimate(),i=(e=t.length&&!e.length?[(e=ui(this,null,t,1/0,1/0))[0]]:e)[0]||null,t=0;t<e.length;t++){for(var r=e[t],a=isNaN(this.C)?1:Math.abs(this.C),o=a*r.bandwidth/this.g.bandwidthDowngradeTarget,s={bandwidth:1/0},u=t+1;u<e.length;u++)if(r.bandwidth!=e[u].bandwidth){s=e[u];break}a=a*s.bandwidth/this.g.bandwidthUpgradeTarget,o<=n&&n<=a&&i.bandwidth!=r.bandwidth&&(i=r)}return this.u=Date.now(),i},e.enable=function(){this.o=!0},e.disable=function(){this.o=!1},e.segmentDownloaded=function(e,t,n){this.i.sample(e,t),n&&null!=this.u&&this.o&&si(this)},e.trySuggestStreams=function(){null!=this.u&&this.o&&si(this)},e.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),e=this.i.getBandwidthEstimate(e),this.j?this.j.getBandwidthEstimate(e):e},e.setVariants=function(e){this.m=e},e.playbackRateChanged=function(e){this.C=e},e.setMediaElement=function(e){var t=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in q&&(this.h=new ResizeObserver(function(){t.F.U(li)}),this.h.observe(this.l))},e.setCmsdManager=function(e){this.j=e},e.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},t("shaka.abr.SimpleAbrManager",oi);var li=1;function ci(e,t){this.g=e,this.h=t}function di(e,t){var n=new ci(5,0),i=pi,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function hi(e,t,n,i){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function fi(e,t,n,i){Y([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}ci.prototype.toString=function(){return"v"+this.g+"."+this.h};var pi=null;function gi(e,t,n,i){for(n=void 0===n||n,i=void 0!==i&&i,this.h=e,this.g=new Set([e]),t=(e=we(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n,i)}function mi(e,t,n,i){var r,a;return!(r=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(r=e.audio&&t.audio)&&(r=e.audio,a=t.audio,r=!!((!r.channelsCount||!a.channelsCount||2<r.channelsCount||2<a.channelsCount)&&r.channelsCount!=a.channelsCount||n&&!vi(r,a)||!yi(r.roles,a.roles)||i&&r.groupId!==a.groupId)),!(i=r)&&(i=e.video&&t.video)&&(e=e.video,t=t.video,i=!((!n||vi(e,t))&&yi(e.roles,t.roles))),!i}function vi(e,t){if(e.mimeType==t.mimeType&&(e=e.codecs.split(",").map(Gt),t=t.codecs.split(",").map(Gt),e.length==t.length)){e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return;return 1}}function yi(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size==t.size){for(var n=(e=we(e)).next();!n.done;n=e.next())if(!t.has(n.value))return;return 1}}function bi(e,t,n){t=void 0===t?"reload":t,n=void 0!==n&&n,this.i=e,this.h=t,this.g=n,this.j=new wi(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"",!1,"","","",t,n)}function wi(e,t,n,i,r,a,o,s,u,l){this.s=e,this.u=t,this.h=n,this.i=i,this.A=r,this.l=a,this.g=void 0===o?"":o,this.j=void 0===s?"":s,this.m=void 0===u?"reload":u,this.o=void 0!==l&&l}function xi(){this.g=Ai,this.h=(new Map).set(Ai,2).set(Si,1)}function Ti(e,t,n){e.h.set(Ai,n).set(Si,t)}t("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),t("shaka.config.CodecSwitchingStrategy",{Hi:"reload",yg:"smooth"}),gi.prototype.add=function(e,t,n){return!!mi(this.h,e,void 0===t||t,void 0!==n&&n)&&(this.g.add(e),!0)},gi.prototype.values=function(){return this.g.values()},bi.prototype.create=function(e){var t=this,n="smooth"==this.h&&ee(),i=e.filter(function(e){return mi(t.i,e,!n,t.g)});return i.length?new gi(i[0],i,!n,this.g):this.j.create(e)},wi.prototype.create=function(e){var t,n,i,r,a,o,s,u,l,c=[],d=(u=e,d=this.s,c=(t=cn(d=de(d),u.map(ln)))?u.filter(function(e){return t==ln(e)}):[],e.filter(function(e){return e.primary})),c=c.length?c:d.length?d:e;return u=c,n=this.u,(e=u.filter(function(e){return!!e.audio&&(n?e.audio.roles.includes(n):0==e.audio.roles.length)})).length&&(c=e),this.l&&(d=c,i=this.l,(e=d.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==i})).length&&(c=e)),this.i&&(u=c,"AUTO"==(r=this.i)&&(r=q.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR"),(e=u.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==r})).length&&(c=e)),this.h&&(d=c,a=this.h,(e=d.filter(function(e){return!e.audio||!e.audio.channelsCount||e.audio.channelsCount==a})).length&&(c=e)),this.g&&(u=c,o=this.g,(e=u.filter(function(e){return!(!e.audio||!e.audio.label)&&e.audio.label.toLowerCase()==o.toLowerCase()})).length&&(c=e)),this.j&&(d=c,s=this.j,(e=d.filter(function(e){return!(!e.video||!e.video.label)&&e.video.label.toLowerCase()==s.toLowerCase()})).length&&(c=e)),u=c,l=this.A,new gi((c=(e=u.filter(function(e){return!e.audio||e.audio.spatialAudio==l})).length?e:c)[0],c,!("smooth"==this.m&&ee()),this.o)};var Si=0,Ai=1;function Ei(e,t){var n=ki();this.l=(null==e.maxAttempts?n:e).maxAttempts,this.j=(null==e.baseDelay?n:e).baseDelay,this.o=(null==e.fuzzFactor?n:e).fuzzFactor,this.m=(null==e.backoffFactor?n:e).backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Ii(t){var n,i;return Ie(function(e){if(1==e.g){if(t.g>=t.l){if(!t.i)throw new ke(2,7,1010);t.g=1,t.h=t.j}return(n=t.g,t.g++,0==n)?e.return():(i=t.h*(1+(2*Math.random()-1)*t.o),xe(e,new Promise(function(e){new I(e).U(i/1e3)}),2))}t.h*=t.m,Te(e)})}function ki(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function k(){var n,i,e=new Promise(function(e,t){n=e,i=t});return e.resolve=n,e.reject=i,e}function Ci(e,t){this.promise=e,this.i=t,this.g=!1}function Mi(e){return new Ci(Promise.reject(e),function(){return Promise.resolve()})}function Di(){var e=Promise.reject(new ke(2,7,7001));return e.catch(function(){}),new Ci(e,function(){return Promise.resolve()})}function Ri(e){return new Ci(Promise.resolve(e),function(){return Promise.resolve()})}function Li(e){return new Ci(e,function(){return e.catch(function(){})})}function Ni(e){return new Ci(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function he(e,t){if(t)if(t instanceof Map)for(var n=we(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=(q.performance&&q.performance.now?q.performance:Date).now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Pi(e){var t,n=new he(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}k.prototype.resolve=function(){},k.prototype.reject=function(){},Ci.prototype.abort=function(){return this.g=!0,this.i()},Ci.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},Ci.prototype.pa=function(i,r){function e(n){return function(e){var t;o.g&&n?s.reject(u):(t=n?i:r)?a=function(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(t,e,s):(n?s.resolve:s.reject)(e)}}function a(){return s.reject(u),o.abort()}var o=this,s=new k,u=new ke(2,7,7001);return this.promise.then(e(!0),e(!1)),new Ci(s,function(){return a()})},t("shaka.util.AbortableOperation",Ci),Ci.prototype.chain=Ci.prototype.pa,Ci.all=Ni,Ci.notAbortable=Li,Ci.completed=Ri,Ci.aborted=Di,Ci.failed=Mi,he.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},he.prototype.stopImmediatePropagation=function(){this.g=!0},he.prototype.stopPropagation=function(){},t("shaka.util.FakeEvent",he);var _i={hi:"abrstatuschanged",ii:"adaptation",ji:"buffering",ki:"complete",li:"downloadfailed",mi:"downloadheadersreceived",ni:"drmsessionupdate",pi:"emsg",Gi:"prft",Error:"error",ri:"expirationupdated",si:"firstquartile",ti:"gapjumped",wi:"keystatuschanged",yi:"loaded",zi:"loading",Bi:"manifestparsed",Ci:"manifestupdated",Di:"mediaqualitychanged",Metadata:"metadata",Ei:"midpoint",Fi:"onstatechange",Ii:"ratechange",Ji:"segmentappended",Ki:"sessiondata",Li:"stalldetected",Mi:"started",Ni:"statechanged",Oi:"streaming",Pi:"textchanged",Qi:"texttrackvisibility",Ri:"thirdquartile",Si:"timelineregionadded",Ti:"timelineregionenter",Ui:"timelineregionexit",Vi:"trackschanged",Xi:"unloading",Zi:"variantchanged"};function h(){this.ka=new hn,this.zd=this}function ji(){this.g=[]}function Oi(e,t){e.g.push(t.finally(function(){Oe(e.g,t)}))}function Ui(e,t,n,i,r){h.call(this),this.i=!1,this.m=new ji,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.A=r||null,this.o=!1}function Bi(e,t,n,i){n=n||qi;var r=Xi[e];(!r||n>=r.priority)&&(Xi[e]={priority:n,Vd:t,Ih:void 0!==i&&i})}function Fi(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 Vi(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.Zc)return!1}return!0}function Hi(){this.g=0}function Gi(e,t,n){Ci.call(this,e,t),this.h=n}h.prototype.addEventListener=function(e,t){this.ka&&this.ka.push(e,t)},h.prototype.removeEventListener=function(e,t){this.ka&&this.ka.remove(e,t)},h.prototype.dispatchEvent=function(e){if(!this.ka)return!0;for(var t=this.ka.get(e.type)||[],n=(t=we(t=(n=this.ka.get("All"))?t.concat(n):t)).next();!n.done;n=t.next()){n=n.value,e.target=this.zd,e.currentTarget=this.zd;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},h.prototype.release=function(){this.ka=null},ji.prototype.destroy=function(){for(var e=[],t=we(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)},m(Ui,h),(e=Ui.prototype).nf=function(e){this.o=e},e.Jh=function(e){this.g.add(e)},e.bi=function(e){this.g.delete(e)},e.Hg=function(){this.g.clear()},e.Kh=function(e){this.h.add(e)},e.ci=function(e){this.h.delete(e)},e.Ig=function(){this.h.clear()},e.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),h.prototype.release.call(this),this.m.destroy()},e.request=function(u,i,l){var c=this,e=new Hi;if(this.i)return(t=Promise.reject(new ke(2,7,7001))).catch(function(){}),new Gi(t,function(){return Promise.resolve()},e);i.method=i.method||"GET",i.headers=i.headers||{},i.retryParameters=i.retryParameters?fn(i.retryParameters):ki(),i.uris=fn(i.uris);var t,n=(t=function(e,t,n,i){function r(e){a=a.pa(function(){return n.body&&(n.body=ye(n.body)),e(t,n,i)})}var a=Ri(void 0);e.u&&r(e.u);for(var o=(e=we(e.g)).next();!o.done;o=e.next())r(o.value);return a.pa(void 0,function(e){if(e instanceof ke&&7001==e.code)throw e;throw new ke(2,1,1006,e)})}(this,u,i,l)).pa(function(){return function i(r,a,o,s,u,l,c,d){r.o&&(o.uris[l]=o.uris[l].replace("http://","https://"));0<l&&r.A&&r.A(a,s,o.uris[l],o.uris[l-1]);var e=new gt(o.uris[l]),t=e.ab,h=!1;t||(t=location.protocol,t=t.slice(0,-1),mt(e,t),o.uris[l]=e.toString());t=t.toLowerCase();var n=(t=Xi[t])?t.Vd:null;if(!n)return Mi(new ke(2,1,1e3,e));var f,p=t.Ih,g=null,m=null,v=!1,y=!1;return Li(Ii(u)).pa(function(){if(r.i)return Di();f=Date.now();var e=n(o.uris[l],o,a,function(e,t,n){g&&g.stop(),m&&m.U(i/1e3),r.l&&a==Ki&&(r.l(e,t,Vi(s)),h=!0,d.g=n)},function(e){r.j&&r.j(e,o,a),y=!0});if(!p)return e;var t=o.retryParameters.connectionTimeout,i=(t&&(g=new I(function(){v=!0,e.abort()})).U(t/1e3),o.retryParameters.stallTimeout);return i&&(m=new I(function(){v=!0,e.abort()})),e}).pa(function(e){g&&g.stop(),m&&m.stop(),null==e.timeMs&&(e.timeMs=Date.now()-f);var t={response:e,qh:h};return!y&&r.j&&r.j(e.headers,o,a),t},function(e){var t,n;if(g&&g.stop(),m&&m.stop(),r.s&&(t=null,n=0,e instanceof ke&&(1001==(t=e).code&&(n=e.data[1])),r.s(o,t,n,v)),r.i)return Di();if((e=v?new ke(1,1,1003,o.uris[l],a):e)instanceof ke){if(7001==e.code)throw e;if(1010==e.code)throw c;if(1==e.severity)return t=new he("retry",t=(new Map).set("error",e)),r.dispatchEvent(t),l=(l+1)%o.uris.length,i(r,a,o,s,u,l,e,d)}throw e})}(c,u,i,l,new Ei(i.retryParameters,!1),0,null,e)}),r=n.pa(function(e){for(var t=c,n=u,i=e,r=l,a=Ri(void 0),o={},s=(t=we(t.h)).next();!s.done;o={de:o.de},s=t.next())o.de=s.value,a=a.pa(function(t){return function(){var e=i.response;return e.data&&(e.data=ye(e.data)),t.de(n,e,r)}}(o));return a.pa(function(){return i},function(e){var t=2;if(e instanceof ke){if(7001==e.code)throw e;t=e.severity}throw new ke(t,1,1007,e)})}),a=Date.now(),o=0,s=(t.promise.then(function(){o=Date.now()-a},function(){}),0),d=(n.promise.then(function(){s=Date.now()},function(){}),r.pa(function(e){var t=Date.now()-s,n=e.response;return n.timeMs+=o,n.timeMs+=t,e.qh||!c.l||n.fromCache||"HEAD"==i.method||u!=Ki||c.l(n.timeMs,n.data.byteLength,Vi(l)),n},function(e){throw e&&(e.severity=2),e}));return t=new Gi(d.promise,function(){return d.abort()},e),Oi(this.m,t),t},t("shaka.net.NetworkingEngine",Ui),Ui.makeRequest=Fi,Ui.defaultRetryParameters=ki,Ui.prototype.clearAllResponseFilters=Ui.prototype.Ig,Ui.prototype.unregisterResponseFilter=Ui.prototype.ci,Ui.prototype.registerResponseFilter=Ui.prototype.Kh,Ui.prototype.clearAllRequestFilters=Ui.prototype.Hg,Ui.prototype.unregisterRequestFilter=Ui.prototype.bi,Ui.prototype.registerRequestFilter=Ui.prototype.Jh,Ui.unregisterScheme=function(e){delete Xi[e]},Ui.registerScheme=Bi,Ui.prototype.setForceHTTPS=Ui.prototype.nf,Ui.NumBytesRemainingClass=Hi,m(Gi,Ci),Ui.PendingRequest=Gi;var Ki=1,qi=(Ui.RequestType={MANIFEST:0,SEGMENT:Ki,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Ui.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5},3),Xi=(Ui.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:qi},{});function zi(e){this.g=!1,this.h=new k,this.i=e}function U(e,t){if(e.g){if(t instanceof ke&&7003==t.code)throw t;throw new ke(2,7,7003,t)}}function Wi(){this.g=new hn}function Yi(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==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=$i;if(null==t){t=!1;try{var n={},i={get:function(){return!(t=!0)}};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}$i=t}return t}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}zi.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()}))},(e=Wi.prototype).release=function(){this.Za(),this.g=null},e.D=function(e,t,n,i){this.g&&(e=new Yi(e,t,n,i),this.g.push(t,e))},e.ja=function(n,i,r,e){var a=this;this.D(n,i,function e(t){a.Vb(n,i,e),r(t)},e)},e.Vb=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=we(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Vb(),this.g.remove(t,r))},e.Za=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,le(t.g[e]));for(n=(t=we(n)).next();!n.done;n=t.next())n.value.Vb();this.g.g={}}},t("shaka.util.EventManager",Wi),Wi.prototype.removeAll=Wi.prototype.Za,Wi.prototype.unlisten=Wi.prototype.Vb,Wi.prototype.listenOnce=Wi.prototype.ja,Wi.prototype.listen=Wi.prototype.D,Yi.prototype.Vb=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var $i=void 0;function Ji(e,t){for(var n=[],i=(e=we(e)).next();!i.done;i=e.next())n.push(t(i.value));return n}function Qi(e){this.h=e,this.g=void 0}function Zi(e){for(var t=new Map,n=we(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function er(e){var n={};return e.forEach(function(e,t){n[t]=e}),n}function tr(){}function nr(e){if(!e)return"";if(239==(e=ne(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),q.TextDecoder&&!In())return(e=(new TextDecoder).decode(e)).includes("�")&&Y('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var i,r=65533;0==(128&e[n])?r=e[n]:e.length>=n+2&&192==(224&e[n])&&128==(192&e[n+1])?(r=(31&e[n])<<6|63&e[n+1],n+=1):e.length>=n+3&&224==(240&e[n])&&128==(192&e[n+1])&&128==(192&e[n+2])?(r=(15&e[n])<<12|(63&e[n+1])<<6|63&e[n+2],n+=2):e.length>=n+4&&240==(241&e[n])&&128==(192&e[n+1])&&128==(192&e[n+2])&&128==(192&e[n+3])&&(r=(7&e[n])<<18|(63&e[n+1])<<12|(63&e[n+2])<<6|63&e[n+3],n+=3),r<=65535?t+=String.fromCharCode(r):(i=1023&(r-=65536),t=(t+=String.fromCharCode(55296+(r>>10)))+String.fromCharCode(56320+i))}return t}function ir(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new ke(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=De(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return sr.value()(i)}function rr(e){function t(e){return n.byteLength<=e||32<=n[e]&&n[e]<=126}if(!e)return"";var n=ne(e);if(239==n[0]&&187==n[1]&&191==n[2])return nr(n);if(254==n[0]&&255==n[1])return ir(n.subarray(2),!1);if(255==n[0]&&254==n[1])return ir(n.subarray(2),!0);if(0==n[0]&&0==n[2])return ir(e,!1);if(0==n[1]&&0==n[3])return ir(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return nr(e);throw new ke(2,2,2003)}function ar(e){if(q.TextEncoder&&!In())return ye((t=new TextEncoder).encode(e));e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return ye(t)}function or(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}Qi.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},t("shaka.util.StringUtils",tr),tr.resetFromCharCode=function(){sr.g=void 0},tr.toUTF16=or,tr.toUTF8=ar,tr.fromBytesAutoDetect=rr,tr.fromUTF16=ir,tr.fromUTF8=nr;var sr=new Qi(function(){for(var e={yb:65536};0<e.yb;(e={yb:e.yb}).yb/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return}}(e.yb)){var i=e;return function(e){for(var t="",n=0;n<e.length;n+=i.yb)t+=String.fromCharCode.apply(null,e.subarray(n,n+i.yb));return t};return}return null});function ur(e,t){this.h=De(e),this.i=t==cr,this.g=0}function lr(){return new ke(2,3,3e3)}(e=ur.prototype).ia=function(){return this.g<this.h.byteLength},e.qa=function(){return this.g},e.getLength=function(){return this.h.byteLength},e.ga=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw lr()}},e.Ea=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw lr()}},e.L=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw lr()}},e.fg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw lr()}},e.oc=function(){try{var e,t;this.i?(e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0)):(t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1))}catch(e){throw lr()}if(2097151<t)throw new ke(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},e.ub=function(e){if(this.g+e>this.h.byteLength)throw lr();var t=ne(this.h,this.g,e);return this.g+=e,t},e.skip=function(e){if(this.g+e>this.h.byteLength)throw lr();this.g+=e},e.Rh=function(e){if(this.g<e)throw lr();this.g-=e},e.seek=function(e){if(e<0||e>this.h.byteLength)throw lr();this.g=e},e.ad=function(){for(var e=this.g;this.ia()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=ne(this.h,e,this.g-e),this.g+=1,nr(e)},t("shaka.util.DataViewReader",ur),ur.prototype.readTerminatedString=ur.prototype.ad,ur.prototype.rewind=ur.prototype.Rh,ur.prototype.readBytes=ur.prototype.ub,ur.prototype.readUint64=ur.prototype.oc,ur.prototype.readInt32=ur.prototype.fg,ur.prototype.readUint32=ur.prototype.L,ur.prototype.readUint16=ur.prototype.Ea,ur.prototype.readUint8=ur.prototype.ga,ur.prototype.getPosition=ur.prototype.qa,ur.prototype.hasMoreData=ur.prototype.ia;var cr=1;function dr(){this.i=[],this.h=[],this.g=!1}function P(e){for(var t=vr(e);e.reader.ia()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function hr(e){for(var t=vr(e),n=e.reader.L(),i=0;i<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function fr(e){var t=vr(e);for(e.reader.skip(78);e.reader.ia()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function pr(t){return function(e){t(e.reader.ub(e.reader.getLength()-e.reader.qa()))}}function gr(e){for(var t=0,n=(e=we(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function mr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function vr(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}ur.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:cr},(e=dr.prototype).box=function(e,t){return e=gr(e),this.i[e]=yr,this.h[e]=t,this},e.O=function(e,t){return e=gr(e),this.i[e]=br,this.h[e]=t,this},e.stop=function(){this.g=!0},e.parse=function(e,t,n){for(e=new ur(e,0),this.g=!1;e.ia()&&!this.g;)this.Yc(0,e,t,n)},e.Yc=function(e,t,n,i){var r=t.qa();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.L(),o=t.L(),s=mr(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.qa()+8>t.getLength())return void(this.g=!0);a=t.oc(),u=!0}var l=this.h[o];if(l){var c=null,d=null;if(this.i[o]==br){if(i&&t.qa()+4>t.getLength())return void(this.g=!0);c=(d=t.L())>>>24,d&=16777215}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new ur(t=0<(i=o-t.qa())?t.ub(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u})}else t.skip(Math.min(r+a-t.qa(),t.getLength()-t.qa()))}},t("shaka.util.Mp4Parser",dr),dr.headerSize=vr,dr.typeToString=mr,dr.allData=pr,dr.visualSampleEntry=fr,dr.sampleDescription=hr,dr.children=P,dr.prototype.parseNext=dr.prototype.Yc,dr.prototype.fullBox=dr.prototype.O;var yr=0,br=1;function wr(){}function xr(e){return e=ne(e),e=sr.value()(e),btoa(e)}function Tr(e,t){return t=null==t||t,e=xr(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function Sr(e){e=q.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function Ar(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=q.parseInt(e.substr(2*i,2),16);return n}function Er(e){var t=ne(e);e="";for(var n=(t=we(t)).next();!n.done;n=t.next())e+=n=1==(n=(n=n.value).toString(16)).length?"0"+n:n;return e}function Ir(){for(var e=D.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;for(var t=new Uint8Array(t),i=n=0;i<e.length;++i){var r=e[i];r instanceof Uint8Array?t.set(r,n):t.set(ne(r),n),n+=r.byteLength}return t}function kr(e){var r=this;this.g=[],this.h=[],this.data=[],(new dr).box("moov",P).box("moof",P).O("pssh",function(e){if(!(1<e.version)){var t=ne(e.reader.h,-12,e.size);if(r.data.push(t),r.g.push(Er(e.reader.ub(16))),0<e.version)for(var t=e.reader.L(),n=0;n<t;n++){var i=Er(e.reader.ub(16));r.h.push(i)}}}).parse(e)}function Cr(e,t,n,i){var r=e.length,a=t.length+16+r,o=(0<i&&(a+=4+16*n.size),new Uint8Array(a)),s=De(o),u=0;if(s.setUint32(u,a),s.setUint32(u+=4,1886614376),u+=4,i<1?s.setUint32(u,0):s.setUint32(u,16777216),o.set(t,u+=4),u+=t.length,0<i)for(s.setUint32(u,n.size),u+=4,n=(t=we(n)).next();!n.done;n=t.next())n=Ar(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function Mr(e,t){return 1!=(e=z(e,t)).length?null:e[0]}function Dr(e,t,n){return 1!=(e=Rr(e,t,n)).length?null:e[0]}function z(e,t){for(var n=[],i=(e=we(e.childNodes)).next();!i.done;i=e.next())(i=i.value)instanceof Element&&i.tagName==t&&n.push(i);return n}function Rr(e,t,n){for(var i=[],r=(e=we(e.childNodes)).next();!r.done;r=e.next())(r=r.value)instanceof Element&&r.localName==n&&r.namespaceURI==t&&i.push(r);return i}function Lr(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Nr(e,t,n){for(var i=(t=we(t)).next();!i.done;i=t.next())if(i=i.value,e.hasAttributeNS(i,n))return e.getAttributeNS(i,n);return null}function Pr(e){return Array.from(e.childNodes).every(_r)?e.textContent.trim():null}function _r(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function W(e,t,n,i){i=void 0===i?null:i;var r=null;return null==(r=null!=(e=e.getAttribute(t))?n(e):r)?i:r}function jr(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Or(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))?(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),isFinite(e)?e:null):null}function Ur(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function Br(e){return 0==(e=Number(e))%1?e:null}function Fr(e){return 0==(e=Number(e))%1&&0<e?e:null}function Vr(e){return 0==(e=Number(e))%1&&0<=e?e:null}function Hr(e){return e=Number(e),isNaN(e)?null:e}function Gr(e){return!!e&&"true"===e.toLowerCase()}function Kr(e){var t=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(t)?null:t}function qr(e,t){var n=new DOMParser,i=zr.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;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function Xr(e,t){try{return qr(rr(e),t)}catch(e){return null}}t("shaka.util.Uint8ArrayUtils",wr),wr.concat=Ir,wr.toHex=Er,wr.fromHex=Ar,wr.fromBase64=Sr,wr.toBase64=Tr,wr.toStandardBase64=xr;var zr=new Qi(function(){var t;return"undefined"!=typeof trustedTypes?(t=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}}),function(e){return t.createHTML(e)}):function(e){return e}});function Wr(t,e){var i=this;e=void 0===e?1:e,this.C=t,this.H=new Set,this.m=this.s=null,this.ma=this.da=!1,this.I=0,this.g=null,this.A=new Wi,this.i=new Map,this.u=new Map,this.l=new k,this.h=null,this.o=function(e){2==e.severity&&i.l.reject(e),t.onError(e)},this.V=new Map,this.ea=new Map,this.W=new I(function(){return t=(e=i).V,(n=e.ea).clear(),t.forEach(function(e,t){return n.set(t,e)}),(t=Array.from(n.values())).length&&t.every(function(e){return"expired"==e})&&e.o(new ke(2,6,6014)),void e.C.Ud(er(n));var e,t,n}),this.K=!1,this.J=[],this.N=!1,this.ka=new I(function(){var r;(r=i).i.forEach(function(e,t){var n=e.$e,i=t.expiration;(i=isNaN(i)?1/0:i)!=n&&(r.C.onExpirationUpdated(t.sessionId,i),e.$e=i)})}).$a(e),this.l.catch(function(){}),this.j=new zi(function(){return t=i,Ie(function(e){switch(e.g){case 1:return t.A.release(),t.A=null,t.l.reject(),t.ka.stop(),t.ka=null,t.W.stop(),t.W=null,xe(e,ua(t),2);case 2:if(t.m)return Se(e,4),xe(e,t.m.setMediaKeys(null),6);e.B(3);break;case 6:Ae(e,5);break;case 4:Ee(e);case 5:t.m=null;case 3:t.g=null,t.H.clear(),t.s=null,t.u=new Map,t.h=null,t.o=function(){},t.C=null,t.Y=!1,t.G=null,Te(e)}});var t}),this.Y=!1,this.F=this.G=null}function Yr(e,t,n){e.u=new Map;for(var i=(n=we(n)).next();!i.done;i=n.next())e.u.set(i.value,{initData:null,initDataType:null});for(i=(n=we(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.K=0<e.u.size,$r(e,t)}function $r(l,c){var d,h,f,p,g,m,v,y,b,w,x,T,S,A;return Ie(function(e){if(1!=e.g)return g||Object.keys(l.h.servers).length?(A=na(l,void 0,c),e.return(g?A:A.catch(function(){}))):(l.da=!0,e.return(Promise.resolve()));var t,n,i,r,a;if(d=function(e){if(0==(e=Zi(e.h.clearKeys)).size)return null;var t,i=[],r=[];return e.forEach(function(e,t){var n=t;22!=n.length&&(n=Tr(Ar(t),!1)),22!=(t=e).length&&(t=Tr(Ar(e),!1)),i.push(e={kty:"oct",kid:n,k:t}),r.push(e.kid)}),e=JSON.stringify({keys:i}),t=[{initData:ne(ar(t=JSON.stringify({kids:r}))),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+q.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t,keyIds:new Set(r)}}(l))for(h=we(c),f=h.next();!f.done;f=h.next())(p=f.value).video&&(p.video.drmInfos=[d]),p.audio&&(p.audio.drmInfos=[d]);if(!(g=c.some(function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)}))){A=Zi(l.h.servers);var o=c,s=A,u=[];for(s.forEach(function(e,t){u.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),o=we(o),s=o.next();!s.done;s=o.next())(s=s.value).video&&(s.video.drmInfos=u),s.audio&&(s.audio.drmInfos=u)}for(m=new Set,v=we(c),f=v.next();!f.done;f=v.next())for(y=f.value,y=da(y),b=we(y),w=b.next();!w.done;w=b.next())x=w.value,m.add(x);for(T=we(m),w=T.next();!w.done;w=T.next())S=w.value,t=S,n=Zi(l.h.servers),i=Zi(l.h.advanced||{}),r=l.h.keySystemsMapping,a=void 0,!(a=t.keySystem)||"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]),q.cast&&q.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"));return xe(e,Bn(c,l.K,l.Y,l.h.preferredKeySystems),2)})}function Jr(t){var n;return Ie(function(e){switch(e.g){case 1:if(t.m.mediaKeys)return e.return();if(t.G)return xe(e,t.G,3);e.B(2);break;case 3:return U(t.j),e.return();case 2:return Se(e,4),t.G=t.m.setMediaKeys(t.s),xe(e,t.G,6);case 6:Ae(e,5);break;case 4:n=Ee(e),t.o(new ke(2,6,6003,n.message));case 5:U(t.j),Te(e)}})}function Qr(n){var t,i,r,a;return Ie(function(e){if(1==e.g)return n.u.size?(n.u.forEach(function(e,t){aa(n,t,e)}),xe(e,n.l,3)):e.B(2);if(2!=e.g){if(0<(n.g&&n.g.keyIds||new Set([])).size&&function(e){for(var t=we(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.V.get(n.value))return;return 1}(n))return e.return(n.l);n.l=new k,n.l.catch(function(){})}for(t=(n.g?n.g.initData:[])||[],i=we(t),r=i.next();!r.done;r=i.next())a=r.value,Zr(n,a.initDataType,a.initData);return t.length||n.l.resolve(),e.return(n.l)})}function Zr(e,t,n){if(n.length){for(var i=e.i.values(),r=(i=we(i)).next();!r.done;r=i.next())if(me(n,r.value.initData)&&e.h.ignoreDuplicateInitData)return;0<e.i.size&&ha(e)&&(e.l.resolve(),e.l=new k,e.l.catch(function(){}));var a=e,o=n,s=e.g.sessionType;try{var u=a.s.createSession(s)}catch(e){return void a.o(new ke(2,6,6005,e.message))}a.A.D(u,"message",function(e){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(e):oa(a,e)}),a.A.D(u,"keystatuseschange",function(e){return sa(a,e)}),a.i.set(u,{initData:o,initDataType:t,loaded:!1,$e:1/0,hb:null,type:s});try{o=a.h.initDataTransform(o,t,a.g)}catch(e){return void((t=e)instanceof ke||(t=new ke(2,6,6016,e)),a.o(t))}a.h.logLicenseExchange&&Tr(o),u.generateRequest(t,o).catch(function(e){var t,n;a.j.g||(a.i.delete(u),(t=e.errorCode)&&t.systemCode&&((n=t.systemCode)<0&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)),a.o(new ke(2,6,6006,e.message,e,n)))})}}function ea(e){return e&&e.match(/^com\.(microsoft|chromecast)\.playready/)}function ta(e){return e=Ji(e=e.i.keys(),function(e){return e.sessionId}),Array.from(e)}function na(E,I,k){var C,M,D,R,L,N,P,_,j,O;return Ie(function(e){switch(e.g){case 1:if(C=new Map,k.length){M=function(e,t,n){for(var i=we(t),r=i.next();!r.done;r=i.next()){var a=we(da(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 ke(2,6,6e3);for(i={},e=we(e.h.preferredKeySystems),r=e.next();!r.done;i={ce:i.ce},r=e.next())for(i.ce=r.value,a=we(t),r=a.next();!r.done;r=a.next())if(r=r.value.decodingInfos.find(function(t){return function(e){return e.supported&&null!=e.keySystemAccess&&e.keySystemAccess.keySystem==t.ce}}(i)))return r.keySystemAccess;for(e=we([!0,!1]),r=e.next();!r.done;r=e.next())for(i=r.value,a=we(t),r=a.next();!r.done;r=a.next()){var o=we(r.value.decodingInfos);for(r=o.next();!r.done;r=o.next()){var s=r.value;if(s.supported&&s.keySystemAccess){var u=we(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,k,C),e.B(2);break}return xe(e,(d=E,h=I,Ie(function(e){switch(e.g){case 1:if(1==h.size&&h.has(""))throw new ke(2,6,6e3);for(p=we(h.values()),g=p.next();!g.done;g=p.next())0==(m=g.value).audioCapabilities.length&&delete m.audioCapabilities,0==m.videoCapabilities.length&&delete m.videoCapabilities;v=we(d.h.preferredKeySystems),y=v.next();case 2:if(y.done){e.B(4);break}if(S=y.value,h.has(S))return A=h.get(S),Se(e,6),xe(e,navigator.requestMediaKeySystemAccess(S,[A]),8);e.B(3);break;case 8:return f=e.h,e.return(f);case 6:Ee(e);case 7:U(d.j);case 3:y=v.next(),e.B(2);break;case 4:b=we([!0,!1]),w=b.next();case 9:if(w.done){e.B(11);break}x=w.value,T=we(h.keys()),y=T.next();case 12:if(y.done){w=b.next(),e.B(9);break}if(S=y.value,A=h.get(S),A.drmInfos.some(function(e){return!!e.licenseServerUri})==x)return Se(e,15),xe(e,navigator.requestMediaKeySystemAccess(S,[A]),17);e.B(13);break;case 17:return f=e.h,e.return(f);case 15:Ee(e);case 16:U(d.j);case 13:y=T.next(),e.B(12);break;case 11:return e.return(f)}})),3);case 3:M=e.h;case 2:if(!(O=M))throw new ke(2,6,6001);for(U(E.j),Se(e,4),E.H.clear(),j=O.getConfiguration(),_=j.audioCapabilities||[],j=j.videoCapabilities||[],D=we(_),R=D.next();!R.done;R=D.next())L=R.value,E.H.add(L.contentType.toLowerCase());for(N=we(j),R=N.next();!R.done;R=N.next())P=R.value,E.H.add(P.contentType.toLowerCase());if(k.length){for(var t=O.keySystem,n=C.get(O.keySystem),i=[],r=[],a=[],o=[],s=new Set,u=(fa(n,i,a,r,o,s),E.K?"persistent-license":"temporary"),t={keySystem:t,licenseServerUri:i[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||u,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:a[0],serverCertificateUri:r[0],initData:o,keyIds:s},i=(n=we(n)).next();!i.done;i=n.next())(i=i.value).distinctiveIdentifierRequired&&(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),i.persistentStateRequired&&(t.persistentStateRequired=i.persistentStateRequired);n=t}else n=O.keySystem,t=I.get(O.keySystem),i=[],r=[],a=[],o=[],s=new Set,fa(t.drmInfos,i,a,r,o,s),n={keySystem:n,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==t.distinctiveIdentifier,persistentStateRequired:"required"==t.persistentState,sessionType:t.sessionTypes[0]||"temporary",audioRobustness:(t.audioCapabilities?t.audioCapabilities[0].robustness:"")||"",videoRobustness:(t.videoCapabilities?t.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],serverCertificateUri:r[0],initData:o,keyIds:s};if(E.g=n,E.g.licenseServerUri)return xe(e,O.createMediaKeys(),6);throw new ke(2,6,6012,E.g.keySystem);case 6:if(_=e.h,U(E.j),E.s=_,""!=E.h.minHdcpVersion&&"getStatusForPolicy"in E.s)return Se(e,8),xe(e,E.s.getStatusForPolicy({minHdcpVersion:E.h.minHdcpVersion}),10);e.B(7);break;case 10:if("usable"!=e.h)throw new ke(2,6,6018);U(E.j),Ae(e,7,4);break;case 8:if((j=Ee(e,4))instanceof ke)throw j;throw new ke(2,6,6019,j.message);case 7:return E.da=!0,xe(e,(l=E,Ie(function(e){switch(e.g){case 1:if(!l.s||!l.g)return e.return();if(!l.g.serverCertificateUri||l.g.serverCertificate&&l.g.serverCertificate.length){e.B(2);break}return c=Fi([l.g.serverCertificateUri],l.h.retryParameters),Se(e,3),xe(e,l.C.Tb.request(5,c).promise,5);case 5:c=e.h,l.g.serverCertificate=ne(c.data),Ae(e,4);break;case 3:throw new ke(2,6,6017,Ee(e));case 4:if(l.j.g)return e.return();case 2:return l.g.serverCertificate&&l.g.serverCertificate.length?(Se(e,6),xe(e,l.s.setServerCertificate(l.g.serverCertificate),8)):e.return();case 8:Ae(e,0);break;case 6:throw new ke(2,6,6004,Ee(e).message)}})),11);case 11:U(E.j),Ae(e,0);break;case 4:if(O=Ee(e),U(E.j,O),E.g=null,E.H.clear(),O instanceof ke)throw O;throw new ke(2,6,6002,O.message)}var l,c,d,h,f,p,g,m,v,y,b,w,x,T,S,A})}function ia(e){ha(e)&&e.l.resolve()}function ra(e,t){new I(function(){t.loaded=!0,ia(e)}).U(ga)}function aa(n,e,i){var r,a,o,s;return Ie(function(t){switch(t.g){case 1:try{r=n.s.createSession("persistent-license")}catch(e){return a=new ke(2,6,6005,e.message),n.o(a),t.return(Promise.reject(a))}return n.A.D(r,"message",function(e){n.m&&n.h.delayLicenseRequestUntilPlayed&&n.m.paused&&!n.N?n.J.push(e):oa(n,e)}),n.A.D(r,"keystatuseschange",function(e){return sa(n,e)}),a={initData:i.initData,initDataType:i.initDataType,loaded:!1,$e:1/0,hb:null,type:"persistent-license"},n.i.set(r,a),Se(t,2),xe(t,r.load(e),4);case 4:return o=t.h,U(n.j),o||(n.i.delete(r),o=n.h.persistentSessionOnlinePlayback?1:2,n.o(new ke(o,6,6013)),a.loaded=!0),ra(n,a),ia(n),t.return(r);case 2:o=Ee(t),U(n.j,o),n.i.delete(r),s=n.h.persistentSessionOnlinePlayback?1:2,n.o(new ke(s,6,6005,o.message)),a.loaded=!0,ia(n);case 3:return t.return(Promise.resolve())}})}function oa(r,a){var o,s,u,l,c,d,h,f;Ie(function(e){switch(e.g){case 1:if(o=a.target,r.h.logLicenseExchange&&Tr(a.message),s=r.i.get(o),d=r.g.licenseServerUri,l=r.h.advanced[r.g.keySystem],"individualization-request"==a.messageType&&l&&l.individualizationServer&&(d=l.individualizationServer),(u=Fi([d],r.h.retryParameters)).body=a.message,u.method="POST",u.licenseRequestType=a.messageType,u.sessionId=o.sessionId,u.drmInfo=r.g,s&&(u.initData=s.initData,u.initDataType=s.initDataType),ea(r.g.keySystem))if((t=ir(u.body,!0,!0)).includes("PlayReadyKeyMessage")){for(var t,n=we((t=qr(t,"PlayReadyKeyMessage")).getElementsByTagName("HttpHeader")),i=n.next();!i.done;i=n.next())i=i.value,u.headers[i.getElementsByTagName("name")[0].textContent]=i.getElementsByTagName("value")[0].textContent;u.body=Sr(t.getElementsByTagName("Challenge")[0].textContent)}else u.headers["Content-Type"]="text/xml; charset=utf-8";return l=Date.now(),Se(e,2),xe(e,r.C.Tb.request(2,u).promise,4);case 4:c=e.h,Ae(e,3);break;case 2:return d=Ee(e),h=new ke(2,6,6007,d),r.o(h),s&&s.hb&&s.hb.reject(h),e.return();case 3:return r.j.g?e.return():(r.I+=(Date.now()-l)/1e3,r.h.logLicenseExchange&&Tr(c.data),Se(e,5),xe(e,o.update(c.data),7));case 7:Ae(e,6);break;case 5:return h=Ee(e),f=new ke(2,6,6008,h.message),r.o(f),s&&s.hb&&s.hb.reject(f),e.return();case 6:if(r.j.g)return e.return();f=new he("drmsessionupdate"),r.C.onEvent(f),s&&(s.hb&&s.hb.resolve(),ra(r,s)),Te(e)}})}function sa(o,e){e=e.target;var s=o.i.get(e),u=!1,t=(e.keyStatuses.forEach(function(e,t){var n,i,r,a;"string"==typeof t&&(n=t,t=e,e=n),ea(o.g.keySystem)&&16==t.byteLength&&(yn()||In())&&(i=(n=De(t)).getUint32(0,!0),r=n.getUint16(4,!0),a=n.getUint16(6,!0),n.setUint32(0,i,!1),n.setUint16(4,r,!1),n.setUint16(6,a,!1)),"status-pending"!=e&&(s.loaded=!0),"expired"==e&&(u=!0),t=Er(t).slice(0,32),o.V.set(t,e)}),e.expiration-Date.now());(t<0||u&&t<1e3)&&s&&!s.hb&&(o.i.delete(e),e.close().catch(function(){})),ha(o)&&(o.l.resolve(),o.W.U(ma))}function ua(a){var t;return Ie(function(e){return t=Array.from(a.i.entries()),a.i.clear(),xe(e,Promise.all(t.map(function(e){var i=(e=we(e)).next().value,r=e.next().value;return Ie(function(e){return 1==e.g?(Se(e,2),a.ma||a.u.has(i.sessionId)||"persistent-license"!==r.type||a.h.persistentSessionOnlinePlayback?xe(e,(t=i,Ie(function(e){return 1==e.g?(n=new Promise(function(e,t){new I(t).U(pa)}),Se(e,2),xe(e,Promise.race([Promise.all([t.close(),t.closed]),n]),4)):2!=e.g?Ae(e,0):(Ee(e),void Te(e))})),5):xe(e,i.remove(),5)):2!=e.g?Ae(e,0):(Ee(e),void Te(e));var t,n})})),0)})}function la(e,t){return!e.length||!t.length||e===t||0<ca(e,t).length}function ca(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=(e=we(e)).next();!i.done;i=e.next())for(var i=i.value,r=(a=we(t)).next();!r.done;r=a.next())if(r=r.value,i.keySystem==r.keySystem){for(var a=new Map,o=we((i.initData||[]).concat(r.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,a.set(s.keyId,s);a=Array.from(a.values()),o=i.keyIds&&r.keyIds?new Set([].concat(le(i.keyIds),le(r.keyIds))):i.keyIds||r.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||r.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||r.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||r.persistentStateRequired,videoRobustness:i.videoRobustness||r.videoRobustness,audioRobustness:i.audioRobustness||r.audioRobustness,serverCertificate:i.serverCertificate||r.serverCertificate,serverCertificateUri:i.serverCertificateUri||r.serverCertificateUri,initData:a,keyIds:o});break}return n}function da(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function ha(e){for(var t=e=e.i.values(),n=function(e){return e.loaded},i=(t=we(t)).next();!i.done;i=t.next())if(!n(i.value))return;return 1}function fa(e,t,n,i,r,a){for(var o={},s=(e=we(e)).next();!s.done;o={Fa:o.Fa},s=e.next()){if(o.Fa=s.value,t.includes(o.Fa.licenseServerUri)||t.push(o.Fa.licenseServerUri),i.includes(o.Fa.serverCertificateUri)||i.push(o.Fa.serverCertificateUri),!o.Fa.serverCertificate||n.some(function(t){return function(e){return me(e,t.Fa.serverCertificate)}}(o))||n.push(o.Fa.serverCertificate),o.Fa.initData)for(var s={},u=we(o.Fa.initData),l=u.next();!l.done;s={kd:s.kd},l=u.next())s.kd=l.value,r.some(function(n){return function(e){var t=n.kd;return!(!e.keyId||e.keyId!=t.keyId)||e.initDataType==t.initDataType&&me(e.initData,t.initData)}}(s))||r.push(s.kd);if(o.Fa.keyIds)for(u=(s=we(o.Fa.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}(e=Wr.prototype).destroy=function(){return this.j.destroy()},e.configure=function(e){this.h=e},e.Ic=function(t){var i=this;return Ie(function(e){if(1==e.g)return i.s?(i.m=t,i.A.ja(i.m,"play",function(){for(var e=we(i.J),t=e.next();!t.done;t=e.next())oa(i,t.value);i.N=!0,i.J=[]}),"webkitCurrentPlaybackTargetIsWireless"in i.m&&i.A.D(i.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ua(i)}),i.F=i.g&&i.g.initData.find(function(e){return 0<e.initData.length})||null,i.F||"com.apple.fps"!==i.g.keySystem||i.u.size?xe(e,Jr(i),2):e.B(2)):(i.A.ja(t,"encrypted",function(){i.o(new ke(2,6,6010))}),e.return());Qr(i).catch(function(){}),i.F||i.u.size||i.h.parseInbandPsshEnabled||i.A.D(i.m,"encrypted",function(e){return t=i,n=e,Ie(function(e){if(1==e.g)return xe(e,Jr(t),2);Zr(t,n.initDataType,ne(n.initData)),Te(e)});var t,n}),Te(e)})},e.Fe=function(){var n=this,e=Ji(this.i.keys(),function(e){var t=n.i.get(e);return{sessionId:e.sessionId,sessionType:t.type,initData:t.initData,initDataType:t.initDataType}});return Array.from(e)},e.Qc=function(){for(var e=1/0,t=this.i.keys(),n=(t=we(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},e.Bd=function(){return er(this.ea)};var pa=1,ga=5,ma=.5,va=new Qi(function(){return ye(new Uint8Array([0]))});function ya(){}function ba(e,t){if(t){var n=wa[t.toLowerCase()];if(n)return n}throw new ke(2,4,4e3,e,t)}t("shaka.media.ManifestParser",ya),ya.unregisterParserByMime=function(e){delete wa[e]},ya.registerParserByMime=function(e,t){wa[e]=t},ya.registerParserByExtension=function(){di("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ya.AccessibilityPurpose={Yi:"visually impaired",ui:"hard of hearing"};var wa={};function xa(e){function t(){r=!0}function n(e){a.push(e),P(e)}e=ne(e);var i,r=!1,a=[],o=[];if((new dr).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).O("stsd",function(e){i=e,a.push(e),hr(e)}).O("encv",t).O("enca",t).O("dvav",function(e){o.push({box:e,Ma:1701733238})}).O("dva1",function(e){o.push({box:e,Ma:1701733238})}).O("dvh1",function(e){o.push({box:e,Ma:1701733238})}).O("dvhe",function(e){o.push({box:e,Ma:1701733238})}).O("hev1",function(e){o.push({box:e,Ma:1701733238})}).O("hvc1",function(e){o.push({box:e,Ma:1701733238})}).O("avc1",function(e){o.push({box:e,Ma:1701733238})}).O("avc3",function(e){o.push({box:e,Ma:1701733238})}).O("ac-3",function(e){o.push({box:e,Ma:1701733217})}).O("ec-3",function(e){o.push({box:e,Ma:1701733217})}).O("ac-4",function(e){o.push({box:e,Ma:1701733217})}).O("mp4a",function(e){o.push({box:e,Ma:1701733217})}).parse(e),r)return e;if(0==o.length||!i)throw Er(e),new ke(2,3,3019);o.reverse();for(var s=we(o),u=s.next();!u.done;u=s.next())u=u.value,e=function(e,t,n,i,r){var a=Sa.value(),o=e.subarray(n.start,n.start+n.size),s=De(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=De(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),Ta(u,0,u.byteLength),r=new Uint8Array(e.byteLength+u.byteLength),n=bn()?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),e=we(i),i=e.next();!i.done;i=e.next())i=i.value,Ta(r,i.start,i.size+u.byteLength);return u=De(r,t.start),t=vr(t),e=u.getUint32(t),u.setUint32(t,e+1),r}(e,i,u.box,a,u.Ma);return e}function Ta(e,t,n){0!=(t=(e=De(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Sa=new Qi(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 Aa(e,t,n,i,r,a,o){this.Z=e,this.Qa=t,this.wa=n,this.Ve=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,this.mimeType=this.codecs=null}function Ea(e,t){return e===t||(e&&t?e.ic()==t.ic()&&e.fc()==t.fc()&&Be(e.Z().sort(),t.Z().sort())&&me(e.g,t.g):e==t)}function N(e,t,n,i,r,a,o,s,u,l,c,d,h,f,p,g){for(l=void 0===l?[]:l,f=void 0===f?Ia:f,this.startTime=e,this.h=this.endTime=t,this.A=n,this.Qa=i,this.wa=r,this.aa=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===c?"":c,this.u=void 0===d?null:d,this.ca=void 0===h?null:h,this.status=f,this.l=!1,this.j=!0,this.m=!1,this.aes128Key=void 0===p?null:p,this.s=null,this.i=0,this.o=void 0!==g&&g,this.Md=this.Zc=!1,t=(e=we(this.g)).next();!t.done;t=e.next())t.value.ag();this.o&&this.g.length&&this.g[this.g.length-1].$f(),this.mimeType=this.codecs=null}Aa.prototype.ic=function(){return this.Qa},Aa.prototype.fc=function(){return this.wa},t("shaka.media.InitSegmentReference",Aa),Aa.prototype.getEndByte=Aa.prototype.fc,Aa.prototype.getStartByte=Aa.prototype.ic,(e=N.prototype).Z=function(){return this.A()},e.getStartTime=function(){return this.startTime},e.Ug=function(){return this.endTime},e.ic=function(){return this.Qa},e.fc=function(){return this.wa},e.lh=function(){return this.tilesLayout},e.kh=function(){return this.u},e.Pb=function(){return this.status},e.Bh=function(){this.status=ka},e.Ue=function(){this.l=!0},e.xh=function(){return this.l},e.Od=function(){this.j=!1},e.uh=function(){return this.j},e.ag=function(){this.Zc=!0},e.wh=function(){return this.Zc},e.$f=function(){this.Md=!0},e.vh=function(){return this.Md},e.Zf=function(){this.m=!0},e.rh=function(){return this.m},e.pg=function(e){this.s=e},e.jh=function(){return this.s},e.offset=function(e){this.startTime+=e,this.endTime+=e,this.h+=e;for(var t=we(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.h+=e},e.tf=function(e){null==this.ca?Y("Sync attempted without sync time!"):(e=this.ca-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},t("shaka.media.SegmentReference",N),N.prototype.syncAgainst=N.prototype.tf,N.prototype.getThumbnailSprite=N.prototype.jh,N.prototype.setThumbnailSprite=N.prototype.pg,N.prototype.hasByterangeOptimization=N.prototype.rh,N.prototype.markAsByterangeOptimization=N.prototype.Zf,N.prototype.isLastPartial=N.prototype.vh,N.prototype.markAsLastPartial=N.prototype.$f,N.prototype.isPartial=N.prototype.wh,N.prototype.markAsPartial=N.prototype.ag,N.prototype.isIndependent=N.prototype.uh,N.prototype.markAsNonIndependent=N.prototype.Od,N.prototype.isPreload=N.prototype.xh,N.prototype.markAsPreload=N.prototype.Ue,N.prototype.markAsUnavailable=N.prototype.Bh,N.prototype.getStatus=N.prototype.Pb,N.prototype.getTileDuration=N.prototype.kh,N.prototype.getTilesLayout=N.prototype.lh,N.prototype.getEndByte=N.prototype.fc,N.prototype.getStartByte=N.prototype.ic,N.prototype.getEndTime=N.prototype.Ug,N.prototype.getUris=N.prototype.Z;var Ia=0,ka=1;function Ca(e){return e&&!(1==e.length&&e.end(0)-e.start(0)<1e-6)&&e.length?e.end(e.length-1):null}function Ma(e,t){return!(!e||!e.length||1==e.length&&e.end(0)-e.start(0)<1e-6||t>e.end(e.length-1))&&t>=e.start(0)}function Da(e,t){if(!e||!e.length||1==e.length&&e.end(0)-e.start(0)<1e-6)return 0;for(var n=0,i=(e=we(Ra(e))).next();!i.done;i=e.next()){var r=i.value,i=r.start;t<(r=r.end)&&(n+=r-Math.max(i,t))}return n}function Ra(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 La(){}function Na(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Pa(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function _a(e,t){var n=(127&e[t])<<21;return(n=(n|=(127&e[t+1])<<14)|(127&e[t+2])<<7)|127&e[t+3]}function ja(e){for(var t=0,n=[];Na(e,t);){var i=_a(e,t+6);for(e[t+5]>>6&1&&(t+=10),i=(t+=10)+i;t+10<i;){var r=e.subarray(t),a=_a(r,4);(a=function(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"!==e.type)return"TXXX"===e.type||"WXXX"===e.type?e.size<2||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=nr(ne(e.data,1,i)),e=nr(ne(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?e.size<2||-1===(n=e.data.indexOf(0))?null:(n=nr(ne(e.data,0,n)),"com.apple.streaming.transportStreamTimestamp"==(t.description=n)?(e=1&(n=e.data.subarray(n.length+1))[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=ye(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?e.size<2||3!==e.data[0]?null:(e=nr(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=nr(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=ye(e.data),t):null;if(e.size<2||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=nr(ne(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o=nr(ne(e.data,3+n,a)),e="--\x3e"===i?nr(ne(e.data,4+n+a)):ye(e.data.subarray(4+n+a));return t.mimeType=i,t.pictureType=r,t.description=o,t.data=e,t}(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}Pa(e,t)&&(t+=10)}return n}function Oa(e,t){for(var n=t=void 0===t?0:t,i=0;Na(e,t);)e[t+5]>>6&1&&(i+=10),i=i+10+_a(e,t+6),Pa(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}function Ua(e,t){var n=null,i=null,r=null,a=e.L();return 1&t&&(r=e.oc()),2&t&&e.skip(4),{trackId:a,Kf:n=8&t?e.L():n,Mg:i=16&t?e.L():i,$i:r}}function Ba(e,t){return 1==t?(t=e.L(),e=e.L(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.L()}}function Fa(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.L(),e.skip(4),e=e.Ea(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function Va(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={hf:null,sampleSize:null,Wd:null};256&n&&(s.hf=e.L()),512&n&&(s.sampleSize=e.L()),1024&n&&e.skip(4),2048&n&&(s.Wd=0==t?e.L():e.fg()),r.push(s)}return{dj:i,ig:r,Lg:a}}function Ha(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.Ea()+e.Ea()/16,height:e=e.Ea()+e.Ea()/16}}function Ga(e,t){return e.skip(87),{ha:t+"."+this.g(e.ga())+this.g(e.ga())+this.g(e.ga())}}function Ka(e){return{ha:mr(e=e.L())}}function qa(e,t){if(this.j=e,void 0!==t&&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=ne(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Xa(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 ur(n,0).L(),e.g=8*i,e.i-=i)}function za(e,t){var n;e.g<=t&&(t=(t-=e.g)-8*(n=Math.floor(t/8)),e.g-=n,Xa(e)),e.h<<=t,e.g-=t}function ie(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&&Xa(e),0<(n=t-n)?i<<n|ie(e,n):i}function Wa(e){for(var t=0;t<e.g;++t)if(0!=(e.h&2147483648>>>t))return e.h<<=t,e.g-=t,t;return Xa(e),t+Wa(e)}function Ya(e){za(e,1+Wa(e))}function re(e){return ie(e,Wa(e)+1)-1}function $a(e){return 1&(e=re(e))?1+e>>>1:-1*(e>>>1)}function ae(e){return 1===ie(e,1)}function oe(e){return ie(e,8)}function Ja(e,t){for(var n=8,i=8,r=0;r<t;r++)n=0===(i=0!==i?(n+(i=$a(e))+256)%256:i)?n:i}function Qa(){this.A=null,this.C=!1,this.m=this.F=null,this.j=[],this.g=[],this.o=this.s=null,this.i=[],this.h=[],this.u=null,this.l=[]}function Za(e){if(1!=(e[0]<<16|e[1]<<8|e[2]))return null;var t={data:new Uint8Array(0),packetLength:e[4]<<8|e[5],pts:null,dts:null,nalus:[]};if(t.packetLength&&t.packetLength>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 eo(e){return!(to(e)<0)}function to(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}N.Status={gi:Ia,Wi:ka,Ai:2},t("shaka.util.Id3Utils",La),La.getID3Data=Oa,La.getID3Frames=ja,t("shaka.util.ExpGolomb",qa),(e=Qa.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},e.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,to(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.A=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.A:a&&(s+=e[s]+1);var o={audio:-1,video:-1,Jd:-1,audioCodec:"",videoCodec:""},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;){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.Jd&&(o.Jd=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+=5+c}-1!=(a=o).video&&(this.F=a.video,this.m=a.videoCodec),-1!=a.audio&&(this.s=a.audio,this.o=a.audioCodec),-1!=a.Jd&&(this.u=a.Jd),i&&!this.C&&(i=!1,r=t-188),this.C=!0;break;case this.F:s=e.subarray(s,r+188),a?this.j.push([s]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(s);break;case this.s:s=e.subarray(s,r+188),a?this.i.push([s]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(s);break;case this.u:s=e.subarray(s,r+188),a?this.l.push([s]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(s);break;default:i=!0}}return this},e.Hh=function(e){return di("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.cf(e)},e.cf=function(e,t,n){var i=e.pts?e.pts/9e4:null,r=(e=e.data).byteLength,a=1;"hvc"==this.m&&(a=2);for(var o,s=n||0,u=[],l=-1,c=0,d=0;d<r;++d){var h=e[d];if(h){if(2<=s&&1==h){if(t&&!u.length&&-1==l&&(h=d-(3<s?3:s),n&&0!=h&&(h=e.subarray(0,h),t.data=Ir(t.data,h),t.fullData=Ir(t.fullData,h))),0<=l?u.push({data:e.subarray(l+a,(s=d-((3<s?3:s)+1))+1),fullData:e.subarray(l,s+1),type:c,time:i}):t&&!u.length&&(0<(l=d-s)&&(l=e.subarray(0,l),t.data=Ir(t.data,l),t.fullData=Ir(t.fullData,l))),r-a<=d)return u;l=++d,c="hvc"==this.m?e[d]>>1&63:31&e[d]}s=0}else s++;r-1<=d&&0<=l&&0<=s&&(o={data:e.subarray(l+a,r),fullData:e.subarray(l,r),type:c,time:i})}return o&&u.push(o),!u.length&&t&&(t.data=Ir(t.data,e),t.fullData=Ir(t.fullData,e)),u},e.getMetadata=function(){for(var e=[],t=we(this.l),n=t.next();!n.done;n=t.next())(n=Za(n=Ir.apply(wr,le(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:ja(n.data),dts:n.dts,pts:n.pts});return e},e.Mb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=we(this.i),n=t.next();!n.done;n=t.next()){var i=Ir.apply(wr,le(n.value)),r=Za(i),n=this.h.length?this.h[this.h.length-1]:null;r&&null!=r.pts&&null!=r.dts&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&((n=this.h.pop()).data=Ir(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return this.h},e.kc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t,n=!1,i=we(this.j),r=i.next();!r.done;r=i.next()){var a=Ir.apply(wr,le(r.value)),o=Za(a),r=this.g.length?this.g[this.g.length-1]:null;o&&null!=o.pts&&null!=o.dts&&(!r||r.pts!=o.pts&&r.dts!=o.dts)?(this.g.length&&o.dts<(r.dts||0)&&(n=!0),this.g.push(o)):this.g.length&&(a=o?o.data:a)&&((r=this.g.pop()).data=Ir(r.data,a),this.g.push(r))}if(e){for(r=(i=we(this.g)).next();!r.done;r=i.next())(r=r.value).nalus=this.cf(r,t,void 0),r.nalus.length&&(t=r.nalus[r.nalus.length-1]);this.g=this.g.filter(function(e){return e.nalus.length})}n&&(this.g=this.g.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return e?this.g:(e=this.g,this.g=[],e)},e.getStartTime=function(e){var t;return"audio"==e?(e=null,(t=this.Mb()).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):"video"==e?(e=null,(t=this.kc(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},e.Pc=function(){return{audio:this.o,video:this.m}},e.Fd=function(){for(var e=[],t=we(this.kc()),n=t.next();!n.done;n=t.next())e.push.apply(e,le(n.value.nalus));return e},e.oh=function(){di("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Je();return{height:e.height,width:e.width}},e.Je=function(){return("hvc"==this.m?function(e){var t={height:null,width:null,ha:null};if(!(e=e.Fd()).length)return t;if(!(e=e.find(function(e){return 33==e.type})))return t;var n=new qa(e.fullData,!0),i=(oe(n),oe(n),ie(n,4),ie(n,3)),r=(ae(n),ie(n,2)),a=ie(n,1),o=ie(n,5),s=ie(n,32);e=oe(n);for(var u=oe(n),l=oe(n),c=oe(n),d=oe(n),h=oe(n),f=oe(n),p=[],g=[],m=0;m<i;m++)p.push(ae(n)),g.push(ae(n));if(0<i)for(m=i;m<8;m++)ie(n,2);for(m=0;m<i;m++)p[m]&&ie(n,88),g[m]&&oe(n);re(n),3==(i=re(n))&&ie(n,1),p=re(n),g=re(n);var v=m=0,y=0,b=0;return ae(n)&&(m+=re(n),v+=re(n),y+=re(n),b+=re(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;n<32;n++)t|=(e>>n&1)<<31-n;return t>>>0}(s),a=1==a?"H":"L",r="hvc1."+["","A","B","C"][r]+o,r=(r+="."+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.ha=r,t}:function(e){var t={height:null,width:null,ha:null};if(!(e=e.Fd()).length)return t;if(!(e=e.find(function(e){return 7==e.type})))return t;var n=oe(e=new qa(e.data)),i=oe(e),r=oe(e);if(Ya(e),no.includes(n)){var a=re(e);if(3===a&&za(e,1),Ya(e),Ya(e),za(e,1),ae(e)){a=3!==a?8:12;for(var o=0;o<a;o++)ae(e)&&Ja(e,o<6?16:64)}}if(Ya(e),0===(a=re(e)))re(e);else if(1===a)for(za(e,1),Ya(e),Ya(e),a=re(e),o=0;o<a;o++)Ya(e);Ya(e),za(e,1),a=re(e),o=re(e);var s=ie(e,1),u=(0===s&&za(e,1),za(e,1),0),l=0,c=0,d=0;return ae(e)&&(u=re(e),l=re(e),c=re(e),d=re(e)),t.height=String((2-s)*(o+1)*16-2*c-2*d),t.width=String(16*(a+1)-2*u-2*l),t.ha="avc1."+("0"+n.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2),t})(this)},t("shaka.util.TsParser",Qa),Qa.syncOffset=to,Qa.probe=eo,Qa.prototype.getVideoInfo=Qa.prototype.Je,Qa.prototype.getVideoResolution=Qa.prototype.oh,Qa.prototype.getVideoNalus=Qa.prototype.Fd,Qa.prototype.getCodecs=Qa.prototype.Pc,Qa.prototype.getVideoData=Qa.prototype.kc,Qa.prototype.getAudioData=Qa.prototype.Mb,Qa.prototype.parseNalus=Qa.prototype.cf,Qa.prototype.parseAvcNalus=Qa.prototype.Hh,Qa.Timescale=9e4;var no=[100,110,122,244,44,83,86,118,128,138,139,134];function io(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&&X("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else{if("undefined"==typeof LcevcDil){X("Could not find LCEVC Library on this page"),e=!1;break e}this.h=LcevcDil,this.j=!0,di("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead")}e=void 0===this.h.SupportObject?(X("Could not find LCEVC Library on this page"),!1):(this.h.SupportObject.SupportStatus||X(this.h.SupportObject.SupportError),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=new(this.j?this.h.LcevcDil:this.h.LCEVCdec)(this.l,this.i,this.m))}function ro(e){e.g&&e.i.classList.add("shaka-hidden")}function ao(e,t,n){var i=oo,r=ho;switch(t.mimeType){case"video/webm":i=so;break;case"video/mp4":i=uo}switch(n){case"DASH":r=co;break;case"HLS":r=lo}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(i),e.j||e.g.setStreamingFormat(r))}io.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},t("shaka.lcevc.Dec",io);var oo=0,so=1,uo=2,lo=0,co=1,ho=-1;function fo(e,t,n,i){var c=this;this.i=e,this.C=null,this.F=t,this.g={},this.G={},this.ma={},this.h=null,this.Y=!1,this.Aa=n||function(){},this.N=i||null,this.j={},this.s=new Wi,this.m={},this.H=null,this.J=new k,this.K="",this.da=!1,this.l=po(this,this.J),this.A=!1,this.I=new zi(function(){return t=c,Ie(function(e){if(1==e.g){for(i in n=[],t.j)for(r=t.j[i],a=r[0],t.j[i]=r.slice(0,1),a&&n.push(a.p.catch(en)),o=we(r.slice(1)),s=o.next();!s.done;s=o.next())u=s.value,u.p.reject(new ke(2,7,7003,void 0));for(l in t.h&&n.push(t.h.destroy()),t.F&&n.push(t.F.destroy()),t.m)n.push(t.m[l].destroy());return xe(e,Promise.all(n),2)}t.s&&(t.s.release(),t.s=null),t.i&&(t.i.removeAttribute("src"),t.i.load(),t.i=null),t.C=null,t.l=null,t.h=null,t.F=null,t.g={},t.m={},t.H=null,t.j={},t.N=null,Te(e)});var t,n,i,r,a,o,s,u,l}),this.u=!1,this.W="UNKNOWN",this.ka=this.za=!1,this.Ba=new k,this.o=!1,this.ea=!0,this.V=null}function po(e,t){var n;return q.ManagedMediaSource?(e.i.disableRemotePlayback=!0,n=new ManagedMediaSource,e.s.D(n,"startstreaming",function(){e.ea=!0}),e.s.D(n,"endstreaming",function(){e.ea=!1})):n=new MediaSource,e.s.ja(n,"sourceopen",function(){URL.revokeObjectURL(e.K),t.resolve()}),e.s.ja(e.i,"playing",function(){e.da=!0}),e.K=No(n),e.i.src=e.K,n}function go(t,e,n,i,r){r=void 0!==r&&r;var a=Bt(n.mimeType,i);if(e==ce)mo(t,a,t.u,n.external);else{var o=t.C.forceTransmux||r;if(Z(a)&&(t.u||!zt.includes(a))||(o=!0),r=Ft(n.mimeType,i),o){if(o=_t("audio",(i||"").split(",")),i=_t("video",(i||"").split(",")),o&&i)return t.o=!0,go(t,"audio",n,o,!0),void go(t,"video",n,i,!0);(i=ut(r))&&(a=i(),a=(t.m[e]=a).convertCodecs(e,r))}r=a+t.C.sourceBufferExtraFeatures,U(t.I);try{var s=t.l.addSourceBuffer(r)}catch(e){throw new ke(2,3,3015,e,"The mediaSource_ status was "+t.l.readyState+" expected 'open'")}t.u&&(s.mode=Po),t.s.D(s,"error",function(){t.j[e][0].p.reject(new ke(2,3,3014,t.i.error?t.i.error.code:0))}),t.s.D(s,"updateend",function(){return ko(t,e)}),t.g[e]=s,t.G[e]=a,t.ma[e]=!!n.drmInfos.length}}function mo(e,t,n,i){e.h||(e.h=new Wt(e.F));var r=e.h;i=i||e.Y,e=e.W,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=(0,Qt[t])(),r.i.setSequenceMode?r.i.setSequenceMode(n):X('Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):X('Text parsers should have a "setManifestType" method!'),r.u=i)}function vo(e){return!e.A&&(!e.l||"ended"==e.l.readyState)}function yo(e,t){return e=e.A||!Object.keys(e.g).length?null:t==ce?e.h.g:!(e=wo(e,t))||1==e.length&&e.end(0)-e.start(0)<1e-6?null:1==e.length&&e.start(0)<0?0:e.length?e.start(0):null}function bo(e,t){return e.A?null:t==ce?e.h.h:Ca(wo(e,t))}function wo(e,t){try{return e.g[t].buffered}catch(e){return null}}function xo(y,b,w,x,T,S,A,E,I,k){var C,M,D,R,L,N;return A=void 0!==A&&A,E=void 0!==E&&E,I=void 0!==I&&I,k=void 0!==k&&k,Ie(function(e){switch(e.g){case 1:if(b!=(C=jt).na){e.B(2);break}if(y.u)return xe(e,y.Ba,4);e.B(3);break;case 4:D=e.h,y.h.s=D;case 3:return xe(e,(h=y.h,f=w,p=x?x.startTime:null,g=x?x.endTime:null,m=x?x.Z()[0]:null,Ie(function(e){return 1==e.g?xe(e,Promise.resolve(),2):h.i&&h.j?null==p||null==g?(h.i.parseInit(ne(f)),e.return()):(v=h.u?p:h.s,v={periodStart:h.s,segmentStart:p,segmentEnd:g,vttOffset:v},v=h.i.parseMedia(ne(f),v,m),v=v.filter(function(e){return e.startTime>=h.l&&e.startTime<h.m}),h.j.append(v),null==h.g&&(h.g=Math.max(p,h.l)),h.h=Math.min(g,h.m),void Te(e)):e.return()})),5);case 5:return e.return();case 2:if(!k&&y.o)return xe(e,xo(y,C.P,w,x,T,S,A,E,I,!0),7);e.B(6);break;case 7:return xe(e,xo(y,C.$,w,x,T,S,A,E,I,!0),8);case 8:return e.return();case 6:if(!y.g[b])return e.return();if(M=y.g[b].timestampOffset,D=y.G[b],y.m[b]&&(D=y.m[b].getOriginalMimeType()),x&&(t=y,n=b,r=x,a=D,o=M,c=null,d=ne(i=w),zt.includes(a)?(o=ja(d)).length&&r&&((n=o.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&n.data&&(c=Math.round(n.data)/1e3),t.Aa([{cueTime:r.startTime,data:d,frames:o,dts:r.startTime,pts:r.startTime}],0,r.endTime)):a.includes("/mp4")&&r&&0==r.timestampOffset&&r.aa&&r.aa.timescale?(s=r.aa.timescale,isNaN(s)||(u=0,l=!1,(new dr).box("moof",P).box("traf",P).O("tfdt",function(e){u=Ba(e.reader,e.version).baseMediaDecodeTime/s,l=!0,e.parser.stop()}).parse(i,!0),l&&(c=u))):a.includes("/mp4")||a.includes("/webm")||!eo(d)||(null!=(n=(d=(new Qa).parse(d)).getStartTime(n))&&(c=n),(d=d.getMetadata()).length&&t.Aa(d,o,r?r.endTime:null)),null!=(R=c)&&(R=x.startTime-R,(.001<=Math.abs(M-R)||A||E)&&(!I||0<R||!M)&&(M=R,y.ka&&(Co(y,b,function(){return Eo(y,b)}),Co(y,b,function(){return Io(y,b,M)}))),R=b==C.$||!(C.$ in y.g),y.u&&R&&y.Ba.resolve(M))),S&&b==C.$&&(y.h||mo(y,"application/cea-608",y.u,!1),y.H||(R=D.split(";",1)[0],y.H=new Ne(R)),x?(L=y.H.i(w)).length&&Jt(y.h,L,x.startTime,x.endTime,M):y.H.init(w)),y.m[b])return xe(e,y.m[b].transmux(w,T,x,y.l.duration,b),10);e.B(9);break;case 10:w=e.h;case 9:return i=y,a=w,n=x?x.startTime:null,t=b,d=i.ma[t],w=a=i.C.insertFakeEncryptionInInit&&null==n&&d&&(wn()||bn()||Cn("SOPOpenBrowser"))&&"mp4"==i.G[t].split(";")[0].split("/")[1]?xa(a):a,x&&y.u&&b!=C.na&&(A||E)&&(N=x.startTime,Co(y,b,function(){return Eo(y,b)}),Co(y,b,function(){return Io(y,b,N)})),xe(e,Co(y,b,function(){var e,t=w;"video"==b&&y.N&&(e=y.N).g&&e.g.appendBuffer(t,"video",e.o,-M),y.g[b].appendBuffer(t)}),11);case 11:Te(e)}var t,n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v})}function To(t,n){var i;return Ie(function(e){return 1==e.g?n==(i=jt).na?t.h?xe(e,t.h.remove(0,1/0),0):e.return():xe(e,Co(t,n,function(){return Ao(t,n,0,t.l.duration)}),4):t.o?xe(e,Co(t,i.P,function(){return Ao(t,i.P,0,t.l.duration)}),0):e.B(0)})}function So(i,r,b,w,x,T,S,A,E){var I,k;return Ie(function(e){return 1==e.g?r==(I=jt).na?(T||(i.h.s=b),t=i.h,n=x,t.l=w,t.m=n,e.return()):(k=[],xe(e,(a=i,o=r,s=S,u=A,l=E,Ie(function(e){return 1==e.g?o==(m=jt).na?e.return(!1):(c=Gt(qt(a.G[o])),d=Kt(a.G[o]),f=!1,p=Bt(s,u),g=a.C.forceTransmux,(g=!Z(p)||!a.u&&zt.includes(p)||u.includes(",")?!0:g)&&(g=Ft(s,u),v=ut(g))&&(h=v(),v=_t(m.P,(u||"").split(",")),y=_t(m.$,(u||"").split(",")),p=v&&y?(f=!0,y=y,o==m.P&&(y=v),h.convertCodecs(o,Ft(s,y))):h.convertCodecs(o,g)),m=Gt(qt(p)),v=Kt(p),c===m&&d===v?e.return(!1):(y=!0,(y=a.o||f&&h&&!a.m[o]?!1:y)&&"smooth"===a.C.codecSwitchingStrategy&&ee()?xe(e,(i=p,r=h,Co(t=a,n=o,function(){n!==ce&&(ee()&&(t.m[n]&&(t.m[n].destroy(),delete t.m[n]),r&&(t.m[n]=r),t.g[n].changeType(i+t.C.sourceBufferExtraFeatures),t.G[n]=i),ko(t,n))})),3):(h&&h.destroy(),xe(e,Lo(a,l),3)))):e.return(!0);var t,n,i,r})),2)):(e.h||(k.push(Co(i,r,function(){return Eo(i,r)})),i.o&&k.push(Co(i,I.P,function(){return Eo(i,I.P)}))),T||(k.push(Co(i,r,function(){return Io(i,r,b)})),i.o&&k.push(Co(i,I.P,function(){return Io(i,I.P,b)}))),k.push(Co(i,r,function(){i.g[r].appendWindowStart=0,i.g[r].appendWindowEnd=x,i.g[r].appendWindowStart=w,ko(i,r)})),i.o&&k.push(Co(i,I.P,function(){var e=I.P;i.g[e].appendWindowStart=0,i.g[e].appendWindowEnd=x,i.g[e].appendWindowStart=w,ko(i,e)})),xe(e,Promise.all(k),0));var a,o,s,u,l,c,d,h,f,p,g,m,v,y,t,n})}function Ao(e,t,n,i){i<=n?ko(e,t):e.g[t].remove(n,i)}function Eo(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,ko(e,t)}function Io(e,t,n){n<0&&(n+=.001),e.g[t].timestampOffset=n,ko(e,t)}function ko(e,t){var n;e.A||(n=e.j[t][0])&&(n.p.resolve(),Do(e,t))}function Co(e,t,n){return U(e.I),n={start:n,p:new k},e.j[t].push(n),1==e.j[t].length&&Ro(e,t),n.p}function Mo(t,n){var i,r,a,o,s;return Ie(function(e){switch(e.g){case 1:for(a in U(t.I),i=[],r={},t.g)r.yc=new k,o={start:function(e){return function(){return e.yc.resolve()}}(r),p:r.yc},t.j[a].push(o),i.push(r.yc),1==t.j[a].length&&o.start(),r={yc:r.yc};return Se(e,2),xe(e,Promise.all(i),4);case 4:Ae(e,3);break;case 2:throw Ee(e);case 3:return Se(e,5,6),xe(e,n(),6);case 6:for(s in Ce(e),t.g)Do(t,s);Me(e,0);break;case 5:throw new ke(2,3,3015,Ee(e),t.i.error||"No error in the media element")}})}function Do(e,t){e.j[t].shift(),Ro(e,t)}function Ro(t,n){var i=t.j[n][0];if(i)try{i.start()}catch(e){"QuotaExceededError"==e.name?i.p.reject(new ke(2,3,3017,n)):i.p.reject(new ke(2,3,3015,e,t.i.error||"No error in the media element")),Do(t,n)}}function Lo(e,I){return Mo(e,function(){return t=e,n=I,Ie(function(e){switch(e.g){case 1:for(u in i=jt,t.A=!0,t.o=!1,r=t.i.currentTime,a=t.i.autoplay,o=t.i.paused,t.da&&(t.i.autoplay=!1),M(e,2),t.s.Za(),s=[],t.m)s.push(t.m[u].destroy());for(l in t.j)for(c=t.j[l],d=c[0],t.j[l]=c.slice(0,1),d&&s.push(d.p.catch(en)),h=we(c.slice(1)),f=h.next();!f.done;f=h.next())p=f.value,p.p.reject(new ke(2,7,7003,void 0));for(g in t.g){m=t.g[g];try{t.l.removeSourceBuffer(m)}catch(e){}}return xe(e,Promise.all(s),4);case 4:return t.m={},t.g={},v=t.l.duration,t.J=new k,t.l=po(t,t.J),xe(e,t.J,5);case 5:for(!isNaN(v)&&v?t.l.duration=v:!isNaN(t.V)&&t.V&&(t.l.duration=t.V),y=new k,b=t.l.sourceBuffers,w=n.size,x=0,t.s.D(b,"addsourcebuffer",function(){++x===w&&y.resolve()}),T=we(n.keys()),S=T.next();!S.done;S=T.next())A=S.value,E=n.get(A),go(t,A,E,E.codecs),t.o?(t.j[i.P]=[],t.j[i.$]=[]):t.j[A]=[];return t.i.currentTime=r,xe(e,y,2);case 2:Ce(e),t.A=!1,U(t.I),t.s.ja(t.i,"canplaythrough",function(){U(t.I),t.i.autoplay=a,o||t.i.play()}),Me(e,0)}});var t,n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,x,T,S,A,E})}(e=fo.prototype).destroy=function(){return this.I.destroy()},e.init=function(t,n,i,r){n=void 0!==n&&n,i=void 0===i?"UNKNOWN":i,r=void 0!==r&&r;var a,o,s,u,l,c=this;return Ie(function(e){if(1==e.g)return a=jt,xe(e,c.J,2);for(c.u=n,c.W=i,c.za=r,c.ka=!c.u&&"HLS"==c.W&&!c.za,o=we(t.keys()),s=o.next();!s.done;s=o.next())u=s.value,l=t.get(u),go(c,u,l,l.codecs),c.o?(c.j[a.P]=[],c.j[a.$]=[]):c.j[u]=[];Te(e)})},e.configure=function(e){this.C=e},e.pb=function(){var e,t,n={total:this.A?[]:Ra(this.i.buffered),audio:this.A?[]:Ra(wo(this,"audio")),video:this.A?[]:Ra(wo(this,"video")),text:[]};return this.h&&(e=this.h.g,t=this.h.h,null!=e&&null!=t&&n.text.push({start:e,end:t})),n},e.remove=function(t,n,i){var r,a=this;return Ie(function(e){return 1==e.g?t==(r=jt).na?xe(e,a.h.remove(n,i),0):xe(e,Co(a,t,function(){return Ao(a,t,n,i)}),4):a.o?xe(e,Co(a,r.P,function(){return Ao(a,r.P,n,i)}),0):e.B(0)})},e.flush=function(t){var n,i=this;return Ie(function(e){return 1==e.g?t==(n=jt).na?e.return():xe(e,Co(i,t,function(){i.i.currentTime-=.001,ko(i,t)}),2):i.o?xe(e,Co(i,n.P,function(){var e=n.P;i.i.currentTime-=.001,ko(i,e)}),0):e.B(0)})},e.endOfStream=function(t){var n=this;return Ie(function(e){return xe(e,Mo(n,function(){vo(n)||"closed"===n.l.readyState||(t?n.l.endOfStream(t):n.l.endOfStream())}),0)})},e.Pa=function(n){var i=this;return Ie(function(e){return xe(e,Mo(i,function(){if(n<i.l.duration)for(var e in i.g){var t={start:function(){},p:new k};i.j[e].unshift(t)}i.l.duration=n,i.V=n}),0)})},e.getDuration=function(){return this.l.duration};var No=q.URL.createObjectURL,Po="sequence";function fe(e,t,n){this.i=e,this.o=t,this.u=this.j=1/0,this.g=1,this.h=this.l=null,this.s=0,this.C=!0,this.F=0,this.A=void 0===n||n,this.G=0,this.m=!1}function _o(e,t,n){this.j=n,this.l=e,this.s=Oo(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.u=t,this.i=function(){}}function jo(e){this.g=e}function Oo(e){if(e.g.paused||0==e.g.buffered.length)var t=!1;else e:{for(var t=e.g.currentTime,n=(e=we(Ra(e.g.buffered))).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 Uo(e,t,n,i,r){var a=this;this.u=r,this.g=e,this.A=t,this.s=n,this.l=new Wi,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 Bo(a)}),this.m=new I(function(){Bo(a)}).$a(this.s.gapJumpTimerTime)}function Bo(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;var t,n,i,r;e.g.paused&&(e.g.currentTime!=e.i||!e.g.autoplay&&e.g.currentTime==e.i)||(e.g.readyState!=e.F&&(e.F=e.g.readyState),(t=!e.h)||(i=Oo(n=(t=e.h).l),r=n.g.currentTime,a=Date.now()/1e3,t.g==r&&t.s==i||(t.m=a,t.g=r,t.s=i,t.h=!1),(i=(r=a-t.m)>=t.u&&i&&!t.h)&&(t.i(t.g,r),t.h=!0,t.g=n.g.currentTime,t.o++,t.j(new he("stalldetected"))),t=!i),t&&(t=e.g.currentTime,n=e.g.buffered,a=n,o=t,s=e.s.gapDetectionThreshold,null==(i=a&&a.length&&!(1==a.length&&a.end(0)-a.start(0)<1e-6)&&0<=(a=Ra(a).findIndex(function(e,t,n){return e.start>o&&(0==t||n[t-1].end-o<=s)}))?a:null)||0==i&&!e.o||((r=n.start(i))>=e.A.qb()||r-t<.001||(0!=i&&n.end(i-1),e.g.currentTime=r,t==e.i&&(e.i=r),e.C++,e.u(new he("gapjumped"))))))}var a,o,s}function Fo(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=Vo.value().get(t),n.ja(e,t,i))}(e=fe.prototype).getDuration=function(){return this.j},e.$g=function(){return this.g},e.qf=function(e){this.i=e},e.Pa=function(e){this.j=e},e.eh=function(){return this.i},e.mg=function(e){this.s=e},e.pc=function(e){this.C=e},e.Xd=function(e){this.u=e},e.ng=function(e){this.o=e},e.Tg=function(){return this.o},e.dg=function(e,t){var n;0!=e.length&&(n=e[e.length-1].end+t,this.Sd(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.A&&!this.m&&(this.i=(Date.now()+this.s)/1e3-this.h-this.g))},e.Xc=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.s)/1e3,r=(e=we(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.Sd(t),this.h=Math.max(this.h,n),null!=this.i&&this.A&&!this.m&&(this.i=i-this.h-this.g)}},e.Nd=function(){this.m=!0},e.yh=function(){return this.m},e.Sd=function(e){this.l=null==this.l?e:Math.min(this.l,e)},e.Ye=function(e){this.g=Math.max(this.g,e)},e.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},e.R=function(){return 1/0==this.j&&!this.C},e.Rb=function(){return 1/0!=this.j&&!this.C},e.eb=function(){return Math.max(this.F,this.Bb()-this.u)},e.qg=function(e){this.F=e},e.Bb=function(){return this.R()||this.Rb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j},e.Rc=function(e){var t=Math.max(this.l,this.F);return 1/0==this.u?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Bb()-this.u+e,this.qb()))},e.hc=function(){return this.Rc(0)},e.qb=function(){return Math.max(0,this.Bb()-(this.R()||this.Rb()?this.o:0))},e.ug=function(){return!(null==this.i||null!=this.h&&this.A)},e.lg=function(e){this.G=e},t("shaka.media.PresentationTimeline",fe),fe.prototype.setAvailabilityTimeOffset=fe.prototype.lg,fe.prototype.usingPresentationStartTime=fe.prototype.ug,fe.prototype.getSeekRangeEnd=fe.prototype.qb,fe.prototype.getSeekRangeStart=fe.prototype.hc,fe.prototype.getSafeSeekRangeStart=fe.prototype.Rc,fe.prototype.getSegmentAvailabilityEnd=fe.prototype.Bb,fe.prototype.setUserSeekStart=fe.prototype.qg,fe.prototype.getSegmentAvailabilityStart=fe.prototype.eb,fe.prototype.isInProgress=fe.prototype.Rb,fe.prototype.isLive=fe.prototype.R,fe.prototype.notifyMaxSegmentDuration=fe.prototype.Ye,fe.prototype.notifyMinSegmentStartTime=fe.prototype.Sd,fe.prototype.isStartTimeLocked=fe.prototype.yh,fe.prototype.lockStartTime=fe.prototype.Nd,fe.prototype.notifySegments=fe.prototype.Xc,fe.prototype.notifyTimeRange=fe.prototype.dg,fe.prototype.getDelay=fe.prototype.Tg,fe.prototype.setDelay=fe.prototype.ng,fe.prototype.setSegmentAvailabilityDuration=fe.prototype.Xd,fe.prototype.setStatic=fe.prototype.pc,fe.prototype.setClockOffset=fe.prototype.mg,fe.prototype.getPresentationStartTime=fe.prototype.eh,fe.prototype.setDuration=fe.prototype.Pa,fe.prototype.setPresentationStartTime=fe.prototype.qf,fe.prototype.getMaxSegmentDuration=fe.prototype.$g,_o.prototype.release=function(){this.j=this.l=null,this.i=function(){}},Uo.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},Uo.prototype.af=function(){this.o=!0,Bo(this)};var Vo=new Qi(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ho(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 Wi,this.i=new zo(e),Fo(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){qo(r,r.j())})}function Go(e){return e.o?e.g.currentTime:e.j()}function Ko(e,t){0<e.g.readyState?Wo(e.i,t):Fo(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){qo(e,e.j())})}function qo(e,t){Math.abs(e.g.currentTime-t)<.001?Xo(e):(e.h.ja(e.g,"seeking",function(){Xo(e)}),Wo(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function Xo(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function zo(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new I(function(){t.i<=0||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)})}function Wo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.$a(.1)}function Yo(e){this.g=e,this.j=!1,this.h=null,this.i=new Wi}function $o(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 function(e,t){e.i=t}(t=new _o(new jo(e),t.stallThreshold,n),function(){i?e.currentTime+=i:(e.pause(),e.play())}),t}(e,n,a),this.j=new Uo(e,t.presentationTimeline,n,this.o,a),this.h=new Ho(e,function(){(t=o.j).j=!0,t.o=!1;var e=Go(o.h),t=Qo(o,e);return.001<Math.abs(t-e)&&(e=Date.now()/1e3,!o.s||o.s<e-1)?(o.s=e,Ko(o.h,t),t=void 0):(o.u(),t=void 0),t},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.hc():o.g.qb():e<0&&(e=o.g.qb()+e),Jo(o,Zo(o,e))}),this.m=new I(function(){var e,t,n;0==o.i.readyState||o.i.paused||(e=Go(o.h),t=o.g.hc(),e<(t=(n=o.g.qb())-t<3?n-3:t)&&(e=Qo(o,e),o.i.currentTime=e))})}function Jo(e,t){var n=e.g.getDuration();return n<=t?n-e.l.durationBackoff:t}function Qo(e,t){var n=Math.max(e.A,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.hc(),a=e.g.qb(),o=e.g.getDuration(),s=(a-r<3&&(r=a-3),e.g.Rc(n)),u=e.g.Rc(i),n=e.g.Rc(n+i);return o<=t?Jo(e,t):a<t?a:t<r?Ma(e.i.buffered,u)?u:n:s<=t||Ma(e.i.buffered,t)?t:n}function Zo(e,t){var n=e.g.hc();return t<n?n:(e=e.g.qb())<t?e:t}function V(e){this.g=e,this.m=null,this.j=0,this.o=!1}function es(e,t){for(var n=(e=we(e.g)).next();!n.done;n=e.next())t(n.value)}function ts(e,t,n){return new V([e=new N(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function ns(e,t,n){this.i=e,this.g=t,this.h=n}function is(){V.call(this,[]),this.h=[]}function rs(e){var t=this;this.g=e,this.h=this.g.Ed(),this.i=new I(function(){t.g.bg(.25*t.h)})}function as(e){var t=this;this.h=e,this.g=new Set,this.i=new I(function(){os(t,!1)}).$a(.25)}function os(e,t){for(var n=we(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function ss(e){h.call(this),this.g=new Map,this.h=e}function us(e){h.call(this);var i=this;this.g=new Set,this.i=e,this.h=new I(function(){for(var e=i.i(),t=we(i.g),n=t.next();!n.done;n=t.next())(n=n.value).endTime<e.start&&(i.g.delete(n),n=new he("regionremove",new Map([["region",n]])),i.dispatchEvent(n))}).$a(2)}function ls(e,t){h.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Yb:null,Xb:hs,Qb:function(e,t){return cs(n,"enter",e,t)}},{Yb:ds,Xb:hs,Qb:function(e,t){return cs(n,"enter",e,t)}},{Yb:fs,Xb:hs,Qb:function(e,t){return cs(n,"enter",e,t)}},{Yb:hs,Xb:ds,Qb:function(e,t){return cs(n,"exit",e,t)}},{Yb:hs,Xb:fs,Qb:function(e,t){return cs(n,"exit",e,t)}},{Yb:ds,Xb:fs,Qb:function(e,t){return cs(n,"skip",e,t)}},{Yb:fs,Xb:ds,Qb:function(e,t){return cs(n,"skip",e,t)}}],this.h=new Wi,this.h.D(this.i,"regionremove",function(e){n.g.delete(e.region)})}function cs(e,t,n,i){t=new he(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}Ho.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},zo.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},(e=Yo.prototype).ie=function(){var e=this;Fo(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){null==e.h||0==e.h?e.j=!0:(e.i.ja(e.g,"seeking",function(){e.j=!0}),e.g.currentTime=Math.max(0,e.g.currentTime+e.h))})},e.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},e.je=function(e){this.h=this.j?this.h:e},e.qd=function(){return(this.j?this.g.currentTime:this.h)||0},e.Bf=function(){return 0},e.Af=function(){return 0},e.cg=function(){},(e=$o.prototype).ie=function(){this.m.$a(.25)},e.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(){}},e.je=function(e){Ko(this.h,e)},e.qd=function(){var e=Go(this.h);return 0<this.i.readyState&&!this.i.paused?Zo(this,e):e},e.Bf=function(){return this.o?this.o.o:0},e.Af=function(){return this.j.C},e.cg=function(){this.j.af()},(e=V.prototype).Ab=function(){return this.g.length},e.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},e.Ch=function(){this.o=!0},e.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.j}return this.g.length&&e<this.g[0].startTime?this.j:null},e.get=function(e){return 0==this.g.length||(e-=this.j)<0||e>=this.g.length?null:this.g[e]},e.offset=function(e){if(!this.o)for(var t=we(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},e.Qd=function(e){var t;!this.o&&e.length&&(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,le(e)))},e.Wc=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.Qd(e),this.bb(t)},e.bb=function(t){var e;this.o||(e=this.g.length,this.g=this.g.filter(function(e){return e.endTime>t}),this.j+=e-this.g.length)},e.bc=function(e,t,n){if(n=void 0!==n&&n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.j++;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new N(e.startTime,t,e.A,e.Qa,e.wa,e.aa,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.u,e.ca,e.status,e.aes128Key),this.g[this.g.length-1].i=e.i)}},e.Yd=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new I(function(){var e=t();e?n.g.push.apply(n.g,le(e)):(n.m.stop(),n.m=null)}),this.m.$a(e))},V.prototype[Symbol.iterator]=function(){return this.Nb(0)},V.prototype.Nb=function(e){var t=this.find(e);if(null==t)return null;var n=this.get(--t+1),i=-1;if(n&&0<n.g.length)for(var r=n.g.length-1;0<=r;--r){var a=n.g[r];if(e>=a.startTime&&e<a.endTime){for(;r&&!a.j;)r--,a=n.g[r];if(!a.j)return Y("No independent partial segment found!"),null;t++,i=r-1;break}}return new ns(this,t,i)},t("shaka.media.SegmentIndex",V),V.forSingleSegment=ts,V.prototype.getIteratorForTime=V.prototype.Nb,V.prototype.updateEvery=V.prototype.Yd,V.prototype.fit=V.prototype.bc,V.prototype.evict=V.prototype.bb,V.prototype.mergeAndEvict=V.prototype.Wc,V.prototype.markImmutable=V.prototype.Ch,ns.prototype.Kg=function(){return this.g},ns.prototype.current=function(){var e=this.i.get(this.g);return e&&0<e.g.length&&e.o&&this.h>=e.g.length&&(this.g++,this.h=0,e=this.i.get(this.g)),e&&0<e.g.length?e.g[this.h]:e},ns.prototype.next=function(){var e=this.i.get(this.g);return e&&0<e.g.length?(this.h++,e.o&&this.h==e.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0),{value:e=this.current(),done:!e}},t("shaka.media.SegmentIterator",ns),ns.prototype.currentPosition=ns.prototype.Kg,m(is,V),(e=is.prototype).clone=function(){var e=new is;return e.h=this.h.slice(),e},e.release=function(){for(var e=we(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},e.find=function(e){for(var t=0,n=we(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.j+i.Ab()}return null},e.get=function(e){for(var t=0,n=we(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;t+=i.j+i.Ab()}return null},e.offset=function(){},e.Qd=function(){},e.bb=function(){},e.Wc=function(){},e.bc=function(){},e.Yd=function(){},t("shaka.media.MetaSegmentIndex",is),is.prototype.updateEvery=is.prototype.Yd,is.prototype.fit=is.prototype.bc,is.prototype.mergeAndEvict=is.prototype.Wc,is.prototype.evict=is.prototype.bb,is.prototype.merge=is.prototype.Qd,rs.prototype.release=function(){this.set(this.ec()),this.i&&(this.i.stop(),this.i=null),this.g=null},rs.prototype.set=function(e){if(this.h!=e)e:{if(this.h=e,this.i.stop(),0<=this.h)try{var t=this.h;this.g.Ed()!=t&&this.g.rf(t);break e}catch(e){}this.i.$a(.25),0!=this.g.Ed()&&this.g.rf(0)}},rs.prototype.ec=function(){return this.g.ec()},as.prototype.release=function(){this.i.stop();for(var e=we(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},m(ss,h),ss.prototype.release=function(){this.g.clear(),h.prototype.release.call(this)},ss.prototype.j=function(e){for(var t=we(this.g.values()),n=t.next();!n.done;n=t.next()){e:{for(var i=(n=n.value).$c,r=i.length-1;0<=r;r--){var a=i[r];if(a.position<=e){i=a.Ve;break e}}i=null}if(r=(r=i)?!((r=n.If)===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.If=i,JSON.stringify(i),n=new he("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}},m(us,h),us.prototype.release=function(){this.g.clear(),this.h.stop(),h.prototype.release.call(this)},m(ls,h),ls.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,h.prototype.release.call(this)},ls.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=we(this.i.g),i=n.next();!i.done;i=n.next()){var i=i.value,r=this.g.get(i),a=e<i.startTime?ds:e>i.endTime?fs:hs;this.g.set(i,a);for(var o=we(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Yb==r&&s.Xb==a&&s.Qb(i,t)}}};var ds=1,hs=2,fs=3;function ps(e,t,n){this.i=e,this.h=t,this.j=0,this.l=n,this.g=new Map}function gs(e,t,n){if(n=void 0!==n&&n,e.h.segmentIndex){var i=e.h.segmentIndex.Nb(Math.max(t.startTime,e.j));if(i){var r=t;for(n&&(r=i.next().value)&&r.startTime==t.startTime&&r.endTime==t.endTime&&(r=null);e.g.size<e.i&&null!=r&&(t=!0,r.l&&null!=r.wa&&(t=!1),(t=2==r.Pb()?!1:t)&&!e.g.has(r)&&(bs(t=new ys(e.l),r,e.h),e.g.set(r,t)),e.j=r.startTime,!(e.h.fastSwitching&&r.Zc&&r.Md));)r=i.next().value}}}function ms(e){if(0!==e.g.size){for(var t=we(e.g.keys()),n=t.next();!n.done;n=t.next())(n=n.value)&&vs(e,n);e.j=0}}function vs(e,t){var n=e.g.get(t);e.g.delete(t),n&&n.abort()}function ys(e){this.i=e,this.g=this.h=null}function bs(n,e,t){var i=new Uint8Array(0);n.g=n.i(e,t,function(t){return Ie(function(e){if(1==e.g)return i=0<i.byteLength?Ir(i,t):t,n.h?xe(e,n.h(i),3):e.B(0);i=new Uint8Array(0),Te(e)})})}function ws(e,t,n,i,r){return e=Fi(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function xs(e,t){var o=this;this.g=t,this.m=e,this.h=null,this.u=1,this.o=this.j=null,this.F=0,this.C=!1,this.i=new Map,this.A=!1,this.G=null,this.s=!1,this.l=new zi(function(){return t=o,Ie(function(e){if(1==e.g){for(n=[],i=we(t.i.values()),r=i.next();!r.done;r=i.next())js(a=r.value),n.push(Os(a));return xe(e,Promise.all(n),2)}t.i.clear(),t.g=null,t.m=null,t.h=null,Te(e)});var t,n,i,r,a}),this.H=Date.now()/1e3}function Ts(e,t){var n,i=e.i.get("video");i&&(n=i.stream)&&(t?(t=n.trickModeVideo)&&!i.Ub&&(Es(e,t,!1,0,!1),i.Ub=n):(n=i.Ub)&&Es(e,n,!(i.Ub=null),0,!1))}function Ss(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&&Es(e,t.video,n,i,r,a),t.audio&&Es(e,t.audio,n,i,r,a))}function As(t,n){Ie(function(e){if(1==e.g)return t.o=n,t.A?n.segmentIndex?e.B(2):xe(e,n.createSegmentIndex(),2):e.return();Es(t,n,!0,0,!1),Te(e)})}function Es(t,e,n,i,r,a){var o,s,u,l,c,d,h,f,p,g,m,v,y=t.i.get(e.type);y||e.type!=ce?y&&(y.Ub&&(e.trickModeVideo?e=(y.Ub=e).trickModeVideo:y.Ub=null),y.stream!=e||r)&&(y.ra&&(m=y.ra,(v=e)&&v!==m.h&&(ms(m),m.h=v)),e.type==ce&&(r=Bt(e.mimeType,e.codecs),mo(t.g.T,r,t.m.sequenceMode,e.external)),y.stream.closeSegmentIndex&&y.stream.closeSegmentIndex(),y.stream=e,y.X=null,y.Cf=!!a,n&&(y.Lc?y.Zd=!0:y.Da?(y.wb=!0,y.vd=i,y.Zd=!0):(js(y),Ps(t,y,!0,i).catch(function(e){t.g&&t.g.onError(e)}))),h=t,f=y,Ie(function(e){if(1==e.g)return f.Na?(p=f.stream,g=f.Na,p.segmentIndex?e.B(2):xe(e,p.createSegmentIndex(),2)):e.return();if(f.Na!=g||f.stream!=p)return e.return();var t=h.g.Dd(),n=bo(h.g.T,f.type),i=null==(r=f.stream.segmentIndex.find(f.Ca?f.Ca.endTime:t))?null:f.stream.segmentIndex.get(r),r=i&&i.wa?i.wa-i.Qa:null;(t=!!(r=i&&!r?(i.endTime-i.getStartTime())*(f.stream.bandwidth||0)/8:r)&&((i=i.aa)&&(r+=(i.wa?i.wa-i.Qa:null)||0),8*r/(i=h.g.getBandwidthEstimate())<(n||0)-t-Math.max(h.m.minBufferTime||0,h.h.rebufferingGoal)||f.Na.h.g>r))&&f.Na.abort(),Te(e)}).catch(function(e){t.g&&t.g.onError(e)})):(o=t,s=e,Ie(function(e){switch(e.g){case 1:return u=jt,o.F++,l=o.F,Se(e,2),xe(e,To(o.g.T,u.na),4);case 4:Ae(e,3);break;case 2:c=Ee(e),o.g&&o.g.onError(c);case 3:c=Bt(s.mimeType,s.codecs),mo(o.g.T,c,o.m.sequenceMode,s.external),d=o.g.T.F,(d.isTextVisible()||o.h.alwaysStreamText)&&o.F==l&&(d=ks(o,s),o.i.set(u.na,d),_s(o,d,0)),Te(e)}}))}function Is(t,e){e.Lc||e.wb||(e.Da?(e.wb=!0,e.vd=0):null==yo(t.g.T,e.type)?null==e.ib&&_s(t,e,0):(js(e),Ps(t,e,!1,0).catch(function(e){t.g&&t.g.onError(e)})))}function ks(e,t){return{stream:t,type:t.type,X:null,ra:Cs(e,t),Ca:null,Db:null,Re:null,Pe:null,Oe:null,Ub:null,endOfStream:!1,Da:!1,ib:null,wb:!1,vd:0,Zd:!1,Lc:!1,dd:!0,Xe:!1,ff:!1,Tc:!1,Na:null}}function Cs(i,e){return("video"===e.type||"audio"===e.type)&&0<i.h.segmentPrefetchLimit?new ps(i.h.segmentPrefetchLimit,e,function(e,t,n){return Ns(i,e,t,n)}):null}function Ms(t,n){var i,r,a;return Ie(function(e){switch(e.g){case 1:if(U(t.l),n.Da||null==n.ib||n.Lc)return e.return();if(n.ib=null,n.wb)return xe(e,Ps(t,n,n.Zd,n.vd),3);e.B(2);break;case 3:return e.return();case 2:if(n.stream.segmentIndex){e.B(4);break}return i=n.stream,xe(e,n.stream.createSegmentIndex(),5);case 5:if(i!=n.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),n.Da||n.ib||_s(t,n,0),e.return();case 4:Se(e,6),null!=(r=function(e,t){if(Rs(t))return function(e,t){var n=bo(e,"video")||0;$t(e.h,t,n)}(e.g.T,t.stream.originalId||""),null;if(t.type==ce&&function(e){e.h&&$t(e.h,"",0)}(e.g.T),!e.g.T.ea&&t.type!=ce)return e.h.updateIntervalSeconds/2;var n,i=e.g.Dd(),r=t.Ca?t.Ca.endTime:i,a=function(e,t,n){return e.A?0:t==ce?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):Da(e=wo(e,t),n)}(e.g.T,t.type,i),o=Math.max(1,Math.max(e.m.minBufferTime||0,e.h.rebufferingGoal,e.h.bufferingGoal)*e.u),s=e.m.presentationTimeline.getDuration()-r,u=bo(e.g.T,t.type);if(s<1e-6&&u)return t.endOfStream=!0,"video"==t.type&&(e=e.i.get(ce))&&Rs(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,o<=a)return e.h.updateIntervalSeconds/2;if(!(a=function(e,t,n,i){if(t.X)return t.X.current();if(t.Ca||i)return n=t.Ca?t.Ca.endTime:i,t.Xe=!0,t.X=t.stream.segmentIndex.Nb(n),t.X&&t.X.next().value;e=e.h.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.X=t.stream.segmentIndex.Nb(i),r=t.X&&t.X.next().value),r||(t.X=t.stream.segmentIndex.Nb(n),r=t.X&&t.X.next().value),r}(e,t,i,u)))return e.h.updateIntervalSeconds;for(o=1/0,s=we(s=Array.from(e.i.values())),u=s.next();!u.done;u=s.next())Rs(u=u.value)||u.X&&!u.X.current()||(o=Math.min(o,u.Ca?u.Ca.endTime:i));{var l;return r>=o+e.m.presentationTimeline.g?e.h.updateIntervalSeconds:(t.ra&&t.X&&(!(r=a.aa)||t.Ca&&Ea(r,t.Db)||(l=t.ra,r=r,l.h.segmentIndex&&l.g.size<l.i&&!l.g.has(r)&&(bs(n=new ys(l.l),r,l.h),l.g.set(r,n))),gs(t.ra,a)),function(u,l,c,d){var t,I,n,i,k,C,M,D,r,a;return Ie(function(e){switch(e.g){case 1:if(t=jt,I=l.stream,n=l.X,l.Da=!0,Se(e,2),2==d.Pb())throw new ke(1,1,1011);return xe(e,(h=u,f=l,p=d,Ie(function(e){return 1==e.g?(g=jt,m=[],v=Math.max(0,p.appendWindowStart-.1),y=p.appendWindowEnd+.01,b=Gt(f.stream.codecs),w=Kt(f.stream.mimeType),(x=p.timestampOffset)==f.Re&&v==f.Pe&&y==f.Oe&&b==f.Qe&&w==f.Yf?e.B(2):((T=f.Qe&&f.Yf&&(t=h.g.T,n=f.type,i=f.stream,!!(r=n!=ce&&(r=Gt(qt(t.G[n])),a=Kt(t.G[n]),o=Bt(i.mimeType,i.codecs),s=t.C.forceTransmux,(!Z(o)||!t.u&&zt.includes(o)||i.codecs.includes(","))&&(s=!0),i=Ft(i.mimeType,i.codecs),(s=s&&ut(i))&&(o=(s=s()).convertCodecs(n,i),s.destroy()),n=Gt(qt(o)),o=Kt(o),r!==n||a!==o))&&("smooth"!==t.C.codecSwitchingStrategy||!ee()||t.o)))&&(A=null,f.type===g.$?A=h.i.get(g.P):f.type===g.P&&(A=h.i.get(g.$)),A&&(A.Db=null,Is(h,A),Os(A).catch(function(){}))),xe(e,function(){var t,n;return Ie(function(e){if(1==e.g)return n=new Map,h.j.audio&&n.set(g.P,h.j.audio),h.j.video&&n.set(g.$,h.j.video),Se(e,2),f.Pe=v,f.Oe=y,f.Qe=b,f.Yf=w,f.Re=x,t=h.m.sequenceMode||"HLS"==h.m.type,xe(e,So(h.g.T,f.type,x,v,y,t,p.mimeType||f.stream.mimeType,p.codecs||f.stream.codecs,n),4);if(2!=e.g)return T&&(t=null,f.type===g.$?t=h.i.get(g.P):f.type===g.P&&(t=h.i.get(g.$)),t&&(t.wb=!1,t.Da=!1,Is(h,t))),Ae(e,0);throw n=Ee(e),f.Pe=null,f.Oe=null,f.Qe=null,f.Re=null,n})}(),2))):(Ea(p.aa,f.Db)||(f.Db=p.aa,p.j&&p.aa&&(S=Ls(h,f,p.aa),A=function(){var t,n,i,r,a;return Ie(function(e){switch(e.g){case 1:return Se(e,2),xe(e,S,4);case 4:return t=e.h,U(h.l),n=null,i=new Map,(new dr).box("moov",P).box("trak",P).box("mdia",P).O("mdhd",function(e){n=Fa(e.reader,e.version).timescale}).box("hdlr",function(e){(e=e.reader).skip(8),e=e.ub(4);var t=String.fromCharCode(e[0]);switch((t+=String.fromCharCode(e[1]))+String.fromCharCode(e[2])+String.fromCharCode(e[3])){case"soun":i.set(g.P,n);break;case"vide":i.set(g.$,n)}n=null}).parse(t),i.has(f.type)?p.aa.timescale=i.get(f.type):null!=n&&(p.aa.timescale=n),r=f.stream.closedCaptions&&0<f.stream.closedCaptions.size,xe(e,h.g.Ef(f.type,t),5);case 5:return xe(e,xo(h.g.T,f.type,t,null,f.stream,r),6);case 6:Ae(e,0);break;case 2:throw a=Ee(e),f.Db=null,a}})},h.g.Eh(p.startTime,p.aa),m.push(A()))),h.m.sequenceMode&&(E=f.Ca?f.Ca.i:null,p.i!=E||f.Xe)&&(f.Xe=!1,m.push((u=h.g.T,l=f.type,c=p.startTime,Ie(function(e){return 1==e.g?l==(d=jt).na?e.return():(Co(u,l,function(){return Eo(u,l)}),u.o&&Co(u,d.P,function(){return Eo(u,d.P)}),xe(e,Co(u,l,function(){return Io(u,l,c)}),2)):u.o?xe(e,Co(u,d.P,function(){return Io(u,d.P,c)}),0):e.B(0)})))),xe(e,Promise.all(m),0));var t,n,i,r,a,o,s,u,l,c,d})),4);case 4:return(U(u.l),u.s)?e.return():(r="video/mp4"==I.mimeType||"audio/mp4"==I.mimeType,i=q.ReadableStream,u.h.lowLatencyMode&&i&&r&&("HLS"!=u.m.type||d.m)?(k=new Uint8Array(0),M=C=!1,xe(e,Ls(u,l,d,function(r){var a,o,s;return Ie(function(e){switch(e.g){case 1:if(C)return e.return();if(M=!0,U(u.l),u.s)return e.return();if(Se(e,2),t=k,n=r,(i=new Uint8Array(t.length+n.length)).set(t),i.set(n,t.length),k=i,a=!1,o=0,(new dr).box("mdat",function(e){o=e.size+e.start,a=!0}).parse(k,!1,!0),a)return s=k.subarray(0,o),k=k.subarray(o),xe(e,Ds(u,l,c,I,d,s,!0),5);e.B(4);break;case 5:l.ra&&l.X&&gs(l.ra,d,!0);case 4:Ae(e,0);break;case 2:D=Ee(e),Te(e)}var t,n,i})}),9)):xe(e,Ls(u,l,d),7));case 7:return(i=e.h,U(u.l),u.s)?e.return():(U(u.l),l.wb?(l.Da=!1,_s(u,l,0),e.return()):xe(e,Ds(u,l,c,I,d,i),6));case 9:if(r=e.h,D)throw D;if(M){e.B(10);break}return C=!0,U(u.l),u.s?e.return():l.wb?(l.Da=!1,_s(u,l,0),e.return()):xe(e,Ds(u,l,c,I,d,r),10);case 10:l.ra&&l.X&&gs(l.ra,d,!0);case 6:if(U(u.l),u.s)return e.return();l.Ca=d,n.next(),l.Da=!1,l.ff=!1,a=u.g.T.pb(),a=a[l.type],JSON.stringify(a),l.wb||u.g.af(d,l.stream),_s(u,l,0),Ae(e,0);break;case 2:if(a=Ee(e),U(u.l,a),u.s)return e.return();if(l.Da=!1,7001==a.code)l.Da=!1,js(l),_s(u,l,0),e.B(0);else if(l.type==t.na&&u.h.ignoreTextStreamFailures)u.i.delete(t.na),e.B(0);else{if(3017!=a.code)return l.Tc=!0,a.severity=2,xe(e,Us(u,l,a),0);(function(e,t,n){if(!Array.from(e.i.values()).some(function(e){return e!=t&&e.ff})){if(0<e.h.maxDisabledTime&&e.g.wd(t.stream,e.h.maxDisabledTime))return;var i=Math.round(100*e.u);if(20<i)e.u-=.2;else{if(!(4<i))return t.Tc=!0,e.s=!0,e.g.onError(n);e.u-=.04}t.ff=!0}_s(e,t,4)})(u,l,a),e.B(0)}}var h,f,p,g,m,v,y,b,w,x,T,S,A,E})}(e,t,i,a).catch(function(){}),null)}}(t,n))&&(_s(t,n,r),n.Tc=!1),Ae(e,7);break;case 6:return r=Ee(e),xe(e,Us(t,n,r),8);case 8:return e.return();case 7:if(a=Array.from(t.i.values()),t.A&&a.every(function(e){return e.endOfStream}))return xe(e,t.g.T.endOfStream(),10);e.B(0);break;case 10:U(t.l),0!=(a=t.g.T.getDuration())&&a<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.Pa(a),Te(e)}})}function Ds(l,o,s,c,d,u,h){var f,p,g,m,v,y;return h=void 0!==h&&h,Ie(function(e){switch(e.g){case 1:return f=c.closedCaptions&&0<c.closedCaptions.size,g=null!=c.emsgSchemeIdUris&&0<c.emsgSchemeIdUris.length||l.h.dispatchAllEmsgBoxes,m=l.h.parsePrftBox&&!l.C,(g||m)&&(p=new dr),g&&p.O("emsg",function(e){var t,n,i,r,a,o,s,u=c.emsgSchemeIdUris;0===e.version?(t=e.reader.ad(),n=e.reader.ad(),i=e.reader.L(),r=e.reader.L(),a=e.reader.L(),o=e.reader.L(),s=d.startTime+r/i):(i=e.reader.L(),r=(s=e.reader.oc()/i+d.timestampOffset)-d.startTime,a=e.reader.L(),o=e.reader.L(),t=e.reader.ad(),n=e.reader.ad()),e=e.reader.ub(e.reader.getLength()-e.reader.qa()),(u&&u.includes(t)||l.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==t?l.g.Fh():((u=new he("emsg",u=(new Map).set("detail",{startTime:s,endTime:s+a/i,schemeIdUri:t,value:n,timescale:i,presentationTimeDelta:r,eventDuration:a,id:o,messageData:e}))).cancelable=!0,l.g.onEvent(u),u.defaultPrevented||"https://aomedia.org/emsg/ID3"!=t&&"https://developer.apple.com/streaming/emsg-id3"!=t||(t=ja(e)).length&&d&&l.g.Gh([{cueTime:d.startTime,data:e,frames:t,dts:d.startTime,pts:d.startTime}],0,d.endTime)))}),m&&p.O("prft",function(e){var t,n;!l.C&&d.aa.timescale&&(t=e.reader,n=e.version,t.L(),e=1e3*(e=t.L())+t.L()/Math.pow(2,32)*1e3,t=0===n?t.L():(n=t.L(),t=t.L(),n*Math.pow(2,32)+t),e=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+e).getTime(),t=new he("prft",t=(new Map).set("detail",{wallClockTime:e,programStartDate:new Date(e-t/d.aa.timescale*1e3)})),l.g.onEvent(t),l.C=!0)}),(g||m)&&p.parse(u),xe(e,(t=l,n=o,i=s,Ie(function(e){if(1==e.g)return a=Math.max(t.h.bufferBehind,t.m.presentationTimeline.g),null==(r=yo(t.g.T,n.type))||(a=i-r-a)<=1?e.return():xe(e,t.g.T.remove(n.type,r,r+a),2);U(t.l),Te(e)})),2);case 2:return U(l.l),v=o.dd,o.dd=!1,y=o.Cf,o.Cf=!1,xe(e,l.g.Ef(o.type,u),3);case 3:return xe(e,xo(l.g.T,o.type,u,d,c,f,v,y,h),4);case 4:U(l.l),Te(e)}var t,n,i,r,a})}function Rs(e){return e&&e.type==ce&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Ls(c,d,h,f){var p,g,m;return Ie(function(e){switch(e.g){case 1:return h instanceof Aa&&(p=h.g)?e.return(p):(p=null,d.ra&&(t=d.ra,p=t.g.has(h)?(n=t.g.get(h),f&&(n.h=f),t.g.delete(h),n.g):null),p=p||Ns(c,h,d.stream,f),g=0,d.X&&(g=d.X.g),xe(e,(d.Na=p).promise,2));var t,n;case 2:if(m=e.h,d.Na=null,m=m.data,h.aes128Key)return xe(e,(i=m,r=h.aes128Key,a=g,Ie(function(e){if(1==e.g)return(o=r).cryptoKey?e.B(2):xe(e,o.fetchKey(),3);if(!(s=o.iv))for(s=ne(new ArrayBuffer(16)),u=o.firstMediaSequenceNumber+a,l=s.byteLength-1;0<=l;l--)s[l]=255&u,u>>=8;return e.return(q.crypto.subtle.decrypt({name:"AES-CBC",iv:s},o.cryptoKey,i))})),4);e.B(3);break;case 4:m=e.h;case 3:return e.return(m)}var i,r,a,o,s,u,l})}function Ns(e,t,n,i){var r=t instanceof N?t:void 0,a=r?1:0;return t=ws(t.Z(),t.Qa,t.wa,e.h.retryParameters,i),e.g.Tb.request(Ki,t,{type:a,stream:n,segment:r})}function Ps(t,n,i,r){var a,o;return Ie(function(e){return 1==e.g?(n.wb=!1,n.Zd=!1,n.vd=0,n.Lc=!0,n.Ca=null,n.Db=null,n.X=null,n.ra&&ms(n.ra),r?(a=t.g.Dd(),o=t.g.T.getDuration(),xe(e,t.g.T.remove(n.type,a+r,o),3)):xe(e,To(t.g.T,n.type),4)):3!=e.g?(U(t.l),i?xe(e,t.g.T.flush(n.type),3):e.B(3)):(U(t.l),n.Lc=!1,n.endOfStream=!1,n.Da||n.ib||_s(t,n,0),void Te(e))})}function _s(n,i,e){var t=i.type;t==ce&&!n.i.has(t)||(i.ib=new gn(function(){var t;return Ie(function(e){return 1==e.g?(Se(e,2),xe(e,Ms(n,i),4)):2!=e.g?Ae(e,0):(t=Ee(e),n.g&&n.g.onError(t),void Te(e))})}).U(e))}function js(e){null!=e.ib&&(e.ib.stop(),e.ib=null)}function Os(t){return Ie(function(e){return t.Na?xe(e,t.Na.abort(),0):e.B(0)})}function Us(t,n,i){var r;return Ie(function(e){if(1==e.g)return xe(e,Ii(t.G),2);U(t.l),r=0===t.h.maxDisabledTime&&1011==i.code?1:t.h.maxDisabledTime,1===i.category&&0<r&&(i.handled=t.g.wd(n.stream,r),i.handled&&(i.severity=1)),t.g.onError(i),i.handled||t.h.failureCallback(i),Te(e)})}function Bs(n,i,r){var a,o,s,u,l;return Ie(function(e){switch(e.g){case 1:var t=new gt(n).Ga.split("/").pop().split(".");return(a=1==t.length?"":t.pop().toLowerCase(),a=Fs[a])?e.return(a):(o=0,s=Fi([n],r),Se(e,2),s.method="HEAD",xe(e,i.request(o,s).promise,4));case 4:u=e.h,a=u.headers["content-type"],Ae(e,3);break;case 2:if(!(u=Ee(e))||1002!=u.code&&1001!=u.code){e.B(3);break}return s.method="GET",xe(e,i.request(o,s).promise,6);case 6:l=e.h,a=l.headers["content-type"];case 3:return e.return(a?a.toLowerCase().split(";").shift():"")}})}ys.prototype.abort=function(){this.g&&this.g.abort()},(e=xs.prototype).destroy=function(){return this.l.destroy()},e.configure=function(e){this.h=e,this.G=new Ei({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=we(this.i.keys()),n=t.next();!n.done;n=t.next())if((n=this.i.get(n.value)).ra){var i=n.ra,r=e.segmentPrefetchLimit;i.i=r;for(var a=Array.from(i.g.keys());a.length>r;){var o=a.pop();o&&vs(i,o)}0<e.segmentPrefetchLimit||(n.ra=null)}else 0<e.segmentPrefetchLimit&&(n.ra=Cs(this,n.stream))},e.start=function(){var l=this;return Ie(function(e){if(1==e.g)return xe(e,(t=l,Ie(function(e){if(1==e.g){if(n=jt,t.j)return i=new Map,r=new Set,t.j.audio&&(i.set(n.P,t.j.audio),r.add(t.j.audio)),t.j.video&&(i.set(n.$,t.j.video),r.add(t.j.video)),t.o&&(i.set(n.na,t.o),r.add(t.o)),xe(e,t.g.T.init(i,t.m.sequenceMode,t.m.type,t.m.ignoreManifestTimestampsInSegmentsMode),2);throw new ke(2,5,5006)}for(U(t.l),t.updateDuration(),a=we(i.keys()),o=a.next();!o.done;o=a.next())s=o.value,u=i.get(s),t.i.has(s)||(u=ks(t,u),t.i.set(s,u),_s(t,u,0));Te(e)})),2);var t,n,i,r,a,o,s,u;U(l.l),l.A=!0,Te(e)})},e.dd=function(){if(this.g)for(var e=this.g.Dd(),t=we(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value,r=null;(!(r=(n=this.i.get(i)).X?n.X.current():r)||r.startTime>e||r.endTime<e)&&(n.X=null),(r=!(r=this.g.T).A&&(i==ce?null!=(r=r.h).g&&null!=r.h&&(e>=r.g&&e<r.h):Ma(r=wo(r,i),e)))||(null==bo(this.g.T,i)&&!n.Da||Is(this,n),n.Na&&(n.Na.abort(),n.Na=null),i===ce&&((i=this.g.T).H&&i.H.h()),n.dd=!0)}},e.updateDuration=function(){var e=this.m.presentationTimeline.getDuration();e<1/0?this.g.T.Pa(e):this.g.T.Pa(Math.pow(2,32))};var Fs={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",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",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 Vs(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){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":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Hs(e,t){for(var n,i=[],r=(e=we(e)).next();!r.done;r=e.next())(r=r.value).isContainer?i.push.apply(i,le(Hs(r.nestedCues,r))):((n=r.clone()).nestedCues=[],n.payload=function t(n,e){if(n.lineBreak)return"\n";if(n.nestedCues.length)return n.nestedCues.map(function(e){return t(e,n)}).join("");var i=[],r=700<=n.fontWeight,a="italic"==n.fontStyle,o=n.textDecoration.includes("underline");return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),(a=Vs(a=(r="")==(a=n.color)&&e?e.color:a))&&(r+="."+a),(e=Vs(a=""==(a=n.backgroundColor)&&e?e.backgroundColor:a))&&(r+=".bg_"+e),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=we(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"},n.payload)}(r,t),i.push(n));return i}function Gs(e,t){this.g=null;for(var n=we(Array.from(e.textTracks)),i=n.next();!i.done;i=n.next())(i=i.value).mode="disabled",i.label==t&&(this.g=i);this.g||(this.g=e.addTextTrack("subtitles",t)),this.g.mode="hidden"}function Ks(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=we(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function qs(){}function Xs(){}function zs(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ws(e,t){var n=this;this.m=!1,this.i=[],this.A=e,this.s=t,this.j=null,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.s.appendChild(this.g),this.C=new I(function(){$s(n)}).$a(.25),this.h=new Map,this.l=new Wi,this.l.D(document,"fullscreenchange",function(){$s(n,!0)}),this.l.D(this.A,"resize",function(){var e=(t=n.A).videoWidth,t=t.videoHeight;n.j=e&&t?e/t:null}),this.o=null,"ResizeObserver"in q&&(this.o=new ResizeObserver(function(){$s(n,!0)}),this.o.observe(this.g)),this.u=new Map}function Ys(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=we(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var l,c,d,h,f,p=e.h.get(u),g=u.startTime<=i&&u.endTime>i,m=p?p.wg:null;if(p&&(o.push(p.pe),p.bd&&o.push(p.bd),g||(a=!0,e.h.delete(u),p=null)),g){s.push(u);if(p)(function(e,t){for(;null!=t;){if(t==e.g)return 1;t=t.parentElement}})(e,m)||(a=!0);else{{g=void 0;v=void 0;y=void 0;b=void 0;w=void 0;x=void 0;l=void 0;c=void 0;d=void 0;h=void 0;f=void 0;g=e;var v=u;var y=r;var b=1<y.length,w=b?"span":"div",x=(v.lineBreak&&(w="br"),v.rubyTag&&(w=v.rubyTag),b=!b&&0<v.nestedCues.length,document.createElement(w));"br"!=w&&function(e,t,n,i,r){var a=t.style,o=0==n.nestedCues.length,s=1<i.length,u=(a.whiteSpace="pre-wrap",n.payload.replace(/\s+$/g,function(e){return" ".repeat(e.length)}));{var l;a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=Js(n.linePadding,n,e.s),a.paddingRight=Js(n.linePadding,n,e.s),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage?(a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",a.width="100%",a.height="100%"):(n.nestedCues.length?l=t:(l=document.createElement("span"),t.appendChild(l)),n.border&&(l.style.border=n.border),!r&&((t=Qs(i,function(e){return e.backgroundColor}))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),t=Qs(i,function(e){return e.fontFamily}))&&(l.style.fontFamily=t),u&&(l.textContent=u))}s&&!i[i.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=Js(n.fontSize,n,e.s),null!=(i=n.line)&&((o=n.lineInterpretation)==Ye&&(o=1,s=16,e.j&&e.j<1&&(s=32),i=i<0?100+i/s*100:i/s*100),1==o&&(a.position="absolute",n.writingMode==We?(a.width="100%",n.lineAlign==$e?a.top=i+"%":"end"==n.lineAlign&&(a.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==$e?a.left=i+"%":"end"==n.lineAlign&&(a.right=100-i+"%")):(a.height="100%",n.lineAlign==$e?a.right=i+"%":"end"==n.lineAlign&&(a.left=100-i+"%")))),a.lineHeight=n.lineHeight,null!=n.position&&(n.writingMode==We?a.paddingLeft=n.position:a.paddingTop=n.position),"line-left"==(e=function(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==He?n:"left"===e||"start"===e&&t===ze||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===ze?"line-right":"center"}(n))?a.cssFloat="left":"line-right"==e&&(a.cssFloat="right"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==We?a.width=n.size+"%":a.height=n.size+"%")}(g,x,v,y,b),y=null,v.region&&v.region.id&&(y=v.region,w=g.j===4/3?2.5:1.9,l=y.id+"_"+y.width+"x"+y.height+(y.heightUnits==rt?"%":"px")+"-"+y.viewportAnchorX+"x"+y.viewportAnchorY+(y.viewportAnchorUnits==rt?"%":"px"),y=g.u.has(l)?g.u.get(l):(c=document.createElement("span"),d=y.heightUnits==rt?"%":"px",h=y.widthUnits==rt?"%":"px",f=y.viewportAnchorUnits==rt?"%":"px",c.id="shaka-text-region---"+l,c.classList.add("shaka-text-region"),c.style.position="absolute",2===y.heightUnits&&2===y.widthUnits?(c.style.height=5.33*y.height+"%",c.style.width=y.width*w+"%"):(c.style.height=y.height+d,c.style.width=y.width+h),2===y.viewportAnchorUnits?(d=y.viewportAnchorY/75*100,h=y.viewportAnchorX/(g.j===4/3?160:210)*100,d-=y.regionAnchorY*y.height*5.33/100,h-=y.regionAnchorX*y.width*w/100,c.style.top=d+"%",c.style.left=h+"%"):(c.style.top=y.viewportAnchorY-y.regionAnchorY*y.height/100+f,c.style.left=y.viewportAnchorX-y.regionAnchorX*y.width/100+f),c.style.display="flex",c.style.flexDirection="column",c.style.alignItems="center",c.style.justifyContent="before"==v.displayAlign?"flex-start":"center"==v.displayAlign?"center":"flex-end",g.u.set(l,c),c));w=x,b&&((w=document.createElement("span")).classList.add("shaka-text-wrapper"),w.style.backgroundColor=v.backgroundColor,w.style.lineHeight="normal",x.appendChild(w)),g.h.set(v,{pe:x,wg:w,bd:y})}p=e.h.get(u),m=p.wg,a=!0}}0<u.nestedCues.length&&m&&Ys(e,u.nestedCues,m,i,r),r.pop()}if(a){for(r=(i=we(o)).next();!r.done;r=i.next())(r=r.value).parentElement&&r.parentElement.removeChild(r);for(s.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),u=(s=we(s)).next();!u.done;u=s.next())(i=e.h.get(u.value)).bd?(n.appendChild(i.bd),i.bd.appendChild(i.pe)):n.appendChild(i.pe)}}function $s(e,t){if(e.g){var n=e.A.currentTime;if(!e.m||void 0!==t&&t){for(var i=(t=we(e.u.values())).next();!i.done;i=t.next())zs(i.value);zs(e.g),e.h.clear(),e.u.clear()}if(e.m){t=new Map;for(var r=(i=we(e.h.keys())).next();!r.done;r=i.next())r=r.value,t.set(r,e.h.get(r));Ys(e,e.i,e.g,n,[])}}}function Js(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 Qs(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||0===i)return i}return null}function Zs(e,t){this.h=e,this.g=t,this.m=void 0,this.i=!1,this.l=!0,this.j=!1}function eu(e){return e.g.sessionId||(e.g.sessionId=q.crypto.randomUUID()),{v:1,sf:e.m,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function tu(e,t,n){n=void 0===n?{}:n;var i,r,a=void 0===a?e.g.useHeaders:a;e.g.enabled&&(Object.assign(n,eu(e)),n.pr=e.h.Cd(),i=n.ot===ou||n.ot===su,e.j&&i&&(n.bs=!0,n.su=!0,e.j=!1),null==n.su&&(n.su=e.l),a?(e=function(e){for(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},o=(t=we(t)).next();!o.done;o=t.next())o=o.value,r[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=nu(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(n),Object.keys(e).length&&Object.assign(t.headers,e)):(r=nu(n))&&(t.uris=t.uris.map(function(e){return iu(e,r)})))}function nu(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}for(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(),o=(a=we(a)).next();!o.done;o=a.next()){var s,u,l=e[o=o.value];u=l,Number.isNaN(u)||null==u||""===u||!1===u||"v"===o&&1===l||"pr"==o&&1===l||(u=void 0,u="string"===(s=typeof(l=(s=r[o])?s(l):l))&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(l):"boolean"===s?o:"symbol"===s?o+"="+l.description:o+"="+l,i.push(u))}return i.join(",")}function iu(e,t){return!t||e.includes("offline:")?e:((e=new gt(e)).g.set("CMCD",t),e.toString())}(e=Gs.prototype).remove=function(t,n){return!!this.g&&(Ks(this.g,function(e){return e.startTime<n&&e.endTime>t}),!0)},e.append=function(e){for(var t=Hs(e),n=[],i=(e=this.g.cues?Array.from(this.g.cues):[],{}),r=(t=we(t)).next();!r.done;i={Zb:i.Zb},r=t.next())i.Zb=r.value,e.some(function(t){return function(e){return e.startTime==t.Zb.startTime&&e.endTime==t.Zb.endTime&&e.text==t.Zb.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.Zb))&&n.push(r);for(i=(e=we(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)},e.destroy=function(){return this.g&&(Ks(this.g,function(){return 1}),this.g.mode="disabled"),this.g=null,Promise.resolve()},e.isTextVisible=function(){return"showing"==this.g.mode},e.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},t("shaka.text.SimpleTextDisplayer",Gs),(e=qs.prototype).remove=function(){},e.append=function(){},e.destroy=function(){},e.isTextVisible=function(){return!1},e.setTextVisibility=function(){},t("shaka.text.StubTextDisplayer",qs),t("shaka.util.Dom",Xs),Xs.removeAllChildren=zs,(e=Ws.prototype).append=function(e){for(var t=[].concat(le(this.i)),n={},i=(e=we(e)).next();!i.done;n={jd:n.jd},i=e.next())n.jd=i.value,t.some(function(t){return function(e){return Ve(e,t.jd)}}(n))||this.i.push(n.jd);$s(this)},e.destroy=function(){return this.g&&(this.s.removeChild(this.g),this.g=null,this.m=!1,this.i=[],this.C&&this.C.stop(),this.h.clear(),this.l&&(this.l.release(),this.l=null),this.o&&(this.o.disconnect(),this.o=null)),Promise.resolve()},e.remove=function(t,n){if(!this.g)return!1;var e=this.i.length;return this.i=this.i.filter(function(e){return e.startTime<t||e.endTime>=n}),$s(this,e>this.i.length),!0},e.isTextVisible=function(){return this.m},e.setTextVisibility=function(e){this.m=e},t("shaka.text.UITextDisplayer",Ws),t("shaka.text.WebVttGenerator",function(){}),Zs.prototype.configure=function(e){this.g=e};var ru="m",au="a",ou="v",su="av",uu="i",lu="c",cu="tt";function du(e){this.h=e,this.g=null}function hu(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}t("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yg:"s",OTHER:"o"}),(e=du.prototype).configure=function(e){this.h=e},e.Rf=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(pu)?1e3*this.g.get(pu):null},e.Qf=function(){return this.h.enabled&&this.g&&this.g.has(fu)?1e3*this.g.get(fu):null},e.fh=function(){return this.h.enabled&&this.g&&this.g.has(gu)?this.g.get(gu):null},e.gh=function(){return this.h.enabled&&this.g&&this.g.has(mu)?this.g.get(mu):null},e.getBandwidthEstimate=function(e){var t=this.Qf();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&n<=1?e*(1-n)+t*n:e},t("shaka.util.CmsdManager",du),du.prototype.getRoundTripTime=du.prototype.gh,du.prototype.getResponseDelay=du.prototype.fh,du.prototype.getEstimatedThroughput=du.prototype.Qf,du.prototype.getMaxBitrate=du.prototype.Rf;var fu="etp",pu="mb",gu="rd",mu="rtt";function vu(){}function yu(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]=fn(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=fn(l)),u=yu(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?(Y("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+u),e[a]=t[a]):(Y("Invalid config, unrecognized key "+u),s=!1)}return s}function bu(e,t){for(var n={},i=n,r=0,a=0;!((r=e.indexOf(".",r))<0);)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 wu(){this.g=null,this.h=[]}function xu(t,n){return Ie(function(e){if(1==e.g)return t.g?xe(e,new Promise(function(e){return t.h.push(e)}),2):e.B(2);t.g=n,Te(e)})}function Tu(){}function Su(e){return new gt(e=rr(e)).ob}function Au(e,t,n){function i(e){De(r).setUint32(a,e.byteLength,!0),a+=4,r.set(ne(e),a),a+=e.byteLength}if(!n||!n.byteLength)throw new ke(2,6,6015);var t="string"==typeof t?or(t,!0):t,r=(e=or(e=rr(e),!0),new Uint8Array(12+e.byteLength+t.byteLength+n.byteLength)),a=0;return i(e),i(t),i(n),r}function Eu(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Au(e,n=rr(e).split("skd://").pop(),t))}function Iu(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function ku(){}function Cu(){var e=1/0,t=(navigator.connection&&navigator.connection.saveData&&(e=360),{retryParameters:ki(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(e,t,n){return q.shakaMediaKeysPolyfill&&"skd"==t&&(t=n.serverCertificate,e=Au(e,n=Su(e),t)),e},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:bn(),minHdcpVersion:"",ignoreDuplicateInitData:!Tn()}),n="reload",i=!1,r=(Tn()||xn()||Cn("Tizen 4")||Sn()||navigator.userAgent.match(/webOS\/4/i)||navigator.userAgent.match(/webOS\/5/i)||(n="smooth",i=!0),i={retryParameters:ki(),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,multiTypeVariantsAllowed:i},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:!(xn()||Tn()||Sn()||In()),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},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"}}},{retryParameters:ki(),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,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5}),a=((Cn("Web0S")||wn()||An()||Cn("Hisense")||Cn("VIDAA"))&&(r.stallSkip=0),{trackSelectionCallback:function(t){return Ie(function(e){return e.return(t)})},downloadSizeCallback:function(t){var n;return Ie(function(e){return 1==e.g?navigator.storage&&navigator.storage.estimate?xe(e,navigator.storage.estimate(),3):e.return(!0):(n=e.h,e.return(n.usage+t<.95*n.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5}),o={drm:t,manifest:i,streaming:r,mediaSource:{codecSwitchingStrategy:n,sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:a,abrFactory:function(){return new oi},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,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},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!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},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};return a.trackSelectionCallback=function(t){return Ie(function(e){return e.return(function(e,t,n){var i=n,r=("AUTO"==i&&(i=q.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR"),e.filter(function(e){return!("variant"!=e.type||e.hdr&&e.hdr!=i)})),a=(n=[],cn(t,r.map(function(e){return e.language}))),o=(0==(n=0==(n=a?r.filter(function(e){return de(e.language)==a}):n).length?r.filter(function(e){return e.primary}):n).length&&(r.map(function(e){return e.language}),n=r),n.filter(function(e){return e.height&&e.height<=480}));for(o.length&&(o.sort(function(e,t){return t.height-e.height}),n=o.filter(function(e){return e.height==o[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(n[r])),e=we(e),n=e.next();!n.done;n=e.next())(n=n.value).type!=ce&&"image"!=n.type||t.push(n);return t}(t,o.preferredAudioLanguage,o.preferredVideoHdrLevel))})},o}function Mu(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 yu(e,t,n||Cu(),i,"")}function Du(){this.g=null,this.h=[]}function Ru(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=(e=we(e.h)).next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function Lu(){this.i=this.h=null,this.g=[]}function Nu(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 Pu(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN,this.g=new Du,this.h=new Lu}function n(e,t){h.call(this);var n,d,s=this;this.l=Rl,this.xd=this.h=null,this.da=!1,this.Gd=new Wi,this.sc=new Wi,this.o=new Wi,this.Ba=new Wi,this.C=this.G=this.m=this.H=null,this.Kd=0,this.W=new wu,this.ma=this.ea=this.i=this.Ld=this.F=this.j=this.za=this.J=this.eg=this.Y=this.V=this.Aa=this.K=this.I=this.$b=null,this.mb=!1,this.Ne=this.s=null,this.We=1e9,this.Oc=[],this.N=NaN,this.g=el(this),this.Id={width:1/0,height:1/0},this.u=null,this.kb=new wi(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),this.lb=this.g.preferredTextLanguage,this.Kc=this.g.preferredTextRole,this.Jc=this.g.preferForcedSubs,this.Hc=[],t&&t(this),this.V=new Zs({getBandwidthEstimate:function(){return n.s?n.s.getBandwidthEstimate():NaN},pb:function(){return n.pb()},getCurrentTime:function(){return n.h?n.h.currentTime:0},Cd:function(){return n.Cd()},Ob:function(){return n.Ob()},Cb:function(){return n.Cb()},R:function(){return n.R()}},(n=this).g.cmcd),this.Y=new du(this.g.cmsd),this.H=(d=this,new Ui(function(e,t,n){d.s&&d.s.segmentDownloaded(e,t,n)},function(e,t,n){if(t=(new Map).set("headers",e).set("request",t).set("requestType",n),d.dispatchEvent(ju("downloadheadersreceived",t)),d.Y&&(t=d.Y).h.enabled){if(n=e["cmsd-static"])try{var i=new Map,r=n.split(",");for(n=0;n<r.length;n++){var a=r[n].split("=");i.set(a[0],hu(a[1]))}}catch(e){}if(e=e["cmsd-dynamic"]){try{var o=new Map,s=e.split(";");for(e=1;e<s.length;e++){var u=s[e].split("=");o.set(u[0],hu(u[1]))}var l=o}catch(e){l=null}l&&(t.g=l)}}},function(e,t,n,i){e=(new Map).set("request",e).set("error",t).set("httpResponseCode",n).set("aborted",i),d.dispatchEvent(ju("downloadfailed",e))},function(e,t,n){var i,r,a,o,s,u,l=d.V;if(n=void 0===n?{}:n,l.g.enabled)if("HEAD"===t.method)tu(l,t);else switch(e){case 0:try{if(l.g.enabled){if(n.type){e:{switch(n.type){case 4:var c="d";break e;case 3:case 2:c="h";break e;case 5:c="s";break e}c=void 0}l.m=c}tu(l,t,{ot:ru,su:!l.i})}}catch(e){$("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case Ki:e=n;try{l.g.enabled&&(i=e.segment,c=0,(r={d:1e3*(c=i?i.endTime-i.startTime:c),st:l.h.R()?"l":"v"}).ot=0===(s=e).type?uu:(s=s.stream)?"video"==(u=s.type)?s.codecs&&s.codecs.includes(",")?su:ou:"audio"==u?au:"text"==u?"application/mp4"===s.mimeType?cu:lu:void 0:void 0,a=r.ot===ou||r.ot===au||r.ot===su||r.ot===cu,(o=e.stream)&&(a&&(r.bl=function(e,t){if(!(t=e.h.pb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?1e3*(e.end-n):NaN}(l,o.type)),o.bandwidth&&(r.br=o.bandwidth/1e3)),a&&r.ot!==cu&&(r.tb=function(e,t){var n=e.h.Cb();if(!n.length)return NaN;e=n[0];for(var i=(n=we(n)).next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case ou:return e.videoBandwidth||NaN;case au:return e.audioBandwidth||NaN;default:return e.bandwidth}}(l,r.ot)/1e3),tu(l,t,r))}catch(e){$("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:tu(l,t,{ot:"k"});break;case 4:tu(l,t,{ot:"o"})}},function(e,t,n,i){d.F&&d.F.banLocation&&d.F.banLocation(i)})),this.H.nf(this.g.streaming.forceHTTPS),this.A=null,Ol&&(this.A=Ol(),this.A.configure(this.g.ads)),this.Gd.D(q,"online",function(){bl(s),s.gf()}),this.yd=new I(function(){for(var e=s,t=Date.now()/1e3,n=!1,i=we(e.i.variants),r=i.next();!r.done;r=i.next()){var a,o;0<(r=r.value).disabledUntilTime&&r.disabledUntilTime<=t&&(r.disabledUntilTime=0,n=!0,o=a=void 0,o="",(a=r).video&&(o+="video:"+a.video.id),o=a.audio?o+(o?"&":"")+"audio:"+a.audio.id:o)}e.i.variants.every(function(e){return 0===e.disabledUntilTime})&&e.yd.stop(),n&&dl(e,!0,void 0,!1,!1)}),e&&(di("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ic(e,!0))}function _u(e){null!=e.J&&(ro(e.J),e.J.release(),e.J=null)}function ju(e,t){return new he(e,t)}function Ou(e,t){e.dispatchEvent(ju("onstatechange",(new Map).set("state",t)))}function Uu(t,n){var i;return Ie(function(e){return 1==e.g?(i=++t.Kd,xe(e,xu(t.W,n),2)):i!=t.Kd?(t.W.release(),e.return(!0)):e.return(!1)})}function Bu(a){var o,s;return Ie(function(e){if(1==e.g)return Ou(a,"media-source"),o=a.g.textDisplayFactory,s=o(),a.Te=o,t=a.h,n=s,i=function(e,t,n){Fu(a,e,t,n)},r=a.J,(o=new fo(t,n,i,r)).configure(a.g.mediaSource),s=a.g.manifest,s=s.segmentRelativeVttTiming,o.Y=s,xe(e,o.J,2);var t,n,i,r;a.G=o,Te(e)})}function Fu(e,t,n,i){for(var r=(t=we(t)).next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){var a=r.cueTime+n,o=i;i&&i<a&&(o=a);for(var s=we(r.frames),u=s.next();!u.done;u=s.next())Vu(e,a,o,"org.id3",u.value);e.A&&e.A.onHlsTimedMetadata(r,a)}}function Vu(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(ju("metadata",t))}function Hu(e,t){var n;t&&"chapters"==t.kind&&(t.mode="hidden",n=new I(function(){t.mode="hidden"}).qc().U(.5),e.Hc.push(function(){n.stop()}))}function Gu(e,t){return new Wr(t,e.g.drm.updateExpirationTime)}function Ku(e,t,n){e.K=new xi,e.K.g=Si,Ti(e.K,n,Math.min(.5,n/2)),rl(e),e.o.D(t,"waiting",function(){return qu(e)}),e.o.D(t,"stalled",function(){return qu(e)}),e.o.D(t,"canplaythrough",function(){return qu(e)}),e.o.D(t,"progress",function(){return qu(e)})}function qu(e){switch(e.l){case Nl:var t;t=!!e.h.ended||null!=(n=Ca(e.h.buffered))&&n>=e.h.duration-1;break;case Ll:e:if(e.h.ended||vo(e.G))t=!0;else{if(e.i.presentationTimeline.R()){var n=e.i.presentationTimeline.Bb(),i=Ca(e.h.buffered);if(null!=i&&n<=i){t=!0;break e}}t=!1}break;default:t=!1}var i=Da(e.h.buffered,e.h.currentTime),r=t,a=(n=e.K).h.get(n.g);(t=n.g)!=(n.g=i=r||a<=i?Ai:Si)&&rl(e)}function Xu(t){var e,n,i,r;if(t.F&&(e=fn(t.g.manifest),t.h&&"AUDIO"===t.h.nodeName&&(e.disableVideo=!0),t.F.configure(e)),t.m&&t.m.configure(t.g.drm),t.j){t.j.configure(t.g.streaming);try{nl(t,t.i)}catch(e){wl(t,e)}t.s&&ll(t),!(e=t.j.j)||e.allowedByApplication&&e.allowedByKeySystem||dl(t)}t.H&&t.H.nf(t.g.streaming.forceHTTPS),t.G&&(t.G.configure(t.g.mediaSource),t.G.Y=t.g.manifest.segmentRelativeVttTiming,e=t.g.textDisplayFactory,t.Te!=e)&&(n=e(),r=(i=t.G).F,i.F=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.h&&(i.h.j=n),t.Te=e,t.j&&(n=(e=t.j).i.get(ce))&&Es(e,n.stream,!0,0,!0)),t.s&&(t.s.configure(t.g.abr),t.g.abr.enabled?t.s.enable():t.s.disable(),yl(t)),t.K&&(e=t.g.streaming.rebufferingGoal,t.i&&(e=Math.max(e,t.i.minBufferTime)),Ti(t.K,e,Math.min(.5,e/2))),t.i&&El(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.A&&t.A.configure(t.g.ads),t.V&&t.V.configure(t.g.cmcd),t.Y&&t.Y.configure(t.g.cmsd)}function zu(e){return(e=e&&/(\d+)x(\d+)/.exec(e))?{Kb:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function Wu(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function Yu(e){return Array.from(e.h.textTracks).filter(function(e){return"chapters"==e.kind})}function $u(t,n){var i;return Ie(function(e){switch(e.g){case 1:return Se(e,2),xe(e,Bs(n,t.H,t.g.streaming.retryParameters),4);case 4:i=e.h,Ae(e,3);break;case 2:Ee(e);case 3:if(i)return e.return(i);throw new ke(1,2,2011,n)}})}function Ju(a,o,s,u,l,c,d){var h;return Ie(function(e){if(1==e.g)return"text/vtt"!=l||d.length?xe(e,Qu(a,o,a.H,a.g.streaming.retryParameters),3):e.B(2);2!=e.g&&(h=e.h,h=Zu(a,h,l,d),h=new Blob([h],{type:"text/vtt"}),o=No(h),l="text/vtt"),h=document.createElement("track");var t=a.V,n=o;try{var i,r=t.g.enabled?((i=eu(t)).ot=lu,i.su=!0,iu(n,nu(i))):n}catch(e){$("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),r=n}return h.src=r,h.label=c,h.kind=u,h.srclang=s,a.h.getAttribute("crossorigin")||a.h.setAttribute("crossorigin","anonymous"),a.h.appendChild(h),e.return(h)})}function Qu(n,i,r,a){var o,s;return Ie(function(e){if(1!=e.g)return s=e.h,e.return(s.data);s=Ki,(o=Fi([i],a)).method="GET";var t=n.V;try{t.g.enabled&&tu(t,o,{ot:lu,su:!0})}catch(e){$("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return xe(e,r.request(s,o).promise,2)})}function Zu(e,t,n,i){var r=Qt[n];if(r){n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=ne(t);var a=t=n.parseMedia(t,e,null),o=i;function s(e){for(var t=e,n=we(o),i=n.next();!i.done;i=n.next())(i=i.value).end&&i.start<e&&(t+=i.end-i.start);return((e=Math.floor(t/3600))<10?"0":"")+e+":"+((n=Math.floor(t/60%60))<10?"0":"")+n+":"+((i=Math.floor(t%60))<10?"0":"")+i+"."+((t=Math.floor(1e3*t%1e3))<100?t<10?"00":"0":"")+t}var u=Hs(a);a="WEBVTT\n\n";for(var l=(u=we(u)).next();!l.done;l=u.next())a=(a+=s((l=l.value).startTime)+" --\x3e "+s(l.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case Ge: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(" "):""}(l)+"\n")+(l.payload+"\n\n");return a}throw new ke(2,2,2014,n)}function el(n){var e=Cu();return e.streaming.failureCallback=function(e){var t;n.R()&&(t=null,1001==e.code||1002==e.code?t=1:1003==e.code&&(t=.1),null!=t&&(e.severity=1,n.gf(t)))},e.textDisplayFactory=function(){return n.xd?new Ws(n.h,n.xd):HTMLMediaElement.prototype.addTextTrack?new Gs(n.h,"Shaka Player TextTrack"):new qs},e}function tl(i,r){return Ie(function(e){if(1==e.g)return xe(e,(t=i,n=r,Ie(function(e){if(1==e.g)return xe(e,jn(t.m,n),2);if(!n.variants.some($n))throw new ke(2,4,4032);Te(e)})),2);var t,n;nl(i,r),Te(e)})}function nl(e,t){if(e.l!=Dl){_n(t.variants,e.g.restrictions,e.Id)&&e.j&&pl(e);var n=e.m?e.m.g:null;if(n&&e.m.s)for(var i=we(t.variants),r=i.next();!r.done;r=i.next())r=r.value,il(e,n.keySystem,r.video),il(e,n.keySystem,r.audio);Il(e,t)}}function il(e,t,n){if(n)for(var i=(n=we(n.drmInfos)).next();!i.done;i=n.next())if((i=i.value).keySystem==t)for(var r=(i=we(i.initData||[])).next();!r.done;r=i.next())r=r.value,Zr(e.m,r.initDataType,r.initData)}function rl(e){var t,n=e.Ke();e.u&&e.K&&e.C&&(e.V&&(t=e.V,n||t.i||(t.i=!0),t.i&&n&&(t.j=!0),t.l=n),ol(e)),n=(new Map).set("buffering",n),e.dispatchEvent(ju("buffering",n))}function al(e){var t=e.h.playbackRate;0!=t&&(e.I&&e.I.set(t),t=ju("ratechange"),e.dispatchEvent(t))}function ol(e){var t,n,i,r;e.u&&e.K&&(r=e.u.g,t="playing",e.K.g==Si?t="buffering":e.h.paused?t="paused":e.h.ended&&(t="ended"),n=t,(r=null==r.g?(r.g={timestamp:Date.now()/1e3,state:n,duration:0},!0):(i=Date.now()/1e3,r.g.duration=i-r.g.timestamp,r.g.state!=n&&(r.h.push(r.g),r.g={timestamp:i,state:n,duration:0},!0)))&&(t=(new Map).set("newstate",t),e.dispatchEvent(ju("statechanged",t))))}function sl(e){var t,n,i,r,a,o,s,u,l;e.R()&&(t=e.Eb(),!Number.isFinite(t.end)||e.h.currentTime<t.start||(e.g.streaming.liveSync?(n=e.g.streaming.liveSyncMaxLatency,i=e.g.streaming.liveSyncPlaybackRate):e.i&&e.i.serviceDescription&&(n=e.i.serviceDescription.maxLatency||e.g.streaming.liveSyncMaxLatency,i=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSyncPlaybackRate),e.g.streaming.liveSync?(r=e.g.streaming.liveSyncMinLatency,a=e.g.streaming.liveSyncMinPlaybackRate):e.i&&e.i.serviceDescription&&(r=e.i.serviceDescription.minLatency||e.g.streaming.liveSyncMinLatency,a=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSyncMinPlaybackRate),o=e.h.playbackRate,s=t.end-e.h.currentTime,u=0,e.l==Nl&&0<(l=e.h.buffered).length&&(u=l.end(l.length-1),u=Math.max(i,u-t.end)),n&&i&&n<s-u?o!=i&&e.xf(i):r&&a&&s-u<r?o!=a&&e.xf(a):o!==e.I.ec()&&e.ud()))}function ul(e){var t,n,i;e.h&&(t=!1,n=e.h.currentTime/e.h.duration,isNaN(n)||(n=Math.round(100*n),isNaN(e.N)?(e.N=n,t=!0):(n=Math.max(e.N,n),e.N!=n&&(e.N=n,t=!0))),t&&(0==e.N?i=ju("started"):25==e.N?i=ju("firstquartile"):50==e.N?i=ju("midpoint"):75==e.N?i=ju("thirdquartile"):100==e.N&&(i=ju("complete")),i&&e.dispatchEvent(i)))}function ll(t){try{Il(t,t.i)}catch(e){return wl(t,e),0}var e=Jn(t.i.variants),e=t.kb.create(e);return t.s.setVariants(Array.from(e.values())),1}function cl(e,t){return t=void 0!==t&&t,ll(e)?e.s.chooseVariant(t):null}function dl(e,t,n,i,r){t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r;var a=cl(e);a&&hl(e,a,r,t,n,i)}function hl(e,t,n,i,r,a){a=void 0!==a&&a;var o,s=e.j.j;t==s?i&&Ss(e.j,t,i,r,!0):((o=e.u.h).h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Ss(e.j,t,i,r,a,n),i=null,s&&(i=Gn(s)),t=Gn(t),n?(n=(new Map).set("oldTrack",i).set("newTrack",t),e.J&&ao(e.J,t,e.He()),kl(e,n=ju("adaptation",n))):gl(e,i,t))}function fl(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),gl(e,n=Wn(n),t=Wn(t))}function pl(e){kl(e,ju("trackschanged"))}function gl(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.J&&ao(e.J,n,e.He()),kl(e,n=ju("variantchanged",t))}function ml(e){kl(e,ju("textchanged"))}function vl(e){kl(e,ju("texttrackvisibility"))}function yl(e){e.g.abr.enabled||bl(e),kl(e,ju("abrstatuschanged",(new Map).set("newStatus",e.g.abr.enabled)))}function bl(e,t){if(t=void 0===t||t,e.l==Ll){e.yd.stop();for(var n=we(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&ll(e)}}function wl(r,a){var o,s;return Ie(function(e){switch(e.g){case 1:if(r.l==Dl)return e.return();if(o=!0,r.mb&&r.i&&r.j&&(3016==a.code||3014==a.code||3015==a.code||3018==a.code))return Se(e,3),xe(e,(t=r.j,Ie(function(e){return 1==e.g?(i=Date.now()/1e3,n=t.h.minTimeBetweenRecoveries,!t.h.allowMediaSourceRecoveries||i-t.H<n?e.return(!1):(t.H=i,n=jt,(i=t.i.get(n.P))&&(i.Db=null,Is(t,i),Os(i).catch(function(){})),(i=t.i.get(n.$))&&(i.Db=null,Is(t,i),Os(i).catch(function(){})),i=new Map,t.j.audio&&i.set(n.P,t.j.audio),t.j.video&&i.set(n.$,t.j.video),xe(e,Lo(t.g.T,i),2))):e.return(!0)})),5);e.B(2);break;case 5:s=e.h,o=!s,Ae(e,2);break;case 3:Ee(e),o=!0;case 2:if(!o)return e.return();2===a.severity&&bl(r,!1),s=ju("error",(new Map).set("detail",a)),r.dispatchEvent(s),s.defaultPrevented&&(a.handled=!0),Te(e)}var t,n,i})}function xl(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(ju(t,n))}function Tl(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&&(n<0&&(n+=Math.pow(2,32)),n=n.toString(16)),new ke(2,3,3016,t,n,e.h.error.message)}function Sl(e,t){if(e.j){var n=ju("keystatuschanged"),i=(e.dispatchEvent(n),Object.keys(t)),n=1==i.length&&"00"==i[0],r=!1;if(i.length)for(var a=(i=we(e.i.variants)).next();!a.done;a=i.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=we(o)).next();!s.done;s=o.next()){var u=s.value,s=a.allowedByKeySystem;if(u.keyIds.size){a.allowedByKeySystem=!0;for(var l=(u=we(u.keyIds)).next();!l.done;l=u.next())l=l.value,((l=t[n?"00":l])||e.m.F)&&(a.allowedByKeySystem=a.allowedByKeySystem&&!!l&&!_l.includes(l))}s!=a.allowedByKeySystem&&(r=!0)}}r&&(pl(e),!ll(e))||(t=e.j.j)&&!t.allowedByKeySystem&&dl(e)}}function Al(e,t,n){e.F&&e.F.onExpirationUpdated&&e.F.onExpirationUpdated(t,n),t=ju("expirationupdated"),e.dispatchEvent(t)}function El(e,t,n){0<t&&(e.R()||e.qg(t)),n<(t=e.getDuration())&&(e.R()||e.Pa(n))}function Il(e,t){e=e.m?e.m.Bd():{};for(var n=(n=Object.keys(e)).length&&"00"==n[0],i=!1,r=!1,a=new Set,o=new Set,s=(t=we(t.variants)).next();!s.done;s=t.next()){var u=[];(s=s.value).audio&&u.push(s.audio),s.video&&u.push(s.video);for(var l=(u=we(u)).next();!l.done;l=u.next())if((l=l.value).keyIds.size)for(var c=(l=we(l.keyIds)).next();!c.done;c=l.next()){var c=c.value,d=e[n?"00":c];d?_l.includes(d)&&o.add(d):a.add(c)}s.allowedByApplication?s.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw new ke(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}function kl(t,n){Ie(function(e){if(1==e.g)return xe(e,Promise.resolve(),2);t.l!=Dl&&t.dispatchEvent(n),Te(e)})}function Cl(e){for(var t=new Set,n=(e=we(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(de(n.language)):t.add("und");return t}function Ml(e){for(var t=new Map,r=new Map,n=(e=we(e)).next();!n.done;n=e.next()){var i="und",a=[];(n=n.value).language&&(i=de(n.language)),(a="variant"==n.type?n.audioRoles:n.roles)&&a.length||(a=[""]),t.has(i)||t.set(i,new Set);for(var o=(a=we(a)).next();!o.done;o=a.next())o=o.value,t.get(i).add(o),n.label&&(r.has(i)||r.set(i,new Map),r.get(i).set(o,n.label))}var s=[];return t.forEach(function(e,t){for(var n=(e=we(e)).next();!n.done;n=e.next()){var n=n.value,i=null;r.has(t)&&r.get(t).has(n)&&(i=r.get(t).get(n)),s.push({language:t,role:n,label:i})}}),s}t("shaka.util.ConfigUtils",vu),vu.convertToConfigObject=bu,vu.mergeConfigObjects=yu,wu.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},t("shaka.util.FairPlayUtils",Tu),Tu.commonFairPlayResponse=function(e,t){if(2===e){try{var n=nr(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=ye(Sr(n)))}},Tu.expressplayFairPlayRequest=function(e,t){Iu(e,t)},Tu.conaxFairPlayRequest=function(e,t){Iu(e,t)},Tu.ezdrmFairPlayRequest=function(e,t){Iu(e,t)},Tu.verimatrixFairPlayRequest=function(e,t){2===e&&(e=Tr(e=ne(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=ar("spc="+e))},Tu.expressplayInitDataTransform=Eu,Tu.conaxInitDataTransform=function(e,t,n){if("skd"!==t)return e;t=n.serverCertificate,n=rr(e).split("skd://").pop().split("?").shift(),n=q.atob(n);for(var i=be(i=new ArrayBuffer(2*n.length)),r=0,a=n.length;r<a;r++)i[r]=n.charCodeAt(r);return Au(e,i,t)},Tu.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Au(e,n=rr(e).split(";").pop(),t))},Tu.verimatrixInitDataTransform=Eu,Tu.initDataTransform=Au,Tu.defaultGetContentId=Su,Tu.isFairPlaySupported=function(){var t;return Ie(function(e){return 1==e.g?(t={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},Se(e,2),xe(e,navigator.requestMediaKeySystemAccess("com.apple.fps",[t]),4)):2!=e.g?e.return(!0):(Ee(e),e.return(!1))})},t("shaka.util.PlayerConfiguration",ku),ku.mergeConfigObjects=Mu,ku.createDefault=Cu,m(n,h),(e=n.prototype).destroy=function(){var t,n=this;return Ie(function(e){switch(e.g){case 1:return n.l==Dl?e.return():(_u(n),t=n.detach(),n.l=Dl,xe(e,t,2));case 2:if(n.Gd&&(n.Gd.release(),n.Gd=null),n.sc&&(n.sc.release(),n.sc=null),n.o&&(n.o.release(),n.o=null),n.Ba&&(n.Ba.release(),n.Ba=null),n.Ne=null,n.g=null,n.u=null,n.xd=null,n.V=null,n.Y=null,n.H)return xe(e,n.H.destroy(),4);e.B(3);break;case 4:n.H=null;case 3:n.s&&(n.s.release(),n.s=null),h.prototype.release.call(n),Te(e)}})},e.Ic=function(t,n){n=void 0===n||n;var i,r,a=this;return Ie(function(e){switch(e.g){case 1:if(a.l==Dl)throw new ke(2,7,7e3);if(a.h&&a.h!=t)return xe(e,a.detach(),2);e.B(2);break;case 2:return xe(e,Uu(a,"attach"),4);case 4:if(e.h)return e.return();if(Se(e,5,6),Ou(a,"attach"),i=function(){var e=Tl(a);e&&wl(a,e)},a.sc.D(t,"error",i),a.h=t,n&&mn()&&!a.G)return xe(e,Bu(a),6);e.B(6);break;case 6:Ce(e),a.W.release(),Me(e,0);break;case 5:return r=Ee(e),xe(e,a.detach(),10);case 10:throw r}})},e.Eg=function(e){this.eg=e},e.detach=function(t){t=void 0!==t&&t;var n=this;return Ie(function(e){if(1==e.g){if(n.l==Dl)throw new ke(2,7,7e3);return xe(e,n.rc(!1,t),2)}if(3!=e.g)return xe(e,Uu(n,"detach"),3);if(e.h)return e.return();try{n.h&&(n.sc.Za(),n.h=null),Ou(n,"detach"),n.A&&!t&&n.A.release()}finally{n.W.release()}Te(e)})},e.rc=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d,h=this;return Ie(function(e){switch(e.g){case 1:return h.l!=Dl&&(h.l=Rl),xe(e,Uu(h,"unload"),2);case 2:return e.h?e.return():(M(e,3),h.mb=!1,Ou(h,"unload"),t&&!mn()&&(t=!1),_u(h),i=h.Hc.map(function(e){return e()}),h.Hc=[],xe(e,Promise.all(i),5));case 5:if(h.dispatchEvent(ju("unloading")),h.Aa&&(h.Aa.release(),h.Aa=null),h.h&&(h.o.Za(),h.Ba.Za()),h.yd.stop(),h.$b&&(h.$b.release(),h.$b=null),h.F)return xe(e,h.F.stop(),7);e.B(6);break;case 7:h.F=null,h.Ld=null;case 6:if(h.s)return xe(e,h.s.stop(),8);e.B(8);break;case 8:if(h.j)return xe(e,h.j.destroy(),11);e.B(10);break;case 11:h.j=null;case 10:if(h.I&&(h.I.release(),h.I=null),h.C&&(h.C.release(),h.C=null),h.G)return xe(e,h.G.destroy(),13);e.B(12);break;case 13:h.G=null;case 12:if(h.A&&!n&&h.A.onAssetUnload(),h.Y&&(h.Y.g=null),h.h&&zs(h.h),h.h&&h.h.src)return xe(e,new Promise(function(e){return new I(e).U(.1)}),15);e.B(14);break;case 15:h.h.removeAttribute("src"),h.h.load();case 14:if(h.m)return xe(e,h.m.destroy(),17);e.B(16);break;case 17:h.m=null;case 16:if(h.ea=null,h.K=null,h.i){for(r=we(h.i.variants),a=r.next();!a.done;a=r.next())for(o=a.value,s=we([o.audio,o.video]),u=s.next();!u.done;u=s.next())(l=u.value)&&l.segmentIndex&&l.segmentIndex.release();for(c=we(h.i.textStreams),u=c.next();!u.done;u=c.next())(d=u.value).segmentIndex&&d.segmentIndex.release()}h.i=null,h.u=new Pu,h.Te=null,h.Oc=[],h.N=NaN,rl(h);case 3:Ce(e),h.W.release(),Me(e,4);break;case 4:if(t&&mn()&&!h.G)return xe(e,Bu(h),0);e.B(0)}})},e.ei=function(e){this.ma=e},e.load=function(t,n,h){n=void 0===n?null:n;var i,r,a,d,o,C=this;return Ie(function(e){switch(e.g){case 1:if(C.l==Dl)throw new ke(2,7,7e3);return xe(e,xu(C.W,"load"),2);case 2:if(C.W.release(),!C.h)throw new ke(2,7,7002);if(C.ea)return xe(e,C.rc(!1),3);e.B(3);break;case 3:if(i=++C.Kd,r=function(){if(C.Kd!=i)throw new ke(2,7,7e3)},a=function(t,n){return Ie(function(e){switch(e.g){case 1:return M(e,2),xe(e,xu(C.W,n),4);case 4:return r(),xe(e,t(),5);case 5:r();case 2:Ce(e),C.W.release(),Me(e,0)}})},Se(e,5),C.ma=n,C.mb=!1,C.dispatchEvent(ju("loading")),d=Date.now()/1e3,C.u=new Pu,C.ea=t,h){e.B(7);break}return xe(e,a(function(){return Ie(function(e){if(1==e.g)return xe(e,(t=C,Ie(function(e){return 1==e.g?(n=t.g.manifest.retryParameters,xe(e,Bs(t.ea,t.H,n),2)):("application/x-mpegurl"==(n=e.h)&&En()&&(n="application/vnd.apple.mpegurl"),e.return(n))})),2);var t,n;h=e.h,Te(e)})},"guessMimeType_"),7);case 7:if(function(e,t){if(!mn())return!0;if(t){if(""==(e.h||Mn()).canPlayType(t))return!1;if(!(mn()&&t in wa))return!0;if("application/x-mpegurl"===t||"application/vnd.apple.mpegurl"===t){if(e.g.streaming.preferNativeHls)return!0;if(En())return e.g.streaming.useNativeHlsOnSafari}}return!1}(C,h))return xe(e,a(function(){return Ie(function(e){return xe(e,(n=C,t=h,Ie(function(e){return 1==e.g?(a=jt,i=Date.now()/1e3,r=!0,n.m=Gu(n,{Tb:n.H,onError:function(e){wl(n,e)},Ud:function(e){Sl(n,e)},onExpirationUpdated:function(e,t){Al(n,e,t)},onEvent:function(e){n.dispatchEvent(e),"drmsessionupdate"==e.type&&r&&(r=!1,n.u.j=Date.now()/1e3-i)}}),n.m.configure(n.g.drm),a={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:t?Kt(t):"",codecs:t?qt(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:a.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},n.m.Y=!0,xe(e,Yr(n.m,[a],[]),2)):xe(e,n.m.Ic(n.h),0)})),0);var n,t,i,r,a})},"initializeSrcEqualsDrmInner_"),16);if(C.G){e.B(11);break}return xe(e,a(function(){return Ie(function(e){return xe(e,Bu(C),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return xe(e,a(function(){return Ie(function(e){return xe(e,(d=C,i=h,Ie(function(e){if(1==e.g)return r=d.H,Ou(d,"manifest-parser"),d.Ld=ba(d.ea,i||null),d.F=d.Ld(),o=fn(d.g.manifest),d.h&&"AUDIO"===d.h.nodeName&&(o.disableVideo=!0),d.F.configure(o),d.Aa=new us(function(){return d.Eb()}),d.Aa.addEventListener("regionadd",function(e){e=e.region,xl(d,"timelineregionadded",e),d.A&&d.A.onDashTimedMetadata(e)}),d.za=null,d.g.streaming.observeQualityChanges&&(d.za=new ss(function(){return d.pb()}),d.za.addEventListener("qualitychange",function(e){var t=e.quality;e=e.position,t=(new Map).set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width}).set("position",e),d.dispatchEvent(ju("mediaqualitychanged",t))})),o={networkingEngine:r,filter:function(e){return tl(d,e)},makeTextStreamsForClosedCaptions:function(e){for(var t,n,i,r=d,a=e,o=new Set,s=we(a.textStreams),u=s.next();!u.done;u=s.next())"application/cea-608"!=(u=u.value).mimeType&&"application/cea-708"!=u.mimeType||o.add(u.originalId);for(s=we(a.variants),u=s.next();!u.done;u=s.next())if((u=u.value.video)&&u.closedCaptions)for(var l=we(u.closedCaptions.keys()),c=l.next();!c.done;c=l.next())c=c.value,o.has(c)||(t=c.startsWith("CC")?"application/cea-608":"application/cea-708",n=new is,i=u.closedCaptions.get(c),t={id:r.We++,originalId:c,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:n,mimeType:t,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:ce,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:u.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},a.textStreams.push(t),o.add(c))},onTimelineRegionAdded:function(e){var t=d.Aa;e:{for(var n=we(t.g),i=n.next();!i.done;i=n.next())if((i=i.value).schemeIdUri==e.schemeIdUri&&i.id==e.id&&i.startTime==e.startTime&&i.endTime==e.endTime){n=i;break e}n=null}null==n&&(t.g.add(e),e=new he("regionadd",new Map([["region",e]])),t.dispatchEvent(e))},onEvent:function(e){return d.dispatchEvent(e)},onError:function(e){return wl(d,e)},isLowLatencyMode:function(){return d.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return d.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){d.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){d.j&&d.j.updateDuration()},newDrmInfo:function(e){var t=d.m?d.m.g:null;t&&d.m.s&&il(d,t.keySystem,e)},onManifestUpdated:function(){var e=(new Map).set("isLive",d.R());d.dispatchEvent(ju("manifestupdated",e)),d.A&&d.A.onManifestUpdated(d.R())},getBandwidthEstimate:function(){return d.s.getBandwidthEstimate()}},r=Date.now()/1e3,Ou(d,"manifest"),xe(e,(a=d).F.start(d.ea,o),2);if(a.i=e.h,o=ju("manifestparsed"),d.dispatchEvent(o),0==d.i.variants.length)throw new ke(2,4,4036);function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}var n;(n=d.i).variants.some(t)&&(n.variants=n.variants.filter(t)),s=Date.now()/1e3,s=s-r,d.u.F=s,Te(e)})),0);var d,i,r,a,o,s})},"parseManifestInner_"),13);case 13:return xe(e,a(function(){return Ie(function(e){return xe(e,(n=C,Ie(function(e){return 1==e.g?(Ou(n,"drm-engine"),t=Date.now()/1e3,i=!0,n.m=Gu(n,{Tb:n.H,onError:function(e){wl(n,e)},Ud:function(e){Sl(n,e)},onExpirationUpdated:function(e,t){Al(n,e,t)},onEvent:function(e){n.dispatchEvent(e),"drmsessionupdate"==e.type&&i&&(i=!1,n.u.j=Date.now()/1e3-t,n.J&&ro(n.J))}}),n.m.configure(n.g.drm),_n(n.i.variants,n.g.restrictions,n.Id)&&n.j&&pl(n),r=Jn(n.i.variants),xe(e,Yr(n.m,r,n.i.offlineSessionIds),2)):3!=e.g?xe(e,n.m.Ic(n.h),3):xe(e,tl(n,n.i),0)})),0);var n,t,i,r})},"initializeDrmInner_"),14);case 14:return xe(e,a(function(){return Ie(function(e){return xe(e,(f=C,p=d,Ie(function(e){switch(e.g){case 1:for(Ou(f,"load"),g=f.h,f.I=new rs({Ed:function(){return g.playbackRate},ec:function(){return g.defaultPlaybackRate},rf:function(e){g.playbackRate=e},bg:function(e){g.currentTime+=e}}),v=function(){return ol(f)},m=function(){return al(f)},f.o.D(g,"playing",v),f.o.D(g,"pause",v),f.o.D(g,"ended",v),f.o.D(g,"ratechange",m),(d=(c=f).g).lcevc.enabled?((h=c.Cb())&&h[0]&&"video/mp2t"==h[0].videoMimeType&&(yn()||navigator.userAgent.match(/Edge\//))&&(d.mediaSource.forceTransmux||X("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled.")),_u(c),null==c.J&&(c.J=new io(c.h,c.eg,d.lcevc),c.G&&(c.G.N=c.J))):_u(c),v=f.g.abrFactory,f.s&&f.Ne==v||(f.Ne=v,f.s=v(),"function"!=typeof f.s.setMediaElement&&(di("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),f.s.setMediaElement=function(){}),"function"!=typeof f.s.setCmsdManager&&(di("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),f.s.setCmsdManager=function(){}),"function"!=typeof f.s.trySuggestStreams&&(di("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),f.s.trySuggestStreams=function(){}),f.s.configure(f.g.abr)),f.kb=new wi(f.g.preferredAudioLanguage,f.g.preferredVariantRole,f.g.preferredAudioChannelCount,f.g.preferredVideoHdrLevel,f.g.preferSpatialAudio,f.g.preferredVideoLayout,f.g.preferredAudioLabel,f.g.preferredVideoLabel,f.g.mediaSource.codecSwitchingStrategy,f.g.manifest.dash.enableAudioGroups),f.lb=f.g.preferredTextLanguage,f.Kc=f.g.preferredTextRole,f.Jc=f.g.preferForcedSubs,El(f.i.presentationTimeline,f.g.playRangeStart,f.g.playRangeEnd),f.s.init(function(e,t,n){f.j&&e!=f.j.j&&hl(f,e,!0,void 0!==t&&t,void 0===n?0:n)}),f.s.setMediaElement(g),f.s.setCmsdManager(f.Y),Nn(f.i,f.g.preferredVideoCodecs,f.g.preferredAudioCodecs,f.g.preferredDecodingAttributes),f.j=new xs((l=f).i,{Dd:function(){return l.C?l.C.qd():0},getBandwidthEstimate:function(){return l.s.getBandwidthEstimate()},T:l.G,Tb:l.H,onError:function(e){return wl(l,e)},onEvent:function(e){return l.dispatchEvent(e)},Fh:function(){l.F&&l.F.update&&l.F.update()},af:function(e,t){var n=e.startTime,i=e.endTime,r=t.type;l.C&&l.C.cg(),qu(l),n=(new Map).set("start",n).set("end",i).set("contentType",r),l.dispatchEvent(ju("segmentappended",n)),l.s&&t.fastSwitching&&e.Zc&&e.Md&&l.s.trySuggestStreams()},Eh:function(e,t){var n,i,r,a,o,s,u;(t=t.Ve)&&l.za&&(n=l.za,i=e,e=n,s=(t=t).contentType,(u=e.g.get(s))||e.g.set(s,u={$c:[],If:null,contentType:s}),u=e=u,(s=(s=n).h()[u.contentType])&&0<s.length?(r=s[0].start,a=s[s.length-1].end,o=u.$c,u.$c=o.filter(function(e,t){return!(e.position<=r&&t+1<o.length&&o[t+1].position<=r||e.position>=a)})):u.$c=[],n={Ve:t,position:i},0<=(t=(e=e.$c).findIndex(function(e){return e.position>=i}))?e.splice(t,e[t].position==i?1:0,n):e.push(n))},Ef:function(e,t){var n=l.m;if(n.h.parseInbandPsshEnabled&&!n.F&&["audio","video"].includes(e)){var i=0,r=we((t=new kr(ne(t))).data);for(e=r.next();!e.done;e=r.next())i+=e.value.length;if(0==i)n=Promise.resolve();else{for(i=new Uint8Array(i),r=0,e=(t=we(t.data)).next();!e.done;e=t.next())e=e.value,i.set(e,r),r+=e.length;Zr(n,"cenc",i),n=n.l}}else n=Promise.resolve();return n},Gh:function(e,t,n){Fu(l,e,t,n)},wd:function(e,t){return l.wd(e,t)}}),f.j.configure(f.g.streaming),f.l=Ll,g.textTracks&&f.o.D(g.textTracks,"addtrack",function(e){e.track&&"chapters"===(e=e.track).kind&&Hu(f,e)}),f.dispatchEvent(ju("streaming")),m=null,(v=f.j.j)||(m=cl(f,!0)),y=[],w=we([(b=v||m).video,b.audio]),x=w.next();!x.done;x=w.next())(T=x.value)&&!T.segmentIndex&&y.push(T.createSegmentIndex());if(0<y.length)return xe(e,Promise.all(y),2);e.B(2);break;case 2:if(f.F&&f.F.onInitialVariantChosen&&f.F.onInitialVariantChosen(b),El(f.i.presentationTimeline,f.g.playRangeStart,f.g.playRangeEnd),f.C=(h=(u=f).ma,new $o(u.h,u.i,u.g.streaming,h,function(){u.$b&&os(u.$b,!0),u.j&&u.j.dd(),u.K&&qu(u)},function(e){return u.dispatchEvent(e)})),f.$b=(d=p,(d=new ls((s=f).Aa,s.R()||0<d)).addEventListener("enter",function(e){xl(s,"timelineregionenter",e.region)}),d.addEventListener("exit",function(e){xl(s,"timelineregionexit",e.region)}),d.addEventListener("skip",function(e){var t=e.region;e.seeking||(xl(s,"timelineregionenter",t),xl(s,"timelineregionexit",t))}),(c=new as(s.h)).g.add(d),s.za&&c.g.add(s.za),c),E=Math.max(f.i.minBufferTime,f.g.streaming.rebufferingGoal),Ku(f,g,E),v){e.B(4);break}if(hl(f,m,!0,!1,0),f.g.streaming.startAtSegmentBoundary)return S=f.C,A=S.je,xe(e,(t=m,n=f.C.qd(),Ie(function(e){return 1==e.g?(o=t.audio,i=t.video,xe(e,(r=function(t,n){var i;return Ie(function(e){return 1==e.g?t?xe(e,t.createSegmentIndex(),2):e.return(null):(i=(i=t.segmentIndex.Nb(n))?i.next().value:null)?(i=i.startTime,e.return(i)):e.return(null)})})(o,n),2)):3!=e.g?(a=e.h,xe(e,r(i,n),3)):null!=(o=e.h)&&null!=a?e.return(Math.max(o,a)):null!=o?e.return(o):null!=a?e.return(a):e.return(n)})),6);e.B(4);break;case 6:A.call(S,e.h);case 4:return f.C.ie(),f.jc().find(function(e){return e.active})||((E=Qn(f.i.textStreams,f.lb,f.Kc,f.Jc)[0]||null)&&Nu(f.u.h,E,!0),m&&(E?(m.audio&&function(e,t,n){if(0==e.g.autoShowText)return;if(1==e.g.autoShowText)return 1;var i=de(e.g.preferredTextLanguage);return n=de(n.language),2==e.g.autoShowText?rn(n,i):3==e.g.autoShowText?(e=de(t.language),rn(n,i)&&!rn(e,n)):(X("Invalid autoShowText setting!"),!1)}(f,m.audio,E)&&(f.da=!0),f.da&&f.G.F.setTextVisibility(!0),vl(f)):f.da=!1),E&&(f.g.streaming.alwaysStreamText||f.Me())&&As(f.j,E)),xe(e,f.j.start(),7);case 7:f.g.abr.enabled&&(f.s.enable(),yl(f)),pl(f),ll(f),f.i.variants.some(function(e){return e.primary}),(I=f.R())&&(f.g.streaming.liveSync||f.i.serviceDescription)?(k=function(){return sl(f)},f.o.D(g,"timeupdate",k)):I||(k=function(){return ul(f)},f.o.D(g,"timeupdate",k),ul(f)),f.A&&f.A.onManifestUpdated(I),f.mb=!0,f.o.ja(g,"loadedmetadata",function(){f.u.m=Date.now()/1e3-p}),Te(e)}var t,n,i,r,a,o,s,u,l,c,d,h})),0);var f,p,g,m,v,y,b,w,x,T,S,A,E,I,k})},"loadInner_"),10);case 16:return xe(e,a(function(){return Ie(function(e){return xe(e,(r=C,t=d,n=h,Ie(function(e){if(1==e.g)return Ou(r,"src-equals"),a=r.h,r.C=new Yo(a),o=!1,r.Hc.push(function(){o=!0}),null!=r.ma&&r.C.je(r.ma),r.I=new rs({Ed:function(){return a.playbackRate},ec:function(){return a.defaultPlaybackRate},rf:function(e){a.playbackRate=e},bg:function(e){a.currentTime+=e}}),s=r.g.streaming.rebufferingGoal,Ku(r,a,s),s=function(){return ol(r)},u=function(){return al(r)},r.o.D(a,"playing",s),r.o.D(a,"pause",s),r.o.D(a,"ended",s),r.o.D(a,"ratechange",u),"none"!=a.preload&&r.o.ja(a,"loadedmetadata",function(){r.u.m=Date.now()/1e3-t}),a.audioTracks&&(r.o.D(a.audioTracks,"addtrack",function(){return pl(r)}),r.o.D(a.audioTracks,"removetrack",function(){return pl(r)}),r.o.D(a.audioTracks,"change",function(){return pl(r)})),a.textTracks&&(r.o.D(a.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case"metadata":var t,n=r,i=e;"metadata"==i.kind&&(i.mode="hidden",n.o.D(i,"cuechange",function(){if(i.activeCues)for(var e=we(i.activeCues),t=e.next();!t.done;t=e.next())t=t.value,Vu(n,t.startTime,t.endTime,t.type,t.value),n.A&&n.A.onCueMetadataChange(t.value)}),t=new I(function(){for(var e=Array.from(n.h.textTracks).filter(function(e){return"metadata"==e.kind}),t=(e=we(e)).next();!t.done;t=e.next())t.value.mode="hidden"}).qc().U(.5),n.Hc.push(function(){t.stop()}));break;case"chapters":Hu(r,e);break;default:pl(r)}}),r.o.D(a.textTracks,"removetrack",function(){return pl(r)}),r.o.D(a.textTracks,"change",function(){return pl(r)})),a.src=function(e,t,n){try{if(!e.g.enabled)return t;var i=eu(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=au;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=su;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=ru;break e}r=void 0}return i.ot=r,i.su=!0,iu(t,nu(i))}catch(e){return $("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(r.V,r.ea,n),(wn()||Cn("Web0S"))&&a.load(),r.l=Nl,r.dispatchEvent(ju("streaming")),i=new k,Fo(a,HTMLMediaElement.HAVE_METADATA,r.o,function(){r.C.ie(),i.resolve()}),Fo(a,HTMLMediaElement.HAVE_CURRENT_DATA,r.o,function(){var i;return Ie(function(e){return 1==e.g?(""!=(t=(n=r).g.preferredAudioLanguage)&&n.jg(t,n.g.preferredVariantRole),(i=Wu(r)).find(function(e){return"disabled"!=e.mode})?(0<i.length&&(r.da=!0),e.B(2)):xe(e,new Promise(function(e){r.o.ja(a.textTracks,"change",e),new I(e).U(1)}),2)):o?e.return():(""!=(n=(t=r).g.preferredTextLanguage)&&t.kf(n,t.g.preferredTextRole,t.g.preferForcedSubs),void Te(e));var t,n})}),a.error?i.reject(Tl(r)):"none"==a.preload&&(X('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.'),i.resolve()),r.o.ja(a,"error",function(){i.reject(Tl(r))}),xe(e,i,2);(s=r.R())&&r.g.streaming.liveSync?(u=function(){return sl(r)},r.o.D(a,"timeupdate",u)):s||(l=function(){return ul(r)},r.o.D(a,"timeupdate",l),ul(r)),r.A&&(r.A.onManifestUpdated(s),s&&(c=r.Eb().end,r.o.D(a,"progress",function(){var e=r.Eb().end;c!=e&&(r.A.onManifestUpdated(r.R()),c=e)}))),r.mb=!0,Te(e)})),0);var r,t,n,a,o,i,s,u,l,c})},"srcEqualsInner_"),10);case 10:C.dispatchEvent(ju("loaded")),Ae(e,0);break;case 5:if(7e3!=(o=Ee(e)).code)return xe(e,C.rc(!1),18);e.B(18);break;case 18:throw o}})},e.Mh=function(){for(var e=this.W;e.g;)e.release()},e.configure=function(e,t){(e=2==arguments.length&&"string"==typeof e?bu(e,t):e).streaming&&"forceTransmuxTS"in e.streaming&&(di("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(di("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01),null==e.streaming.segmentPrefetchLimit&&(e.streaming.segmentPrefetchLimit=2),null==e.streaming.retryParameters&&(e.streaming.retryParameters={}),null==e.streaming.retryParameters.baseDelay&&(e.streaming.retryParameters.baseDelay=100),null==e.manifest&&(e.manifest={}),null==e.manifest.retryParameters&&(e.manifest.retryParameters={}),null==e.manifest.retryParameters.baseDelay&&(e.manifest.retryParameters.baseDelay=100),null==e.drm&&(e.drm={}),null==e.drm.retryParameters&&(e.drm.retryParameters={}),null==e.drm.retryParameters.baseDelay&&(e.drm.retryParameters.baseDelay=100));var n=Mu(this.g,e,el(this));return Xu(this),n},e.getConfiguration=function(){var e=el(this);return Mu(e,this.g,el(this)),e},e.Qg=function(){if(this.h){var e=(e=this.h.buffered.length)?this.h.buffered.end(e-1):0,t=this.getConfiguration().streaming.bufferingGoal;if((t=Math.min(this.h.currentTime+t,this.Eb().end))<=e)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},e.Qh=function(){for(var e in this.g)delete this.g[e];Mu(this.g,el(this),el(this)),Xu(this)},e.Xg=function(){return this.l},e.He=function(){return this.i?this.i.type:null},e.ah=function(){return this.h},e.Ob=function(){return this.H},e.Ge=function(){return this.ea},e.Of=function(){return this.A||null},e.R=function(){return this.i?this.i.presentationTimeline.R():!(!this.h||!this.h.src)&&1/0==this.h.duration},e.Rb=function(){return!!this.i&&this.i.presentationTimeline.Rb()},e.sh=function(){var e;return this.i?!!(e=this.i.variants).length&&!e[0].video:!(!this.h||!this.h.src)&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},e.Eb=function(){if(this.i){if(!this.mb&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.hc(),end:e.qb()}}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}},e.ph=function(){this.R()&&(this.h.currentTime=this.Eb().end)},e.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},e.drmInfo=function(){return this.m?this.m.g:null},e.Qc=function(){return this.m?this.m.Qc():1/0},e.Fe=function(){return this.m?this.m.Fe():[]},e.Bd=function(){return this.m?this.m.Bd():{}},e.Ke=function(){return!!this.K&&this.K.g==Si},e.Cd=function(){return this.h?this.I?this.I.h:1:0},e.xf=function(i){var r=this;0==i?X("A trick play rate of 0 is unsupported!"):(this.Ba.Za(),this.h.paused&&this.h.play(),this.I.set(i),this.l==Ll&&(this.s.playbackRateChanged(i),Ts(this.j,1<Math.abs(i))),this.R()&&this.Ba.D(this.h,"timeupdate",function(){var e=r.h.currentTime,t=r.Eb(),n=r.g.streaming.safeSeekOffset;0<i?e>=t.end&&r.ud():e<=t.start+n&&r.ud()}))},e.ud=function(){var e=this.I.ec();this.l==Nl&&this.I.set(e),this.l==Ll&&(this.I.set(e),this.s.playbackRateChanged(e),Ts(this.j,!1)),this.Ba.Za()},e.Cb=function(){if(this.i){for(var e,t=this.j?this.j.j:null,n=[],i=0,r=we(this.i.variants),a=r.next();!a.done;a=r.next())$n(a=a.value)&&((e=Gn(a)).active=a==t,e.active||1==i||null==t||a.video!=t.video||a.audio!=t.audio||(e.active=!0),e.active&&i++,n.push(e));return n}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(Wn):[]},e.jc=function(){if(this.i){for(var e=this.j?this.j.o:null,t=[],n=we(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=Kn(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Wu(this).map(zn):[]},e.Wg=function(){var e=this.Oc;return(e=this.i?this.i.imageStreams:e).map(qn)},e.Ng=function(r){var a,o,t,s=this;return Ie(function(e){return 1==e.g?s.l!=Ll&&s.l!=Nl?e.return(null):(t=s.Oc,s.i&&(t=s.i.imageStreams),(a=t.find(function(e){return e.id==r}))?a.segmentIndex?e.B(2):xe(e,a.createSegmentIndex(),2):e.return(null)):4!=e.g?(o=[],es(a.segmentIndex,function(e){if(t=zu(e.tilesLayout||a.tilesLayout))for(var t=t.rows*t.Kb,n=e.h-e.startTime,i=0;i<t;i++)o.push(s.Tf(r,e.startTime+n*i/t))}),xe(e,Promise.all(o),4)):(t=e.h,e.return(t.filter(function(e){return e})))})},e.Tf=function(t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g=this;return Ie(function(e){return 1==e.g?g.l!=Ll&&g.l!=Nl?e.return(null):(i=g.Oc,g.i&&(i=g.i.imageStreams),(i=i.find(function(e){return e.id==t}))?i.segmentIndex?e.B(2):xe(e,i.createSegmentIndex(),2):e.return(null)):null==(r=i.segmentIndex.find(n))?e.return(null):(r=i.segmentIndex.get(r),(p=zu(r.tilesLayout||i.tilesLayout))?(a=i.width||0,o=i.height||0,s=a/p.Kb,u=o/p.rows,f=p.Kb*p.rows,l=r.h-r.startTime,l=r.u||l/f,c=r.startTime,h=d=0,1<f&&(f=Math.floor((n-r.startTime)/l),c=r.startTime+f*l,d=f%p.Kb*s,h=Math.floor(f/p.Kb)*u),f=!1,(p=r.s)&&(f=!0,u=p.height,d=p.positionX,h=p.positionY,s=p.width),e.return({segment:r,imageHeight:o,imageWidth:a,height:u,positionX:d,positionY:h,startTime:c,duration:l,uris:r.Z(),width:s,sprite:f})):e.return(null))})},e.kg=function(t){if(this.i&&this.j){var e=this.i.textStreams.find(function(e){return e.id==t.id});e&&e!=this.j.o&&(Nu(this.u.h,e,!1),As(this.j,e),ml(this),this.lb=e.language)}else if(this.h&&this.h.src&&this.h.textTracks){for(var n=(e=we(e=Wu(this))).next();!n.done;n=e.next())Xn(n=n.value)==t.id?n.mode=this.da?"showing":"hidden":n.mode="disabled";ml(this)}},e.lf=function(t,e,n){if(e=void 0!==e&&e,n=void 0===n?0:n,this.i&&this.j){this.g.abr.enabled&&X("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(e){return e.id==t.id});i&&$n(i)&&(hl(this,i,!1,e,n),this.kb=new bi(i,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),ll(this))}else if(this.h&&this.h.audioTracks)for(n=(e=we(e=Array.from(this.h.audioTracks))).next();!n.done;n=e.next())if(Xn(n=n.value)==t.id){fl(this,n);break}},e.Pg=function(){return Ml(this.Cb())},e.ih=function(){return Ml(this.jc())},e.Og=function(){return Array.from(Cl(this.Cb()))},e.hh=function(){return Array.from(Cl(this.jc()))},e.jg=function(e,t,n,i){if(n=void 0===n?0:n,i=void 0===i?0:i,this.i&&this.C){this.kb=new wi(e,t||"",n,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),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.kb.create(this.i.variants);n=null;for(var a=(r=we(r.values())).next();!a.done;a=r.next())a=a.value,(!n||e(n,t)>e(a,t))&&(n=a);n?(e=Gn(n),this.lf(e,!0,i)):dl(this)}else this.h&&this.h.audioTracks&&(i=Qn(this.Cb(),e,t||"",!1)[0])&&this.lf(i)},e.kf=function(e,t,n){n=void 0!==n&&n,this.i&&this.C?(this.lb=e,this.Kc=t||"",this.Jc=n,(e=Qn(this.i.textStreams,this.lb,this.Kc,this.Jc)[0]||null)&&e!=this.j.o&&(Nu(this.u.h,e,!1),this.g.streaming.alwaysStreamText||this.Me())&&(As(this.j,e),ml(this))):(e=Qn(this.jc(),e,t||"",n)[0])&&this.kg(e)},e.Wh=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=we(this.i.variants),a=r.next();!a.done;a=r.next())if((a=a.value).audio.label==e){i=a;break}null!=i&&(this.kb=new wi(i.language,"",0,"",!1,"",e,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),dl(this,t,n))}else if(this.h&&this.h.audioTracks){for(t=null,i=(n=we(n=Array.from(this.h.audioTracks))).next();!i.done;i=n.next())(i=i.value).label==e&&(t=i);t&&fl(this,t)}},e.Me=function(){var e=this.da;return this.G&&this.l==Ll?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Wu(this).some(function(e){return"showing"==e.mode}):e},e.Pf=function(){return this.h&&this.h.src&&this.h.textTracks?Yu(this).map(zn):[]},e.Rg=function(e){if(!this.h||!this.h.src||!this.h.textTracks)return[];var t=de(e),n=Yu(this).filter(function(e){return de(e.language)==t});if(!n||!n.length)return[];e=[];for(var i=new Set,r=(n=we(n)).next();!r.done;r=n.next())if((r=r.value)&&r.cues)for(var a=(r=we(r.cues)).next();!a.done;a=r.next()){var o={id:a=(a=(o=a.value).id)&&""!=a?a:o.startTime+"-"+o.endTime+"-"+o.text,title:o.text,startTime:o.startTime,endTime:o.endTime};i.has(a)||(e.push(o),i.add(a))}return e},e.og=function(e){if(this.da!=(e=!!e)){if(this.da=e,this.l==Ll)this.G.F.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.o||0<(e=Qn(this.i.textStreams,this.lb,this.Kc,this.Jc)).length&&(As(this.j,e[0]),ml(this)):(i=this.j,(r=i.i.get(ce))&&(js(r),Os(r).catch(function(){}),i.i.delete(ce)),i.o=null));else if(this.h&&this.h.src&&this.h.textTracks)for(var t=Wu(this),n=(t=we(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");vl(this)}var i,r},e.dh=function(){if(!this.R())return null;if(this.C)var e=this.C.qd();else{if(null==this.ma)return new Date;e=this.ma}return this.i?new Date(1e3*(this.i.presentationTimeline.i+e)):this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null;var t},e.Sf=function(){return this.R()?this.i?new Date(1e3*this.i.presentationTimeline.i):this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null:null;var e},e.pb=function(){if(this.l==Ll)return this.G.pb();var e={total:[],audio:[],video:[],text:[]};return this.l==Nl&&(e.total=Ra(this.h.buffered)),e},e.getStats=function(){if(this.l!=Ll&&this.l!=Nl)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:[]};ol(this);var e,t,n=(r=this.h).currentTime/r.duration,i=(isNaN(n)||(t=this.u,n=Math.round(100*n),t.i=isNaN(t.i)?n:Math.max(t.i,n)),this.C&&(this.u.K=this.C.Af(),this.u.N=this.C.Bf()),r.getVideoPlaybackQuality&&(t=r.getVideoPlaybackQuality(),n=this.u,e=Number(t.totalVideoFrames),n.J=Number(t.droppedVideoFrames),n.I=e,this.u.H=Number(t.corruptedVideoFrames)),t=this.m?(t=this.m).I||NaN:NaN,this.u.s=t,this.l==Ll&&(t=this.j.j,n=this.j.o,t&&(a=(e=this.I?this.I.h:1)*t.bandwidth,n&&n.bandwidth&&(a+=e*n.bandwidth),this.u.A=a),t&&t.video&&(n=this.u,e=t.video.height||NaN,n.o=t.video.width||NaN,n.l=e),this.R()&&(t=this.Sf().valueOf()+1e3*r.currentTime,this.u.C=(Date.now()-t)/1e3),this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g),t=this.s.getBandwidthEstimate(),this.u.u=t),this.l==Nl&&(t=this.u,n=r.videoHeight||NaN,t.o=r.videoWidth||NaN,t.l=n),this.u),r=i.o;t=i.l,n=i.A,e=i.I;for(var a=i.J,o=i.H,s=i.N,u=i.K,l=i.u,c=i.i,d=i.m,h=i.F,f=i.j,p=Ru(i.g,"playing"),g=Ru(i.g,"paused"),m=Ru(i.g,"buffering"),v=i.s,y=i.C,b=i.G,w=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=we(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(i.g),x=[],T=(i=we(i.h.g)).next();!T.done;T=i.next())T=T.value,x.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.bandwidth});return{width:r,height:t,streamBandwidth:n,decodedFrames:e,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:v,liveLatency:y,maxSegmentDuration:b,stateHistory:w,switchHistory:x}},e.Bg=function(t,n,i,r,a,o,s){s=void 0!==s&&s;var u,l,c,d,h,f,p,g=this;return Ie(function(e){switch(e.g){case 1:if(g.l!=Ll&&g.l!=Nl)throw new ke(1,7,7004);if("subtitles"!=i&&"captions"!=i&&X("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){e.B(2);break}return xe(e,$u(g,t),3);case 3:r=e.h;case 2:if(u=[],g.A&&(u=g.A.getCuePoints()),g.l==Nl)return xe(e,Ju(g,t,n,i=s?"forced":i,r,o||"",u),5);e.B(4);break;case 5:if(l=de(n),h=g.jc(),h=h.find(function(e){return de(e.language)==l&&e.label==(o||"")&&e.kind==i}))return pl(g),e.return(h);throw new ke(1,2,2012);case 4:if(c=jt,d=g.h.duration,1/0==(d=g.i?g.i.presentationTimeline.getDuration():d))throw new ke(1,4,4033);if(u.length)return xe(e,Qu(g,t,g.H,g.g.streaming.retryParameters),7);e.B(6);break;case 7:h=e.h,f=Zu(g,h,r,u),f=new Blob([f],{type:"text/vtt"}),t=No(f),r="text/vtt";case 6:if(f={id:g.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ts(0,d,[t]),mimeType:r||"",codecs:a||"",kind:i,encrypted:!1,drmInfos:[],keyIds:new Set,language:n,originalLanguage:n,label:o||null,type:c.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1},p=Bt(f.mimeType,f.codecs),Yt(p))return g.i.textStreams.push(f),pl(g),e.return(Kn(f));throw new ke(2,2,2014,r)}})},e.Cg=function(t,n){var i,r,a,o,s,u,l,c,d,h,f,p=this;return Ie(function(e){switch(e.g){case 1:if(p.l!=Ll&&p.l!=Nl)throw new ke(1,7,7004);if(n){e.B(2);break}return xe(e,$u(p,t),3);case 3:n=e.h;case 2:if("text/vtt"!=n)throw new ke(1,2,2017,t);if(i=jt,r=p.h.duration,1/0==(r=p.i?p.i.presentationTimeline.getDuration():r))throw new ke(1,4,4045);return xe(e,Qu(p,t,p.H,p.g.streaming.retryParameters),4);case 4:if(f=e.h,!(o=Qt[n]))throw new ke(2,2,2014,n);for(o=o(),a={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},f=ne(f),o=o.parseMedia(f,a,t),s=[],u={},l=we(o),c=l.next();!c.done;u={Dc:u.Dc,Hb:u.Hb},c=l.next())u.Hb=c.value,u.Dc=null,d=function(e){return function(){return null==e.Dc&&(e.Dc=Lt([t],[e.Hb.payload])),e.Dc||[]}}(u),d=new N(u.Hb.startTime,u.Hb.endTime,d,0,null,null,0,0,1/0),u.Hb.payload.includes("#xywh")&&(4===(h=u.Hb.payload.split("#xywh=")[1].split(",")).length&&d.pg({height:parseInt(h[3],10),positionX:parseInt(h[0],10),positionY:parseInt(h[1],10),width:parseInt(h[2],10)})),s.push(d);return f={id:p.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new V(s),mimeType:n||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.he,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1},(p.l==Nl?p.Oc:p.i.imageStreams).push(f),pl(p),e.return(qn(f))}})},e.Ag=function(t,n,i){var r,a,o,s=this;return Ie(function(e){switch(e.g){case 1:if(s.l!=Ll&&s.l!=Nl)throw new ke(1,7,7004);if(i){e.B(2);break}return xe(e,$u(s,t),3);case 3:i=e.h;case 2:return a=[],s.A&&(a=s.A.getCuePoints()),xe(e,Ju(s,t,n,"chapters",i,"",a),4);case 4:if(r=e.h,a=s.Pf(),o=a.find(function(e){return e.language==n}))return xe(e,new Promise(function(e,t){s.o.ja(r,"load",e),s.o.ja(r,"error",function(){t(new ke(1,2,2015))})}),6);e.B(5);break;case 6:return pl(s),e.return(o);case 5:throw new ke(1,2,2012)}})},e.pf=function(e,t){this.Id.width=e,this.Id.height=t},e.gf=function(e){if(this.l==Ll){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=we(t.i.values()),i=n.next();!i.done;i=n.next())!(i=i.value).Tc||i.Da||i.ib||(i.Tc=!1,_s(t,i,e));t=!0}}else t=!1;return t},e.Yg=function(){return X("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},e.Zg=function(){return this.Ld},e.rg=function(e){this.xd=e},e.wd=function(t,e){if(!this.g.abr.enabled||this.l===Dl||!navigator.onLine)return!1;if(this.i.variants.some(function(e){return!(!(e=e[t.type])||e.id===t.id)&&("audio"!=t.type||t.language===e.language)})){for(var n=we(this.i.variants),i=n.next();!i.done;i=n.next()){var r=(i=i.value)[t.type];r&&r.id===t.id&&(i.disabledUntilTime=Date.now()/1e3+e)}return this.yd.$a(1),e=this.pb().video.reduce(function(e,t){return e+t.end-t.start},0),dl(this,!0,e,!0,!1),!0}return!1},t("shaka.Player",n),n.prototype.setVideoContainer=n.prototype.rg,n.prototype.getManifestParserFactory=n.prototype.Zg,n.prototype.getManifest=n.prototype.Yg,n.prototype.retryStreaming=n.prototype.gf,n.prototype.setMaxHardwareResolution=n.prototype.pf,n.prototype.addChaptersTrack=n.prototype.Ag,n.prototype.addThumbnailsTrack=n.prototype.Cg,n.prototype.addTextTrackAsync=n.prototype.Bg,n.prototype.getBufferedInfo=n.prototype.pb,n.prototype.getPresentationStartTimeAsDate=n.prototype.Sf,n.prototype.getPlayheadTimeAsDate=n.prototype.dh,n.prototype.setTextTrackVisibility=n.prototype.og,n.prototype.getChapters=n.prototype.Rg,n.prototype.getChaptersTracks=n.prototype.Pf,n.prototype.isTextTrackVisible=n.prototype.Me,n.prototype.selectVariantsByLabel=n.prototype.Wh,n.prototype.selectTextLanguage=n.prototype.kf,n.prototype.selectAudioLanguage=n.prototype.jg,n.prototype.getTextLanguages=n.prototype.hh,n.prototype.getAudioLanguages=n.prototype.Og,n.prototype.getTextLanguagesAndRoles=n.prototype.ih,n.prototype.getAudioLanguagesAndRoles=n.prototype.Pg,n.prototype.selectVariantTrack=n.prototype.lf,n.prototype.selectTextTrack=n.prototype.kg,n.prototype.getThumbnails=n.prototype.Tf,n.prototype.getAllThumbnails=n.prototype.Ng,n.prototype.getImageTracks=n.prototype.Wg,n.prototype.getTextTracks=n.prototype.jc,n.prototype.getVariantTracks=n.prototype.Cb,n.prototype.cancelTrickPlay=n.prototype.ud,n.prototype.trickPlay=n.prototype.xf,n.prototype.getPlaybackRate=n.prototype.Cd,n.prototype.isBuffering=n.prototype.Ke,n.prototype.getKeyStatuses=n.prototype.Bd,n.prototype.getActiveSessionsMetadata=n.prototype.Fe,n.prototype.getExpiration=n.prototype.Qc,n.prototype.goToLive=n.prototype.ph,n.prototype.seekRange=n.prototype.Eb,n.prototype.isAudioOnly=n.prototype.sh,n.prototype.isInProgress=n.prototype.Rb,n.prototype.isLive=n.prototype.R,n.prototype.getAdManager=n.prototype.Of,n.prototype.getAssetUri=n.prototype.Ge,n.prototype.getNetworkingEngine=n.prototype.Ob,n.prototype.getMediaElement=n.prototype.ah,n.prototype.getManifestType=n.prototype.He,n.prototype.getLoadMode=n.prototype.Xg,n.prototype.resetConfiguration=n.prototype.Qh,n.prototype.getBufferFullness=n.prototype.Qg,n.prototype.releaseAllMutexes=n.prototype.Mh,n.prototype.updateStartTime=n.prototype.ei,n.prototype.unload=n.prototype.rc,n.prototype.attachCanvas=n.prototype.Eg,n.prototype.attach=n.prototype.Ic,n.probeSupport=function(l){var c,d,h,f,p;return l=void 0===l||l,Ie(function(e){if(1==e.g)return c={},l?xe(e,Ie(function(e){return 1==e.g?(n="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(" "),r=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],a=new Map,t=function(t){var n,i;return Ie(function(e){switch(e.g){case 1:if(Se(e,2),"org.w3.clearkey"===t&&kn())throw Error("Unsupported keySystem");return xe(e,navigator.requestMediaKeySystemAccess(t,r),4);case 4:return n=e.h,i=!!(i=n.getConfiguration().sessionTypes)&&i.includes("persistent-license"),xn()&&(i=!1),a.set(t,{persistentState:i}),xe(e,n.createMediaKeys(),5);case 5:Ae(e,0);break;case 2:Ee(e),a.set(t,null),Te(e)}})},n=n.map(t),xe(e,Promise.all(n),2)):e.return(er(a))}),3):e.B(2);2!=e.g&&(c=e.h);var r,a,t,n,i={};if(mn())for(var o in wa)i[o]=!0;for(var s=(o=we(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!s.done;s=o.next())i[s=s.value]=mn()?!!wa[s]:vn(s);for(d=i,i={},s=(o=we(o='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",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(le(zt)))).next();!s.done;s=o.next()){i[s=s.value]=mn()?!!Yt(s)||(Z(s)||!!ut(s)):vn(s);var u=s.split(";")[0];i[u]=i[u]||i[s]}for(p in h={manifest:d,media:i,drm:c},f=jl)h[p]=f[p]();return e.return(h)})},n.isBrowserSupported=function(){if(q.Promise||X("A Promise implementation or polyfill is required"),!(q.Promise&&q.Uint8Array&&Array.prototype.forEach)||Cn("Trident/"))return!1;var e=kn();return!(e&&e<9||!(q.MediaKeys&&q.navigator&&q.navigator.requestMediaKeySystemAccess&&q.MediaKeySystemAccess&&q.MediaKeySystemAccess.prototype.getConfiguration))&&(!!mn()||vn("application/x-mpegurl"))},n.setAdManagerFactory=function(e){Ol=e},n.registerSupportPlugin=function(e,t){jl[e]=t};var Dl=0,Rl=1,Ll=2,Nl=3,Pl=(n.LoadMode={DESTROYED:Dl,NOT_LOADED:Rl,MEDIA_SOURCE:Ll,SRC_EQUALS:Nl},n.version="v4.7.11",["4","7"]),pi=new function(e){this.g=e,this.i=hi,this.h=fi}(new ci(Number(Pl[0]),Number(Pl[1]))),_l=["output-restricted","internal-error"],jl={},Ol=null;function Ul(){this.h=[],this.j=this.i=this.g=0}function Bl(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new Wi,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function Fl(e,t,n,i,r){var u=this;this.o=e,this.i=t,this.A=!1,this.s=this.C=null,this.F=NaN,this.m=r,this.j=null,this.h=new Wi,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),(e=new google.ima.AdDisplayContainer(this.o,this.i)).initialize(),this.l=new google.ima.AdsLoader(e),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v4.7.11"),this.g=null,this.u=i||new google.ima.AdsRenderingSettings,this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(e){var t,n=u,i=e,r=(n.m(new he("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-n.F))),n.C.customPlayheadTracker?(t={currentTime:n.i.currentTime},n.g=i.getAdsManager(t,n.u),n.i.muted?n.g.setVolume(0):n.g.setVolume(n.i.volume),n.h.D(n.i,"timeupdate",function(){n.i.duration&&(t.currentTime=n.i.currentTime)}),n.h.D(n.i,"volumechange",function(){n.j&&(n.j.setVolume(n.i.volume),n.i.muted&&n.j.setMuted(!0))})):n.g=i.getAdsManager(n.i,n.u),n.m(new he("ima-ad-manager-loaded",(new Map).set("imaAdManager",n.g))),n.g.getCuePoints());if(r.length){i=[];for(var a=(r=we(r)).next();!a.done;a=r.next())i.push({start:a.value,end:null});n.m(new he("ad-cue-points-changed",(new Map).set("cuepoints",i)))}var o=n;function s(e,t){e=(new Map).set("originalEvent",e),o.m(new he(t,e))}o.h.D(o.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){Vl(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){Gl(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.STARTED,function(e){Gl(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){s(e,"ad-first-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.MIDPOINT,function(e){s(e,"ad-midpoint")}),o.h.D(o.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){s(e,"ad-third-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.COMPLETE,function(e){s(e,"ad-complete")}),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){Kl(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){Kl(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPED,function(e){s(e,"ad-skipped")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){s(e,"ad-volume-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){s(e,"ad-muted")}),o.h.D(o.g,google.ima.AdEvent.Type.PAUSED,function(e){o.j&&(o.j.i=!0,s(e,"ad-paused"))}),o.h.D(o.g,google.ima.AdEvent.Type.RESUMED,function(e){o.j&&(o.j.i=!1,s(e,"ad-resumed"))}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){o.j&&s(e,"ad-skip-state-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.CLICK,function(e){s(e,"ad-clicked")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){s(e,"ad-progress")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){s(e,"ad-buffering")}),o.h.D(o.g,google.ima.AdEvent.Type.IMPRESSION,function(e){s(e,"ad-impression")}),o.h.D(o.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){s(e,"ad-duration-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){s(e,"ad-closed")}),o.h.D(o.g,google.ima.AdEvent.Type.LOADED,function(e){s(e,"ad-loaded")}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){s(e,"all-ads-completed")}),o.h.D(o.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){s(e,"ad-linear-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_METADATA,function(e){s(e,"ad-metadata")}),o.h.D(o.g,google.ima.AdEvent.Type.LOG,function(e){s(e,"ad-recoverable-error")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){s(e,"ad-break-ready")}),o.h.D(o.g,google.ima.AdEvent.Type.INTERACTION,function(e){s(e,"ad-interaction")});try{n.g.init(n.i.offsetWidth,n.i.offsetHeight,Hl(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),n.h.D(n.i,"loadeddata",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,Hl(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in q?(n.s=new ResizeObserver(function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,Hl(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),n.s.observe(n.i)):n.h.D(document,"fullscreenchange",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight,Hl(n)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),n.A?n.g.start():n.h.ja(n.i,"play",function(){n.A=!0,n.g.start()})}catch(e){Kl(n,null)}}),this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){Vl(u,e)}),this.h.D(this.i,"ended",function(){u.l.contentComplete()}),this.h.ja(this.i,"play",function(){u.A=!0})}function Vl(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.m(new he("ad-error",t)),Kl(e,null),e.m(new he("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Hl(e){return document.fullscreenEnabled?document.fullscreenElement:(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function Gl(e,t){var n=t.getAd();n?(e.j=new Bl(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.m(new he("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause(),e.i.muted?((t=e.j).l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):X("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Kl(e,t){e.m(new he("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.ended||e.i.play())}function ql(e,t,n,i,r){this.h=e,this.g=r,this.i=t,this.j=n,this.l=i}function Xl(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.K=[],this.J=this.C=this.h=null,this.F=new Map,this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.o=new Wi}function zl(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function Wl(e){var t=e.g.currentTime;if(0!=t&&null==e.u){for(var n,i,r=we(e.j),a=r.next();!a.done;a=r.next())for(var o=we((a=a.value).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);n&&i&&!e.K.includes(i.adId)&&(e.u=t,e.g.currentTime=n.startTimeInSeconds)}}function Yl(e){if(e.g.duration&&(e.h||e.j.length)){var t,n,i,r=e.g.currentTime,a=!1;if(e.h&&(a=!0,n=(t=e.C).startTimeInSeconds+.5*t.durationInSeconds,i=t.startTimeInSeconds+.75*t.durationInSeconds,r>=t.startTimeInSeconds+.25*t.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),Ql(e,"firstQuartile")):n<=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),Ql(e,"midpoint")):i<=r&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),Ql(e,"thirdQuartile")),t=e.h.getRemainingTime(),0<(n=e.h.getDuration())&&(t<=0||n<t)&&$l(e)),!e.h||!e.h.isLinear()){e:for(t=we(e.j),n=t.next();!n.done&&(n=n.value,!e.h||!e.h.isLinear());n=t.next())for(i=0;i<n.ads.length;i++){var o=n.ads[i],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=r&&r<s){if(e.K.includes(o.adId)){if(e.g.ended)continue;e.g.currentTime=s;break e}$l(e),e.J=n,e.h=new ql(o,i+1,n.ads.length,!0,e.g),e.C=o,0===i&&Ql(e,"breakStart"),Jl(e);break}}if(!e.h)for(n=(t=we(e.j)).next();!n.done&&(n=n.value,!e.h);n=t.next())for(i=0;i<n.nonLinearAdsList.length;i++)if((o=n.nonLinearAdsList[i]).nonLinearAdList.length){s=n.startTimeInSeconds;var u=e.F.get(zl(o.nonLinearAdList[0]));if(s<=r&&u&&u.length){$l(e);for(var l,s=e,c=(u=we(u)).next();!c.done;c=u.next())(c=c.value).data.source.length&&((l=document.createElement("img")).src=c.data.source[0].url,l.style.top=(c.placeholder.top||0)+"%",l.style.height=100-(c.placeholder.top||0)+"%",l.style.left=(c.placeholder.left||0)+"%",l.style.maxWidth=100-(c.placeholder.left||0)+"%",l.style.objectFit="contain",l.style.position="absolute",s.A.appendChild(l));e.J=n,e.h=new ql(o,i+1,n.ads.length,!1,e.g),e.C=o,0===i&&Ql(e,"breakStart"),Jl(e);break}}a&&!e.h&&(r=e.g.currentTime,e.u&&e.u>r&&(e.g.currentTime=e.u),e.u=null)}}}function $l(e){if(e.h){for(;e.A.lastChild;)e.A.removeChild(e.A.firstChild);e.H||e.K.push(e.C.adId),Ql(e,"complete");for(var t=we(e.m),n=t.next();!n.done;n=t.next())n=n.value,e.o.Vb(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.h.getPositionInSequence())===(n=e.h.getSequenceLength())&&Ql(e,"breakEnd"),e.h=null,e.C=null,e.J=null}}function Jl(e){var t=!1;e.g.paused?t=!0:(Ql(e,"impression"),Ql(e,"start")),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted&&Ql(e,"mute")}}),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted||Ql(e,"unmute")}}),e.m.push({target:e.g,type:"play",listener:function(){t?(Ql(e,"impression"),Ql(e,"start"),t=!1):Ql(e,"resume")}}),e.m.push({target:e.g,type:"pause",listener:function(){Ql(e,"pause")}});for(var n=we(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function Ql(e,t){var n=e.C.trackingEvents.find(function(e){return e.eventType==t});if(n=n||e.J.adBreakTrackingEvents.find(function(e){return e.eventType==t}))for(var i=(n=we(n.beaconUrls)).next();!i.done;i=n.next())(i=i.value)&&""!=i&&((i=Fi([i],ki())).method="POST",e.I.request(7,i));switch(t){case"impression":e.i(new he("ad-impression"));break;case"start":e.i(new he("ad-started",(new Map).set("ad",e.h)));break;case"mute":e.i(new he("ad-muted"));break;case"unmute":e.i(new he("ad-volume-changed"));break;case"resume":e.i(new he("ad-resumed"));break;case"pause":e.i(new he("ad-paused"));break;case"firstQuartile":e.i(new he("ad-first-quartile"));break;case"midpoint":e.i(new he("ad-midpoint"));break;case"thirdQuartile":e.i(new he("ad-third-quartile"));break;case"complete":e.i(new he("ad-complete")),e.i(new he("ad-stopped"));break;case"breakStart":e.A.setAttribute("ad-active","true");break;case"breakEnd":e.A.removeAttribute("ad-active")}}function Zl(e,t){this.g=e,this.i=null,this.h=t}function ec(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 Wi,(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 he("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 n;e=e,(n=r).i(new he("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-n.F))),e=e.getStreamData().url,n.j.resolve(e),n.j=null,n.G||n.h.D(n.l,"seeked",function(){var e,t=n.l.currentTime;0!=t&&(n.g.streamTimeForContentTime(t),(e=n.g.previousCuePointForStreamTime(t))&&!e.played&&(n.o=t,n.l.currentTime=e.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 Zl(e,r.l),r.u&&(r.m.i=r.u),r.i(new he("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 he("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new he("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new he("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new he("ad-complete")),r.i(new he("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 he("ad-skipped")),r.i(new he("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[];for(var n=(t=we(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.C=e,r.i(new he("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function i(){h.call(this),this.g=this.i=this.h=null,this.j=new Ul,this.m=navigator.language,this.l=null}function tc(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 nc(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof he){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=we(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())i.add(n.value);for(e={},n=(i=we(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=we(Ra(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:t<0?"-Infinity":"Infinity":t;return t}})}function ic(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n={length:(i=t).length,start:function(e){return i.start[e]},end:function(e){return i.end[e]}};else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(n in e=t.contents,t=Error(e.message),e)t[n]=e[n];n=t}else n=t;var i;return n})}(e=Bl.prototype).getDuration=function(){return this.g.getDuration()},e.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},e.getRemainingTime=function(){return this.h.getRemainingTime()},e.isPaused=function(){return this.i},e.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},e.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset(),e=this.getRemainingTime()-e;return Math.max(e,0)},e.canSkipNow=function(){return this.h.getAdSkippableState()},e.skip=function(){return this.h.skip()},e.pause=function(){return this.h.pause()},e.play=function(){return this.h.resume()},e.getVolume=function(){return this.h.getVolume()},e.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},e.isMuted=function(){return 0==this.h.getVolume()},e.isLinear=function(){return this.g.isLinear()},e.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},e.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},e.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},e.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},e.getTitle=function(){return this.g.getTitle()},e.getDescription=function(){return this.g.getDescription()},e.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},e.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},e.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},e.getAdId=function(){return this.g.getAdId()},e.getCreativeAdId=function(){return this.g.getCreativeAdId()},e.getAdvertiserName=function(){return this.g.getAdvertiserName()},e.getMediaUrl=function(){return this.g.getMediaUrl()},e.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},e.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},e.release=function(){this.h=this.g=null},t("shaka.ads.ClientSideAd",Bl),Fl.prototype.configure=function(e){this.C=e},Fl.prototype.stop=function(){this.g&&this.g.stop(),this.o&&zs(this.o)},Fl.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy()},(e=ql.prototype).getDuration=function(){return this.h.durationInSeconds},e.getMinSuggestedDuration=function(){return this.getDuration()},e.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},e.isPaused=function(){return this.g.paused},e.isSkippable=function(){return!!this.h.skipOffset},e.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var e=this.getRemainingTime()-this.h.skipOffset;return Math.max(e,0)},e.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},e.skip=function(){this.g.currentTime+=this.getRemainingTime()},e.pause=function(){return this.g.pause()},e.play=function(){return this.g.play()},e.getVolume=function(){return this.g.volume},e.setVolume=function(e){this.g.volume=e},e.isMuted=function(){return this.g.muted},e.isLinear=function(){return this.l},e.resize=function(){},e.setMuted=function(e){this.g.muted=e},e.getSequenceLength=function(){return this.j||1},e.getPositionInSequence=function(){return this.i||1},e.getTitle=function(){return this.h.adTitle},e.getDescription=function(){return""},e.getVastMediaBitrate=function(){return 0},e.getVastMediaHeight=function(){return 0},e.getVastMediaWidth=function(){return 0},e.getAdId=function(){return this.h.adId},e.getCreativeAdId=function(){return this.h.creativeId},e.getAdvertiserName=function(){return""},e.getMediaUrl=function(){return null},e.getTimeOffset=function(){return 0},e.getPodIndex=function(){return 0},e.release=function(){this.j=this.i=this.g=this.h=null},t("shaka.ads.MediaTailorAd",ql),Xl.prototype.stop=function(){for(var e=we(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Vb(t.target,t.type,t.listener);$l(this),this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.u=null,this.j=[],this.K=[],this.F.clear()},Xl.prototype.release=function(){this.stop(),this.o&&this.o.release()},Xl.prototype.onManifestUpdated=function(e){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m;this.H=e,""!=this.N&&(i=(n=this).N,r=this.V,Ie(function(e){if(1==e.g)return a=Fi([i],ki()),a=n.I.request(7,a),Se(e,2),xe(e,a.promise,4);if(2!=e.g){if(a=e.h,o=[],s=nr(a.data),0<(s=JSON.parse(s)).avails.length){if(JSON.stringify(n.j)!=JSON.stringify(s.avails)){for(n.j=s.avails,u=we(n.j),l=u.next();!l.done;l=u.next())for(c=l.value,d=we(c.nonLinearAdsList),h=d.next();!h.done;h=d.next())for(f=h.value,p=we(f.nonLinearAdList),g=p.next();!g.done;g=p.next())m=g.value,function(t,n){var i,r,a;Ie(function(e){return 1==e.g?n.staticResource?(i=zl(n),t.F.get(i)?e.return():(r=Fi([n.staticResource],ki()),r=t.I.request(7,r),Se(e,2),t.F.set(i,[]),xe(e,r.promise,4))):e.return():2!=e.g?(r=e.h,a=nr(r.data),a=JSON.parse(a),a=a.apps,t.F.set(i,a),Ae(e,0)):(Ee(e),t.F.delete(i),void Te(e))})}(n,m);o=n.getCuePoints(),n.i(new he("ad-cue-points-changed",(new Map).set("cuepoints",o)))}}else n.j.length&&n.i(new he("ad-cue-points-changed",(new Map).set("cuepoints",o))),$l(n),n.j=[];return r&&(n.H||0<o.length)&&(Yl(t=n),t.H||(Wl(t),t.o.D(t.g,"seeked",function(){Wl(t)}),t.o.D(t.g,"ended",function(){$l(t)})),t.o.D(t.g,"timeupdate",function(){Yl(t)})),Ae(e,0)}var t;Ee(e),Te(e)}),this.V=!1)},Xl.prototype.getCuePoints=function(){for(var e=[],t=we(this.j),n=t.next();!n.done;n=t.next())for(var i=(n=we(n.value.ads)).next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds});return e},(e=Zl.prototype).getDuration=function(){return this.i?this.i.duration:-1},e.getMinSuggestedDuration=function(){return this.getDuration()},e.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},e.isPaused=function(){return this.h.paused},e.isSkippable=function(){return this.g.isSkippable()},e.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset(),e=this.getRemainingTime()-e;return Math.max(e,0)},e.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},e.skip=function(){this.h.currentTime+=this.getRemainingTime()},e.pause=function(){return this.h.pause()},e.play=function(){return this.h.play()},e.getVolume=function(){return this.h.volume},e.setVolume=function(e){this.h.volume=e},e.isMuted=function(){return this.h.muted},e.isLinear=function(){return!0},e.resize=function(){},e.setMuted=function(e){this.h.muted=e},e.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},e.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},e.getTitle=function(){return this.g.getTitle()},e.getDescription=function(){return this.g.getDescription()},e.getVastMediaBitrate=function(){return 0},e.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},e.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},e.getAdId=function(){return this.g.getAdId()},e.getCreativeAdId=function(){return this.g.getCreativeAdId()},e.getAdvertiserName=function(){return this.g.getAdvertiserName()},e.getMediaUrl=function(){return null},e.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},e.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},e.release=function(){this.h=this.i=this.g=null},t("shaka.ads.ServerSideAd",Zl),(e=ec.prototype).configure=function(){},e.stop=function(){this.A="",this.o=null,this.C=[]},e.release=function(){this.stop(),this.h&&this.h.release()},e.onCueMetadataChange=function(e){var t;e.key&&e.data&&((t={})[e.key]=e.data,this.g.onTimedMetadata(t))},e.getCuePoints=function(){return this.C},m(i,h),(e=i.prototype).setLocale=function(e){this.m=e},e.configure=function(e){this.l=e,this.h&&this.h.configure(this.l),this.g&&this.g.configure(this.l)},e.initClientSide=function(e,t,n){var i=this;if(!q.google||!google.ima||!google.ima.AdsLoader)throw new ke(2,10,1e4);this.h&&this.h.release(),this.h=new Fl(e,t,this.m,n,function(e){return tc(i,e)}),this.h.configure(this.l)},e.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),h.prototype.release.call(this)},e.onAssetUnload=function(){this.h&&this.h.stop(),this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new he("ad-stopped")),this.j=new Ul},e.requestClientSideAds=function(e){if(!this.h)throw new ke(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)},e.updateClientSideAdsRenderingSettings=function(e){if(!this.h)throw new ke(1,10,10001);var t=this.h;t.u=e,t.g&&t.g.updateAdsRenderingSettings(t.u)},e.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new Xl(e,t,n,function(e){return tc(i,e)})},e.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new ke(1,10,10005);var i,r,a,o,s,u,l,c,d=this.i;return n=void 0===n?"":n,e=d.l?Promise.reject(new ke(1,10,10004)):(d.l=new k,i=d,r=e,a=t,Ie(function(e){if(1==e.g)return(s=Fi([r],ki())).method="POST",a&&(o=JSON.stringify(a),s.body=ar(o)),o=i.I.request(7,s),Se(e,2),xe(e,o.promise,4);if(2!=e.g){if(s=e.h,u=nr(s.data),(u=JSON.parse(u)).manifestUrl&&u.trackingUrl)return l=new gt(r),c=new gt(u.trackingUrl),i.N=l.resolve(c).toString(),c=Date.now()/1e3,c=c-i.W,i.i(new he("ads-loaded",(new Map).set("loadTime",c))),c=new gt(u.manifestUrl),i.l.resolve(l.resolve(c).toString()),i.l=null,Ae(e,0);throw Error("Insufficient data from MediaTailor.")}if(Ee(e),!i.G.length)return i.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),i.l=null,e.return();i.l.resolve(i.G),i.l=null,Te(e)}),d.G=n||"",d.W=Date.now()/1e3,d.l)},e.initServerSide=function(e,t){var n=this;if(!q.google||!google.ima||!google.ima.dai)throw new ke(2,10,10002);this.g&&this.g.release(),this.g=new ec(e,t,this.m,function(e){return tc(n,e)}),this.g.configure(this.l)},e.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new ke(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&X('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.7.11",e=(n=this.g).j?Promise.reject(new ke(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new k,n.g.requestStream(e),n.A=t||"",n.F=Date.now()/1e3,n.j)},e.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new ke(1,10,10003);(e.mpt||e.mpv)&&X('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.7.11",this.g.g.replaceAdTagParameters(e)},e.getServerSideCuePoints=function(){return di("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},e.getCuePoints=function(){var e=[];return this.g&&(e=e.concat(this.g.getCuePoints())),e=this.i?e.concat(this.i.getCuePoints()):e},e.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},e.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},e.onDashTimedMetadata=function(e){var t,n;this.g&&"urn:google:dai:2018"==e.schemeIdUri&&(t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null,this.g.g.processMetadata(t,n,e.startTime))},e.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},e.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},t("shaka.ads.AdManager",i),i.ADS_LOADED="ads-loaded",i.AD_STARTED="ad-started",i.AD_FIRST_QUARTILE="ad-first-quartile",i.AD_MIDPOINT="ad-midpoint",i.AD_THIRD_QUARTILE="ad-third-quartile",i.AD_COMPLETE="ad-complete",i.AD_STOPPED="ad-stopped",i.AD_SKIPPED="ad-skipped",i.AD_VOLUME_CHANGED="ad-volume-changed",i.AD_MUTED="ad-muted",i.AD_PAUSED="ad-paused",i.AD_RESUMED="ad-resumed",i.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",i.CUEPOINTS_CHANGED="ad-cue-points-changed",i.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",i.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",i.AD_CLICKED="ad-clicked",i.AD_PROGRESS="ad-progress",i.AD_BUFFERING="ad-buffering",i.AD_IMPRESSION="ad-impression",i.AD_DURATION_CHANGED="ad-duration-changed",i.AD_CLOSED="ad-closed",i.AD_LOADED="ad-loaded",i.ALL_ADS_COMPLETED="all-ads-completed",i.AD_LINEAR_CHANGED="ad-linear-changed",i.AD_METADATA="ad-metadata",i.AD_RECOVERABLE_ERROR="ad-recoverable-error",i.AD_ERROR="ad-error",i.AD_BREAK_READY="ad-break-ready",i.AD_INTERACTION="ad-interaction";var Ol=function(){return new i},rc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ac="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),oc=["loop","playbackRate"],sc=["pause","play"],uc={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,getLoadMode:10,getManifestType:10},lc={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},cc={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},dc=[["getConfiguration","configure"]],hc=[["isTextTrackVisible","setTextTrackVisibility"]],fc="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),pc=["attach","attachCanvas","detach","load","unload"];function gc(e,t,n,i,r,a,o){var s=this;this.G=e,this.K=o,this.j=new I(t),this.N=n,this.u=!1,this.s=i,this.F=r,this.I=a,this.h=this.m=!1,this.J="",this.o=null,this.A=function(){return wc(s)},this.C=function(e,t){switch((e=ic(t)).type){case"event":var n=e.targetName,i=Pi(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 ke(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,kc.add(this)}function mc(e,t,n){(Ec=n).addUpdateListener(e.A),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),wc(e),Tc(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function vc(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 ke(2,8,n,t))}function yc(e,t){var n=e.I();e.l=new k,e.u=!0,mc(e,n,t)}function bc(e){var t=Ec;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function wc(e){var t=!!Ec&&"connected"==Ec.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};xc(e)}e.h=t,e.J=t?Ec.receiver.friendlyName:"",e.j.qc()}function xc(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new ke(1,7,7e3))}}function Tc(t,n){n=nc(n);var i=Ec;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,function(){},J)}catch(e){throw n=new ke(2,8,8005,e),i=new he("error",(new Map).set("detail",n)),t.s("player",i),t.cc(),n}}(e=gc.prototype).destroy=function(){return kc.delete(this),xc(this),Ec&&bc(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()},e.Ka=function(){return this.h},e.ef=function(){return this.J},e.init=function(){var e;this.G.length&&(q.chrome&&chrome.cast&&chrome.cast.isAvailable?(this.m=!0,this.j.qc(),e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null),e=new chrome.cast.ApiConfig(e,function(e){for(var t=we(kc),n=t.next();!n.done;n=t.next())yc(n.value,e)},function(e){for(var t=we(kc),n=t.next();!n.done;n=t.next())n=n.value,Ac="available"==e,n.j.qc()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),Ac&&this.j.U(Sc),(e=Ec)&&e.status!=chrome.cast.SessionStatus.STOPPED?yc(this,e):Ec=null):q.__onGCastApiAvailable!==Cc&&(Ic=q.__onGCastApiAvailable||null,q.__onGCastApiAvailable=Cc))},e.mf=function(e){this.o=e,this.h&&Tc(this,{type:"appData",appData:this.o})},e.cast=function(t){var n=this;return Ie(function(e){if(!n.m)throw new ke(1,8,8e3);if(!Ac)throw new ke(1,8,8001);if(n.h)throw new ke(1,8,8002);return n.l=new k,chrome.cast.requestSession(function(e){return mc(n,t,e)},function(e){return vc(n,e)}),xe(e,n.l,0)})},e.cc=function(){if(this.h){if(xc(this),Ec){bc(this);try{Ec.stop(function(){},function(){})}catch(e){}Ec=null}wc(this)}},e.get=function(e,t){var n=this;if("video"==e){if(sc.includes(t))return function(){return n.hg.apply(n,[e,t].concat(le(D.apply(0,arguments))))}}else if("player"==e){if(cc[t]&&!this.get("player","isLive")())return function(){};if(fc.includes(t))return function(){return n.hg.apply(n,[e,t].concat(le(D.apply(0,arguments))))};if(pc.includes(t))return function(){return n.Nh.apply(n,[e,t].concat(le(D.apply(0,arguments))))};if(uc[t]||lc[t])return function(){return n.g[e][t]}}return this.g[e][t]},e.set=function(e,t,n){this.g[e][t]=n,Tc(this,{type:"set",targetName:e,property:t,value:n})},e.hg=function(e,t){Tc(this,{type:"call",targetName:e,methodName:t,args:D.apply(2,arguments)})},e.Nh=function(e,t){var n=D.apply(2,arguments),i=new k,r=this.H.toString();this.H++,this.i[r]=i;try{Tc(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var Sc=.02,Ac=!1,Ec=null,Ic=null,kc=new Set;function Cc(e){if(Ic?q.__onGCastApiAvailable=Ic:delete q.__onGCastApiAvailable,Ic=null,e)for(var t=we(kc),n=t.next();!n.done;n=t.next())n.value.init();"function"==typeof q.__onGCastApiAvailable&&q.__onGCastApiAvailable(e)}function Mc(e,t,n,i){i=void 0!==i&&i,h.call(this);var r=this,a=(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 gc(n,function(){return Lc(r)},function(){return Nc(r)},function(e,t){return _c(r,e,t)},function(){return Pc(r)},function(){return Rc(r)},i),this);a.g.init(),a.m=new Wi;for(var o,s,u=we(rc),l=u.next();!l.done;l=u.next())a.m.D(a.i,l.value,function(e){a.g.Ka()||(e=Pi(e),a.j.dispatchEvent(e))});for(o in _i)a.m.D(a.h,_i[o],function(e){a.g.Ka()||a.o.dispatchEvent(e)});for(s in a.l={},u={},a.i)u.wc=s,Object.defineProperty(a.l,u.wc,{configurable:!1,enumerable:!0,get:function(n){return function(){var i=a,e=n.wc;if("addEventListener"==e)return function(e,t,n){return i.j.addEventListener(e,t,n)};if("removeEventListener"==e)return function(e,t,n){return i.j.removeEventListener(e,t,n)};if(i.g.Ka()&&0==Object.keys(i.g.g.video).length){var t=i.i[e];if("function"!=typeof t)return t}return i.g.Ka()?i.g.get("video",e):e="function"==typeof(e=i.i[e])?e.bind(i.i):e}}(u),set:function(n){return function(e){var t=n.wc;a.g.Ka()?a.g.set("video",t,e):a.i[t]=e}}(u)}),u={wc:u.wc};a.s={},Dc(a,function(t){Object.defineProperty(a.s,t,{configurable:!1,enumerable:!0,get:function(){var i=a,e=t;if("addEventListener"==(e=i.u.has(e)?i.u.get(e):e))return function(e,t,n){return i.o.addEventListener(e,t,n)};if("removeEventListener"==e)return function(e,t,n){return i.o.removeEventListener(e,t,n)};if("getMediaElement"==e)return function(){return i.l};if("getSharedConfiguration"==e)return i.g.get("player","getConfiguration");if("getNetworkingEngine"==e)return function(){return i.h.Ob()};if("getDrmEngine"==e)return function(){return i.h.m};if("getAdManager"==e)return function(){return i.h.Of()};if("setVideoContainer"==e)return function(e){return i.h.rg(e)};if(i.g.Ka()){if("getManifest"==e||"drmInfo"==e)return function(){return X(e+"() does not work while casting!"),null};if("attach"==e||"detach"==e)return function(){return X(e+"() does not work while casting!"),Promise.resolve()}}return i.g.Ka()&&0==Object.keys(i.g.g.video).length&&(uc[e]||lc[e])||!i.g.Ka()?i.h[e].bind(i.h):i.g.get("player",e)}})});var c=a,d=new Map;Dc(c,function(e,t){d.has(t)?(t=d.get(t),e.length<t.length?c.u.set(e,t):c.u.set(t,e)):d.set(t,e)}),a.j=new h,a.j.zd=a.l,a.o=new h,a.o.zd=a.s}function Dc(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=we(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 Rc(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Ge(),startTime:null};e.i.pause();for(var n=we(oc),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=we(dc)).next();!i.done;i=n.next()){var i=(r=i.value)[1],r=e.h[r[0]]();t.player[i]=r}for(i=(n=we(hc)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function Lc(e){var t=new he("caststatuschanged");e.dispatchEvent(t)}function Nc(e){var t=new he(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function Pc(i){for(var e=we(dc),t=e.next();!t.done;t=e.next()){var t=(n=t.value)[1],n=i.g.get("player",n[0])();i.h[t](n)}var r,a=i.g.get("player","getAssetUri")(),o=(n=i.g.get("video","ended"),e=Promise.resolve(),i.i.autoplay),s=(t=null,n||(t=i.g.get("video","currentTime")),(n=i.g.get("player","getTextTracks")())&&n.length&&(r=n.find(function(e){return e.active})),i.g.get("player","isTextTrackVisible")()),u=(a&&(i.i.autoplay=!1,e=i.h.load(a,t)),{});for(n=(t=we(oc)).next();!n.done;n=t.next())n=n.value,u[n]=i.g.get("video",n);e.then(function(){if(i.i){for(var e=we(oc),t=e.next();!t.done;t=e.next())t=t.value,i.i[t]=u[t];for(t=(e=we(hc)).next();!t.done;t=e.next()){var t=(n=t.value)[1],n=i.g.get("player",n[0])();i.h[t](n)}i.h.og(s),r&&i.h.kf(r.language,r.roles,r.forced),i.i.autoplay=o,a&&i.i.play()}},function(e){e=new he("error",e=(new Map).set("detail",e)),i.h.dispatchEvent(e)})}function _c(e,t,n){e.g.Ka()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function jc(e,t,n,i){h.call(this);var r=this,u=(this.g=e,this.h=t,this.j=new Wi,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 I(function(){Fc(r)}),this),a=cast.receiver.CastReceiverManager.getInstance();a.onSenderConnected=function(){return Oc(u)},a.onSenderDisconnected=function(){return Oc(u)},a.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Kc(u,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},u.l),Kc(u,{type:"event",targetName:"video",event:{type:"volumechange"}},u.l)},u.s=a.getCastMessageBus("urn:x-cast:com.google.cast.media"),u.s.onMessage=function(e){var n=u,t=e,i=ic(t.data);switch(i.type){case"PLAY":n.g.play(),qc(n);break;case"PAUSE":n.g.pause(),qc(n);break;case"SEEK":t=i.currentTime;var r=i.resumeState;null!=t&&(n.g.currentTime=Number(t)),r&&"PLAYBACK_START"==r?(n.g.play(),qc(n)):r&&"PLAYBACK_PAUSE"==r&&(n.g.pause(),qc(n));break;case"STOP":n.h.rc().then(function(){n.h&&qc(n)});break;case"GET_STATUS":Hc(n,Number(i.requestId));break;case"VOLUME":r=i.volume,t=r.level,r=r.muted;var a=n.g.volume,o=n.g.muted;null!=t&&(n.g.volume=Number(t)),null!=r&&(n.g.muted=r),a==n.g.volume&&o==n.g.muted||qc(n);break;case"LOAD":n.m=0,n.A=!1,n.u=!1,t=i.media,r=i.currentTime,a=n.I(t.contentId),o=i.autoplay||!0,n.C(t.customData),o&&(n.g.autoplay=!0),n.h.load(a,r).then(function(){n.h&&Hc(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),Kc(n,{requestId:Number(i.requestId),type:t},n.s)});break;default:Kc(n,{requestId:Number(i.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},n.s)}},u.l=a.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),u.l.onMessage=function(e){var t=u,n=e,i=ic(n.data);switch(i.type){case"init":t.m=0,t.A=!1,t.u=!0,!function(t,n,i){var r,a,o,s,u,l,c,d;Ie(function(e){switch(e.g){case 1:for(r in n.player)a=n.player[r],t.h[r](a);return t.C(i),o=t.g.autoplay,n.manifest?(t.g.autoplay=!1,Se(e,5),xe(e,t.h.load(n.manifest,n.startTime),7)):xe(e,Promise.resolve(),3);case 7:Ae(e,3);break;case 5:return s=Ee(e),s=(new Map).set("detail",s),s=new he("error",s),t.h&&t.h.dispatchEvent(s),e.return();case 3:if(!t.h)return e.return();for(u in n.video)l=n.video[u],t.g[u]=l;for(c in n.playerAfterLoad)d=n.playerAfterLoad[c],t.h[c](d);t.g.autoplay=o,n.manifest&&(t.g.play(),qc(t)),Te(e)}})}(t,i.initState,i.appData),Fc(t);break;case"appData":t.C(i.appData);break;case"set":var r=i.targetName,a=i.property;if(i=i.value,"video"==r){if(n=cast.receiver.CastReceiverManager.getInstance(),"volume"==a){n.setSystemVolumeLevel(i);break}if("muted"==a){n.setSystemVolumeMuted(i);break}}t.H[r][a]=i;break;case"call":(r=t.H[i.targetName])[i.methodName].apply(r,i.args);break;case"asyncCall":r=i.targetName,a=i.methodName,"player"==r&&"load"==a&&(t.m=0,t.A=!1);var o=i.id,s=n.senderId;n=t.H[r],i=n[a].apply(n,i.args),(i="player"==r&&"load"==a?i.then(function(){t.u=!0}):i).then(function(){return Gc(t,s,o,null)},function(e){return Gc(t,s,o,e)})}},a.start();for(var o,s=(a=we(rc)).next();!s.done;s=a.next())u.j.D(u.g,s.value,function(e){return Bc(u,"video",e)});for(o in _i)u.j.D(u.h,_i[o],function(e){return Bc(u,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?u.h.pf(3840,2160):u.h.pf(1920,1080),u.j.D(u.g,"loadeddata",function(){u.A=!0}),u.j.D(u.h,"loading",function(){u.o=!1,Uc(u)}),u.j.D(u.g,"playing",function(){u.o=!1,Uc(u)}),u.j.D(u.g,"pause",function(){Uc(u)}),u.j.D(u.h,"unloading",function(){u.o=!0,Uc(u)}),u.j.D(u.g,"ended",function(){new I(function(){u.g&&u.g.ended&&(u.o=!0,Uc(u))}).U(zc)})}function Oc(e){e.m=0,e.u=!0,e.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Uc(e)}function Uc(t){var n;Ie(function(e){return 1==e.g?xe(e,Promise.resolve(),2):t.h?(n=new he("caststatuschanged"),t.dispatchEvent(n),Vc(t)||qc(t),void Te(e)):e.return()})}function Bc(e,t,n){e.h&&(Fc(e),Kc(e,{type:"event",targetName:t,event:n},e.l))}function Fc(e){e.G.U(Xc);for(var t,n,i={video:{},player:{}},r=we(ac),a=r.next();!a.done;a=r.next())a=a.value,i.video[a]=e.g[a];if(e.h.R())for(var o in cc)0==e.m%cc[o]&&(i.player[o]=e.h[o]());for(t in uc)0==e.m%uc[t]&&(i.player[t]=e.h[t]());for(n in(r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(i.video.volume=r.level,i.video.muted=r.muted),Kc(e,{type:"update",update:i},e.l),lc)0==e.m%lc[n]&&(i={player:{}},i.player[n]=e.h[n](),Kc(e,{type:"update",update:i},e.l));e.A&&(e.m+=1),Vc(e)}function Vc(e){return e.u&&(e.g.duration||e.h.R())&&(Hc(e),e.u=!1,1)}function Hc(e,t){var n={contentId:e.h.Ge(),streamType:e.h.R()?"LIVE":"BUFFERED",contentType:""};e.h.R()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),qc(e,void 0===t?0:t,n)}function Gc(e,t,n,i){e.h&&Kc(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function Kc(e,t,n,i){e.F&&(e=nc(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function qc(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?Wc:e.h.Ke()?$c:e.g.paused?Jc:Yc,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),Kc(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}m(Mc,h),(e=Mc.prototype).destroy=function(e){return e&&this.g.cc(),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,h.prototype.release.call(this),Promise.all(e)},e.nh=function(){return this.l},e.bh=function(){return this.s},e.Fg=function(){return this.g.m&&Ac},e.Ka=function(){return this.g.Ka()},e.ef=function(){return this.g.ef()},e.cast=function(){var t,n=this;return Ie(function(e){return 1==e.g?(t=Rc(n),xe(e,n.g.cast(t),2)):n.h?xe(e,n.h.rc(),0):e.return()})},e.mf=function(e){this.g.mf(e)},e.ai=function(){var t,n;(t=this.g).h&&(n=t.I(),chrome.cast.requestSession(function(e){return mc(t,n,e)},function(e){return vc(t,e)}))},e.cc=function(){this.g.cc()},e.Gg=function(t,n){n=void 0!==n&&n;var i=this;return Ie(function(e){if(1==e.g)return t==i.C&&n==i.A?e.return():(i.C=t,i.A=n,i.g.cc(),xe(e,i.g.destroy(),2));i.g=null,i.g=new gc(t,function(){return Lc(i)},function(){return Nc(i)},function(e,t){return _c(i,e,t)},function(){return Pc(i)},function(){return Rc(i)},n),i.g.init(),Te(e)})},t("shaka.cast.CastProxy",Mc),Mc.prototype.changeReceiverId=Mc.prototype.Gg,Mc.prototype.forceDisconnect=Mc.prototype.cc,Mc.prototype.suggestDisconnect=Mc.prototype.ai,Mc.prototype.setAppData=Mc.prototype.mf,Mc.prototype.receiverName=Mc.prototype.ef,Mc.prototype.isCasting=Mc.prototype.Ka,Mc.prototype.canCast=Mc.prototype.Fg,Mc.prototype.getPlayer=Mc.prototype.bh,Mc.prototype.getVideo=Mc.prototype.nh,m(jc,h),(e=jc.prototype).isConnected=function(){return this.F},e.th=function(){return this.o},e.Zh=function(e){this.i=e},e.Jg=function(){this.i=null},e.$h=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},e.Yh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},e.Xh=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},e.destroy=function(){var t,n=this;return Ie(function(e){if(1==e.g)return n.j&&(n.j.release(),n.j=null),t=[],n.h&&(t.push(n.h.destroy()),n.h=null),n.G&&(n.G.stop(),n.G=null),n.g=null,n.H=null,n.C=null,n.F=!1,n.o=!0,n.l=null,n.s=null,h.prototype.release.call(n),xe(e,Promise.all(t),2);cast.receiver.CastReceiverManager.getInstance().stop(),Te(e)})},t("shaka.cast.CastReceiver",jc),jc.prototype.setContentArtist=jc.prototype.Xh,jc.prototype.setContentImage=jc.prototype.Yh,jc.prototype.setContentTitle=jc.prototype.$h,jc.prototype.clearContentMetadata=jc.prototype.Jg,jc.prototype.setContentMetadata=jc.prototype.Zh,jc.prototype.isIdle=jc.prototype.th;var Xc=.5,zc=5,Wc="IDLE",Yc="PLAYING",$c="BUFFERING",Jc="PAUSED";function Qc(e,t,n,i,r){if(r<=i)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=Zc(i,r,s,u,l,c);a<=o;a++){for(var h,f,p,g,m=n[a],v=-1,y=-1,b=0;b<m.length;b++)if(null!=m[b]&&""!==m[b].g.trim()){v=b;break}for(b=m.length-1;0<=b;b--)if(null!=m[b]&&""!==m[b].g.trim()){y=b;break}if(-1===v||-1===y)m=ed(i,r),e.nestedCues.push(m);else{for(;v<=y;v++)(b=m[v])?(h=b.l,f=b.i,p=b.j,g=b.h,h==s&&f==u&&p==l&&g==c||(d.payload&&e.nestedCues.push(d),d=Zc(i,r,h,f,p,g),s=h,u=f,l=p,c=g),d.payload+=b.g):d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=ed(i,r),e.nestedCues.push(d)),d=Zc(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Zc(e,t,n,i,r,a){return e=new T(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function ed(e,t){return(e=new T(e,t,"")).lineBreak=!0,e}function td(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function nd(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",rd(this)}function id(e,t,n){var i="CC"+(1+(e.u<<1|e.s)),r=new T(t,n,""),a=(r.lineInterpretation=1,md.get(e.g));return a&&(r.line=a),Qc(r,i,e.i,t,n)}function rd(e){sd(e,0,15),e.g=1}function ad(e,t,n){if(!(n<32||127<n)){var i="";switch(t){case ud:i=hd.has(n)?hd.get(n):String.fromCharCode(n);break;case ld:i=fd.get(n);break;case cd:e.i[e.g].pop(),i=pd.get(n);break;case dd:e.i[e.g].pop(),i=gd.get(n)}i&&e.i[e.g].push(new td(i,e.m,e.j,e.o,e.l))}}function od(e,t,n,i){if(!(n<0||t<0))if(n<=t)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 sd(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var ud=0,ld=1,cd=2,dd=3,hd=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),fd=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57,"⠀"],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),pd=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),gd=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),md=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function vd(e,t){this.h=xd,this.o=new nd(e,t),this.i=new nd(e,t),this.g=this.j=new nd(e,t),this.l=0,this.m=null}function yd(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==Sd&&e.h!==Ad&&(r=id(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,sd(n,0,15),(n=e.j).g=0<n.h?n.h:0,sd(n,0,15),i.g=15),e.h=Sd,i.h=t,r}function bd(e){e.h=Td,e.g=e.j,e.g.h=0}function wd(e){$("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=Ad}var xd=0,Td=1,Sd=3,Ad=4,Ed="black green blue cyan red yellow magenta black".split(" "),Id="white green blue cyan red yellow magenta white_italics".split(" ");function kd(e,t){this.I=t,this.N=e,this.J=this.l=!1,this.m=this.o=this.G=this.K=this.H=0,this.F=_d,this.i=[],this.g=this.h=this.j=0,this.C=this.u=!1,this.A="white",this.s="black",Cd(this)}function Cd(e){e.i=[];for(var t=0;t<16;t++)e.i.push(Md())}function Md(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function Dd(e,t){Rd(e)&&(e.i[e.h][e.g]=new td(t,e.C,e.u,e.s,e.A),e.g++)}function Rd(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function Ld(e,t,n){var i=new T(e.j,t,""),r=(i.textAlign=e.F===Nd?"left":e.F===Pd?"right":Ge,i.region);switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.N,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.K,r.viewportAnchorUnits=e.J?rt:2,e.G){case jd:r.regionAnchorX=0,r.regionAnchorY=0;break;case Od:r.regionAnchorX=50,r.regionAnchorY=0;break;case Ud:r.regionAnchorX=100,r.regionAnchorY=0;break;case Bd:r.regionAnchorX=0,r.regionAnchorY=50;break;case Fd:r.regionAnchorX=50,r.regionAnchorY=50;break;case Vd:r.regionAnchorX=100,r.regionAnchorY=50;break;case Hd:r.regionAnchorX=0,r.regionAnchorY=100;break;case Gd:r.regionAnchorX=50,r.regionAnchorY=100;break;case Kd:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Qc(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}kd.prototype.isVisible=function(){return this.l};var Nd=0,Pd=1,_d=2,jd=0,Od=1,Ud=2,Bd=3,Fd=4,Vd=5,Hd=6,Gd=7,Kd=8;function qd(){this.i=[],this.h=null,this.g=0}function Xd(e){this.g=0,this.h=e}function zd(e){if(e.ia())return e.h[e.g++];throw new ke(2,2,3e3)}function Wd(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function Yd(e,t){for(var n=[],i=0;i<8;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function $d(e,t,n){for(var i=null,r=(t=we(Yd(e,t))).next();!r.done;r=t.next()){var r=r.value,a=e.h[r];a.isVisible()&&(i=Ld(a,n,e.i)),e.h[r]=null}return i}function Jd(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Qd(e,t,n){var i={0:0,1:0,2:1,3:1};return eh[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}Xd.prototype.ia=function(){return this.g<this.h.length},Xd.prototype.qa=function(){return this.g},Xd.prototype.skip=function(e){if(this.g+e>this.h.length)throw new ke(2,2,3e3);this.g+=e};var Zd=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),eh="black blue green cyan red magenta yellow white".split(" ");function th(){this.h=[],this.g=[],this.i=new qd,this.l=0,this.m=new Map([["CC1",new vd(0,0)],["CC2",new vd(0,1)],["CC3",new vd(1,0)],["CC4",new vd(1,1)]]),this.s=this.o=0,this.j=new Map,this.A=!0,this.u=new Set,nh(this)}function nh(e){e.o=0,e.s=0;for(var t=we(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=xd,n.g=n.j,n.m=null,rd(n.i),rd(n.j),rd(n.o);e.A=!0}function ih(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function rh(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(le(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;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 ah(){this.j=new Map,this.i=this.h=0,this.g=oh}th.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,nh(this);for(var t=(e=we(this.j.values())).next();!t.done;t=e.next())Jd(t.value)},th.prototype.extract=function(e,t){if(this.A){for(var n=we(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.A=!1}if(!((e=new ur(e,0)).getLength()<8)&&181===e.ga()&&49===e.Ea()&&1195456820===e.L()&&3===e.ga()&&0!=(64&(n=e.ga())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.ga(),a=(4&r)>>2,o=e.ga(),s=e.ga();a&&(0==(r&=3)||1==r?this.h.push({pts:t,type:r,Sa:o,nb: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})))}},th.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n,i,r=we(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;{var i;16==(112&t.Sa)&&(i=t.Sa>>3&1,0===n?e.o=i:e.s=i)}if(i="CC"+(1+(n<<1|(n?e.s:e.o))),n=e.m.get(i),255===t.Sa&&255===t.nb||!t.Sa&&!t.nb||!ih(t.Sa)||!ih(t.nb))return 45<=++e.l&&nh(e),null;if(e.l=0,t.Sa&=127,t.nb&=127,!t.Sa&&!t.nb)return null;if(e.u.add(i),e=null,16==(112&t.Sa))e:{if(i=t.Sa,e=t.nb,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,a=!(i="white");r<7?i=Id[r]:7===r&&(a=!0),e=1==(1&e),n.h!==Ad&&(r=n.g,n.h===Sd&&t!==r.g&&(n=1+t-r.h,od(r,n,1+r.g-r.h,r.h),sd(r,0,n-1),sd(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",ad(n.g,ud,32),i=!1,"white_italics"===(t=Id[(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=Ed[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))ad(n.g,ld,e);else if(18==(246&i)&&32==(224&e))ad(n.g,1&i?dd:cd,e);else if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.nb){case 32:bd(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=yd(n,2,e);break;case 38:i=yd(n,3,e);break;case 39:i=yd(n,4,e);break;case 40:ad(n.g,ud,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:rd(n.o),wd(n);break;case 43:wd(n);break;case 44:t=n.i,i=null,n.h!==Ad&&(i=id(t,n.l,e)),sd(t,0,15);break;case 45:t=n.g,n.h!==Sd?i=null:(i=id(t,n.l,e),a=t.g-t.h+1,od(t,a-1,a,t.h),sd(t,0,a-1),sd(t,t.g,15-t.g),n.l=e);break;case 46:sd(n.j,0,15);break;case 47:t=null,n.h!==Ad&&(t=id(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,bd(n),n.l=e,i=t}e=i;break e}e=null}else i=t.nb,ad(n.g,ud,t.Sa),ad(n.g,ud,i);return e}(this,a.value))&&t.push(a);for(r=we(this.g),a=r.next();!a.done;a=r.next())n=this.i,3===(i=a.value).type?(n.g=2*(63&i.value)-1,n.h=[]):n.h&&(0<n.g&&(n.h.push(i),n.g--),0===n.g&&(n.i.push(new Xd(n.h)),n.h=null,n.g=0));for(a=(r=we(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.ia();){var i=zd(t).value,r=(224&i)>>5,a=31&i;if(0!=(r=7===r&&0!=a?63&zd(t).value:r)){e.u.add("svc"+r),e.j.has(r)||e.j.set(r,new Wd(r));for(var o=e.j.get(r),s=t.qa();t.qa()-s<a;){var u,l,c=zd(r=t),d=c.value,h=c.pts;if(16===d&&(u=zd(r),d=d<<16|u.value),0<=d&&d<=31){var f=h;if(o.g){var p=o.g;switch(r=null,d){case 8:!Rd(p)||p.g<=0&&p.h<=0||(p.g<=0?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:if(p.isVisible()&&(r=Ld(p,f,o.i)),p.h+1>=p.o){f=p;for(var g=0,m=1;m<16;m++,g++)f.i[g]=f.i[m];for(m=0;m<1;m++,g++)f.i[g]=Md()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(r=Ld(p,f,o.i)),p.i[p.h]=Md(),p.g=0;break;case 12:p.isVisible()&&(r=Ld(p,f,o.i)),Cd(p),(f=p).h=0,f.g=0}var v=r}else v=null}else v=128<=d&&d<=159?function(e,t,n,i){if(128<=n&&n<=135)e.h[i=7&n]&&(e.g=e.h[i]);else{if(136===n){n=zd(t).value,t=null;for(var r=(n=we(Yd(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Ld(r,i,e.i)),Cd(r);return t}if(137===n)for(n=(t=we(Yd(e,t=zd(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=zd(t).value,t=null,r=(n=we(Yd(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Ld(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=zd(t).value,t=null,r=(n=we(Yd(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=Ld(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return $d(e,t=zd(t).value,i);if(143===n)return i=$d(e,255,i),Jd(e),i;var a,o,s,u;144===n?(t.skip(1),i=zd(t).value,e.g&&(e.g.u=0<(128&i),e.g.C=0<(64&i))):145===n?(i=zd(t).value,n=zd(t).value,t.skip(1),e.g&&(t=Qd((48&n)>>4,(12&n)>>2,3&n),e.g.A=Qd((48&i)>>4,(12&i)>>2,3&i),e.g.s=t)):146===n?(i=zd(t).value,t=zd(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t)):151===n?(t.skip(1),t.skip(1),i=zd(t).value,t.skip(1),e.g&&(e.g.F=3&i)):152<=n&&n<=159&&((r=null!==e.h[n=(15&n)-8])||((a=new kd(n,e.i)).j=i,e.h[n]=a),i=zd(t).value,a=zd(t).value,o=zd(t).value,s=zd(t).value,u=zd(t).value,t=zd(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.u=!1,t.A="white",t.s="black"),(t=e.h[n]).l=0<(32&i),t.K=127&a,t.H=o,t.G=(240&s)>>4,t.J=0<(128&a),t.o=1+(15&s),t.m=1+(63&u),e.g=e.h[n])}}return null}(o,r,d,h):(4096<=d&&d<=4127?8<=(f=255&d)&&f<=15?r.skip(1):16<=f&&f<=23?r.skip(2):24<=f&&f<=31&&r.skip(3):4224<=d&&d<=4255?128<=(f=255&d)&&f<=135?r.skip(4):136<=f&&f<=143&&r.skip(5):32<=d&&d<=127?(r=d,o.g&&Dd(o.g,127===r?"♪":String.fromCharCode(r))):160<=d&&d<=255?o.g&&Dd(o.g,String.fromCharCode(d)):4128<=d&&d<=4223?(r=255&d,o.g&&(Zd.has(r)?(l=Zd.get(r),Dd(o.g,l)):Dd(o.g,"_"))):4256<=d&&d<=4351&&o.g&&Dd(o.g,160!=(255&d)?"_":"[CC]"),null);(r=v)&&n.push(r)}}}}catch(e){if(!(e instanceof ke&&3e3===e.code))throw e;$("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}(this,a.value),t.push.apply(t,le(a));return this.i.i=[],this.h=[],this.g=[],t},th.prototype.getStreams=function(){return Array.from(this.u)},t("shaka.cea.CeaDecoder",th),_e=function(){return new th},ah.prototype.init=function(e){function t(e){(e=e.name)in lh&&(n.g=lh[e])}var n=this,i=[],r=[];if((new dr).box("moov",P).box("mvex",P).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",P).O("tkhd",function(e){e=Ha(e.reader,e.version),i.push(e.trackId)}).box("mdia",P).O("mdhd",function(e){e=Fa(e.reader,e.version),r.push(e.timescale)}).box("minf",P).box("stbl",P).O("stsd",hr).box("avc1",t).box("avc3",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("encv",fr).box("sinf",P).box("frma",function(e){(e=Ka(e.reader).ha)in lh&&(n.g=lh[e])}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new ke(2,2,2010);this.g==oh&&X("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},ah.prototype.parse=function(e){var g=this;if(this.g==oh)return[];var m=[],v=this.h,y=this.i,b=0,w=[],x=null,T=9e4;return(new dr).box("moof",function(e){b=e.start,w=[],P(e)}).box("traf",P).O("trun",function(e){e=Va(e.reader,e.version,e.flags),w.push(e)}).O("tfhd",function(e){e=Ua(e.reader,e.flags),v=e.Kf||g.h,y=e.Mg||g.i,e=e.trackId,g.j.has(e)&&(T=g.j.get(e))}).O("tfdt",function(e){x=Ba(e.reader,e.version).baseMediaDecodeTime}).box("mdat",function(e){if(null===x)throw X("Unable to find base media decode time for CEA captions!"),new ke(2,2,2010);var t=g,n=e.reader,i=x,r=T,a=v,o=y,s=b-e.start-8,u=w,l=m,c=0,d=o,h=u.map(function(e){return e.ig});for((h=[].concat.apply([],le(h))).length&&(d=h[0].sampleSize||o),n.skip(s+u[0].Lg);n.ia();){s=n.L();var f=n.ga(),p=null;switch(p=!1,u=1,t.g){case sh:p=6==(p=31&f);break;case uh:u=2,n.skip(1),p=39==(p=f>>1&63)||40==p;break;default:return}if(p)for(f=0,c<h.length&&(f=h[c].Wd||0),f=(i+f)/r,u=we(rh(n.ub(s-u))),p=u.next();!p.done;p=u.next())l.push({packet:p.value,pts:f});else try{n.skip(s-u)}catch(e){break}0==(d-=s+4)&&(i=c<h.length?i+(h[c].hf||a):i+a,d=++c<h.length&&h[c].sampleSize||o)}}).parse(e,!1),m},t("shaka.cea.Mp4CeaParser",ah);var oh=0,sh=1,uh=2,lh={avc1:sh,avc3:sh,hev1:uh,hvc1:uh,dvh1:uh,dvhe:uh};function ch(){}function dh(e,t,n){var i=function(e){for(var t=[],n=(e=we(e)).next();!n.done;n=e.next())(n=function(e){var t=e.getAttribute("schemeIdUri"),n=Lr(e,"urn:mpeg:cenc:2013","default_KID"),i=Rr(e,"urn:mpeg:cenc:2013","pssh").map(Pr);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new ke(2,4,4009);var r=[];try{r=i.map(function(e){return{initDataType:"cenc",initData:Sr(e),keyId:null}})}catch(e){throw new ke(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<r.length?r:null}}(n.value))&&t.push(n);return t}(e),r=null,a=(e=[],[]),o=null,s=new Set(i.map(function(e){return e.keyId}));if(s.delete(null),1<s.size)throw new ke(2,4,4010);if(!t){if(1<(a=i.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.cd})).length)throw new ke(2,4,4050);a.length&&(o=function(e){if(!q.crypto||!q.crypto.subtle)throw X("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new ke(2,4,4042);var t=Dr(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new ke(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=t.getAttribute("schemeIdUri"))throw new ke(2,4,4051);if(!(t=Dr(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod")))throw new ke(2,4,4051);if(e=t.getAttribute("IV"),t=t.getAttribute("keyUriTemplate"),!e||!t)throw new ke(2,4,4051);if(16!=(e=Ar(e.substr(2))).byteLength)throw new ke(2,4,4048);return{zh:t,iv:e}}(a[0])),(a=i.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.cd?(r=e.init||r,!1):"urn:mpeg:dash:sea:2012"!=e.cd})).length&&(0==(e=function(e,t,n,i){for(var r,a=[],o=(t=we(t)).next();!o.done;o=t.next()){o=o.value;var s,u,l=n[o.cd];l&&(r=(r=Dr(o.node,"urn:microsoft:playready","pro"))?(r=Sr(r.textContent),s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),[{initData:Cr(r,s,new Set,0),initDataType:"cenc",keyId:o.keyId}]):null,s=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.cd&&(s=0==(s=i).size?null:(u=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),[{initData:Cr(new Uint8Array([]),u,s,1),initDataType:"cenc",keyId:o.keyId}])),r=Nt(l,o.init||e||r||s),(l=ph.get(l))&&(r.licenseServerUri=l(o)),a.push(r))}return a}(r,a,n,s)).length&&(e=[Nt("",r)]))}if(i.length&&!o&&(t||!a.length))for(e=[],n=(t=we(Object.values(n))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(Nt(n,r));if(s=Array.from(s)[0]||null)for(n=(t=we(e)).next();!n.done;n=t.next())for(i=(n=we(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=s;return{Jf:s,aj:r,drmInfos:e,ke:o,Nf:!0}}function hh(e){var t=Dr(e.node,"https://dashif.org/CPS","Laurl");if(t&&t.textContent)return t.textContent;if(!(e=Dr(e.node,"urn:microsoft:playready","pro")))return"";if(!(e=function(e){var t,n=0,i=De(e);if(i.getUint32(0,!0)!=e.byteLength)return[];e:{for(e=6,n=[];e<i.byteLength-1;){t=i.getUint16(e,!0),e+=2;var r=i.getUint16(e,!0);if(e+=2,0!=(1&r)||r+e>i.byteLength){i=[];break e}var a=ne(i,e,r);n.push({type:t,value:a}),e+=r}i=n}return i}(e=Sr(e.textContent)).filter(function(e){return e.type===fh})[0]))return"";if(e=qr(e=ir(e.value,!0),"WRMHEADER")){for(var n=e,i=(n=we(n.getElementsByTagName("DATA"))).next();!i.done;i=n.next())for(var r=(i=we(i.value.childNodes)).next();!r.done;r=i.next())if((r=r.value)instanceof Element&&"LA_URL"==r.tagName)return r.textContent;return""}return""}Pe["video/mp4"]=function(){return new ah},ch.prototype.init=function(){},ch.prototype.parse=function(e){var t=[];if(!eo(e=ne(e)))return t;var n=(e=(new Qa).parse(e)).Pc(),i=e.Fd();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=we(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=we(rh(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},t("shaka.cea.TsCeaParser",ch),Pe["video/mp2t"]=function(){return new ch};var fh=1,ph=(new Map).set("com.widevine.alpha",function(e){var t=Dr(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=Dr(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""}).set("com.microsoft.playready",hh).set("com.microsoft.playready.recommendation",hh).set("com.microsoft.playready.software",hh).set("com.microsoft.playready.hardware",hh).set("org.w3.clearkey",function(e){var t=Dr(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=Dr(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.getAttribute("Lic_type")&&e.textContent?e.textContent:""});function gh(e,t,n,i,r,a){var o={RepresentationID:t,Number:n,SubNumber:i,Bandwidth:r,Time:a};return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(e,t,n,i){if("$$"==e)return"$";var r=o[t];if(null==r)return e;switch("RepresentationID"==t&&n&&(n=void 0),"Time"==t&&"bigint"!=typeof r&&(.2<=Math.abs(r-Math.round(r))&&X("Calculated $Time$ values must be close to integers"),r=Math.round(r)),i){case void 0:case"d":case"i":case"u":e=r.toString();break;case"o":e=r.toString(8);break;case"x":e=r.toString(16);break;case"X":e=r.toString(16).toUpperCase();break;default:e=r.toString()}return n=q.parseInt(n,10)||1,Array(Math.max(0,n-e.length)+1).join("0")+e})}function mh(e,t){var n=1,i=((r=yh(e,t,"timescale"))&&(n=Fr(r)||1),yh(e,t,"duration")),r=Fr(i||""),a=((r="image"==e.M.contentType?Hr(i||""):r)&&(r/=n),yh(e,t,"startNumber")),i=Number(yh(e,t,"presentationTimeOffset"))||0,o=Vr(a||""),s=(null!=a&&null!=o||(o=1),bh(e,t,"SegmentTimeline"));if(t=null,s){t=n,e=e.ba.duration||1/0;for(var a=o,s=z(s,"S"),u=[],l=-i,c=0;c<s.length;++c){var d=s[c],h=s[c+1],f=W(d,"t",Vr),p=W(d,"d",Vr),g=W(d,"r",Br),d=W(d,"k",Br)||0;if(null!=f&&(f-=i),!p)break;if(f=null!=f?f:l,(g=g||0)<0)if(h){if(null==(h=W(h,"t",Vr)))break;if(h<=f)break;g=Math.ceil((h-f)/p)-1}else{if(1/0==e)break;if(e<=f/t)break;g=Math.ceil((e*t-f)/p)-1}for(0<u.length&&f!=l&&(u[u.length-1].end=f/t),h=0;h<=g;++h)u.push({start:f/t,end:(l=f+p)/t,zf:f,fb:d,Vh:u.length+a}),f=l}t=u}return{timescale:n,ya:r,gd:o,vb:i/n||0,yf:i,timeline:t}}function vh(e,t){return[t(e.M),t(e.oa),t(e.ta)].filter(tn)}function yh(e,t,n){t=vh(e,t),e=null;for(var i=(t=we(t)).next();!i.done&&!(e=i.value.getAttribute(n));i=t.next());return e}function bh(e,t,n){t=vh(e,t),e=null;for(var i=(t=we(t)).next();!i.done&&!(e=Mr(i.value,n));i=t.next());return e}function wh(e,t,n,i,r,a){if(a=void 0===a?0:a,Lr(e,"http://www.w3.org/1999/xlink","href"))return o=function(n,i,r,e,a,o){for(var s=Lr(n,"http://www.w3.org/1999/xlink","href"),t=Lr(n,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=we(Array.from(n.attributes)),l=u.next();!l.done;l=u.next())"http://www.w3.org/1999/xlink"==(l=l.value).namespaceURI&&n.removeAttributeNS(l.namespaceURI,l.localName);if(5<=o)return Mi(new ke(2,4,4028));if("onLoad"!=t)return Mi(new ke(2,4,4027));var c=Lt([e],[s]);return a.request(0,Fi(c,i)).pa(function(e){if(!(e=Xr(e.data,n.tagName)))return Mi(new ke(2,4,4001,s));for(;n.childNodes.length;)n.removeChild(n.childNodes[0]);for(;e.childNodes.length;){var t=e.childNodes[0];e.removeChild(t),n.appendChild(t)}for(t=(e=we(Array.from(e.attributes))).next();!t.done;t=e.next())n.setAttributeNode(t.value.cloneNode(!1));return wh(n,i,r,c[0],a,o+1)})}(e,t,n,i,r,a),n?o.pa(void 0,function(){return wh(e,t,n,i,r,a)}):o;for(var o=[],s=we(Array.from(e.childNodes)),u=s.next();!u.done;u=s.next())(u=u.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Lr(u,"http://www.w3.org/1999/xlink","href")?e.removeChild(u):"SegmentTimeline"!=u.tagName&&o.push(wh(u,t,n,i,r,a)));return Ni(o).pa(function(){return e})}function xh(e,t,n,i,r,a,o){var s,u=(new dr).O("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[],u=(o.reader.skip(4),o.reader.L());if(0==u)throw new ke(2,3,3005);{var l,c;c=0==o.version?(l=o.reader.L(),o.reader.L()):(l=o.reader.oc(),o.reader.oc())}o.reader.skip(2);var d=o.reader.Ea();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.L(),f=(2147483648&h)>>>31,p=(h&=2147483647,o.reader.L());if(o.reader.skip(4),1==f)throw new ke(2,3,3006);s.push(new N(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 ke(2,3,3004)}function Th(e){this.h=De(e),this.g=new ur(this.h,0)}function Sh(e){var t=Ah(e);if(7<t.length)throw new ke(2,3,3002);for(var n=0,i=(t=we(t)).next();!i.done;i=t.next())n=256*n+i.value;t=Ah(e);e:{for(var r=(i=we(Eh)).next();!r.done;r=i.next())if(me(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.qa();else{if(8==t.length&&224&t[1])throw new ke(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.qa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.qa(),i=De(e.h,e.g.qa(),t),e.g.skip(t),new Ih(n,i)}function Ah(e){var t=e.g.qa(),n=e.g.ga();if(0==n)throw new ke(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),ne(e.h,t,n)}Th.prototype.ia=function(){return this.g.ia()};var Eh=[[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 Ih(e,t){this.id=e,this.g=t}function kh(e){if(8<e.g.byteLength)throw new ke(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new ke(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function Ch(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new Th(e.g);for(var d=null,h=null;e.ia();){var f,p=Sh(e);187!=p.id||(f=function(e){var t=new Th(e.g);if(179!=(e=Sh(t)).id)throw new ke(2,3,3013);if(e=kh(e),183!=(t=Sh(t)).id)throw new ke(2,3,3012);t=new Th(t.g);for(var n=0;t.ia();){var i=Sh(t);if(241==i.id){n=kh(i);break}}return{di:e,Lh:n}}(p))&&(p=n*f.di,f=t+f.Lh,null!=d&&c.push(new N(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}return null!=d&&c.push(new N(d+o,i+o,l,h,null,a,o,s,u)),c}function Mh(e,t,n){if(!(t=bh(e,t,"Initialization")))return null;var i=e.M.cb(),r=t.getAttribute("sourceURL"),a=(r&&(i=Lt(i,[r])),r=0,null);return(t=W(t,"range",Ur))&&(r=t.start,a=t.end),new Aa(function(){return i},r,a,_h(e),null,null,n)}function Dh(e,n,t){var i=Number(yh(e,Lh,"presentationTimeOffset"))||0,r=yh(e,Lh,"timescale"),a=1,o=i/(a=r?Fr(r)||1:a)||0,s=Mh(e,Lh,t),i=e;if(Ph(i,s),!Nh(i))throw new ke(2,4,4002);var u=pn(e);return{dc:function(){var e=bh(u,Lh,"RepresentationIndex"),t=u.M.cb();return(e=e&&e.getAttribute("sourceURL"))&&(t=Lt(t,[e])),e=Nh(u),Rh(u,n,s,t,e.start,e.end,o)}}}function Rh(o,s,u,l,c,d,h){var f,p,g,m,v,y,b,w,x,T,S,A;return Ie(function(e){if(1==e.g)return f=o.presentationTimeline,p=!o.zb||!o.ba.Le,g=o.ba.start,m=o.ba.duration,v=o.M.mimeType.split("/")[1],y=null,w=[(b=s)(l,c,d,!1),"webm"==v?b(u.Z(),u.Qa,u.wa,!0):null],b=null,xe(e,Promise.all(w),2);if(b=e.h,w=b[0],x=b[1]||null,T=g-h,S=g,A=m?g+m:1/0,"mp4"==v)var t=xh(w,c,l,u,T,S,A);else{if(440786851!=Sh(t=new Th(x)).id)throw new ke(2,3,3008);if(408125543!=(n=Sh(t)).id)throw new ke(2,3,3009);for(var t=n.g.byteOffset,n=new Th(n.g),i=null;n.ia();){var r=Sh(n);if(357149030==r.id){i=r;break}}if(!i)throw new ke(2,3,3010);for(i=new Th(i.g),r=1e6,n=null;i.ia();){var a=Sh(i);if(2807729==a.id)r=kh(a);else if(17545==a.id)if(4==a.g.byteLength)n=a.g.getFloat32(0);else{if(8!=a.g.byteLength)throw new ke(2,3,3003);n=a.g.getFloat64(0)}}if(null==n)throw new ke(2,3,3011);if(n*=i=r/1e9,475249515!=(r=Sh(new Th(w))).id)throw new ke(2,3,3007);t=Ch(r,t,i,n,l,u,T,S,A)}return x=t,f.Xc(x),y=new V(x),p&&y.bc(S,A,!0),e.return(y)})}function Lh(e){return e.ed}function Nh(e){var t=bh(e,Lh,"RepresentationIndex");return e=Ur((e=yh(e,Lh,"indexRange"))||""),e=t?W(t,"range",Ur,e):e}function Ph(e,t){var n=e.M.mimeType.split("/")[1];if(e.M.contentType!=ce&&"mp4"!=n&&"webm"!=n)throw new ke(2,4,4006);if("webm"==n&&!t)throw new ke(2,4,4005)}function _h(e){var t=e.M;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.Td,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function jh(e,t,n){var i,r,a=Mh(e,Oh,n),o=(r=function(t){return[t.M.Fb,t.oa.Fb,t.ta.Fb].filter(tn).map(function(e){return z(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(e){return e.getAttribute("indexRange")&&!t.Wf&&(t.Wf=!0),{Dh:e.getAttribute("media"),start:(e=W(e,"mediaRange",Ur,{start:0,end:null})).start,end:e.end}})}(i=e),0==(u=(i=mh(i,Oh)).gd)&&(u=1),o=0,i.ya?o=i.ya*(u-1):i.timeline&&0<i.timeline.length&&(o=i.timeline[0].start),{ya:i.ya,startTime:o,gd:u,vb:i.vb,timeline:i.timeline,lc:r});if(!o.ya&&!o.timeline&&1<o.lc.length)throw new ke(2,4,4002);if(!o.ya&&!e.ba.duration&&!o.timeline&&1==o.lc.length)throw new ke(2,4,4002);if(o.timeline&&0==o.timeline.length)throw new ke(2,4,4002);var s=null,u=null,l=(e.ta.id&&e.M.id&&(u=t[e.ta.id+","+e.M.id])&&(s=u.segmentIndex),function(e,t,n,i,r,a){var o=i.lc.length;i.timeline&&i.timeline.length!=i.lc.length&&(o=Math.min(i.timeline.length,i.lc.length));for(var s=e-i.vb,u=t?e+t:1/0,l=[],c=i.startTime,d={},h=0;h<o;d={Ec:d.Ec,Ac:d.Ac},h++){d.Ac=i.lc[h];var f=void 0;f=null!=i.ya?c+i.ya:i.timeline?i.timeline[h].end:c+t,d.Ec=null,l.push(new N(e+c,e+f,function(e){return function(){return null==e.Ec&&(e.Ec=Lt(n(),[e.Ac.Dh])),e.Ec}}(d),d.Ac.start,d.Ac.end,r,s,e,u,[],"",null,null,Ia,a)),c=f}return l}(e.ba.start,e.ba.duration,e.M.cb,o,a,n));return t=!s,s?s.Wc(l,e.presentationTimeline.eb()):s=new V(l),e.presentationTimeline.Xc(l),e.zb&&e.ba.Le||s.bc(e.ba.start,e.ba.duration?e.ba.start+e.ba.duration:1/0,t),u&&(u.segmentIndex=s),{dc:function(){return s&&0!=s.Ab()||s.Qd(l),Promise.resolve(s)}}}function Oh(e){return e.Fb}function Uh(e,t,n,i,I,k,C){var r,M=function(e,t){var n=yh(e,Bh,"initialization");if(!n)return null;var i=e.M.id,r=e.bandwidth||null,a=e.M.cb;return new Aa(function(){var e=gh(n,i,null,null,r,null);return Lt(a(),[e])},0,null,_h(e),null,null,t)}(e,C),D=(a=mh(r=e,Bh),o=yh(r,Bh,"media"),r=yh(r,Bh,"index"),{ya:a.ya,timescale:a.timescale,gd:a.gd,vb:a.vb,yf:a.yf,timeline:a.timeline,mc:o,Uc:r}),a=D,o=a.Uc?1:0;if(0==(o=(o+=a.timeline?1:0)+(a.ya?1:0)))throw new ke(2,4,4002);if(1!=o&&(a.Uc&&(a.timeline=null),a.ya=null),!a.Uc&&!a.mc)throw new ke(2,4,4002);var R=pn(e);if(D.Uc)return Ph(e,M),{dc:function(){var e=gh(D.Uc,R.M.id,null,null,R.bandwidth||null,null),e=Lt(R.M.cb(),[e]);return Rh(R,t,M,e,0,null,D.vb)}};if(D.ya)return i||"image"===e.oa.contentType||(e.presentationTimeline.Ye(D.ya),e.presentationTimeline.Sd(e.ba.start)),{dc:function(){var e=R,r=D,t=I,a=M,n=k,o=C;function s(t){var n=(i=(t-p)*f)+r.vb,e=i+d,i=e+f;return(e=new N(e,Math.min(i,l()),function(){var e=n*g;return"BigInt"in q&&e>Number.MAX_SAFE_INTEGER&&(e=BigInt(n)*BigInt(g)),e=gh(m,y,t,null,v,e),Lt(b(),[e])},0,null,a,w,d,l(),[],"",null,null,Ia,o)).h=i,e}function u(){var e=[Math.max(c.eb(),d),Math.min(c.Bb(),l())].map(function(e){return e-d});return[Math.ceil(e[0]/f),Math.ceil(e[1]/f)-1].map(function(e){return e+p})}function l(){var e=null!=i&&n[i]||h;return e?d+e:1/0}var c=e.presentationTimeline,d=e.ba.start,i=e.ta.id,h=e.ba.duration,f=r.ya,p=r.gd,g=r.timescale,m=r.mc,v=e.bandwidth||null,y=e.M.id,b=e.M.cb,w=d-r.vb,x=u();e=e.zb?Math.max(x[0],x[1]-t+1):x[0],x=x[1],t=[];for(var T=e;T<=x;++T){var S=s(T);t.push(S)}var A,E=new V(t);return t=c.Bb()<l(),T=c.R(),(t||T)&&(A=Math.max(e,x+1),E.Yd(f,function(){var e=c.eb();E.bb(e),(t=we(u())).next();for(var t=t.next().value,n=[];A<=t;){var i=s(A);n.push(i),A++}return e>l()&&!n.length?null:n})),Promise.resolve(E)}};var s=null,u=(i=null,e.ta.id&&e.M.id&&(i=n[i=e.ta.id+","+e.M.id])&&(s=i.segmentIndex),e.ba.start),l=e.ba.duration?u+e.ba.duration:1/0,c=!(e.zb&&e.ba.Le);return s?(Vh(n=s,D,u,l,c,M),n.bb(e.presentationTimeline.eb())):s=new Fh(D,e.M.id,e.bandwidth,e.M.cb,u,l,M,c,C,e.M.jf),D.timeline&&"image"!==e.oa.contentType&&e.presentationTimeline.dg(D.timeline,u),i&&e.zb&&(i.segmentIndex=s),{dc:function(){return s instanceof Fh&&0==s.Ab()&&Vh(s,D,u,l,c,M),Promise.resolve(s)}}}function Bh(e){return e.fd}function Fh(e,t,n,i,r,a,o,s,u,l){V.call(this,[]),this.h=e,this.F=t,this.A=n,this.C=i,this.i=r,this.l=a,this.s=o,this.u=u,this.G=l,s&&Hh(this)}function Vh(e,t,n,i,r,a){var o;e.s=a,e.h?(n=e.h.timeline,e.h.mc=t.mc,o=n[n.length-1],0<(t=t.timeline.filter(function(e){return e.start>=o.end})).length&&e.h.timeline.push.apply(e.h.timeline,le(t)),e.l!==i&&(e.l=i)):(e.h=t,e.i=n,e.l=i),r&&Hh(e)}function Hh(e){if(!e.o){for(var t=e.h.timeline;t.length&&t[t.length-1].start>=e.l;)t.pop();e.bb(e.i)}}function Gh(e,t,n,i,r,a,o){return e=gh(e,t,n,a,i||null,r),Lt(o(),[e]).map(function(e){return e.toString()})}function Kh(e){this.o=null,this.u=e,this.G=new ji,this.j=[],this.h=null,this.m=[],this.A=null,this.F=[],this.C=300,this.l=new Map,this.i=new Map,this.g=null,this.s="UNKNOWN"}function qh(a,o){var s,u;return Ie(function(e){if(1==e.g)return s=Lt(a.j,[function(e,t){if(!e.m.length)return t;t=new gt(t);var n=e.A||e.m[0],i=Math.round(e.u.getBandwidthEstimate()),r=t.g;return"DASH"==e.s?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.s&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),Dt(r)&&bt(t,r),t.toString()}(a,o)]),s=Fi(s,a.o.retryParameters),s=a.u.networkingEngine.request(8,s),Oi(a.G,s),Se(e,2),xe(e,s.promise,4);if(2!=e.g){s=e.h,u=nr(s.data),u=JSON.parse(u);if(1==u.VERSION){var t=a;var n=u;var i=s.uri;null!=t.g&&(t.g.stop(),t.g=null);var r=n["RELOAD-URI"]||i;t.g=new I(function(){qh(t,r)}),(i=n.TTL)&&(t.C=i);t.g.U(t.C),t.m=n["PATHWAY-PRIORITY"]||[],t.F=n["PATHWAY-CLONES"]||[]}return Ae(e,0)}if((u=Ee(e))&&7001==u.code)return e.return();null!=a.g&&(a.g.stop(),a.g=null),a.g=new I(function(){qh(a,o)}),a.g.U(a.C),Te(e)})}function Xh(e,t,n,i){var r=e.l.get(t);(r=r||new Map).set(n,i),e.l.set(t,r)}function zh(i,e,t){t=void 0!==t&&t,e=i.l.get(e)||new Map;for(var n,r=[],a={},o=we(i.m),s=o.next();!s.done;a={Jb:a.Jb},s=o.next())a.Jb=s.value,(s=e.get(a.Jb))?r.push({df:a.Jb,location:s}):(s=i.F.find(function(t){return function(e){return e.vi==t.Jb}}(a)))&&(n=e.get(s["BASE-ID"]))&&(s["URI-REPLACEMENT"].xg?(vt(n=new gt(n),s["URI-REPLACEMENT"].xg),r.push({df:a.Jb,location:n.toString()})):r.push({df:a.Jb,location:n}));for(a=Date.now(),s=(o=we(i.i.keys())).next();!s.done;s=o.next())s=s.value,(n=i.i.get(s))<a&&i.i.delete(s);if((r=r.filter(function(e){for(var t=we(i.i.keys()),n=t.next();!n.done;n=t.next())if(n.value.includes(new gt(e.location).ob))return!1;return!0})).length&&(i.A=r[0].df),!(r=r.map(function(e){return e.location})).length&&i.h)for(s=(a=we(i.h.split(","))).next();!s.done;s=a.next())(o=e.get(s.value))&&(i.A=i.h,r.push(o));if(!r.length)for(a=(e=we(e.values())).next();!a.done;a=e.next())r.push(a.value);return t?r:Lt(i.j,r)}function Wh(){this.j=[],this.h=[],this.g=[],this.l=[],this.i=[],this.m=!1,this.o=new Set}function Yh(e,t){for(var n=[],i=[],r=[],a=[],o=(e=we(e)).next();!o.done;o=e.next()){var s,u=o.value,o=new Map(u.audioStreams.map(function(e){return[wf(e),e]})),l=new Map(u.videoStreams.map(function(e){return[bf(e),e]})),c=new Map(u.textStreams.map(function(e){return[xf(e),e]})),u=new Map(u.imageStreams.map(function(e){return[Tf(e),e]}));t&&(s=gf(ce),c.set(xf(s),s),s=gf("image"),u.set(Tf(s),s)),n.push(o),i.push(l),r.push(c),a.push(u)}return{Df:n,vg:i,sg:r,Vf:a}}function $h(t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,x,T,S,A,E,I,k,C,M;return Ie(function(e){switch(e.g){case 1:if(n=jt,1==t.length)return e.return(t[0]);for(y=t.map(function(e){return new Map(e.filter(function(e){return e.type===n.P}).map(function(e){return[wf(e),e]}))}),i=t.map(function(e){return new Map(e.filter(function(e){return e.type===n.$}).map(function(e){return[bf(e),e]}))}),r=t.map(function(e){return new Map(e.filter(function(e){return e.type===n.na}).map(function(e){return[xf(e),e]}))}),a=t.map(function(e){return new Map(e.filter(function(e){return e.type===n.he}).map(function(e){return[Tf(e),e]}))}),o=we(r),s=o.next();!s.done;s=o.next())u=s.value,l=pf(n.na),u.set(xf(l),l);for(c=we(a),d=c.next();!d.done;d=c.next())h=d.value,f=pf(n.he),h.set(Tf(f),f);return xe(e,Jh(p=new Wh,[],y,0,tf,rf),2);case 2:return g=e.h,xe(e,Jh(p,[],i,0,tf,rf),3);case 3:return m=e.h,xe(e,Jh(p,[],r,0,tf,rf),4);case 4:return v=e.h,xe(e,Jh(p,[],a,0,tf,rf),5);case 5:if(y=e.h,b=0,m.length&&g.length)for(S=we(g),A=S.next();!A.done;A=S.next())for(E=A.value,I=we(m),k=I.next();!k.done;k=I.next())C=k.value,M=b++,C.variantIds.push(M),E.variantIds.push(M);else for(w=m.concat(g),x=we(w),T=x.next();!T.done;T=x.next())T.value.variantIds=[b++];return e.return(m.concat(g).concat(v).concat(y))}})}function Jh(s,u,l,c,d,h){var f,p,g,m,v,y,b,w,x,T,S,A,E,I,k,C;return Ie(function(e){switch(e.g){case 1:for(f=[],p=0;p<c;p++)f.push(new Set);for(g=c;g<l.length;g++)f.push(new Set(l[g].values()));m=we(u),v=m.next();case 2:if(v.done){e.B(4);break}return y=v.value,xe(e,(t=s,n=y,i=l,r=c,a=h,o=f,Ie(function(e){return 1==e.g?(af(t,i,n),n.matchedStreams?n.segmentIndex?xe(e,Qh(n,r),2):e.B(2):e.return(!1)):(Zh(n,r,a,o),e.return(!0))})),5);case 5:if(!e.h)throw new ke(2,4,4037);v=m.next(),e.B(2);break;case 4:for(b=we(f),w=b.next();!w.done;w=b.next())for(x=w.value,T=we(x),S=T.next();!S.done;S=T.next())A=S.value,(A=function(e,t,n,i,r,a){if(yf(t))return null;var o=i(t);return af(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return Ie(function(e){return o.segmentIndex?e.B(0):(o.segmentIndex=new is,xe(e,Qh(o,0),0))})}),o.matchedStreams&&o.matchedStreams.length?(Zh(o,0,r,a),o):null}(s,A,l,d,h,f))&&u.push(A);for(E=we(f),w=E.next();!w.done;w=E.next())for(I=w.value,k={},C=we(I),S=C.next();!S.done;k={od:k.od},S=C.next())if(k.od=S.value,!yf(k.od)&&u.some(function(t){return function(e){return sf(s,t.od,e)}}(k)))throw new ke(2,4,4037);return e.return(u)}var t,n,i,r,a,o})}function Qh(t,n){var i,r,a,o,s,u,l;return Ie(function(e){if(1==e.g){for(i=[],r=t.matchedStreams,a=we(r),o=a.next();!o.done;o=a.next())s=o.value,i.push(s.createSegmentIndex()),s.trickModeVideo&&!s.trickModeVideo.segmentIndex&&i.push(s.trickModeVideo.createSegmentIndex());return xe(e,Promise.all(i),2)}if(t.segmentIndex instanceof is)for(u={},l=n;l<r.length;u={jb:u.jb},l++)u.jb=r[l],u.jb.segmentIndex&&(es(u.jb.segmentIndex,function(t){return function(e){e.codecs=t.jb.codecs,e.mimeType=t.jb.mimeType,e.aa&&(e.aa.codecs=t.jb.codecs,e.aa.mimeType=t.jb.mimeType)}}(u)),t.segmentIndex.h.push(u.jb.segmentIndex));Te(e)})}function Zh(e,t,n,i){for(var r=e.matchedStreams;t<r.length;t++){n(e,o=r[t]);var a=!0;if(a="audio"==e.type&&0==sn(e.language,o.language)?!1:a){i[t].delete(o);for(var o,a=new Set(e.codecs.split(",")),s=(o=we(o.codecs.split(","))).next();!s.done;s=o.next())(s=s.value)&&a.add(s);s=Array.from(a),a=new Set,o=[];for(var u=(s=we(s)).next();!u.done;u=s.next()){var l=Gt(u=u.value);a.has(l)||(o.push(u),a.add(l))}e.codecs=o.join(",")}}}function ef(e){var n=Object.assign({},e);return n.originalId=null,n.createSegmentIndex=function(){return Promise.resolve()},n.closeSegmentIndex=function(){if(n.segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null),n.matchedStreams)for(var e=we(n.matchedStreams),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null)},n.roles=n.roles.slice(),n.segmentIndex=null,n.emsgSchemeIdUris=[],n.keyIds=new Set,n.closedCaptions=null,n.trickModeVideo=null,n}function tf(e){return(e=Object.assign({},e)).roles=e.roles.slice(),e.keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function nf(e,t){function n(e,t){e=e||[];for(var n=(t=we(t)).next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=we(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||""),i=ca(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new ke(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=we(t.closedCaptions)).next();!r.done;r=i.next()){var r=(a=we(r.value)).next().value,a=a.next().value;e.closedCaptions.set(r,a)}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=ef(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),nf(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&nf(e.trickModeVideo,t)}function rf(e,t){for(var n=(n=e.roles)||[],i=we(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,i=(n=we(t.keyIds)).next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,le(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=we(t.closedCaptions)).next();!n.done;n=t.next())n=(i=we(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function af(e,t,n){for(var i=[],r=(t=we(t)).next();!r.done;r=t.next()){if(!(r=function(n,e,t){var i=null,r=(0,{audio:wf,video:bf,text:xf,image:Tf}[t.type])(t);if(e.has(r))i=e.get(r);else{r={audio:function(e,t){return sf(n,e,t)},video:function(e,t){return sf(n,e,t)},text:uf,image:lf}[t.type];for(var a={audio:cf,video:df,text:hf,image:ff}[t.type],o=(e=we(e.values())).next();!o.done;o=e.next())o=o.value,!r(t,o)||t.fastSwitching!=o.fastSwitching||i&&!a(t,i,o)||(i=o)}return i}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function of(e,t){function n(e){var t;return If.has(e)||(t=Ht(e),If.set(e,t)),If.get(e)}return e.mimeType==t.mimeType&&n(e.codecs)==n(t.codecs)}function sf(e,t,n){return!(!of(t,n)&&!e.m||t.drmInfos&&!la(t.drmInfos,n.drmInfos))}function uf(e,t){return!t.language||e.forced===t.forced&&0!=sn(e.language,t.language)&&t.kind==e.kind}function lf(){return!0}function cf(t,e,n){var i=of(t,e),r=of(t,n);if(i&&!r)return!1;if(!i&&r)return!0;if((i=sn(t.language,e.language))<(r=sn(t.language,n.language)))return!0;if(r<i)return!1;if(e.label!==n.label){if(t.label===e.label)return!1;if(t.label===n.label)return!0}return t.roles.length?(i=e.roles.filter(function(e){return t.roles.includes(e)}),(r=n.roles.filter(function(e){return t.roles.includes(e)})).length>i.length||!(r.length<i.length)&&n.roles.length<e.roles.length):!(n.roles.length||!e.roles.length)||!(n.roles.length&&!e.roles.length)&&(!(e.primary||!n.primary)||!(e.primary&&!n.primary)&&((i=mf(t.channelsCount,e.channelsCount,n.channelsCount))==Sf||i!=Ef&&((i=mf(t.audioSamplingRate,e.audioSamplingRate,n.audioSamplingRate))==Sf||i!=Ef&&!(!t.bandwidth||vf(t.bandwidth,e.bandwidth,n.bandwidth)!=Sf))))}function df(e,t,n){var i=of(e,t),r=of(e,n);if(i&&!r)return!1;if(!i&&r)return!0;if((i=mf(e.width*e.height,t.width*t.height,n.width*n.height))==Sf)return!0;if(i==Ef)return!1;if(e.frameRate){if((i=mf(e.frameRate,t.frameRate,n.frameRate))==Sf)return!0;if(i==Ef)return!1}return!(!e.bandwidth||vf(e.bandwidth,t.bandwidth,n.bandwidth)!=Sf)}function hf(t,e,n){var i=sn(t.language,e.language),r=sn(t.language,n.language);if(i<r)return!0;if(r<i)return!1;if(!e.primary&&n.primary)return!0;if(e.primary&&!n.primary)return!1;if(e.label!==n.label){if(t.label===e.label)return!1;if(t.label===n.label)return!0}if(t.roles.length){if(i=e.roles.filter(function(e){return t.roles.includes(e)}),(r=n.roles.filter(function(e){return t.roles.includes(e)})).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&e.roles.length)return!0;if(n.roles.length&&!e.roles.length)return!1}return n.mimeType==t.mimeType&&n.codecs==t.codecs&&(e.mimeType!=t.mimeType||e.codecs!=t.codecs)}function ff(e,t,n){return mf(e.width*e.height,t.width*t.height,n.width*n.height)==Sf}function pf(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,fastSwitching:!1}}function gf(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new V([]),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,fastSwitching:!1}}function mf(e,t,n){if(t==e&&e!=n)return Ef;if(n==e&&e!=t)return Sf;if(e<t){if(n<=e||n-e<t-e)return Sf;if(t-e<n-e)return Ef}else{if(e<n)return Ef;if(e-n<e-t)return Sf;if(e-t<e-n)return Ef}return Af}function vf(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Sf:t<e?Ef:Af}function yf(e){switch(e.type){case ce:return!e.language;case"image":return!e.tilesLayout;default:return}}function bf(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth])}function wf(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary])}function xf(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Tf(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}m(Fh,V),(e=Fh.prototype).Ab=function(){return this.h?this.h.timeline.length:0},e.release=function(){V.prototype.release.call(this),this.h=null},e.bb=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.i<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.j+=t,0===this.Ab()&&this.release())}},e.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var t=this.h.timeline;if(e<this.i||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=(a=t[i]).start+this.i,a=i<n?t[i+1].start+this.i:1/0===this.l?a.end+this.i:this.l;if(r<=e&&e<a)return i+this.j}return null},e.get=function(e){var t=this;if((e-=this.j)<0||e>=this.Ab()||!this.h)return null;if(!(o=this.g[e])){var n=this.h.mc,i=this.h.timeline[e],r=i.Vh,a=this.h.yf+i.zf,o=this.i-this.h.vb,s=this.i+i.end,u=s;e===this.Ab()-1&&1/0!==this.l&&(u=this.l);for(var l=[],c=(i.end-i.start)/i.fb,d={},h=0;h<i.fb;d={Fc:d.Fc,fe:d.fe},h++){var f=i.start+c*h,p=f+c;d.fe=h+1,d.Fc=null,f=new N(this.i+f,this.i+p,function(e){return function(){return t.h?(null==e.Fc&&(e.Fc=Gh(t.h.mc,t.F,r,t.A,a,e.fe,t.C)),e.Fc):[]}}(d),0,null,this.s,o,this.i,this.l,[],"",null,null,Ia,this.u),0==this.G?0<h&&f.Od():0!=h%this.G&&f.Od(),l.push(f)}(o=new N(this.i+i.start,u,function(){return 0<i.fb?[]:Gh(n,t.F,r,t.A,a,null,t.C)},0,null,this.s,o,this.i,this.l,l,"",null,null,Ia,this.u,0<i.fb)).h=s,this.g[e]=o}return o},Kh.prototype.configure=function(e){this.o=e},Kh.prototype.destroy=function(){return this.u=this.o=null,this.j=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},Kh.prototype.setManifestType=function(e){this.s=e},(e=Wh.prototype).release=function(){for(var e=we(this.h.concat(this.g,this.l,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.l=[],this.i=[],this.j=[]},e.mh=function(){return this.j},e.Ie=function(){return this.l.slice()},e.Vg=function(){return this.i},e.Gf=function(t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,w,x,T,S,A,E,I=this;return Ie(function(e){if(1==e.g){if(i=jt,!n&&1==t.length)return c=Yh(t,!1),s=c.Df,u=c.vg,l=c.sg,c=c.Vf,I.h=Array.from(s[0].values()),I.g=Array.from(u[0].values()),I.l=Array.from(l[0].values()),I.i=Array.from(c[0].values()),e.B(2);for(r=-1,a=0;a<t.length;a++)o=t[a],I.o.has(o.id)||(I.o.add(o.id),-1==r&&(r=a));return-1==r?e.return():(s=Yh(t,!0),u=s.Df,l=s.vg,c=s.sg,f=s.Vf,xe(e,Promise.all([Jh(I,I.h,u,r,ef,nf),Jh(I,I.g,l,r,ef,nf),Jh(I,I.l,c,r,ef,nf),Jh(I,I.i,f,r,ef,nf)]),2))}if(d=0,h=[],I.g.length&&I.h.length)for(y=we(I.h),b=y.next();!b.done;b=y.next())for(w=b.value,x=we(I.g),T=x.next();!T.done;T=x.next())S=T.value,A=ca(w.drmInfos,S.drmInfos),w.drmInfos.length&&S.drmInfos.length&&!A.length||(E=d++,h.push({id:E,language:w.language,disabledUntilTime:0,primary:w.primary,audio:w,video:S,bandwidth:(w.bandwidth||0)+(S.bandwidth||0),drmInfos:A,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(f=I.g.length?I.g:I.h,p=we(f),g=p.next();!g.done;g=p.next())m=g.value,v=d++,h.push({id:v,language:m.language,disabledUntilTime:0,primary:m.primary,audio:m.type==i.P?m:null,video:m.type==i.$?m:null,bandwidth:m.bandwidth||0,drmInfos:m.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});I.j=h,Te(e)})},t("shaka.util.PeriodCombiner",Wh),Wh.prototype.combinePeriods=Wh.prototype.Gf,Wh.prototype.getImageStreams=Wh.prototype.Vg,Wh.prototype.getTextStreams=Wh.prototype.Ie,Wh.prototype.getVariants=Wh.prototype.mh;var Sf=1,Af=0,Ef=-1,If=new Map;function kf(){var e=this;this.i=this.h=null,this.o=[],this.j=null,this.I=1,this.m={},this.K={},this.l=new Wh,this.F=0,this.H=new F(5),this.G=new I(function(){var t,n,i;t=e,Ie(function(e){switch(e.g){case 1:return n=0,Se(e,2),xe(e,Cf(t),4);case 4:n=e.h,Ae(e,3);break;case 2:if(i=Ee(e),t.i){if(t.h.raiseFatalErrorOnManifestUpdateRequestFailure)return t.i.onError(i),e.return();i.severity=1,t.i.onError(i)}case 3:if(!t.i)return e.return();t.i.onManifestUpdated(),Rf(t,n),Te(e)}})}),this.C=new ji,this.u=null,this.J=[],this.A=1/0,this.s=!1,this.g=null}function Cf(o){var s,u,l,c;return Ie(function(e){return 1==e.g?(u=o.o,1<o.o.length&&o.g&&((s=zh(o.g,"Location",!0)).length&&(u=s)),s=Fi(u,o.h.retryParameters),u=Date.now(),xe(e,_f(o,s,0,{type:4}),2)):3!=e.g?(l=e.h,o.i?(l.uri&&l.uri!=l.originalUri&&!o.o.includes(l.uri)&&o.o.unshift(l.uri),xe(e,(t=o,n=l.data,i=l.uri,Ie(function(e){if(1!=e.g)return a=e.h,e.return(Mf(t,a,i));if(a=Xr(n,"MPD"))return t.h.dash.disableXlinkProcessing?e.return(Mf(t,a,i)):(r=t.h.dash.xlinkFailGracefully,r=wh(a,t.h.retryParameters,r,i,t.i.networkingEngine),Oi(t.C,r),xe(e,r.promise,2));throw new ke(2,4,4001,i)})),3)):e.return(0)):(l=Date.now(),c=(l-u)/1e3,o.H.sample(1,c),e.return(c));var t,n,i,r,a})}function Mf(c,d,h){var f,p,g,m,v,y,b,w,x,T,S,A,E,I,k,C,M,D,R,L,N,P,_,j,O,U,B,F,V,H,G,K;return Ie(function(e){switch(e.g){case 1:for((w=c.h.dash.manifestPreprocessor)&&w(d),c.g&&c.g.l.clear(),f=[h],p=[],g=new Map,w=z(d,"Location"),m=we(w),v=m.next();!v.done;v=m.next())b=v.value,y=b.getAttribute("serviceLocation"),(b=Pr(b))&&(b=Lt(f,[b])[0],y&&(c.g?Xh(c.g,"Location",y,b):g.set(y,b)),p.push(b));if(c.g?0<(w=zh(c.g,"Location",!0)).length&&(f=c.o=w):p.length&&(f=c.o=p),w=Promise.resolve(),(H=Mr(d,"ContentSteering"))&&c.i)for(R=H.getAttribute("defaultServiceLocation"),c.g?(c.g.j=f,c.g.h=R):(c.g=new Kh(c.i),c.g.configure(c.h),c.g.setManifestType("DASH"),c.g.j=f,c.g.h=R,(R=Pr(H))&&(W(H,"queryBeforeStart",Gr,!1)?w=qh(c.g,R):qh(c.g,R))),x=we(g.keys()),T=x.next();!T.done;T=x.next())S=T.value,A=g.get(S),Xh(c.g,"Location",S,A);if(H=z(d,"BaseURL"),I=!1,c.g)for(k=we(H),C=k.next();!C.done;C=k.next())D=C.value,M=D.getAttribute("serviceLocation"),D=Pr(D),M&&D&&(Xh(c.g,"BaseURL",M,D),I=!0);if(I&&c.g||(R=H.map(Pr),E=Lt(f,R)),L=function(){return c.g&&I?zh(c.g,"BaseURL"):E||[]},V=0,H&&H.length&&(V=W(H[0],"availabilityTimeOffset",Hr)||0),H=c.h.dash.ignoreMinBufferTime,N=0,H||(N=W(d,"minBufferTime",Or)||0),c.F=W(d,"minimumUpdatePeriod",Or,-1),H=W(d,"availabilityStartTime",jr),K=W(d,"timeShiftBufferDepth",Or),G=c.h.dash.ignoreSuggestedPresentationDelay,B=null,G||(B=W(d,"suggestedPresentationDelay",Or)),G=c.h.dash.ignoreMaxSegmentDuration,P=null,G||(P=W(d,"maxSegmentDuration",Or)),G=d.getAttribute("type")||"static",c.j)for(_=c.j.presentationTimeline,j=we(Object.values(c.m)),O=j.next();!O.done;O=j.next())(U=O.value).segmentIndex&&U.segmentIndex.bb(_.eb());else F=c.h.defaultPresentationDelay||1.5*N,_=new fe(H,null!=B?B:F,c.h.dash.autoCorrectDrift);return _.pc("static"==G),null==(K=_.R()&&!isNaN(c.h.availabilityWindowOverride)?c.h.availabilityWindowOverride:K)&&(K=1/0),_.Xd(K),H=d.getAttribute("profiles")||"",B={zb:"static"!=G,presentationTimeline:_,ta:null,ba:null,oa:null,M:null,bandwidth:0,Wf:!1,ac:V,profiles:H.split(",")},F=function(e,t,n,i){var r=W(i,"mediaPresentationDuration",Or),a=[],o=0;i=z(i,"Period");for(var s=0;s<i.length;s++){var u,l=i[s],c=i[s+1],d=W(l,"start",Or,o),h=l.id,f=W(l,"duration",Or),p=null;if(c?null!=(u=W(c,"start",Or))&&(p=u-d):null!=r&&(p=r-d),null==p&&(p=f),!(null!==e.u&&null!==h&&null!==d&&d<e.u)||e.J.includes(h)||s+1==i.length){if(null!==d&&(null===e.u||d>e.u)&&(e.u=d),o=function(A,E,e,t){E.ta=Lf(A,t.node,null,e),E.ba=t,E.ta.ac=E.ac,E.ta.id||(E.ta.id="__shaka_period_"+t.start);var n=z(t.node,"EventStream");e=E.presentationTimeline.eb();for(var i=(n=we(n)).next();!i.done;i=n.next())!function(e,t,n,i,r){for(var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=W(i,"timescale",Vr)||1,u=(i=we(z(i,"Event"))).next();!u.done;u=i.next()){var l=W(u=u.value,"presentationTime",Vr)||0,c=W(u,"duration",Vr)||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.i.onTimelineRegionAdded(u))}}(A,t.start,t.duration,i.value,e);if(e=z(t.node,"AdaptationSet").map(function(e){var t=A,n=E;function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.oa=Lf(t,e,n.ta,null);var r=!1,a=z(e,"Role"),o=a.map(function(e){return e.getAttribute("value")}).filter(tn),s=void 0,u=n.oa.contentType==ce;u&&(s="subtitle");for(var l,c=(a=we(a)).next();!c.done;c=a.next()){var d=(c=c.value).getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(c=c.getAttribute("value"),c){case"main":r=!0;break;case"caption":case"subtitle":s=c}}d=z(e,"EssentialProperty"),a=null;var h=!1;c=!1;for(var f=(d=we(d)).next();!f.done;f=d.next()){var p=(f=f.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==p?a=f.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p?l=i(parseInt(f.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=p&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=p&&("urn:mpeg:dash:ssr:2023"==p?h=!0:c=!0)}for(d=we(d=z(e,"SupplementalProperty")),f=d.next();!f.done;f=d.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(f=f.value).getAttribute("schemeIdUri")&&(l=i(parseInt(f.getAttribute("value"),10)));d=z(e,"Accessibility");var g,m=new Map;for(d=we(d),f=d.next();!f.done;f=d.next())if(p=f.value,f=p.getAttribute("schemeIdUri"),p=p.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==f)if(f=1,null!=p)for(var v=we(p=p.split(";")),y=v.next();!y.done;y=v.next()){var b=y.value,w=y=void 0;w=b.includes("=")?(b=b.split("="),y=b[0].startsWith("CC")?b[0]:"CC"+b[0],b[1]||"und"):(y="CC"+f,2==p.length?f+=2:f++,b),m.set(y,de(w))}else m.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==f)if(f=1,null!=p)for(p=we(p.split(";")),y=p.next();!y.done;y=p.next())y=y.value,b=v=void 0,b=y.includes("=")?(y=y.split("="),v="svc"+y[0],y[1].split(",")[0].split(":").pop()):(v="svc"+f,f++,y),m.set(v,de(b));else m.set("svc1","und");else"urn:mpeg:dash:role:2011"==f?null!=p&&(o.push(p),"captions"==p&&(s="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==f&&("1"==p?g="visually impaired":"2"==p&&(g="hard of hearing"));if(c)return null;var x=dh(c=z(e,"ContentProtection"),t.h.dash.ignoreDrmInfo,t.h.dash.keySystemsByURI),T=de(n.oa.language||"und"),S=e.getAttribute("label");if((c=z(e,"Label"))&&c.length&&(c=c[0]).textContent&&(S=c.textContent),c=z(e,"Representation"),0==(e=c.map(function(e){return(e=function(h,e,t,n,i,r,a,o,s,u,l){if(e.M=Lf(h,u,e.oa,null),h.A=Math.min(h.A,e.M.ac),!function(e){var t=e.ed?1:0;return 0==(t=(t+=e.Fb?1:0)+(e.fd?1:0))?e.contentType==ce||"application"==e.contentType:(1!=t&&(e.ed&&(e.Fb=null),e.fd=null),!0)}(e.M))return null;var c=e.ba.start,d=(e.bandwidth=W(u,"bandwidth",Fr)||0,e.M.contentType),f=d==ce||"application"==d;d="image"==d;try{var p,g,m,v,y,b,w=void 0;t.ke&&(p=e.M.cb,g=Lt(p(),[t.ke.zh]),m=Fi(g,h.h.retryParameters),w={method:"AES-128",iv:t.ke.iv,firstMediaSequenceNumber:0,fetchKey:function(){var t,n,i;return Ie(function(e){if(1==e.g)return xe(e,_f(h,m,6),2);if(3!=e.g){if((t=e.h).data&&16==t.data.byteLength)return n={name:"AES-CBC"},i=w,xe(e,q.crypto.subtle.importKey("raw",t.data,n,!0,["decrypt"]),3);throw new ke(2,4,4049)}i.cryptoKey=e.h,w.fetchKey=void 0,Te(e)})}}),p=function(e,t,n,i){return r=h,a=e,o=t,s=n,u=i,Ie(function(e){return 1==e.g?(l=Ki,c=u?0:1,d=ws(a,o,s,r.h.retryParameters),xe(e,_f(r,d,l,{type:c}),2)):(d=e.h,e.return(d.data))});var r,a,o,s,u,l,c,d},v=e.M.ed?Dh(e,p,w):e.M.Fb?jh(e,h.m,w):e.M.fd?Uh(e,p,h.m,!!h.j,h.h.dash.initialSegmentLimit,h.K,w):(y=e.ba.duration||0,b=e.M.cb,{dc:function(){return Promise.resolve(ts(c,y,b()))}})}catch(e){if((f||d)&&4002==e.code)return null;throw e}p=function(e,t,n,i){var r=dh(e,n,i);if(t.Nf)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.Nf=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(t){return r.drmInfos.some(function(e){return e.keySystem==t.keySystem})}),0==t.drmInfos.length))throw new ke(2,4,4008);return r.Jf||t.Jf}(p=z(u,"ContentProtection"),t,h.h.dash.ignoreDrmInfo,h.h.dash.keySystemsByURI),p=new Set(p?[p]:[]),g=!1,z(u,"SupplementalProperty").some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")})&&(g=!0);var x,T,S=!1;if(f&&(S=o.includes("forced_subtitle")||o.includes("forced-subtitle")),d&&!(x=(u=z(u,"EssentialProperty").find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))}))?u.getAttribute("value"):x))return null;u=e.M.codecs,e.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(u.includes("hvc1.2.4.L153.B0")||u.includes("hev1.2.4.L153.B0"))&&(T="PQ");var A=(u=e.M.id?e.ta.id+","+e.M.id:"")&&h.m[u]?h.m[u]:{id:h.I++,originalId:e.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){A.segmentIndex&&(A.segmentIndex.release(),A.segmentIndex=null)},segmentIndex:null,mimeType:e.M.mimeType,codecs:e.M.codecs,frameRate:e.M.frameRate,pixelAspectRatio:e.M.pixelAspectRatio,bandwidth:e.bandwidth,width:e.M.width,height:e.M.height,kind:n,encrypted:0<t.drmInfos.length,drmInfos:t.drmInfos,keyIds:p,language:i,originalLanguage:e.oa.language,label:r,type:e.oa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.M.emsgSchemeIdUris,roles:o,forced:S,channelsCount:e.M.Td,audioSamplingRate:e.M.audioSamplingRate,spatialAudio:g,closedCaptions:s,hdr:T,videoLayout:void 0,tilesLayout:x,accessibilityPurpose:l,external:!1,fastSwitching:!1};return A.createSegmentIndex=function(){var t;return Ie(function(e){if(1==e.g)return A.segmentIndex?e.B(0):(t=A,xe(e,v.dc(),3));t.segmentIndex=e.h,Te(e)})},u&&e.zb&&!h.m[u]&&(h.m[u]=A),A}(t,n,x,s,T,S,r,o,m,e,g))&&(e.hdr=e.hdr||l,e.fastSwitching=h),e}).filter(function(e){return!!e})).length){if(a="image"==n.oa.contentType,t.h.dash.ignoreEmptyAdaptationSet||u||a)return null;throw new ke(2,4,4003)}if(!n.oa.contentType||"application"==n.oa.contentType)for(n.oa.contentType=Pf(e[0].mimeType,e[0].codecs),u=we(e),f=u.next();!f.done;f=u.next())f.value.type=n.oa.contentType;for(u=n.oa.id||"__fake__"+t.I++,d=we(e),f=d.next();!f.done;f=d.next()){for(f=f.value,p=we(x.drmInfos),v=p.next();!v.done;v=p.next())(v=v.value).keyIds=v.keyIds&&f.keyIds?new Set([].concat(le(v.keyIds),le(f.keyIds))):v.keyIds||f.keyIds;t.h.dash.enableAudioGroups&&(f.groupId=u)}return c=c.map(function(e){return e.getAttribute("id")}).filter(tn),{id:u,contentType:n.oa.contentType,language:T,bj:r,streams:e,drmInfos:x.drmInfos,wf:a,Ph:c}}).filter(tn),E.zb){for(t=[],n=we(e),i=n.next();!i.done;i=n.next())for(var r=(i=we(i.value.Ph)).next();!r.done;r=i.next())t.push(r.value);if(t.length!=new Set(t).size)throw new ke(2,4,4018)}for(t=e.filter(function(e){return!e.wf}),e=we(e=e.filter(function(e){return e.wf})),n=e.next();!n.done;n=e.next()){n=n.value,i=n.wf.split(" ");for(var a=(r=we(t)).next();!a.done;a=r.next()){var o=a.value;if(i.includes(o.id)){a={};for(var s=(o=we(o.streams)).next();!s.done;a={pd:a.pd},s=o.next())a.pd=s.value,a.pd.trickModeVideo=n.streams.find(function(t){return function(e){return Ht(t.pd.codecs)==Ht(e.codecs)}}(a))}}}if(e=Df(A.h.disableAudio,t,"audio"),n=Df(A.h.disableVideo,t,"video"),i=Df(A.h.disableText,t,ce),t=Df(A.h.disableThumbnails,t,"image"),0===n.length&&0===e.length)throw new ke(2,4,4004);return{id:E.ta.id,audioStreams:e,videoStreams:n,textStreams:i,imageStreams:t}}(e,t,n,{start:d,duration:p,node:l,Le:null==p||!c}),a.push(o),t.ta.id&&p&&(e.K[t.ta.id]=p),null==p){o=null;break}o=d+p}}return e.J=a.map(function(e){return e.id}),null!=r?{periods:a,duration:r,Lf:!1}:{periods:a,duration:o,Lf:!0}}(c,B,L,d),K=F.duration,V=F.periods,"static"!=G&&F.Lf||_.Pa(K||1/0),c.A&&!c.s&&c.i.isAutoLowLatencyMode()&&(c.i.enableLowLatencyMode(),c.s=c.i.isLowLatencyMode()),c.s?_.lg(c.A):c.A&&X("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."),_.Ye(P||1),xe(e,c.l.Gf(V,B.zb),2);case 2:return xe(e,w,3);case 3:if(c.s&&(N=0),c.j){c.j.variants=c.l.j,0<(H=c.l.Ie()).length&&(c.j.textStreams=H),c.j.imageStreams=c.l.i,c.i.filter(c.j),e.B(4);break}if(c.j={presentationTimeline:_,variants:c.l.j,textStreams:c.l.Ie(),imageStreams:c.l.i,offlineSessionIds:[],minBufferTime:N||0,sequenceMode:c.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:function(e){if(!(e=Mr(e,"ServiceDescription")))return null;var t=Mr(e,"Latency"),n=Mr(e,"PlaybackRate");{var i;if(t&&t.getAttribute("max")||n)return e=t&&t.getAttribute("max")?parseInt(t.getAttribute("max"),10)/1e3:null,i=n?parseFloat(n.getAttribute("max")):null,t=t&&t.getAttribute("min")?parseInt(t.getAttribute("min"),10)/1e3:null,n=n?parseFloat(n.getAttribute("min")):null,{maxLatency:e,maxPlaybackRate:i,minLatency:t,minPlaybackRate:n}}return null}(d)},_.ug())return G=z(d,"UTCTiming"),xe(e,(t=c,n=L,i=G,Ie(function(e){switch(e.g){case 1:a=i.map(function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}),r=t.h.dash.clockSyncUri,!a.length&&r&&a.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),r=we(a),a=r.next();case 2:if(a.done){e.B(4);break}switch(o=a.value,Se(e,5),s=o.scheme,u=o.value,s){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 l=Date.parse(u),e.return(isNaN(l)?0:l-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",s)}e.B(9);break;case 7:return xe(e,Nf(t,n,u,"HEAD"),10);case 10:return e.return(e.h);case 8:return xe(e,Nf(t,n,u,"GET"),11);case 11:return e.return(e.h);case 9:Ae(e,3);break;case 5:Ee(e);case 3:a=r.next(),e.B(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),e.return(0)}})),6);e.B(5);break;case 6:if(K=e.h,!c.i)return e.return();_.mg(K);case 5:_.Nd();case 4:c.i.makeTextStreamsForClosedCaptions(c.j),Te(e)}var t,n,i,r,a,o,s,u,l})}function Df(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,le(t.streams)),e},[])}function Rf(e,t){e.F<0||e.G.U(Math.max(e.F-t,H(e.H)))}function Lf(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Td:null,audioSamplingRate:null,ac:0,jf:0},i=i||n.cb;var r,a=t.getAttribute("id"),o=z(t,"BaseURL"),s=!1;if(e.g)for(var u=(g=we(o)).next();!u.done;u=g.next()){var u=(l=u.value).getAttribute("serviceLocation"),l=Pr(l);u&&l&&(Xh(e.g,a,u,l),s=!0)}s&&e.g||(r=o.map(Pr)),g=t.getAttribute("contentType")||n.contentType,u=t.getAttribute("mimeType")||n.mimeType,l=t.getAttribute("codecs")||n.codecs;var c=W(t,"frameRate",Kr)||n.frameRate,d=t.getAttribute("sar")||n.pixelAspectRatio,h=function(e,t){t=t.slice();for(var n=(e=we(e)).next();!n.done;n=e.next())n=n.value.getAttribute("schemeIdUri"),t.includes(n)||t.push(n);return t}(z(t,"InbandEventStream"),n.emsgSchemeIdUris),f=function(e){for(var t=(e=we(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;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(n,10))return t;continue;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}(z(t,"AudioChannelConfiguration"))||n.Td,p=W(t,"audioSamplingRate",Vr)||n.audioSamplingRate,g=g||Pf(u,l),m=Mr(t,"SegmentBase"),v=Mr(t,"SegmentTemplate"),y=m&&W(m,"availabilityTimeOffset",Hr)||0,b=v&&W(v,"availabilityTimeOffset",Hr)||0,w=o&&o.length&&W(o[0],"availabilityTimeOffset",Hr)||0,y=n.ac+w+y+b,b=null;return(w=Mr(t,"SegmentSequenceProperties"))&&(w=Mr(w,"SAP"))&&(b=W(w,"cadence",Br)),{cb:function(){return Lt(i(),o.length?e.g&&s?zh(e.g,a):r||[]:[])},ed:m||n.ed,Fb:Mr(t,"SegmentList")||n.Fb,fd:v||n.fd,width:W(t,"width",Vr)||n.width,height:W(t,"height",Vr)||n.height,contentType:g,mimeType:u,codecs:l,frameRate:c,pixelAspectRatio:d,emsgSchemeIdUris:h,id:a,language:t.getAttribute("lang"),Td:f,audioSamplingRate:p,ac:y,jf:b||n.jf}}function Nf(t,n,i,r){var a,o,s;return Ie(function(e){if(1==e.g)return a=Lt(n(),[i]),(a=Fi(a,t.h.retryParameters)).method=r,a=t.i.networkingEngine.request(4,a),Oi(t.C,a),xe(e,a.promise,2);if(a=e.h,"HEAD"==r){if(!a.headers||!a.headers.date)return e.return(0);o=a.headers.date}else o=nr(a.data);return s=Date.parse(o),isNaN(s)?e.return(0):e.return(s-Date.now())})}function Pf(e,t){return Yt(t=Bt(e,t))?ce:e.split("/")[0]}function _f(e,t,n,i){return t=e.i.networkingEngine.request(n,t,i),Oi(e.C,t),t.promise}function jf(){}(e=kf.prototype).configure=function(e){this.h=e,this.g&&this.g.configure(this.h),this.l&&(this.l.m=this.h.dash.multiTypeVariantsAllowed&&ee())},e.start=function(t,n){var i,r=this;return Ie(function(e){if(1==e.g)return r.s=n.isLowLatencyMode(),r.o=[t],r.i=n,xe(e,Cf(r),2);if(i=e.h,r.i&&Rf(r,i),r.i)return e.return(r.j);throw new ke(2,7,7001)})},e.stop=function(){for(var e=we(Object.values(this.m)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.l&&this.l.release(),this.h=this.i=null,this.o=[],this.j=null,this.m={},(this.l=null)!=this.G&&(this.G.stop(),this.G=null),this.g&&this.g.destroy(),this.C.destroy()},e.update=function(){var t,n=this;return Ie(function(e){return 1==e.g?(Se(e,2),xe(e,Cf(n),4)):2!=e.g?Ae(e,0):(t=Ee(e),n.i&&t?(n.i.onError(t),void Te(e)):e.return())})},e.onExpirationUpdated=function(){},e.onInitialVariantChosen=function(e){var t,n;this.j&&this.j.presentationTimeline.R()&&((t=e.video||e.audio)&&t.segmentIndex&&(e=this.j.presentationTimeline.Bb(),null!=(n=t.segmentIndex.find(e))&&(t=t.segmentIndex.get(n))&&(this.F=t.endTime-e,Rf(this,0))))},e.banLocation=function(e){this.g&&this.g.i.set(e,Date.now()+6e4)},t("shaka.dash.DashParser",kf),wa["application/dash+xml"]=function(){return new kf},wa["video/vnd.mpeg.dash.mpd"]=function(){return new kf},t("shaka.dependencies",jf),jf.has=function(e){return Bf.has(e)},jf.add=function(e,t){if(!Uf[e])throw Error(e+" is not supported");e==Of?di("mux.js","mux.js is no longer used in Shaka Player."):Bf.set(e,function(){return t})};var Of="muxjs",Uf={cj:Of,ISOBoxer:"ISOBoxer"},Bf=(jf.Allowed=Uf,new Map([["ISOBoxer",function(){return q.ISOBoxer}]]));function Ff(e,t,n){this.type=e,this.g=t,this.segments=n||null}function Vf(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function Hf(e){var t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return e.toString(t)}function pe(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function Gf(e,t){if(e=e.getAttribute(t))return e.value;throw new ke(2,4,4023,t)}function Kf(e,t,n){n=void 0===n?[]:n,this.g=t,this.h=e,this.fb=n}function qf(e,t){this.name=e,this.value=t}function Xf(e,t){return e.filter(function(e){return e.name==t})}function zf(e,t){return e.filter(function(e){return Gf(e,"TYPE")==t})}function Wf(e,t){for(var n=(e=we(e)).next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function Yf(e,t,n){return n=void 0===n?0:n,(e=Wf(e,t))?Number(e.value):n}function $f(e,t,n){return t?Jf(e,[t],n):[]}function Jf(e,t,n){if(!t.length)return[];t=Lt(e,t),e=[];for(var i=(t=we(t)).next();!i.done;i=t.next()){var r=e,a=r.push,o=i.value;if((i=n)&&i.size){var s=(o=String(o).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(s)for(var u=(s=we(s)).next();!u.done;u=s.next()){var l=(u=u.value).slice(2,u.length-1),c=i.get(l);if(!c)throw new ke(2,4,4039,l);o=o.replace(u,c)}i=o}else i=o;a.call(r,i)}return e}function Qf(e){this.h=e||"",this.g=0}function Zf(e){ep(e,/[ \t]+/gm)}function ep(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 tp(e){return e.g!=e.h.length&&(e=ep(e,/[^ \t\n]*/gm))?e[0]:null}function np(){this.g=0}function ip(e,t){var n=(t=(t=nr(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new ke(2,4,4015);for(var i=!(t=0),r=we(n),a=r.next();!a.done;a=r.next())if(a=a.value,/^#(?!EXT)/m.test(a)||i)i=!1;else{if(a=rp(e,a),--e.g,ap.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(i=!0)}for(r=[],i=!0,a=0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||i)i=!1;else{if(o=rp(e,o),op.includes(o.name)){if(1!=t)throw new ke(2,4,4017);o=n.splice(a,n.length-a);for(var n=[],i=[],a=[],s=null,u=(o=we(o)).next();!u.done;u=o.next())u=u.value,/^(#EXT)/.test(u)?(u=rp(e,u),ap.includes(u.name)?r.push(u):"EXT-X-MAP"==u.name?s=u:"EXT-X-PART"==u.name?a.push(u):"EXT-X-PRELOAD-HINT"==u.name?"PART"==pe(u,"TYPE")?a.push(u):"MAP"==pe(u,"TYPE")&&(u.name="EXT-X-MAP",s=u):i.push(u)):/^#(?!EXT)/m.test(u)||(u=u.trim(),s&&i.push(s),n.push(new Kf(u,i,a)),i=[],a=[]);return a.length&&(s&&i.push(s),n.push(new Kf("",i,a))),new Ff(t,r,n)}r.push(o),"EXT-X-STREAM-INF"==o.name&&(o.g.push(new qf("URI",s)),i=!0)}}return new Ff(t,r)}function rp(e,t){if(e=e.g++,!(a=t.match(/^#(EXT[^:]*)(?::(.*))?$/)))throw new ke(2,4,4016,t);t=a[1];var n,i,r=a[2],a=[];if(r){(i=ep(r=new Qf(r),/^([^,=]+)(?:,|$)/g))&&(n=i[1]);for(var o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;i=ep(r,o);)a.push(new qf(i[1],i[2]||i[3])),Zf(r)}return new Vf(e,t,a,n)}Vf.prototype.toString=function(t){var e="#"+this.name,n=this.g?this.g.filter(function(e){return!t||!t.has(e.name)}).map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&n.unshift(this.value),0<n.length&&(e+=":"+n.join(",")),e},Vf.prototype.getAttribute=function(t){var e=this.g.filter(function(e){return e.name==t});return e.length?e[0]:null};var ap="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(" "),op="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function sp(){}function up(e){try{var t=lp(e);return Ri({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return Mi(e)}}function lp(e){var t=e.split(":");if(t.length<2||"data"!=t[0])throw new ke(2,1,1004,e);if((t=t.slice(1).join(":").split(",")).length<2)throw new ke(2,1,1004,e);var n=t[0],i=(e=q.decodeURIComponent(t.slice(1).join(",")),n=(t=n.split(";"))[0],!1);return 1<t.length&&"base64"==t[t.length-1]&&(i=!0,t.pop()),{data:(i?Sr:ar)(e),contentType:n}}function cp(e){var t=Kt(e);return{type:t.split("/")[0],mimeType:t,codecs:e=qt(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}function dp(e,t){function i(e){return n(e.name)}function n(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":r.push(e+".42E01E"),o=!0;break;case"hev1":case"hvc1":r.push(e+".1.6.L93.90"),o=!0;break;case"dvh1":case"dvhe":r.push(e+".05.04"),o=!0;break;case"vp09":r.push(e+".00.10.08"),o=!0;break;case"av01":r.push(e+".0.01M.08"),o=!0;break;case"mp4a":r.push("mp4a.40.2"),a=!0;break;case"ac-3":case"ec-3":case"opus":case"flac":r.push(e),a=!0}}var r=[],a=!1,o=!1,s=null,u=null,l=null,c=null,d=null;if((new dr).box("moov",P).box("trak",P).O("tkhd",function(e){e=Ha(e.reader,e.version),u=String(e.height),l=String(e.width)}).box("mdia",P).O("mdhd",function(e){s=Fa(e.reader,e.version).language}).box("minf",P).box("stbl",P).O("stsd",hr).box("mp4a",function(e){var t=e.reader,n=(t.skip(6),t.skip(2),t.skip(8),t.Ea());t.skip(2),t.skip(2),t.skip(2),t=t.Ea()+t.Ea()/65536,c=n,d=t,(e.reader.ia()?P:i)(e)}).box("esds",function(e){e=function(e){for(var t,n="mp4a";e.ia();){for(var i=e.ga(),r=e.ga();128&r;)r=e.ga();if(3==i)e.Ea(),128&(r=e.ga())&&e.Ea(),64&r&&e.skip(e.ga()),32&r&&e.Ea();else if(4==i)t=e.ga(),e.skip(12);else if(5==i)break}return t&&(n+="."+this.g(t),5==i&&e.ia()&&(n+="."+(t=31===(t=(248&(i=e.ga()))>>3)&&e.ia()?32+((7&i)<<3)+((224&e.ga())>>5):t))),{ha:n}}(e.reader),r.push(e.ha),a=!0}).box("ac-3",i).box("ec-3",i).box("opus",i).box("Opus",i).box("fLaC",i).box("avc1",function(e){e=Ga(e.reader,e.name),r.push(e.ha),o=!0}).box("avc3",function(e){e=Ga(e.reader,e.name),r.push(e.ha),o=!0}).box("hev1",i).box("hvc1",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("enca",fr).box("encv",fr).box("sinf",P).box("frma",function(e){n(e=Ka(e.reader).ha)}).parse(e||t,!0),!r.length)return null;var h=a&&!o,f=new Map;if(o){var p=new Ne("video/mp4");for(e&&p.init(e),p.i(t),t=(e=we(p.j())).next();!t.done;t=e.next())t=t.value,f.set(t,t);p.h()}return{type:h?"audio":"video",mimeType:h?"audio/mp4":"video/mp4",codecs:function(e){for(var t=new Set,n=[],i=(e=we(e)).next();!i.done;i=e.next()){var r=Gt(i=i.value);t.has(r)||(n.push(i),t.add(r))}return n}(r).join(", "),language:s,height:u,width:l,channelCount:c,sampleRate:d,closedCaptions:f}}function hp(){var e=this;this.g=this.i=null,this.u=1,this.o=new Map,this.H=new Map,this.J=new Map,this.J.set("video",new Map),this.J.set("audio",new Map),this.J.set(ce,new Map),this.J.set("image",new Map),this.Ba=new Set,this.h=new Map,this.l=null,this.Y="",this.za=new np,this.I=-1,this.V=1/0,this.da=this.mb=!1,this.s=new I(function(){var t,n,i;t=e,Ie(function(e){switch(e.g){case 1:return t.i?(Se(e,2),n=Date.now(),xe(e,t.update(),4)):e.return();case 4:i=Date.now(),Vp(t)&&(i=(i-n)/1e3,t.kb.sample(1,i),i=t.m,i=Math.max(0,i-H(t.kb)),t.s.U(i)),Ae(e,3);break;case 2:if(i=Ee(e),!t.i)return e.return();if(t.g.raiseFatalErrorOnManifestUpdateRequestFailure)return t.i.onError(i),e.return();i.severity=1,t.i.onError(i),t.s.U(.1);case 3:if(!t.i)return e.return();t.i.onManifestUpdated(),Te(e)}})}),this.ea=zp,this.C=null,this.Aa=0,this.m=1/0,this.ma=this.ka=this.K=0,this.N=new ji,this.F=new Map,this.G=new Map,this.W=new Map,this.lb=this.A=!1,this.kb=new F(5),this.j=null}function fp(e,t){return Vp(e)?e.J.get(t.type):t.Pd}function pp(e,t,n){t.Sb+=n,t.rb+=n;for(var i=we(e=fp(e,t)),r=i.next();!r.done;r=i.next()){var r=(a=we(r.value)).next().value,a=a.next().value;e.set(r,a+n)}t.Z()}function gp(u,l,c){var d,h,f,p,g,m,v,y,b;return Ie(function(e){switch(e.g){case 1:if(d=cp(u.g.hls.mediaPlaylistFullMimeType),!l.segments.length)return e.return(d);if(m=Math.trunc((l.segments.length-1)/2),m=l.segments[m],h=$f(c(),l.segments[0].h),f=h[0],f=new gt(f),f=f.Ga.split(".").pop(),p=Kp[f])return e.return(cp(p));if(p=Ki,g=null,m=Pp(u,l,m.g,c),u.W.clear(),m)return m=ws(m.Z(),m.ic(),m.fc(),u.g.retryParameters),xe(e,Gp(u,m,p,{type:0}),3);e.B(2);break;case 3:m=e.h,g=m.data;case 2:return v=Fi(h,u.g.retryParameters),xe(e,Gp(u,v,p,{type:1}),4);case 4:if(v=e.h,(y=v.headers["content-type"])&&(y=y.split(";")[0].toLowerCase()),"ts"==f||"video/mp2t"==y){var t=ne(o=v.data),n=(t=(new Qa).parse(t)).Pc(),i=(t=t.Je(),[]),r=!1,a=!1;switch(n.audio){case"aac":i.push("mp4a.40.2"),r=!0;break;case"mp3":i.push("mp4a.40.34"),r=!0;break;case"ac3":i.push("ac-3"),r=!0;break;case"ec3":i.push("ec-3"),r=!0}switch(n.video){case"avc":t.ha?i.push(t.ha):i.push("avc1.42E01E"),a=!0;break;case"hvc":t.ha?i.push(t.ha):i.push("hvc1.1.6.L93.90"),a=!0}if(i.length){if(n=r&&!a,r=new Map,a){(a=new Ne("video/mp2t")).i(o);for(var o,s=(o=we(a.j())).next();!s.done;s=o.next())s=s.value,r.set(s,s);a.h()}t={type:n?"audio":"video",mimeType:"video/mp2t",codecs:i.join(", "),language:null,height:t.height,width:t.width,channelCount:null,sampleRate:null,closedCaptions:r}}else t=null;if(b=t)return e.return(b)}else if(("mp4"==f||"cmfv"==f||"m4s"==f||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)&&(b=dp(g,v.data)))return e.return(b);return e.return(d)}})}function mp(e){if(Vp(e)){if(e.ea==Yp&&(t=function(e){for(var t=1/0,n=1/0,i=(e=we(e.h.values())).next();!i.done;i=e.next())(i=i.value).stream.segmentIndex&&"text"!=i.stream.type&&(t=Math.min(t,i.rb),n=Math.min(n,i.Sb));return t-n}(e),e.g.hls.useSafariBehaviorForLive&&(t=e.l.o),isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Xd(t)),!e.l.m)for(var t,n=(t=we(t=Array.from(e.h.values()).filter(function(e){return e.stream.segmentIndex}))).next();!n.done;n=t.next())("audio"==(n=n.value).type||"video"==n.type)&&(n=n.stream.segmentIndex.get(0))&&n.ca&&e.l.qf(n.ca)}else e.l.Pa(Ap(e));e.l.Nd()}function vp(e,t,n){n=new gt(n).g;for(var i=new Map,r=(t=we(t)).next();!r.done;r=t.next()){var a=pe(s=r.value,"NAME"),o=pe(s,"VALUE"),r=pe(s,"QUERYPARAM"),s=pe(s,"IMPORT");a&&o&&(i.has(a)||i.set(a,o)),r&&(a=n.get(r)[0])&&!i.has(a)&&i.set(r,a),s&&(r=e.o.get(s))&&i.set(s,r)}return i}function yp(e,t){var n=pe(t,"CODECS")||"";e.da=0<n.length,e.da||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),n=t.join(",")),e=new Set,t=[];for(var i=(n=we(n.split(/\s*,\s*/))).next();!i.done;i=n.next()){var r=Gt(i=i.value);e.has(r)||(t.push(i),e.add(r))}return t}function bp(e){return(e=pe(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function wp(e){return(e=pe(e,"SAMPLE-RATE"))?parseInt(e,10):null}function xp(e){return!!(e=pe(e,"CHANNELS"))&&e.includes("/JOC")}function Tp(e,t,n){for(var i=[],r=[],a=new Map,o=we(t),s=o.next();!s.done;s=o.next()){var s=Gf(u=s.value,"URI"),u=Gf(u,"GROUP-ID");i.push(s),r.push(u),a.set(u,s)}if(o=r.sort().join(","),s=t[0],t="",(u="subtitles"==(u=Gf(s,"TYPE").toLowerCase())?ce:u)==ce)t=pe(s,"CODECS")||"";else for(var l=(r=we(r)).next();!l.done;l=r.next())if(l=l.value,e.G.has(l)){t=e.G.get(l);break}if(r=i.sort().join(","),e.h.has(r))return e.h.get(r);if(l=e.u++,e.j)for(var c=(a=we(a)).next();!c.done;c=a.next()){var c=(d=we(c.value)).next().value,d=d.next().value;(c=n.get(c))&&Xh(e.j,l,c,d)}n=pe(s,"LANGUAGE"),a=pe(s,"NAME"),c="YES"==pe(s,"DEFAULT"),d="audio"==u?bp(s):null;var h="audio"==u&&xp(s);return(i=Sp(e,l,i,t,u,n,c,a,d,null,pe(s,"CHARACTERISTICS"),"YES"==pe(s,"FORCED"),s="audio"==u?wp(s):null,h)).stream&&(i.stream.groupId=o),e.H.has(o)?e.H.get(o).push(i):e.H.set(o,[i]),e.h.set(r,i),i}function Sp(f,e,t,p,g,m,v,y,b,w,x,T,S,A){function n(t){var n,i,r,a,o,s,u,l,c,d,h;return Ie(function(e){switch(e.g){case 1:return n=C.Z(),xe(e,Fp(f,C.Z(),!0),2);case 2:if(r=e.h,t.aborted)return e.return();if((i=r.uri)==r.originalUri||n.includes(i)||k.push(i),r=ip(f.za,r.data),a=void 0,!f.da&&f.g.hls.disableCodecGuessing)return xe(e,gp(f,r,E),4);e.B(3);break;case 4:s=e.h,a=s.mimeType,p=s.codecs;case 3:return o=Vp(f),xe(e,kp(f,0,r,E,i,p,g,m,v,y,b,w,x,T,S,A,a),5);case 5:if(s=e.h,t.aborted)return e.return();if(u=s.stream,Vp(f)&&!o&&Np(f,r),C.Sb=s.Sb,C.rb=s.rb,C.td=s.td,C.sd=s.sd,C.Sc=s.Sc,C.Pd=s.Pd,C.Xa=s.Xa,C.Ya=s.Ya,C.Se=!0,I.segmentIndex=u.segmentIndex,I.encrypted=u.encrypted,I.drmInfos=u.drmInfos,I.keyIds=u.keyIds,I.mimeType=u.mimeType,I.bandwidth=I.bandwidth||u.bandwidth,I.codecs=I.codecs||u.codecs,I.drmInfos.length&&f.i.newDrmInfo(I),g==(h=jt).$||g==h.P)for(l=we(f.h.values()),c=l.next();!c.done;c=l.next())(d=c.value).Se||d.type!=g||(d.stream.mimeType=u.mimeType);g==h.na&&(h=u.segmentIndex.get(0))&&h.aa&&(I.mimeType="application/mp4"),!function(e){if(!e.C)return;for(var t=[],n=[],i=(e=we(e.C.variants)).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}))}(f)||(f.mb?Ip(f,[C]):(f.mb=!0,h=Array.from(f.h.values()),h=h.filter(function(e){return e.stream.segmentIndex}),Ip(f,h),mp(f),0<(h=f.m)&&f.s.U(h))),Te(e)}})}function E(){return f.j&&1<t.length?zh(f.j,e):k.concat(Jf([f.Y],t,f.o))}var I=Mp(f,p,g,m,v,y,b,w,x,T,S,A),k=[],C={stream:I,type:g,gg:k,Z:E,Sb:0,rb:0,Pd:new Map,td:!1,sd:!1,Sc:!1,qe:-1,Xa:-1,Ya:-1,Se:!1},i=null,r=new AbortController;return I.createSegmentIndex=function(){return i||(r=new AbortController,i=new Promise(function(e){e(n(r.signal))}))},I.closeSegmentIndex=function(){i&&!I.segmentIndex&&r.abort(),I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null),i=null},C}function Ap(e){for(var t=1/0,n=(e=we(e.h.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&(t=Math.min(t,n.rb));return t}function Ep(e,t){for(var n=[],i=(t=we(t)).next();!i.done;i=t.next())(i=i.value).segmentIndex&&es(i.segmentIndex,function(e){n.push(e)});e.l.Xc(n)}function Ip(e,t){if(!Vp(e))for(var n=Ap(e),i=we(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.bc(0,n);Ep(e,t.map(function(e){return e.stream})),(e.g.hls.ignoreManifestProgramDateTime?function(e,t){for(var n=-1==e.I,i=we(t),r=i.next();!r.done;r=i.next()){var a=(r=r.value).stream.segmentIndex,o=fp(e,r);if(a=a.g[0]||null)for(var s=(o=we(o)).next();!s.done;s=o.next()){var u=(s=we(s.value)).next().value;if(s.next().value==a.startTime){n&&(e.I=Math.max(e.I,u)),r.qe=u;break}}}if(!(e.I<0))for(r=(t=we(t)).next();!r.done;r=t.next())(i=(n=r.value).stream.segmentIndex)&&(i.g.splice(0,e.I-n.qe),(i=i.g[0]||null)&&(i=-i.startTime,n.stream.segmentIndex.offset(i),pp(e,n,i)))}:function(e,t){if(1/0==e.V)for(var n=(t=we(t)).next();!n.done;n=t.next()){var i=n.value.stream.segmentIndex.g[0]||null;null!=i&&null!=i.ca&&(e.V=Math.min(e.V,i.ca))}if(1/0!=(t=e.V))for(n=(i=we(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.ca)Y("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.Z(),"Expect AV sync issues!");else for(pp(e,n,a.ca-t-a.startTime),r=(n=we(r)).next();!r.done;r=n.next())r.value.tf(t)}}})(e,t)}function kp(m,e,v,y,b,w,x,T,S,A,E,I,k,C,M,D,R){var L,N,P,_,j,O,U,B,F;return Ie(function(e){if(1==e.g){if(1!=v.type)throw new ke(2,4,4017);L=Xf(v.g,"EXT-X-DEFINE"),L=vp(m,L,b);var t=Wf(v.g,"EXT-X-PLAYLIST-TYPE"),n=Wf(v.g,"EXT-X-ENDLIST"),n=t&&"VOD"==t.value||n,t=t&&"EVENT"==t.value&&!n;return t=!n&&!t,Hp(m,n?zp:t?Yp:Wp),Vp(m)&&Lp(m,v),R?e.B(2):xe(e,(i=m,r=x,a=w,o=v,s=L,u=y,Ie(function(e){switch(e.g){case 1:return(l=Ki,g=Math.trunc((o.segments.length-1)/2),g=$f(u(),o.segments[g].h,s),f=new gt(g[0]),f=f.Ga.split(".").pop(),p=qp[r],(p=p[f])||(p=Kp[f])||(p=Op(r,a)))?e.return(p):(d=1,h=Fi(g,i.g.retryParameters),Se(e,2),h.method="HEAD",xe(e,Gp(i,h,l,{type:d}),4));case 4:f=e.h,c=f.headers["content-type"],Ae(e,3);break;case 2:if(!(p=Ee(e))||1002!=p.code&&1001!=p.code){e.B(3);break}return h.method="GET",xe(e,Gp(i,h,l,{type:d}),6);case 6:g=e.h,c=g.headers["content-type"];case 3:return c?e.return(c.split(";")[0]):e.return(Up(r))}})),3)}var i,r,a,o,s,u,l,c,d,h,f,p,g;if(2!=e.g&&(R=e.h),N=Dp(v,R),_=N.drmInfos,B=N.keyIds,P=N.encrypted,N=N.Dg,!P||_.length||N)return(N=Mp(m,w,x,T,S,A,E,I,k,C,M,D)).encrypted=P,N.drmInfos=_,N.keyIds=B,N.mimeType=R,P=Vp(m)?m.J.get(x):new Map,_=jp(m,v,N,P,L,y),B=_.segments,(_=_.bandwidth)&&(N.bandwidth=_),Vp(m)&&Lp(m,v),_=B[0].startTime,j=B[B.length-1],j=j.endTime,U=new V(B),N.segmentIndex=U,O=!!(U=Wf(v.g,"EXT-X-SERVER-CONTROL"))&&null!=U.getAttribute("CAN-SKIP-UNTIL"),U=!!U&&null!=U.getAttribute("CAN-BLOCK-RELOAD"),F=Yf(v.g,"EXT-X-MEDIA-SEQUENCE",0),F=Cp(F,B),B=F.Xa,F=F.Ya,e.return({stream:N,type:x,gg:[],Z:y,Sb:_,rb:j,td:O,sd:U,Sc:!1,qe:-1,Xa:B,Ya:F,Pd:P,Se:!1});throw new ke(2,4,4026)})}function Cp(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Xa:++e,Ya:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].l||(e++,n=0),{Xa:e,Ya:n}):{Xa:++e,Ya:n=t.m?0:n}}function Mp(e,t,n,i,r,a,o,s,u,l,c,d){var h=Op(n,t)||Up(n),f=[];if(u)for(var p=(u=we(u.split(","))).next();!p.done;p=u.next())f.push(p.value);return u=void 0,p=null,n==ce?u=f.includes("public.accessibility.transcribes-spoken-dialog")&&f.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":f.includes("public.accessibility.describes-video")&&(p="visually impaired"),f.length||"subtitle"!==u||f.push("subtitle"),{id:e.u++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==ce?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:de(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,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:p,external:!1,fastSwitching:!1}}function Dp(e,t){var n=[];if(e.segments)for(var i=(e=we(e.segments)).next();!i.done;i=e.next())i=Xf(i.value.g,"EXT-X-KEY"),n.push.apply(n,le(i));for(var i=e=!1,r=[],a=new Set,o=(n=we(n)).next();!o.done;o=n.next())if("NONE"!=(s=Gf(o=o.value,"METHOD")))if(e=!0,"AES-128"==s)i=!0;else if(s=pe(o,"KEYFORMAT")||"identity",o=(s=Xp[s])?s(o,t):null){if(o.keyIds)for(var s,u=(s=we(o.keyIds)).next();!u.done;u=s.next())a.add(u.value);r.push(o)}return{drmInfos:r,keyIds:a,encrypted:e,Dg:i}}function Rp(r,a,e,o,s){if(!q.crypto||!q.crypto.subtle)throw X("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new ke(2,4,4042);var t=0,n=pe(a,"IV","");if(n){var i=Ar(n.substr(2));if(16!=i.byteLength)throw new ke(2,4,4048)}else t=Yf(e.g,"EXT-X-MEDIA-SEQUENCE",0);var u={method:"AES-128",iv:i,firstMediaSequenceNumber:t,fetchKey:function(){var t,n,i;return Ie(function(e){if(1==e.g)return t=$f(o(),Gf(a,"URI"),s),t=Fi(t,r.g.retryParameters),xe(e,Gp(r,t,6),2);if(3!=e.g){if((t=e.h).data&&16==t.data.byteLength)return n={name:"AES-CBC"},i=u,xe(e,q.crypto.subtle.importKey("raw",t.data,n,!0,["decrypt"]),3);throw new ke(2,4,4049)}i.cryptoKey=e.h,u.fetchKey=void 0,Te(e)})}};return u}function Lp(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=Wf(i[r].g,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=Wf(t.g,"EXT-X-TARGETDURATION")))throw new ke(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Wf(t.g,"EXT-X-PART-INF"))&&(e.K=Number(Gf(r,"PART-TARGET"))),t=Wf(t.g,"EXT-X-SERVER-CONTROL"),e.A&&e.K?(e.m=!e.lb||5*e.K<=n?Math.min(e.K,e.m):Math.min(n,e.m),e.ma=t?Number(Gf(t,"PART-HOLD-BACK")):0):(e.m=Math.min(n,e.m),n=t?t.getAttribute("HOLD-BACK"):null,e.ka=n?Number(n.value):0),e.Aa=Math.max(i,e.Aa)}function Np(e,t){var n;t=e.g.defaultPresentationDelay||e.ma||e.ka||((t=t.segments.length)-2<(n=e.g.hls.liveSegmentsDelay)&&(n=Math.max(1,t-2)),e.Aa*n),e.l.qf(0),e.l.ng(t),e.l.pc(!1)}function Pp(e,t,n,i,r){var a=Wf(n,"EXT-X-MAP");if(!a)return null;var o,s,u,l,c,d=Gf(a,"URI"),h=$f(i(),d,r),d=[h.toString(),pe(a,"BYTERANGE","")].join("-");if(!e.W.has(d)){for(var f=void 0,p=null,g=(n=we(n)).next();!g.done;g=n.next())"EXT-X-KEY"==(g=g.value).name?"AES-128"==Gf(g,"METHOD")&&g.id<a.id&&(f=Rp(e,g,t,i,r)):"EXT-X-BYTERANGE"==g.name&&g.id<a.id&&(p=g);o=h,h=p,u=f,l=0,c=null,(s=!(s=pe(s=a,"BYTERANGE"))&&h?h.value:s)&&(l=s.split("@"),c=Number(l[0]),l=Number(l[1]),c=l+c-1,u&&(h=c+1-l)%16&&(c+=16-h%16)),t=new Aa(function(){return o},l,c,null,null,null,u),e.W.set(d,t)}return e.W.get(d)}function _p(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),i=(n=n[1]?Number(n[1]):e.wa+1)+t-1),[n,i]}function jp(e,t,n,i,r,a){for(var o=t.segments,s=void 0,u=Yf(t.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Yf(t.g,"EXT-X-MEDIA-SEQUENCE",0),c=(g=Wf(t.g,"EXT-X-SKIP"))?Number(pe(g,"SKIPPED-SEGMENTS")):0,d=l+c,h=0,f=(0===(h=Vp(e)&&i.has(d)?i.get(d):h)&&e.ea==Yp&&0<i.size&&!i.has(d)&&(h=e.l.eb()),[]),p=null,g=[],m=0;m<o.length;m++){var v=o[m],y=0==m?h:p.endTime,d=l+c+m;Wf(v.g,"EXT-X-DISCONTINUITY")&&u++;for(var b=we(v.g),w=b.next();!w.done;w=b.next())"EXT-X-KEY"==(w=w.value).name&&(s="AES-128"==Gf(w,"METHOD")?Rp(e,w,t,a,r):void 0);i.set(d,y),b=Pp(e,t,v.g,a,r),!e.A&&e.i.isAutoLowLatencyMode()&&(e.i.enableLowLatencyMode(),e.A=e.i.isLowLatencyMode()),(y=function(e,t,n,i,r,a,o,s,u){var l=i.g,c=Wf(l,"EXTINF"),d=0,h=0,f=null,p=(i.fb.length&&!e.A&&X("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."),null),g=(e.g.hls.ignoreManifestProgramDateTime||(v=Wf(l,"EXT-X-PROGRAM-DATE-TIME"))&&v.value&&(p=jr(v.value)),Ia);if(Wf(l,"EXT-X-GAP")&&(g=2),!c){if(0==i.fb.length)throw new ke(2,4,4024,"EXTINF");if(!e.A)return null}var m=[],v=!1,y=null,b=!1,w=!1;if(e.A&&i.fb.length)for(var d=("video/mp4"==o.mimeType||"audio/mp4"==o.mimeType)&&q.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization,x=p,T={},S=0;S<i.fb.length;T={Cc:T.Cc,md:T.md},S++){var A,E,I,k,C=i.fb[S],M=0==S?n:m[m.length-1],D=0==S?r:M.endTime,R=Number(pe(C,"DURATION"))||e.K;R&&(A=D+R,E=0,I=null,"EXT-X-PRELOAD-HINT"==C.name?(E=(E=pe(C,"BYTERANGE-START"))?Number(E):0,(M=pe(C,"BYTERANGE-LENGTH"))?I=E+Number(M)-1:E&&(I=Number.MAX_SAFE_INTEGER)):(E=(I=we(_p(M,E=pe(C,"BYTERANGE")))).next().value,I=I.next().value),T.md=pe(C,"URI"),T.md&&(M=Ia,"YES"==pe(C,"GAP")&&(M=2,b=!0),T.Cc=null,k=function(e){return function(){return null==e.Cc&&(e.Cc=$f(s(),e.md,a)),e.Cc}}(T),d&&0<=E&&null!=I&&(y=k,v=!0),D=new N(D,A,k,E,I,t,0,0,1/0,[],"",null,x,M,u),"EXT-X-PRELOAD-HINT"==C.name&&(D.Ue(),w=!0),"YES"!=pe(C,"INDEPENDENT")&&0<S&&D.Od(),m.push(D),x&&(x+=R)))}if(c){if(0==(c=Number(c.value.split(",")[0])))return null;d=r+c}else{if(!m.length)return null;d=m[m.length-1].endTime}v&&(b||0!=m[0].Qa?(v=!1,y=null):m=[]),(c=Wf(l,"EXT-X-BYTERANGE"))?(h=(f=we(_p(n,c.value))).next().value,f=f.next().value):m.length&&(h=m[0].Qa,f=m[m.length-1].wa),n="",c=null,"image"==o.type&&(n="1x1",o=Wf(l,"EXT-X-TILES"))&&(n=Gf(o,"LAYOUT"),(o=pe(o,"DURATION"))&&(c=Number(o)));var L=null;return t=new N(r,d,function(){return y?y():(L=null==L?$f(s(),i.h,a):L)||[]},h,f,t,0,0,1/0,m,n,c,p,g,u,0<m.length&&!!i.h),v&&(e.lb=!0,t.Zf(),w&&t.Ue()),t}(e,b,p,v,y,r,n,a,s))&&((p=Yf(v.g,"EXT-X-BITRATE"))?g.push({bitrate:p,duration:y.endTime-y.startTime}):g.length&&((p=g.pop()).duration+=y.endTime-y.startTime,g.push(p)),(p=y).i=u,e.g.hls.ignoreManifestProgramDateTime&&null!=e.I&&d<e.I||f.push(y))}if(t=void 0,g.length&&(t=g.reduce(function(e,t){return e+t.duration},0),t=Math.round(g.reduce(function(e,t){return e+t.bitrate*t.duration},0)/t*1e3)),g=f.some(function(e){return null!=e.ca}))for(n={},i=0;i<f.length;n={vc:n.vc,uc:n.uc,hd:n.hd,xb:n.xb,tc:n.tc},i++)if(n.xb=f[i],null==n.xb.ca)for(n.uc=0,n.vc=i,r=function(t){return function(){var e=f[t.vc];if(e){if(null!=e.ca)return e.ca+t.uc;t.uc-=e.endTime-e.startTime,t.vc+=1}return null}}(n),n.tc=0,n.hd=i,a=function(t){return function(){var e=f[t.hd];if(e){if(e!=t.xb&&(t.tc+=e.endTime-e.startTime),null!=e.ca)return e.ca+t.tc;--t.hd}return null}}(n);null==n.xb.ca;)n.xb.ca=a(),null==n.xb.ca&&(n.xb.ca=r());if(g)for(i=(n=we(f)).next();!i.done;i=n.next())for(i=(r=i.value).ca,a=(r=we(r.g)).next();!a.done;a=r.next())(a=a.value).ca=i,i+=a.endTime-a.startTime;if(e=e.V,g&&1/0!=e)for(i=(g=we(f)).next();!i.done;i=g.next())i.value.tf(e);return{segments:f,bandwidth:t}}function Op(e,t){if(e==ce){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":"mjpg"==t?"application/mp4":null:"image/jpeg"}function Up(e){return e==ce?"text/vtt":qp[e].mp4}function Bp(e,t,n,i,r,a){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=a||void 0)}function Fp(e,t,n){return Gp(e,Fi(t,e.g.retryParameters),0,{type:n?2:3})}function Vp(e){return e.ea!=zp}function Hp(e,t){e.ea=t,e.l&&e.l.pc(!Vp(e)),Vp(e)||e.s.stop()}function Gp(e,t,n,i){if(e.N)return t=e.i.networkingEngine.request(n,t,i),Oi(e.N,t),t.promise;throw new ke(2,7,7001)}t("shaka.net.DataUriPlugin",sp),Bi("data",sp.parse=up),(e=hp.prototype).configure=function(e){this.g=e,this.j&&this.j.configure(this.g)},e.start=function(t,n){var i,r=this;return Ie(function(e){return 1==e.g?(r.i=n,r.A=n.isLowLatencyMode(),xe(e,Fp(r,[t]),2)):3!=e.g?(i=e.h,r.Y=i.uri,xe(e,(j=r,O=i.data,U=t,Ie(function(e){switch(e.g){case 1:if(B=ip(j.za,O),G=Xf(B.g,"EXT-X-DEFINE"),F=[],V=[],H=[],1==B.type)return xe(e,gp(j,B,W=function(){return[U]}),6);for(var t=j,n=G,i=new gt(t.Y).g,r=(n=we(n)).next();!r.done;r=n.next()){var a=r.value,o=(r=pe(a,"NAME"),pe(a,"VALUE"));a=pe(a,"QUERYPARAM"),r&&o&&(t.o.has(r)||t.o.set(r,o)),a&&(r=i.get(a)[0])&&!t.o.has(r)&&t.o.set(a,r)}G=Xf(B.g,"EXT-X-MEDIA"),K=Xf(B.g,"EXT-X-STREAM-INF"),q=Xf(B.g,"EXT-X-IMAGE-STREAM-INF"),X=Xf(B.g,"EXT-X-I-FRAME-STREAM-INF"),z=Xf(B.g,"EXT-X-SESSION-KEY"),Y=Xf(B.g,"EXT-X-SESSION-DATA"),J=Xf(B.g,"EXT-X-CONTENT-STEERING");for(var s=j,u=Y,l=(u=we(u)).next();!l.done;l=u.next()){var c=l.value,d=pe(c,"DATA-ID"),h=(l=pe(c,"URI"),pe(c,"LANGUAGE"));c=pe(c,"VALUE"),d=(new Map).set("id",d),l&&d.set("uri",$f([s.Y],l,s.o)[0]),h&&d.set("language",h),c&&d.set("value",c),l=new he("sessiondata",d),s.i&&s.i.onEvent(l)}return xe(e,(M=j,D=J,Ie(function(e){if(!M.i||!M.g)return e.return();for(L=we(D),N=L.next();!N.done;N=L.next())if(_=N.value,P=pe(_,"PATHWAY-ID"),_=pe(_,"SERVER-URI"),P&&_){M.j=new Kh(M.i),M.j.configure(M.g),M.j.j=[M.Y],M.j.setManifestType("HLS"),M.j.h=P,R=qh(M.j,_);break}return xe(e,R,0)})),4);case 4:for(var f=j,p=K,g=(p=we(p)).next();!g.done;g=p.next()){var m,v=g.value,y=pe(v,"AUDIO"),b=(g=pe(v,"VIDEO"),pe(v,"SUBTITLES"));v=yp(f,v),b&&(m=_t(ce,v),f.G.set(b,m),Oe(v,m)),y&&(b=(b=_t("audio",v))||f.g.hls.defaultAudioCodec,f.G.set(y,b)),g&&(y=(y=_t("video",v))||f.g.hls.defaultVideoCodec,f.G.set(g,y))}for(var w=j,x=G,T=(x=we(x=zf(x,"CLOSED-CAPTIONS"))).next();!T.done;T=x.next()){var S=T.value,A=pe(S,"LANGUAGE");T=de(A||"und"),A||(A=pe(S,"NAME"))&&(T=A),A=Gf(S,"GROUP-ID"),S=Gf(S,"INSTREAM-ID").replace("SERVICE","svc"),w.F.get(A)||w.F.set(A,new Map),w.F.get(A).set(S,T)}return F=function(e,t,n,i){var r,a=[],o=new Set;if(0<n.length)for(var s=(n=we(n)).next();!s.done;s=n.next()){var u=Gf(s=s.value,"METHOD");if("NONE"!=u&&"AES-128"!=u&&(u=pe(s,"KEYFORMAT")||"identity",s=(u=Xp[u])?u(s,""):null)){if(s.keyIds)for(var l=(u=we(s.keyIds)).next();!l.done;l=u.next())o.add(l.value);a.push(s)}}for(n={},t=we(t),s=t.next();!s.done;s=t.next())s=s.value,u=Hf(s),n[u]?n[u].push(s):n[u]=[s];for(r in t=[],n){var c=(l=n[r])[0],d=(s=pe(c,"FRAME-RATE"),u=Number(pe(c,"AVERAGE-BANDWIDTH"))||Number(Gf(c,"BANDWIDTH")),pe(c,"RESOLUTION")),h=we(d?d.split("x"):[null,null]),f=(d=h.next().value,h=h.next().value,pe(c,"VIDEO-RANGE"));c=(c=(c=pe(c,"REQ-VIDEO-LAYOUT"))&&c.includes(",")?c.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]:c)||"CH-MONO",l=function(e,t,n,i){for(var r={audio:[],video:[]},a=new Map,o=[],s=!1,u=!1,l=we(t),c=l.next();!c.done;c=l.next()){var d=c.value,h=(c=pe(d,"AUDIO"),pe(d,"VIDEO")),f=c||h;f&&(o.includes(f)||o.push(f),(d=pe(d,"PATHWAY-ID"))&&a.set(f,d),c?s=!0:h&&(u=!0))}o.length&&n.length&&(l=n.filter(function(e){return o.includes(Gf(e,"GROUP-ID"))}),function(e,t,n){t=t.filter(function(e){var t=pe(e,"URI")||"";return"SUBTITLES"!=pe(e,"TYPE")&&""!=t});for(var i,r={},a=(t=we(t)).next();!a.done;a=t.next()){var o=Hf(a=a.value);r[o]?r[o].push(a):r[o]=[a]}for(i in r)Tp(e,r[i],n)}(e,l,a)),l=(a=o.sort().join(","))&&e.H.has(a)?e.H.get(a):[],s?r.audio.push.apply(r.audio,le(l)):u&&r.video.push.apply(r.video,le(l)),c=!1;var p=t.map(function(e){return Gf(e,"URI")});{var g;u=r.audio.find(function(e){return e&&e.Z().find(function(e){return p.includes(e)})}),s=yp(e,t[0]),h=_t("video",s),(f=_t("audio",s))&&!h?(u="audio",c=0<r.audio.length):!r.audio.length&&!r.video.length&&f&&h?(u="video",s=[[h,f].join()]):r.audio.length&&u?(u="audio",c=!0):u=r.video.length&&!r.audio.length?"audio":"video",c||(g=d=f=h=c=null,!l.length&&(n=n.find(function(e){var t=pe(e,"URI")||"",n=pe(e,"TYPE");return e=Gf(e,"GROUP-ID"),"SUBTITLES"!=n&&""==t&&o.includes(e)}))&&(c=pe(n,"LANGUAGE"),h=pe(n,"NAME"),f=bp(n),xp(n),d=pe(n,"CHARACTERISTICS"),g=wp(n)),e=function(e,t,n,i,r,a,o,s,u){for(var l=e.u++,c=[],d=we(t),h=d.next();!h.done;h=d.next()){var f=h.value;h=Gf(f,"URI"),f=pe(f,"PATHWAY-ID"),e.j&&f&&Xh(e.j,l,f,h),c.push(h)}if(d=c.sort().join(","),e.h.has(d))return e.h.get(d);e:{if(t=pe(t[0],"CLOSED-CAPTIONS"),"video"==i){if(t&&"NONE"!=t){t=e.F.get(t);break e}if(!t&&e.F.size)for(t=we(e.F.keys()).next();!t.done;){t=e.F.get(t.value);break e}}t=null}return n=Pt(i,n),i=Sp(e,l,c,n,i,r,!1,a,o,t,s,!1,u,!1),e.h.set(d,i),i}(e,t,s,u,c,h,f,d,g),a&&(e.stream.groupId=a),l.length||(e.stream.bandwidth=i),r[e.stream.type]=[e])}return r}(e,l,i,u),t.push.apply(t,le(function(e,t,n,i,r,a,o,s,u,l,c){for(var d=we(n),h=d.next();!h.done;h=d.next())Bp(h.value.stream,r,a,o,s,u);r=e.g.disableAudio,t.length&&!r||(t=[null]);r=e.g.disableVideo,n.length&&!r||(n=[null]);for(r=[],t=we(t),a=t.next();!a.done;a=t.next())for(a=a.value,o=we(n),s=o.next();!s.done;s=o.next()){var f=s.value,p=((s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=c),(u=f?f.stream:null)&&(u.drmInfos=l,u.keyIds=c),d=a?a.stream.drmInfos:null,h=f?f.stream.drmInfos:null,f=f?f.Z().sort().join(","):"",a?a.Z().sort().join(","):"");f=f+" - "+p,s&&u&&!la(d,h)||e.Ba.has(f)||(s={id:e.u++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Ba.add(f))}return r}(e,l.audio,l.video,u,d,h,s,f,c,a,o)))}return t.filter(function(e){return null!=e})}(j,K,z,G),V=function(t,e){var n=zf(e,"SUBTITLES");e=n.map(function(e){if(t.g.disableText)return null;try{return Tp(t,[e],new Map).stream}catch(e){if(t.g.hls.ignoreTextStreamFailures)return null;throw e}});for(var i=(n=we(n)).next();!i.done;i=n.next()){var r=Gf(i.value,"GROUP-ID");if((i=t.G.get(r))&&(r=t.H.get(r)))for(var a=(r=we(r)).next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=Op(ce,i)||Up(ce)}return e.filter(function(e){return e})}(j,G),xe(e,(E=j,I=q,k=X,Ie(function(e){return 1==e.g?(C=I.map(function(l){var c;return Ie(function(e){if(1==e.g)return E.g.disableThumbnails?e.return(null):(Se(e,2),xe(e,(t=E,n=l,Ie(function(e){return 1==e.g?(i=Gf(n,"URI"),o=pe(n,"CODECS","jpeg")||"",t.h.has(i)?e.return(t.h.get(i)):(r=pe(n,"LANGUAGE"),a=pe(n,"NAME"),s=pe(n,"CHARACTERISTICS"),r=Sp(t,t.u++,[i],o,"image",r,!1,a,null,null,s,!1,null,!1),(a=pe(n,"RESOLUTION"))?xe(e,r.stream.createSegmentIndex(),3):e.B(2))):(2!=e.g&&(o=r.stream.segmentIndex.get(0),s=o.tilesLayout)&&(r.stream.width=Number(a.split("x")[0])*Number(s.split("x")[0]),r.stream.height=Number(a.split("x")[1])*Number(s.split("x")[1])),(u=pe(n,"BANDWIDTH"))&&(r.stream.bandwidth=Number(u)),t.h.set(i,r),e.return(r))})),4));var t,n,i,r,a,o,s,u;if(2!=e.g)return c=e.h,e.return(c.stream);if(c=Ee(e),E.g.hls.ignoreImageStreamFailures)return e.return(null);throw c})}).concat(k.map(function(e){if(E.g.disableThumbnails)return null;try{var t,n,i,r,a,o,s,u,l,c=Gf(e,"URI"),d=pe(e,"CODECS")||"",h=E.h.has(c)?E.h.get(c):(t=pe(e,"LANGUAGE"),n=pe(e,"NAME"),i=pe(e,"CHARACTERISTICS"),r=Sp(E,E.u++,[c],d,"image",t,!1,n,null,null,i,!1,null,!1),s=(o=we((a=pe(e,"RESOLUTION"))?a.split("x"):[null,null])).next().value,u=o.next().value,r.stream.width=Number(s)||void 0,r.stream.height=Number(u)||void 0,(l=pe(e,"BANDWIDTH"))&&(r.stream.bandwidth=Number(l)),E.h.set(c,r),r);return"mjpg"!==(e=h).stream.codecs?null:e.stream}catch(e){if(E.g.hls.ignoreImageStreamFailures)return null;throw e}})),xe(e,Promise.all(C),2)):(C=e.h,e.return(C.filter(function(e){return e})))})),5);case 5:H=e.h,e.B(3);break;case 6:return Y=e.h,$=Y.type,J=Y.mimeType,ne=Y.codecs,Q=Y.language,Z=Y.height,ee=Y.width,ie=Y.channelCount,te=Y.sampleRate,re=Y.closedCaptions,xe(e,kp(j,j.u++,B,W,U,ne,$,Q,!0,"Media Playlist",ie,re,null,!1,te,!1,J),7);case 7:ne=e.h,j.h.set(U,ne),"video"==$&&Bp(ne.stream,ee,Z,null,null,null),F.push({id:0,language:de(Q||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==$?ne.stream:null,video:"video"==$?ne.stream:null,bandwidth:ne.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!j.i)throw new ke(2,7,7001);if(j.l=new fe(null,0),j.l.pc(!0),1==B.type&&(Vp(j)&&(Np(j,B),ie=j.m,j.s.U(ie)),re=Array.from(j.h.values()),Ip(j,re),mp(j)),j.C={presentationTimeline:j.l,variants:F,textStreams:V,imageStreams:H,offlineSessionIds:[],minBufferTime:0,sequenceMode:j.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:j.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null},j.da||!j.g.hls.disableCodecGuessing){e.B(8);break}for(ae=[],oe=we(j.C.variants),se=oe.next();!se.done;se=oe.next())(ue=se.value).audio&&""===ue.audio.codecs&&ae.push(ue.audio.createSegmentIndex()),ue.video&&""===ue.video.codecs&&ae.push(ue.video.createSegmentIndex());return xe(e,Promise.all(ae),8);case 8:j.i.makeTextStreamsForClosedCaptions(j.C),Te(e)}var E,I,k,C,M,D,R,L,N,P,_})),3)):e.return(r.C);var j,O,U,B,F,V,H,G,K,q,X,z,W,Y,$,J,Q,Z,ee,te,ne,ie,re,ae,oe,se,ue})},e.stop=function(){this.s&&(this.s.stop(),this.s=null);var e=[];return this.N&&(e.push(this.N.destroy()),this.N=null),this.g=this.i=null,this.Ba.clear(),this.C=null,this.h.clear(),this.H.clear(),this.G.clear(),this.o.clear(),this.W.clear(),this.j&&this.j.destroy(),Promise.all(e)},e.update=function(){var t,n,i,r,a,o,s,u=this;return Ie(function(e){if(1==e.g){if(!Vp(u))return e.return();for(t=[],n=Array.from(u.h.values()),u.m=1/0,n=n.filter(function(e){return e.stream.segmentIndex}),i=we(n),r=i.next();!r.done;r=i.next())a=r.value,t.push(function(t,n){var i,r,a,o,s,u,l,c,d,h,f,p,g;return Ie(function(e){if(1==e.g){for(i=[],r=we(n.Z()),a=r.next();!a.done;a=r.next())o=a.value,o=new gt(o),s=o.g,n.sd&&(0<=n.Xa&&s.add("_HLS_msn",String(n.Xa)),0<=n.Ya&&s.add("_HLS_part",String(n.Ya))),n.td&&s.add("_HLS_skip","YES"),Dt(s)&&bt(o,s),i.push(o.toString());return xe(e,Fp(t,i,!0),2)}if(p=e.h,!n.stream.segmentIndex)return e.return();if(1!=(u=ip(t.za,p.data)).type)throw new ke(2,4,4017);(l=p.uri)==p.originalUri||n.Z().includes(l)||n.gg.push(l),p=Xf(u.g,"EXT-X-DEFINE"),p=vp(t,p,l),l=n.stream,c=fp(t,n),d=Dp(u,l.mimeType),h=d.keyIds,d=d.drmInfos,function(e,t){return e.size===t.size&&[].concat(le(e)).every(function(e){return t.has(e)})}(l.keyIds,h)||(l.keyIds=h,l.drmInfos=d,t.i.newDrmInfo(l)),h=jp(t,u,l,c,p,n.Z),d=h.segments,(p=h.bandwidth)&&(l.bandwidth=p),l.segmentIndex.Wc(d,t.l.eb()),d.length&&(h=Yf(u.g,"EXT-X-MEDIA-SEQUENCE",0),p=(p=Wf(u.g,"EXT-X-SKIP"))?Number(pe(p,"SKIPPED-SEGMENTS")):0,g=Cp(h,d),f=g.Xa,g=g.Ya,n.Xa=f+p,n.Ya=g,f=c.get(h),l.segmentIndex.bb(f)),p=d[0],n.Sb=p.startTime,g=d[d.length-1],n.rb=g.endTime,Wf(u.g,"EXT-X-ENDLIST")&&(n.Sc=!0),Lp(t,u),Te(e)})}(u,a));return xe(e,Promise.all(t),2)}Ep(u,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.Sc}),n.length&&!o&&(Hp(u,$p.zg),s=n.map(function(e){return e.rb}),u.l.Pa(Math.min.apply(Math,le(s))),u.i.updateDuration()),o&&mp(u),Te(e)})},e.onExpirationUpdated=function(){},e.onInitialVariantChosen=function(){},e.banLocation=function(e){this.j&&this.j.i.set(e,Date.now()+6e4)},t("shaka.hls.HlsParser",hp);var Kp={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},qp={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"}},Xp={"com.apple.streamingkeydelivery":function(e,t){if("video/mp2t"==t)throw new ke(2,4,4040);if(q.shakaMediaKeysPolyfill)throw new ke(2,4,4041);return Nt("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=Gf(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=Nt("com.widevine.alpha",[{initDataType:"cenc",initData:t=ne((t=lp(t=Gf(e,"URI"))).data)}]),(e=pe(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=Gf(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?Nt("com.microsoft.playready",[{initDataType:"cenc",initData:e=Cr(e=ne((e=lp(e=Gf(e,"URI"))).data),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,t){if("video/mp2t"==t)throw new ke(2,4,4040);if(q.shakaMediaKeysPolyfill)throw new ke(2,4,4041);return e=Gf(e,"METHOD"),["SAMPLE-AES","SAMPLE-AES-CTR"].includes(e)?Nt("org.w3.clearkey",null):null}},zp="VOD",Wp="EVENT",Yp="LIVE",$p={zg:zp,oi:Wp,xi:Yp};function Jp(e){if(e=Qp(e))e:{for(var t=(e=we(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())if(t=Mr(t.value,"LA_URL")){e=t.textContent;break e}e=""}else e="";return e}function Qp(e){return(e=function(e){var t,n=0,i=De(e);if(i.getUint32(0,!0)!=e.byteLength)return[];e:{for(e=6,n=[];e<i.byteLength-1;){t=i.getUint16(e,!0),e+=2;var r=i.getUint16(e,!0);if(e+=2,0!=(1&r)||r+e>i.byteLength){i=[];break e}var a=ne(i,e,r);n.push({type:t,value:a}),e+=r}i=n}return i}(e=Sr(e.textContent)).filter(function(e){return e.type===Zp})[0])&&(e=qr(e=ir(e.value,!0),"WRMHEADER"))?e:null}wa["application/x-mpegurl"]=function(){return new hp},wa["application/vnd.apple.mpegurl"]=function(){return new hp};var Zp=1,eg=(new Map).set("com.microsoft.playready",Jp).set("com.microsoft.playready.recommendation",Jp).set("com.microsoft.playready.software",Jp).set("com.microsoft.playready.hardware",Jp);function tg(e){var t,n,i;cg||(cg=!0,t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]),Tg=b("ftyp",t,i,t,n),t=b("dref",Sg),Ag=b("dinf",t)),this.g=e}function ng(e){for(var t=[],n=we(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value,i=b,s=o.id+1,u=o.stream.width||0,l=o.stream.height||0,c=("audio"==o.type&&(l=u=0),o.duration*o.timescale),d=Math.floor(c/(dg+1)),c=Math.floor(c%(dg+1));switch(s=b("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(le(ug(s,4)),[0,0,0,0],le(ug(d,4)),le(ug(c,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],le(ug(u,2)),[0,0],le(ug(l,2)),[0,0]))),u=b,d=o.duration*o.timescale,l=Math.floor(d/(dg+1)),d=Math.floor(d%(dg+1)),c=(c=o.stream.language).charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=b("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(le(ug(o.timescale,4)),le(ug(l,4)),le(ug(d,4)),le(ug(c,2)),[0,0]))),d=o,c=new Uint8Array([]),d.type){case"video":c=fg;break;case"audio":c=pg}d=b("hdlr",c);e:{switch(o.type){case"video":o=b("minf",b("vmhd",bg),Ag,ig(o));break e;case"audio":o=b("minf",b("smhd",wg),Ag,ig(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,d,o)),a.call(r,i)}for(t=Ir.apply(wr,le(t)),n=b,i=(a=e.g[0]).duration*a.timescale,r=Math.floor(i/(dg+1)),i=Math.floor(i%(dg+1)),r=b("mvhd",r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(le(ug(a.timescale,4)),le(ug(r,4)),le(ug(i,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]))),i=[],u=(e=we(e.g)).next();!u.done;u=e.next())s=(o=i).push,u=b("trex",u=new Uint8Array([0,0,0,0].concat(le(ug(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))),s.call(o,u);if(e=b("mvex",e=Ir.apply(wr,le(i))),i=[],a.encrypted){for(o=(a=we(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=we(o.initData)).next();!s.done;s=o.next())i.push(s.value.initData);a=Ir.apply(wr,le(i))}else a=new Uint8Array([]);return e=n("moov",r,t,e,a),(t=new Uint8Array(Tg.byteLength+e.byteLength)).set(Tg),t.set(e,Tg.byteLength),t}function ig(e){var t=b,n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){var n=e.stream.width||0,i=e.stream.height||0;if(0<e.la.byteLength)var r=b("avcC",e.la);else{for(var r=b,a=7,o=[],s=[],u=0,l=0,c=0,d=0;d<e.Ra.length;d++){var h=lg(e.Ra[d]);switch(31&h[0]){case 7:o.push(h),a+=h.length+2;break;case 8:s.push(h),a+=h.length+2}}for(0<o.length&&(u=o[0][1],c=o[0][2],l=o[0][3]),d=0,(a=new Uint8Array(a))[d++]=1,a[d++]=u,a[d++]=c,a[d++]=l,a[d++]=255,a[d++]=224|o.length,u=0;u<o.length;u++)a[d++]=(65280&o[u].length)>>8,a[d++]=255&o[u].length,a.set(o[u],d),d+=o[u].length;for(a[d++]=s.length,o=0;o<s.length;o++)a[d++]=(65280&s[o].length)>>8,a[d++]=255&s[o].length,a.set(s[o],d),d+=s[o].length;r=r("avcC",a)}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(le(ug(n,2)),le(ug(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="avc1",s=rg(e),o=new Uint8Array([]),e.encrypted&&(o=og(e),i="encv"),n=b(i,n,r,s,o)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.la.byteLength&&(n=b("hvcC",e.la)),i=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(le(ug(i,2)),le(ug(r,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])),r="hvc1",s=rg(e),o=new Uint8Array([]),e.encrypted&&(o=og(e),r="encv"),n=b(r,i,n,s,o));break;case"audio":n=e=e.codecs.includes("mp3")?b(".mp3",ag(e)):(r=(i=e.codecs.includes("ac-3")?(n=b("dac3",e.fa),"ac-3"):e.codecs.includes("ec-3")?(n=b("dec3",e.fa),"ec-3"):(n=0<e.fa.byteLength?b("esds",e.fa):(n=b,i=e.id+1,r=e.stream.channelsCount||2,o=e.stream.audioSamplingRate||44100,u=Pt("audio",e.codecs.split(",")),s=(l={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})[o],"mp4a.40.5"!==u&&"mp4a.40.29"!==u||(s=l[2*o]),o=parseInt(u.split(".").pop(),10),n("esds",i=new Uint8Array([0,0,0,0,3,25].concat(le(ug(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,o<<3|s>>>1,s<<7|r<<3,6,1,2])))),"mp4a"),new Uint8Array([])),e.encrypted&&(r=og(e),i="enca"),b(i,ag(e),n,r))}return t("stbl",e=b("stsd",xg,n),b("stts",gg),b("stsc",mg),b("stsz",yg),b("stco",vg))}function rg(e){if(!e.sa&&!e.ua)return new Uint8Array([]);var t=e.ua;return b("pasp",e=new Uint8Array([].concat(le(ug(e.sa,4)),le(ug(t,4)))))}function ag(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(le(ug(e.stream.audioSamplingRate||44100,2)),[0,0]))}function og(e){for(var t=b,n=e.codecs.substring(0,e.codecs.indexOf(".")),i=0,r=0;r<n.length;r+=1)i|=n.charCodeAt(r)<<8*(n.length-r-1);for(var n=b("frma",n=new Uint8Array([].concat(le(ug(i,4))))),i=b("schm",i=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0])),r=b,a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=(e=we(e.stream.drmInfos)).next();!o.done;o=e.next())if((o=o.value)&&o.keyIds&&o.keyIds.size)for(var s=(o=we(o.keyIds)).next();!s.done;s=o.next())a=lg(s.value);return t("sinf",n,i,r("schi",a=b("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function sg(e){for(var t=[],n=(e=we(e.g)).next();!n.done;n=e.next()){for(var n=n.value,i=t.push,r=i.apply,a=b,o=b("mfhd",new Uint8Array([0,0,0,0].concat(le(ug(n.data?n.data.gb:0,4))))),s=n.data?n.data.Oa:[],u=new Uint8Array(4+s.length),l=0;l<s.length;l++){var c=s[l].flags;u[l+4]=c.Ia<<4|c.La<<2|c.Ja}var d=(s=b("sdtp",u)).length+92,u=b,c=(l=b("tfhd",l=new Uint8Array([0,0,0,58].concat(le(ug(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),n.data?n.data.baseMediaDecodeTime:0),h=Math.floor(c%(dg+1)),f=(c=b("tfdt",c=new Uint8Array([1,0,0,0].concat(le(ug(Math.floor(c/(dg+1)),4)),le(ug(h,4))))),d),p=12+16*(h=(d=n.data?n.data.Oa:[]).length),g=new Uint8Array(p);for(f+=8+p,g.set(["video"===n.type?1:0,0,15,1].concat(le(ug(h,4)),le(ug(f,4))),0),f=0;f<h;f++){var p=ug((y=d[f]).duration,4),m=ug(y.size,4),v=y.flags,y=ug(y.Ta,4);g.set([].concat(le(p),le(m),[v.Ua<<2|v.Ia,v.La<<6|v.Ja<<4|v.Va,61440&v.Ha,15&v.Ha],le(y)),12+16*f)}a=a("moof",o,s=u("traf",l,c,d=b("trun",g),s)),r.call(i,t,[a,(o=((o=n).data?o.data.Oa:[]).map(function(e){return e.data}),b("mdat",o=Ir.apply(wr,le(o))))])}return Ir.apply(wr,le(t))}function ug(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function lg(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 b(e){var t=D.apply(1,arguments),n=hg[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],hg[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 cg=!1,dg=Math.pow(2,32)-1,hg={},fg=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]),pg=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]),gg=new Uint8Array([0,0,0,0,0,0,0,0]),mg=new Uint8Array([0,0,0,0,0,0,0,0]),vg=new Uint8Array([0,0,0,0,0,0,0,0]),yg=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),bg=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),wg=new Uint8Array([0,0,0,0,0,0,0,0]),xg=new Uint8Array([0,0,0,0,0,0,0,1]),Tg=new Uint8Array([]),Sg=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ag=new Uint8Array([]);function Eg(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.A=new F(5),this.o=new I(function(){var t,n;t=e,Ie(function(e){switch(e.g){case 1:return Se(e,2),xe(e,Ig(t),4);case 4:Ae(e,3);break;case 2:n=Ee(e),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();Te(e)}})}),this.u=new ji,this.m=new Map}function Ig(b){var w,x,T,S;return Ie(function(e){if(1==e.g)return x=Fi(b.l,b.g.retryParameters),T=b.h.networkingEngine,w=Date.now(),T=T.request(0,x,{type:5}),Oi(b.u,T),xe(e,T.promise,2);if(x=e.h,!b.h)return e.return();x.uri&&!b.l.includes(x.uri)&&b.l.unshift(x.uri);var t=x.uri,n=Xr(x.data,"SmoothStreamingMedia");if(!n)throw new ke(2,4,4046,t);if((t=b.g.mss.manifestPreprocessor)&&t(n),b.i||(b.i=new fe(null,0)),t=W(n,"IsLive",Gr,!1))throw new ke(2,4,4047);b.i.pc(!t);var i,r=W(n,"TimeScale",Vr,1e7),a=W(n,"DVRWindowLength",Vr),o=(t&&(0===a||isNaN(a))&&(a=1/0),W(n,"CanSeek",Gr,!1));for(0===a&&o&&(a=1/0),o=null,a&&0<a&&(o=a/r),t&&!isNaN(b.g.availabilityWindowOverride)&&(o=b.g.availabilityWindowOverride),b.i.Xd(o=null==o?1/0:o),a=W(n,"Duration",Vr,1/0),t||b.i.Pa(a/r),t={variants:[],textStreams:[],timescale:r,duration:a/r},o=z(n,"Protection"),r=b.g.mss.keySystemsBySystemId,a=[],i=(o=we(o)).next();!i.done;i=o.next())a=a.concat(z(i.value,"ProtectionHeader"));if(a.length){for(o=[],i=0;i<a.length;i++){var s=a[i],u=s.getAttribute("SystemID").toLowerCase(),l=r[u];if(l){if(c=Qp(s))e:{for(var c,d=(c=we(c.getElementsByTagName("DATA"))).next();!d.done;d=c.next())if(d=Mr(d.value,"KID")){c=Sr(d.textContent),c=Er(c=new Uint8Array([c[3],c[2],c[1],c[0],c[5],c[4],c[7],c[6]].concat(le(c.slice(8)))));break e}c=null}else c=null;u=Nt(l,u=[{initData:Cr(d=Sr(s.textContent),u=Ar(u.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:c}]),c&&u.keyIds.add(c),(l=eg.get(l))&&(u.licenseServerUri=l(s)),o.push(u)}}r=o}else r=[];for(i=r,o=[],r=[],a=[],s=(n=we(n=z(n,"StreamIndex"))).next();!s.done;s=n.next()){l=z(s=s.value,"QualityLevel"),u=t.timescale,c=t.duration;for(var d=z(s,"c"),h=[],f=0,p=0;p<d.length;++p){var g=d[p],m=d[p+1],v=W(g,"t",Vr),y=W(g,"d",Vr),g=W(g,"r",Br);if(!y)break;if(v=null!=v?v:f,(g=g||0)<0)if(m){if(null==(m=W(m,"t",Vr)))break;if(m<=v)break;g=Math.ceil((m-v)/y)-1}else{if(1/0==c)break;if(c<=v/u)break;g=Math.ceil((c*u-v)/y)-1}for(m=0;m<=g;++m)h.push({start:v/u,end:(f=v+y)/u,zf:v}),v=f}for(u=h,c=(l=we(l)).next();!c.done;c=l.next())(c=function(t,n,e,i,r,a){var o=n.getAttribute("Type");if("audio"!==o&&"video"!==o&&"text"!==o)return X("Ignoring unrecognized type:",o),null;var s=n.getAttribute("Language"),u=t.s++,l=W(e,"Bitrate",Fr),c=W(e,"MaxWidth",Fr),d=W(e,"MaxHeight",Fr),h=W(e,"Channels",Fr),f=W(e,"SamplingRate",Fr),p=a.duration,g=(i.length&&(p=i[i.length-1].end-i[0].start),t.i.getDuration()),m=(t.i.Pa(Math.min(p,g)),{id:u,originalId:n.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:de(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,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:p,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1});(r=n.getAttribute("Subtype"))&&((r=Cg[r])&&m.roles.push(r),"main"===r&&(m.primary=!0));null!==(r=e.getAttribute("FourCC"))&&""!==r||(r=n.getAttribute("FourCC"));if(!r)if("audio"===o)r="AAC";else if("video"===o)return X('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!kg.includes(r.toUpperCase()))return X("Codec not supported:",r),null;switch(e=function(e,t,n,i){if(e=e.getAttribute("CodecPrivateData"))return e;if("audio"!==t)return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;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],"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))}(e,o,r,m),m.mssPrivateData.codecPrivateData=e,o){case"audio":if(!e)return X("Quality unsupported without CodecPrivateData",o),null;m.type="audio",m.mimeType="mss/audio/mp4",m.codecs=function(e,t){var n="AACH"===e?5:0;return t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):n="AACH"===e?5:2,"mp4a.40."+n}(r,e);break;case"video":if(!e)return X("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):""}(e);break;case"text":m.type=ce,m.mimeType="application/mp4","TTML"!==r&&"DFXP"!==r||(m.codecs="stpp")}return m.createSegmentIndex=function(){return m.segmentIndex||(t.m.has(m.id)?e=t.m.get(m.id):(e=[],"video"==m.type&&(e=m.mssPrivateData.codecPrivateData.split("00000001").slice(1)),e=ng(new tg([e={id:m.id,type:m.type,codecs:m.codecs,encrypted:m.encrypted,timescale:m.mssPrivateData.timescale,duration:m.mssPrivateData.duration,Ra:e,fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:null,stream:m}])),t.m.set(m.id,e)),e=function(t,e,n,i,r){for(var a=i.getAttribute("Url").replace("{bitrate}",String(n.bandwidth)),o=(i=[],{}),s=(r=we(r)).next();!s.done;o={Bc:o.Bc},s=r.next())o.Bc=s.value,i.push(new N(o.Bc.start,o.Bc.end,function(e){return function(){return Lt(t.l,[a.replace("{start time}",String(e.Bc.zf))])}}(o),0,null,e,0,0,n.mssPrivateData.duration));return i}(t,new Aa(function(){return[]},0,null,null,void 0,e),m,n,i),m.segmentIndex=new V(e)),Promise.resolve();var e},m.closeSegmentIndex=function(){m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null)},m}(b,s,c.value,u,i,t))&&("audio"!=c.type||b.g.disableAudio?"video"!=c.type||b.g.disableVideo?c.type!=ce||b.g.disableText||a.push(c):r.push(c):o.push(c))}for(n=[],i=(o=we(0<o.length?o:[null])).next();!i.done;i=o.next())for(i=i.value,c=(s=we(0<r.length?r:[null])).next();!c.done;c=s.next())u=(l=n).push,c=c.value,d=0,i&&i.bandwidth&&0<i.bandwidth&&(d+=i.bandwidth),c&&c.bandwidth&&0<c.bandwidth&&(d+=c.bandwidth),c={id:b.s++,language:i?i.language:"und",disabledUntilTime:0,primary:!!i&&i.primary||!!c&&c.primary,audio:i,video:c,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},u.call(l,c);t.variants=n,t.textStreams=a,b.j?(b.j.variants=t.variants,b.j.textStreams=t.textStreams,b.h.filter(b.j)):(b.j={presentationTimeline:b.i,variants:t.variants,textStreams:t.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:b.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},b.i.Nd()),Promise.resolve(),T=Date.now(),S=(T-w)/1e3,b.A.sample(1,S),Te(e)})}(e=Eg.prototype).configure=function(e){this.g=e},e.start=function(t,n){var i=this;return Ie(function(e){if(1==e.g)return i.l=[t],i.h=n,xe(e,Ig(i),2);if(i.h)return e.return(i.j);throw new ke(2,7,7001)})},e.stop=function(){return this.g=this.h=null,this.l=[],(this.j=null)!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.u.destroy()},e.update=function(){var t,n=this;return Ie(function(e){return 1==e.g?(Se(e,2),xe(e,Ig(n),4)):2!=e.g?Ae(e,0):(t=Ee(e),n.h&&t?(n.h.onError(t),void Te(e)):e.return())})},e.onExpirationUpdated=function(){},e.onInitialVariantChosen=function(){},e.banLocation=function(){},t("shaka.mss.MssParser",Eg);var kg="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Cg={CAPT:"main",SUBT:"alternate",DESC:"main"};function Mg(e,t,n,i,r,a){if(200<=n&&n<=299&&202!=n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=rr(t)}catch(e){}throw new ke(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function Dg(){}function Rg(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=new Og,A=(Zi(t.headers).forEach(function(e,t){S.append(t,e)}),new _g),E={Ff:!1,tg:!1};return a=e,o=n,s={body:t.body||void 0,headers:S,method:t.method,signal:A.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u=E,l=i,c=r,d=t.streamDataCallback,e=new Ci(e=Ie(function(e){switch(e.g){case 1:return b=Pg,h=jg,m=g=0,v=Date.now(),Se(e,2),xe(e,b(a,s),4);case 4:if(f=e.h,c(Lg(f.headers)),"HEAD"!=s.method)return y=f.clone().body.getReader(),w=(b=f.headers.get("Content-Length"))?parseInt(b,10):0,new h({start:function(r){!function t(){var n,i;Ie(function(e){switch(e.g){case 1:return Se(e,2),xe(e,y.read(),4);case 4:n=e.h,Ae(e,3);break;case 2:return Ee(e),e.return();case 3:if(n.done){e.B(5);break}if(g+=n.value.byteLength,d)return xe(e,d(n.value),5);e.B(5);break;case 5:(100<(i=Date.now())-v||n.done)&&(l(i-v,g-m,w-g),m=g,v=i),n.done?r.close():(r.enqueue(n.value),t()),Te(e)}})}()}}),xe(e,f.arrayBuffer(),6);e.B(5);break;case 6:p=e.h;case 5:Ae(e,3);break;case 2:if(x=Ee(e),u.Ff)throw new ke(1,1,7001,a,o);if(u.tg)throw new ke(1,1,1003,a,o);throw new ke(1,1,1002,a,x,o);case 3:return x=Lg(f.headers),e.return(Mg(x,p,f.status,a,f.url,o))}}),function(){return E.Ff=!0,A.abort(),Promise.resolve()}),(t=t.retryParameters.timeout)&&((T=new I(function(){E.tg=!0,A.abort()})).U(t/1e3),e.finally(function(){T.stop()})),e}function Lg(e){var n={};return e.forEach(function(e,t){n[t.trim()]=e}),n}function Ng(){if(!q.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!q.Response&&(!!new Response("").body&&!(!q.fetch||!q.AbortController))}wa["application/vnd.ms-sstr+xml"]=function(){return new Eg},t("shaka.net.HttpFetchPlugin",Dg),Dg.isSupported=Ng,Dg.parse=Rg;var Pg=q.fetch,_g=q.AbortController,jg=q.ReadableStream,Og=q.Headers;function Ug(){}function Bg(a,n,o,s,u){var l=new Vg,c=Date.now(),d=0;return new Ci(new Promise(function(i,r){l.open(n.method,a,!0),l.responseType="arraybuffer",l.timeout=n.retryParameters.timeout,l.withCredentials=n.allowCrossSiteCredentials;var e,t=!(l.onabort=function(){r(new ke(1,1,7001,a,o))});for(e in l.onreadystatechange=function(){var e;2!=l.readyState||t||(e=Fg(l),u(e),t=!0)},l.onload=function(){var e=Fg(l),t=l.response;try{var n=Mg(e,t,l.status,a,l.responseURL,o);i(n)}catch(e){r(e)}},l.onerror=function(e){r(new ke(1,1,1002,a,e,o))},l.ontimeout=function(){r(new ke(1,1,1003,a,o))},l.onprogress=function(e){var t=Date.now();(100<t-c||e.lengthComputable&&e.loaded==e.total)&&(s(t-c,e.loaded-d,e.total-e.loaded),d=e.loaded,c=t)},n.headers)l.setRequestHeader(e.toLowerCase(),n.headers[e]);l.send(n.body)}),function(){return l.abort(),Promise.resolve()})}function Fg(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={};for(var n=(t=we(t)).next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}Ng()&&(Bi("http",Rg,2,!0),Bi("https",Rg,2,!0),Bi("blob",Rg,2,!0)),t("shaka.net.HttpXHRPlugin",Ug);var Vg=q.XMLHttpRequest;function Hg(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function Gg(e){return e.Z().map(function(e){return"{"+encodeURI(e)+"}"}).join("")+":"+e.Qa+":"+e.wa}function Kg(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function qg(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function Xg(e){var t=this;this.o=e,this.j=new Map,this.i=new zi(function(){return zg(t).catch(function(){})}),this.h=[],this.m=function(){},this.l=function(){},this.g=new Kg}function zg(e){var t=e.h.map(function(e){return e()});return e.h=[],Promise.all(t)}function Wg(f,e,p,g,m,v){U(f.i);var t=(f.j.get(e)||Promise.resolve()).then(function(){var s,u,l,c,d,h;return Ie(function(e){if(1==e.g)return xe(e,(t=f,n=p,Ie(function(e){return 1==e.g?(i=t.o.request(Ki,n),r=function(){return i.abort()},t.h.push(r),xe(e,i.promise,2)):(a=e.h,Oe(t.h,r),e.return(a.data))})),2);var t,n,i,r,a;if(s=e.h,f.i.g)throw new ke(2,9,7001);if(m)for(c in u=ne(s),(l=new kr(u)).data)h=Number(c),d=l.data[h],h=l.g[h],f.l(d,h);f.g.close(g,s.byteLength);var o=f.g;return f.m(0==o.i?0:o.j/o.i,f.g.h),e.return(v(s))})});f.j.set(e,t)}function Yg(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new k,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 $g(t,r){return new Promise(function(n,e){var i=t.h.openCursor();i.onerror=e,i.onsuccess=function(){var t;return Ie(function(e){if(1==e.g)return null==i.result?(n(),e.return()):(t=i.result,xe(e,r(t.key,t.value,t),2));t.continue(),Te(e)})}})}function Jg(e){this.h=e,this.g=[]}function Qg(e,t){return Zg(e,t,"readwrite")}function Zg(e,t,n){var i=new Yg(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){Oe(e.g,i)},function(){Oe(e.g,i)}),i}function em(e,t,n){this.h=new Jg(e),this.i=t,this.g=n}function tm(e){return Promise.reject(new ke(2,9,9011,"Cannot add new value to "+e))}function nm(e,t,n,i){t=(e=Qg(e.h,t)).store();for(var r={},a=(n=we(n)).next();!a.done;r={ld:r.ld},a=n.next())r.ld=a.value,t.delete(r.ld).onsuccess=function(e){return function(){return i(e.ld)}}(r);return e.promise()}function im(t,n,i){var r,a,o,s,u,l,c;return Ie(function(e){if(1==e.g){for(r=Zg(t.h,n,"readonly"),a=r.store(),o={},s=[],u={},l=we(i),c=l.next();!c.done;u={zc:u.zc,xc:u.xc},c=l.next())u.xc=c.value,u.zc=a.get(u.xc),u.zc.onsuccess=function(e){return function(){null==e.zc.result&&s.push(e.xc),o[e.xc]=e.zc.result}}(u);return xe(e,r.promise(),2)}if(s.length)throw new ke(2,9,9012,"Could not find values for "+s);return e.return(i.map(function(e){return o[e]}))})}function rm(e){this.g=new Jg(e)}function am(){this.g=new Map}function om(e){var i=null;if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,t){e.hasFixedKeySpace()||i||(i={path:{Wa:n,va:t},va:e})})}),i)return i;throw new ke(2,9,9013,"Could not find a cell that supports add-operations")}function sm(e,t,n){if(!(e=e.g.get(t)))throw new ke(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n))return t;throw new ke(2,9,9013,"Could not find cell with name "+n)}function um(e,t){lm.set(e,t)}Bi("http",Ug.parse=Bg,1,!0),Bi("https",Bg,1,!0),Bi("blob",Bg,1,!0),Kg.prototype.close=function(e,t){var n;this.g.has(e)&&(n=this.g.get(e),this.g.delete(e),this.j+=n,this.h+=t)},Xg.prototype.destroy=function(){return this.i.destroy()},Yg.prototype.abort=function(){var t=this;return Ie(function(e){if(1==e.g){try{t.i.abort()}catch(e){}return Se(e,2),xe(e,t.g,4)}if(2!=e.g)return Ae(e,0);Ee(e),Te(e)})},Yg.prototype.store=function(){return this.h},Yg.prototype.promise=function(){return this.g},Jg.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(e=em.prototype).destroy=function(){return this.h.destroy()},e.hasFixedKeySpace=function(){return!0},e.addSegments=function(){return tm(this.i)},e.removeSegments=function(e,t){return nm(this,this.i,e,t)},e.getSegments=function(t){var n,i=this;return Ie(function(e){return 1==e.g?xe(e,im(i,i.i,t),2):(n=e.h,e.return(n.map(function(e){return i.Hf(e)})))})},e.addManifests=function(){return tm(this.g)},e.updateManifest=function(){return Promise.reject(new ke(2,9,9016,"Cannot modify values in "+this.g))},e.updateManifestExpiration=function(t,n){var e=Qg(this.h,this.g),i=e.store();return i.get(t).onsuccess=function(e){(e=e.target.result)&&(e.expiration=n,i.put(e,t))},e.promise()},e.removeManifests=function(e,t){return nm(this,this.g,e,t)},e.getManifests=function(t){var n,i=this;return Ie(function(e){return 1==e.g?xe(e,im(i,i.g,t),2):(n=e.h,e.return(Promise.all(n.map(function(e){return i.Mc(e)}))))})},e.getAllManifests=function(){var t,r,a=this;return Ie(function(e){return 1==e.g?(t=Zg(a.h,a.g,"readonly"),r=new Map,xe(e,$g(t,function(t,n){var i;return Ie(function(e){if(1==e.g)return xe(e,a.Mc(n),2);i=e.h,r.set(t,i),Te(e)})}),2)):3!=e.g?xe(e,t.promise(),3):e.return(r)})},e.Hf=function(e){return e},e.Mc=function(e){return Promise.resolve(e)},e.add=function(t,n){var i,r,a,o,s,u,l,c=this;return Ie(function(e){if(1!=e.g)return e.return(a);for(i=Qg(c.h,t),r=i.store(),a=[],o={},s=we(n),u=s.next();!u.done;o={nd:o.nd},u=s.next())l=u.value,o.nd=r.add(l),o.nd.onsuccess=function(e){return function(){a.push(e.nd.result)}}(o);return xe(e,i.promise(),2)})},rm.prototype.destroy=function(){return this.g.destroy()},rm.prototype.getAll=function(){var t,n,i=this;return Ie(function(e){return 1==e.g?(t=Zg(i.g,"session-ids","readonly"),n=[],xe(e,$g(t,function(e,t){n.push(t)}),2)):3!=e.g?xe(e,t.promise(),3):e.return(n)})},rm.prototype.add=function(e){for(var t=Qg(this.g,"session-ids"),n=t.store(),i=(e=we(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},rm.prototype.remove=function(i){var t,n=this;return Ie(function(e){return 1==e.g?xe(e,$g(t=Qg(n.g,"session-ids"),function(e,t,n){i.includes(t.sessionId)&&n.delete()}),2):xe(e,t.promise(),0)})},am.prototype.destroy=function(){for(var e=[],t=we(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},am.prototype.init=function(){var n=this;lm.forEach(function(e,t){(e=e())&&n.g.set(t,e)});for(var e=[],t=we(this.g.values()),i=t.next();!i.done;i=t.next())e.push(i.value.init());return Promise.all(e)},t("shaka.offline.StorageMuxer",am),am.unregister=function(e){lm.delete(e)},am.register=um;var lm=new Map;function cm(){em.apply(this,arguments)}function dm(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 ke(2,9,9004,"Could not parse uri "+e)}function hm(){em.apply(this,arguments)}function fm(){em.apply(this,arguments)}function pm(){this.m=this.j=this.i=this.h=this.g=this.l=null}function gm(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 mm(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 gm(t,n,i,Number(e[4])):null}function vm(e,t){this.h=e,this.g=t}function ym(t,e){var n=new fe(null,0),i=(n.Pa(e.duration),e.streams.filter(function(e){return"audio"==e.type})),r=e.streams.filter(function(e){return"video"==e.type}),i=function(e,t,n,i){for(var r=new Set,a=we(t),o=a.next();!o.done;o=a.next()){var s=we(o.value.variantIds);for(o=s.next();!o.done;o=s.next())r.add(o.value)}for(a=we(n),o=a.next();!o.done;o=a.next())for(s=we(o.value.variantIds),o=s.next();!o.done;o=s.next())r.add(o.value);for(a=new Map,r=we(r),o=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(t=we(t),r=t.next();!r.done;r=t.next())for(r=r.value,o=bm(e,r,i),s=we(r.variantIds),r=s.next();!r.done;r=s.next())(r=a.get(r.value)).language=o.language,r.primary=r.primary||o.primary,r.audio=o;for(n=we(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=bm(e,r,i),o=we(r.variantIds),r=o.next();!r.done;r=o.next())(r=a.get(r.value)).primary=r.primary||t.primary,r.video=t;return a}(t,i,r,n),r=e.streams.filter(function(e){return e.type==ce}).map(function(e){return bm(t,e,n)}),a=e.streams.filter(function(e){return"image"==e.type}).map(function(e){return bm(t,e,n)}),o=e.drmInfo?[e.drmInfo]:[];if(e.drmInfo)for(var s=we(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:e.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:e.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:e.type||"UNKNOWN",serviceDescription:null}}function bm(i,e,t){var n=e.segments.map(function(e){return e=e,n=new gm("segment",(t=i).h,t.g,e.dataKey),new N(e.startTime,e.endTime,function(){return[n.toString()]},0,null,null!=e.initSegmentKey?function(e,t){var n=new gm("segment",e.h,e.g,t);return new Aa(function(){return[n.toString()]},0,null)}(t,e.initSegmentKey):null,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,[],e.tilesLayout||"");var t,n});return t.Xc(n),{id:e.id,originalId:e.originalId,groupId:e.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new V(n),mimeType:e.mimeType,codecs:e.codecs,width:e.width||void 0,height:e.height||void 0,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:e.hdr,videoLayout:e.videoLayout,kind:e.kind,encrypted:e.encrypted,drmInfos:[],keyIds:e.keyIds,language:e.language,originalLanguage:e.originalLanguage||null,label:e.label,type:e.type,primary:e.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:e.forced,channelsCount:e.channelsCount,audioSamplingRate:e.audioSamplingRate,spatialAudio:e.spatialAudio,closedCaptions:e.closedCaptions,tilesLayout:e.tilesLayout,accessibilityPurpose:null,external:e.external,fastSwitching:e.fastSwitching}}function wm(){this.g=null}function xm(){}function Tm(e){var t,n,i=mm(e);return e=i&&"manifest"==i.g?Ri(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):i&&"segment"==i.g?(i.key(),t=i,n=new am,Ri(void 0).pa(function(){return n.init()}).pa(function(){return sm(n,t.Wa(),t.va())}).pa(function(e){return e.getSegments([t.key()])}).pa(function(e){return{uri:t,data:e[0].data,headers:{}}}).finally(function(){return n.destroy()})):Mi(new ke(2,1,9004,e))}function Sm(g,m,v){var y,b,w,x;return Ie(function(e){switch(e.g){case 1:y=[];for(var t=[],n=we(v),i=n.next();!i.done;i=n.next()){for(var i=i.value,r=!1,a=we(t),o=a.next();!o.done;o=a.next())if(o=o.value,s=o.info,f=i,p=function(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType},s.keySystem==f.keySystem&&s.licenseUri==f.licenseUri&&Ue(s.audioCapabilities,f.audioCapabilities,p)&&Ue(s.videoCapabilities,f.videoCapabilities,p)){o.sessionIds.push(i.sessionId),r=!0;break}r||t.push({info:i,sessionIds:[i.sessionId]})}b=we(t),w=b.next();case 2:if(w.done){e.B(4);break}return x=w.value,u=g,l=m,c=x,x=Ie(function(e){switch(e.g){case 1:return d=new Wr({Tb:l,onError:function(){},Ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),Se(e,2),d.configure(u),xe(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,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),na(t,s,[])),4);case 4:Ae(e,3);break;case 2:return Ee(e),xe(e,d.destroy(),5);case 5:return e.return([]);case 3:return h=[],xe(e,Promise.all(c.sessionIds.map(function(o){return Ie(function(e){return 1==e.g?(Se(e,2),xe(e,(t=d,n=o,Ie(function(e){return 1==e.g?xe(e,aa(t,n,{initData:null,initDataType:null}),2):3!=e.g?(i=e.h)?(r=[],(a=t.i.get(i))&&(a.hb=new k,r.push(a.hb)),r.push(i.remove()),xe(e,Promise.all(r),3)):e.return():(t.i.delete(i),void Te(e))})),4)):2!=e.g?(h.push(o),Ae(e,0)):(Ee(e),void Te(e));var t,n,i,r,a})})),6);case 6:return xe(e,d.destroy(),7);case 7:return e.return(h)}var t,n,i,r,a,o,s}),xe(e,x,5);case 5:x=e.h,y=y.concat(x),w=b.next(),e.B(2);break;case 4:return e.return(y)}var u,l,c,d,h,s,f,p})}function Am(e,t){var n=ym(new vm(e.Wa(),e.va()),t),i=t.appMetadata||{},n=Em(n);return{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function Em(e){for(var t=[],n=Jn(e.variants),i=(n=we(n)).next();!i.done;i=n.next())t.push(Gn(i.value));for(n=(e=we(e.textStreams)).next();!n.done;n=e.next())t.push(Kn(n.value));return t}function Im(){this.g={}}function km(e,t){return e=null==(e=e.g[t])?0:e}function Cm(e){var o=this;if(e&&e.constructor!=n)throw new ke(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Ob()):(this.h=Cu(),this.g=new Ui),this.i=[],this.j=[];var s=!e;this.l=new zi(function(){var t,n,i,r,a;return Ie(function(e){switch(e.g){case 1:return xe(e,Promise.all(o.j.map(zg)),2);case 2:for(t=function(){},n=[],i=we(o.i),r=i.next();!r.done;r=i.next())a=r.value,n.push(a.then(t,t));return xe(e,Promise.all(n),3);case 3:if(s)return xe(e,o.g.destroy(),4);e.B(4);break;case 4:o.h=null,o.g=null,Te(e)}})})}function Mm(){if(mn())e:{for(var e=we(lm.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 Dm(t){var n,i;return Ie(function(e){switch(e.g){case 1:return xe(e,(n=new am).init(),2);case 2:return xe(e,om(n),3);case 3:return i=e.h,i=new gm("manifest",i.path.Wa,i.path.va,t),xe(e,n.destroy(),4);case 4:return xe(e,(new Cm).remove(i.toString()),0)}})}function Rm(t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,v;return Ie(function(e){switch(e.g){case 1:for(s=!1,Se(e,2),u=!0,l=we(i.streams),c=l.next();!c.done;c=l.next())for(d=c.value,h=we(d.segments),f=h.next();!f.done;f=h.next())p=f.value,null!=(g=p.pendingSegmentRefId?r[p.pendingSegmentRefId]:null)&&(p.dataKey=g,p.pendingSegmentRefId=void 0),null!=(g=p.pendingInitSegmentRefId?r[p.pendingInitSegmentRefId]:null)&&(p.initSegmentKey=g,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(u=!1),p.pendingInitSegmentRefId&&(u=!1);return i.size+=a,u&&(i.isIncomplete=!1),xe(e,t.updateManifest(n,i),4);case 4:s=!0,o(),Ae(e,0);break;case 2:return m=Ee(e),xe(e,Dm(n),5);case 5:if(s){e.B(6);break}return v=Object.values(r),xe(e,t.removeSegments(v,function(){}),6);case 6:throw m}})}function Lm(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function Nm(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 Pm(e,t,n,i){if(t.expiration=n.Qc(),n=ta(n),t.sessionIds=i.offline.usePersistentLicense?n:[],Lm(e)&&i.offline.usePersistentLicense&&!n.length)throw new ke(2,9,9007)}function _m(e,t){for(var n=[],i=we(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:Bt(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:Bt(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function jm(e){if(e.l.g)throw new ke(2,9,7001)}function Om(){if(!Mm())throw new ke(2,9,9e3)}function Um(t,n){return Ie(function(e){return 1==e.g?(t.i.push(n),M(e,2),xe(e,n,4)):2!=e.g?e.return(e.h):(Ce(e),Oe(t.i,n),Me(e,0))})}function Bm(e){for(var t=new Set,n=we(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(i=(n=we(e.imageStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=we(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}m(cm,em),cm.prototype.updateManifestExpiration=function(t,n){var i,r,a,o=this;return Ie(function(e){return i=Qg(o.h,o.g),r=i.store(),a=new k,r.get(t).onsuccess=function(e){(e=e.target.result)?(e.expiration=n,r.put(e),a.resolve()):a.reject(new ke(2,9,9012,"Could not find values for "+t))},xe(e,Promise.all([i.promise(),a]),0)})},cm.prototype.Mc=function(t){var n,i,r,a;return Ie(function(e){if(1!=e.g)return a=e.h,e.return({creationTime:0,originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:null==t.expiration?1/0:t.expiration,streams:a,sessionIds:t.sessionIds,drmInfo:t.drmInfo,appMetadata:t.appMetadata,sequenceMode:!1});for(n=[],i=0;i<t.periods.length;++i)r=i==t.periods.length-1?t.duration:t.periods[i+1].startTime,r=r-t.periods[i].startTime,r=function(o,s){!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=we(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=we(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){var r=n++,a=we(e);for(i=a.next();!i.done;i=a.next())i.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,a=we(t),i=a.next();!i.done;i=a.next())i.value.variantIds.push(r);if(e.length&&t.length)for(t=we(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=we(e),a=r.next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}}(o);for(var e=we(o.streams),t=e.next();!t.done;t=e.next());return o.streams.map(function(e){return e=e,n=o.startTime,t=s,i=e.initSegmentUri?dm(e.initSegmentUri):null,r=n+e.presentationTimeOffset,a=n+t,{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,videoLayout: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 t=dm(e.uri);return{startTime:n+e.startTime,endTime:n+e.endTime,dataKey:t,initSegmentKey:i,appendWindowStart:n,appendWindowEnd:a,timestampOffset:r,tilesLayout:""}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1};var n,t,i,r,a})}(t.periods[i],r),n.push(r);return xe(e,$h(n),2)})},cm.prototype.Hf=function(e){return{data:e.data}},m(hm,em),hm.prototype.Mc=function(a){var o,s,u,l,c;return Ie(function(e){if(1!=e.g)return c=e.h,e.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?1/0:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:c,sequenceMode:!1});for(o=[],s=0;s<a.periods.length;++s){u=s==a.periods.length-1?a.duration:a.periods[s+1].startTime,l=u-a.periods[s].startTime;for(var t=a.periods[s],n=[],i=we(t.streams),r=i.next();!r.done;r=i.next())0!=(r=r.value).variantIds.length&&n.push(function(t,n,i){return{id:t.id,originalId:t.originalId,groupId:null,primary:t.primary,type:t.contentType,mimeType:t.mimeType,codecs:t.codecs,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:t.kind,language:t.language,originalLanguage:t.language||null,label:t.label,width:t.width,height:t.height,encrypted:t.encrypted,keyIds:new Set([t.keyId]),segments:t.segments.map(function(e){return{startTime:n+e.startTime,endTime:n+e.endTime,initSegmentKey:t.initSegmentKey,appendWindowStart:n,appendWindowEnd:i,timestampOffset:n-t.presentationTimeOffset,dataKey:e.dataKey,tilesLayout:""}}),variantIds:t.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}(r,t.startTime,t.startTime+l));o.push(n)}return xe(e,$h(o),2)})},m(fm,em),(e=fm.prototype).hasFixedKeySpace=function(){return!1},e.addSegments=function(e){return this.add(this.i,e)},e.addManifests=function(e){return this.add(this.g,e)},e.updateManifest=function(e,t){return n=e,i=t,(r=(e=Qg((e=this).h,e.g)).store()).get(n).onsuccess=function(){r.put(i,n)},e.promise();var n,i,r},e.Mc=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(e=pm.prototype).init=function(){var n=this,i=new k,r=!1,a=new I(function(){r=!0,i.reject(new ke(2,9,9017))}),o=(a.U(5),q.indexedDB.open("shaka_offline_db",5));return o.onsuccess=function(){var e,t;r||(e=o.result,t=(t=(n.l=e).objectStoreNames).contains("manifest")&&t.contains("segment")?new cm(e,"segment","manifest"):null,n.g=t,t=(t=e.objectStoreNames).contains("manifest-v2")&&t.contains("segment-v2")?new hm(e,"segment-v2","manifest-v2"):null,n.h=t,t=(t=e.objectStoreNames).contains("manifest-v3")&&t.contains("segment-v3")?new hm(e,"segment-v3","manifest-v3"):null,n.i=t,t=(t=e.objectStoreNames).contains("manifest-v5")&&t.contains("segment-v5")?new fm(e,"segment-v5","manifest-v5"):null,n.j=t,e=e.objectStoreNames.contains("session-ids")?new rm(e):null,n.m=e,a.stop(),i.resolve())},o.onupgradeneeded=function(){for(var e=o.result,t=we(["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})},o.onerror=function(e){r||(i.reject(new ke(2,9,9001,o.error)),a.stop(),e.preventDefault())},i},e.destroy=function(){var t=this;return Ie(function(e){switch(e.g){case 1:if(t.g)return xe(e,t.g.destroy(),2);e.B(2);break;case 2:if(t.h)return xe(e,t.h.destroy(),4);e.B(4);break;case 4:if(t.i)return xe(e,t.i.destroy(),6);e.B(6);break;case 6:if(t.j)return xe(e,t.j.destroy(),8);e.B(8);break;case 8:if(t.m)return xe(e,t.m.destroy(),10);e.B(10);break;case 10:t.l&&t.l.close(),Te(e)}})},e.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},e.getEmeSessionCell=function(){return this.m},e.erase=function(){var i=this;return Ie(function(e){switch(e.g){case 1:if(i.g)return xe(e,i.g.destroy(),2);e.B(2);break;case 2:if(i.h)return xe(e,i.h.destroy(),4);e.B(4);break;case 4:if(i.i)return xe(e,i.i.destroy(),6);e.B(6);break;case 6:if(i.j)return xe(e,i.j.destroy(),8);e.B(8);break;case 8:return i.l&&i.l.close(),xe(e,(t=new k,(n=q.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new ke(2,9,9001,n.error)),e.preventDefault()},t),10);case 10:return i.l=null,i.g=null,i.h=null,i.i=null,i.j=null,xe(e,i.init(),0)}var t,n})},um("idb",function(){return An()||bn()||!q.indexedDB?null:new pm}),gm.prototype.Wa=function(){return this.i},gm.prototype.va=function(){return this.h},gm.prototype.key=function(){return this.l},gm.prototype.toString=function(){return this.j},(e=wm.prototype).configure=function(){},e.start=function(t,n){var i,r,a,o,s=this;return Ie(function(e){switch(e.g){case 1:if(i=mm(t),null==(s.g=i)||"manifest"!=i.g)throw new ke(2,1,9004,t);return r=new am,M(e,2),xe(e,r.init(),4);case 4:return xe(e,sm(r,i.Wa(),i.va()),5);case 5:return xe(e,e.h.getManifests([i.key()]),6);case 6:return a=e.h,a=a[0],o=new vm(i.Wa(),i.va()),o=ym(o,a),n.makeTextStreamsForClosedCaptions(o),e.return(o);case 2:return Ce(e),xe(e,r.destroy(),7);case 7:Me(e,0)}})},e.stop=function(){return Promise.resolve()},e.update=function(){},e.onExpirationUpdated=function(t,n){var i,r,a,o,s,u=this;return Ie(function(e){switch(e.g){case 1:return i=u.g,r=new am,Se(e,2,3),xe(e,r.init(),5);case 5:return xe(e,sm(r,i.Wa(),i.va()),6);case 6:return xe(e,(a=e.h).getManifests([i.key()]),7);case 7:if(s=e.h,s=s[0],o=s.sessionIds.includes(t),s=null==s.expiration||s.expiration>n,o&&s)return xe(e,a.updateManifestExpiration(i.key(),n),3);e.B(3);break;case 3:return Ce(e),xe(e,r.destroy(),10);case 10:Me(e,0);break;case 2:Ee(e),e.B(3)}})},e.onInitialVariantChosen=function(){},e.banLocation=function(){},wa["application/x-offline-manifest"]=function(){return new wm},t("shaka.offline.OfflineScheme",xm),Bi("offline",xm.plugin=Tm),(e=Cm.prototype).destroy=function(){return this.l.destroy()},e.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=bu(e,t)),Mu(this.h,e)},e.getConfiguration=function(){var e=Cu();return Mu(e,this.h,Cu()),e},e.Ob=function(){return this.g},e.store=function(n,e,i){var ie,re,ae,oe,se,ue,le,ce,de,he,fe,pe,ge,me,ve,ye,be,t,r,a=this,o=this.getConfiguration(),s=new Xg(this.g);return this.j.push(s),ie=this,re=n,ae=e||{},oe=function(){var t;return Ie(function(e){return 1==e.g?i?e.B(2):xe(e,Bs(n,a.g,o.manifest.retryParameters),3):(2!=e.g&&(i=e.h),t=ba(n,i||null),e.return(t()))})},se=o,ue=s,(e=new Ci(e=Ie(function(e){switch(e.g){case 1:return Om(),ce=le=null,de=new am,pe=fe=he=null,Se(e,2,3),xe(e,oe(),5);case 5:return le=e.h,xe(e,(s=ie,Z=re,ee=le,te=se,Ie(function(e){if(1==e.g)return P=null,_=s.g,_={networkingEngine:_,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){P=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return te.abr.defaultBandwidthEstimate}},ee.configure(te.manifest),jm(s),xe(e,ee.start(Z,_),2);if(3!=e.g)return ne=e.h,jm(s),_=Bm(ne),xe(e,Promise.all(Ji(_,function(e){return e.createSegmentIndex()})),3);if(jm(s),P)throw P;return e.return(ne)})),6);case 6:if(ge=e.h,jm(ie),!ge.presentationTimeline.R()&&!ge.presentationTimeline.Rb())return xe(e,(Y=ie,$=ge,J=function(e){pe=pe||e},Q=se,Ie(function(e){return 1==e.g?((o=new Wr({Tb:Y.g,onError:J,Ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(Q.drm),xe(e,(t=o,n=$.variants,i=Q.offline.usePersistentLicense,t.ma=!0,t.u=new Map,t.K=i,$r(t,n)),2)):3!=e.g?xe(e,Qr(o),3):e.return(o);var t,n,i})),7);throw new ke(2,9,9005,re);case 7:if(ce=e.h,jm(ie),pe)throw pe;return xe(e,(u=ge,B=ce,l=se,Ie(function(e){switch(e.g){case 1:return d={width:1/0,height:1/0},o=l.restrictions,s=d,u.variants=u.variants.filter(function(e){return Pn(e,o,s)}),xe(e,On(B,u,l.offline.usePersistentLicense),2);case 2:for(c=[],d=l.preferredDecodingAttributes,L=l.preferredVideoCodecs,F=l.preferredAudioCodecs,Nn(u,L,F,d),h=we(u.variants),T=h.next();!T.done;T=h.next())V=T.value,c.push(Gn(V));for(S=we(u.textStreams),A=S.next();!A.done;A=S.next())H=A.value,c.push(Kn(H));for(E=we(u.imageStreams),I=E.next();!I.done;I=E.next())G=I.value,c.push(qn(G));return xe(e,l.offline.trackSelectionCallback(c),3);case 3:for(k=e.h,K=u.presentationTimeline.getDuration(),C=0,M=we(k),D=M.next();!D.done;D=M.next())R=D.value,R=R.bandwidth*K/8,C+=R;return Se(e,4),xe(e,l.offline.downloadSizeCallback(C),6);case 6:if(!e.h)throw new ke(2,9,9014);Ae(e,5);break;case 4:if((L=Ee(e))instanceof ke)throw L;throw new ke(2,9,9015);case 5:for(q=new Set,X=new Set,z=new Set,W=we(k),D=W.next();!D.done;D=W.next())"variant"==(N=D.value).type&&q.add(N.id),"text"==N.type&&X.add(N.id),"image"==N.type&&z.add(N.id);u.variants=u.variants.filter(function(e){return q.has(e.id)}),u.textStreams=u.textStreams.filter(function(e){return X.has(e.id)}),u.imageStreams=u.imageStreams.filter(function(e){return z.has(e.id)});var t=u,n=(t.variants.map(function(e){return e.video}),new Set(t.variants.map(function(e){return e.audio})));t=t.textStreams;for(var i=we(n),r=i.next();!r.done;r=i.next())for(var a=(r=we(n)).next();!a.done;a=r.next());for(n=we(t),i=n.next();!i.done;i=n.next())for(i=we(t),r=i.next();!r.done;r=i.next());Te(e)}var o,s})),8);case 8:return xe(e,de.init(),9);case 9:return jm(ie),xe(e,om(de),10);case 10:return he=e.h,jm(ie),ve=function(n,e,t,i,r,a){var o=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=Em(t),appMetadata:n,isIncomplete:!1}}(t,e,i),s=r.offline.progressCallback,u=(function(e,t,n){e.m=t,e.l=n}(a,function(e,t){o.size=t,s(o,e)},function(e,t){u&&r.offline.usePersistentLicense&&l==t&&Zr(n,"cenc",e)}),Lm(e)&&!Nm(e)),l=null;u&&(l=Fm.get(n.g.keySystem));for(var c=new Im,d=we(e.textStreams),h=d.next();!h.done;h=d.next())c.g[h.value.id]=52;for(d=we(e.imageStreams),h=d.next();!h.done;h=d.next())!function(e,t){e.g[t.id]=t.bandwidth||2048}(c,h.value);for(h=we(e.variants),d=h.next();!d.done;d=h.next())!function(e,t){var n,i,r=t.audio,a=t.video;r&&!a&&(e.g[r.id]=r.bandwidth||t.bandwidth),!r&&a&&(e.g[a.id]=a.bandwidth||t.bandwidth),r&&a&&(n=r.bandwidth||393216,(i=a.bandwidth||t.bandwidth-n)<=0&&(i=t.bandwidth),e.g[r.id]=n,e.g[a.id]=i)}(c,d.value);return c=function(e,t,n,i){for(var r=new Map,a=Bm(n),o=new Map,s=(a=we(a)).next();!s.done;s=a.next()){s=s.value;var u=function(r,a,e,o,t,s){var u={id:o.id,originalId:o.originalId,groupId:o.groupId,primary:o.primary,type:o.type,mimeType:o.mimeType,codecs:o.codecs,frameRate:o.frameRate,pixelAspectRatio:o.pixelAspectRatio,hdr:o.hdr,videoLayout:o.videoLayout,kind:o.kind,language:o.language,originalLanguage:o.originalLanguage,label:o.label,width:o.width||null,height:o.height||null,encrypted:o.encrypted,keyIds:o.keyIds,segments:[],variantIds:[],roles:o.roles,forced:o.forced,channelsCount:o.channelsCount,audioSamplingRate:o.audioSamplingRate,spatialAudio:o.spatialAudio,closedCaptions:o.closedCaptions,tilesLayout:o.tilesLayout,external:o.external,fastSwitching:o.fastSwitching},l=t.offline.numberOfParallelDownloads,c=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)}(o,e.presentationTimeline.eb(),function(e){var t,n=Gg(e),i=void 0;s.has(n)||(t=e.endTime-e.startTime,t=km(a,o.id)*t,t=qg(r.g,t),s.set(n,new Hg(e,t,c,!1))),e.aa&&(i=Gg(e.aa),s.has(i)||(t=.5*km(a,o.id),t=qg(r.g,t),s.set(i,new Hg(e.aa,t,c,!0)))),u.segments.push({pendingInitSegmentRefId:i,initSegmentKey:i?0:null,startTime:e.startTime,endTime:e.endTime,appendWindowStart:e.appendWindowStart,appendWindowEnd:e.appendWindowEnd,timestampOffset:e.timestampOffset,tilesLayout:e.tilesLayout,pendingSegmentRefId:n,dataKey:0}),c=(c+1)%l}),u}(e,t,n,s,i,r);o.set(s.id,u)}for(e=we(n.variants),t=e.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()),vf:Array.from(r.values())}}(a,c,e,r),a=c.streams,c=c.vf,h=n.g,d=r.offline.usePersistentLicense,h&&d&&(h.initData=[]),{Ah:{creationTime:Date.now(),originalManifestUri:t,duration:e.presentationTimeline.getDuration(),size:0,expiration:n.Qc(),streams:a,sessionIds:d?ta(n):[],drmInfo:h,appMetadata:i,isIncomplete:!0,sequenceMode:e.sequenceMode,type:e.type},vf:c}}(ce,ge,re,ae,se,ue),me=ve.Ah,ve=ve.vf,xe(e,he.va.addManifests([me]),11);case 11:if(ye=e.h,jm(ie),fe=ye[0],jm(ie),pe)throw pe;return xe(e,(f=ie,t=ve,p=fe,g=me,m=ue,v=se,y=he.va,b=ge,j=ce,Ie(function(e){switch(e.g){case 1:if(w={},x=0,i=!(n=function(r,a){var o,s,u,l,c,d,h;return Ie(function(e){if(1!=e.g)return a?(jm(f),Pm(b,g,j,v),xe(e,y.updateManifest(p,g),0)):e.B(0);var t,n,i;for(o={},s=we(r),u=s.next();!u.done;o={Ib:o.Ib},u=s.next())o.Ib=u.value,n=o.Ib,i=v,l=ws(n.g.Z(),n.g.Qa,n.g.wa,i.streaming.retryParameters),c=o.Ib.i,d=o.Ib.h,h=function(r){return function(t){var n,i;return Ie(function(e){if(1==e.g)return xe(e,y.addSegments([{data:t}]),2);n=e.h,jm(f),i=r.Ib.g,i=Gg(i),w[i]=n[0],x+=t.byteLength,Te(e)})}}(o),Wg(m,o.Ib.groupId,l,c,d,h);return xe(e,(t=m,Ie(function(e){return 1==e.g?xe(e,Promise.all(t.j.values()),2):e.return(t.g.h)})),2)})}),Se(e,2),Lm(b)&&i&&!Nm(b))return xe(e,n(t.filter(function(e){return e.h}),!0),5);e.B(4);break;case 5:return jm(f),t=t.filter(function(e){return!e.h}),r=w,a=x,w={},x=0,xe(e,Rm(y,p,g,r,a,function(){jm(f)}),6);case 6:jm(f);case 4:if(i){e.B(7);break}return xe(e,n(t,!1),8);case 8:return jm(f),r=w,a=x,w={},x=0,xe(e,Rm(y,p,g,r,a,function(){jm(f)}),9);case 9:jm(f);case 7:Ae(e,0);break;case 2:return O=Ee(e),U=Object.values(w),xe(e,y.removeSegments(U,function(){}),10);case 10:throw O}})),12);case 12:return jm(ie),Pm(ge,me,ce,se),xe(e,he.va.updateManifest(fe,me),13);case 13:return jm(ie),ye=new gm("manifest",he.path.Wa,he.path.va,fe),e.return(Am(ye,me));case 3:return Ce(e),xe(e,de.destroy(),14);case 14:if(le)return xe(e,le.stop(),15);e.B(15);break;case 15:if(ce)return xe(e,ce.destroy(),17);e.B(17);break;case 17:Me(e,0);break;case 2:if(be=Ee(e),null!=fe)return xe(e,Dm(fe),19);e.B(19);break;case 19:throw pe||be}var f,t,p,g,m,v,y,b,j,w,x,n,i,r,a,O,U,u,B,l,c,d,F,h,T,V,S,A,H,E,I,G,k,K,C,M,D,R,L,q,X,z,W,N,Y,$,J,Q,o,s,Z,ee,te,P,ne,_}),function(){return zg(s)})).finally(function(){Oe(a.j,s)}),t=this,r=(e=e).promise,t.i.push(r),e.finally(function(){Oe(t.i,r)})},e.remove=function(e){return Um(this,(o=this,s=e,Ie(function(e){switch(e.g){case 1:if(Om(),null==(d=mm(s))||"manifest"!=d.g)throw new ke(2,9,9004,s);return d=d,h=new am,M(e,2),xe(e,h.init(),4);case 4:return xe(e,sm(h,d.Wa(),d.va()),5);case 5:return xe(e,(f=e.h).getManifests([d.key()]),6);case 6:return p=e.h,p=p[0],xe(e,Promise.all([(u=o,l=p,c=h,Ie(function(e){return xe(e,(t=u.g,n=u.h.drm,i=c,r=l,Ie(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(t.length)return e.g.get(t[0]).getEmeSessionCell();throw new ke(2,9,9e3,"No supported storage mechanisms found")}(i),o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:_m(r,!1),videoCapabilities:_m(r,!0)}}),xe(e,Sm(n,t,o),2)):e.return():3!=e.g?(s=e.h,xe(e,a.remove(s),3)):xe(e,a.add(o.filter(function(e){return!s.includes(e.sessionId)})),0)})),0);var t,n,i,r,a,o,s})),(n=f,i=d,a=function(e){for(var t=new Set,n=(e=we(e.streams)).next();!n.done;n=e.next())for(var i=(n=we(n.value.segments)).next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey);return Array.from(t)}(r=p),Am(i,r),Promise.all([n.removeSegments(a,t),n.removeManifests([i.key()],t)]))]),2);case 2:return Ce(e),xe(e,h.destroy(),8);case 8:Me(e,0)}function t(){}var n,i,r,a,u,l,c})));var o,s,d,h,f,p},e.Oh=function(){return Um(this,(n=this,Ie(function(e){switch(e.g){case 1:return Om(),i=n.g,r=n.h.drm,a=new am,o=!1,M(e,2),xe(e,a.init(),4);case 4:s=[],t=function(e){s.push(e)},a.g.forEach(function(e){t(e.getEmeSessionCell())}),u=we(s),l=u.next();case 5:if(l.done){e.B(2);break}return xe(e,(c=l.value).getAll(),8);case 8:return d=e.h,xe(e,Sm(r,i,d),9);case 9:return h=e.h,xe(e,c.remove(h),10);case 10:h.length!=d.length&&(o=!0),l=u.next(),e.B(5);break;case 2:return Ce(e),xe(e,a.destroy(),11);case 11:Me(e,3);break;case 3:return e.return(!o)}var t})));var n,i,r,a,o,s,u,l,c,d,h},e.list=function(){return Um(this,Ie(function(e){switch(e.g){case 1:return Om(),r=[],t=new am,M(e,2),xe(e,t.init(),4);case 4:return a=Promise.resolve(),i=function(n,t){a=a.then(function(){return Ie(function(e){if(1==e.g)return xe(e,t.getAllManifests(),2);e.h.forEach(function(e,t){e=Am(new gm("manifest",n.Wa,n.va,t),e),r.push(e)}),Te(e)})})},t.g.forEach(function(e,n){e.getCells().forEach(function(e,t){i({Wa:n,va:t},e)})}),xe(e,a,2);case 2:return Ce(e),xe(e,t.destroy(),6);case 6:Me(e,3);break;case 3:return e.return(r)}var i}));var r,t,a},t("shaka.offline.Storage",Cm),Cm.deleteAll=function(){var r;return Ie(function(e){return 1==e.g?(r=new am,M(e,2),xe(e,(t=r,Ie(function(e){return 1==e.g?(n=Array.from(t.g.values()),(i=0<n.length)||lm.forEach(function(e){(e=e())&&n.push(e)}),xe(e,Promise.all(n.map(function(e){return e.erase()})),2)):i?e.B(0):xe(e,Promise.all(n.map(function(e){return e.destroy()})),0)})),2)):5!=e.g?(Ce(e),xe(e,r.destroy(),5)):Me(e,0);var t,n,i})},Cm.prototype.removeEmeSessions=Cm.prototype.Oh,Cm.prototype.getNetworkingEngine=Cm.prototype.Ob,Cm.support=Mm;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 Vm(){}function Hm(e,t){for(e={priority:t||0,callback:e},t=0;t<Gm.length;t++)if(Gm[t].priority<e.priority)return void Gm.splice(t,0,e);Gm.push(e)}jl.offline=Mm,t("shaka.polyfill",Vm),Vm.register=Hm,Vm.installAll=function(){for(var e=we(Gm),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){X("Error installing polyfill!",e)}}};var Gm=[];function Km(){this.g=new Xm}function qm(){q.AbortController||(q.AbortController=Km,q.AbortSignal=Xm)}function Xm(){h.call(this),this.h=!1,this.g=void 0,this.onabort=null}function zm(){}function Wm(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=we(["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?this.removeAttribute(t):this.setAttribute(t,e)}})}(t.value)}function Ym(){}function $m(){i1()}function Jm(){}function Qm(){var e;q.Document&&((e=Element.prototype).requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,(e=Document.prototype).exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.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",Zm),document.addEventListener("webkitfullscreenerror",Zm),document.addEventListener("mozfullscreenchange",Zm),document.addEventListener("mozfullscreenerror",Zm),document.addEventListener("MSFullscreenChange",Zm),document.addEventListener("MSFullscreenError",Zm))}function Zm(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 e0(){}function t0(){var e=!0;(e=En()||Cn("PlayStation 5")||In()||Cn("Web0S")||wn()||An()||Cn("PC=EOS")||Cn("Hisense")||Cn("VIDAA")?!1:e)&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),l0=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=n0)}function n0(n){var i,r,a,o,s,u,l,c;return Ie(function(e){switch(e.g){case 1:if(i={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:n},!n)return e.return(i);if(l=n.video,a=n.audio,"media-source"==n.type){if(!mn())return e.return(i);var t;if(l)if(!(An()?q.cast&&cast.__platform__&&cast.__platform__.canDisplayType?(t=l.contentType,l.width&&l.height&&(t+="; width="+l.width+"; height="+l.height),l.framerate&&(t+="; framerate="+l.framerate),"pq"===l.transferFunction&&(t+="; eotf=smpte2084"),cast.__platform__.canDisplayType(t)):Z(l.contentType):wn()?(r=l.contentType,l.width&&l.height&&(r=(r+="; width="+l.width)+("; height="+l.height)),l.framerate&&(r+="; framerate="+l.framerate),l.bitrate&&(r+="; bitrate="+l.bitrate),Z(r)):Z(l.contentType)))return e.return(i);if(a&&!(An()&&a.spatialRendering?Z(a.contentType+"; spatialRendering=true"):Z(a.contentType)))return e.return(i)}else{if("file"!=n.type)return e.return(i);if(l&&(r=l.contentType,!vn(r))||a&&(l=a.contentType,!vn(l)))return e.return(i)}if(!n.keySystemConfiguration)return i.supported=!0,e.return(Promise.resolve(i));if(a=n.keySystemConfiguration,l=[],o=[],a.audio&&(s={robustness:a.audio.robustness||"",contentType:n.audio.contentType},wn()&&n.audio.contentType.includes('codecs="ac-3"')&&(s={robustness:s.robustness,contentType:'audio/mp4; codecs="ec-3"'}),l.push(s)),a.video&&(s={robustness:a.video.robustness||"",contentType:n.video.contentType},o.push(s)),u={initDataTypes:[a.initDataType],distinctiveIdentifier:a.distinctiveIdentifier,persistentState:a.persistentState,sessionTypes:a.sessionTypes},l.length&&(u.audioCapabilities=l),o.length&&(u.videoCapabilities=o),l=(n.video?n.video.contentType:"")+"#"+(n.audio?n.audio.contentType:"")+"#"+n.keySystemConfiguration.keySystem,Se(e,3),l in c0){c=c0[l],e.B(5);break}return xe(e,navigator.requestMediaKeySystemAccess(a.keySystem,[u]),6);case 6:c=e.h,c0[l]=c;case 5:Ae(e,4);break;case 3:Ee(e);case 4:c&&(i.supported=!0,i.keySystemAccess=c);case 2:return e.return(i)}})}Km.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 he("abort"),t.onabort&&t.onabort(e),t.dispatchEvent(e))},l.Object.defineProperties(Km.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),(Vm.AbortController=Km).install=qm,m(Xm,h),l.Object.defineProperties(Xm.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),Hm(qm),Hm((Vm.Aria=zm).install=Wm),Hm((Vm.EncryptionScheme=Ym).install=$m,-2),Hm((Vm.Fullscreen=Jm).install=Qm),(Vm.MediaCapabilities=e0).install=t0;var i0,r0,a0,o0,s0,u0,l0=null,c0=(e0.originalMcap=l0,{});function d0(){}function h0(){var t,n,a,e=kn();q.MediaSource&&(An()?p0():e?e<=10?q.MediaSource=null:e<=12?(f0(),n=SourceBuffer.prototype.remove,SourceBuffer.prototype.remove=function(e,t){return n.call(this,e,t-.001)}):e<=15&&f0():yn()?p0():(Tn()||xn()||Cn("Tizen 4"))&&(t=MediaSource.isTypeSupported,MediaSource.isTypeSupported=function(e){return"opus"!=Gt(e)&&t(e)})),q.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(a=MediaSource.isTypeSupported,Cn("Web0S")||(MediaSource.isTypeSupported=function(e){var t=e.split(/ *; */),n=t.findIndex(function(e){return e.startsWith("codecs=")});if(n<0)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 f0(){var t=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var e=t.apply(this,D.apply(0,arguments));return e.abort=function(){},e}}function p0(){var t=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(e){return"mp2t"!=e.split(";")[0].split("/")[1]&&t(e)}}function g0(){}function m0(){function t(){switch(q.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;screen.orientation&&screen.orientation.unlock||(null!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):null!=q.orientation&&(n=new v0,screen.orientation=n,t(),q.addEventListener("orientationchange",function(){t();var e=new he("change");n.dispatchEvent(e)})))}function v0(){h.call(this),this.type="",this.angle=0}function y0(){}function b0(e,t){try{var n=new T0(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function w0(e){var t=this.mediaKeys;return t&&t!=e&&A0(t,null),delete this.mediaKeys,(this.mediaKeys=e)?A0(e,this):Promise.resolve()}function x0(e){if(De(e=ne(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=ar(e=ir(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=ye(e),this.dispatchEvent(t)}function T0(e,t){if((this.keySystem=e).startsWith("com.apple.fps"))for(t=(e=we(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{var i=!(t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label}),r=!1;if(n.audioCapabilities)for(var a=we(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=we(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));t=(r=i?r:WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"))?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function S0(e){this.h=new WebKitMediaKeys(e),this.g=new Wi}function A0(e,t){if(e.g.Za(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",x0);try{return Fo(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function E0(e){h.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Wi,this.sessionId="",this.expiration=NaN,this.closed=new k,this.keyStatuses=new k0}function I0(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new he("keystatuseschange"),e.dispatchEvent(t)}function k0(){this.size=0,this.g=void 0}function C0(){}function M0(){!q.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=D0,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=R0,q.MediaKeys=L0,q.MediaKeySystemAccess=N0,q.shakaMediaKeysPolyfill=!0)}function D0(){return Promise.reject(Error("The key system specified is not supported."))}function R0(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function L0(){throw new TypeError("Illegal constructor.")}function N0(){throw this.keySystem="",new TypeError("Illegal constructor.")}function P0(){}function _0(){if(!(!q.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)z0="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=O0,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=U0,q.MediaKeys=F0,q.MediaKeySystemAccess=B0,q.shakaMediaKeysPolyfill=!0}}function j0(e){return z0?z0+e.charAt(0).toUpperCase()+e.slice(1):e}function O0(e,t){try{var n=new B0(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function U0(e){var t=this.mediaKeys;return t&&t!=e&&V0(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&V0(e,this),Promise.resolve()}function B0(e,t){for(var n=!1,i=("org.w3.clearkey"==(this.g=this.keySystem=e)&&(n=!(this.g="webkit-org.w3.clearkey")),!1),r=(r=document.getElementsByTagName("video")).length?r[0]:document.createElement("video"),a=(t=we(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=we(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=we(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)return void(this.h=o)}throw n="org.w3.clearkey"!=e&&"com.widevine.alpha"!=e?"Unsupported keySystem":"None of the requested configurations were supported.",(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function F0(e){this.l=e,this.h=null,this.g=new Wi,this.i=[],this.j=new Map}function V0(r,e){r.h=e,r.g.Za();var t=z0;e&&(r.g.D(e,t+"needkey",function(e){var t=new CustomEvent("encrypted");t.initDataType="cenc",t.initData=ye(e.initData),r.h.dispatchEvent(t)}),r.g.D(e,t+"keymessage",function(e){var t=H0(r,e.sessionId);t&&(e=new he("message",e=(new Map).set("messageType",null==t.keyStatuses.Pb()?"licenserequest":"licenserenewal").set("message",e.message)),t.h&&(t.h.resolve(),t.h=null),t.dispatchEvent(e))}),r.g.D(e,t+"keyadded",function(e){(e=H0(r,e.sessionId))&&(q0(e,"usable"),e.g&&e.g.resolve(),e.g=null)}),r.g.D(e,t+"keyerror",function(e){var t,n,i=H0(r,e.sessionId);i&&(t=Error("EME v0.1b key error"),(n=e.errorCode).systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&i.h?(45==e.systemCode&&(t.message="Unsupported session type."),i.h.reject(t),i.h=null):e.sessionId&&i.g?(i.g.reject(t),i.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?q0(i,"output-restricted"):q0(i,1==t?"expired":"internal-error")))}))}function H0(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 G0(e,t,n){h.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 k,this.keyStatuses=new X0}function K0(t,e,n){if(t.m)return Promise.reject(Error("The session is already initialized."));t.m=!0;try{var i;i="persistent-license"==t.l?n?ne(ar("LOAD_SESSION|"+n)):Ir(ar("PERSISTENT|"),e):ne(e)}catch(e){return Promise.reject(e)}t.h=new k;var r=j0("generateKeyRequest");try{t.j[r](t.i,i)}catch(e){if("InvalidStateError"!=e.name)return t.h=null,Promise.reject(e);new I(function(){try{t.j[r](t.i,i)}catch(e){t.h.reject(e),t.h=null}}).U(.01)}return t.h}function q0(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new he("keystatuseschange"),e.dispatchEvent(t)}function X0(){this.size=0,this.g=void 0}e0.memoizedMediaKeySystemAccessRequests_=c0,Hm(t0,-1),Hm((Vm.MediaSource=d0).install=h0),(Vm.Orientation=g0).install=m0,m(v0,h),v0.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))},v0.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Hm(m0),(Vm.PatchedMediaKeysApple=y0).uninstall=function(){i0&&(i0=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",r0),HTMLMediaElement.prototype.setMediaKeys=a0,q.MediaKeys=o0,q.MediaKeySystemAccess=s0,navigator.requestMediaKeySystemAccess=u0,r0=u0=a0=s0=o0=null,q.shakaMediaKeysPolyfill=!1)},y0.install=function(e){q.HTMLVideoElement&&q.WebKitMediaKeys&&(void 0!==e&&e&&(i0=!0,r0=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),a0=HTMLMediaElement.prototype.setMediaKeys,o0=q.MediaKeys,s0=q.MediaKeySystemAccess,u0=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=w0,q.MediaKeys=S0,q.MediaKeySystemAccess=T0,navigator.requestMediaKeySystemAccess=b0,q.shakaMediaKeysPolyfill=!0)},T0.prototype.createMediaKeys=function(){var e=new S0(this.keySystem);return Promise.resolve(e)},T0.prototype.getConfiguration=function(){return this.g},S0.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new E0(this.h)},S0.prototype.setServerCertificate=function(){return Promise.resolve(!1)},S0.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},m(E0,h),(e=E0.prototype).generateRequest=function(e,t){var n=this;this.h=new k;try{var i=this.l.createSession("video/mp4",ne(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 he("message",e=(new Map).set("messageType",null==n.keyStatuses.Pb()?"license-request":"license-renewal").set("message",ye(e.message))),n.dispatchEvent(e)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(I0(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");if(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:I0(n,"output-not-allowed");break;default:I0(n,"internal-error")}}),I0(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},e.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},e.update=function(e){this.g=new k;try{this.i.update(ne(e))}catch(e){this.g.reject(e)}return this.g},e.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}catch(e){this.closed.reject(e)}return this.closed},e.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(e=k0.prototype).Pb=function(){return this.g},e.forEach=function(e){this.g&&e(this.g,va.value())},e.get=function(e){if(this.has(e))return this.g},e.has=function(e){var t=va.value();return!(!this.g||!me(e,t))},e.entries=function(){},e.keys=function(){},e.values=function(){},(Vm.PatchedMediaKeysNop=C0).install=M0,L0.prototype.createSession=function(){},L0.prototype.setServerCertificate=function(){},L0.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},N0.prototype.getConfiguration=function(){},N0.prototype.createMediaKeys=function(){},Hm(M0,-10),(Vm.PatchedMediaKeysWebkit=P0).install=_0,B0.prototype.createMediaKeys=function(){var e=new F0(this.g);return Promise.resolve(e)},B0.prototype.getConfiguration=function(){return this.h},F0.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new 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 G0(t,this.l,e),this.i.push(e),e},F0.prototype.setServerCertificate=function(){return Promise.resolve(!1)},F0.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},m(G0,h),(e=G0.prototype).generateRequest=function(e,t){return K0(this,t,null)},e.load=function(e){return"persistent-license"==this.l?K0(this,null,e):Promise.reject(Error("Not a persistent session."))},e.update=function(e){var t=new k;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{t.g=n,a="webkit-org.w3.clearkey"==t.i?(r=nr(i),"oct"!=(a=JSON.parse(r)).keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=Sr(a.keys[0].k),Sr(a.keys[0].kid)):(r=ne(i),null);var r,a,o=j0("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},e.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=j0("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},e.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(e=X0.prototype).Pb=function(){return this.g},e.forEach=function(e){this.g&&e(this.g,va.value())},e.get=function(e){if(this.has(e))return this.g},e.has=function(e){var t=va.value();return!(!this.g||!me(e,t))},e.entries=function(){},e.keys=function(){},e.values=function(){};var z0="";function W0(){}function Y0(){var e;!q.HTMLVideoElement||(e=HTMLVideoElement.prototype).requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=J0,Object.defineProperty(e,"disablePictureInPicture",{get:Z0,set:ev,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Q0,document.addEventListener("webkitpresentationmodechanged",$0,!0))}function $0(e){var t="picture-in-picture"==(e=e.target).webkitPresentationMode?(document.pictureInPictureElement=e,new Event("enterpictureinpicture")):(document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),new Event("leavepictureinpicture"));e.dispatchEvent(t)}function J0(){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 Q0(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Z0(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function ev(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function tv(){}function nv(){!q.crypto||"randomUUID"in q.crypto||(q.crypto.randomUUID=iv)}function iv(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function rv(){}function av(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=ov)}function ov(){return new Promise(function(n,e){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){n({usage:e,quota:t})},e)})}function sv(){}function uv(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:lv})}function lv(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function cv(){}function dv(){var t;q.HTMLMediaElement&&(t=HTMLMediaElement.prototype.play,HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e})}function hv(){}function fv(){var e;q.HTMLVideoElement&&!(e=HTMLVideoElement.prototype).getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||Sn())&&(e.getVideoPlaybackQuality=pv)}function pv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function gv(){}function mv(){if(!q.VTTCue&&q.TextTrackCue){var i=null,e=TextTrackCue.length;if(3==e)i=vv;else if(6==e)i=yv;else{try{var t=!!vv(1,2,"")}catch(e){t=!1}t&&(i=vv)}i&&(q.VTTCue=function(e,t,n){return i(e,t,n)})}}function vv(e,t,n){return new q.TextTrackCue(e,t,n)}function yv(e,t,n){return new q.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}function bv(){}Hm(_0),Hm((Vm.PiPWebkit=W0).install=Y0),Hm((Vm.RandomUUID=tv).install=nv),Hm((Vm.StorageEstimate=rv).install=av),Hm((Vm.Symbol=sv).install=uv),Hm((Vm.VideoPlayPromise=cv).install=dv),Hm((Vm.VideoPlaybackQuality=hv).install=fv),Hm((Vm.VTTCue=gv).install=mv),bv.prototype.parseInit=function(){},bv.prototype.setSequenceMode=function(){},bv.prototype.setManifestType=function(){},bv.prototype.parseMedia=function(e,t){for(var n,i=null,r=[],a=(e=we(e=nr(e).split(/\r?\n/))).next();!a.done;a=e.next())(a=a.value)&&!/^\s+$/.test(a)&&(a=wv.exec(a))&&(n=xv.exec(a[1]),a=new T(n=60*parseInt(n[1],10)+parseFloat(n[2].replace(",",".")),t.segmentEnd||n+2,a[2]),i&&(i.endTime=n,r.push(i)),i=a);return i&&r.push(i),r},t("shaka.text.LrcTextParser",bv);var wv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,xv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function Tv(){}function Sv(e,t,n,i,r,a,o,s){if("rtl"==Ev(t,n,a,"direction",o=o||s)&&(e.direction="rtl"),"tb"==(s=Ev(t,n,a,"writingMode",o))||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=ze),(s=Ev(t,n,a,"textAlign",!0))?(e.positionAlign=Xv[s],e.lineAlign=qv[s],e.textAlign=Ke[s.toUpperCase()]):e.textAlign=Ge,(s=Ev(t,n,a,"displayAlign",!0))&&(e.displayAlign=Xe[s.toUpperCase()]),(s=Ev(t,n,a,"color",o))&&(e.color=s),(s=Ev(t,n,a,"backgroundColor",o))&&(e.backgroundColor=s),(s=Ev(t,n,a,"border",o))&&(e.border=s),s=Ev(t,n,a,"fontFamily",o))switch(s){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=s}switch((s=Ev(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=700),s=Ev(t,n,a,"wrapOption",o),e.wrapLine=!s||"noWrap"!=s,(s=Ev(t,n,a,"lineHeight",o))&&s.match(Ov)&&(e.lineHeight=s),(s=Ev(t,n,a,"fontSize",o))&&(s.match(Ov)||s.match(jv))&&(e.fontSize=s),(s=Ev(t,n,a,"fontStyle",o))&&(e.fontStyle=nt[s.toUpperCase()]),i?(r=i.getAttribute("imageType")||i.getAttribute("imagetype"),s=i.getAttribute("encoding"),i=i.textContent.trim(),"PNG"==r&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=Ev(t,n,a,"textOutline",o))&&((i=i.split(" "))[0].match(Ov)?e.textStrokeColor=e.color:(e.textStrokeColor=i[0],i.shift()),i[0]&&i[0].match(Ov)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=Ev(t,n,a,"letterSpacing",o))&&i.match(Ov)&&(e.letterSpacing=i),(i=Ev(t,n,a,"linePadding",o))&&i.match(Ov)&&(e.linePadding=i),(i=Ev(t,n,a,"opacity",o))&&(e.opacity=parseFloat(i)),(i=Iv(n,a,"textDecoration"))&&Av(e,i),(i=kv(t,a,"textDecoration"))&&Av(e,i),(i=Ev(t,n,a,"textCombine",o))&&(e.textCombineUpright=i),Ev(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function Av(e,t){for(var n=(t=we(t.split(" "))).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")&&Oe(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Oe(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Oe(e.textDecoration,"overline")}}function Ev(e,t,n,i,r){return r=void 0===r||r,(e=kv(e,n,i))?e:r?Iv(t,n,i):null}function Iv(e,t,n){if(!e)return null;var i=Nr(e,Wv,n);return i||Cv(e,t,n)}function kv(e,t,n){var i=Nr(e,Wv,n);return i||Cv(e,t,n)}function Cv(e,t,n){e=Mv(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=Lr(e[r],"urn:ebu:tt:style",n);(a=(a=a||Nr(e[r],Wv,n))||kv(e[r],t,n))&&(i=a)}return i}function Mv(e,t,n,i,r){var a=[];if(!e||n.length<1)return a;var o=e;for(e=null;o&&!(e=r?Lr(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(r=(t=we(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=we(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}return a}function Dv(e,t,n,i){return e=Rv(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function Rv(e,t){var n=Lv(e.getAttribute("begin"),t),i=Lv(e.getAttribute("end"),t);return e=Lv(e.getAttribute("dur"),t),{start:n,end:i=null==i&&null!=e?n+e:i}}function Lv(e,t){var n=null;if(Bv.test(e)){e=Bv.exec(e);var n=Number(e[1]),i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);n=(r+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*i+3600*n}else if(Fv.test(e))n=Nv(Fv,e);else if(Vv.test(e))n=Nv(Vv,e);else if(Hv.test(e))e=Hv.exec(e),n=Number(e[1])/t.frameRate;else if(Gv.test(e))e=Gv.exec(e),n=Number(e[1])/t.g;else if(Kv.test(e))n=Nv(Kv,e);else if(e)throw new ke(2,2,2001,"Could not parse cue time range in TTML");return n}function Nv(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 Pv(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]))}Qt["application/x-subtitle-lrc"]=function(){return new bv},Tv.prototype.parseInit=function(){},Tv.prototype.setSequenceMode=function(){},Tv.prototype.setManifestType=function(){},Tv.prototype.parseMedia=function(e,t,n){var i=nr(e);if(e=[],""==i)return e;var r=qr(i,"tt");if(!r)throw new ke(2,2,2005,"Failed to parse TTML.");if(!(i=r.getElementsByTagName("body")[0]))return[];var a,o=Nr(r,zv,"frameRate"),s=Nr(r,zv,"subFrameRate"),u=Nr(r,zv,"frameRateMultiplier"),l=Nr(r,zv,"tickRate"),c=Nr(r,zv,"cellResolution"),d=r.getAttribute("xml:space")||"default",h=Nr(r,Wv,"extent");if("default"!=d&&"preserve"!=d)throw new ke(2,2,2005,"Invalid xml:space value: "+d);for(var d="default"==d,o=new Pv(o,s,u,l),c=(c=c&&/^(\d+) (\d+)$/.exec(c))?{Kb:parseInt(c[1],10),rows:parseInt(c[2],10)}:null,s=(s=r.getElementsByTagName("metadata")[0])?(a=s,Array.from(a.childNodes).filter(function(e){return e instanceof Element})):[],u=Array.from(r.getElementsByTagName("style")),l=[],f=we(r=Array.from(r.getElementsByTagName("region"))),p=f.next();!p.done;p=f.next()){var g,m,v,y,b=p.value,p=new it,w=b.getAttribute("xml:id");w?(p.id=w,g=null,w=(g=h?_v.exec(h)||Uv.exec(h):g)?Number(g[1]):null,g=g?Number(g[2]):null,(v=Iv(b,u,"extent"))&&null!=(y=(m=_v.exec(v))||Uv.exec(v))&&(p.width=Number(y[1]),p.height=Number(y[2]),m||(null!=w&&(p.width=100*p.width/w),null!=g&&(p.height=100*p.height/g)),p.widthUnits=m||null!=w?rt:0,p.heightUnits=m||null!=g?rt:0),(b=Iv(b,u,"origin"))&&null!=(y=(m=_v.exec(b))||Uv.exec(b))&&(p.viewportAnchorX=Number(y[1]),p.viewportAnchorY=Number(y[2]),m?v||(p.width=100-p.viewportAnchorX,p.widthUnits=rt,p.height=100-p.viewportAnchorY,p.heightUnits=rt):(null!=g&&(p.viewportAnchorY=100*p.viewportAnchorY/g),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=m||null!=w?rt:0)):p=null,p&&l.push(p)}if(z(i,"p").length)throw new ke(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(h=we(z(i,"div"))).next();!f.done;f=h.next())if(z(f.value,"span").length)throw new ke(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,h){var f=t.parentNode;if(t.nodeType==Node.COMMENT_NODE)return null;if(t.nodeType==Node.TEXT_NODE){if(!d)return null;var p=document.createElement("span");p.textContent=t.textContent}else p=t;for(var g=null,m=we(Yv),v=m.next();!v.done&&!(g=Mv(p,"backgroundImage",r,"#",v.value)[0]);v=m.next());m=null;var y=Nr(p,Yv,"backgroundImage");h&&y&&!y.startsWith("#")&&(v=new gt(h),y=new gt(y),(v=v.resolve(y).toString())&&(m=v));("p"==t.nodeName||g||m)&&(d=!0);t=d;v="default"==(p.getAttribute("xml:space")||(u?"default":"preserve"));y=Array.from(p.childNodes).every(function(e){return e.nodeType==Node.TEXT_NODE});u=[];if(!y)for(var b=we(p.childNodes),w=b.next();!w.done;w=b.next())(w=e(w.value,n,i,r,a,o,s,v,l,p,d,h))&&u.push(w);r=null!=c;h=/\S/.test(p.textContent);w=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(w||h||"br"==p.tagName||0!=u.length||r&&!v))return null;b=Rv(p,i);h=b.start;for(b=b.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)b=Dv(f,i,h,b),h=b.start,b=b.end,f=f.parentNode;null==h&&(h=0);h+=n.periodStart;b=null==b?1/0:b+n.periodStart;h=Math.max(h,n.segmentStart);b=Math.min(b,n.segmentEnd);if(!w&&0<u.length)for(h=1/0,b=0,n=we(u),i=n.next();!i.done;i=n.next())i=i.value,h=Math.min(h,i.startTime),b=Math.max(b,i.endTime);if("br"==p.tagName)return a=new T(h,b,""),a.lineBreak=!0,a;n="";y&&(n=p.textContent,v&&(n=n.trim(),n=n.replace(/\s+/g," ")));n=new T(h,b,n);n.nestedCues=u;d||(n.isContainer=!0);l&&(n.cellResolution=l);l=Mv(p,"region",o,"")[0];{var x;p.hasAttribute("region")&&l&&l.getAttribute("xml:id")&&(x=l.getAttribute("xml:id"),n.region=s.filter(function(e){return e.id==x})[0])}s=l;c&&r&&!p.getAttribute("region")&&!p.getAttribute("style")&&(s=Mv(c,"region",o,"")[0]);Sv(n,p,s,g,m,a,t,0==u.length);return n}(i,t,o,s,u,r,l,d,c,null,!1,n))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},t("shaka.text.TtmlTextParser",Tv);var _v=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,jv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ov=/^(\d+px|\d+em|\d*\.?\d+c)$/,Uv=/^(\d+)px (\d+)px$/,Bv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Fv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hv=/^(\d*(?:\.\d*)?)f$/,Gv=/^(\d*(?:\.\d*)?)t$/,Kv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),qv={left:$e,center:"center",right:"end",start:$e,end:"end"},Xv={left:"line-left",center:"center",right:"line-right"},zv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Wv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function $v(){this.g=new Tv}function Jv(){this.h=!1,this.g="UNKNOWN"}function Qv(e){for(var t=we(Object.entries(Qe)),n=t.next();!n.done;n=t.next()){var n=(i=we(n.value)).next().value,i=i.next().value,r=new T(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=we(Object.entries(Ze))).next();!n.done;n=t.next())n=(i=we(n.value)).next().value,i=i.next().value,(r=new T(0,0,"")).backgroundColor=i,e.set("."+n,r)}function Zv(e,t,n){if(e.includes("<")){0===n.size&&Qv(n);e:{for(var i=[],r=-1,a="",o=0;o<e.length;o++)if("/"===e[o]&&0<o&&"<"===e[o-1]){var s,u=e.indexOf(">",o);if(u<=o)break e;(u=e.substring(o+1,u))&&"c"===u&&(s=i.pop())?s===u?(a+="/"+u+">",o+=u.length+1):s.startsWith("c.")?(o+=u.length+1,a+="/"+s+">"):a+=e[o]: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(i=e,e=[],a=-1,r=0;r<i.length;r++)"<"===i[r]?a=r+1:">"===i[r]&&0<a&&((a=i.substr(a,r-a)).match(ry)&&e.push(a),a=-1);for(r=(e=we(e)).next();!r.done;r=e.next())r=r.value,i=i.replace("<"+r+">",'<div time="'+r+'">'),i+="</div>";e:{for(r=e=i,a=[],e="",i=!(o=-1),u=0;u<r.length;u++)if("/"===r[u]){if(-1===(s=r.indexOf(">",u))){e=r;break e}if((s=r.substring(u+1,s))&&"v"==s){var i=!0,l=null;if(l=a.length?a[a.length-1]:l){if(l===s)e+="/"+s+">";else{if(!l.startsWith("v")){e+=r[u];continue}e+="/"+l+">"}u+=s.length+1}else e+=r[u]}else e+=r[u]}else"<"===r[u]?"v"!=r[o=u+1]&&(o=-1):">"===r[u]&&0<o&&(a.push(r.substr(o,u-o)),o=-1),e+=r[u];for(a=(r=we(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=qr("<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=iy(e);else for(i=(e=we(i)).next();!i.done;i=e.next())!function e(t,n,i){var r=n.clone();r.nestedCues=[];r.payload="";r.rubyTag="";r.line=null;r.region=new it;r.position=null;r.size=0;if(t.nodeType===Node.ELEMENT_NODE&&t.nodeName)for(var a=we(t.nodeName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s,u=o=o.value;switch(u.startsWith(".voice-")&&(u='v[voice="'+(s=u.split("-").pop())+'"]',i.has(u)||(u="v[voice="+s+"]")),i.has(u)&&(u=i.get(u))&&(r.backgroundColor=ey(u.backgroundColor,r.backgroundColor),r.color=ey(u.color,r.color),r.fontFamily=ey(u.fontFamily,r.fontFamily),r.fontSize=ey(u.fontSize,r.fontSize),r.textShadow=ey(u.textShadow,r.textShadow),r.fontWeight=u.fontWeight,r.fontStyle=u.fontStyle,r.opacity=u.opacity,r.rubyTag=u.rubyTag,r.textCombineUpright=u.textCombineUpright,r.wrapLine=u.wrapLine),o){case"br":return r=Fe(r.startTime,r.endTime),void n.nestedCues.push(r);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;(o=ny(new Qf(o)))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}a=t.childNodes;if(_r(t)||1==a.length&&_r(a[0]))for(a=!0,i=we(t.textContent.split("\n")),t=i.next();!t.done;t=i.next())t=t.value,a||(a=Fe(r.startTime,r.endTime),n.nestedCues.push(a)),0<t.length&&(a=r.clone(),a.payload=iy(t),n.nestedCues.push(a)),a=!1;else for(n.nestedCues.push(r),n=we(a),t=n.next();!t.done;t=n.next())e(t.value,r,i)}(i.value,t,n);else t.payload=iy(e)}else t.payload=iy(e)}function ey(e,t){return e&&0<e.length?e:t}function ty(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],e.textAlign="middle"==t?Ge:Ke[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":He)):(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=Je[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Ye,e.line=Number(n[1]),n[2]&&(e.lineAlign=Je[n[2].toUpperCase()]))}function ny(e){if(null==(e=ep(e,ry)))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 iy(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},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||""}Qt["application/ttml+xml"]=function(){return new Tv},$v.prototype.parseInit=function(e){var t=!1;if((new dr).box("moov",P).box("trak",P).box("mdia",P).box("minf",P).box("stbl",P).O("stsd",hr).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new ke(2,2,2007)},$v.prototype.setSequenceMode=function(){},$v.prototype.setManifestType=function(){},$v.prototype.parseMedia=function(e,t,n){var i=this,r=!1,a=[];if((new dr).box("mdat",pr(function(e){r=!0,a=a.concat(i.g.parseMedia(e,t,n))})).parse(e,!1),r)return a;throw new ke(2,2,2007)},t("shaka.text.Mp4TtmlParser",$v),Qt['application/mp4; codecs="stpp"']=function(){return new $v},Qt['application/mp4; codecs="stpp.ttml"']=function(){return new $v},Qt['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new $v},Qt['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new $v},Jv.prototype.parseInit=function(){},Jv.prototype.setSequenceMode=function(e){this.h=e},Jv.prototype.setManifestType=function(e){this.g=e},Jv.prototype.parseMedia=function(e,t){var n=(e=(e=nr(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new ke(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=ny(new Qf(i[1]))))throw new ke(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=we(n[0].split("\n"))).next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){var i=new Qf(i),a=new it;tp(i),Zf(i);for(var o=tp(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"),Zf(i),o=tp(i)}t.push(a)}for(Qv(r=new Map),i=[],a=(n=we(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(s=[],o=-1,u=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=we(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 T(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=tt;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("--\x3e")||(s=a[0],a.splice(0,1)),u=ny(o=new Qf(a[0])),d=ep(o,/[ \t]+--\x3e[ \t]+/g),l=ny(o),null==u||null==d||null==l)X("Failed to parse VTT time code. Cue skipped:",s,a),a=null;else{for(u+=c,l+=c,a=a.slice(1).join("\n").trim(),r.has("global")?((c=r.get("global").clone()).startTime=u,c.endTime=l,c.payload=""):c=new T(u,l,""),Zf(o),u=tp(o);u;)ty(c,u,t),Zf(o),u=tp(o);Zv(a,c,r),null!=s&&(c.id=s),a=c}a&&i.push(a)}return i},t("shaka.text.VttTextParser",Jv);var ry=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ay(){this.g=null}function oy(){}function sy(e){if(null==(e=ep(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 uy(){this.g=new Jv}function ly(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=we((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).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 cy(){}function dy(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 hy(e){return 3600*((e=my.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Qt["text/vtt"]=function(){return new Jv},Qt['text/vtt; codecs="vtt"']=function(){return new Jv},Qt['text/vtt; codecs="wvtt"']=function(){return new Jv},ay.prototype.parseInit=function(e){var t=this,n=!1;if((new dr).box("moov",P).box("trak",P).box("mdia",P).O("mdhd",function(e){e=Fa(e.reader,e.version),t.g=e.timescale}).box("minf",P).box("stbl",P).O("stsd",hr).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new ke(2,2,2008);if(!n)throw new ke(2,2,2008)},ay.prototype.setSequenceMode=function(){},ay.prototype.setManifestType=function(){},ay.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new ke(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new dr).box("moof",P).box("traf",P).O("tfdt",function(e){o=!0,i=Ba(e.reader,e.version).baseMediaDecodeTime}).O("tfhd",function(e){l=Ua(e.reader,e.flags).Kf}).O("trun",function(e){s=!0,r=Va(e.reader,e.version,e.flags).ig}).box("mdat",pr(function(e){u=!0,n=e})).parse(e,!1),!u&&!o&&!s)throw new ke(2,2,2008);e=i;for(var c=new ur(n,0),d=we(r),h=d.next();!h.done;h=d.next()){var f=(h=h.value).hf||l,p=h.Wd?i+h.Wd:e,g=(e=p+(f||0),0);do{var m=c.L();g+=m;var v=null;"vttc"==mr(c.L())?8<m&&(v=c.ub(m-8)):c.skip(m-8),f&&v&&(m=function(e,t,n){var i,r,a;return(new dr).box("payl",pr(function(e){i=nr(e)})).box("iden",pr(function(e){r=nr(e)})).box("sttg",pr(function(e){a=nr(e)})).parse(e),i?function(e,t,n,i,r){if(i=new T(i,r,""),Zv(e,i,new Map),t&&(i.id=t),n)for(e=new Qf(n),t=tp(e);t;)ty(i,t,[]),Zf(e),t=tp(e);return i}(i,r,a,t,n):null}(v,t.periodStart+p/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(tn)},t("shaka.text.Mp4VttParser",ay),Qt['application/mp4; codecs="wvtt"']=function(){return new ay},oy.prototype.parseInit=function(){},oy.prototype.setSequenceMode=function(){},oy.prototype.setManifestType=function(){},oy.prototype.parseMedia=function(e){var t=nr(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=we(t.split("\n\n"))).next();!n.done;n=t.next()){var i=sy(a=new Qf((n=n.value.split("\n"))[0])),r=ep(a,/,/g),a=sy(a);if(null==i||null==r||null==a)throw new ke(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new T(i,a,n.slice(1).join("\n").trim()))}return e},t("shaka.text.SbvTextParser",oy),Qt["text/x-subviewer"]=function(){return new oy},uy.prototype.parseInit=function(){},uy.prototype.setSequenceMode=function(){},uy.prototype.setManifestType=function(){},uy.prototype.parseMedia=function(e,t,n){return e=ne(ar(e=ly(e=nr(e)))),this.g.parseMedia(e,t,n)},t("shaka.text.SrtTextParser",uy),uy.srt2webvtt=ly,Qt["text/srt"]=function(){return new uy},cy.prototype.parseInit=function(){},cy.prototype.setSequenceMode=function(){},cy.prototype.setManifestType=function(){},cy.prototype.parseMedia=function(e){for(var t="",n="",i=(e=we(e=nr(e).split(/\r?\n\s*\r?\n/))).next();!i.done;i=e.next()){var r=fy.exec(i.value);r&&(i=r[1],r=r[2],"V4 Styles"==i||"V4+ Styles"==i?t=r:"Events"==i&&(n=r))}e=[];for(var i=null,a=(t=we(t.split(/\r?\n/))).next();!a.done;a=t.next())if(r=a.value,!/^\s*;/.test(r)&&(a=py.exec(r)))if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(gy);else if("Style"==r){for(var r=a.split(gy),a={},o=0;o<i.length&&o<r.length;o++)a[i[o]]=r[o];e.push(a)}for(i=[],t=null,r={},a=(n=we(n.split(/\r?\n/))).next();!a.done;r={ee:r.ee},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=py.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(gy);else if("Dialogue"==a){o=o.split(gy),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new T(s=hy(a.Start),hy(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));if(r.ee=a.Style,a=e.find(function(t){return function(e){return e.Name==t.ee}}(r))){u=void 0;l=void 0;c=void 0;var u=o;var l=a;var c=l.Fontname;c&&(u.fontFamily=c),(c=l.Fontsize)&&(u.fontSize=c+"px");(c=l.PrimaryColour)&&(c=dy(c))&&(u.color=c);(c=l.BackColour)&&(c=dy(c))&&(u.backgroundColor=c);l.Bold&&(u.fontWeight=700),l.Italic&&(u.fontStyle="italic"),l.Underline&&u.textDecoration.push("underline"),(c=l.Spacing)&&(u.letterSpacing=c+"px");if(c=l.Alignment)switch(parseInt(c,10)){case 1:u.displayAlign=qe,u.textAlign="start";break;case 2:u.displayAlign=qe,u.textAlign=Ge;break;case 3:u.displayAlign=qe,u.textAlign="end";break;case 5:u.displayAlign="before",u.textAlign="start";break;case 6:u.displayAlign="before",u.textAlign=Ge;break;case 7:u.displayAlign="before",u.textAlign="end";break;case 9:u.displayAlign="center",u.textAlign="start";break;case 10:u.displayAlign="center",u.textAlign=Ge;break;case 11:u.displayAlign="center",u.textAlign="end"}(l=l.AlphaLevel)&&(u.opacity=parseFloat(l))}i.push(o)}return i},t("shaka.text.SsaTextParser",cy);var fy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,py=/^\s*([^:]+):\s*(.*)/,gy=/\s*,\s*/,my=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function vy(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)?{Hd:n,S:e}:null}function yy(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(n.length-1<i)return null;var r=1+((192&e[t+2])>>>6),a=(1&e[t+2])<<2;return a|=(192&e[t+3])>>>6,{sampleRate:n[i],channelCount:a,ha:"mp4a.40."+r}}function by(e){this.i=e,this.h=0,this.g=new Map}function wy(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,s=(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,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,fa:e,S:r}}function xy(e){this.i=e,this.h=0,this.g=new Map}function Ty(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]<<0))return null;za(s=new qa(e.subarray(t+2)),2),za(s,3);var n=ie(s,11)+1<<1,i=ie(s,2),r=3==i?(i=[24e3,22060,16e3][i=ie(s,2)],3):(i=[48e3,44100,32e3][i],ie(s,2)),a=ie(s,3),o=ie(s,1),s=ie(s,5);return t+n>e.byteLength?null:(e=Math.floor(n*i/(16*[1,2,3,6][r])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,i<<6|s<<1|0,0|a<<1|o<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][a]+o,fa:e,S:n})}function Sy(e){this.i=e,this.h=0,this.g=new Map}function Ay(e){for(var t,n=!1,i=[],r=e.find(function(e){return 7==e.type}),a=!1,o=(e=we(e)).next();!o.done;o=e.next()){var s=!1;switch((o=o.value).type){case 1:var s=a=!0,u=o.data;r&&4<u.length&&(oe(t=new qa(u)),re(t),2===(u=re(t))||4===u||7===u||9===u)&&(n=!0);break;case 5:n=s=a=!0;break;case 6:case 7:case 8:s=!0;break;case 9:a=s=!0;break;case 12:s=!0;break;default:s=!1}a&&s&&(s=o.fullData.byteLength,(u=new Uint8Array(4))[0]=s>>24&255,u[1]=s>>16&255,u[2]=s>>8&255,u[3]=255&s,i.push(Ir(u,o.fullData)))}return i.length?{data:Ir.apply(wr,le(i)),Vc:n}:null}Qt["text/x-ssa"]=function(){return new cy},(e=by.prototype).destroy=function(){this.g.clear()},e.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},e.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(qt(t)||"mp4a.40.2")+'"':t},e.getOriginalMimeType=function(){return this.i},e.transmux=function(e,t,n,i){for(var r=ne(e),a=Oa(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;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return i<=n?void 0:(t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1])}}(r,o);o++);if(e=1e3*n.endTime,(a=ja(a)).length&&n&&(n=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=n.data),!(n=yy(r,o)))return Promise.reject(new ke(2,3,3018));for(t.audioSamplingRate=n.sampleRate,t.channelsCount=n.channelCount,a=[];o<r.length;){var s=vy(r,o);if(!s)return Promise.reject(new ke(2,3,3018));var u=s.Hd+s.S;o+u<=r.length&&a.push({data:r.subarray(o+s.Hd,o+u),size:s.S,duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),o+=u}return r=n.sampleRate,e=Math.floor(e*r/1e3),e=new tg([i={id:t.id,type:"audio",codecs:n.ha,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:e,Oa:a},stream:t}]),this.g.has(t.id)?i=this.g.get(t.id):(i=ng(e),this.g.set(t.id,i)),t=sg(e),this.h++,t=Ir(i,t),Promise.resolve(t)},t("shaka.transmuxer.AacTransmuxer",by),st("audio/aac",function(){return new by("audio/aac")},ct),(e=xy.prototype).destroy=function(){this.g.clear()},e.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},e.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':t},e.getOriginalMimeType=function(){return this.i},e.transmux=function(e,t,n,i){for(var r=Oa(e=ne(e)),a=r.length;a<e.length&&!function(e,t){if(11===e[t]&&119===e[t+1]){var n=0,i=5;for(t+=i;0<i;){var r=e[t],a=Math.min(i,8),o=8-a;r=(r&4278190080>>>24+o<<o)>>o,n=n?n<<a|r:r,t+=1,i-=a}if(n<16)return 1}}(e,a);a++);var o=1e3*n.endTime;(r=ja(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=wy(e,a);if(!u)return Promise.reject(new ke(2,3,3018));t.audioSamplingRate=u.sampleRate,t.channelsCount=u.channelCount,n=u.sampleRate,r=u.fa,s.push({data:e.subarray(a,a+u.S),size:u.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),a+=u.S}return e=Math.floor(o*n/1e3),e=new tg([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:i,Ra:[],fa:r,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:e,Oa:s},stream:t}]),this.g.has(t.id)?i=this.g.get(t.id):(i=ng(e),this.g.set(t.id,i)),t=sg(e),this.h++,t=Ir(i,t),Promise.resolve(t)},t("shaka.transmuxer.Ac3Transmuxer",xy),st("audio/ac3",function(){return new xy("audio/ac3")},ct),(e=Sy.prototype).destroy=function(){this.g.clear()},e.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},e.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},e.getOriginalMimeType=function(){return this.i},e.transmux=function(e,t,n,i){for(var r=Oa(e=ne(e)),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]<<0);a++);var o=1e3*n.endTime;(r=ja(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=Ty(e,a);if(!u)return Promise.reject(new ke(2,3,3018));t.audioSamplingRate=u.sampleRate,t.channelsCount=u.channelCount,n=u.sampleRate,r=u.fa,s.push({data:e.subarray(a,a+u.S),size:u.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),a+=u.S}return e=Math.floor(o*n/1e3),e=new tg([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:i,Ra:[],fa:r,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:e,Oa:s},stream:t}]),this.g.has(t.id)?i=this.g.get(t.id):(i=ng(e),this.g.set(t.id,i)),t=sg(e),this.h++,t=Ir(i,t),Promise.resolve(t)},t("shaka.transmuxer.Ec3Transmuxer",Sy),st("audio/ec3",function(){return new Sy("audio/ec3")},ct);var Ey=[100,110,122,244,44,83,86,118,128,138,139,134];function Iy(e){if(!e.length)return null;var t=e.find(function(e){return 32==e.type}),n=e.find(function(e){return 33==e.type}),i=e.find(function(e){return 34==e.type});if(!t||!n||!i)return null;o=t.fullData,oe(r=new qa(o,!0)),oe(r),ie(r,4),ie(r,2),ie(r,6),o=ie(r,3),r=ae(r);var r,a,o={Ze:o+1,uf:r},s=(e=function(e){oe(e=new qa(e,!0)),oe(e);var t=0,n=0,i=0,r=0,a=(ie(e,4),ie(e,3));ae(e);for(var o=ie(e,2),s=ie(e,1),u=ie(e,5),l=oe(e),c=oe(e),d=oe(e),h=oe(e),f=oe(e),p=oe(e),g=oe(e),m=oe(e),v=oe(e),y=oe(e),b=oe(e),w=[],x=[],T=0;T<a;T++)w.push(ae(e)),x.push(ae(e));if(0<a)for(T=a;T<8;T++)ie(e,2);for(T=0;T<a;T++)w[T]&&ie(e,88),x[T]&&oe(e);re(e),3==(w=re(e))&&ie(e,1),x=re(e),T=re(e),ae(e)&&(t+=re(e),n+=re(e),i+=re(e),r+=re(e));var S=re(e),A=re(e),E=re(e);if(ae(e))for(var I=0;I<=a;I++)re(e),re(e),re(e);else re(e),re(e),re(e);if(re(e),re(e),re(e),re(e),re(e),re(e),ae(e)&&ae(e))for(I=0;I<4;I++)for(var k=0;k<(3===I?2:6);k++)if(ae(e)){var C=Math.min(64,1<<4+(I<<1));1<I&&$a(e);for(var M=0;M<C;M++)$a(e)}else re(e);for(ae(e),ae(e),ae(e)&&(oe(e),re(e),re(e),ae(e)),I=re(e),C=k=0;C<I;C++)if(M=!1,M=0!==C?ae(e):M){C===I&&re(e),ae(e),re(e);for(var D=M=0;D<=k;D++){var R=ae(e),L=!1;R||(L=ae(e)),(R||L)&&M++}k=M}else{for(D=re(e),M=re(e),k=D+M,R=0;R<D;R++)re(e),ae(e);for(D=0;D<M;D++)re(e),ae(e)}if(ae(e))for(I=re(e),k=0;k<I;k++){for(C=0;C<E+4;C++)ie(e,1);ie(e,1)}if(I=E=1,k=0,ae(e),ae(e),ae(e)){if(ae(e)&&(C=oe(e),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],D=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<C&&C<16?(E=M[C-1],I=D[C-1]):255===C&&(E=ie(e,16),I=ie(e,16))),ae(e)&&ae(e),ae(e)&&(ie(e,3),ae(e),ae(e)&&(oe(e),oe(e),oe(e))),ae(e)&&(re(e),re(e)),ae(e),ae(e),ae(e),(C=ae(e))&&(re(e),re(e),re(e),re(e)),ae(e)&&(ie(e,32),ie(e,32),ae(e)&&re(e),ae(e)))for(D=!1,C=ae(e),M=ae(e),(C||M)&&((D=ae(e))&&(oe(e),ie(e,5),ae(e),ie(e,5)),ie(e,4),ie(e,4),D&&ie(e,4),ie(e,5),ie(e,5),ie(e,5)),R=0;R<=a;R++){var N=!0,P=(L=1,ae(e)||(N=ae(e)),!1);if(N?re(e):P=ae(e),P||(L=re(e)+1),C){for(N=0;N<L;N++)re(e),re(e),D&&(re(e),re(e));ae(e)}if(M){for(N=0;N<L;N++)re(e),re(e),D&&(re(e),re(e));ae(e)}}ae(e)&&(ae(e),ae(e),ae(e),k=re(e),re(e),re(e),re(e),re(e))}return{xe:b,De:o,Ee:s,Ce:u,ye:l,ze:c,Ae:d,Be:h,re:f,se:p,te:g,ue:m,ve:v,we:y,Rd:k,oe:0,ne:w,me:S,le:A,width:x-(t+n)*(1===w||2===w?2:1),height:T-(i+r)*(1===w?2:1),Uh:E,Th:I}}(n.fullData),r=i.fullData,oe(s=new qa(r,!0)),oe(s),re(s),re(s),ae(s),ae(s),ie(s,3),ae(s),ae(s),re(s),re(s),$a(s),ae(s),ae(s),ae(s)&&re(s),$a(s),$a(s),ae(s),ae(s),ae(s),ae(s),r=ae(s),s=ae(s),a=1,s&&r?a=0:s?a=3:r&&(a=2),{bf:a});return r=t.fullData,a=n.fullData,n=i.fullData,i={Ze:o.Ze,uf:o.uf,De:e.De,Ee:e.Ee,xe:e.xe,Ce:e.Ce,ye:e.ye,ze:e.ze,Ae:e.Ae,Be:e.Be,re:e.re,se:e.se,te:e.te,ue:e.ue,ve:e.ve,we:e.we,oe:e.oe,Rd:e.Rd,ne:e.ne,me:e.me,le:e.le,bf:s.bf},(o=new Uint8Array(23+(5+r.byteLength)+(5+a.byteLength)+(5+n.byteLength)))[0]=1,o[1]=(3&i.De)<<6|(i.Ee?1:0)<<5|31&i.Ce,o[2]=i.ye,o[3]=i.ze,o[4]=i.Ae,o[5]=i.Be,o[6]=i.re,o[7]=i.se,o[8]=i.te,o[9]=i.ue,o[10]=i.ve,o[11]=i.we,o[12]=i.xe,o[13]=240|(3840&i.Rd)>>8,o[14]=255&i.Rd,o[15]=252|3&i.bf,o[16]=252|3&i.ne,o[17]=248|7&i.me,o[18]=248|7&i.le,o[19]=0,o[20]=0,o[21]=(3&i.oe)<<6|(7&i.Ze)<<3|(i.uf?1:0)<<2|3,o[22]=3,o[23]=160,o[24]=0,o[25]=1,o[26]=(65280&r.byteLength)>>8,o[27]=(255&r.byteLength)>>0,o.set(r,28),o[23+(5+r.byteLength)]=161,o[r.byteLength+29]=0,o[r.byteLength+30]=1,o[r.byteLength+31]=(65280&a.byteLength)>>8,o[r.byteLength+32]=(255&a.byteLength)>>0,o.set(a,r.byteLength+33),o[23+(r.byteLength+10+a.byteLength)]=162,o[r.byteLength+10+a.byteLength+24]=0,o[r.byteLength+10+a.byteLength+25]=1,o[r.byteLength+10+a.byteLength+26]=(65280&n.byteLength)>>8,o[r.byteLength+10+a.byteLength+27]=(255&n.byteLength)>>0,o.set(n,r.byteLength+10+a.byteLength+28),t=o,{height:e.height,width:e.width,la:t,sa:e.Uh,ua:e.Th}}function ky(e,t){var n,i,r,a,o=e[t+1]>>3&3,s=e[t+1]>>1&3,u=e[t+2]>>4&15,l=e[t+2]>>2&3;return 1!==o&&0!==u&&15!==u&&3!==l?(n=e[t+3]>>6,u=1e3*My[14*(3===o?3-s:3==s?3:4)+u-1],l=Dy[3*(3===o?0:2===o?1:2)+l],o=Ry[o][s],i=Ly[s],r=Math.floor(o*u/l+(e[t+2]>>1&1))*i,(a=(a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i))?parseInt(a[1],10):0)&&a<=87&&2==s&&224e3<=u&&0==n&&(e[t+3]|=128),{sampleRate:l,channelCount:3==n?1:2,S:r,Sh:8*o*i}):null}function Cy(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}var My=[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],Dy=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ry=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ly=[0,1,1,4];function Ny(e){this.i=e,this.h=0,this.g=new Map}function Py(e){this.h=e,this.g=null}function _y(e){function n(){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)}))})}this.h=e,(this.g=Bf.get("ISOBoxer")())&&((e=this).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",n),e.g.addBoxProcessor("uuid",function(){for(var e=!0,t=0;t<16;t++)this.usertype[t]!==Oy[t]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),n.call(this))}))}function jy(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}(e=Ny.prototype).destroy=function(){this.g.clear()},e.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&Z(this.convertCodecs("audio",e))},e.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},e.getOriginalMimeType=function(){return this.i},e.transmux=function(e,t,n,i){for(n=Oa(e=ne(e)).length;n<e.length;n++){var r,a,o=n;if(o=!!(o+1<e.length&&Cy(e,o))&&(a=4,(o+=a=(r=ky(e,o))&&r.S?r.S:a)===e.length||o+1<e.length&&Cy(e,o)))break}var s;for(o=[];n<e.length;){if(!(r=ky(e,n)))return Promise.reject(new ke(2,3,3018));s=s||r,n+r.S<=e.length&&o.push({data:e.subarray(n,n+r.S),size:r.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),n+=r.S}return s?(e=9e4*s.Sh/s.sampleRate*this.h,s=new tg([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:s.sampleRate,duration:i,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:e,Oa:o},stream:t}]),this.g.has(t.id)?i=this.g.get(t.id):(i=ng(s),this.g.set(t.id,i)),t=sg(s),this.h++,t=Ir(i,t),Promise.resolve(t)):Promise.reject(new ke(2,3,3018))},t("shaka.transmuxer.Mp3Transmuxer",Ny),st("audio/mpeg",function(){return new Ny("audio/mpeg")},ct),(e=Py.prototype).destroy=function(){},e.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=_t("audio",n=qt(e).split(",")),n=_t("video",n);return!(!t||n||"mp3"!=Ht(t))&&Z(this.convertCodecs("audio",e))},e.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},e.getOriginalMimeType=function(){return this.h},e.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Qa,e=ne(e),"mp3"!=(e=this.g.parse(e)).Pc().audio||"audio"!=r)return Promise.reject(new ke(2,3,3018));for(r=new Uint8Array([]),t=(e=we(e.Mb())).next();!t.done;t=e.next())if(t=t.value.data)for(n=0;n<t.length;)(i=ky(t,n))?(n+i.S<=t.length&&(r=Ir(r,t.subarray(n,n+i.S))),n+=i.S):n++;return Promise.resolve(r)},t("shaka.transmuxer.MpegTsTransmuxer",Py),st("video/mp2t",function(){return new Py("video/mp2t")},dt),(e=_y.prototype).destroy=function(){},e.isSupported=function(e,t){var n=e.startsWith("mss/");return!(!this.g||!n)&&(t?Z(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Z(t)||Z(e)))},e.convertCodecs=function(e,t){return t.replace("mss/","")},e.getOriginalMimeType=function(){return this.h},e.transmux=function(e,t,n){if(!n)return Promise.resolve(ne(e));if(!t.mssPrivateData)return Promise.reject(new ke(2,3,3020));try{var i,r=this.g.parseBuffer(e),a=r.fetch("tfhd"),o=(a.track_ID=t.id+1,r.fetch("tfdt")),s=r.fetch("traf"),u=(null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale)),r.fetch("trun")),l=r.fetch("tfxd"),c=(l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1),r.fetch("tfrf")),d=(c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1),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"),g=(u.data_offset=p.getLength()+8,r.fetch("saio")),m=(null!==g&&(g.offset[0]=jy(p,"traf")+jy(s,"senc")+16),ne(r.write()));return Promise.resolve(m)}catch(e){return e instanceof ke?Promise.reject(e):Promise.reject(new ke(2,3,3022))}},t("shaka.transmuxer.MssTransmuxer",_y);var Oy=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function Uy(e){this.j=e,this.g=0,this.h=new Map,this.i=null}st("mss/audio/mp4",function(){return new _y("mss/audio/mp4")},ct),st("mss/video/mp4",function(){return new _y("mss/video/mp4")},ct),(e=Uy.prototype).destroy=function(){this.h.clear()},e.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e,n=_t("audio",i=qt(n=t?this.convertCodecs(t,e):n).split(",")),i=_t("video",i);return!(n&&(n=Ht(n),!Vy.includes(n))||i&&(n=Ht(i),!Hy.includes(n)))&&(t?Z(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Z(t)||Z(e)))},e.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=qt(t).replace("mp4a.40.34","mp3").split(",").map(this.Sg).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},e.Sg=function(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}return e},e.getOriginalMimeType=function(){return this.j},e.transmux=function(e,t,n,i,j){this.i?this.i.clearData():this.i=new Qa,e=ne(e);var r=this.i.parse(e),O=(e=[],r.Pc());try{var a,o=null;if("video"==j){switch(O.video){case"avc":var s=[],u=null,l=[],c=r.kc();if(!c.length)throw new ke(2,3,3023);for(var d=0;d<c.length;d++){var h,f=c[d],p=f.nalus,g=(l.push.apply(l,le(p)),Ay(p));g&&(null==u&&(u=f.dts),h=void 0,h=d+1<c.length?(c[d+1].dts||0)-(f.dts||0):1<c.length?(f.dts||0)-(c[d-1].dts||0):9e4*(n.endTime-n.startTime),s.push({data:g.data,size:g.data.byteLength,duration:h,Ta:Math.round((f.pts||0)-(f.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:g.Vc?2:1,Va:g.Vc?0:1}}))}var m=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 qa(t.data),i=oe(n);if(oe(n),oe(n),Ya(n),Ey.includes(i)&&(3===(i=re(n))&&za(n,1),Ya(n),Ya(n),za(n,1),ae(n)))for(var i=3!==i?8:12,r=0;r<i;r++)ae(n)&&Ja(n,r<6?16:64);if(Ya(n),0===(i=re(n)))re(n);else if(1===i)for(za(n,1),Ya(n),Ya(n),i=re(n),r=0;r<i;r++)Ya(n);Ya(n),za(n,1);var a,o=re(n),s=re(n),u=ie(n,1),l=(0===u&&za(n,1),za(n,1),0),c=0,d=0,h=0;return ae(n)&&(l=re(n),c=re(n),d=re(n),h=re(n)),r=i=1,ae(n)&&ae(n)&&(0<(a=oe(n))&&a<16?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][a-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][a-1]):255===a&&(i=ie(n,16),r=ie(n,16))),n=(2-u)*(s+1)*16-2*d-2*h,o=16*(o+1)-2*l-2*c,t=t.fullData,(l=[]).push(t.byteLength>>>8&255),l.push(255&t.byteLength),l=l.concat.apply(l,le(t)),e=e.fullData,(t=[]).push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,le(e)),{height:n,width:o,la:e=new Uint8Array([1,l[3],l[4],l[5],255,225].concat(l,[1],t)),sa:i,ua:r}}(l);if(!m||null==u)throw new ke(2,3,3018);t.height=m.height,t.width=m.width,o={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ra:[],fa:new Uint8Array([]),la:m.la,sa:m.sa,ua:m.ua,data:{gb:this.g,baseMediaDecodeTime:u,Oa:s},stream:t};break;case"hvc":if(c=[],f=null,p=[],!(s=r.kc()).length)throw new ke(2,3,3023);for(g=0;g<s.length;g++){l=(u=s[g]).nalus,p.push.apply(p,le(l));var m=!1,v=[],y=!1;for(h=(d=we(l)).next();!h.done;h=d.next()){var b,w,x=h.value;switch(x.type){case 1:case 0:var T=y=!0;break;case 19:case 20:case 21:m=T=y=!0;break;case 32:case 33:case 34:T=!0;break;case 35:y=T=!0;break;case 39:case 40:T=!0;break;default:T=!1}y&&T&&(b=x.fullData.byteLength,(w=new Uint8Array(4))[0]=b>>24&255,w[1]=b>>16&255,w[2]=b>>8&255,w[3]=255&b,v.push(Ir(w,x.fullData)))}var S=v.length?{data:Ir.apply(wr,le(v)),Vc:m}:null;S&&(null==f&&null!=u.dts&&(f=u.dts),m=void 0,m=g+1<s.length?(s[g+1].dts||0)-(u.dts||0):1<s.length?(u.dts||0)-(s[g-1].dts||0):9e4*(n.endTime-n.startTime),c.push({data:S.data,size:S.data.byteLength,duration:m,Ta:Math.round((u.pts||0)-(u.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:S.Vc?2:1,Va:S.Vc?0:1}}))}var A=Iy(p);if(!A||null==f)throw new ke(2,3,3018);t.height=A.height,t.width=A.width,o={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ra:[],fa:new Uint8Array([]),la:A.la,sa:A.sa,ua:A.ua,data:{gb:this.g,baseMediaDecodeTime:f,Oa:c},stream:t}}o&&(e.push(o),o=null)}if("audio"==j){switch(O.audio){case"aac":for(var E=[],I=null,U=we(r.Mb()),B=U.next();!B.done;B=U.next()){var F=B.value,k=F.data;if(k){var C,M=0;if(!(C=yy(k,M)))throw new ke(2,3,3018);for(t.audioSamplingRate=C.sampleRate,t.channelsCount=C.channelCount,null==I&&null!==F.pts&&(I=F.pts);M<k.length;){var V,D=vy(k,M);D?(M+(V=D.Hd+D.S)<=k.length&&E.push({data:k.subarray(M+D.Hd,M+V),size:D.S,duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),M+=V):M++}}}if(!C||null==I){if(!r.kc().length)throw new ke(2,3,3018);var I=9e4*n.startTime,H=_t("audio",t.codecs.split(","));if(!H||!t.channelsCount||!t.audioSamplingRate)throw new ke(2,3,3018);C={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,ha:H};var G=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}(H,t.channelsCount);if(!G)throw new ke(2,3,3018);for(var K=I+9e4*(n.endTime-n.startTime),r=I;r<K;)E.push({data:G,size:G.byteLength,duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),r+=1024/C.sampleRate*9e4}var R=C.sampleRate;r=I/9e4*R,o={id:t.id,type:"audio",codecs:C.ha,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:R,duration:i,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:r,Oa:E},stream:t};break;case"ac3":C=[],R=0,E=new Uint8Array([]),I=null;for(var q=(M=we(r.Mb())).next();!q.done;q=M.next()){var X=q.value,z=X.data;for(null==I&&null!==X.pts&&(I=X.pts),r=0;r<z.length;){var L=wy(z,r);L?(t.audioSamplingRate=L.sampleRate,t.channelsCount=L.channelCount,R=L.sampleRate,E=L.fa,C.push({data:z.subarray(r,r+L.S),size:L.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),r+=L.S):r++}}if(0==R||0==E.byteLength||null==I)throw new ke(2,3,3018);r=I/9e4*R,o={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:R,duration:i,Ra:[],fa:E,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:r,Oa:C},stream:t};break;case"ec3":C=[],R=0,I=new Uint8Array([]);for(var E=null,W=we(r.Mb()),Y=W.next();!Y.done;Y=W.next()){var $=Y.value,J=$.data;for(null==E&&null!==$.pts&&(E=$.pts),r=0;r<J.length;){var N=Ty(J,r);N?(t.audioSamplingRate=N.sampleRate,t.channelsCount=N.channelCount,R=N.sampleRate,I=N.fa,C.push({data:J.subarray(r,r+N.S),size:N.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),r+=N.S):r++}}if(0==R||0==I.byteLength||null==E)throw new ke(2,3,3018);r=E/9e4*R,o={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:R,duration:i,Ra:[],fa:I,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:r,Oa:C},stream:t};break;case"mp3":C=[];for(var R=null,Q=we(r.Mb()),Z=Q.next();!Z.done;Z=Q.next()){var ee=Z.value,P=ee.data;if(P)for(null==R&&null!==ee.pts&&(R=ee.pts),r=0;r<P.length;){var _=ky(P,r);_?(a=a||_,r+_.S<=P.length&&C.push({data:P.subarray(r,r+_.S),size:_.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),r+=_.S):r++}}if(!a||null==R)throw new ke(2,3,3018);var te=a.sampleRate;r=R/9e4*te,o={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:te,duration:i,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:r,Oa:C},stream:t}}o&&e.push(o)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}return e.length?(e=new tg(e),this.h.has(t.id)?i=this.h.get(t.id):(i=ng(e),this.h.set(t.id,i)),t=sg(e),this.g++,t=Ir(i,t),Promise.resolve(t)):Promise.reject(new ke(2,3,3018))},t("shaka.transmuxer.TsTransmuxer",Uy);var By,Fy,Vy=["aac","ac-3","ec-3","mp3"],Hy=["avc","hevc"];function Gy(){}function Ky(){By?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(By=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=qy):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function qy(t,n){var i,r=this;return Ie(function(e){return 1==e.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),xe(e,By.call(r,t,n),2)):t1(i=e.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=By,e.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Xy,e.return(Xy.call(r,t,n)))})}function Xy(t,n){var i,r,a,o,s,u,l,c,d=this;return Ie(function(e){if(1!=e.g)return c=e.h,e.return(new Zy(c,i));for(console.assert(d==navigator,'bad "this" for requestMediaKeySystemAccess'),i=e1(t),r=[],a=we(n),o=a.next();!o.done;o=a.next())l=o.value,s=zy(l.videoCapabilities,i),u=zy(l.audioCapabilities,i),l.videoCapabilities&&l.videoCapabilities.length&&!s.length||l.audioCapabilities&&l.audioCapabilities.length&&!u.length||((l=Object.assign({},l)).videoCapabilities=s,l.audioCapabilities=u,r.push(l));if(r.length)return xe(e,By.call(d,t,r),2);throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c})}function zy(e,t){return e&&e.filter(function(e){return!e.encryptionScheme||e.encryptionScheme==t})}function Wy(){}function Yy(){Fy?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Fy=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$y):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function $y(t){var n,i,r=this;return Ie(function(e){switch(e.g){case 1:return console.assert(r==navigator.mediaCapabilities,'bad "this" for decodingInfo'),xe(e,Fy.call(r,t),2);case 2:if(n=e.h,!t.keySystemConfiguration)return e.return(n);if((i=n.keySystemAccess)&&t1(i))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Fy,e.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Jy,i){e.B(3);break}return i=n,xe(e,Qy(t),4);case 4:return i.keySystemAccess=e.h,e.return(n);case 3:return e.return(Jy.call(r,t))}})}function Jy(t){var n,i,r,a,o,s,u=this;return Ie(function(e){switch(e.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=null,t.keySystemConfiguration&&(r=t.keySystemConfiguration,a=r.keySystem,i=r.audio&&r.audio.encryptionScheme,r=r.video&&r.video.encryptionScheme,n=e1(a),a={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:t},i&&i!=n||r&&r!=n)?e.return(a):xe(e,Fy.call(u,t),2);case 2:if((o=e.h).keySystemAccess){o.keySystemAccess=new Zy(o.keySystemAccess,n),e.B(3);break}if(t.keySystemConfiguration)return s=o,xe(e,Qy(t),5);e.B(3);break;case 5:s.keySystemAccess=e.h;case 3:return e.return(o)}})}function Qy(r){var a;return Ie(function(e){var t,n,i;return 1==e.g?(n=[],i=[],(t=r.keySystemConfiguration).audio&&n.push({robustness:t.audio.robustness||"",contentType:r.audio.contentType}),t.video&&i.push({robustness:t.video.robustness||"",contentType:r.video.contentType}),t={initDataTypes:t.initDataType?[t.initDataType]:[],distinctiveIdentifier:t.distinctiveIdentifier,persistentState:t.persistentState,sessionTypes:t.sessionTypes},n.length&&(t.audioCapabilities=n),i.length&&(t.videoCapabilities=i),a=t,xe(e,navigator.requestMediaKeySystemAccess(r.keySystemConfiguration.keySystem,[a]),2)):(a=e.h,e.return(a))})}function Zy(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function e1(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 t1(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function n1(){}function i1(){Ky(),Yy()}st("video/mp2t",function(){return new Uy("video/mp2t")},ht),t("EmeEncryptionSchemePolyfill",Gy),Gy.install=Ky,t("McEncryptionSchemePolyfill",Wy),Wy.install=Yy,Zy.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=we(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=we(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},Zy.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},t("EncryptionSchemePolyfills",n1),n1.install=i1,void 0!==a&&a.exports&&(a.exports=n1)}.call(t,e,e,void 0),"undefined"!=typeof exports)for(var n in t.shaka)exports[n]=t.shaka[n];else"function"==typeof define&&define.amd?define(function(){return t.shaka}):e.shaka=t.shaka}();