shaka-player 3.3.14 → 3.3.15

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.
@@ -32,10 +32,10 @@ while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProp
32
32
  fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ga(k,g)&&Ga(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.pb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ya:p}}return{id:l,
35
+ fa("Map",function(a){function b(){var h={};return h.qb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.qb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ya:p}}return{id:l,
36
36
  list:m,index:-1,ya:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ya?l.ya.value=k:(l.ya={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.ya),this.g.pb.next=l.ya,this.g.pb=l.ya,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ya&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ya.pb.next=h.ya.next,h.ya.next.pb=h.ya.pb,
38
- h.ya.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ya};e.prototype.get=function(h){return(h=d(this,h).ya)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ya?l.ya.value=k:(l.ya={next:this.g,qb:this.g.qb,head:this.g,key:h,value:k},l.list.push(l.ya),this.g.qb.next=l.ya,this.g.qb=l.ya,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ya&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ya.qb.next=h.ya.next,h.ya.next.qb=h.ya.qb,
38
+ h.ya.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.qb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ya};e.prototype.get=function(h){return(h=d(this,h).ya)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Ha(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
@@ -64,10 +64,10 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
64
64
  Copyright 2006 The Closure Library Authors
65
65
  SPDX-License-Identifier: Apache-2.0
66
66
  */
67
- function jb(a){var b;a instanceof jb?(kb(this,a.Va),this.Ub=a.Ub,this.Ya=a.Ya,lb(this,a.kc),this.Na=a.Na,nb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Ub=ob(b[2]||""),this.Ya=ob(b[3]||"",!0),lb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Va="";q.Ub="";q.Ya="";q.kc=null;q.Na="";q.Ib="";
68
- q.toString=function(){var a=[],b=this.Va;b&&a.push(qb(b,rb,!0),":");if(b=this.Ya){a.push("//");var c=this.Ub;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
69
- q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new jb);var c=!!a.Va;c?kb(b,a.Va):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.kc;var d=a.Na;if(c)lb(b,a.kc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Ya&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
67
+ function jb(a){var b;a instanceof jb?(kb(this,a.Wa),this.Ub=a.Ub,this.Za=a.Za,lb(this,a.kc),this.Oa=a.Oa,nb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Ub=ob(b[2]||""),this.Za=ob(b[3]||"",!0),lb(this,b[4]),this.Oa=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Wa="";q.Ub="";q.Za="";q.kc=null;q.Oa="";q.Ib="";
68
+ q.toString=function(){var a=[],b=this.Wa;b&&a.push(qb(b,rb,!0),":");if(b=this.Za){a.push("//");var c=this.Ub;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Oa)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
69
+ q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new jb);var c=!!a.Wa;c?kb(b,a.Wa):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a.Za;c?b.Za=a.Za:c=null!=a.kc;var d=a.Oa;if(c)lb(b,a.kc);else if(c=!!a.Oa){if("/"!=d.charAt(0))if(this.Za&&!this.Oa)d="/"+d;else{var e=b.Oa.lastIndexOf("/");-1!=e&&(d=b.Oa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Oa=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Wa=c?ob(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
71
71
  function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}
72
72
  function xb(a){if(!a.Fa&&(a.Fa={},a.bd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.bd=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.bd++;return this};
73
73
  q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.bd=this.bd}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
@@ -80,7 +80,7 @@ FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESP
80
80
  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,
81
81
  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};function yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
82
  function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}
83
- var Mb="text",Nb={fb:"video",Gb:"audio",oa:Mb,xc:"image",rh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
83
+ var Mb="text",Nb={gb:"video",Gb:"audio",oa:Mb,xc:"image",rh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
84
84
  function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
85
85
  function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
86
86
  Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
@@ -94,8 +94,8 @@ q.Ue=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
94
94
  q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=ac);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=ac||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.ah=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
95
95
  function $b(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Vb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
96
96
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
97
- Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ue;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={ki:"REPLAY",yh:"CAST",Zh:"NOT_APPLICABLE",pi:"SKIP_AD",Qh:"LOOP",ei:"PAUSE",$h:"OFF",mi:"REWIND",Gi:"UNMUTE",ph:"AD_TIME",Hh:"EXIT_FULL_SCREEN",ri:"SKIP_TO_LIVE",ti:"STATISTICS",ai:"ON",xh:"CAPTIONS",Eh:"ENTER_LOOP_MODE",AD_PROGRESS:"AD_PROGRESS",Hi:"UNRECOGNIZED_LANGUAGE",Kf:"SUBTITLE_FORCED",sh:"AUTO_QUALITY",oh:"AD_DURATION",Wh:"MUTE",ii:"PLAY",Ih:"EXIT_LOOP_MODE",ji:"PLAYBACK_RATE",Qe:"LIVE",BACK:"BACK",Jh:"EXIT_PICTURE_IN_PICTURE",Vh:"MULTIPLE_LANGUAGES",Uh:"MORE_SETTINGS",Ji:"VOLUME",
98
- Fi:"UNDETERMINED_LANGUAGE",Ph:"LANGUAGE",Mh:"FAST_FORWARD",Fh:"ENTER_PICTURE_IN_PICTURE",Nh:"FULL_SCREEN",gi:"PICTURE_IN_PICTURE",li:"RESOLUTION",qh:"AIRPLAY",oi:"SEEK"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Gd:d.Gd},e=a.next()){d.Gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
97
+ Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ue;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={Fh:"ENTER_PICTURE_IN_PICTURE",AD_PROGRESS:"AD_PROGRESS",ji:"PLAYBACK_RATE",Ph:"LANGUAGE",ai:"ON",yh:"CAST",Eh:"ENTER_LOOP_MODE",ii:"PLAY",Ih:"EXIT_LOOP_MODE",Hh:"EXIT_FULL_SCREEN",oh:"AD_DURATION",mi:"REWIND",xh:"CAPTIONS",Qe:"LIVE",ei:"PAUSE",Hi:"UNRECOGNIZED_LANGUAGE",Jh:"EXIT_PICTURE_IN_PICTURE",Ji:"VOLUME",Kf:"SUBTITLE_FORCED",gi:"PICTURE_IN_PICTURE",qh:"AIRPLAY",ki:"REPLAY",Wh:"MUTE",BACK:"BACK",Zh:"NOT_APPLICABLE",ti:"STATISTICS",sh:"AUTO_QUALITY",Vh:"MULTIPLE_LANGUAGES",Uh:"MORE_SETTINGS",
98
+ pi:"SKIP_AD",Gi:"UNMUTE",$h:"OFF",Nh:"FULL_SCREEN",Mh:"FAST_FORWARD",ri:"SKIP_TO_LIVE",Fi:"UNDETERMINED_LANGUAGE",ph:"AD_TIME",oi:"SEEK",li:"RESOLUTION",Qh:"LOOP"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Gd:d.Gd},e=a.next()){d.Gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
99
  function kc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
100
100
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
101
101
  function wc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!kc(a.nestedCues,b.nestedCues,wc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
@@ -169,15 +169,15 @@ function ff(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
169
169
  q.request=function(a,b){var c=this,d=new gf;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new hf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ye(b.retryParameters):Pe();b.uris=Ye(b.uris);e=jf(this,a,b);var f=e.qa(function(){return kf(c,a,b,new Oe(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return lf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
170
170
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Fg||!c.l||t.fromCache||a!=mf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new hf(m.promise,function(){return m.abort()},d);af(this.m,e);return e};
171
171
  function jf(a,b,c){var d=Ue(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Md:e.Md},f=a.next())e.Md=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Md(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
172
- function kf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ef[k])?k.Sg:null;if(!m)return Se(new P(2,1,1E3,h));var n=k.Tg,p=null,t=null,v=!1,y=!1,x;return Ve(Qe(d)).qa(function(){if(a.i)return Te();x=Date.now();var w=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();t&&t.R(z/1E3);a.l&&b==mf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);y=!0});
172
+ function kf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ef[k])?k.Sg:null;if(!m)return Se(new P(2,1,1E3,h));var n=k.Tg,p=null,t=null,v=!1,y=!1,x;return Ve(Qe(d)).qa(function(){if(a.i)return Te();x=Date.now();var w=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();t&&t.R(z/1E3);a.l&&b==mf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);y=!0});
173
173
  if(!n)return w;var C=c.retryParameters.connectionTimeout;C&&(p=new Q(function(){v=!0;w.abort()}),p.R(C/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){v=!0;w.abort()}));return w}).qa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var C={response:w,Fg:l};!y&&a.j&&a.j(w.headers,c,b);return C},function(w){p&&p.stop();t&&t.stop();if(a.B){var C=null,z=0;w instanceof P&&(C=w,1001==w.code&&(z=w.data[1]));a.B(c,C,z,v)}if(a.i)return Te();v&&(w=new P(1,1,1003,
174
174
  c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new O("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,kf(a,b,c,d,e,w,g)}throw w;})}
175
175
  function lf(a,b,c){var d=Ue(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Nd:e.Nd},f=a.next())e.Nd=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Nd(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",bf);bf.prototype.request=bf.prototype.request;bf.prototype.destroy=bf.prototype.destroy;bf.makeRequest=ff;
176
176
  bf.defaultRetryParameters=function(){return Pe()};bf.prototype.clearAllResponseFilters=bf.prototype.Tf;bf.prototype.unregisterResponseFilter=bf.prototype.kh;bf.prototype.registerResponseFilter=bf.prototype.Vg;bf.prototype.clearAllRequestFilters=bf.prototype.Sf;bf.prototype.unregisterRequestFilter=bf.prototype.jh;bf.prototype.registerRequestFilter=bf.prototype.Ug;bf.unregisterScheme=function(a){delete ef[a]};bf.registerScheme=cf;bf.prototype.setForceHTTPS=bf.prototype.xe;function gf(){this.g=0}
177
- bf.NumBytesRemainingClass=gf;function hf(a,b,c){Re.call(this,a,b);this.h=c}u(hf,Re);bf.PendingRequest=hf;var mf=1;bf.RequestType={MANIFEST:0,SEGMENT:mf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var df=3;bf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:df};var ef={};function nf(a){this.g=!1;this.h=new Pc;this.i=a}nf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function of(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function pf(){this.g=new ab}q=pf.prototype;q.release=function(){this.qb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new qf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.pc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.pc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.pc(),this.g.remove(b,e))}};
178
- q.qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.pc();this.g.g={}}};N("shaka.util.EventManager",pf);pf.prototype.removeAll=pf.prototype.qb;pf.prototype.unlisten=pf.prototype.pc;pf.prototype.listenOnce=pf.prototype.Ga;pf.prototype.listen=pf.prototype.o;pf.prototype.release=pf.prototype.release;function qf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=rf(a,d);this.target.addEventListener(b,c,this.g)}
177
+ bf.NumBytesRemainingClass=gf;function hf(a,b,c){Re.call(this,a,b);this.h=c}u(hf,Re);bf.PendingRequest=hf;var mf=1;bf.RequestType={MANIFEST:0,SEGMENT:mf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var df=3;bf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:df};var ef={};function nf(a){this.g=!1;this.h=new Pc;this.i=a}nf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function of(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function pf(){this.g=new ab}q=pf.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new qf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.pc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.pc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.pc(),this.g.remove(b,e))}};
178
+ q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.pc();this.g.g={}}};N("shaka.util.EventManager",pf);pf.prototype.removeAll=pf.prototype.rb;pf.prototype.unlisten=pf.prototype.pc;pf.prototype.listenOnce=pf.prototype.Ga;pf.prototype.listen=pf.prototype.o;pf.prototype.release=pf.prototype.release;function qf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=rf(a,d);this.target.addEventListener(b,c,this.g)}
179
179
  qf.prototype.pc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function rf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return sf(a)?b:b.capture||!1}
180
- function sf(a){var b=tf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}tf=b}return b||!1}var tf=void 0;function uf(){}function vf(a){a=jd(a);return(new jb(a)).Ya}function wf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",uf);uf.initDataTransform=wf;uf.defaultGetContentId=vf;function xf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function yf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function zf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Af(a,b){var c=Bf(a,b);return 1!=c.length?null:c[0]}function Cf(a,b,c){a=Df(a,b,c);return 1!=a.length?null:a[0]}function Bf(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Ef(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
180
+ function sf(a){var b=tf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}tf=b}return b||!1}var tf=void 0;function uf(){}function vf(a){a=jd(a);return(new jb(a)).Za}function wf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",uf);uf.initDataTransform=wf;uf.defaultGetContentId=vf;function xf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function yf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function zf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Af(a,b){var c=Bf(a,b);return 1!=c.length?null:c[0]}function Cf(a,b,c){a=Df(a,b,c);return 1!=a.length?null:a[0]}function Bf(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Ef(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
181
181
  function Df(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Ff(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Gf(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Hf(a){return Array.from(a.childNodes).every(If)?a.textContent.trim():null}
182
182
  function If(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Jf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Kf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
183
183
  function Lf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
@@ -217,15 +217,15 @@ function Cg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.
217
217
  c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),D(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k["return"](yf(f))})}
218
218
  function Dg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).R(Eg)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);D(c)})}
219
219
  function Zf(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,Dg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);D(g)})})),0)})}
220
- function Fg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
220
+ function Fg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
221
221
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
222
- initData:f.Ta,keyIds:g});break}}return c}function gg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Xf(a){a.i.forEach(function(b,c){var d=b.ie,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ie=e)})}function xg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
222
+ initData:f.Ua,keyIds:g});break}}return c}function gg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Xf(a){a.i.forEach(function(b,c){var d=b.ie,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ie=e)})}function xg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
223
223
  function fg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
224
224
  function vg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,e.some(function(m){return function(n){var p=
225
225
  m.Sc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gc(n.initData,p.initData)}}(h))||e.push(h.Sc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
226
226
  function hg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
227
227
  (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Eg=1,Ag=5,Bg=.5,Gg=new Qc(function(){return Jc(new Uint8Array([0]))});function Hg(){}function Ig(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=Jg[d.toLowerCase()]))return k["return"](e);if(f=Kg(a))if(g=Lg[f])return k["return"](g);return d?k.D(2):A(k,Mg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Jg[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
228
- function Mg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=ff([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Kg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",Hg);Hg.unregisterParserByMime=function(a){delete Jg[a]};Hg.registerParserByMime=function(a,b){Jg[a]=b};
228
+ function Mg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=ff([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Kg(a){a=(new jb(a)).Oa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",Hg);Hg.unregisterParserByMime=function(a){delete Jg[a]};Hg.registerParserByMime=function(a,b){Jg[a]=b};
229
229
  Hg.registerParserByExtension=function(a,b){Lg[a]=b};var Jg={},Lg={};function Ng(a,b){this.U=Lc(a);this.h=b==Og;this.g=0}q=Ng.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.kg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw Pg();}};q.lc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Pg();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};
230
230
  q.vf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};q.mc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw Pg();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw Pg();var b=Ic(this.U,this.g,a);this.g+=a;return b};
231
231
  q.skip=function(a){if(this.g+a>this.U.byteLength)throw Pg();this.g+=a};q.xf=function(a){if(this.g<a)throw Pg();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw Pg();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return gd(a)};function Pg(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",Ng);Ng.prototype.readTerminatedString=Ng.prototype.Lc;Ng.prototype.seek=Ng.prototype.seek;Ng.prototype.rewind=Ng.prototype.xf;
@@ -251,10 +251,10 @@ b.skip(1),d=Qh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&
251
251
  function Uh(a,b,c){var d=null;b=r(Th(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Kh(f,c,a.i));a.h[e]=null}return d}function Vh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Wh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Xh[a<<2|b<<1|c]}
252
252
  var Yh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Xh="black blue green cyan red magenta yellow white".split(" ");function Zh(){this.h=[];this.g=[];this.i=new Nh;this.l=0;this.B=new Map([["CC1",new uh(0,0)],["CC2",new uh(0,1)],["CC3",new uh(1,0)],["CC4",new uh(1,1)]]);this.A=this.m=0;this.j=new Map;$h(this)}function $h(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,hh(b.i),hh(b.l),hh(b.A)}
253
253
  function ai(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=bi(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Oh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=ci(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
254
- function bi(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.jb||!b.Qa&&!b.jb||!di(b.Qa)||!di(b.jb))return 45<=++a.l&&$h(a),null;a.l=0;b.Qa&=127;b.jb&=127;if(!b.Qa&&!b.jb)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.jb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Dh[f]:7===f&&(h=!0);
254
+ function bi(a,b){var c=b.type;if(16===(b.Ra&112)){var d=b.Ra>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Ra&&255===b.kb||!b.Ra&&!b.kb||!di(b.Ra)||!di(b.kb))return 45<=++a.l&&$h(a),null;a.l=0;b.Ra&=127;b.kb&=127;if(!b.Ra&&!b.kb)return null;d=null;if(16===(b.Ra&112))a:{var e=b.Ra;d=b.kb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Dh[f]:7===f&&(h=!0);
255
255
  d=1===(d&1);if(c.h!==yh){f=c.g;if(c.h===xh&&e!==f.g){var k=1+e-f.h;th(f,k,1+f.g-f.h,f.h);jh(f,0,k-1);jh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",kh(c.g,lh,32),g=!1,e=Dh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Ch[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))kh(c.g,nh,d);else if(18===
256
- (e&246)&&32===(d&224))kh(c.g,e&1?rh:ph,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:zh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=wh(c,2,d);break;case 38:e=wh(c,3,d);break;case 39:e=wh(c,4,d);break;case 40:kh(c.g,lh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:hh(c.A);Bh(c);break;case 43:Bh(c);break;case 44:e=c.i;g=null;c.h!==yh&&(g=ih(e,c.j,d));jh(e,0,15);e=g;break;case 45:e=c.g;c.h!==xh?e=null:(g=ih(e,c.j,d),h=e.g-e.h+1,th(e,h-1,h,e.h),jh(e,
257
- 0,h-1),jh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:jh(c.l,0,15);break;case 47:e=null,c.h!==yh&&(e=ih(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,zh(c),c.j=d}d=e;break a}d=null}else e=b.jb,kh(c.g,lh,b.Qa),kh(c.g,lh,e);return d}
256
+ (e&246)&&32===(d&224))kh(c.g,e&1?rh:ph,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:zh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=wh(c,2,d);break;case 38:e=wh(c,3,d);break;case 39:e=wh(c,4,d);break;case 40:kh(c.g,lh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:hh(c.A);Bh(c);break;case 43:Bh(c);break;case 44:e=c.i;g=null;c.h!==yh&&(g=ih(e,c.j,d));jh(e,0,15);e=g;break;case 45:e=c.g;c.h!==xh?e=null:(g=ih(e,c.j,d),h=e.g-e.h+1,th(e,h-1,h,e.h),jh(e,
257
+ 0,h-1),jh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:jh(c.l,0,15);break;case 47:e=null,c.h!==yh&&(e=ih(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,zh(c),c.j=d}d=e;break a}d=null}else e=b.kb,kh(c.g,lh,b.Ra),kh(c.g,lh,e);return d}
258
258
  function ci(a,b){var c=[];try{for(;b.Ea();){var d=Qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Rh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=Qh(e),l=k.value,m=k.pts;if(16===l){var n=Qh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Jh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Kh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;16>y;y++,
259
259
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Hh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Kh(t,p,g.i));t.i[t.h]=Hh();t.g=0;break;case 12:t.isVisible()&&(e=Kh(t,p,g.i)),Gh(t),p=t,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Sh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ih(g.g,"\u266a"):Ih(g.g,
260
260
  String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yh.has(e)){var w=Yh.get(e);Ih(g.g,w)}else Ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ih(g.g,"_"):Ih(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function di(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ei(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,Ze:c,Vf:d}}function fi(a,b){return{Ud:1==b?a.mc():a.P()}}function gi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
@@ -263,7 +263,7 @@ ii.prototype.init=function(a){var b=this,c=[],d=[];(new Qg).box("moov",Ug).box("
263
263
  ii.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Qg).box("moof",Ug).box("traf",Ug).V("trun",function(k){f=hi(k.reader,k.version,k.flags).yf}).V("tfhd",function(k){k=ei(k.reader,k.flags);d=k.Ze||b.g;e=k.Vf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).V("tfdt",function(k){g=fi(k.reader,k.version).Ud}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ea();){var x=k.P();if(6==
264
264
  (k.ka()&31)){var w=0;t.length>v&&(w=t[v].wd||0);w=(l+w)/m;for(var C=[],z,B=k.Cb(x-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ia(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&C.push(z.subarray(F,F+G));F+=G}C=r(C);for(z=C.next();!z.done;z=C.next())c.push({Rg:z.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=t.length>v?l+(t[v].qe||n):l+n,v++,y=t.length>
265
265
  v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function ji(){this.h=new ii;this.g=new Zh}ji.prototype.init=function(a){this.h.init(a)};
266
- function ki(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Rg);if(0<f.length&&(d=a.g,e=e.pts,f=new Ng(f,0),181===f.ka()&&49===f.lc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,jb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return ai(a.g)}
266
+ function ki(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Rg);if(0<f.length&&(d=a.g,e=e.pts,f=new Ng(f,0),181===f.ka()&&49===f.lc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ra:m,kb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return ai(a.g)}
267
267
  ;function li(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function mi(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function ni(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(oi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
268
268
  function pi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function oi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function qi(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new pf;this.B={};this.C=b;this.G=new Pc;this.m=ri(this,this.G);this.F=new nf(function(){return si(e)});this.H=""}function ri(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=ti(c);a.j.src=a.H;return c}q=qi.prototype;q.destroy=function(){return this.F.destroy()};
269
269
  function si(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return A(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
@@ -271,8 +271,8 @@ function si(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in
271
271
  q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,A(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?ui(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return vi(c,n.Ia)}}(e)),
272
272
  c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);D(m)})};function ui(a,b){a.g||(a.g=new Dd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Fd[b]))}function wi(a){return a.m?"ended"==a.m.readyState:!0}function xi(a,b){if(b==Mb)var c=a.g.g;else c=yi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function zi(a,b){return b==Mb?a.g.h:li(yi(a,b))}
273
273
  function Ai(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=yi(a,b);return ni(a,c)}q.zb=function(){var a={total:oi(this.j.buffered),audio:oi(yi(this,"audio")),video:oi(yi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function yi(a,b){try{return a.h[b].buffered}catch(c){return null}}
274
- function Bi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||ui(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ki(a.C,c),h.length&&(k=a.h[g.fb].timestampOffset,Md(a.g,h,d,e,k))),c=Ci(a,c,d,b),A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Ci(a,c,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ui(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
275
- m,e));l.captions&&l.captions.length&&(n=a.h[g.fb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=Ci(a,t,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function Ei(a,b){var c=zi(a,"video")||0;Jd(a.g,b,c)}function Fi(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,Di(d,a,function(){c<=b?vi(d,a):d.h[a].remove(b,c)}),0)})};
274
+ function Bi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||ui(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ki(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,Md(a.g,h,d,e,k))),c=Ci(a,c,d,b),A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Ci(a,c,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ui(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
275
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=Ci(a,t,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function Ei(a,b){var c=zi(a,"video")||0;Jd(a.g,b,c)}function Fi(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,Di(d,a,function(){c<=b?vi(d,a):d.h[a].remove(b,c)}),0)})};
276
276
  function Gi(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?A(d,a.g.remove(0,Infinity),0):d["return"]():A(d,Di(a,b,function(){var e=a.m.duration;0>=e?vi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():A(d,Di(b,a,function(){b.j.currentTime-=.001;vi(b,a)}),0)})};
277
277
  function Hi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):A(g,Promise.all([Di(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;vi(a,b)}),Di(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;vi(a,b)}),Di(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;vi(a,b)})]),0)})}
278
278
  q.endOfStream=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){wi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function vi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ji(a,b))}function Di(a,b,c){of(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&Ki(a,b);return c.p}
@@ -281,18 +281,18 @@ function Ki(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError
281
281
  function Ni(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.xa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=Ni.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.ig=function(){return this.endTime};q.Gc=function(){return this.Ha};q.Cc=function(){return this.xa};q.Cg=function(){return this.tilesLayout};
282
282
  q.Bg=function(){return this.i};N("shaka.media.SegmentReference",Ni);Ni.prototype.getTileDuration=Ni.prototype.Bg;Ni.prototype.getTilesLayout=Ni.prototype.Cg;Ni.prototype.getEndByte=Ni.prototype.Cc;Ni.prototype.getStartByte=Ni.prototype.Gc;Ni.prototype.getEndTime=Ni.prototype.ig;Ni.prototype.getStartTime=Ni.prototype.getStartTime;Ni.prototype.getUris=Ni.prototype.Ka;function R(a,b,c){this.l=a;this.ud=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.qg=function(){return this.g};q.bb=function(a){this.i=a};q.vg=function(){return this.l};q.Bf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.Be=function(a){this.m=a};q.hh=function(a){this.ud=a};q.hg=function(){return this.ud};
283
283
  q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ge(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ae=function(){this.H=!0};q.ge=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.fe=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
284
- q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Kb()-this.m)};q.Ef=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.kb()))};q.cc=function(){return this.Fc(0)};
285
- q.kb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.ud:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Af;R.prototype.usingPresentationStartTime=R.prototype.If;R.prototype.getSeekRangeEnd=R.prototype.kb;R.prototype.getSeekRangeStart=R.prototype.cc;R.prototype.getSafeSeekRangeStart=R.prototype.Fc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
286
- R.prototype.setUserSeekStart=R.prototype.Ef;R.prototype.getSegmentAvailabilityStart=R.prototype.mb;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.fe;R.prototype.notifyMinSegmentStartTime=R.prototype.ge;R.prototype.lockStartTime=R.prototype.ae;R.prototype.notifySegments=R.prototype.ic;R.prototype.getDelay=R.prototype.hg;R.prototype.setDelay=R.prototype.hh;
284
+ q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Kb()-this.m)};q.Ef=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.mb()))};q.cc=function(){return this.Fc(0)};
285
+ q.mb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.ud:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Af;R.prototype.usingPresentationStartTime=R.prototype.If;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.cc;R.prototype.getSafeSeekRangeStart=R.prototype.Fc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
286
+ R.prototype.setUserSeekStart=R.prototype.Ef;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.fe;R.prototype.notifyMinSegmentStartTime=R.prototype.ge;R.prototype.lockStartTime=R.prototype.ae;R.prototype.notifySegments=R.prototype.ic;R.prototype.getDelay=R.prototype.hg;R.prototype.setDelay=R.prototype.hh;
287
287
  R.prototype.setSegmentAvailabilityDuration=R.prototype.Be;R.prototype.setStatic=R.prototype.Pc;R.prototype.setClockOffset=R.prototype.Bf;R.prototype.getPresentationStartTime=R.prototype.vg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.qg;R.prototype.getDuration=R.prototype.getDuration;function Oi(a,b){this.j=a;this.m=Pi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Oi.prototype.release=function(){this.j=null;this.i=function(){}};function Qi(a,b){a.i=b}function Ri(a){this.g=a}function Pi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(oi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Si(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new pf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return Ti(f)});this.m=(new Q(function(){Ti(f)})).ha(.25)}Si.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};Si.prototype.je=function(){this.A=!0;Ti(this)};
288
288
  function Ti(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Pi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=pi(b,g,a.l.gapDetectionThreshold);if(!(null==
289
- c||0==c&&!a.A||(d=b.start(c),d>=a.F.kb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ui(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vi.value().get(b),c.Ga(a,b,d))}var Vi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new pf;this.i=new Xi(a);Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Yi(d,d.j)})}Wi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Zi(a){return a.m?a.g.currentTime:a.j}function $i(a,b){0<a.g.readyState?dj(a.i,b):Ui(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Yi(a,a.j)})}
289
+ c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ui(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vi.value().get(b),c.Ga(a,b,d))}var Vi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new pf;this.i=new Xi(a);Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Yi(d,d.j)})}Wi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Zi(a){return a.m?a.g.currentTime:a.j}function $i(a,b){0<a.g.readyState?dj(a.i,b):Ui(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Yi(a,a.j)})}
290
290
  function Yi(a,b){.001>Math.abs(a.g.currentTime-b)?ej(a):(a.h.Ga(a.g,"seeking",function(){ej(a)}),dj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function ej(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Xi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Xi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
291
291
  function dj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function fj(a){this.g=a;this.j=!1;this.h=null;this.i=new pf}q=fj.prototype;q.Sd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ui(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Td=function(a){this.h=this.j?this.h:a};q.Wc=function(){return(this.j?this.g.currentTime:this.h)||0};q.tf=function(){};
292
- function gj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.j=new Si(a,b.presentationTimeline,c,hj(a,c),f);this.h=new Wi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Zi(g.h);h=ij(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;$i(g.h,h);h=void 0;break a}g.B();h=void 0}return h},jj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Zi(g.h),k=g.g.cc(),l=g.g.kb();3>l-k&&(k=l-
292
+ function gj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.j=new Si(a,b.presentationTimeline,c,hj(a,c),f);this.h=new Wi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Zi(g.h);h=ij(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;$i(g.h,h);h=void 0;break a}g.B();h=void 0}return h},jj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Zi(g.h),k=g.g.cc(),l=g.g.mb();3>l-k&&(k=l-
293
293
  3);h<k&&(h=ij(g,h),g.i.currentTime=h)}})}q=gj.prototype;q.Sd=function(){this.m.ha(.25)};q.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.B=function(){}};q.Td=function(a){$i(this.h,a)};q.Wc=function(){var a=Zi(this.h);return 0<this.i.readyState&&!this.i.paused?kj(this,a):a};
294
- function jj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.kb():0>b&&(b=a.g.kb()+b);return lj(a,kj(a,b))}q.tf=function(){this.j.je()};function lj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function ij(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?lj(a,b):b>f?f:b<e?mi(a.i.buffered,k)?k:c:b>=h||mi(a.i.buffered,b)?b:c}
295
- function kj(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}function hj(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Oi(new Ri(a),b.stallThreshold);Qi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function mj(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=mj.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};
294
+ function jj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.mb():0>b&&(b=a.g.mb()+b);return lj(a,kj(a,b))}q.tf=function(){this.j.je()};function lj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function ij(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?lj(a,b):b>f?f:b<e?mi(a.i.buffered,k)?k:c:b>=h||mi(a.i.buffered,b)?b:c}
295
+ function kj(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function hj(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Oi(new Ri(a),b.stallThreshold);Qi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function mj(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=mj.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};
296
296
  q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.O.length&&a<this.O[0].startTime?this.h:null};q.get=function(a){if(0==this.O.length)return null;a-=this.h;return 0>a||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
297
297
  q.fc=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.fc(a);this.Hb(b)};q.Hb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
298
298
  q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new Ni(a.startTime,b,a.j,a.Ha,a.xa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
@@ -310,31 +310,31 @@ function Bj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatch
310
310
  Fj.prototype.configure=function(a){this.h=a;this.G=new Oe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};Fj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return A(b,Jj(a),2);of(a.i);a.F=!0;D(b)})};
311
311
  function Kj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),A(k,Gi(a.g.W,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);ui(a.g.W,e);f=a.g.W.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=Lj(b),a.j.set(c.oa,h),Mj(a,h,0);D(k)}})}function Nj(a){var b=a.j.get(Mb);b&&(Hj(b),Ij(b)["catch"](function(){}),a.j["delete"](Mb));a.A=null}
312
312
  function Oj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Tb&&(Pj(a,e,!1,0,!1),c.Tb=d)}else if(d=c.Tb)c.Tb=null,Pj(a,d,!0,0,!1)}}function Qj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Pj(a,b.video,c,d,e),b.audio&&Pj(a,b.audio,c,d,e))}function Rj(a,b){a.A=b;a.F&&Pj(a,b,!0,0,!1)}
313
- function Pj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Tb&&(b.trickModeVideo?(f.Tb=b,b=b.trickModeVideo):f.Tb=null),f.stream!=b||e)&&(b.type==Mb&&ui(a.g.W,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.zc?f.Cd=!0:f.ab?(f.Eb=!0,f.$c=d,f.Cd=!0):(Hj(f),Sj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Tj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Kj(a,b)}
314
- function Tj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.fd();var g=zi(a.g.W,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.xa?k.xa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.xa?k.xa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
315
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();D(e)})}function Uj(a,b){b.zc||b.Eb||(b.ab?(b.Eb=!0,b.$c=0):null==xi(a.g.W,b.type)?null==b.sb&&Mj(a,b,0):(Hj(b),Sj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
316
- function Jj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.fb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.W;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}of(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.W.bb(p):a.g.W.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
317
- (m=Lj(l),a.j.set(k,m),Mj(a,m,0));D(n)})}function Lj(a){return{stream:a,type:a.type,ua:null,Ra:null,ld:null,$d:null,Zd:null,Yd:null,Tb:null,endOfStream:!1,ab:!1,sb:null,Eb:!1,$c:0,Cd:!1,zc:!1,me:!1,Hc:!1,Ma:null}}
318
- function Vj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:of(a.i);if(b.ab||null==b.sb||b.zc)return h["return"]();b.sb=null;if(!b.Eb){h.D(2);break}return A(h,Sj(a,b,b.Cd,b.$c),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.sb&&Mj(a,b,0),h["return"]();case 4:E(h,6);d=Wj(a,b);null!=d&&(Mj(a,b,d),b.Hc=!1);va(h,7);break;case 6:return e=
313
+ function Pj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Tb&&(b.trickModeVideo?(f.Tb=b,b=b.trickModeVideo):f.Tb=null),f.stream!=b||e)&&(b.type==Mb&&ui(a.g.W,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.zc?f.Cd=!0:f.La?(f.Eb=!0,f.$c=d,f.Cd=!0):(Hj(f),Sj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Tj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Kj(a,b)}
314
+ function Tj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Na)return e["return"]();c=b.stream;d=b.Na;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Na!=d||b.stream!=c)return e["return"]();var f=a.g.fd();var g=zi(a.g.W,b.type),h=b.stream.segmentIndex.find(b.Sa?b.Sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.xa?k.xa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.xa?k.xa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
315
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Na.h.g>h?!0:!1):f=!1;f&&b.Na.abort();D(e)})}function Uj(a,b){b.zc||b.Eb||(b.La?(b.Eb=!0,b.$c=0):null==xi(a.g.W,b.type)?null==b.eb&&Mj(a,b,0):(Hj(b),Sj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
316
+ function Jj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.W;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}of(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.W.bb(p):a.g.W.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
317
+ (m=Lj(l),a.j.set(k,m),Mj(a,m,0));D(n)})}function Lj(a){return{stream:a,type:a.type,ua:null,Sa:null,ld:null,$d:null,Zd:null,Yd:null,Tb:null,endOfStream:!1,La:!1,eb:null,Eb:!1,$c:0,Cd:!1,zc:!1,me:!1,Hc:!1,Na:null}}
318
+ function Vj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:of(a.i);if(b.La||null==b.eb||b.zc)return h["return"]();b.eb=null;if(!b.Eb){h.D(2);break}return A(h,Sj(a,b,b.Cd,b.$c),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.La||b.eb||Mj(a,b,0),h["return"]();case 4:E(h,6);d=Wj(a,b);null!=d&&(Mj(a,b,d),b.Hc=!1);va(h,7);break;case 6:return e=
319
319
  I(h),A(h,Xj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.W.endOfStream(),10);case 10:of(a.i),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),D(h)}})}
320
- function Wj(a,b){if(Yj(b))return Ei(a.g.W,b.stream.originalId||""),null;b.type==Mb&&Fi(a.g.W);var c=a.g.fd(),d=b.Ra?b.Ra.endTime:c,e=Ai(a.g.W,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=zi(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Yj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Zj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
321
- f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Yj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;ak(a,b,c,e)["catch"](function(){});return null}
322
- function Zj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Jb(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
323
- function ak(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(z,2),A(z,bk(a,b,d),4);case 4:of(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;of(a.i);if(a.B)return J["return"]();n=ck(n,B);F=!1;G=0;(new Qg).box("mdat",function(K){G=
324
- K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,dk(a,b,c,f,d,H),0)})},A(z,ek(a,b,d,v),9);l=ek(a,b,d);return A(z,l,7);case 7:return m=z.h,of(a.i),a.B?z["return"]():b.Eb?(b.ab=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,m),6);case 9:y=z.h;if(t){z.D(6);break}p=!0;of(a.i);return a.B?z["return"]():b.Eb?(b.ab=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,y),6);case 6:of(a.i);if(a.B)return z["return"]();b.Ra=d;g.next();b.ab=!1;b.me=!1;x=a.g.W.zb();w=
325
- x[b.type];Xa(JSON.stringify(w));b.Eb||a.g.je();Mj(a,b,0);va(z,0);break;case 2:C=I(z);of(a.i,C);if(a.B)return z["return"]();b.ab=!1;if(7001==C.code)b.ab=!1,b.sb=null,Mj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==C.code)fk(a,b,C),z.D(0);else return b.Hc=!0,C.severity=2,A(z,Xj(a,C),0)}})}function ck(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
320
+ function Wj(a,b){if(Yj(b))return Ei(a.g.W,b.stream.originalId||""),null;b.type==Mb&&Fi(a.g.W);var c=a.g.fd(),d=b.Sa?b.Sa.endTime:c,e=Ai(a.g.W,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=zi(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Yj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Zj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
321
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Yj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;ak(a,b,c,e)["catch"](function(){});return null}
322
+ function Zj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Sa||d)return b.ua=b.stream.segmentIndex.Jb(b.Sa?b.Sa.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
323
+ function ak(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.La=!0,E(z,2),A(z,bk(a,b,d),4);case 4:of(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;of(a.i);if(a.B)return J["return"]();n=ck(n,B);F=!1;G=0;(new Qg).box("mdat",function(K){G=
324
+ K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,dk(a,b,c,f,d,H),0)})},A(z,ek(a,b,d,v),9);l=ek(a,b,d);return A(z,l,7);case 7:return m=z.h,of(a.i),a.B?z["return"]():b.Eb?(b.La=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,m),6);case 9:y=z.h;if(t){z.D(6);break}p=!0;of(a.i);return a.B?z["return"]():b.Eb?(b.La=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,y),6);case 6:of(a.i);if(a.B)return z["return"]();b.Sa=d;g.next();b.La=!1;b.me=!1;x=a.g.W.zb();w=
325
+ x[b.type];Xa(JSON.stringify(w));b.Eb||a.g.je();Mj(a,b,0);va(z,0);break;case 2:C=I(z);of(a.i,C);if(a.B)return z["return"]();b.La=!1;if(7001==C.code)b.La=!1,Hj(b),Mj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==C.code)fk(a,b,C),z.D(0);else return b.Hc=!0,C.severity=2,A(z,Xj(a,C),0)}})}function ck(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
326
326
  function fk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.me})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Hc=!0;a.B=!0;a.g.onError(c);return}b.me=!0}Mj(a,b,4)}
327
327
  function bk(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.$d||e!=b.Zd||f!=b.Yd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Zd=e,b.Yd=f,b.$d=g,A(p,Hi(a.g.W,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Zd=null;b.Yd=null;b.$d=null;throw n;})},d.push(h());!Mi(c.g,b.ld)&&(b.ld=c.g)&&(k=ek(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),A(v,k,4);
328
328
  case 4:return n=v.h,of(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(v,Bi(a.g.W,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.ld=null,t;}})},a.g.Pg(c.startTime,c.g),d.push(l()));return A(m,Promise.all(d),0)})}
329
329
  function dk(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Qg).V("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var y=k.reader.P();var x=e.startTime+t/p}else p=k.reader.P(),x=k.reader.mc()/p+e.timestampOffset,t=x-e.startTime,v=k.reader.P(),y=k.reader.P(),
330
330
  m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Qg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(gk,l),a.g.onEvent(l))}).parse(f),A(h,hk(a,b,c),2);if(3!=h.g)return of(a.i),A(h,Bi(a.g.W,b.type,f,e.startTime,e.endTime,g),3);of(a.i);D(h)})}
331
331
  function hk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=xi(a.g.W,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():A(h,a.g.W.remove(b.type,e,e+g),2)}of(a.i);D(h)})}function Yj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
332
- function ek(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=mf,f=Ej(c.Ka(),c.Ha,c.xa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Li,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
333
- function Sj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b.$c=0,b.zc=!0,b.Ra=null,b.ld=null,b.ua=null,d?(e=a.g.fd(),f=a.g.W.getDuration(),A(g,a.g.W.remove(b.type,e+d,f),3)):A(g,Gi(a.g.W,b.type),4);if(3!=g.g)return of(a.i),c?A(g,a.g.W.flush(b.type),3):g.D(3);of(a.i);b.zc=!1;b.endOfStream=!1;Mj(a,b,0);D(g)})}
334
- function Mj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.sb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,Vj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);D(f)})})).R(c)}function Hj(a){null!=a.sb&&(a.sb.stop(),a.sb=null)}function Ij(a){return M(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function Xj(a,b){return M(function(c){if(1==c.g)return A(c,Qe(a.G),2);of(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);D(c)})};function ik(a,b){var c=jk(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return kk(d)});this.B=new nf(function(){return lk(d)})}ik.prototype.destroy=function(){return this.B.destroy()};function lk(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),mk(a),A(e,a.C,2);a.g&&a.g.$a.Sb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Sb();a.g=null;a.m=[];a.j=null;D(e)})}
335
- function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},Ni:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();mk(a);return c}
336
- function kk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.$a.Sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.jc(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,$a:c.$a}):c.$a.sd();c=!0}c?c=Promise.resolve():a.g?c=ok(a):(a.j.Og(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
337
- function ok(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.qd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Sb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function mk(a){a.A&&(a.A.resolve(),a.A=null)};function pk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=pk.prototype;q.remove=function(a,b){if(!this.g)return!1;qk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
332
+ function ek(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=mf,f=Ej(c.Ka(),c.Ha,c.xa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Li,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Na=h,A(l,h.promise,2);k=l.h;b.Na=null;return l["return"](k.data)})}
333
+ function Sj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b.$c=0,b.zc=!0,b.Sa=null,b.ld=null,b.ua=null,d?(e=a.g.fd(),f=a.g.W.getDuration(),A(g,a.g.W.remove(b.type,e+d,f),3)):A(g,Gi(a.g.W,b.type),4);if(3!=g.g)return of(a.i),c?A(g,a.g.W.flush(b.type),3):g.D(3);of(a.i);b.zc=!1;b.endOfStream=!1;b.La||b.eb||Mj(a,b,0);D(g)})}
334
+ function Mj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.eb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,Vj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);D(f)})})).R(c)}function Hj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function Ij(a){return M(function(b){return a.Na?A(b,a.Na.abort(),0):b.D(0)})}function Xj(a,b){return M(function(c){if(1==c.g)return A(c,Qe(a.G),2);of(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);D(c)})};function ik(a,b){var c=jk(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return kk(d)});this.B=new nf(function(){return lk(d)})}ik.prototype.destroy=function(){return this.B.destroy()};function lk(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),mk(a),A(e,a.C,2);a.g&&a.g.ab.Sb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Sb();a.g=null;a.m=[];a.j=null;D(e)})}
335
+ function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},Ni:function(){}};a.m.push({create:b,ab:c});a.h&&a.h.abort();mk(a);return c}
336
+ function kk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.ab.Sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.ab.jc(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,ab:c.ab}):c.ab.sd();c=!0}c?c=Promise.resolve():a.g?c=ok(a):(a.j.Og(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
337
+ function ok(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.ab.qd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.ab.Sb();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function mk(a){a.A&&(a.A.resolve(),a.A=null)};function pk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=pk.prototype;q.remove=function(a,b){if(!this.g)return!1;qk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
338
338
  q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.extern.Cue",
339
339
  "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Xb:f.Xb},g=d.next())f.Xb=g.value,a.some(function(h){return function(k){return k.startTime==h.Xb.startTime&&k.endTime==h.Xb.endTime&&k.text==h.Xb.payload?!0:!1}}(f))||(g=rk(f.Xb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
340
340
  k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(qk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
@@ -357,7 +357,7 @@ break;case "right":k.push("align:right");break;case pc:k.push("align:middle");br
357
357
  function Qk(a,b,c){try{if(!a.g.enabled)return b;var d=Rk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Lk;break a;case "application/x-mpegurl":e=Sk;break a}e=void 0}d.ot=e;d.su=!0;var f=Tk(d);return Uk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Vk(a,b){try{if(!a.g.enabled)return b;var c=Rk(a);c.ot=Wk;c.su=!0;var d=Tk(c);return Uk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
358
358
  function Rk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function Pk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Rk(a));c.pr=a.h.Ab();var e=c.ot===Jk||c.ot===Lk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Xk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Tk(c);f&&(b.uris=b.uris.map(function(g){return Uk(g,f)}))}}}
359
359
  function Ik(a){var b=a.type;if(a.init)return Yk;if("video"==b)return a.codecs.includes(",")?Lk:Jk;if("audio"==b)return Kk;if("text"==b)return"application/mp4"===a.mimeType?Mk:Wk}function Nk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
360
- function Ok(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Jk:return d.videoBandwidth||NaN;case Kk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
360
+ function Ok(a,b){var c=a.h.$a();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Jk:return d.videoBandwidth||NaN;case Kk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
361
361
  function Tk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
362
362
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Xk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={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};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Tk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
363
363
  function Uk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var Sk="m",Kk="a",Jk="v",Lk="av",Yk="i",Wk="c",Mk="tt",Hk="v",Gk="l";N("shaka.util.CmcdManager.StreamingFormat",{Ah:"d",Oh:"h",si:"s",bi:"o"});function Zk(){}
@@ -373,88 +373,88 @@ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:In
373
373
  function fl(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return $k(a,b,c||dl(),d,"")}
374
374
  function el(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
375
375
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",cl);cl.mergeConfigObjects=fl;function gl(){this.g=null;this.h=[]}function hl(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function il(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
376
- function jl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function kl(){this.i=this.h=null;this.g=[]}function ll(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.hd=this.g=null;this.ba=!1;this.md=new pf;this.hb=new pf;this.A=new pf;this.ke=this.C=this.gb=this.i=this.nd=this.J=this.j=this.ma=this.X=this.pd=this.K=this.jd=this.I=this.Wa=this.F=this.N=this.m=this.H=null;this.Ne=1E9;this.h=ol(this);this.Me={width:Infinity,height:Infinity};this.B=null;this.Ba=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ca=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
377
- this.ib=this.h.preferForcedSubs;this.eb=[];this.Bc=null;b&&b(this);this.H=pl(this);this.H.xe(this.h.streaming.forceHTTPS);this.G=null;ql&&(this.G=Gb(ql));this.md.o(window,"online",function(){c.oe()});this.S={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Oe={name:"manifest-parser"};this.Je={name:"manifest"};this.Oa={name:"media-source"};this.le={name:"drm-engine"};this.$={name:"load"};this.Pe={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
378
- function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.hb.qb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.aa,function(e){return Ve(sl(c,e))});d.set(this.Oa,function(e){e=tl(c,e);return Ve(e)});d.set(this.Oe,function(e,f){var g=ul(c,e,f);return Ve(g)});d.set(this.Je,function(e){return vl(c,e)});d.set(this.le,function(e){e=wl(c,e);return Ve(e)});d.set(this.$,function(e,f){return Ve(xl(c,e,f))});d.set(this.Pe,function(e,f){var g=yl(c,e,f);return Ve(g)});
379
- d.set(this.Xa,function(e,f){return zl(c,e,f)});this.na=new ik(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Pe:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Oe:c.aa);e==c.Oe&&(k=Al(c.$,c.Je,c.aa,g,f,h));e==c.Je&&(k=Al(c.$,c.le,c.aa,g,f,h));e==c.le&&(k=Al(c.$,c.$,c.aa,g,f,h));e==c.Pe&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.S);return k},Xf:function(e,f,g){c.dispatchEvent(Bl(Cl,
376
+ function jl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function kl(){this.i=this.h=null;this.g=[]}function ll(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.hd=this.g=null;this.ba=!1;this.md=new pf;this.ib=new pf;this.A=new pf;this.ke=this.C=this.hb=this.i=this.nd=this.J=this.j=this.ma=this.X=this.pd=this.K=this.jd=this.I=this.Xa=this.F=this.N=this.m=this.H=null;this.Ne=1E9;this.h=ol(this);this.Me={width:Infinity,height:Infinity};this.B=null;this.Ba=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ca=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
377
+ this.jb=this.h.preferForcedSubs;this.fb=[];this.Bc=null;b&&b(this);this.H=pl(this);this.H.xe(this.h.streaming.forceHTTPS);this.G=null;ql&&(this.G=Gb(ql));this.md.o(window,"online",function(){c.oe()});this.S={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Oe={name:"manifest-parser"};this.Je={name:"manifest"};this.Pa={name:"media-source"};this.le={name:"drm-engine"};this.$={name:"load"};this.Pe={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.Z,
378
+ function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.ib.rb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.aa,function(e){return Ve(sl(c,e))});d.set(this.Pa,function(e){e=tl(c,e);return Ve(e)});d.set(this.Oe,function(e,f){var g=ul(c,e,f);return Ve(g)});d.set(this.Je,function(e){return vl(c,e)});d.set(this.le,function(e){e=wl(c,e);return Ve(e)});d.set(this.$,function(e,f){return Ve(xl(c,e,f))});d.set(this.Pe,function(e,f){var g=yl(c,e,f);return Ve(g)});
379
+ d.set(this.Ya,function(e,f){return zl(c,e,f)});this.na=new ik(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Pa||g==c.$?c.Pa:g==c.Ya?c.Pe:null);e==c.Pa&&(k=g==c.$&&f.M==h.M?c.Oe:c.aa);e==c.Oe&&(k=Al(c.$,c.Je,c.aa,g,f,h));e==c.Je&&(k=Al(c.$,c.le,c.aa,g,f,h));e==c.le&&(k=Al(c.$,c.$,c.aa,g,f,h));e==c.Pe&&(k=g==c.Ya&&f.M==h.M?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.S);return k},Xf:function(e,f,g){c.dispatchEvent(Bl(Cl,
380
380
  (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,sl(c,e),2):f["return"](e.M?c.Z:c.S)})},Og:function(e){c.dispatchEvent(Bl(Dl,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}u(T,cb);function Bl(a,b){return new O(a,b)}q=T.prototype;
381
- q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==El)return c["return"]();a.l=El;b=nk(a.na,function(){return{node:a.S,payload:jk(),Lb:!1}});return A(c,new Promise(function(d){b.jc=function(){};b.qd=function(){d()};b.Sb=function(){d()};b.onError=function(){d()};b.sd=function(){d()}}),2);case 2:return A(c,a.na.destroy(),3);case 3:a.md&&(a.md.release(),a.md=null);a.hb&&(a.hb.release(),a.hb=null);a.A&&(a.A.release(),a.A=null);a.ke=null;a.C=null;a.h=null;a.B=null;a.hd=null;
381
+ q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==El)return c["return"]();a.l=El;b=nk(a.na,function(){return{node:a.S,payload:jk(),Lb:!1}});return A(c,new Promise(function(d){b.jc=function(){};b.qd=function(){d()};b.Sb=function(){d()};b.onError=function(){d()};b.sd=function(){d()}}),2);case 2:return A(c,a.na.destroy(),3);case 3:a.md&&(a.md.release(),a.md=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ke=null;a.C=null;a.h=null;a.B=null;a.hd=null;
382
382
  a.X=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),D(c)}})};
383
383
  function Fl(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Tc()?!0:Uc("application/x-mpegurl")}
384
- q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==El)return Promise.reject(Gl());var c=jk();c.M=a;Tc()||(b=!1);var d=b?this.Oa:this.Z,e=nk(this.na,function(){return{node:d,payload:c,Lb:!1}});e.jc=function(){};return Hl(e)};q.detach=function(){var a=this;if(this.l==El)return Promise.reject(Gl());var b=nk(this.na,function(){return{node:a.S,payload:jk(),Lb:!1}});b.jc=function(){};return Hl(b)};
385
- q.Ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==El)return Promise.reject(Gl());Tc()||(a=!1);var c=jk(),d=nk(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.S;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.jc=function(){};return Hl(d)};q.nh=function(a){this.Bc=a};
386
- q.load=function(a,b,c){var d=this;this.Bc=null;if(this.l==El)return Promise.reject(Gl());this.dispatchEvent(Bl(Il));var e=jk();e.uri=a;e.Ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Jl(this,e)?this.Xa:this.$,g=nk(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new ml;this.X=Kl(this);g.jc=function(){};return new Promise(function(h,k){g.sd=function(){return k(new P(2,7,7002))};g.qd=function(){h();d.dispatchEvent(Bl(Ll))};g.Sb=function(){return k(Gl())};
387
- g.onError=function(l){return k(l)}})};function Jl(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Kg(d),c=Ml[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in Jg||Kg(d)in Lg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function rl(a,b,c){null==b.M&&(b.M=c.M,a.hb.o(b.M,"error",function(){var d=Nl(a);d&&Ol(a,d)}));a.g=b.M;return Promise.resolve()}
388
- function sl(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=El&&(a.l=nl),c=a.eb.map(function(p){return p()}),a.eb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(Bl(Pl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.qb();a.Wa&&(a.Wa.release(),a.Wa=null);a.jd&&(a.jd.stop(),a.jd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.nd=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return A(n,a.j.destroy(),
389
- 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.gb=null;a.K=null;if(a.i){d=r(a.i.variants);
384
+ q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==El)return Promise.reject(Gl());var c=jk();c.M=a;Tc()||(b=!1);var d=b?this.Pa:this.Z,e=nk(this.na,function(){return{node:d,payload:c,Lb:!1}});e.jc=function(){};return Hl(e)};q.detach=function(){var a=this;if(this.l==El)return Promise.reject(Gl());var b=nk(this.na,function(){return{node:a.S,payload:jk(),Lb:!1}});b.jc=function(){};return Hl(b)};
385
+ q.Ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==El)return Promise.reject(Gl());Tc()||(a=!1);var c=jk(),d=nk(this.na,function(e){var f=e.M&&a?b.Pa:e.M?b.Z:b.S;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.jc=function(){};return Hl(d)};q.nh=function(a){this.Bc=a};
386
+ q.load=function(a,b,c){var d=this;this.Bc=null;if(this.l==El)return Promise.reject(Gl());this.dispatchEvent(Bl(Il));var e=jk();e.uri=a;e.Ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Jl(this,e)?this.Ya:this.$,g=nk(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new ml;this.X=Kl(this);g.jc=function(){};return new Promise(function(h,k){g.sd=function(){return k(new P(2,7,7002))};g.qd=function(){h();d.dispatchEvent(Bl(Ll))};g.Sb=function(){return k(Gl())};
387
+ g.onError=function(l){return k(l)}})};function Jl(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Kg(d),c=Ml[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in Jg||Kg(d)in Lg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function rl(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=Nl(a);d&&Ol(a,d)}));a.g=b.M;return Promise.resolve()}
388
+ function sl(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=El&&(a.l=nl),c=a.fb.map(function(p){return p()}),a.fb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(Bl(Pl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Xa&&(a.Xa.release(),a.Xa=null);a.jd&&(a.jd.stop(),a.jd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.nd=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return A(n,a.j.destroy(),
389
+ 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
390
390
  for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new ml;a.pe=null;Ql(a);D(n)}})}
391
391
  function tl(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new ji,d=a.h.textDisplayFactory,e=Gb(d),a.pe=d,f=Rl(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Sl(a,n,p,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(m,n)}}),A(g,f.G,2);a.N=f;D(g)})}
392
- function ul(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.gb=d,f=a,A(h,Ig(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.nd=h.h;a.J=Gb(a.nd);g=Ye(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);D(h)})}
393
- function vl(a,b){var c=b.uri,d=a.H;a.pd=new yj(function(){return a.La()});a.pd.addEventListener("regionadd",function(g){g=g.region;Tl(a,Ul,g);if(a.G)a.G.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new uj(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
392
+ function ul(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,A(h,Ig(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.nd=h.h;a.J=Gb(a.nd);g=Ye(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);D(h)})}
393
+ function vl(a,b){var c=b.uri,d=a.H;a.pd=new yj(function(){return a.Ma()});a.pd.addEventListener("regionadd",function(g){g=g.region;Tl(a,Ul,g);if(a.G)a.G.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new uj(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
394
394
  mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Bl(Vl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.X;try{k.g.enabled&&(k.A=h.format,Pk(k,g,{ot:Sk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Fk(a.X,g,h)},filter:function(g){return Wl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Xl(a,g)},
395
395
  onTimelineRegionAdded:function(g){var h=a.pd;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ol(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
396
396
  enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Re(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,A(m,a.J.start(c,e),2);g.i=m.h;h=Bl(Yl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Zl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;D(m)})}(),function(){return a.J.stop()})}
397
397
  function wl(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=$l(a,{Qb:a.H,onError:function(f){Ol(a,f)},rd:function(f){am(a,f)},onExpirationUpdated:function(f,g){bm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==cm&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,bg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.yc(b.M),3):A(e,Wl(a,a.i),0)})}
398
- function xl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Bc&&(b.startTime=a.Bc,a.Bc=null);d=b.M;e=b.uri;a.gb=e;a.I=new qj({gd:function(){return d.playbackRate},dd:function(){return d.defaultPlaybackRate},ze:function(x){d.playbackRate=x},rf:function(x){d.currentTime+=x}});f=function(){return dm(a)};g=function(){return em(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ke==h||
399
- (a.ke=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Ba=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ca=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.ib=a.h.preferForcedSubs;fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,w,C){a.j&&x!=a.j.l&&gm(a,x,!0,void 0===
400
- w?!1:w,void 0===C?0:C)});a.F=hm(a,b.startTime);a.Wa=im(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=km(a);a.j.configure(a.h.streaming);a.l=lm;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":mm(a,x)}});a.dispatchEvent(Bl(nm));l=null;if(m=a.Za().find(function(x){return x.active})){y.D(2);break}l=
401
- om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.Wc();return A(y,pm(l,n),4);case 4:p=y.h,a.F.Td(p);case 3:qm(a,null,le(l));case 2:return a.F.Sd(),t=a.ob().find(function(x){return x.active}),t||((v=ve(a.i.textStreams,a.Ca,a.wb,a.ib)[0]||null)&&ll(a.B.h,v,!0),l&&(v?(l.audio&&rm(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),sm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Rj(a.j,v)),A(y,a.j.start(),5);case 5:a.h.abr.enabled&&
398
+ function xl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Bc&&(b.startTime=a.Bc,a.Bc=null);d=b.M;e=b.uri;a.hb=e;a.I=new qj({gd:function(){return d.playbackRate},dd:function(){return d.defaultPlaybackRate},ze:function(x){d.playbackRate=x},rf:function(x){d.currentTime+=x}});f=function(){return dm(a)};g=function(){return em(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ke==h||
399
+ (a.ke=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Ba=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ca=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,w,C){a.j&&x!=a.j.l&&gm(a,x,!0,void 0===
400
+ w?!1:w,void 0===C?0:C)});a.F=hm(a,b.startTime);a.Xa=im(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=km(a);a.j.configure(a.h.streaming);a.l=lm;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":mm(a,x)}});a.dispatchEvent(Bl(nm));l=null;if(m=a.$a().find(function(x){return x.active})){y.D(2);break}l=
401
+ om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.Wc();return A(y,pm(l,n),4);case 4:p=y.h,a.F.Td(p);case 3:qm(a,null,le(l));case 2:return a.F.Sd(),t=a.pb().find(function(x){return x.active}),t||((v=ve(a.i.textStreams,a.Ca,a.wb,a.jb)[0]||null)&&ll(a.B.h,v,!0),l&&(v?(l.audio&&rm(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),sm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Rj(a.j,v)),A(y,a.j.start(),5);case 5:a.h.abr.enabled&&
402
402
  (a.C.enable(),tm(a)),ce(a.j?a.j.l:null,a.i),um(a.i),vm(a),om(a),a.i.variants.some(function(x){return x.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee}),D(y)}})}
403
403
  function yl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=$l(a,{Qb:a.H,onError:function(n){Ol(a,n)},rd:function(n){am(a,n)},onExpirationUpdated:function(n,p){bm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==cm&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Kg(g),k=Ml[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
404
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.fb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,A(m,bg(a.m,[l],[]),2)):A(m,a.m.yc(b.M),
404
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,A(m,bg(a.m,[l],[]),2)):A(m,a.m.yc(b.M),
405
405
  0)})}
406
- function zl(a,b,c){function d(){return dm(a)}b.uri=c.uri;b.startTime=c.startTime;a.gb=b.uri;var e=b.M;a.F=new fj(e);var f=!1;a.eb.push(function(){f=!0});null!=b.startTime&&a.F.Td(b.startTime);a.I=new qj({gd:function(){return e.playbackRate},dd:function(){return e.defaultPlaybackRate},ze:function(k){e.playbackRate=k},rf:function(k){e.currentTime+=k}});jm(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return em(a)});"none"!=e.preload&&
406
+ function zl(a,b,c){function d(){return dm(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.F=new fj(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.Td(b.startTime);a.I=new qj({gd:function(){return e.playbackRate},dd:function(){return e.defaultPlaybackRate},ze:function(k){e.playbackRate=k},rf:function(k){e.currentTime+=k}});jm(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return em(a)});"none"!=e.preload&&
407
407
  a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return vm(a)}),a.A.o(e.audioTracks,"removetrack",function(){return vm(a)}),a.A.o(e.audioTracks,"change",function(){return vm(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":wm(a,k);break;case "chapters":mm(a,k);break;default:vm(a)}}),a.A.o(e.textTracks,"removetrack",function(){return vm(a)}),a.A.o(e.textTracks,
408
408
  "change",function(){return vm(a)}));var g=Kg(b.uri);e.src=Qk(a.X,b.uri,Ml[g]);(Yc()||Zc())&&e.load();a.l=xm;a.dispatchEvent(Bl(nm));var h=new Pc;Ui(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){a.F.Sd();h.resolve()});Ui(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).R(1)}),2);if(f)return l["return"]();Am(a);D(l)})});
409
409
  e.error?h.reject(Nl(a)):"none"==e.preload&&(Sa('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.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(Nl(a))});return new Re(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
410
410
  function ym(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.xd(b);var c=a.h.preferredVariantRole;""!=c&&a.xd(b,c)}}function Am(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.re(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.re(b,d,c)}}
411
- function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Sl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.eb.push(function(){c.stop()})}}
412
- function Sl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Bl(Cm,b))}function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Aa().R(.5);a.eb.push(function(){c.stop()})}}function Zl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function $l(a,b){return new Vf(b,a.h.drm.updateExpirationTime)}
411
+ function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Sl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.fb.push(function(){c.stop()})}}
412
+ function Sl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Bl(Cm,b))}function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Aa().R(.5);a.fb.push(function(){c.stop()})}}function Zl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function $l(a,b){return new Vf(b,a.h.drm.updateExpirationTime)}
413
413
  function pl(a){return new bf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Bl(Dm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Bl(Em,b))})}
414
- function hm(a,b){return new gj(a.g,a.i,a.h.streaming,b,function(){a.Wa&&tj(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.fd(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.W;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=yi(k,g),k=mi(k,d,e));if(!k&&((null!=zi(c.g.W,g)||h.ab)&&Uj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.W.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,$h(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Vh(h.value)}a.K&&
415
- Fm(a)},function(c){return a.dispatchEvent(c)})}function im(a){var b=new zj(a.pd);b.addEventListener("enter",function(d){Tl(a,Gm,d.region)});b.addEventListener("exit",function(d){Tl(a,Hm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Tl(a,Gm,e),Tl(a,Hm,e))});var c=new sj(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function jm(a,b){a.K=new Ke;a.K.g=Me;Ne(a.K,b,Math.min(.5,b/2));Ql(a);a.jd=(new Q(function(){Fm(a)})).ha(.25)}
414
+ function hm(a,b){return new gj(a.g,a.i,a.h.streaming,b,function(){a.Xa&&tj(a.Xa,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.fd(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.W;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=yi(k,g),k=mi(k,d,e));if(!k&&((null!=zi(c.g.W,g)||h.La)&&Uj(c,h),h.Na&&(h.Na.abort(),h.Na=null),g===Mb))for(g=c.g.W.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,$h(g),g=r(g.j.values()),h=g.next();!h.done;h=
415
+ g.next())Vh(h.value)}}a.K&&Fm(a)},function(c){return a.dispatchEvent(c)})}function im(a){var b=new zj(a.pd);b.addEventListener("enter",function(d){Tl(a,Gm,d.region)});b.addEventListener("exit",function(d){Tl(a,Hm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Tl(a,Gm,e),Tl(a,Hm,e))});var c=new sj(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function jm(a,b){a.K=new Ke;a.K.g=Me;Ne(a.K,b,Math.min(.5,b/2));Ql(a);a.jd=(new Q(function(){Fm(a)})).ha(.25)}
416
416
  function Fm(a){switch(a.l){case xm:if(a.g.ended)var b=!0;else{var c=li(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case lm:a:if(a.g.ended||wi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Kb();var d=li(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ni(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Le:Me;c.g=d;b!=d&&Ql(a)}function Rl(a,b,c,d){return new qi(a,b,c,d)}
417
- function Kl(a){return new Ek({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
417
+ function Kl(a){return new Ek({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},$a:function(){return a.$a()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
418
418
  function km(a){return new Fj(a.i,{fd:function(){return a.F.Wc()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Fk(a.X,b,c)},W:a.N,Qb:a.H,onError:function(b){return Ol(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qg:function(){a.J&&a.J.update&&a.J.update()},je:function(){a.F&&a.F.tf();Fm(a)},Pg:function(b,c){var d=c.be;d&&a.ma&&wj(a.ma,d,b)}})}
419
419
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=al(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
420
420
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=fl(this.h,a,ol(this));Im(this);return c};
421
421
  function Im(a){if(a.J){var b=Ye(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Jm(a,a.i)}catch(f){Ol(a,f)}a.C&&om(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Km(a)}a.H&&a.H.xe(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.pe!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.pe=b;a.j&&(b=a.j,(c=b.j.get(Mb))&&
422
422
  Pj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),tm(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ne(a.K,b,Math.min(.5,b/2)));a.i&&fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=ol(this);fl(a,this.h,ol(this));return a};
423
- q.$f=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.$g=function(){for(var a in this.h)delete this.h[a];fl(this.h,ol(this),ol(this));Im(this)};q.gf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Wd=function(){return this.gb};
423
+ q.$f=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ma().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.$g=function(){for(var a in this.h)delete this.h[a];fl(this.h,ol(this),ol(this));Im(this)};q.gf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Wd=function(){return this.hb};
424
424
  q.cd=function(){return this.G?this.G:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Nb=function(){return this.i?this.i.presentationTimeline.Nb():!1};q.mf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
425
- q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.kb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Eg=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.ed=function(){return this.m?this.m.ed():{}};
425
+ q.Ma=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Eg=function(){this.T()&&(this.g.currentTime=this.Ma().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.ed=function(){return this.m?this.m.ed():{}};
426
426
  q.Jc=function(){return this.K?this.K.g==Me:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Ie=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==lm&&(this.C.playbackRateChanged(a),Oj(this.j,1<Math.abs(a))))};q.Se=function(){var a=this.I.dd();this.l==xm&&this.I.set(a);this.l==lm&&(this.I.set(a),this.C.playbackRateChanged(a),Oj(this.j,!1))};
427
- q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return se(g)}):[]};
428
- q.ob=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zm(this).map(function(f){return qe(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
427
+ q.$a=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return se(g)}):[]};
428
+ q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zm(this).map(function(f){return qe(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
429
429
  q.Ag=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
430
430
  v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,z=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:w,duration:x,uris:f.Ka(),width:p})}return F["return"](null)})};
431
431
  q.se=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(ll(this.B.h,b,!1),Rj(this.j,b),Lm(this),this.Ca=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Lm(this)}};
432
432
  q.ue=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(gm(this,d,!1,b,c),this.Ba=new Fe(d),om(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
433
- oe(c)==a.id){Mm(this,c);break}};q.Zf=function(){return Nm(this.Za())};q.zg=function(){return Nm(this.ob())};q.Yf=function(){return Array.from(Om(this.Za()))};q.yg=function(){return Array.from(Om(this.ob()))};
433
+ oe(c)==a.id){Mm(this,c);break}};q.Zf=function(){return Nm(this.$a())};q.zg=function(){return Nm(this.pb())};q.Yf=function(){return Array.from(Om(this.$a()))};q.yg=function(){return Array.from(Om(this.pb()))};
434
434
  q.xd=function(a,b){if(this.i&&this.F){this.Ba=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ba.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.ue(c,!0)):Km(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
435
435
  r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Mm(this,f):d&&Mm(this,d)}};
436
- q.re=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ca=a,this.wb=b||"",this.ib=c,(a=ve(this.i.textStreams,this.Ca,this.wb,this.ib)[0]||null)&&a!=this.j.A&&(ll(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))Rj(this.j,a),Lm(this)}else{var d=Qb(a);(a=this.ob().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
436
+ q.re=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ca=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ca,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(ll(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))Rj(this.j,a),Lm(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
437
437
  q.bh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ba=new Ge(b.language,"",0,a),Km(this))}};q.Pb=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zm(this).some(function(b){return"showing"==b.mode}):a};q.df=function(){return this.g&&this.g.src&&this.g.textTracks?Pm(this).map(function(a){return qe(a)}):[]};
438
- q.cg=function(a){var b=Qb(a),c=Pm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
439
- function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
440
- q.Ce=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==lm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ca,this.wb,this.ib),0<a.length&&(Rj(this.j,a[0]),Lm(this))):Nj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}sm(this)}};
438
+ q.cg=function(a){var b=Qb(a),c=Pm(this).filter(function(h){return Qb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
439
+ function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
440
+ q.Ce=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==lm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ca,this.wb,this.jb),0<a.length&&(Rj(this.j,a[0]),Lm(this))):Nj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}sm(this)}};
441
441
  q.ug=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.F)b=this.F.Wc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
442
442
  q.hf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==lm)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==xm&&(a.total=oi(this.g.buffered));return a};
443
443
  q.getStats=function(){if(this.l!=lm&&this.l!=xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames: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:[]};dm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
444
- b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==lm){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.hf().valueOf()+1E3*this.La().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
444
+ b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==lm){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.hf().valueOf()+1E3*this.Ma().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
445
445
  (this.B.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.B.C=c}this.l==xm&&(c=this.B,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.B;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.C,k=e.i,l=e.m,m=e.H,n=e.j,p=il(e.g,"playing"),t=il(e.g,"paused"),v=il(e.g,"buffering"),y=e.B,x=e.G,w=e.I,C=jl(e.g),z=[];e=r(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
446
446
  height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:z}};
447
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=lm&&this.l!=xm)throw new P(1,7,7004);if(!d){var h=Kg(a);d=Qm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==xm){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=Vk(this.X,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ob().find(function(k){return k.language==
447
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=lm&&this.l!=xm)throw new P(1,7,7004);if(!d){var h=Kg(a);d=Qm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==xm){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=Vk(this.X,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
448
448
  b&&k.label==(f||"")&&k.kind==c}))return vm(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ne++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:oj(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
449
449
  closedCaptions:null};if(!Ed(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);vm(this);return me(a)};
450
- q.Of=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:if(h.l!=lm&&h.l!=xm)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,Rm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(B){}if(h.l!=xm){z.D(4);break}g&&(c="forced");return A(z,Sm(h,a,b,c,d,f||"",k),5);case 5:l=h.ob();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return vm(h),z["return"](m);throw new P(1,2,2012);case 4:n=
450
+ q.Of=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:if(h.l!=lm&&h.l!=xm)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,Rm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(B){}if(h.l!=xm){z.D(4);break}g&&(c="forced");return A(z,Sm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return vm(h),z["return"](m);throw new P(1,2,2012);case 4:n=
451
451
  Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,Tm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=Um(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=ti(y),d="text/vtt";case 6:x={id:h.Ne++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:oj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
452
452
  emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=yd(x.mimeType,x.codecs);C=Ed(w);if(!C)throw new P(2,2,2014,d);h.i.textStreams.push(x);vm(h);return z["return"](me(x))}})};
453
453
  q.Nf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=lm&&d.l!=xm)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,Rm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Sm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.df();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
454
454
  case 5:throw new P(1,2,2012);}})};function Rm(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=Kg(b);if(d=Qm[c])return e["return"](d);E(e,2);return A(e,Mg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
455
455
  function Sm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?A(n,Tm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=Um(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ti(l),e="text/vtt");m=document.createElement("track");m.src=Vk(a.X,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
456
456
  function Tm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=mf;f=ff([b],d);f.method="GET";var k=a.X;try{k.g.enabled&&Pk(k,f,{ot:Wk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function Um(a,b,c,d){var e=Fd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),Dk(b,d);throw new P(2,2,2014,c);}
457
- q.ye=function(a,b){this.Me.width=a;this.Me.height=b};q.oe=function(a){if(this.l==lm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Hc&&(d.Hc=!1,Mj(b,d,a));b=!0}}else b=!1;return b};
457
+ q.ye=function(a,b){this.Me.width=a;this.Me.height=b};q.oe=function(a){if(this.l==lm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Hc||d.La||d.eb||(d.Hc=!1,Mj(b,d,a));b=!0}}else b=!1;return b};
458
458
  q.og=function(){Sa("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.");return this.i};q.pg=function(){return this.nd};
459
459
  function ol(a){var b=dl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.oe(d))}};b.textDisplayFactory=function(){return a.hd?new vk(a.g,a.hd):new pk(a.g)};return b}q.De=function(a){this.hd=a};
460
460
  function Xl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new pj;h={id:a.Ne++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
@@ -477,20 +477,20 @@ function Nm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.nex
477
477
  h.push({language:l,role:n,label:p})}});return h}function Gl(){return new P(2,7,7E3)}function Al(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function jk(){return{M:null,mimeType:null,startTime:null,Ee:NaN,uri:null}}function Hl(a){return new Promise(function(b,c){a.Sb=function(){return c(Gl())};a.qd=function(){return b()};a.onError=function(d){return c(d)};a.sd=function(){return c(Gl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.De;
478
478
  T.prototype.getManifestParserFactory=T.prototype.pg;T.prototype.getManifest=T.prototype.og;T.prototype.retryStreaming=T.prototype.oe;T.prototype.setMaxHardwareResolution=T.prototype.ye;T.prototype.addChaptersTrack=T.prototype.Nf;T.prototype.addTextTrackAsync=T.prototype.Of;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.hf;
479
479
  T.prototype.getPlayheadTimeAsDate=T.prototype.ug;T.prototype.setTextTrackVisibility=T.prototype.Ce;T.prototype.getChapters=T.prototype.cg;T.prototype.getChaptersTracks=T.prototype.df;T.prototype.isTextTrackVisible=T.prototype.Pb;T.prototype.selectVariantsByLabel=T.prototype.bh;T.prototype.selectTextLanguage=T.prototype.re;T.prototype.selectAudioLanguage=T.prototype.xd;T.prototype.getTextLanguages=T.prototype.yg;T.prototype.getAudioLanguages=T.prototype.Yf;T.prototype.getTextLanguagesAndRoles=T.prototype.zg;
480
- T.prototype.getAudioLanguagesAndRoles=T.prototype.Zf;T.prototype.selectVariantTrack=T.prototype.ue;T.prototype.selectTextTrack=T.prototype.se;T.prototype.getThumbnails=T.prototype.Ag;T.prototype.getImageTracks=T.prototype.jg;T.prototype.getTextTracks=T.prototype.ob;T.prototype.getVariantTracks=T.prototype.Za;T.prototype.cancelTrickPlay=T.prototype.Se;T.prototype.trickPlay=T.prototype.Ie;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Jc;T.prototype.getKeyStatuses=T.prototype.ed;
481
- T.prototype.getExpiration=T.prototype.Dc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Eg;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.mf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.cd;T.prototype.getAssetUri=T.prototype.Wd;T.prototype.getNetworkingEngine=T.prototype.Ec;T.prototype.getMediaElement=T.prototype.rg;
480
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.Zf;T.prototype.selectVariantTrack=T.prototype.ue;T.prototype.selectTextTrack=T.prototype.se;T.prototype.getThumbnails=T.prototype.Ag;T.prototype.getImageTracks=T.prototype.jg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.$a;T.prototype.cancelTrickPlay=T.prototype.Se;T.prototype.trickPlay=T.prototype.Ie;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Jc;T.prototype.getKeyStatuses=T.prototype.ed;
481
+ T.prototype.getExpiration=T.prototype.Dc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Eg;T.prototype.seekRange=T.prototype.Ma;T.prototype.isAudioOnly=T.prototype.mf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.cd;T.prototype.getAssetUri=T.prototype.Wd;T.prototype.getNetworkingEngine=T.prototype.Ec;T.prototype.getMediaElement=T.prototype.rg;
482
482
  T.prototype.getLoadMode=T.prototype.gf;T.prototype.resetConfiguration=T.prototype.$g;T.prototype.getBufferFullness=T.prototype.$f;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.nh;T.prototype.unload=T.prototype.Ke;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.yc;
483
483
  T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?A(h,Cg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Tc()){for(var l in Jg)k[l]=!0;for(var m in Lg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Tc()?!!Jg[n]:Uc(n);for(var p in l)k[p]=
484
484
  Tc()?!!Lg[p]:Uc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","));
485
485
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Tc()?Ed(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=kn;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Fl;T.setAdManagerFactory=function(a){ql=a};T.registerSupportPlugin=function(a,b){kn[a]=b};T.prototype.destroy=T.prototype.destroy;
486
486
  var fn="abrstatuschanged",$m="adaptation",Xm="buffering",Em="downloadfailed",Dm="downloadheadersreceived",cm="drmsessionupdate",gk="emsg",gn="error",jn="expirationupdated",Ll="loaded",Il="loading",Yl="manifestparsed",Vl="mediaqualitychanged",Cm="metadata",Cl="onstatechange",Dl="onstateidle",Ym="ratechange",nm="streaming",dn="textchanged",en="texttrackvisibility",Ul="timelineregionadded",Gm="timelineregionenter",Hm="timelineregionexit",bn="trackschanged",Pl="unloading",cn="variantchanged",ln={uh:fn,
487
- vh:$m,wh:Xm,Bh:Em,Ch:Dm,Dh:cm,Kh:gk,Error:gn,Lh:jn,Rh:"largegap",Sh:Ll,Th:Il,Xh:Yl,Yh:Vl,Metadata:Cm,ci:Cl,di:Dl,ni:Ym,wi:"sessiondata",xi:nm,zi:dn,Ai:en,Bi:Ul,Ci:Gm,Di:Hm,Ei:bn,Ii:Pl,Ki:cn},El=0,nl=1,lm=2,xm=3;T.LoadMode={DESTROYED:El,NOT_LOADED:nl,MEDIA_SOURCE:lm,SRC_EQUALS:xm};T.version="v3.3.14";var mn=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(mn[0]),Number(mn[1])));
487
+ vh:$m,wh:Xm,Bh:Em,Ch:Dm,Dh:cm,Kh:gk,Error:gn,Lh:jn,Rh:"largegap",Sh:Ll,Th:Il,Xh:Yl,Yh:Vl,Metadata:Cm,ci:Cl,di:Dl,ni:Ym,wi:"sessiondata",xi:nm,zi:dn,Ai:en,Bi:Ul,Ci:Gm,Di:Hm,Ei:bn,Ii:Pl,Ki:cn},El=0,nl=1,lm=2,xm=3;T.LoadMode={DESTROYED:El,NOT_LOADED:nl,MEDIA_SOURCE:lm,SRC_EQUALS:xm};T.version="v3.3.15";var mn=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(mn[0]),Number(mn[1])));
488
488
  var hn=["output-restricted","internal-error"],kn={},ql=null,Ml={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Qm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
489
489
  ssa:"text/x-ssa",ass:"text/x-ssa"};function nn(){this.h=[];this.j=this.i=this.g=0};function on(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new pf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=on.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
490
490
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
491
491
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
492
492
  N("shaka.ads.ClientSideAd",on);on.prototype.release=on.prototype.release;on.prototype.getPositionInSequence=on.prototype.getPositionInSequence;on.prototype.getSequenceLength=on.prototype.getSequenceLength;on.prototype.setMuted=on.prototype.setMuted;on.prototype.resize=on.prototype.resize;on.prototype.isLinear=on.prototype.isLinear;on.prototype.isMuted=on.prototype.isMuted;on.prototype.setVolume=on.prototype.setVolume;on.prototype.getVolume=on.prototype.getVolume;on.prototype.play=on.prototype.play;
493
- on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new pf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.14");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){qn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
493
+ on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new pf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.15");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){qn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
494
494
  function(f){rn(e,f)});this.i.onended=function(){e.m.contentComplete()}}pn.prototype.stop=function(){this.g&&this.g.stop();this.A&&uk(this.A)};pn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function rn(a,b){b.getError();sn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
495
495
  function qn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}tn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
496
496
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){sn(a,null)}}
@@ -511,8 +511,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}wn.prototyp
511
511
  function xn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new nn;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new pn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
512
512
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new nn};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
513
513
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new wn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
514
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.14";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
515
- (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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.');a.mpt="Shaka Player";a.mpv="v3.3.14";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
514
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.15";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
515
+ (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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.');a.mpt="Shaka Player";a.mpv="v3.3.15";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
516
516
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};N("shaka.ads.AdManager",U);
517
517
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
518
518
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
@@ -574,7 +574,7 @@ function So(a){var b=a.getAttribute("schemeIdUri"),c=Ff(a,"urn:mpeg:cenc:2013","
574
574
  var Qo=1,Ro=(new Map).set("com.widevine.alpha",function(a){return(a=Cf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Po).set("com.microsoft.playready.recommendation",Po).set("com.microsoft.playready.software",Po).set("com.microsoft.playready.hardware",Po);function To(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
575
575
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
576
576
  function Uo(a,b){var c=Vo(a,b,"timescale"),d=1;c&&(d=Of(c)||1);var e=Vo(a,b,"duration");c=Of(e||"");"image"==a.L.contentType&&(c=Qf(e||""));c&&(c/=d);var f=Vo(a,b,"startNumber");e=Number(Vo(a,b,"presentationTimeOffset"))||0;var g=Pf(f||"");if(null==f||null==g)g=1;var h=Wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=Bf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=Jf(p,"t",Pf),y=Jf(p,"d",Pf);p=Jf(p,"r",Nf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
577
- p||0;if(0>p)if(t){t=Jf(t,"t",Pf);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,za:c,nc:g,rb:e/d||0,Le:e,timeline:f}}function Vo(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
577
+ p||0;if(0>p)if(t){t=Jf(t,"t",Pf);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,za:c,nc:g,sb:e/d||0,Le:e,timeline:f}}function Vo(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
578
578
  function Wo(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Fb).map(function(d){return Af(d,c)}).reduce(function(d,e){return d||e})}
579
579
  function Xo(a,b,c,d,e,f){for(var g=Ff(a,"http://www.w3.org/1999/xlink","href"),h=Ff(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Se(new P(2,4,4028));if("onLoad"!=h)return Se(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,ff(m,b)).qa(function(n){n=Uf(n.data,a.tagName);if(!n)return Se(new P(2,4,4001,g));
580
580
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Yo(a,b,c,m[0],e,f+1)})}
@@ -583,29 +583,29 @@ function $o(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)
583
583
  function bp(a){var b=cp(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=cp(a);a:{d=r(dp);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new ep(c,
584
584
  d)}function cp(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var dp=[[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 ep(a,b){this.id=a;this.g=b}
585
585
  function fp(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function gp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ap(a.g);for(var n=null,p=null;a.Ea();){var t=bp(a);if(187==t.id){var v=hp(t);v&&(t=c*v.mh,v=b+v.Wg,null!=n&&m.push(new Ni(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new Ni(n+g,d+g,l,p,null,f,g,h,k));return m}
586
- function hp(a){var b=new ap(a.g);a=bp(b);if(179!=a.id)throw new P(2,3,3013);a=fp(a);b=bp(b);if(183!=b.id)throw new P(2,3,3012);b=new ap(b.g);for(var c=0;b.Ea();){var d=bp(b);if(241==d.id){c=fp(d);break}}return{mh:a,Wg:c}};function ip(a,b){var c=Wo(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=Jf(c,"range",Mf))e=c.start,f=c.end;return new Li(function(){return d},e,f,jp(a))}
587
- function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"timescale"),e=1;d&&(e=Of(d)||1);var f=c/e||0,g=ip(a,lp);mp(a,g);var h=Ze(a);return{ac:function(){var k=Wo(h,lp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=np(h);return op(h,b,g,l,k.start,k.end,f)}}}
586
+ function hp(a){var b=new ap(a.g);a=bp(b);if(179!=a.id)throw new P(2,3,3013);a=fp(a);b=bp(b);if(183!=b.id)throw new P(2,3,3012);b=new ap(b.g);for(var c=0;b.Ea();){var d=bp(b);if(241==d.id){c=fp(d);break}}return{mh:a,Wg:c}};function ip(a,b){var c=Wo(a,b,"Initialization");if(!c)return null;var d=a.L.Qa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Qa,[e]));e=0;var f=null;if(c=Jf(c,"range",Mf))e=c.start,f=c.end;return new Li(function(){return d},e,f,jp(a))}
587
+ function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"timescale"),e=1;d&&(e=Of(d)||1);var f=c/e||0,g=ip(a,lp);mp(a,g);var h=Ze(a);return{ac:function(){var k=Wo(h,lp,"RepresentationIndex"),l=h.L.Qa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Qa,[k]));k=np(h);return op(h,b,g,l,k.start,k.end,f)}}}
588
588
  function op(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,x,w,C,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.pf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.xa):null],p=null,A(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Zo(x,e,d,c,z,B,F);else{H=new ap(w);if(440786851!=bp(H).id)throw new P(2,3,3008);var J=bp(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
589
589
  J=new ap(J.g);for(var K=null;J.Ea();){var L=bp(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new ap(K.g);L=1E6;for(J=null;K.Ea();){var W=bp(K);if(2807729==W.id)L=fp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=bp(new ap(x));if(475249515!=L.id)throw new P(2,3,3007);H=gp(L,H,K,J,d,c,z,B,F)}C=H;h.ic(C);t=new mj(C);k&&t.yb(B,F,!0);return G["return"](t)})}
590
590
  function lp(a){return a.Nc}function np(a){var b=Wo(a,lp,"RepresentationIndex");a=Vo(a,lp,"indexRange");a=Mf(a||"");b&&(a=Jf(b,"range",Mf,a));return a}function mp(a,b){pp(a,b);if(!np(a))throw new P(2,4,4002);}function pp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
591
- function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.za&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.ec.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Bp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.hc(g,a.presentationTimeline.mb()):e=new mj(g);a.presentationTimeline.ic(g);a.xb&&a.Y.pf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
592
- Infinity,c);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.O.length||e.fc(g);return Promise.resolve(e)}}}function rp(a){return a.Db}function sp(a){var b=Cp(a);a=Uo(a,rp);var c=a.nc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,nc:c,rb:a.rb,timeline:a.timeline,ec:b}}
593
- function Bp(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.ec[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[n].end:l+b;k.push(new Ni(a+l,a+t,function(v){return function(){return v.Id}}(m),p.start,p.end,e,g,a,h));l=t}return k}
594
- function Cp(a){return[a.L.Db,a.wa.Db,a.sa.Db].filter(Fb).map(function(b){return Bf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.lf&&(a.lf=!0);var c=b.getAttribute("media");b=Jf(b,"mediaRange",Mf,{start:0,end:null});return{Ng:c,start:b.start,end:b.end}})};function Dp(a,b,c,d,e,f){var g=Ep(a),h=Fp(a);Gp(h);var k=Ze(a);if(h.Ic)return pp(a,g),{ac:function(){var t=To(h.Ic,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return op(k,b,g,t,0,null,h.rb)}};if(h.za)return d||"image"===a.wa.contentType||(a.presentationTimeline.fe(h.za),a.presentationTimeline.ge(a.Y.start)),{ac:function(){return Hp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ip(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:
595
- Infinity,p=Infinity!=n;l?(p&&(new mj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.mb())):l=new mj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.O.length||l.fc(m);return Promise.resolve(l)}}}function Jp(a){return a.Oc}function Fp(a){var b=Uo(a,Jp),c=Vo(a,Jp,"media");a=Vo(a,Jp,"index");return{za:b.za,timescale:b.timescale,nc:b.nc,rb:b.rb,Le:b.Le,timeline:b.timeline,ee:c,Ic:a}}
591
+ function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.za&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.ec.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Bp(a.Y.start,a.Y.duration,a.L.Qa,d,c);c=!e;e?e.hc(g,a.presentationTimeline.ob()):e=new mj(g);a.presentationTimeline.ic(g);a.xb&&a.Y.pf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
592
+ Infinity,c);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.O.length||e.fc(g);return Promise.resolve(e)}}}function rp(a){return a.Db}function sp(a){var b=Cp(a);a=Uo(a,rp);var c=a.nc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,nc:c,sb:a.sb,timeline:a.timeline,ec:b}}
593
+ function Bp(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.ec[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[n].end:l+b;k.push(new Ni(a+l,a+t,function(v){return function(){return v.Id}}(m),p.start,p.end,e,g,a,h));l=t}return k}
594
+ function Cp(a){return[a.L.Db,a.wa.Db,a.sa.Db].filter(Fb).map(function(b){return Bf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.lf&&(a.lf=!0);var c=b.getAttribute("media");b=Jf(b,"mediaRange",Mf,{start:0,end:null});return{Ng:c,start:b.start,end:b.end}})};function Dp(a,b,c,d,e,f){var g=Ep(a),h=Fp(a);Gp(h);var k=Ze(a);if(h.Ic)return pp(a,g),{ac:function(){var t=To(h.Ic,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Qa,[t]);return op(k,b,g,t,0,null,h.sb)}};if(h.za)return d||"image"===a.wa.contentType||(a.presentationTimeline.fe(h.za),a.presentationTimeline.ge(a.Y.start)),{ac:function(){return Hp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ip(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:
595
+ Infinity,p=Infinity!=n;l?(p&&(new mj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.ob())):l=new mj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.O.length||l.fc(m);return Promise.resolve(l)}}}function Jp(a){return a.Oc}function Fp(a){var b=Uo(a,Jp),c=Vo(a,Jp,"media");a=Vo(a,Jp,"index");return{za:b.za,timescale:b.timescale,nc:b.nc,sb:b.sb,Le:b.Le,timeline:b.timeline,ee:c,Ic:a}}
596
596
  function Gp(a){var b=a.Ic?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Ic&&(a.timeline=null),a.za=null);if(!a.Ic&&!a.ee)throw new P(2,4,4002);}
597
- function Hp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.rb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new Ni(Z,ka,function(){var ja=To(y,w,K,x,W*v);return Hb(C,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.mb(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.za,t=b.nc,v=b.timescale,
598
- y=b.ee,x=a.bandwidth||null,w=a.L.id,C=a.L.Pa,z=l-b.rb,B=g();a=a.xb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new mj(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.yd(p,function(){var K=k.mb();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
599
- function Ip(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.rb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Hd:h.Hd,Ld:h.Ld,Od:h.Od,Ed:h.Ed,Qd:h.Qd,Fd:h.Fd},k++){var l=b.timeline[k],m=l.start,n=l.lh;l=l.end;h.Od=k+b.nc;h.Qd=n+b.Le;h.Ld=a.L.id;h.Ed=a.bandwidth||null;h.Hd=b.ee;h.Fd=a.L.Pa;g.push(new Ni(d+m,d+l,function(p){return function(){var t=To(p.Hd,p.Ld,p.Od,p.Ed||null,p.Qd);return Hb(p.Fd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
600
- function Ep(a){var b=Vo(a,Jp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new Li(function(){var f=To(b,c,null,d,null);return Hb(e,[f])},0,null,jp(a))};function Kp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Kp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
597
+ function Hp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new Ni(Z,ka,function(){var ja=To(y,w,K,x,W*v);return Hb(C,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.za,t=b.nc,v=b.timescale,
598
+ y=b.ee,x=a.bandwidth||null,w=a.L.id,C=a.L.Qa,z=l-b.sb,B=g();a=a.xb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new mj(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.yd(p,function(){var K=k.ob();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
599
+ function Ip(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Hd:h.Hd,Ld:h.Ld,Od:h.Od,Ed:h.Ed,Qd:h.Qd,Fd:h.Fd},k++){var l=b.timeline[k],m=l.start,n=l.lh;l=l.end;h.Od=k+b.nc;h.Qd=n+b.Le;h.Ld=a.L.id;h.Ed=a.bandwidth||null;h.Hd=b.ee;h.Fd=a.L.Qa;g.push(new Ni(d+m,d+l,function(p){return function(){var t=To(p.Hd,p.Ld,p.Od,p.Ed||null,p.Qd);return Hb(p.Fd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
600
+ function Ep(a){var b=Vo(a,Jp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Qa;return new Li(function(){var f=To(b,c,null,d,null);return Hb(e,[f])},0,null,jp(a))};function Kp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Kp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
601
601
  function Lp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Mp(b);Np(b);Op(b);Pp(b);if(!c&&1==b.length){e=b[0];a.g=e.Yc;a.h=e.Bd;a.j=e.textStreams;a.i=e.imageStreams;Ma.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma["return"]();k=b.map(function(Da){return Da.Yc});l=b.map(function(Da){return Da.Bd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
602
602
  p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Qp(d.oa));y=r(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Qp(d.xc));return A(Ma,Rp(a.g,k,f,Sp,Tp),3);case 3:return A(Ma,Rp(a.h,l,f,Sp,Tp),4);case 4:return A(Ma,Rp(a.j,m,f,Sp,Tp),5);case 5:return A(Ma,Rp(a.i,n,f,Sp,Tp),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),L=K.next();!L.done;L=K.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=Fg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
603
- !ea.length||(Ia=C++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.fb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
603
+ !ea.length||(Ia=C++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
604
604
  a.l=z;D(Ma)}})}function Mp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Yc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Yc=c}}
605
605
  function Op(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
606
606
  function Np(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Bd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jc(e.roles,h.roles)&&zf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Bd=c}}
607
607
  function Pp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
608
- function Up(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.fb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
608
+ function Up(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
609
609
  h.value,k.push(Vp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Vp(b.xc));return A(Z,Rp([],c,0,Wp,Xp),2);case 2:return p=Z.h,A(Z,Rp([],d,0,Wp,Xp),3);case 3:return t=Z.h,A(Z,Rp([],e,0,Wp,Xp),4);case 4:return v=Z.h,A(Z,Rp([],f,0,Wp,Xp),5);case 5:y=Z.h;x=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())L=K.value,W=x++,L.variantIds.push(W),H.variantIds.push(W);else for(w=t.concat(p),C=r(w),z=C.next();!z.done;z=C.next())B=
610
610
  z.value,B.variantIds=[x++];return Z["return"](t.concat(p).concat(v).concat(y))}})}
611
611
  function Rp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return A(L,Yp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),x=y.next();!x.done;x=y.next())w=x.value,(C=Zp(w,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
@@ -631,12 +631,12 @@ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next
631
631
  function qq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=ff(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),af(a.A,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,sq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
632
632
  function sq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Uf(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](tq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);af(a.A,g);return A(k,g.promise,2)}h=k.h;return k["return"](tq(a,h,c))})}
633
633
  function tq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Bf(b,"Location").map(Hf).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=Bf(b,"BaseURL");k=h.map(Hf);l=Hb(e,k);m=0;h&&h.length&&(m=Jf(h[0],"availabilityTimeOffset",Qf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Jf(b,"minBufferTime",Lf)||0);a.H=Jf(b,"minimumUpdatePeriod",Lf,-1);t=Jf(b,"availabilityStartTime",Kf);v=Jf(b,
634
- "timeShiftBufferDepth",Lf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Jf(b,"suggestedPresentationDelay",Lf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Jf(b,"maxSegmentDuration",Lf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.mb());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Pc("static"==z);(L=B.T())&&
634
+ "timeShiftBufferDepth",Lf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Jf(b,"suggestedPresentationDelay",Lf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Jf(b,"maxSegmentDuration",Lf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.ob());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Pc("static"==z);(L=B.T())&&
635
635
  !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Be(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,wa:null,L:null,bandwidth:0,lf:!1,Zb:m,profiles:W.split(",")};ka=uq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=z&&ka.$e||B.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.Af(a.C):a.C&&Sa("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.");
636
636
  B.fe(C||1);return A(Qa,Lp(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.If()){Qa.D(4);break}Ma=Bf(b,"UTCTiming");return A(Qa,vq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();B.Bf(Da);case 4:B.ae();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(Qa)}})}
637
637
  function uq(a,b,c,d){var e=Jf(d,"mediaPresentationDuration",Lf),f=[],g=0;d=Bf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Jf(k,"start",Lf,g),n=k.id,p=Jf(k,"duration",Lf),t=null;if(l){var v=Jf(l,"start",Lf);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=wq(a,b,c,{start:m,duration:t,node:k,pf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
638
638
  null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,$e:!1}:{periods:f,duration:g,$e:!0}}
639
- function wq(a,b,c,d){b.sa=xq(d.node,null,c);b.Y=d;b.sa.Zb=b.Zb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Bf(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())yq(a,d.start,d.duration,f.value,c);c=Bf(d.node,"AdaptationSet").map(function(m){return zq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Zg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
639
+ function wq(a,b,c,d){b.sa=xq(d.node,null,c);b.Y=d;b.sa.Zb=b.Zb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Bf(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())yq(a,d.start,d.duration,f.value,c);c=Bf(d.node,"AdaptationSet").map(function(m){return zq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Zg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
640
640
  }d=c.filter(function(m){return!m.He});c=c.filter(function(m){return m.He});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.He.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Vc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Aq(d,"audio");g=a.g.disableVideo?[]:Aq(d,"video");f=a.g.disableText?
641
641
  []:Aq(d,Mb);c=a.g.disableThumbnails?[]:Aq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Yc:d,Bd:e,textStreams:g,imageStreams:f}}
642
642
  function Aq(a,b){return a.filter(function(c){return c.contentType==b})}
@@ -646,13 +646,13 @@ l}}var n;m=Bf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.do
646
646
  1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Qb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Bf(c,"ContentProtection");var z=Jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Bf(c,"Label"))&&l.length&&
647
647
  (l=l[0],l.textContent&&(F=l.textContent));l=Bf(c,"Representation");c=l.map(function(G){if(G=Bq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=Cq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.wa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
648
648
  m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:B,Mi:e,streams:c,drmInfos:z.drmInfos,He:f,Zg:k}}
649
- function Bq(a,b,c,d,e,f,g,h,k,l){b.L=xq(l,b.wa,null);a.C=Math.min(a.C,b.L.Zb);if(!Dq(b.L))return null;var m=b.Y.start;b.bandwidth=Jf(l,"bandwidth",Of)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Eq(a,H,J,K)};if(b.L.Nc)var v=kp(b,t);else if(b.L.Db)v=qp(b,a.l);else if(b.L.Oc)v=Dp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Pa,x=b.Y.duration||0;v={ac:function(){return Promise.resolve(oj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
649
+ function Bq(a,b,c,d,e,f,g,h,k,l){b.L=xq(l,b.wa,null);a.C=Math.min(a.C,b.L.Zb);if(!Dq(b.L))return null;var m=b.Y.start;b.bandwidth=Jf(l,"bandwidth",Of)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Eq(a,H,J,K)};if(b.L.Nc)var v=kp(b,t);else if(b.L.Db)v=qp(b,a.l);else if(b.L.Oc)v=Dp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Qa,x=b.Y.duration||0;v={ac:function(){return Promise.resolve(oj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
650
650
  throw H;}t=Bf(l,"ContentProtection");t=Mo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Bf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Bf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
651
651
  (z=l.getAttribute("value")),!z))return null;var B;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return M(function(L){if(1==L.g){J=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return L.D(0);K=J;return A(L,v.ac(),3)}K.segmentIndex=L.h;D(L)})},closeSegmentIndex:function(){G.segmentIndex&&
652
652
  (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.od,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
653
653
  hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function pq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,qq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();rq(a,b);D(d)}})}function rq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,fc(a.J)))}
654
- function xq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,od:null,audioSamplingRate:null,Zb:0};c=c||b.Pa;var d=Bf(a,"BaseURL"),e=d.map(Hf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Jf(a,"frameRate",Rf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Bf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
655
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Bf(a,"AudioChannelConfiguration");m=Fq(m)||b.od;p=Jf(a,"audioSamplingRate",Pf)||b.audioSamplingRate;f||(f=Cq(g,h));var t=Af(a,"SegmentBase"),v=Af(a,"SegmentTemplate"),y=t?Jf(t,"availabilityTimeOffset",Qf)||0:0,x=v?Jf(v,"availabilityTimeOffset",Qf)||0:0;d=d&&d.length?Jf(d[0],"availabilityTimeOffset",Qf)||0:0;d=b.Zb+d+y+x;return{Pa:Hb(c,e),Nc:t||b.Nc,Db:Af(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:Jf(a,"width",Pf)||b.width,height:Jf(a,
654
+ function xq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,od:null,audioSamplingRate:null,Zb:0};c=c||b.Qa;var d=Bf(a,"BaseURL"),e=d.map(Hf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Jf(a,"frameRate",Rf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Bf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
655
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Bf(a,"AudioChannelConfiguration");m=Fq(m)||b.od;p=Jf(a,"audioSamplingRate",Pf)||b.audioSamplingRate;f||(f=Cq(g,h));var t=Af(a,"SegmentBase"),v=Af(a,"SegmentTemplate"),y=t?Jf(t,"availabilityTimeOffset",Qf)||0:0,x=v?Jf(v,"availabilityTimeOffset",Qf)||0:0;d=d&&d.length?Jf(d[0],"availabilityTimeOffset",Qf)||0:0;d=b.Zb+d+y+x;return{Qa:Hb(c,e),Nc:t||b.Nc,Db:Af(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:Jf(a,"width",Pf)||b.width,height:Jf(a,
656
656
  "height",Pf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),od:m,audioSamplingRate:p,Zb:d}}
657
657
  function Fq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
658
658
  parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Dq(a){var b=a.Nc?1:0;b+=a.Db?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Db=null),a.Oc=null);return!0}
@@ -670,7 +670,7 @@ var Yq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE E
670
670
  N("shaka.net.DataUriPlugin",$q);$q.parse=ar;cf("data",ar);function cr(){var a=this;this.g=this.i=null;this.Ba=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Vq;this.ma=0;this.F=new Q(function(){dr(a)});this.m=er;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new $e;this.X=[];this.K=new Map;this.Ca=!1;this.B=new Map;this.S=null;this.va=new Map;this.J=new Map;this.l=!1}q=cr.prototype;q.configure=function(a){this.g=a};
671
671
  q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,fr(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,gr(c,d.data),3);e=c.ma;0<e&&c.F.R(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
672
672
  q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==er)return e["return"]();b=[];a.S=null;c=Array.from(a.h.values());return c.length?A(e,hr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(hr(a,c[d]));return A(e,Promise.all(b),0)})};
673
- function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=ir,d=b.Mf,e=new jb(d),a.l&&b.Rf&&nb(e,new pb("_HLS_skip=YES")),A(y,fr(a,e.toString()),2);if(3!=y.g){f=y.h;g=Wq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Nq(g.g,"EXT-X-DEFINE");k=jr(a,h);l=b.stream;return A(y,kr(a,b.zd,g,l.type,l.mimeType,b.ce,k,b.Wf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.hc(m,a.j.mb());m.length&&(n=Qq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ce.get(n),l.segmentIndex.Hb(p));t=m[m.length-
673
+ function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=ir,d=b.Mf,e=new jb(d),a.l&&b.Rf&&nb(e,new pb("_HLS_skip=YES")),A(y,fr(a,e.toString()),2);if(3!=y.g){f=y.h;g=Wq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Nq(g.g,"EXT-X-DEFINE");k=jr(a,h);l=b.stream;return A(y,kr(a,b.zd,g,l.type,l.mimeType,b.ce,k,b.Wf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.hc(m,a.j.ob());m.length&&(n=Qq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ce.get(n),l.segmentIndex.Hb(p));t=m[m.length-
674
674
  1];if(v=Pq(g.g,"EXT-X-ENDLIST"))lr(a,c.Lf),a.j.bb(t.endTime);D(y)})}q.onExpirationUpdated=function(){};
675
675
  function gr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,bc,Gd;return M(function(gb){switch(gb.g){case 1:c=Wq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Nq(c.g,"EXT-X-DEFINE");mr(a,d);e=Nq(c.g,"EXT-X-MEDIA");f=Nq(c.g,"EXT-X-STREAM-INF");g=Nq(c.g,"EXT-X-IMAGE-STREAM-INF");nr(a,f);h=Nq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Jq(m,"DATA-ID"),p=Jq(m,"URI"),t=Jq(m,"LANGUAGE"),v=Jq(m,"VALUE"),y=(new Map).set("id",n),p&&
676
676
  y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),x=new O("sessiondata",y),a.i)a.i.onEvent(x);return A(gb,or(a,e),2);case 2:return pr(a,e),A(gb,qr(a,f),3);case 3:return w=gb.h,A(gb,rr(a,e),4);case 4:return C=gb.h,A(gb,sr(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ca&&0==w.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.qf),"text"!=J.stream.type&&(F=Math.min(F,J.Mg-J.qf));a.m!=er?(a.j=new R(0,
@@ -685,7 +685,7 @@ function or(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function
685
685
  function qr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Jq(g,"FRAME-RATE"),k=Number(Jq(g,"AVERAGE-BANDWIDTH"))||Number(Kq(g,"BANDWIDTH")),l=Jq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Jq(g,"VIDEO-RANGE"),A(y,xr(a,g,k),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,z=r(C),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
686
686
  void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!C.length||z)C=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(C),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.zd:"")+" - "+(B?B.zd:"");G&&J&&K.length&&L.length&&!(0<Fg(K,L).length)||a.na.has(H)||(G={id:a.Ba++,language:G?G.language:"und",primary:!!G&&G.primary||
687
687
  !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.na.add(H))}}y=x.call(y,z)}else y=y["return"]([]);return y})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
688
- function xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x;return M(function(w){if(1==w.g)return d=Nb,e=ur(a,b),f=Jq(b,"AUDIO"),g=Jq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Kq(b,"URI"),t=l.audio.find(function(C){return C&&C.zd==p}),v=Kb(d.fb,e),(y=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&y&&v?(m=d.fb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length&&!l.audio.length?d.Gb:d.fb,n?w.D(2):A(w,yr(a,b,e,m,c),3);2!=w.g&&(x=w.h);if(x)l[x.stream.type]=[x];else if(null===
688
+ function xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x;return M(function(w){if(1==w.g)return d=Nb,e=ur(a,b),f=Jq(b,"AUDIO"),g=Jq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Kq(b,"URI"),t=l.audio.find(function(C){return C&&C.zd==p}),v=Kb(d.gb,e),(y=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&y&&v?(m=d.gb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length&&!l.audio.length?d.Gb:d.gb,n?w.D(2):A(w,yr(a,b,e,m,c),3);2!=w.g&&(x=w.h);if(x)l[x.stream.type]=[x];else if(null===
689
689
  x)return w["return"](null);zr(l);return w["return"](l)})}function ur(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Jq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Ar(a){a=Jq(a,"LANGUAGE")||"und";return Qb(a)}
690
690
  function zr(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function pr(a,b){var c=Oq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Ar(e);var f=Kq(e,"GROUP-ID");e=Kq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
691
691
  function vr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(x){if(1==x.g){c=Kq(b,"GROUP-ID");d="";var w=Kq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Mb);e=w;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=Br(Kq(b,"URI"),a.A);if(a.h.has(f))return x["return"](a.h.get(f));g=Ar(b);h=Jq(b,"NAME");k=Jq(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Jq(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Jq(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Jq(b,"CHARACTERISTICS");t=Jq(b,"FORCED");
@@ -712,7 +712,7 @@ Promise.all(v),3);case 3:return y=z.h,x=y[0],w=y[1]||y[0],z["return"](Rr(b,x.uri
712
712
  function Rr(a,b,c,d){var e=0;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).V("mdhd",function(h){e=gi(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new Qg).box("moof",Ug).box("traf",Ug).V("tfdt",function(h){f=fi(h.reader,h.version).Ud/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
713
713
  function Sr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.xf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new Ng(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.lc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
714
714
  f.lc();var l=f.lc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Br(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
715
- function Fr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(x){if(1==x.g){f=Nb;g=mf;h=Br(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Tr[b];if(n=m[l])return x["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.xc&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=ff([h],a.g.retryParameters);p.method="HEAD";return A(x,Qr(a,p,g),2)}t=x.h;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
715
+ function Fr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(x){if(1==x.g){f=Nb;g=mf;h=Br(d.segments[0].h,e);k=new jb(h);l=k.Oa.split(".").pop();m=Tr[b];if(n=m[l])return x["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.xc&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=ff([h],a.g.retryParameters);p.method="HEAD";return A(x,Qr(a,p,g),2)}t=x.h;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
716
716
  function fr(a,b){var c=ff([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Qr(a,c,0)}function dr(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.R(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.R(.1);D(d)})}function lr(a,b){a.m=b;a.j&&a.j.Pc(a.m==er);a.m!=er||a.F.stop()}
717
717
  function Qr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);af(a.H,b);return b.promise}N("shaka.hls.HlsParser",cr);
718
718
  var Gr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Tr={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
@@ -733,7 +733,7 @@ function ys(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a
733
733
  function zs(a,b,c,d){a=vs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
734
734
  function As(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ws(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={vc:h.vc,rc:h.rc},l=k.next())h.rc=l.value,h.vc=e.get(h.rc),h.vc.onsuccess=function(n){return function(){void 0==n.vc.result&&g.push(n.rc);f[n.rc]=n.vc.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Cs(a){this.g=new us(a)}Cs.prototype.destroy=function(){return this.g.destroy()};Cs.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ws(a.g,"session-ids","readonly"),c=[],A(d,ts(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};Cs.prototype.add=function(a){var b=vs(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
735
735
  Cs.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=vs(b.g,"session-ids"),A(d,ts(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):A(d,c.promise(),0)})};function Ds(){this.g=new Map}Ds.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Ds.prototype.init=function(){var a=this;Es.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
736
- function Fs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Gs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
736
+ function Fs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ta:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Gs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ta:d,Da:f},e)})})}
737
737
  function Hs(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Is(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Js(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
738
738
  function Ks(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Es,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ls(a,b){Es.set(a,b)}N("shaka.offline.StorageMuxer",Ds);Ds.unregister=function(a){Es["delete"](a)};Ds.register=Ls;Ds.prototype.destroy=Ds.prototype.destroy;var Es=new Map;function Ms(){xs.apply(this,arguments)}u(Ms,xs);Ms.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=vs(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
739
739
  Ms.prototype.Ac=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Ns(a.periods[c],e),b.push(f);return A(h,Up(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
@@ -751,7 +751,7 @@ new Rs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contain
751
751
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),D(b)}})};
752
752
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
753
753
  q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Vs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
754
- function Vs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Ls("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Us});function Ws(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ws.prototype.Sa=function(){return this.i};Ws.prototype.Da=function(){return this.h};Ws.prototype.key=function(){return this.l};Ws.prototype.toString=function(){return this.j};
754
+ function Vs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Ls("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Us});function Ws(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ws.prototype.Ta=function(){return this.i};Ws.prototype.Da=function(){return this.h};Ws.prototype.key=function(){return this.l};Ws.prototype.toString=function(){return this.j};
755
755
  function Xs(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ws(b,c,d,Number(a[4])):null};function Ys(a,b){this.h=a;this.g=b}
756
756
  function Zs(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=$s(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return at(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return at(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
757
757
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
@@ -760,23 +760,23 @@ e.value,g=at(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.va
760
760
  function at(a,b,c){var d=b.segments.map(function(e){return bt(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new mj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
761
761
  roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function bt(a,b){var c=new Ws("segment",a.h,a.g,b.dataKey);return new Ni(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ct(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
762
762
  function ct(a,b){var c=new Ws("segment",a.h,a.g,b);return new Li(function(){return[c.toString()]},0,null)};function dt(){this.g=null}q=dt.prototype;q.configure=function(){};
763
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Xs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new Ds;ua(m);return A(m,e.init(),4);case 4:return A(m,Hs(e,d.Sa(),d.Da()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ys(d.Sa(),d.Da()),l=Zs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
764
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new Ds,E(m,2,3),A(m,e.init(),5);case 5:return A(m,Hs(e,d.Sa(),d.Da()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
763
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Xs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new Ds;ua(m);return A(m,e.init(),4);case 4:return A(m,Hs(e,d.Ta(),d.Da()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ys(d.Ta(),d.Da()),l=Zs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
764
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new Ds,E(m,2,3),A(m,e.init(),5);case 5:return A(m,Hs(e,d.Ta(),d.Da()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
765
765
  Jg["application/x-offline-manifest"]=function(){return new dt};function et(){}function ft(a){var b=Xs(a);b&&"manifest"==b.g?(a={uri:a,uf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ue(a)):a=b&&"segment"==b.g?gt(b.key(),b):Se(new P(2,1,9004,a));return a}
766
- function gt(a,b){var c=new Ds;return Ue(void 0).qa(function(){return c.init()}).qa(function(){return Hs(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",et);et.plugin=ft;cf("offline",ft);function ht(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,it(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=jt(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
766
+ function gt(a,b){var c=new Ds;return Ue(void 0).qa(function(){return c.init()}).qa(function(){return Hs(c,b.Ta(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",et);et.plugin=ft;cf("offline",ft);function ht(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,it(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=jt(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
767
767
  function jt(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Vf({Qb:b,onError:function(){},rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,cg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),A(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),A(f,ng(d),8);case 8:va(f,7);break;case 6:return I(f),A(f,d.destroy(),
768
768
  9);case 9:return f["return"]([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),A(h,og(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);D(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f["return"](e)}})}
769
- function it(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function kt(a,b,c){var d=b.presentationTimeline.getDuration();b=lt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function mt(a,b){var c=Zs(new Ys(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=lt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
769
+ function it(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function kt(a,b,c){var d=b.presentationTimeline.getDuration();b=lt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function mt(a,b){var c=Zs(new Ys(a.Ta(),a.Da()),b),d=b.appMetadata||{};c=lt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
770
770
  function lt(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function nt(){this.g={}}function ot(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function pt(a,b){a.g[b.id]=b.bandwidth||2048}function qt(a,b){var c=a.g[b];null==c&&(c=0);return c};function rt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ec()):(this.h=dl(),this.g=new bf);this.i=[];this.j=[];var c=!a;this.l=new nf(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return ns(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
771
771
  case 4:b.h=null,b.g=null,D(k)}})})}function st(){if(Tc())a:{var a=r(Es.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=rt.prototype;q.destroy=function(){return this.l.destroy()};
772
772
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=al(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return fl(this.h,a)};q.getConfiguration=function(){var a=dl();fl(a,this.h,dl());return a};q.Ec=function(){return this.g};
773
773
  q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ms(this.g);this.j.push(f);b=tt(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return A(k,Ig(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Re(b,function(){return ns(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
774
774
  return g.promise.then(h)};return ut(this,g)};q.xg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
775
775
  function tt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x,w,C,z;return M(function(B){switch(B.g){case 1:return vt(),h=g=null,k=new Ds,n=m=l=null,E(B,2,3),A(B,d(),5);case 5:return g=B.h,A(B,wt(a,b,g,e),6);case 6:p=B.h;xt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Nb();if(!t)throw new P(2,9,9005,b);return A(B,yt(a,p,function(F){n=n||F},e),7);case 7:h=B.h;xt(a);if(n)throw n;return A(B,zt(p,e),8);case 8:return A(B,k.init(),9);case 9:return xt(a),A(B,Fs(k),10);case 10:return l=B.h,xt(a),v=At(h,
776
- p,b,c,e,f),y=v.Kg,x=v.Fe,A(B,l.Da.addManifests([y]),11);case 11:w=B.h;xt(a);m=w[0];xt(a);if(n)throw n;return A(B,Bt(a,x,m,y,f,e,l.Da,p,h),12);case 12:return xt(a),C=new Ws("manifest",l.path.Sa,l.path.Da,m),B["return"](mt(C,y));case 3:return wa(B),A(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return A(B,g.stop(),14);case 14:if(!h){B.D(16);break}return A(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=I(B);if(null==m){B.D(18);break}return A(B,Ct(m),18);case 18:throw n||z;}})}
776
+ p,b,c,e,f),y=v.Kg,x=v.Fe,A(B,l.Da.addManifests([y]),11);case 11:w=B.h;xt(a);m=w[0];xt(a);if(n)throw n;return A(B,Bt(a,x,m,y,f,e,l.Da,p,h),12);case 12:return xt(a),C=new Ws("manifest",l.path.Ta,l.path.Da,m),B["return"](mt(C,y));case 3:return wa(B),A(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return A(B,g.stop(),14);case 14:if(!h){B.D(16);break}return A(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=I(B);if(null==m){B.D(18);break}return A(B,Ct(m),18);case 18:throw n||z;}})}
777
777
  function Bt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:l={};m=0;n=function(B,F){var G,H,J,K,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(B);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=js(G.Fb,f),L=G.Fb.i,W=G.Fb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return A(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;xt(a);Ma=ja.Fb.g;Da=is(Ma);l[Da]=Ia[0];m+=ea.byteLength;D(Qa)})}}(G),ps(e,G.Fb.groupId,K,L,W,Z);
778
778
  return A(ka,rs(e),2)}if(!F)return ka.D(0);xt(a);Dt(h,d,k,f);return A(ka,g.updateManifest(c,d),0)})};p=!1;E(z,2);if(!Et(h)||!p||Ft(h)){z.D(4);break}return A(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return xt(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,A(z,Gt(g,c,d,t,v,function(){return xt(a)}),6);case 6:xt(a);case 4:if(p){z.D(7);break}return A(z,n(b,!1),8);case 8:return xt(a),y=l,x=m,l={},m=0,A(z,Gt(g,c,d,y,x,function(){return xt(a)}),9);case 9:xt(a);case 7:va(z,0);break;case 2:return w=
779
- I(z),C=Object.values(l),A(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function Ct(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new Ds,A(f,b.init(),2);case 2:return A(f,Fs(b),3);case 3:return c=f.h,d=new Ws("manifest",c.path.Sa,c.path.Da,a),A(f,b.destroy(),4);case 4:return e=new rt,A(f,e.remove(d.toString()),0)}})}
779
+ I(z),C=Object.values(l),A(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function Ct(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new Ds,A(f,b.init(),2);case 2:return A(f,Fs(b),3);case 3:return c=f.h,d=new Ws("manifest",c.path.Ta,c.path.Da,a),A(f,b.destroy(),4);case 4:return e=new rt,A(f,e.remove(d.toString()),0)}})}
780
780
  function Gt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x;return M(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
781
781
  (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=I(w),A(w,Ct(b),5);case 5:if(g){w.D(6);break}x=Object.values(d);return A(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
782
782
  function zt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
@@ -785,16 +785,16 @@ for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),
785
785
  function At(a,b,c,d,e,f){var g=kt(c,b,d),h=e.offline.progressCallback;os(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&mg(a,"cenc",t)});var k=Et(b)&&!Ft(b),l=null;k&&(l=It.get(a.g.keySystem));for(var m=new nt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())pt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())ot(m,n.value);m=Jt(f,m,b);f=m.streams;m=m.Fe;p=a.g;n=e.offline.usePersistentLicense;
786
786
  p&&n&&(p.initData=[]);return{Kg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Dc(),streams:f,sessionIds:n?sg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Fe:m}}function Et(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
787
787
  function Ft(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Dt(a,b,c,d){b.expiration=c.Dc();c=sg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Et(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Kt(this,Lt(this,a))};
788
- function Lt(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:vt();c=Xs(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new Ds;ua(k);return A(k,e.init(),4);case 4:return A(k,Hs(e,d.Sa(),d.Da()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([Mt(a,h,e),Nt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
788
+ function Lt(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:vt();c=Xs(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new Ds;ua(k);return A(k,e.init(),4);case 4:return A(k,Hs(e,d.Ta(),d.Da()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([Mt(a,h,e),Nt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
789
789
  function Ot(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Mt(a,b,c){return M(function(d){return A(d,Pt(a.g,a.h.drm,c,b),0)})}
790
790
  function Nt(a,b,c){function d(){}var e=Qt(c);mt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Yg=function(){return Kt(this,Rt(this))};
791
791
  function Rt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return vt(),b=a.g,c=a.h.drm,d=new Ds,e=!1,ua(n),A(n,d.init(),4);case 4:f=[],Is(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return A(n,k.getAll(),8);case 8:return l=n.h,A(n,ht(c,b,l),9);case 9:return m=n.h,A(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),A(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
792
- q.list=function(){return Kt(this,St())};function St(){var a,b,c;return M(function(d){switch(d.g){case 1:return vt(),a=[],b=new Ds,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),Gs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=mt(new Ws("manifest",e.Sa,e.Da,l),k);a.push(m)});D(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
792
+ q.list=function(){return Kt(this,St())};function St(){var a,b,c;return M(function(d){switch(d.g){case 1:return vt(),a=[],b=new Ds,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),Gs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=mt(new Ws("manifest",e.Ta,e.Da,l),k);a.push(m)});D(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
793
793
  function wt(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),xt(a),A(l,c.start(b,
794
794
  g),2);if(3!=l.g)return h=l.h,xt(a),k=Tt(h),A(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);xt(a);if(e)throw e;return l["return"](h)})}function yt(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Vf({Qb:a.g,onError:c,rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,$f(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,ng(e),3);case 3:return A(f,jg(e),4);case 4:return f["return"](e)}})}
795
795
  function Jt(a,b,c){var d=new Map,e=Tt(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Ut(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Fe:Array.from(d.values())}}
796
796
  function Ut(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
797
- tilesLayout:d.tilesLayout};Vt(d,c.presentationTimeline.mb(),function(g){var h=is(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=qt(b,d.id)*l;l=ls(a.g,l);e.set(h,new hs(g,l,d.id,!1))}g.g&&(k=is(g.g),e.has(k)||(l=.5*qt(b,d.id),l=ls(a.g,l),e.set(k,new hs(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
797
+ tilesLayout:d.tilesLayout};Vt(d,c.presentationTimeline.ob(),function(g){var h=is(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=qt(b,d.id)*l;l=ls(a.g,l);e.set(h,new hs(g,l,d.id,!1))}g.g&&(k=is(g.g),e.has(k)||(l=.5*qt(b,d.id),l=ls(a.g,l),e.set(k,new hs(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
798
798
  pendingSegmentRefId:h,dataKey:0})});return f}function Vt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function xt(a){if(a.l.g)throw new P(2,9,7001);}function vt(){if(!st())throw new P(2,9,9E3);}function Kt(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function ut(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
799
799
  function Qt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
800
800
  function Pt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Js(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ot(d,!1),videoCapabilities:Ot(d,!0)}});return A(h,ht(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
@@ -820,27 +820,27 @@ function Cu(a){var b=this.mediaKeys;b&&b!=a&&Gu(b,null);delete this.mediaKeys;re
820
820
  function Eu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
821
821
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
822
822
  Eu.prototype.createMediaKeys=function(){var a=new Du(this.keySystem);return Promise.resolve(a)};Eu.prototype.getConfiguration=function(){return this.g};function Du(a){this.h=new WebKitMediaKeys(a);this.g=new pf}Du.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Iu(this.h,a)};Du.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
823
- function Gu(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Hu);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Iu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new pf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Ju}u(Iu,cb);q=Iu.prototype;
823
+ function Gu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Hu);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Iu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new pf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Ju}u(Iu,cb);q=Iu.prototype;
824
824
  q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Ku(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
825
825
  Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ku(c,"output-not-allowed");break;default:Ku(c,"internal-error")}});Ku(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
826
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ku(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
826
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ku(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
827
827
  function Ju(){this.size=0;this.g=void 0}q=Ju.prototype;q.forEach=function(a){this.g&&a(this.g,Gg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Gg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Zt(Bu);function Lu(){}function Mu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Nu,window.MediaKeySystemAccess=Ou,navigator.requestMediaKeySystemAccess=Pu,HTMLMediaElement.prototype.setMediaKeys=Qu)}function Pu(a,b){try{var c=new Ou(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
828
828
  function Ru(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(Io(a.initData));this.dispatchEvent(b)}}Wt.PatchedMediaKeysMs=Lu;Lu.install=Mu;
829
829
  function Ou(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
830
830
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
831
831
  Ou.prototype.createMediaKeys=function(){var a=new Nu(this.keySystem);return Promise.resolve(a)};Ou.prototype.getConfiguration=function(){return this.g};function Qu(a){var b=this.mediaKeys;b&&b!=a&&Su(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Su(a,this):Promise.resolve()}function Nu(a){this.h=new MSMediaKeys(a);this.g=new pf}
832
- Nu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Tu(this.h,a)};Nu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Su(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Ru);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
832
+ Nu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Tu(this.h,a)};Nu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Su(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Ru);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
833
833
  function Tu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new pf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Uu}u(Tu,cb);q=Tu.prototype;
834
834
  q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Vu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Vu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
835
835
  function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Vu(c,"output-not-allowed");break;default:Vu(c,"internal-error")}}),Vu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
836
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
836
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
837
837
  function Uu(){this.size=0;this.g=void 0}q=Uu.prototype;q.forEach=function(a){this.g&&a(this.g,Gg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Gg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Zt(Mu);function Wu(){}function Xu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Yu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Zu,window.MediaKeys=$u,window.MediaKeySystemAccess=av)}function Yu(){return Promise.reject(Error("The key system specified is not supported."))}
838
838
  function Zu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Wt.PatchedMediaKeysNop=Wu;Wu.install=Xu;function $u(){throw new TypeError("Illegal constructor.");}$u.prototype.createSession=function(){};$u.prototype.setServerCertificate=function(){};function av(){this.keySystem="";throw new TypeError("Illegal constructor.");}av.prototype.getConfiguration=function(){};av.prototype.createMediaKeys=function(){};Zt(Xu,-10);function bv(){}function cv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)dv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ev;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=fv;window.MediaKeys=gv;window.MediaKeySystemAccess=hv}}
839
839
  function iv(a){var b=dv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ev(a,b){try{var c=new hv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function fv(a){var b=this.mediaKeys;b&&b!=a&&jv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jv(a,this);return Promise.resolve()}Wt.PatchedMediaKeysWebkit=bv;bv.install=cv;
840
840
  function hv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
841
841
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
842
842
  d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}hv.prototype.createMediaKeys=function(){var a=new gv(this.g);return Promise.resolve(a)};hv.prototype.getConfiguration=function(){return this.h};function gv(a){this.l=a;this.h=null;this.g=new pf;this.i=[];this.j=new Map}
843
- function jv(a,b){a.h=b;a.g.qb();var c=dv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=kv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=kv(a,d.sessionId))lv(d,"usable"),
843
+ function jv(a,b){a.h=b;a.g.rb();var c=dv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=kv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=kv(a,d.sessionId))lv(d,"usable"),
844
844
  d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=kv(a,d.sessionId);e&&e.handleError(d)}))}gv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new mv(b,this.l,a);this.i.push(a);return a};gv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
845
845
  function kv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function mv(a,b,c){cb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new nv}u(mv,cb);q=mv.prototype;
846
846
  q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?lv(this,"output-restricted"):1==b?lv(this,"expired"):lv(this,"internal-error"))};
@@ -979,33 +979,33 @@ q.setValue=function(a){this.g||(this.bar.value=a)};function Dx(a,b){b.preventDef
979
979
  Cx.prototype.onChangeStart=Cx.prototype.onChangeStart;Cx.prototype.setRange=Cx.prototype.setRange;function Ex(a,b){Cx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){Fx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Gx(c)});this.eventManager.o(this.localization,
980
980
  "locale-changed",function(){return Gx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Hx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Hx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ix(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ix(c)});this.setValue(this.video.currentTime);this.update();Gx(this);this.ad&&X(this.container,!1)}u(Ex,Cx);q=Ex.prototype;
981
981
  q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Cx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ae(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Ae(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
982
- q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Hx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
982
+ q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ma(),g=f.end-f.start;this.setRange(f.start,f.end);Hx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
983
983
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
984
- function Fx(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
985
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Ix(a){Fx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Hx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Gx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Ex);function Jx(){}
986
- Jx.prototype.create=function(a,b){return new Ex(a,b)};Ex.Factory=Jx;function Y(a,b,c,d){cb.call(this);var e=this;this.X=!0;this.i=d;this.B=new ao(c,a,this.i.castReceiverAppId);this.gb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.bc();this.Ba=a;this.j=b;this.Wa=this.F.cd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.ib=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.ib=!1;Kx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Ob()&&
987
- Lx(e)});this.J=null;this.H=[];this.Ca=Mx();this.h=new pf;this.configure(this.i);Nx(this);this.na=new Set;Ox(this);this.Oa.ha(.125);this.h.o(this.Ca,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
988
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Px(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Ba){b.D(6);break}return A(b,a.Ba.destroy(),7);case 7:a.Ba=
989
- null;case 6:a.F=null,a.C=null,a.A=null,a.Ca=null,a.na.clear(),cb.prototype.release.call(a),D(b)}})};function Px(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Qx(a,b){Rx.set(a,b)}q.Pf=function(a){this.gb=a;Ox(this)};q.Jg=function(){Kx(this)};
990
- q.configure=function(a){this.i=a;this.B.Ve(a.castReceiverAppId);this.m&&(this.m=null);this.eb&&(this.eb=null);this.Xa&&(this.Xa=null);this.g?(uk(this.g),Px(this)):(Sx(this),Tx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Ux(this);this.i.addBigPlayButton&&Vx(this);this.i.customContextMenu&&(this.Xa=new yx(this.Z,this),this.H.push(this.Xa));this.ba||Wx(this);this.hb=S("div");this.hb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.hb);
984
+ function Fx(a){if(a.i.length){for(var b=a.player.Ma(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
985
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Ix(a){Fx(a);var b=a.player.Ma();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Hx(a){var b=a.player.Ma();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Gx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Ex);function Jx(){}
986
+ Jx.prototype.create=function(a,b){return new Ex(a,b)};Ex.Factory=Jx;function Y(a,b,c,d){cb.call(this);var e=this;this.X=!0;this.i=d;this.B=new ao(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.bc();this.Ba=a;this.j=b;this.Xa=this.F.cd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Kx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Pa=new Q(function(){e.Ob()&&
987
+ Lx(e)});this.J=null;this.H=[];this.Ca=Mx();this.h=new pf;this.configure(this.i);Nx(this);this.na=new Set;Ox(this);this.Pa.ha(.125);this.h.o(this.Ca,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
988
+ q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Pa&&(a.Pa.stop(),a.Pa=null);Px(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Ba){b.D(6);break}return A(b,a.Ba.destroy(),7);case 7:a.Ba=
989
+ null;case 6:a.F=null,a.C=null,a.A=null,a.Ca=null,a.na.clear(),cb.prototype.release.call(a),D(b)}})};function Px(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Qx(a,b){Rx.set(a,b)}q.Pf=function(a){this.hb=a;Ox(this)};q.Jg=function(){Kx(this)};
990
+ q.configure=function(a){this.i=a;this.B.Ve(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(uk(this.g),Px(this)):(Sx(this),Tx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Ux(this);this.i.addBigPlayButton&&Vx(this);this.i.customContextMenu&&(this.Ya=new yx(this.Z,this),this.H.push(this.Ya));this.ba||Wx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
991
991
  Xx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Yx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Kx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
992
992
  q.we=function(a){(this.X=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Kx(this)};q.Cf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.we(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.B};q.ng=function(){return this.Ca};q.Dg=function(){return this.j};q.Bb=function(){return this.A};q.mg=function(){return this.C};q.bc=function(){return this.F};q.lg=function(){return this.Ba};q.gg=function(){return this.g};
993
- q.wg=function(){return this.hb};q.dg=function(){return this.S};q.eg=function(){return this.i};q.Ig=function(){return this.$};q.Ae=function(a){this.$=a};q.Gg=function(){return this.gb};q.ef=function(){return this.m?this.m.getValue():this.A.currentTime};q.Df=function(a){this.J=a};q.Xc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.Aa()};
993
+ q.wg=function(){return this.ib};q.dg=function(){return this.S};q.eg=function(){return this.i};q.Ig=function(){return this.$};q.Ae=function(a){this.$=a};q.Gg=function(){return this.hb};q.ef=function(){return this.m?this.m.getValue():this.A.currentTime};q.Df=function(a){this.J=a};q.Xc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.Aa()};
994
994
  q.Ge=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),A(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return A(c,document.exitPictureInPicture(),6);case 6:return A(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return A(c,screen.orientation.lock("landscape"),12);case 12:va(c,
995
995
  9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Ff=function(){X(this.K,!0);X(this.S,!0);this.g.setAttribute("ad-active","true")};q.jf=function(){X(this.K,!1);X(this.S,!1);this.g.removeAttribute("ad-active")};function wx(a){a.X&&a.A.duration&&(a.F.Se(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function vx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
996
996
  function Sx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Ob()?a.J=Date.now():(Zx(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){$x(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Ge()})}
997
- function Vx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.eb=new xx(b,a);a.H.push(a.eb)}function Ux(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function ay(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new sx(a.K,a);a.H.push(b);b=new rx(a.K,a);a.H.push(b)}
997
+ function Vx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new xx(b,a);a.H.push(a.fb)}function Ux(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function ay(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new sx(a.K,a);a.H.push(b);b=new rx(a.K,a);a.H.push(b)}
998
998
  function Wx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
999
999
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
1000
1000
  function Xx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.dc()});ay(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={sc:b.sc},d=c.next())d=
1001
1001
  d.value,Rx.get(d)?(d=Rx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.sc=d,b.sc.release=function(e){return function(){e.sc.destroy&&e.sc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Yx(a){if(a.i.addSeekBar)a.m=by.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
1002
1002
  function Tx(a){a.S=S("div");a.S.classList.add("shaka-client-side-ad-container");X(a.S,!1);a.h.o(a.S,"click",function(){$x(a)});a.j.appendChild(a.S)}
1003
1003
  function Nx(a){a.h.o(a.F,"buffering",function(){a.X&&X(a.ba,a.F.Jc())});a.X&&X(a.ba,a.F.Jc());a.h.o(window,"keydown",function(b){cy(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.A,"play",function(){Kx(a)});a.h.o(a.A,"pause",function(){Kx(a)});a.h.o(a.j,"mousemove",function(b){Zx(a,b)});a.h.o(a.j,"touchmove",function(b){Zx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Zx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.Aa()});
1004
- a.h.o(a.B,"caststatuschanged",function(){Ox(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Zx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()+5));break;case "Home":a.m&&dy(a,a.F.La().start);break;
1005
- case "End":a.m&&dy(a,a.F.La().end);break;case " ":e&&ey(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.jf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,fy(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1004
+ a.h.o(a.B,"caststatuschanged",function(){Ox(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Zx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()+5));break;case "Home":a.m&&dy(a,a.F.Ma().start);break;
1005
+ case "End":a.m&&dy(a,a.F.Ma().end);break;case " ":e&&ey(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Xa,"ad-stopped",function(){a.l=null;a.jf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,fy(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1006
1006
  function fy(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation&&document.fullscreenEnabled?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?A(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?A(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
1007
- function Zx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Kx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Ob()||(Lx(a),Kx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.R(3))}function gy(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1008
- function Kx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.ib||d||gy(a)?(Lx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.R(a.i.fadeDelay)}function $x(a){a.X&&(a.Xc()?a.I.Aa():a.i.singleClickForPlayAndPause&&ey(a))}function ey(a){a.l&&a.l.isLinear()?vx(a):wx(a)}
1007
+ function Zx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Kx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Ob()||(Lx(a),Kx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.R(3))}function gy(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1008
+ function Kx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||gy(a)?(Lx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.R(a.i.fadeDelay)}function $x(a){a.X&&(a.Xc()?a.I.Aa():a.i.singleClickForPlayAndPause&&ey(a))}function ey(a){a.l&&a.l.isLinear()?vx(a):wx(a)}
1009
1009
  function Ox(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ob=function(){return this.X?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function dy(a,b){a.m.changeTo(b);a.Ob()&&Lx(a)}
1010
1010
  function Lx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1011
1011
  function cy(a,b){a.na.add(b.key);var c=a.Xc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Kx(a),a.h.o(window,"mousedown",function(){a.h.pc(window,"mousedown")}));"Escape"==b.key&&a.I.Aa();c&&a.na.has("Tab")&&hy(a,b)}
@@ -1088,17 +1088,17 @@ case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for
1088
1088
  function xy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1089
1089
  function zy(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new ty(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.Cf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1090
1090
  k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return A(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",ty);ty.prototype.setEnabled=ty.prototype.ih;ty.prototype.getControls=ty.prototype.fg;ty.prototype.configure=ty.prototype.configure;ty.prototype.getConfiguration=ty.prototype.getConfiguration;ty.prototype.isMobile=ty.prototype.Xd;ty.prototype.destroy=ty.prototype.destroy;var vy=0;
1091
- ty.TrackLabelFormat={LANGUAGE:vy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var yy=0,Ay=1;ty.FailReasonCode={NO_BROWSER_SUPPORT:yy,PLAYER_FAILED_TO_LOAD:Ay};"complete"==document.readyState?M(function(a){if(1==a.g)return A(a,Promise.resolve(),2);wy();D(a)}):window.addEventListener("load",wy);function By(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=mx(b);uk(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ua:n.Ua},p=a.next()){n.Ua=p.value;p=n.Ua.language;var t=
1092
- n.Ua.forced,v=f.resolve(dc.Kf),y=k(n.Ua),x=h(p,y);if(!m.has(x)){m.add(x);var w=tk();w.addEventListener("click",function(z){return function(){c(z.Ua)}}(n));var C=S("span");w.appendChild(C);C.textContent=Cy(p,f);switch(g){case vy:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Sa("Track #"+n.Ua.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1093
- break;case 3:n.Ua.label?C.textContent=n.Ua.label:(Sa("Track #"+n.Ua.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(px()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1091
+ ty.TrackLabelFormat={LANGUAGE:vy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var yy=0,Ay=1;ty.FailReasonCode={NO_BROWSER_SUPPORT:yy,PLAYER_FAILED_TO_LOAD:Ay};"complete"==document.readyState?M(function(a){if(1==a.g)return A(a,Promise.resolve(),2);wy();D(a)}):window.addEventListener("load",wy);function By(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=mx(b);uk(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Va:n.Va},p=a.next()){n.Va=p.value;p=n.Va.language;var t=
1092
+ n.Va.forced,v=f.resolve(dc.Kf),y=k(n.Va),x=h(p,y);if(!m.has(x)){m.add(x);var w=tk();w.addEventListener("click",function(z){return function(){c(z.Va)}}(n));var C=S("span");w.appendChild(C);C.textContent=Cy(p,f);switch(g){case vy:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Sa("Track #"+n.Va.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1093
+ break;case 3:n.Va.label?C.textContent=n.Va.label:(Sa("Track #"+n.Va.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(px()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1094
1094
  function Cy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in ix?ix[a].s:c in ix?ix[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Dy(a,b,c){V.call(this,a,b);var d=this;Ey(this,c);Fy(this);Gy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),ox(d.menu)):X(d.menu,!1)})}u(Dy,V);
1095
1095
  function Ey(a,b){a.button=tk();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1096
1096
  function Fy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=tk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1097
- S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Gy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);fb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Kx(a.controls)}))}N("shaka.ui.SettingsMenu",Dy);function Hy(a,b){Dy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);Jy(c)});this.eventManager.o(this.player,"variantchanged",
1098
- function(){Jy(c)});Iy(this);Jy(this)}u(Hy,Dy);function Jy(a){var b=a.player.Za();By(b,a.menu,function(c){a.player.xd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);ox(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1097
+ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Gy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);fb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Kx(a.controls)}))}N("shaka.ui.SettingsMenu",Dy);function Hy(a,b){Dy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.$a().length;X(c.button,d);Jy(c)});this.eventManager.o(this.player,"variantchanged",
1098
+ function(){Jy(c)});Iy(this);Jy(this)}u(Hy,Dy);function Jy(a){var b=a.player.$a();By(b,a.menu,function(c){a.player.xd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);ox(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1099
1099
  function Iy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",Hy);function Ky(){}Ky.prototype.create=function(a,b){return new Hy(a,b)};my("language",new Ky);Qx("language",new Ky);function Ly(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=tk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1100
1100
  d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);My(this);Ny(this);this.eventManager.o(this.localization,"locale-updated",function(){My(c)});this.eventManager.o(this.localization,"locale-changed",function(){My(c)});this.eventManager.o(this.g,"click",function(){Oy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Ny(c)})}u(Ly,V);
1101
- function Oy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Gf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));D(c)})}function Ny(a){var b=a.h.Re()&&a.controls.gb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Py(a)}
1101
+ function Oy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Gf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));D(c)})}function Ny(a){var b=a.h.Re()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Py(a)}
1102
1102
  function Py(a){a.j.textContent=a.h.ra()?a.h.vd():a.localization.resolve("OFF")}function My(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Py(a)}N("shaka.ui.CastButton",Ly);function Qy(){}Qy.prototype.create=function(a,b){return new Ly(a,b)};my("cast",new Qy);Qx("cast",new Qy);function Ry(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Sy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});
1103
1103
  this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ie(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Ry,V);function Sy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Ry);function Ty(){}Ty.prototype.create=function(a,b){return new Ry(a,b)};Qx("fast_forward",new Ty);function Uy(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Vy(this);this.eventManager.o(this.localization,"locale-updated",function(){Vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vy(c)});this.eventManager.o(this.g,
1104
1104
  "click",function(){return M(function(d){return A(d,c.controls.Ge(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Vy(c)})}u(Uy,V);function Vy(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Uy);function Wy(){}Wy.prototype.create=function(a,b){return new Uy(a,b)};Qx("fullscreen",new Wy);function Xy(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
@@ -1113,10 +1113,10 @@ function ez(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.
1113
1113
  function gz(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.mf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",dz);function hz(){}hz.prototype.create=function(a,b){return new dz(a,b)};my("picture_in_picture",new hz);Qx("picture_in_picture",new hz);Ax("picture_in_picture",new hz);function iz(a,b){Dy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){jz(c)});this.eventManager.o(this.localization,"locale-changed",function(){jz(c)});this.eventManager.o(this.player,"ratechange",function(){kz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1114
1114
  "x",d]}));jz(this);lz(this);kz(this,this.player.Ab())}u(iz,Dy);function jz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1115
1115
  function kz(a,b){var c=nx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(px()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1116
- "x")}function lz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={tc:b.tc},d=c.next()){b.tc=d.value;d=tk();var e=S("span");e.textContent=b.tc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.tc);a.video.defaultPlaybackRate=a.g.get(f.tc)}}(b));a.menu.appendChild(d)}ox(a.menu)}N("shaka.ui.PlaybackRateSelection",iz);function mz(){}mz.prototype.create=function(a,b){return new iz(a,b)};my("playback_rate",new mz);Qx("playback_rate",new mz);function nz(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-current-time");oz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.ef(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(oz(c,"- "+qx(e,f)),c.g.disabled=
1116
+ "x")}function lz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={tc:b.tc},d=c.next()){b.tc=d.value;d=tk();var e=S("span");e.textContent=b.tc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.tc);a.video.defaultPlaybackRate=a.g.get(f.tc)}}(b));a.menu.appendChild(d)}ox(a.menu)}N("shaka.ui.PlaybackRateSelection",iz);function mz(){}mz.prototype.create=function(a,b){return new iz(a,b)};my("playback_rate",new mz);Qx("playback_rate",new mz);function nz(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-current-time");oz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ma().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.ef(),f=c.video.duration,g=c.player.Ma(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(oz(c,"- "+qx(e,f)),c.g.disabled=
1117
1117
  !1):(oz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=qx(e,d),f&&(e+=" / "+qx(f,d)),oz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(nz,V);function oz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",nz);function pz(){}pz.prototype.create=function(a,b){return new nz(a,b)};Qx("time_and_duration",new pz);function qz(a,b){Dy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c)});this.eventManager.o(this.player,"variantchanged",function(){sz(c)});this.eventManager.o(this.player,"trackschanged",function(){sz(c)});this.eventManager.o(this.player,
1118
1118
  "abrstatuschanged",function(){sz(c)});sz(this);rz(this)}u(qz,Dy);
1119
- function sz(a){var b=a.player.Za();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=mx(a.menu);uk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1119
+ function sz(a){var b=a.player.$a();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=mx(a.menu);uk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1120
1120
  {wc:e.wc},g=f.next()){e.wc=g.value;g=tk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.wc;a.player.configure({abr:{enabled:!1}});a.player.ue(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.wc.height+"p";g.appendChild(h);d||e.wc!=c||(g.ariaSelected="true",g.appendChild(px()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=tk();e.classList.add("shaka-enable-abr-button");
1121
1121
  a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});sz(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(px()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);ox(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1122
1122
  function rz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",qz);function tz(){}
@@ -1133,9 +1133,9 @@ function Gz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.n
1133
1133
  Hz.prototype.create=function(a,b){return new Ez(a,b)};my("statistics",new Hz);Ax("statistics",new Hz);function Iz(a,b){Dy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Pb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Jz(this);this.eventManager.o(this.localization,"locale-updated",function(){Kz(c);Lz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Kz(c);Lz(c)});this.eventManager.o(this.player,
1134
1134
  "texttrackvisibility",function(){Mz(c);Lz(c)});this.eventManager.o(this.player,"textchanged",function(){Lz(c)});this.eventManager.o(this.player,"trackschanged",function(){Nz(c)});Mz(this);Kz(this);Lz(this);Nz(this)}u(Iz,Dy);function Jz(a){var b=tk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(px());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1135
1135
  function Mz(a){a.player.Pb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1136
- function Lz(a){var b=a.player.ob();By(b,a.menu,function(c){return Oz(a,c)},a.player.Pb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=tk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ce(!1);Lz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Pb()||(b.ariaSelected="true",b.appendChild(px()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1136
+ function Lz(a){var b=a.player.pb();By(b,a.menu,function(c){return Oz(a,c)},a.player.Pb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=tk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ce(!1);Lz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Pb()||(b.ariaSelected="true",b.appendChild(px()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1137
1137
  a.currentSelection.textContent);ox(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Oz(a,b){return M(function(c){a.player.se(b);return A(c,a.player.Ce(!0),0)})}function Kz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1138
- function Nz(a){var b=0<a.player.ob().length;X(a.button,b);Lz(a)}N("shaka.ui.TextSelection",Iz);function Pz(){}Pz.prototype.create=function(a,b){return new Iz(a,b)};my("captions",new Pz);Qx("captions",new Pz);function Qz(a,b){Cx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Rz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Sz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Sz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Rz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Tz(c)});
1138
+ function Nz(a){var b=0<a.player.pb().length;X(a.button,b);Lz(a)}N("shaka.ui.TextSelection",Iz);function Pz(){}Pz.prototype.create=function(a,b){return new Iz(a,b)};my("captions",new Pz);Qx("captions",new Pz);function Qz(a,b){Cx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Rz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Sz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Sz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Rz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Tz(c)});
1139
1139
  this.eventManager.o(this.localization,"locale-changed",function(){return Tz(c)});Rz(this);Tz(this);if(this.ad)this.onChange()}u(Qz,Cx);Qz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Rz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Uz(a)}function Sz(a){var b=a.ad.getVolume();a.setValue(b);Uz(a)}
1140
1140
  function Uz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Tz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Qz);function Vz(){}Vz.prototype.create=function(a,b){return new Qz(a,b)};Qx("volume",new Vz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1141
1141