shaka-player 4.12.0 → 4.12.1

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.
@@ -70,10 +70,10 @@ var ob=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
70
70
  Copyright 2006 The Closure Library Authors
71
71
  SPDX-License-Identifier: Apache-2.0
72
72
  */
73
- function pb(a){var b;a instanceof pb?(qb(this,a.Yb),this.Xc=a.Xc,rb(this,a.bc),sb(this,a.ud),this.mb=a.mb,tb(this,a.g.clone()),this.Hc=a.Hc):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Xc=ub(b[2]||""),rb(this,b[3]||"",!0),sb(this,b[4]),this.mb=ub(b[5]||"",!0),tb(this,b[6]||"",!0),this.Hc=ub(b[7]||"")):this.g=new vb(null)}q=pb.prototype;q.Yb="";q.Xc="";q.bc="";q.ud=null;q.mb="";q.Hc="";
74
- q.toString=function(){var a=[],b=this.Yb;b&&a.push(wb(b,yb,!0),":");if(b=this.bc){a.push("//");var c=this.Xc;c&&a.push(wb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ud;null!=b&&a.push(":",String(b))}if(b=this.mb)this.bc&&"/"!=b.charAt(0)&&a.push("/"),a.push(wb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hc)&&a.push("#",wb(b,Bb));return a.join("")};
75
- q.resolve=function(a){var b=this.clone();"data"===b.Yb&&(b=new pb);var c=!!a.Yb;c?qb(b,a.Yb):c=!!a.Xc;c?b.Xc=a.Xc:c=!!a.bc;c?rb(b,a.bc):c=null!=a.ud;var d=a.mb;if(c)sb(b,a.ud);else if(c=!!a.mb){if("/"!=d.charAt(0))if(this.bc&&!this.mb)d="/"+d;else{var e=b.mb.lastIndexOf("/");-1!=e&&(d=b.mb.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(""):".."==
76
- 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.mb=d:c=""!==a.g.toString();c?tb(b,a.g.clone()):c=!!a.Hc;c&&(b.Hc=a.Hc);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Yb=c?ub(b,!0):b;a.Yb&&(a.Yb=a.Yb.replace(/:$/,""))}function rb(a,b,c){a.bc=c?ub(b,!0):b}function sb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ud=b}else a.ud=null}
73
+ function pb(a){var b;a instanceof pb?(qb(this,a.Yb),this.Yc=a.Yc,rb(this,a.bc),sb(this,a.ud),this.mb=a.mb,tb(this,a.g.clone()),this.Jc=a.Jc):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Yc=ub(b[2]||""),rb(this,b[3]||"",!0),sb(this,b[4]),this.mb=ub(b[5]||"",!0),tb(this,b[6]||"",!0),this.Jc=ub(b[7]||"")):this.g=new vb(null)}q=pb.prototype;q.Yb="";q.Yc="";q.bc="";q.ud=null;q.mb="";q.Jc="";
74
+ q.toString=function(){var a=[],b=this.Yb;b&&a.push(wb(b,yb,!0),":");if(b=this.bc){a.push("//");var c=this.Yc;c&&a.push(wb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ud;null!=b&&a.push(":",String(b))}if(b=this.mb)this.bc&&"/"!=b.charAt(0)&&a.push("/"),a.push(wb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Jc)&&a.push("#",wb(b,Bb));return a.join("")};
75
+ q.resolve=function(a){var b=this.clone();"data"===b.Yb&&(b=new pb);var c=!!a.Yb;c?qb(b,a.Yb):c=!!a.Yc;c?b.Yc=a.Yc:c=!!a.bc;c?rb(b,a.bc):c=null!=a.ud;var d=a.mb;if(c)sb(b,a.ud);else if(c=!!a.mb){if("/"!=d.charAt(0))if(this.bc&&!this.mb)d="/"+d;else{var e=b.mb.lastIndexOf("/");-1!=e&&(d=b.mb.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(""):".."==
76
+ 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.mb=d:c=""!==a.g.toString();c?tb(b,a.g.clone()):c=!!a.Jc;c&&(b.Jc=a.Jc);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Yb=c?ub(b,!0):b;a.Yb&&(a.Yb=a.Yb.replace(/:$/,""))}function rb(a,b,c){a.bc=c?ub(b,!0):b}function sb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ud=b}else a.ud=null}
77
77
  function tb(a,b,c){b instanceof vb?a.g=b:(c||(b=wb(b,Cb)),a.g=new vb(b))}function ub(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function wb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[#\?:]/g,zb=/[#\?]/g,Cb=/[#\?@]/g,Bb=/#/g;function vb(a){this.g=a||null}
78
78
  function Eb(a){if(!a.hb&&(a.hb={},a.Hd=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=vb.prototype;q.hb=null;q.Hd=null;function Fb(a){Eb(a);return a.Hd}q.add=function(a,b){Eb(this);this.g=null;var c=this.hb.hasOwnProperty(a)?this.hb[a]:null;c||(this.hb[a]=c=[]);c.push(b);this.Hd++;return this};
79
79
  q.set=function(a,b){Eb(this);this.g=null;this.hb.hasOwnProperty(a)?this.hb[a]=[b]:this.add(a,b);return this};q.get=function(a){Eb(this);return this.hb[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.hb)return"";var a=[],b;for(b in this.hb)for(var c=encodeURIComponent(b),d=this.hb[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -88,7 +88,7 @@ DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPOR
88
88
  AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,
89
89
  LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
90
90
  ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,
91
- MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:4001};function Qb(a){this.h=a;this.g=void 0}Qb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Sb(a,b){return a.length&&b.length&&a!==b?0<Tb(a,b).length:!0}
91
+ MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Qb(a){this.h=a;this.g=void 0}Qb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Sb(a,b){return a.length&&b.length&&a!==b?0<Tb(a,b).length:!0}
92
92
  function Tb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
93
93
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
94
94
  function Ub(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Vb=new Qb(function(){return Kb(new Uint8Array([0]))}),Wb=new Map;function Xb(a){this.h=a;this.g=null}Xb.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Xb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Yb(a){this.h=a;this.g=null}Yb.prototype.Ra=function(){this.stop();this.h();return this};Yb.prototype.Y=function(a){var b=this;this.stop();this.g=(new Xb(function(){b.h()})).Y(a);return this};Yb.prototype.Aa=function(a){var b=this;this.stop();this.g=(new Xb(function(){b.g.Y(a);b.h()})).Y(a);return this};Yb.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Yb);Yb.prototype.stop=Yb.prototype.stop;Yb.prototype.tickEvery=Yb.prototype.Aa;
@@ -114,7 +114,7 @@ function Nc(a){var b=Jb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
114
114
  function Qc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
115
115
  function Rc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Kc(Mc(h),!1));var l=g;22!=l.length&&(l=Kc(Mc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Jb(Ec(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
116
116
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Sc(a,b){if(1==b.length)return b[0];a=Uc(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function Uc(a,b){for(var c=t(Vc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Wc?"":null}
117
- function Xc(a,b){var c=[];a=t(Vc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Wc="text",Yc={xa:"video",ia:"audio",Oa:Wc,Ff:"image",Wk:"application"},Zc=1/15,Vc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function $c(){}function ad(a,b){a=bd(a);b=bd(b);return a.split("-")[0]==b.split("-")[0]}function cd(a,b){a=bd(a);b=bd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function dd(a,b){a=bd(a);b=bd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
117
+ function Xc(a,b){var c=[];a=t(Vc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Wc="text",Yc={xa:"video",ia:"audio",Oa:Wc,Ef:"image",Wk:"application"},Zc=1/15,Vc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function $c(){}function ad(a,b){a=bd(a);b=bd(b);return a.split("-")[0]==b.split("-")[0]}function cd(a,b){a=bd(a);b=bd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function dd(a,b){a=bd(a);b=bd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
118
118
  function bd(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=fd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function gd(a,b){var c=hd(a),d=hd(b);return a!=c&&b!=d&&c==d}function id(a,b){a=bd(a);b=bd(b);return b==a?4:cd(b,a)?3:dd(b,a)?2:cd(a,b)?1:0}
119
119
  function hd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=fd.get(a)||a}function jd(a){return a.language?bd(a.language):a.audio&&a.audio.language?bd(a.audio.language):a.video&&a.video.language?bd(a.video.language):"und"}
120
120
  function kd(a,b){a=bd(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(bd(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,cd(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,dd(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,cd(a,b))return b;return null}S("shaka.util.LanguageUtils",$c);$c.findClosestLocale=kd;$c.getLocaleForVariant=jd;
@@ -126,11 +126,11 @@ var fd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
126
126
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
127
127
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ld(a){jb.call(this);this.j=bd(a);this.i=new Map;this.g=new Set;this.h=new Map}na(ld,jb);q=ld.prototype;q.release=function(){jb.prototype.release.call(this)};
128
128
  q.yh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(bd(c.value));md(this);a=nb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=nb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))};
129
- q.Qa=function(a,b,c){a=bd(a);void 0===c&&(c=od);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=od||d.set(f,e)});this.h.set(a,d);md(this);this.dispatchEvent(new T("locale-updated"));return this};q.Ak=function(a){for(var b=t(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 T("unknown-localization",a));return""};
129
+ q.Qa=function(a,b,c){a=bd(a);void 0===c&&(c=nd);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=nd||d.set(f,e)});this.h.set(a,d);md(this);this.dispatchEvent(new T("locale-updated"));return this};q.Ak=function(a){for(var b=t(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 T("unknown-localization",a));return""};
130
130
  q.lj=function(){return this.g};
131
131
  function md(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={Td:void 0},g=f.next()){h.Td=g.value;e.add(h.Td);e.add(hd(h.Td));g=nb(b.keys(),function(l){return function(m){return gd(m,l.Td)}}(h));g.sort();g=t(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=nb(b.keys(),function(l){return function(m){return hd(m)==l.Td}}(h));h.sort();h=t(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=t(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
132
132
  c.reverse();a.i.clear();b=t(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,pd(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function pd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",ld);ld.prototype.getCurrentLocales=ld.prototype.lj;
133
- ld.prototype.resolve=ld.prototype.resolve;ld.prototype.resolveDictionary=ld.prototype.Ak;ld.prototype.insert=ld.prototype.Qa;ld.prototype.changeLocale=ld.prototype.yh;ld.prototype.release=ld.prototype.release;var od=1;ld.ConflictResolution={USE_OLD:0,USE_NEW:od};ld.UNKNOWN_LOCALES="unknown-locales";ld.UNKNOWN_LOCALIZATION="unknown-localization";ld.MISSING_LOCALIZATIONS="missing-localizations";ld.LOCALE_CHANGED="locale-changed";ld.LOCALE_UPDATED="locale-updated";function qd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}qd.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function rd(a){return a.h/(1-Math.pow(a.g,a.i))};function sd(){this.h=new qd(2);this.j=new qd(5);this.g=0;this.i=128E3;this.l=16E3}sd.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)};sd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};sd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(rd(this.h),rd(this.j))};function td(){this.g=new ib}q=td.prototype;q.release=function(){this.cb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new ud(a,b,c,d),this.g.push(b,a))};q.sa=function(a,b,c,d){function e(g){f.Na(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Na=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Na(),this.g.remove(b,e))}};
133
+ ld.prototype.resolve=ld.prototype.resolve;ld.prototype.resolveDictionary=ld.prototype.Ak;ld.prototype.insert=ld.prototype.Qa;ld.prototype.changeLocale=ld.prototype.yh;ld.prototype.release=ld.prototype.release;var nd=1;ld.ConflictResolution={USE_OLD:0,USE_NEW:nd};ld.UNKNOWN_LOCALES="unknown-locales";ld.UNKNOWN_LOCALIZATION="unknown-localization";ld.MISSING_LOCALIZATIONS="missing-localizations";ld.LOCALE_CHANGED="locale-changed";ld.LOCALE_UPDATED="locale-updated";function qd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}qd.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function rd(a){return a.h/(1-Math.pow(a.g,a.i))};function sd(){this.h=new qd(2);this.j=new qd(5);this.g=0;this.i=128E3;this.l=16E3}sd.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)};sd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};sd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(rd(this.h),rd(this.j))};function td(){this.g=new ib}q=td.prototype;q.release=function(){this.cb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new ud(a,b,c,d),this.g.push(b,a))};q.sa=function(a,b,c,d){function e(g){f.Na(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Na=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Na(),this.g.remove(b,e))}};
134
134
  q.cb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Na();this.g.g={}}};S("shaka.util.EventManager",td);td.prototype.removeAll=td.prototype.cb;td.prototype.unlisten=td.prototype.Na;td.prototype.listenOnce=td.prototype.sa;td.prototype.listen=td.prototype.o;td.prototype.release=td.prototype.release;function ud(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=vd(a,d);this.target.addEventListener(b,c,this.g)}
135
135
  ud.prototype.Na=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function vd(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 wd(a)?b:b.capture||!1}
136
136
  function wd(a){var b=xd;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}xd=b}return b||!1}var xd=void 0;function yd(a){if(zd.has(a))return zd.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);zd.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),zd.set(a,b),b):!1}function Ad(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var zd=new Map;function Bd(a,b){this.g=a;this.h=b}Bd.prototype.toString=function(){return"v"+this.g+"."+this.h};function Cd(a,b){var c=new Bd(5,0),d=Dd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ed(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Fd(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Dd=null;function Gd(){}Gd.prototype.extract=function(){};Gd.prototype.decode=function(){return[]};Gd.prototype.clear=function(){};Gd.prototype.getStreams=function(){return[]};function Hd(){}Hd.prototype.init=function(){};Hd.prototype.parse=function(){return[]};function Id(){}Id.prototype.init=function(){};Id.prototype.i=function(){};Id.prototype.g=function(){};Id.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Id);function Jd(a){this.l=new Hd;if(a=Kd[a.toLowerCase()])this.l=a();this.h=new Gd;if(a=Ld)this.h=a()}Jd.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Jd.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Jb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
@@ -158,17 +158,17 @@ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].rc=c.slice(1))}return b}
158
158
  function He(a,b){var c=Ge(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ie(a,"t",d.t)),null!==d.n&&(c=Ie(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.rc)&&a[c]?Je(a[c],e,d,pe(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
159
159
  function Ie(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Je(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
160
160
  function Ke(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=ie.has(b)?ie.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ke(d),b.appendChild(c);return b}
161
- function Ne(a){if(!a)return null;var b={tagName:a.tagName,attributes:be(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Ne(c),c.parent=b,b.children.push(c));return b}var he=new Map,ie=new Map;function Oe(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Md;this.position=null;this.positionAlign=Pe;this.size=0;this.textAlign=Re;this.direction=Se;this.writingMode=Te;this.lineInterpretation=Ue;this.line=null;this.lineHeight="";this.lineAlign=Ve;this.displayAlign=We;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Xe;this.fontStyle=Ye;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
162
- "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Gc:32,rows:15}}function Ze(a,b){a=new Oe(a,b,"");a.lineBreak=!0;return a}Oe.prototype.clone=function(){var a=new Oe(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
161
+ function Le(a){if(!a)return null;var b={tagName:a.tagName,attributes:be(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Le(c),c.parent=b,b.children.push(c));return b}var he=new Map,ie=new Map;function Oe(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Md;this.position=null;this.positionAlign=Pe;this.size=0;this.textAlign=Qe;this.direction=Se;this.writingMode=Te;this.lineInterpretation=Ue;this.line=null;this.lineHeight="";this.lineAlign=Ve;this.displayAlign=We;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Xe;this.fontStyle=Ye;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
162
+ "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Ic:32,rows:15}}function Ze(a,b){a=new Oe(a,b,"");a.lineBreak=!0;return a}Oe.prototype.clone=function(){var a=new Oe(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
163
163
  function $e(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(!Td(a.nestedCues,b.nestedCues,$e))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(!Td(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
164
164
  function af(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&bf(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(cf)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
165
165
  (l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=df(c);a.payload="";try{var m=de("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
166
166
  m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())ef(c.value,a,b);else a.payload=Hc(c);else a.payload=Hc(c)}else a.payload=Hc(c)}function bf(a){for(var b=t(Object.entries(ff)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Oe(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gf));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Oe(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
167
167
  function df(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
168
- function ef(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Md;d.position=null;d.size=0;d.textAlign=Re;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=hf(g.backgroundColor,h.backgroundColor),h.color=hf(g.color,h.color),h.fontFamily=hf(g.fontFamily,h.fontFamily),
168
+ function ef(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Md;d.position=null;d.size=0;d.textAlign=Qe;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=hf(g.backgroundColor,h.backgroundColor),h.color=hf(g.color,h.color),h.fontFamily=hf(g.fontFamily,h.fontFamily),
169
169
  h.fontSize=hf(g.fontSize,h.fontSize),h.textShadow=hf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Ze(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=jf;break;case "i":d.fontStyle=kf;break;case "u":d.textDecoration.push(lf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
170
170
  if(f=$d(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(le(a)||1==e.length&&le(e[0]))for(c=oe(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ze(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Hc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())ef(a.value,d,c)}function hf(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Oe);Oe.parseCuePayload=af;Oe.equal=$e;
171
- Oe.prototype.clone=Oe.prototype.clone;var Pe="auto";Oe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Pe};var Re="center",mf={LEFT:"left",RIGHT:"right",CENTER:Re,START:"start",END:"end"};Oe.textAlign=mf;var We="after",nf={BEFORE:"before",CENTER:"center",AFTER:We};Oe.displayAlign=nf;var Se="ltr";Oe.direction={HORIZONTAL_LEFT_TO_RIGHT:Se,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Te="horizontal-tb";Oe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Te,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
171
+ Oe.prototype.clone=Oe.prototype.clone;var Pe="auto";Oe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Pe};var Qe="center",mf={LEFT:"left",RIGHT:"right",CENTER:Qe,START:"start",END:"end"};Oe.textAlign=mf;var We="after",nf={BEFORE:"before",CENTER:"center",AFTER:We};Oe.displayAlign=nf;var Se="ltr";Oe.direction={HORIZONTAL_LEFT_TO_RIGHT:Se,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Te="horizontal-tb";Oe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Te,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
172
172
  var Ue=0;Oe.lineInterpretation={LINE_NUMBER:Ue,PERCENTAGE:1};var Ve="start",of={CENTER:"center",START:Ve,END:"end"};Oe.lineAlign=of;var ff={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Oe.defaultTextColor=ff;var gf={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Oe.defaultTextBackgroundColor=gf;var Xe=400,jf=700;Oe.fontWeight={NORMAL:Xe,BOLD:jf};
173
173
  var Ye="normal",kf="italic",pf={NORMAL:Ye,ITALIC:kf,OBLIQUE:"oblique"};Oe.fontStyle=pf;var lf="underline";Oe.textDecoration={UNDERLINE:lf,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var cf=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function qf(){}qf.prototype.destroy=function(){};function rf(a,b,c){sf[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,cf:b}}function tf(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([uf,vf,wf,xf]),e=d.next();!e.done;e=d.next())if(e=sf[c+"-"+e.value]){var f=e.cf(),g=f.isSupported(a,b);f.destroy();if(g)return e.cf}return null}S("shaka.transmuxer.TransmuxerEngine",qf);qf.findTransmuxer=tf;qf.unregisterTransmuxer=function(a,b){delete sf[a.toLowerCase().split(";")[0]+"-"+b]};
174
174
  qf.registerTransmuxer=rf;qf.prototype.destroy=qf.prototype.destroy;var sf={},xf=1,wf=2,vf=3,uf=4;qf.PluginPriority={FALLBACK:xf,PREFERRED_SECONDARY:wf,PREFERRED:vf,APPLICATION:uf};function yf(){}function zf(a,b){var c=a;b&&!Af.includes(a)&&(c+='; codecs="'+b+'"');return c}function Bf(a,b){b&&(a+='; codecs="'+b+'"');return a}function Cf(a,b,c){var d=zf(a,b);b=Bf(a,b);tf(b)?(a=tf(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
@@ -183,7 +183,7 @@ function Sf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.nex
183
183
  function Tf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Sf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
184
184
  a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",Mf);Mf.prototype.destroy=Mf.prototype.destroy;Mf.findParser=function(a){return Of[a]};Mf.unregisterParser=function(a){delete Of[a]};Mf.registerParser=function(a,b){Of[a]=b};var Of={};function Uf(a,b){return a.concat(b)}function Vf(){}function Xf(a){return null!=a};function Yf(){}
185
185
  function Zf(a,b,c,d,e){if(e.length){var f=a.textStreams;e=t(e);for(var g=e.next(),h={};!g.done;h={jh:void 0},g=e.next())if(h.jh=g.value,g=f.filter(function(w){return function(v){return v.codecs.startsWith(w.jh)||v.mimeType.startsWith(w.jh)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=$f(f,b,c);if(d.length){b=new ib;c=t(f);for(f=c.next();!f.done;f=c.next())f=f.value,b.push(String(f.video.width||0),f);var k=[];b.forEach(function(w,v){w=0;var z=[];v=t(v);for(var y=
186
- v.next(),B={};!y.done;B={zf:void 0},y=v.next())B.zf=y.value,y=d.filter(function(A){return function(C){return A.zf.decodingInfos[0][C]}}(B)).length,y>w?(w=y,z=[B.zf]):y==w&&z.push(B.zf);k.push.apply(k,x(z))});f=k}c=new Set;b=new Set;f=t(f);for(e=f.next();!e.done;e=f.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);f=Array.from(c).sort(function(w,v){return w.bandwidth-v.bandwidth});var l=[];c=new Map;f=t(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=e.language+(e.channelsCount||
186
+ v.next(),B={};!y.done;B={yf:void 0},y=v.next())B.yf=y.value,y=d.filter(function(A){return function(C){return A.yf.decodingInfos[0][C]}}(B)).length,y>w?(w=y,z=[B.yf]):y==w&&z.push(B.yf);k.push.apply(k,x(z))});f=k}c=new Set;b=new Set;f=t(f);for(e=f.next();!e.done;e=f.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);f=Array.from(c).sort(function(w,v){return w.bandwidth-v.bandwidth});var l=[];c=new Map;f=t(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=e.language+(e.channelsCount||
187
187
  0)+(e.audioSamplingRate||0)+e.roles.join(",")+e.label+e.groupId+e.fastSwitching;h=c.get(g)||[];if(h.length){var m=h[h.length-1],n=Gf(m.codecs),p=Gf(e.codecs);n!=p||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),l.push(e.id))}else h.push(e),l.push(e.id);c.set(g,h)}var r={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,av01:.75,"dovi-av1":.7,vvc:.65};f=Array.from(b).sort(function(w,v){if(!w.bandwidth||!v.bandwidth||w.bandwidth==v.bandwidth){if(w.codecs&&v.codecs&&
188
188
  w.codecs!=v.codecs&&w.width==v.width){var z=Gf(w.codecs),y=Gf(v.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return w.width-v.width}return w.bandwidth-v.bandwidth});b=Ad();var u=[];c=new Map;f=t(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=Math.round(e.frameRate||0)+(e.hdr||"")+e.fastSwitching;h=c.get(g)||[];if(h.length){m=h[h.length-1];if(!b&&(n=Gf(m.codecs),p=Gf(e.codecs),n!==p))continue;e.width>m.width||e.height>m.height?(h.push(e),u.push(e.id)):e.width==m.width&&e.height==m.height&&(n=Gf(m.codecs),
189
189
  p=Gf(e.codecs),n!=p||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),u.push(e.id)))}else h.push(e),u.push(e.id);c.set(g,h)}a.variants=a.variants.filter(function(w){var v=w.audio;w=w.video;return v&&!l.includes(v.id)||w&&!u.includes(w.id)?!1:!0})}
@@ -251,14 +251,14 @@ q.request=function(a,b,c){var d=this,e=new Bh;if(this.i){var f=Promise.reject(ne
251
251
  var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Va(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Pj||!d.l||u.fromCache||"HEAD"==b.method||a!=Ih||d.l(u.timeMs,u.data.byteLength,Jh(c));d.H&&d.H(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Ch(n.promise,function(){return n.abort()},e);uh(this.s,f);return f};
252
252
  function Dh(a,b,c,d){function e(h){f=f.Va(function(){c.body&&(c.body=Kb(c.body));return h(b,c,d)})}var f=ph(void 0);a.G&&e(a.G);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Va(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})}
253
253
  function Eh(a,b,c,d,e,f,g,h){a.B&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.u&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.I&&a.I(b,d,c.uris[f],c.uris[f-1]);var k=new pb(c.uris[f]),l=k.Yb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),qb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=yh[l])?l.cf:null;if(!n)return nh(new U(2,1,1E3,k));var p=l.lk,r=null,u=null,w=!1,v=!1,z;return qh(kh(e)).Va(function(){if(a.i)return oh();z=Date.now();var y=0;c.requestStartTime=Date.now();
254
- var B=n(c.uris[f],c,b,function(D,E,F){r&&r.stop();u&&u.Y(C/1E3);a.l&&b==Ih&&(y++,c.packetNumber=y,a.l(D,E,Jh(d),c),m=!0,h.g=F)},function(D){a.j&&a.j(D,c,b);v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime},{minBytesForProgressEvents:a.m});if(!p)return B;var A=c.retryParameters.connectionTimeout;A&&(r=new Yb(function(){w=!0;B.abort()}),r.Y(A/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Yb(function(){w=!0;B.abort()}));return B}).Va(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=
254
+ var B=n(c.uris[f],c,b,function(D,E,F){r&&r.stop();u&&u.Y(C/1E3);a.l&&b==Ih&&(y++,c.packetNumber=y,a.l(D,E,Jh(d),c),m=!0,h.g=F)},function(D){v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.j&&a.j(D,c,b)},{minBytesForProgressEvents:a.m});if(!p)return B;var A=c.retryParameters.connectionTimeout;A&&(r=new Yb(function(){w=!0;B.abort()}),r.Y(A/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Yb(function(){w=!0;B.abort()}));return B}).Va(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=
255
255
  Date.now()-z);var B={response:y,Pj:m};!v&&a.j&&a.j(y.headers,c,b);return B},function(y){r&&r.stop();u&&u.stop();if(a.C){var B=null,A=0;y instanceof U&&(B=y,1001==y.code&&(A=y.data[1]));a.C(c,B,A,w)}if(a.i)return oh();w&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new T("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,Eh(a,b,c,d,e,f,y,h)}throw y;})}
256
256
  function Fh(a,b,c,d){var e=ph(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={ni:void 0},f=a.next())g.ni=f.value,e=e.Va(function(h){return function(){var k=c.response;k.data&&(k.data=Kb(k.data));return(0,h.ni)(b,k,d)}}(g));return e.Va(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Jh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",vh);
257
257
  vh.prototype.request=vh.prototype.request;vh.prototype.destroy=vh.prototype.destroy;vh.makeRequest=Ah;vh.defaultRetryParameters=function(){return jh()};vh.prototype.clearAllResponseFilters=vh.prototype.Ch;vh.prototype.unregisterResponseFilter=vh.prototype.Sk;vh.prototype.registerResponseFilter=vh.prototype.rk;vh.prototype.clearAllRequestFilters=vh.prototype.Bh;vh.prototype.unregisterRequestFilter=vh.prototype.Rk;vh.prototype.registerRequestFilter=vh.prototype.qk;vh.unregisterScheme=function(a){delete yh[a]};
258
258
  vh.registerScheme=wh;vh.prototype.setForceHTTPS=vh.prototype.ah;vh.prototype.setForceHTTP=vh.prototype.$g;function Bh(){this.g=0}vh.NumBytesRemainingClass=Bh;function Ch(a,b,c){mh.call(this,a,b);this.h=c}na(Ch,mh);vh.PendingRequest=Ch;var Ih=1;vh.RequestType={MANIFEST:0,SEGMENT:Ih,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
259
259
  vh.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var xh=3;vh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xh};var yh={};function Kh(a){this.g=!1;this.h=new lh;this.i=a}Kh.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 Lh(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Mh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Nh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Oh(a,b){this.h=Nb(a);this.i=b==Ph;this.g=0}q=Oh.prototype;q.Ha=function(){return this.g<this.h.byteLength};q.Pa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.Z=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Qh();}};q.za=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Qh();}};q.V=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Qh();}};
260
260
  q.ki=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Qh();}};q.vd=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Qh();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Rb=function(a){if(this.g+a>this.h.byteLength)throw Qh();var b=Jb(this.h,this.g,a);this.g+=a;return b};
261
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Qh();this.g+=a};q.Bk=function(a){if(this.g<a)throw Qh();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Qh();this.g=a};q.Sc=function(){for(var a=this.g;this.Ha()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Jb(this.h,a,this.g-a);this.g+=1;return Ac(a)};function Qh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",Oh);Oh.prototype.readTerminatedString=Oh.prototype.Sc;Oh.prototype.seek=Oh.prototype.seek;Oh.prototype.rewind=Oh.prototype.Bk;
261
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Qh();this.g+=a};q.Bk=function(a){if(this.g<a)throw Qh();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Qh();this.g=a};q.Uc=function(){for(var a=this.g;this.Ha()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Jb(this.h,a,this.g-a);this.g+=1;return Ac(a)};function Qh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",Oh);Oh.prototype.readTerminatedString=Oh.prototype.Uc;Oh.prototype.seek=Oh.prototype.seek;Oh.prototype.rewind=Oh.prototype.Bk;
262
262
  Oh.prototype.skip=Oh.prototype.skip;Oh.prototype.readBytes=Oh.prototype.Rb;Oh.prototype.readUint64=Oh.prototype.vd;Oh.prototype.readInt32=Oh.prototype.ki;Oh.prototype.readUint32=Oh.prototype.V;Oh.prototype.readUint16=Oh.prototype.za;Oh.prototype.readUint8=Oh.prototype.Z;Oh.prototype.getLength=Oh.prototype.getLength;Oh.prototype.getPosition=Oh.prototype.Pa;Oh.prototype.hasMoreData=Oh.prototype.Ha;var Ph=1;Oh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ph};function Rh(){this.i=[];this.h=[];this.g=!1}q=Rh.prototype;q.box=function(a,b){a=Sh(a);this.i[a]=Th;this.h[a]=b;return this};q.X=function(a,b){a=Sh(a);this.i[a]=Wh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Oh(a,0);for(this.g=!1;a.Ha()&&!this.g;)this.sd(0,a,b,c)};
263
263
  q.sd=function(a,b,c,d){var e=b.Pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.V(),g=b.V(),h=Xh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Pa()+8>b.getLength()){this.g=!0;return}f=b.vd();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Wh){if(d&&b.Pa()+4>b.getLength()){this.g=!0;return}n=b.V();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Pa(),b=0<d?b.Rb(d):new Uint8Array(0),b=new Oh(b,0),l({name:h,parser:this,
264
264
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Pa(),b.getLength()-b.Pa()))}};function Yh(a){for(var b=Zh(a);a.reader.Ha()&&!a.parser.g;)a.parser.sd(a.start+b,a.reader,a.partialOkay)}function $h(a){for(var b=Zh(a),c=a.reader.V(),d=0;d<c&&(a.parser.sd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ai(a){var b=Zh(a);for(a.reader.skip(78);a.reader.Ha()&&!a.parser.g;)a.parser.sd(a.start+b,a.reader,a.partialOkay)}
@@ -277,7 +277,7 @@ function yi(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.B||!a
277
277
  ta(g,6);return H(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new U(2,6,6004,f.message);}})}function zi(a,b){var c,d,e;return P(function(f){if(1==f.g)return H(f,Ai(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Db=new lh,d.push(e.Db);d.push(c.remove());return H(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
278
278
  function xi(a){var b,c,d,e,f;return P(function(g){if(1==g.g){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){Ai(a,k,h)});return H(g,a.m,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Bi(a))return g.return(a.m);a.m=new lh;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,vi(a,f.initDataType,f.initData);Ci(a)&&a.m.resolve();return g.return(a.m)})}
279
279
  function vi(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Hb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Hb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&Ci(a)&&(a.m.resolve(),a.m=new lh,a.m.catch(function(){}));Di(a,b,c,a.g.sessionType)}}function Ei(a){a=a.i.keys();a=kb(a,function(b){return b.sessionId});return Array.from(a)}
280
- q.mg=function(){var a=this,b=this.i.keys();b=kb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Kd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Ee=function(){return Nh(this.aa)};
280
+ q.lg=function(){var a=this,b=this.i.keys();b=kb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Kd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Ee=function(){return Nh(this.aa)};
281
281
  function oi(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=new Map;if(c.length){e=Fi(a,c,d);m.A(2);break}return H(m,Gi(a,b),3);case 3:e=m.h;case 2:f=e;if(!f)throw new U(2,6,6001);Lh(a.j);ta(m,4);f.getConfiguration();if(c.length){var n=f.keySystem;var p=d.get(f.keySystem);var r=[],u=[],w=[],v=[],z=[],y=new Set,B=new Set;Hi(p,r,u,v,w,z,y,B);var A=a.O?"persistent-license":"temporary";n={keySystem:n,encryptionScheme:r[0],licenseServerUri:u[0],distinctiveIdentifierRequired:p[0].distinctiveIdentifierRequired,
282
282
  persistentStateRequired:p[0].persistentStateRequired,sessionType:p[0].sessionType||A,audioRobustness:p[0].audioRobustness||"",videoRobustness:p[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:w[0],initData:z,keyIds:y};0<B.size&&(n.keySystemUris=B);p=t(p);for(B=p.next();!B.done;B=p.next())B=B.value,B.distinctiveIdentifierRequired&&(n.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(n.persistentStateRequired=B.persistentStateRequired);p=n}else p=
283
283
  f.keySystem,B=b.get(f.keySystem),n=[],r=[],u=[],w=[],v=[],z=new Set,Hi(B.drmInfos,n,r,w,u,v,z),p={keySystem:p,encryptionScheme:n[0],licenseServerUri:r[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],serverCertificateUri:u[0],
@@ -288,9 +288,9 @@ l.ji}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next
288
288
  function Gi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z;return P(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new U(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.A(4);break}k=h.value;if(!b.has(k)){y.A(3);break}l=b.get(k);ta(y,6);return H(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
289
289
  y.h,y.return(c);case 6:ya(y);case 7:Lh(a.j);case 3:h=g.next();y.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.A(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.A(9);break}w=u.value;v=b.get(w);z=v.drmInfos.some(function(B){return!!B.licenseServerUri});if(z!=p){y.A(13);break}ta(y,15);return H(y,navigator.requestMediaKeySystemAccess(w,[v]),17);case 17:return c=y.h,y.return(c);case 15:ya(y);case 16:Lh(a.j);case 13:u=r.next();y.A(12);break;case 11:return y.return(c)}})}
290
290
  function pi(a){a=Mh(a.h.clearKeys);return 0==a.size?null:Rc(a)}function Ii(a){Ci(a)&&a.m.resolve()}function Ji(a,b){(new Yb(function(){b.loaded=!0;Ii(a)})).Y(Ki)}
291
- function Ai(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(n):wi(a,n)});a.s.o(d,"keystatuseschange",function(n){return Li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Jg:Infinity,Db:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return H(m,
291
+ function Ai(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(n):wi(a,n)});a.s.o(d,"keystatuseschange",function(n){return Li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Ig:Infinity,Db:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return H(m,
292
292
  d.load(b),4);case 4:return g=m.h,Lh(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.u(new U(h,6,6013)),f.loaded=!0),Ji(a,f),Ii(a),m.return(d);case 2:k=ya(m),Lh(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.u(new U(l,6,6005,k.message)),f.loaded=!0,Ii(a);case 3:return m.return(Promise.resolve())}})}
293
- function Di(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new U(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(f):wi(a,f)});a.s.o(e,"keystatuseschange",function(f){return Li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Jg:Infinity,Db:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.u(b);return}a.h.logLicenseExchange&&Kc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
293
+ function Di(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new U(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.S?a.M.push(f):wi(a,f)});a.s.o(e,"keystatuseschange",function(f){return Li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Ig:Infinity,Db:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.u(b);return}a.h.logLicenseExchange&&Kc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
294
294
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new U(2,6,6006,f.message,f,h))}})}
295
295
  function wi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w;P(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Kc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Ah([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
296
296
  f.headers[h];if(Ub(a.g.keySystem)){var z=Bc(g.body,!0,!0);if(z.includes("PlayReadyKeyMessage")){z=de(z,"PlayReadyKeyMessage");var y=qe(z,"HttpHeader");y=t(y);for(var B=y.next();!B.done;B=y.next()){var A=B.value;B=qe(A,"name")[0];A=qe(A,"value")[0];g.headers[oe(B)]=oe(A)}z=qe(z,"Challenge")[0];g.body=Lc(oe(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ta(v,2);m=a.G.kc.request(2,g,{isPreload:a.P()});return H(v,m.promise,4);case 4:l=v.h;xa(v,3);break;case 2:n=ya(v);if(a.j.g)return v.return();
@@ -306,10 +306,10 @@ function Ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J;return
306
306
  robustness:Q}}},H(oa,navigator.mediaCapabilities.decodingInfo(R),4);case 4:return Y=oa.h,pa=Y.keySystemAccess,H(oa,l(O,pa),5);case 5:xa(oa,0);break;case 2:ya(oa),I(oa)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);w=[];v=t(h);for(z=v.next();!z.done;z=v.next())for(y=z.value,B=t(a),A=B.next();!A.done;A=B.next())C=A.value,"org.w3.clearkey"===C&&rc()||(w.push(m(C,y,"","")),w.push(n(C,y,"","")));D=t(a);for(E=D.next();!E.done;E=D.next())for(F=E.value,K=t(d[F]||[]),G=K.next();!G.done;G=
307
307
  K.next())J=G.value,w.push(m(F,null,J,"")),w.push(m(F,null,"",J)),w.push(n(F,null,J,"")),w.push(n(F,null,"",J));return H(M,Promise.all(w),2)}return M.return(Nh(k))})}function Oi(a){var b;return P(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Yb(e)).Y(Pi)}),ta(c,2),H(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);I(c)})}
308
308
  function ji(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return H(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return P(function(g){if(1==g.g)return ta(g,2),a.ba||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?H(g,Oi(e),5):H(g,e.remove(),5);if(2!=g.g)return xa(g,0);ya(g);I(g)})})),0)})}function ri(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
309
- function hi(a){a.i.forEach(function(b,c){var d=b.Jg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Jg=e)})}function Ci(a){a=a.i.values();return lb(a,function(b){return b.loaded})}function Bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
309
+ function hi(a){a.i.forEach(function(b,c){var d=b.Ig,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Ig=e)})}function Ci(a){a=a.i.values();return lb(a,function(b){return b.loaded})}function Bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
310
310
  function qi(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
311
311
  function Hi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={La:void 0},l=a.next()){m.La=l.value;b.includes(m.La.encryptionScheme)||b.push(m.La.encryptionScheme);"org.w3.clearkey"==m.La.keySystem&&m.La.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.La.licenseServerUri)||k.push(m.La.licenseServerUri):c.includes(m.La.licenseServerUri)||c.push(m.La.licenseServerUri);e.includes(m.La.serverCertificateUri)||e.push(m.La.serverCertificateUri);m.La.serverCertificate&&
312
- (d.some(function(r){return function(u){return Hb(u,r.La.serverCertificate)}}(m))||d.push(m.La.serverCertificate));if(m.La.initData){l=t(m.La.initData);for(var n=l.next(),p={};!n.done;p={yg:void 0},n=l.next())p.yg=n.value,f.some(function(r){return function(u){var w=r.yg;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Hb(u.initData,w.initData)}}(p))||f.push(p.yg)}if(m.La.keyIds)for(l=t(m.La.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.La.keySystemUris&&h)for(m=t(m.La.keySystemUris),
312
+ (d.some(function(r){return function(u){return Hb(u,r.La.serverCertificate)}}(m))||d.push(m.La.serverCertificate));if(m.La.initData){l=t(m.La.initData);for(var n=l.next(),p={};!n.done;p={xg:void 0},n=l.next())p.xg=n.value,f.some(function(r){return function(u){var w=r.xg;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Hb(u.initData,w.initData)}}(p))||f.push(p.xg)}if(m.La.keyIds)for(l=t(m.La.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.La.keySystemUris&&h)for(m=t(m.La.keySystemUris),
313
313
  l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
314
314
  function si(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))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||(a.serverCertificate=
315
315
  c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Pi=1,Ki=5,Mi=.5;/*
@@ -326,14 +326,14 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a)
326
326
  function(m){k.push({box:m,kb:1701733238})}).X("hev1",function(m){k.push({box:m,kb:1701733238})}).X("hvc1",function(m){k.push({box:m,kb:1701733238})}).X("avc1",function(m){k.push({box:m,kb:1701733238})}).X("avc3",function(m){k.push({box:m,kb:1701733238})}).X("ac-3",function(m){k.push({box:m,kb:1701733217})}).X("ec-3",function(m){k.push({box:m,kb:1701733217})}).X("ac-4",function(m){k.push({box:m,kb:1701733217})}).X("mp4a",function(m){k.push({box:m,kb:1701733217})}).parse(a);if(f)return a;if(0==k.length||
327
327
  !g)throw hb(Nc(a)),new U(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=aj(e,g,l.box,h,l.kb);return bc()&&sc()&&!cc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
328
328
  function aj(a,b,c,d,e){var f=bj.value(),g=a.subarray(c.start,c.start+c.size),h=Nb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Nb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);cj(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=cc()||bc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,cj(e,d.start,d.size+k.byteLength);k=Nb(e,b.start);b=Zh(b);
329
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function cj(a,b,c){a=Nb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var bj=new Qb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function dj(a,b,c,d,e,f,g){this.R=a;this.eb=b;this.Ma=c;this.qd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}dj.prototype.Jb=function(){return this.eb};dj.prototype.Gb=function(){return this.Ma};dj.prototype.Kc=function(){return this.g};function ej(a,b){return a===b?!0:a&&b?a.Jb()==b.Jb()&&a.Gb()==b.Gb()&&Td(a.R().sort(),b.R().sort())&&Hb(a.Kc(),b.Kc()):a==b}S("shaka.media.InitSegmentReference",dj);
329
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function cj(a,b,c){a=Nb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var bj=new Qb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function dj(a,b,c,d,e,f,g){this.R=a;this.eb=b;this.Ma=c;this.qd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}dj.prototype.Jb=function(){return this.eb};dj.prototype.Gb=function(){return this.Ma};dj.prototype.Mc=function(){return this.g};function ej(a,b){return a===b?!0:a&&b?a.Jb()==b.Jb()&&a.Gb()==b.Gb()&&Td(a.R().sort(),b.R().sort())&&Hb(a.Mc(),b.Mc()):a==b}S("shaka.media.InitSegmentReference",dj);
330
330
  dj.prototype.getEndByte=dj.prototype.Gb;dj.prototype.getStartByte=dj.prototype.Jb;
331
331
  function fj(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w){l=void 0===l?[]:l;r=void 0===r?gj:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.eb=d;this.Ma=e;this.na=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.thumbnailSprite=null;this.i=0;this.u=void 0===w?!1:w;this.H=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=
332
- a.next())b.value.$h();this.u&&this.g.length&&this.g[this.g.length-1].Zh();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=fj.prototype;q.R=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.nj=function(){return this.endTime};q.Jb=function(){return this.eb};q.Gb=function(){return this.Ma};q.Ij=function(){return this.tilesLayout};q.Hj=function(){return this.B};q.vc=function(){return this.status};q.ek=function(){this.status=hj};q.Gg=function(){this.preload=!0};
333
- q.isPreload=function(){return this.preload};q.pd=function(){this.l=!1};q.Uj=function(){return this.l};q.$h=function(){this.s=!0};q.Wj=function(){return this.s};q.Zh=function(){this.H=!0};q.Vj=function(){return this.H};q.Yh=function(){this.m=!0};q.Qj=function(){return this.m};q.pf=function(a){this.thumbnailSprite=a};q.Gj=function(){return this.thumbnailSprite};
334
- q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.hh=function(a){null==this.h?bb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Nk=function(a){this.C=a};q.Kc=function(){return this.C};function ij(a,b){a.na=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())ij(c.value,b)}S("shaka.media.SegmentReference",fj);
335
- fj.prototype.getSegmentData=fj.prototype.Kc;fj.prototype.setSegmentData=fj.prototype.Nk;fj.prototype.syncAgainst=fj.prototype.hh;fj.prototype.offset=fj.prototype.offset;fj.prototype.getThumbnailSprite=fj.prototype.Gj;fj.prototype.setThumbnailSprite=fj.prototype.pf;fj.prototype.hasByterangeOptimization=fj.prototype.Qj;fj.prototype.markAsByterangeOptimization=fj.prototype.Yh;fj.prototype.isLastPartial=fj.prototype.Vj;fj.prototype.markAsLastPartial=fj.prototype.Zh;fj.prototype.isPartial=fj.prototype.Wj;
336
- fj.prototype.markAsPartial=fj.prototype.$h;fj.prototype.isIndependent=fj.prototype.Uj;fj.prototype.markAsNonIndependent=fj.prototype.pd;fj.prototype.isPreload=fj.prototype.isPreload;fj.prototype.markAsPreload=fj.prototype.Gg;fj.prototype.markAsUnavailable=fj.prototype.ek;fj.prototype.getStatus=fj.prototype.vc;fj.prototype.getTileDuration=fj.prototype.Hj;fj.prototype.getTilesLayout=fj.prototype.Ij;fj.prototype.getEndByte=fj.prototype.Gb;fj.prototype.getStartByte=fj.prototype.Jb;
332
+ a.next())b.value.$h();this.u&&this.g.length&&this.g[this.g.length-1].Zh();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=fj.prototype;q.R=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.nj=function(){return this.endTime};q.Jb=function(){return this.eb};q.Gb=function(){return this.Ma};q.Ij=function(){return this.tilesLayout};q.Hj=function(){return this.B};q.vc=function(){return this.status};q.ek=function(){this.status=hj};q.Fg=function(){this.preload=!0};
333
+ q.isPreload=function(){return this.preload};q.pd=function(){this.l=!1};q.Uj=function(){return this.l};q.$h=function(){this.s=!0};q.Wj=function(){return this.s};q.Zh=function(){this.H=!0};q.Vj=function(){return this.H};q.Yh=function(){this.m=!0};q.Qj=function(){return this.m};q.nf=function(a){this.thumbnailSprite=a};q.Gj=function(){return this.thumbnailSprite};
334
+ q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.hh=function(a){null==this.h?bb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Nk=function(a){this.C=a};q.Mc=function(){return this.C};function ij(a,b){a.na=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())ij(c.value,b)}S("shaka.media.SegmentReference",fj);
335
+ fj.prototype.getSegmentData=fj.prototype.Mc;fj.prototype.setSegmentData=fj.prototype.Nk;fj.prototype.syncAgainst=fj.prototype.hh;fj.prototype.offset=fj.prototype.offset;fj.prototype.getThumbnailSprite=fj.prototype.Gj;fj.prototype.setThumbnailSprite=fj.prototype.nf;fj.prototype.hasByterangeOptimization=fj.prototype.Qj;fj.prototype.markAsByterangeOptimization=fj.prototype.Yh;fj.prototype.isLastPartial=fj.prototype.Vj;fj.prototype.markAsLastPartial=fj.prototype.Zh;fj.prototype.isPartial=fj.prototype.Wj;
336
+ fj.prototype.markAsPartial=fj.prototype.$h;fj.prototype.isIndependent=fj.prototype.Uj;fj.prototype.markAsNonIndependent=fj.prototype.pd;fj.prototype.isPreload=fj.prototype.isPreload;fj.prototype.markAsPreload=fj.prototype.Fg;fj.prototype.markAsUnavailable=fj.prototype.ek;fj.prototype.getStatus=fj.prototype.vc;fj.prototype.getTileDuration=fj.prototype.Hj;fj.prototype.getTilesLayout=fj.prototype.Ij;fj.prototype.getEndByte=fj.prototype.Gb;fj.prototype.getStartByte=fj.prototype.Jb;
337
337
  fj.prototype.getEndTime=fj.prototype.nj;fj.prototype.getStartTime=fj.prototype.getStartTime;fj.prototype.getUris=fj.prototype.R;var gj=0,hj=1;fj.Status={Xk:gj,$l:hj,Bl:2};function jj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function kj(a){return!a||jj(a)?null:a.length?a.end(a.length-1):null}function lj(a,b){return!a||!a.length||jj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function mj(a,b){if(!a||!a.length||jj(a))return 0;var c=0;a=t(nj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
338
338
  function oj(a,b,c){if(!a||!a.length||jj(a))return null;a=nj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function nj(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 pj(){}function V(a){return document.createElement(a)}function qj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function rj(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function sj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",pj);pj.removeAllChildren=sj;/*
339
339
  @license
@@ -347,7 +347,7 @@ d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Ac(Jb(a.data,1,d));a=Ac(
347
347
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Kb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Kb(a.data),b):null}
348
348
  function yj(a){for(var b=0,c=[];uj(a,b);){var d=wj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=wj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=xj(e))&&c.push(f);b+=e.size+10}vj(a,b)&&(b+=10)}return c}function zj(a,b){for(var c=b=void 0===b?0:b,d=0;uj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=wj(a,b+6),vj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",tj);tj.getID3Data=zj;
349
349
  tj.getID3Frames=yj;function Aj(a,b){var c=null,d=null,e=null,f=a.V();b&1&&(e=a.vd());b&2&&a.skip(4);b&8&&(c=a.V());b&16&&(d=a.V());return{trackId:f,Id:c,ze:d,dm:e}}function Bj(a,b){return 1==b?(b=a.V(),a=a.V(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.V()}}function Cj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.V();a.skip(4);a=a.za();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
350
- function Dj(a,b,c){var d=a.V(),e=[],f=null;c&1&&(f=a.V());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Tg:null,sampleSize:null,hf:null};c&256&&(h.Tg=a.V());c&512&&(h.sampleSize=a.V());c&1024&&a.skip(4);c&2048&&(h.hf=0==b?a.V():a.ki());e.push(h)}return{hm:d,oi:e,bj:f}}function Ej(a){a.skip(6);a.skip(2);a.skip(8);var b=a.za();a.skip(2);a.skip(2);a.skip(2);a=a.za()+a.za()/65536;return{channelCount:b,sampleRate:a}}function Fj(a){a=a.V();return{codec:Xh(a)}}
350
+ function Dj(a,b,c){var d=a.V(),e=[],f=null;c&1&&(f=a.V());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Tg:null,sampleSize:null,gf:null};c&256&&(h.Tg=a.V());c&512&&(h.sampleSize=a.V());c&1024&&a.skip(4);c&2048&&(h.gf=0==b?a.V():a.ki());e.push(h)}return{hm:d,oi:e,bj:f}}function Ej(a){a.skip(6);a.skip(2);a.skip(8);var b=a.za();a.skip(2);a.skip(2);a.skip(2);a=a.za()+a.za()/65536;return{channelCount:b,sampleRate:a}}function Fj(a){a=a.V();return{codec:Xh(a)}}
351
351
  function Gj(a){var b=null,c=null,d=a.Rb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.za()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.za();a.za();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,fe:c}}
352
352
  function Hj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ij(a){return(10>a?"0":"")+a};/*
353
353
 
@@ -367,26 +367,26 @@ function Hj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
367
367
  */
368
368
  function Jj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Jb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Kj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Oh(c,0)).V(),a.g=8*d,a.i-=d)}function Lj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Kj(a)}a.h<<=b;a.g-=b}
369
369
  function Mj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Kj(a);c=b-c;return 0<c?d<<c|Mj(a,c):d}function Nj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Kj(a);return b+Nj(a)}function Oj(a){Lj(a,1+Nj(a))}function W(a){var b=Nj(a);return Mj(a,b+1)-1}function Pj(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Qj(a){return 1===Mj(a,1)}function Rj(a){return Mj(a,8)}
370
- function Sj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Pj(a),d=(c+d+256)%256),c=0===d?c:d}function Vj(a){Rj(a);W(a);return W(a)}S("shaka.util.ExpGolomb",Jj);function Wj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}q=Wj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
370
+ function Sj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Pj(a),d=(c+d+256)%256),c=0===d?c:d}function Tj(a){Rj(a);W(a);return W(a)}S("shaka.util.ExpGolomb",Jj);function Wj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}q=Wj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
371
371
  q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Xj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ke:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
372
372
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Cc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
373
373
  null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.H={channelCount:0===(u&15)?2:u&15,Zi:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Ke&&(g.Ke=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
374
374
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.B=f.audioCodec);-1!=f.Ke&&(this.G=f.Ke);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
375
375
  break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
376
376
  function Yj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Zj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Zj(d,
377
- a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.kk=function(a){Cd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Mg(a)};
378
- q.Mg=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Oc(b.data,p),b.fullData=Oc(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Oc(b.data,k),b.fullData=Oc(b.fullData,k)));if(n>=e-f)return h;
377
+ a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.kk=function(a){Cd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Lg(a)};
378
+ q.Lg=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Oc(b.data,p),b.fullData=Oc(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Oc(b.data,k),b.fullData=Oc(b.fullData,k)));if(n>=e-f)return h;
379
379
  n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Oc(b.data,a),b.fullData=Oc(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Oc.apply(Ic,x(c.value)),(c=Yj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:yj(c.data),dts:c.dts,pts:c.pts});return a};
380
380
  q.tc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Oc.apply(Ic,x(c.value)),e=Yj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Oc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
381
- q.Lc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Oc.apply(Ic,x(d.value)),f=Yj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Oc(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Mg(e,
382
- g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.tc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Lc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Jd=function(){return{audio:this.B,video:this.m}};
383
- q.Ie=function(){for(var a=[],b=t(this.Lc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Nj=function(){Cd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.sg();return{height:a.height,width:a.width}};q.sg=function(){return"hvc"==this.m?ak(this):bk(this)};function ck(a){var b=a.Lc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
381
+ q.Nc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Oc.apply(Ic,x(d.value)),f=Yj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Oc(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Lg(e,
382
+ g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.tc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Nc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Jd=function(){return{audio:this.B,video:this.m}};
383
+ q.Ie=function(){for(var a=[],b=t(this.Nc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Nj=function(){Cd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.rg();return{height:a.height,width:a.width}};q.rg=function(){return"hvc"==this.m?ak(this):bk(this)};function ck(a){var b=a.Nc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
384
384
  function bk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Ie();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new Jj(c.data);var d=Rj(c),e=Rj(c),f=Rj(c);Oj(c);if(dk.includes(d)){var g=W(c);3===g&&Lj(c,1);Oj(c);Oj(c);Lj(c,1);if(Qj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Qj(c)&&(6>h?Sj(c,16):Sj(c,64))}}Oj(c);g=W(c);if(0===g)W(c);else if(1===g)for(Lj(c,1),Oj(c),Oj(c),g=W(c),h=0;h<g;h++)Oj(c);Oj(c);Lj(c,1);g=W(c);h=W(c);var k=Mj(c,1);0===k&&Lj(c,1);Lj(c,
385
385
  1);var l=0,m=0,n=0,p=0;Qj(c)&&(l=W(c),m=W(c),n=W(c),p=W(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=ck(a);return b}
386
386
  function ak(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Ie();if(!c.length)return b;c=c.find(function(C){return 33==C.type});if(!c)return b;var d=new Jj(c.fullData,!0);Rj(d);Rj(d);Mj(d,4);var e=Mj(d,3);Qj(d);var f=Mj(d,2),g=Mj(d,1),h=Mj(d,5),k=Mj(d,32);c=Rj(d);for(var l=Rj(d),m=Rj(d),n=Rj(d),p=Rj(d),r=Rj(d),u=Rj(d),w=[],v=[],z=0;z<e;z++)w.push(Qj(d)),v.push(Qj(d));if(0<e)for(z=e;8>z;z++)Mj(d,2);for(z=0;z<e;z++)w[z]&&Mj(d,88),v[z]&&Rj(d);W(d);e=W(d);3==e&&Mj(d,1);w=W(d);v=W(d);var y=
387
387
  z=0,B=0,A=0;Qj(d)&&(z+=W(d),y+=W(d),B+=W(d),A+=W(d));b.width=String(w-(z+y)*(1===e||2===e?2:1));b.height=String(v-(B+A)*(1===e?2:1));d=function(C){for(var D=0,E=0;32>E;E++)D|=(C>>E&1)<<31-E;return D>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
388
- c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=ck(a);return b}function Zj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function ek(a){return 0>Xj(a)?!1:!0}function Xj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Wj);Wj.syncOffset=Xj;Wj.probe=ek;Wj.prototype.getVideoInfo=Wj.prototype.sg;Wj.prototype.getVideoResolution=Wj.prototype.Nj;
389
- Wj.prototype.getVideoNalus=Wj.prototype.Ie;Wj.prototype.getCodecs=Wj.prototype.Jd;Wj.prototype.getStartTime=Wj.prototype.getStartTime;Wj.prototype.getVideoData=Wj.prototype.Lc;Wj.prototype.getAudioData=Wj.prototype.tc;Wj.prototype.getMetadata=Wj.prototype.getMetadata;Wj.prototype.parseNalus=Wj.prototype.Mg;Wj.prototype.parseAvcNalus=Wj.prototype.kk;Wj.prototype.parse=Wj.prototype.parse;Wj.prototype.clearData=Wj.prototype.clearData;Wj.Timescale=9E4;
388
+ c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=ck(a);return b}function Zj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function ek(a){return 0>Xj(a)?!1:!0}function Xj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Wj);Wj.syncOffset=Xj;Wj.probe=ek;Wj.prototype.getVideoInfo=Wj.prototype.rg;Wj.prototype.getVideoResolution=Wj.prototype.Nj;
389
+ Wj.prototype.getVideoNalus=Wj.prototype.Ie;Wj.prototype.getCodecs=Wj.prototype.Jd;Wj.prototype.getStartTime=Wj.prototype.getStartTime;Wj.prototype.getVideoData=Wj.prototype.Nc;Wj.prototype.getAudioData=Wj.prototype.tc;Wj.prototype.getMetadata=Wj.prototype.getMetadata;Wj.prototype.parseNalus=Wj.prototype.Lg;Wj.prototype.parseAvcNalus=Wj.prototype.kk;Wj.prototype.parse=Wj.prototype.parse;Wj.prototype.clearData=Wj.prototype.clearData;Wj.Timescale=9E4;
390
390
  var dk=[100,110,122,244,44,83,86,118,128,138,139,134];function fk(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&cb("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Cd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{cb("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(cb("Could not find LCEVC Library on this page"),
391
391
  a=!1):(this.h.SupportObject.SupportStatus||cb(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function gk(a){a.g&&a.i.classList.add("shaka-hidden")}
392
392
  fk.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function hk(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",fk);fk.prototype.release=fk.prototype.release;function ik(a,b,c,d){var e=this;this.g=a;this.H=c;this.B=null;this.ba=b;this.i={};this.I={};this.Ka={};this.h=null;this.Ca=!1;this.$=d||null;this.l={};this.u=new td;this.j={};this.J=null;this.P=new lh;this.Fa="";this.Ya=!1;this.ya=!0;this.W=!1;this.C=this.K=null;this.m=jk(this,this.P);this.S=!1;this.L=new Kh(function(){return kk(e)});this.G=!1;this.aa="UNKNOWN";this.Ja=this.Ta=!1;this.Ga=new lh;this.s=!1;this.Ba=null;this.U={};this.ma=this.M=this.qa=this.O=null;this.ka=new lh;this.g.remote&&(this.W=
@@ -406,21 +406,21 @@ function pk(a,b,c,d){a.h||(a.h=new Mf(a.ba),a.h&&(a.h.B=a.B.modifyCueCallback));
406
406
  function tk(a){return a.S?!1:a.m?"ended"==a.m.readyState:!0}function uk(a,b){Object.keys(a.i).length?b==Wc?a=a.h.g:(a=vk(a,b),a=!a||jj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function wk(a,b){return Object.keys(a.i).length?b==Wc?a.h.h:kj(vk(a,b)):null}function xk(a,b,c){if(b==Wc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=vk(a,b);return mj(a,c)}
407
407
  q.Vb=function(){var a={total:this.S?[]:nj(this.g.buffered),audio:nj(vk(this,"audio")),video:nj(vk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function vk(a,b){if(a.S||a.W)return null;try{return a.i[b].buffered}catch(c){return null}}
408
408
  function yk(a,b,c,d,e,f){var g=null,h=[],k=Jb(c);if(Af.includes(f))b=yj(k),b.length&&d&&((c=b.find(function(p){return"com.apple.streaming.transportStreamTimestamp"===p.description}))&&c.data&&(g=Math.round(c.data)/1E3),a.H.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.na&&d.na.timescale){var l=d.na.timescale;if(!isNaN(l)){var m=0,n=!1;k=new Rh;(null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.B.dispatchAllEmsgBoxes)&&
409
- k.X("emsg",function(p){var r=e.emsgSchemeIdUris;if(0===p.version){var u=p.reader.Sc();var w=p.reader.Sc();var v=p.reader.V();var z=p.reader.V();var y=p.reader.V();var B=p.reader.V();var A=d.startTime+z/v}else v=p.reader.V(),A=p.reader.vd()/v+d.timestampOffset,z=A-d.startTime,y=p.reader.V(),B=p.reader.V(),u=p.reader.Sc(),w=p.reader.Sc();p=p.reader.Rb(p.reader.getLength()-p.reader.Pa());if(r&&r.includes(u)||a.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==u)a.H.jk();else if(r=A+y/v,v=(new Map).set("detail",
409
+ k.X("emsg",function(p){var r=e.emsgSchemeIdUris;if(0===p.version){var u=p.reader.Uc();var w=p.reader.Uc();var v=p.reader.V();var z=p.reader.V();var y=p.reader.V();var B=p.reader.V();var A=d.startTime+z/v}else v=p.reader.V(),A=p.reader.vd()/v+d.timestampOffset,z=A-d.startTime,y=p.reader.V(),B=p.reader.V(),u=p.reader.Uc(),w=p.reader.Uc();p=p.reader.Rb(p.reader.getLength()-p.reader.Pa());if(r&&r.includes(u)||a.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==u)a.H.jk();else if(r=A+y/v,v=(new Map).set("detail",
410
410
  {startTime:A,endTime:r,schemeIdUri:u,value:w,timescale:v,presentationTimeDelta:z,eventDuration:y,id:B,messageData:p}),v=new T("emsg",v),v.cancelable=!0,a.H.onEvent(v),!v.defaultPrevented&&("https://aomedia.org/emsg/ID3"==u||"https://developer.apple.com/streaming/emsg-id3"==u)&&(u=yj(p),u.length))a.H.onMetadata([{cueTime:A,data:p,frames:u,dts:A,pts:A}],0,r)});k.X("prft",function(p){var r=p.reader,u=p.version;r.V();p=r.V();var w=r.V();p=1E3*p+w/Math.pow(2,32)*1E3;0===u?r=r.V():(u=r.V(),r=r.V(),r=u*
411
411
  Math.pow(2,32)+r);p=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+p)).getTime();r=(new Map).set("detail",{wallClockTime:p,programStartDate:new Date(p-r/l*1E3)});r=new T("prft",r);a.H.onEvent(r)}).box("moof",Yh).box("traf",Yh).X("tfdt",function(p){m=Bj(p.reader,p.version).baseMediaDecodeTime/l;n=!0;p.parser.stop()}).parse(c,!0);n&&0==d.timestampOffset&&(g=m)}}else f.includes("/mp4")||f.includes("/webm")||!ek(k)||(a.U[b]?a.U[b].clearData():a.U[b]=new Wj,h=a.U[b].parse(k),k=h.getStartTime(b),
412
412
  null!=k&&(g=k),h=h.getMetadata());return{timestamp:g,metadata:h}}
413
413
  function zk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K;return P(function(G){switch(G.g){case 1:m=Yc;if(b!=m.Oa){G.A(2);break}if(!a.G){G.A(3);break}return H(G,a.Ga,4);case 4:n=G.h,a.h.u=n;case 3:return H(G,Pf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.R()[0]:null),5);case 5:return G.return();case 2:if(l||!a.s){G.A(6);break}return H(G,zk(a,m.ia,c,d,e,f,g,h,k,!0),7);case 7:return H(G,zk(a,m.xa,c,d,e,f,g,h,k,!0),
414
414
  8);case 8:return G.return();case 6:if(!a.i[b])return G.return();p=a.i[b].timestampOffset;r=a.I[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());if(d&&(u=yk(a,b,c,d,e,r),w=u.timestamp,v=u.metadata,null!=w&&(null==a.O&&b==m.xa&&(a.O=w,a.qa=d.startTime,null!=a.M&&(z=0,a.qa==a.ma&&(z=a.O-a.M),a.ka.resolve(z))),null==a.M&&b==m.ia&&(a.M=w,a.ma=d.startTime,null!=a.O&&(y=0,a.qa==a.ma&&(y=a.O-a.M),a.ka.resolve(y))),B=d.startTime-w,A=Math.abs(p-B),(.001<=A||g||h)&&(!k||0<B||!p)&&(p=B,a.Ja&&(Ak(a,b,function(){return Bk(a,
415
- b)},null),Ak(a,b,function(){return Jk(a,b,p)},null))),C=b==m.xa||!(m.xa in a.i),a.G&&C&&a.Ga.resolve(p)),v.length))a.H.onMetadata(v,p,d?d.endTime:null);f&&b==m.xa&&(a.h||pk(a,"application/cea-608",a.G,!1),a.J||(D=r.split(";",1)[0],a.J=new Jd(D)),d?(E=a.J.i(c),E.length&&Tf(a.h,E,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.j[b]){G.A(9);break}return H(G,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=Kk(a,c,d?d.startTime:null,b,d?d.R()[0]:null);if(!d||!a.G||b==m.Oa){G.A(11);break}if(!g&&
416
- !h){G.A(11);break}F=d.startTime;if("HLS"!=a.aa||a.s||b!=m.ia||!a.i[m.xa]){G.A(13);break}return H(G,a.ka,14);case 14:K=G.h,.1<Math.abs(K)&&(F-=K);case 13:Ak(a,b,function(){return Bk(a,b)},null),Ak(a,b,function(){return Jk(a,b,F)},null);case 11:return H(G,Ak(a,b,function(){var J=c;if("video"==b&&a.$){var M=a.$;M.g&&M.g.appendBuffer(J,"video",M.s,-p)}a.i[b].appendBuffer(J)},d?d.R()[0]:null),15);case 15:I(G)}})}function Lk(a,b){var c=wk(a,"video")||0;Rf(a.h,b,c)}function Mk(a){a.h&&Rf(a.h,"",0)}
415
+ b)},null),Ak(a,b,function(){return Ck(a,b,p)},null))),C=b==m.xa||!(m.xa in a.i),a.G&&C&&a.Ga.resolve(p)),v.length))a.H.onMetadata(v,p,d?d.endTime:null);f&&b==m.xa&&(a.h||pk(a,"application/cea-608",a.G,!1),a.J||(D=r.split(";",1)[0],a.J=new Jd(D)),d?(E=a.J.i(c),E.length&&Tf(a.h,E,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.j[b]){G.A(9);break}return H(G,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=Kk(a,c,d?d.startTime:null,b,d?d.R()[0]:null);if(!d||!a.G||b==m.Oa){G.A(11);break}if(!g&&
416
+ !h){G.A(11);break}F=d.startTime;if("HLS"!=a.aa||a.s||b!=m.ia||!a.i[m.xa]){G.A(13);break}return H(G,a.ka,14);case 14:K=G.h,.1<Math.abs(K)&&(F-=K);case 13:Ak(a,b,function(){return Bk(a,b)},null),Ak(a,b,function(){return Ck(a,b,F)},null);case 11:return H(G,Ak(a,b,function(){var J=c;if("video"==b&&a.$){var M=a.$;M.g&&M.g.appendBuffer(J,"video",M.s,-p)}a.i[b].appendBuffer(J)},d?d.R()[0]:null),15);case 15:I(G)}})}function Lk(a,b){var c=wk(a,"video")||0;Rf(a.h,b,c)}function Mk(a){a.h&&Rf(a.h,"",0)}
417
417
  q.remove=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=Yc,a==e.Oa?H(f,d.h.remove(b,c),0):H(f,Ak(d,a,function(){return Nk(d,a,b,c)},null),4)):d.s?H(f,Ak(d,e.ia,function(){return Nk(d,e.ia,b,c)},null),0):f.A(0)})};function Ok(a,b){var c;return P(function(d){return 1==d.g?(c=Yc,b==c.Oa?a.h?H(d,a.h.remove(0,Infinity),0):d.return():H(d,Ak(a,b,function(){return Nk(a,b,0,a.m.duration)},null),4)):a.s?H(d,Ak(a,c.ia,function(){return Nk(a,c.ia,0,a.m.duration)},null),0):d.A(0)})}
418
418
  q.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Yc,a==c.Oa?d.return():H(d,Ak(b,a,function(){b.g.currentTime-=.001;rk(b,a)},null),2)):b.s?H(d,Ak(b,c.ia,function(){var e=c.ia;b.g.currentTime-=.001;rk(b,e)},null),0):d.A(0)})};
419
- function Pk(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(p){if(1==p.g){l=Yc;if(b==l.Oa)return f||(a.h.u=c),Qf(a.h,d,e),p.return();m=[];return H(p,Qk(a,b,g,h,k),2)}n=p.h;n||(m.push(Ak(a,b,function(){return Bk(a,b)},null)),a.s&&m.push(Ak(a,l.ia,function(){return Bk(a,l.ia)},null)));f||(m.push(Ak(a,b,function(){return Jk(a,b,c)},null)),a.s&&m.push(Ak(a,l.ia,function(){return Jk(a,l.ia,c)},null)));m.push(Ak(a,b,function(){a.i[b].appendWindowStart=0;a.i[b].appendWindowEnd=e;a.i[b].appendWindowStart=
419
+ function Pk(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(p){if(1==p.g){l=Yc;if(b==l.Oa)return f||(a.h.u=c),Qf(a.h,d,e),p.return();m=[];return H(p,Qk(a,b,g,h,k),2)}n=p.h;n||(m.push(Ak(a,b,function(){return Bk(a,b)},null)),a.s&&m.push(Ak(a,l.ia,function(){return Bk(a,l.ia)},null)));f||(m.push(Ak(a,b,function(){return Ck(a,b,c)},null)),a.s&&m.push(Ak(a,l.ia,function(){return Ck(a,l.ia,c)},null)));m.push(Ak(a,b,function(){a.i[b].appendWindowStart=0;a.i[b].appendWindowEnd=e;a.i[b].appendWindowStart=
420
420
  d;rk(a,b)},null));a.s&&m.push(Ak(a,l.ia,function(){var r=l.ia;a.i[r].appendWindowStart=0;a.i[r].appendWindowEnd=e;a.i[r].appendWindowStart=d;rk(a,r)},null));return H(p,Promise.all(m),0)})}
421
- function Rk(a,b,c){var d;return P(function(e){if(1==e.g){d=Yc;if(b==d.Oa)return e.return();b==d.xa&&(a.Ga=new lh);Ak(a,b,function(){return Bk(a,b)},null);a.s&&Ak(a,d.ia,function(){return Bk(a,d.ia)},null);return H(e,Ak(a,b,function(){return Jk(a,b,c)},null),2)}return a.s?H(e,Ak(a,d.ia,function(){return Jk(a,d.ia,c)},null),0):e.A(0)})}q.endOfStream=function(a){var b=this;return P(function(c){return H(c,Sk(b,function(){tk(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
421
+ function Rk(a,b,c){var d;return P(function(e){if(1==e.g){d=Yc;if(b==d.Oa)return e.return();b==d.xa&&(a.Ga=new lh);Ak(a,b,function(){return Bk(a,b)},null);a.s&&Ak(a,d.ia,function(){return Bk(a,d.ia)},null);return H(e,Ak(a,b,function(){return Ck(a,b,c)},null),2)}return a.s?H(e,Ak(a,d.ia,function(){return Ck(a,d.ia,c)},null),0):e.A(0)})}q.endOfStream=function(a){var b=this;return P(function(c){return H(c,Sk(b,function(){tk(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
422
422
  q.vb=function(a){var b=this;return P(function(c){return H(c,Sk(b,function(){if(a<b.m.duration)for(var d in b.i){var e={start:function(){},p:new lh,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.Ba=a}),0)})};q.getDuration=function(){return this.m.duration};function Nk(a,b,c,d){d<=c?rk(a,b):a.i[b].remove(c,d)}function Bk(a,b){var c=a.i[b].appendWindowStart,d=a.i[b].appendWindowEnd;a.i[b].abort();a.i[b].appendWindowStart=c;a.i[b].appendWindowEnd=d;rk(a,b)}
423
- function Jk(a,b,c){0>c&&(c+=.001);a.i[b].timestampOffset=c;rk(a,b)}function rk(a,b){if(!a.S){var c=a.l[b][0];c&&(c.p.resolve(),Tk(a,b))}}function Ak(a,b,c,d){Lh(a.L);c={start:c,p:new lh,uri:d};a.l[b].push(c);1==a.l[b].length&&Uk(a,b);return c.p}
423
+ function Ck(a,b,c){0>c&&(c+=.001);a.i[b].timestampOffset=c;rk(a,b)}function rk(a,b){if(!a.S){var c=a.l[b][0];c&&(c.p.resolve(),Tk(a,b))}}function Ak(a,b,c,d){Lh(a.L);c={start:c,p:new lh,uri:d};a.l[b].push(c);1==a.l[b].length&&Uk(a,b);return c.p}
424
424
  function Sk(a,b){var c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:Lh(a.L);c=[];d={};for(e in a.i)d={ready:void 0},d.ready=new lh,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();ta(l,2);return H(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return ta(l,5,6),H(l,b(),6);case 6:za(l);for(h in a.i)Tk(a,h);Aa(l,0);break;case 5:throw k=ya(l),new U(2,3,3015,k,a.g.error||"No error in the media element",
425
425
  null);}})}function Tk(a,b){a.l[b].shift();Uk(a,b)}function Uk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)),Tk(a,b)}}function Kk(a,b,c,d,e){var f=null==c,g=a.Ka[d];c=a.H.rj();if(f=a.B.insertFakeEncryptionInInit&&f&&g)c=Ub(c),f=ec()||cc()||mc()||bc()&&sc()&&c;f&&"mp4"==Ff(a.I[d])&&(b=$i(b,e));return b}
426
426
  function Vk(a,b,c,d){return Ak(a,b,function(){b!==Wc&&(Ad()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.i[b].changeType(c+a.B.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),rk(a,b))},null)}
@@ -429,43 +429,43 @@ Promise.all(g),4);case 4:return a.j={},a.i={},v=a.m.duration,a.P=new lh,a.m=jk(a
429
429
  (a.l[c.ia]=[],a.l[c.xa]=[]):a.l[F]=[];E=D.next();J.A(6);break;case 2:za(J),a.S=!1,Lh(a.L),a.u.sa(a.g,"canplaythrough",function(){a.L.g||(a.g.autoplay=e,f||a.g.play())}),Aa(J,0)}})}function Xk(a,b){return Sk(a,function(){return Wk(a,b)})}
430
430
  function Qk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,z,y,B;return P(function(A){if(1==A.g){f=Yc;if(b==f.Oa)return A.return(!1);g=Gf(Kf(a.I[b]));h=Jf(a.I[b]);l=!1;m=zf(c,d);n=a.B.forceTransmux;if(!yd(m)||!a.G&&Af.includes(m))n=!0;n&&(p=Bf(c,d),r=tf(p))&&(k=r(),u=Uc(f.ia,(d||"").split(",")),w=Uc(f.xa,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.ia&&(v=u),m=k.convertCodecs(b,Bf(c,v))):m=k.convertCodecs(b,p));z=Gf(Kf(m));y=Jf(m);if(g===z&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
431
431
  k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),A.return(!1);B=!0;if(a.s||l&&k&&!a.j[b])B=!1;if(B&&"smooth"===a.B.codecSwitchingStrategy&&Ad())return H(A,Vk(a,b,m,k),3);k&&k.destroy();return H(A,Xk(a,e),3)}return A.return(!0)})}
432
- function Yk(a,b,c,d){if(b==Wc)var e=!1;else{e=Gf(Kf(a.I[b]));var f=Jf(a.I[b]),g=zf(c,d),h=a.B.forceTransmux;if(!yd(g)||!a.G&&Af.includes(g))h=!0;c=Bf(c,d);h&&(h=tf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Gf(Kf(g));g=Jf(g);e=e!==b||f!==g}return e?"smooth"!==a.B.codecSwitchingStrategy||!Ad()||a.s:!1}var lk=window.URL.createObjectURL,qk="sequence";function Zk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}q=Zk.prototype;q.getDuration=function(){return this.l};q.wj=function(){return this.h};q.zi=function(a){this.i=a};q.vb=function(a){this.l=a};q.Aj=function(){return this.i};q.si=function(a){this.B=a};q.Vc=function(a){a&&!this.C&&(this.K=!0);this.C=a};q.mf=function(a){this.s=a};q.He=function(){return this.s};
432
+ function Yk(a,b,c,d){if(b==Wc)var e=!1;else{e=Gf(Kf(a.I[b]));var f=Jf(a.I[b]),g=zf(c,d),h=a.B.forceTransmux;if(!yd(g)||!a.G&&Af.includes(g))h=!0;c=Bf(c,d);h&&(h=tf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Gf(Kf(g));g=Jf(g);e=e!==b||f!==g}return e?"smooth"!==a.B.codecSwitchingStrategy||!Ad()||a.s:!1}var lk=window.URL.createObjectURL,qk="sequence";function Zk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}q=Zk.prototype;q.getDuration=function(){return this.l};q.wj=function(){return this.h};q.zi=function(a){this.i=a};q.vb=function(a){this.l=a};q.Aj=function(){return this.i};q.si=function(a){this.B=a};q.Xc=function(a){a&&!this.C&&(this.K=!0);this.C=a};q.lf=function(a){this.s=a};q.He=function(){return this.s};
433
433
  q.Yg=function(a){this.G=a};q.mj=function(){return this.G};q.ei=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.Ye(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.H&&!this.u&&(this.i=c-this.g-this.h)}}};
434
434
  q.Vd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Ye(b);this.g=Math.max(this.g,c);null!=this.i&&this.H&&!this.u&&(this.i=d-this.g-this.h)}};q.di=function(a,b){this.Ye(a);Infinity==b||this.T()||(this.g=Math.max(this.g,b))};q.xj=function(){return this.g};q.Te=function(){this.u=!0};
435
- q.Yj=function(){return this.u};q.wi=function(a){this.m=a};q.qj=function(){return this.m};q.Ye=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};q.Hg=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.T=function(){return Infinity==this.l&&!this.C};q.Pc=function(){return Infinity!=this.l&&!this.C};q.Ib=function(){return Math.max(this.J,this.uc()-this.s)};q.Bi=function(a){this.J=a};
436
- q.uc=function(){return this.T()||this.Pc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.I,this.l):this.g?Math.min(this.g,this.l):this.l};q.Md=function(a){var b=Math.max(this.j,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.uc()-this.s+a,this.Wb()))};q.dc=function(){return this.Md(0)};q.Wb=function(){return Math.max(0,this.uc()-(this.T()||this.Pc()?this.G:0))};q.Ki=function(){return null==this.i||null!=this.g&&this.H?!1:!0};
435
+ q.Yj=function(){return this.u};q.wi=function(a){this.m=a};q.qj=function(){return this.m};q.Ye=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};q.Gg=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.T=function(){return Infinity==this.l&&!this.C};q.Rc=function(){return Infinity!=this.l&&!this.C};q.Ib=function(){return Math.max(this.J,this.uc()-this.s)};q.Bi=function(a){this.J=a};
436
+ q.uc=function(){return this.T()||this.Rc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.I,this.l):this.g?Math.min(this.g,this.l):this.l};q.Md=function(a){var b=Math.max(this.j,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.uc()-this.s+a,this.Wb()))};q.dc=function(){return this.Md(0)};q.Wb=function(){return Math.max(0,this.uc()-(this.T()||this.Rc()?this.G:0))};q.Ki=function(){return null==this.i||null!=this.g&&this.H?!1:!0};
437
437
  q.ri=function(a){this.I=a};q.fj=function(){return this.I};S("shaka.media.PresentationTimeline",Zk);Zk.prototype.getAvailabilityTimeOffset=Zk.prototype.fj;Zk.prototype.setAvailabilityTimeOffset=Zk.prototype.ri;Zk.prototype.usingPresentationStartTime=Zk.prototype.Ki;Zk.prototype.getSeekRangeEnd=Zk.prototype.Wb;Zk.prototype.getSeekRangeStart=Zk.prototype.dc;Zk.prototype.getSafeSeekRangeStart=Zk.prototype.Md;Zk.prototype.getSegmentAvailabilityEnd=Zk.prototype.uc;Zk.prototype.setUserSeekStart=Zk.prototype.Bi;
438
- Zk.prototype.getSegmentAvailabilityStart=Zk.prototype.Ib;Zk.prototype.isInProgress=Zk.prototype.Pc;Zk.prototype.isLive=Zk.prototype.T;Zk.prototype.offset=Zk.prototype.offset;Zk.prototype.notifyMaxSegmentDuration=Zk.prototype.Hg;Zk.prototype.notifyMinSegmentStartTime=Zk.prototype.Ye;Zk.prototype.getInitialProgramDateTime=Zk.prototype.qj;Zk.prototype.setInitialProgramDateTime=Zk.prototype.wi;Zk.prototype.isStartTimeLocked=Zk.prototype.Yj;Zk.prototype.lockStartTime=Zk.prototype.Te;
439
- Zk.prototype.getMaxSegmentEndTime=Zk.prototype.xj;Zk.prototype.notifyPeriodDuration=Zk.prototype.di;Zk.prototype.notifySegments=Zk.prototype.Vd;Zk.prototype.notifyTimeRange=Zk.prototype.ei;Zk.prototype.getDelay=Zk.prototype.mj;Zk.prototype.setDelay=Zk.prototype.Yg;Zk.prototype.getSegmentAvailabilityDuration=Zk.prototype.He;Zk.prototype.setSegmentAvailabilityDuration=Zk.prototype.mf;Zk.prototype.setStatic=Zk.prototype.Vc;Zk.prototype.setClockOffset=Zk.prototype.si;
440
- Zk.prototype.getPresentationStartTime=Zk.prototype.Aj;Zk.prototype.setDuration=Zk.prototype.vb;Zk.prototype.setPresentationStartTime=Zk.prototype.zi;Zk.prototype.getMaxSegmentDuration=Zk.prototype.wj;Zk.prototype.getDuration=Zk.prototype.getDuration;function $k(a,b,c){this.j=c;this.l=a;this.u=al(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.B=b;this.i=function(){}}$k.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function bl(a,b){a.i=b}function cl(a){this.g=a}function al(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(nj(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 dl(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.C=b;this.m=c;this.l=new td;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.u=!1;this.l.o(a,"waiting",function(){return el(f)});this.s=(new Yb(function(){el(f)})).Aa(this.m.gapJumpTimerTime)}dl.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.s&&(this.s.stop(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.B=null};dl.prototype.Kg=function(){this.u=!0;el(this)};
438
+ Zk.prototype.getSegmentAvailabilityStart=Zk.prototype.Ib;Zk.prototype.isInProgress=Zk.prototype.Rc;Zk.prototype.isLive=Zk.prototype.T;Zk.prototype.offset=Zk.prototype.offset;Zk.prototype.notifyMaxSegmentDuration=Zk.prototype.Gg;Zk.prototype.notifyMinSegmentStartTime=Zk.prototype.Ye;Zk.prototype.getInitialProgramDateTime=Zk.prototype.qj;Zk.prototype.setInitialProgramDateTime=Zk.prototype.wi;Zk.prototype.isStartTimeLocked=Zk.prototype.Yj;Zk.prototype.lockStartTime=Zk.prototype.Te;
439
+ Zk.prototype.getMaxSegmentEndTime=Zk.prototype.xj;Zk.prototype.notifyPeriodDuration=Zk.prototype.di;Zk.prototype.notifySegments=Zk.prototype.Vd;Zk.prototype.notifyTimeRange=Zk.prototype.ei;Zk.prototype.getDelay=Zk.prototype.mj;Zk.prototype.setDelay=Zk.prototype.Yg;Zk.prototype.getSegmentAvailabilityDuration=Zk.prototype.He;Zk.prototype.setSegmentAvailabilityDuration=Zk.prototype.lf;Zk.prototype.setStatic=Zk.prototype.Xc;Zk.prototype.setClockOffset=Zk.prototype.si;
440
+ Zk.prototype.getPresentationStartTime=Zk.prototype.Aj;Zk.prototype.setDuration=Zk.prototype.vb;Zk.prototype.setPresentationStartTime=Zk.prototype.zi;Zk.prototype.getMaxSegmentDuration=Zk.prototype.wj;Zk.prototype.getDuration=Zk.prototype.getDuration;function $k(a,b,c){this.j=c;this.l=a;this.u=al(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.B=b;this.i=function(){}}$k.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function bl(a,b){a.i=b}function cl(a){this.g=a}function al(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(nj(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 dl(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.C=b;this.m=c;this.l=new td;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.u=!1;this.l.o(a,"waiting",function(){return el(f)});this.s=(new Yb(function(){el(f)})).Aa(this.m.gapJumpTimerTime)}dl.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.s&&(this.s.stop(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.B=null};dl.prototype.Jg=function(){this.u=!0;el(this)};
441
441
  function el(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=al(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.B&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=oj(c,b,a.m.gapDetectionThreshold),
442
442
  null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||cc()||ec())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.C.Wb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.B(new T("gapjumped")))}}}};function fl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=gl.value().get(b),c.sa(a,b,d))}var gl=new Qb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function hl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new td;this.i=new il(a);fl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){jl(e,e.j())})}hl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function kl(a){return a.s?a.g.currentTime:a.j()}
443
443
  function ll(a,b){0<a.g.readyState?ml(a.i,b):fl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){jl(a,a.j())})}function jl(a,b){.001>Math.abs(a.g.currentTime-b)?nl(a):(a.h.sa(a.g,"seeking",function(){nl(a)}),ml(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function nl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
444
- function il(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Yb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}il.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function ml(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Aa(.1)};function ol(a){this.h=a;this.j=!1;this.g=null;this.i=new td}q=ol.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;fl(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Hf=function(a){this.g=this.j?this.g:a};
444
+ function il(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Yb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}il.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function ml(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Aa(.1)};function ol(a){this.h=a;this.j=!1;this.g=null;this.i=new td}q=ol.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;fl(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Gf=function(a){this.g=this.j?this.g:a};
445
445
  q.qe=function(){return(this.j?this.h.currentTime:this.g)||0};q.ph=function(){return 0};q.oh=function(){return 0};q.ci=function(){};
446
446
  function pl(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.u=null;this.s=ql(a,c,f);this.j=new dl(a,b.presentationTimeline,c,this.s,f);this.h=new hl(a,function(){a:{var h=g.j;h.j=!0;h.u=!1;var k=kl(g.h);h=rl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!kc()||kc()&&tc())k=!0;else{var l=Date.now()/1E3,m=kc()&&dc("Fuchsia")?3:1;if(!g.u||g.u<l-m)g.u=l,k=!0}if(k){ll(g.h,h);h=void 0;break a}}g.B();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
447
447
  !k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.dc():g.g.Wb():0>h&&(h=g.g.Wb()+h);return sl(g,tl(g,h))});this.m=new Yb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=kl(g.h),k=g.g.dc(),l=g.g.Wb();3>l-k&&(k=l-3);h<k&&(h=rl(g,h),g.i.currentTime=h)}})}q=pl.prototype;q.ready=function(){this.m.Aa(.25)};
448
- 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.Hf=function(a){ll(this.h,a)};q.qe=function(){var a=kl(this.h);return 0<this.i.readyState&&!this.i.paused?tl(this,a):a};q.ph=function(){return this.s?this.s.s:0};q.oh=function(){return this.j.G};q.ci=function(){this.j.Kg()};function sl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
448
+ 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.Gf=function(a){ll(this.h,a)};q.qe=function(){var a=kl(this.h);return 0<this.i.readyState&&!this.i.paused?tl(this,a):a};q.ph=function(){return this.s?this.s.s:0};q.oh=function(){return this.j.G};q.ci=function(){this.j.Jg()};function sl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
449
449
  function rl(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.dc(),f=a.g.Wb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Md(c),k=a.g.Md(d);c=a.g.Md(c+d);return b>=g?sl(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?lj(a.i.buffered,k)?k:c:b>=h||lj(a.i.buffered,b)?b:c}function tl(a,b){var c=a.g.dc();if(b<c)return c;a=a.g.Wb();return b>a?a:b}
450
450
  function ql(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new $k(new cl(a),b.stallThreshold,c);bl(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function ul(a){this.g=a;this.m=null;this.i=0;this.s=!1}q=ul.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.fk=function(){this.s=!0};q.Ub=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Bg(a){return a.g[0]||null}
451
451
  q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
452
452
  q.Ve=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};q.Ud=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ve(a);this.ab(b)};q.ab=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
453
453
  q.gd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new fj(a.startTime,b,a.G,a.eb,a.Ma,a.na,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
454
- q.tf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Yb(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Aa(a))};ul.prototype[Symbol.iterator]=function(){return this.cc(0)};
454
+ q.rf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Yb(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Aa(a))};ul.prototype[Symbol.iterator]=function(){return this.cc(0)};
455
455
  ul.prototype.cc=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return bb("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new vl(this,d,f,c)};function wl(a,b,c){a=new fj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new ul([a])}
456
- S("shaka.media.SegmentIndex",ul);ul.forSingleSegment=wl;ul.prototype.getIteratorForTime=ul.prototype.cc;ul.prototype.updateEvery=ul.prototype.tf;ul.prototype.fit=ul.prototype.gd;ul.prototype.evict=ul.prototype.ab;ul.prototype.mergeAndEvict=ul.prototype.Ud;ul.prototype.offset=ul.prototype.offset;ul.prototype.get=ul.prototype.get;ul.prototype.find=ul.prototype.find;ul.prototype.markImmutable=ul.prototype.fk;ul.prototype.release=ul.prototype.release;ul.prototype.getNumEvicted=ul.prototype.getNumEvicted;
456
+ S("shaka.media.SegmentIndex",ul);ul.forSingleSegment=wl;ul.prototype.getIteratorForTime=ul.prototype.cc;ul.prototype.updateEvery=ul.prototype.rf;ul.prototype.fit=ul.prototype.gd;ul.prototype.evict=ul.prototype.ab;ul.prototype.mergeAndEvict=ul.prototype.Ud;ul.prototype.offset=ul.prototype.offset;ul.prototype.get=ul.prototype.get;ul.prototype.find=ul.prototype.find;ul.prototype.markImmutable=ul.prototype.fk;ul.prototype.release=ul.prototype.release;ul.prototype.getNumEvicted=ul.prototype.getNumEvicted;
457
457
  ul.prototype.getNumReferences=ul.prototype.getNumReferences;function vl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}q=vl.prototype;q.zd=function(a){this.reverse=a};q.aj=function(){return this.h};q.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.u&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
458
458
  q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.u&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.Rg=function(){var a=this.current();if(a.s&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
459
459
  S("shaka.media.SegmentIterator",vl);vl.prototype.resetToLastIndependent=vl.prototype.Rg;vl.prototype.next=vl.prototype.next;vl.prototype.current=vl.prototype.current;vl.prototype.currentPosition=vl.prototype.aj;vl.prototype.setReverse=vl.prototype.zd;function xl(){ul.call(this,[]);this.h=[]}na(xl,ul);q=xl.prototype;q.clone=function(){var a=new xl;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
460
460
  q.Ub=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ub(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Ve=function(){};
461
- q.ab=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.ab(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.Ud=function(){};q.gd=function(){};q.tf=function(){};S("shaka.media.MetaSegmentIndex",xl);xl.prototype.updateEvery=xl.prototype.tf;xl.prototype.fit=xl.prototype.gd;xl.prototype.mergeAndEvict=xl.prototype.Ud;xl.prototype.evict=xl.prototype.ab;xl.prototype.merge=xl.prototype.Ve;xl.prototype.offset=xl.prototype.offset;
462
- xl.prototype.get=xl.prototype.get;xl.prototype.find=xl.prototype.find;xl.prototype.forEachTopLevelReference=xl.prototype.Ub;xl.prototype.release=xl.prototype.release;function yl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ge();this.h=new Yb(function(){b.g.bi(.25*b.i)})}yl.prototype.release=function(){this.set(this.Jc());this.h&&(this.h.stop(),this.h=null);this.g=null};yl.prototype.set=function(a){this.i=a;zl(this)};yl.prototype.Jc=function(){return this.g.Jc()};function zl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ge()!=b&&a.g.bh(b);return}catch(c){}a.h.Aa(.25);0!=a.g.Ge()&&a.g.bh(0)};function Al(a){var b=this;this.h=a;this.g=new Set;this.i=(new Yb(function(){Bl(b,!1)})).Aa(.25)}Al.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Bl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Cl(){this.g=null;this.h=[]}function Dl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function El(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 Fl(){this.i=this.h=null;this.g=[]}function Gl(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 Hl(){this.Fc=this.Xh=this.u=this.B=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.S=this.U=this.M=this.O=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new Cl;this.h=new Fl};function Il(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function Jl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
463
- function Kl(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.cc(b,!0,a.s));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.Ma&&(d=!1);2==c.vc()&&(d=!1);c.Kc()&&(d=!1);d&&c.na&&b.push(Ll(a,c.na));d&&!a.h.has(c)&&(d=new Ml(a.l),b.push(Nl(d,c,a.i)),a.h.set(c,d))}Ol(a);return Promise.all(b)}
464
- function Ll(a,b){if(!a.i.segmentIndex||b.Kc()||Array.from(a.j.keys()).some(function(e){return ej(e,b)}))return Promise.resolve();var c=new Ml(a.l),d=Nl(c,b,a.i);a.j.set(b,c);return d}function Pl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Ql(a,c)}function Rl(a){Pl(a,a.h);Pl(a,a.j);a.g=null}Il.prototype.ab=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Ql(this,d);b&&Ol(this)};
465
- Il.prototype.zd=function(a){this.s=a;this.g&&this.g.zd(a)};function Ol(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={zg:void 0},d=c.next())e.zg=d.value,b.some(function(f){return function(g){return ej(g.na,f.zg)}}(e))||Ql(a,e.zg)}function Sl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Ql(a,d)}Ol(a)}function Tl(a,b){b&&b!==a.i&&(Rl(a),a.i=b)}function Ql(a,b){var c=a.h;b instanceof dj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
466
- function Ml(a){this.g=a;this.Wd=this.gh=null}function Nl(a,b,c){var d=new Uint8Array(0);a.Wd=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Oc(d,e):d=e,a.gh?H(f,a.gh(d),3):f.A(0);d=new Uint8Array(0);I(f)})});return a.Wd.promise.catch(function(e){return e instanceof U&&7001==e.code?Promise.resolve():Promise.reject(e)})}Ml.prototype.abort=function(){this.Wd&&this.Wd.abort()};function Ul(a){jb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Yb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Aa(2)}na(Ul,jb);Ul.prototype.release=function(){this.g.clear();this.h.stop();jb.prototype.release.call(this)};function Vl(a){jb.call(this);this.g=new Map;this.h=a}na(Vl,jb);Vl.prototype.release=function(){this.g.clear();jb.prototype.release.call(this)};function Wl(a,b){var c=a.g.get(b);c||(c={Zd:[],Vf:null,contentType:b},a.g.set(b,c));return c}function Xl(a,b,c){var d=Wl(a,b.contentType);Yl(a,d);a={qd:b,position:c};d=d.Zd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
467
- Vl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Vf;a:{var e=c.Zd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.qd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
468
- g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Td(d.roles,e.roles);(g||h||d)&&Zl(this,a,e.contentType)&&(c.Vf=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Zl(this,a,e.contentType)&&(c.Vf=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
461
+ q.ab=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.ab(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.Ud=function(){};q.gd=function(){};q.rf=function(){};S("shaka.media.MetaSegmentIndex",xl);xl.prototype.updateEvery=xl.prototype.rf;xl.prototype.fit=xl.prototype.gd;xl.prototype.mergeAndEvict=xl.prototype.Ud;xl.prototype.evict=xl.prototype.ab;xl.prototype.merge=xl.prototype.Ve;xl.prototype.offset=xl.prototype.offset;
462
+ xl.prototype.get=xl.prototype.get;xl.prototype.find=xl.prototype.find;xl.prototype.forEachTopLevelReference=xl.prototype.Ub;xl.prototype.release=xl.prototype.release;function yl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ge();this.h=new Yb(function(){b.g.bi(.25*b.i)})}yl.prototype.release=function(){this.set(this.Lc());this.h&&(this.h.stop(),this.h=null);this.g=null};yl.prototype.set=function(a){this.i=a;zl(this)};yl.prototype.Lc=function(){return this.g.Lc()};function zl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ge()!=b&&a.g.bh(b);return}catch(c){}a.h.Aa(.25);0!=a.g.Ge()&&a.g.bh(0)};function Al(a){var b=this;this.h=a;this.g=new Set;this.i=(new Yb(function(){Bl(b,!1)})).Aa(.25)}Al.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Bl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Cl(){this.g=null;this.h=[]}function Dl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function El(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 Fl(){this.i=this.h=null;this.g=[]}function Gl(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 Hl(){this.Gc=this.Xh=this.u=this.B=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.S=this.U=this.M=this.O=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new Cl;this.h=new Fl};function Il(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function Jl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
463
+ function Kl(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.cc(b,!0,a.s));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.Ma&&(d=!1);2==c.vc()&&(d=!1);c.Mc()&&(d=!1);d&&c.na&&b.push(Ll(a,c.na));d&&!a.h.has(c)&&(d=new Ml(a.l),b.push(Nl(d,c,a.i)),a.h.set(c,d))}Ol(a);return Promise.all(b)}
464
+ function Ll(a,b){if(!a.i.segmentIndex||b.Mc()||Array.from(a.j.keys()).some(function(e){return ej(e,b)}))return Promise.resolve();var c=new Ml(a.l),d=Nl(c,b,a.i);a.j.set(b,c);return d}function Pl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Ql(a,c)}function Rl(a){Pl(a,a.h);Pl(a,a.j);a.g=null}Il.prototype.ab=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Ql(this,d);b&&Ol(this)};
465
+ Il.prototype.zd=function(a){this.s=a;this.g&&this.g.zd(a)};function Ol(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={yg:void 0},d=c.next())e.yg=d.value,b.some(function(f){return function(g){return ej(g.na,f.yg)}}(e))||Ql(a,e.yg)}function Sl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Ql(a,d)}Ol(a)}function Tl(a,b){b&&b!==a.i&&(Rl(a),a.i=b)}function Ql(a,b){var c=a.h;b instanceof dj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
466
+ function Ml(a){this.g=a;this.Wd=this.gh=null}function Nl(a,b,c){var d=new Uint8Array(0);a.Wd=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Oc(d,e):d=e,a.gh?H(f,a.gh(d),3):f.A(0);d=new Uint8Array(0);I(f)})});return a.Wd.promise.catch(function(e){return e instanceof U&&7001==e.code?Promise.resolve():Promise.reject(e)})}Ml.prototype.abort=function(){this.Wd&&this.Wd.abort()};function Ul(a){jb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Yb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Aa(2)}na(Ul,jb);Ul.prototype.release=function(){this.g.clear();this.h.stop();jb.prototype.release.call(this)};function Vl(a){jb.call(this);this.g=new Map;this.h=a}na(Vl,jb);Vl.prototype.release=function(){this.g.clear();jb.prototype.release.call(this)};function Wl(a,b){var c=a.g.get(b);c||(c={Zd:[],Uf:null,contentType:b},a.g.set(b,c));return c}function Xl(a,b,c){var d=Wl(a,b.contentType);Yl(a,d);a={qd:b,position:c};d=d.Zd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
467
+ Vl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Uf;a:{var e=c.Zd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.qd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
468
+ g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Td(d.roles,e.roles);(g||h||d)&&Zl(this,a,e.contentType)&&(c.Uf=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Zl(this,a,e.contentType)&&(c.Uf=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
469
469
  function Zl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Yl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Zd;b.Zd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Zd=[]}
470
470
  function $l(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
471
471
  a.language);return b};function am(a){var b=Jf(a),c=b.split("/")[0];a=Kf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,fe:null,colorGamut:null,frameRate:null}}
@@ -488,39 +488,39 @@ q.start=function(a){var b=this;return P(function(c){if(1==c.g)return H(c,om(b,a|
488
488
  function sm(a){var b=a.i.get(Wc);b&&(jm(b),km(b).catch(function(){}),a.G=a.i.get(Wc),a.i.delete(Wc));a.u=null}function tm(a,b){for(var c=0>a.g.Wa(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.zd(c),e.ea&&e.ea.zd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.zd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Ac&&(um(a,b,!1,0,!1),c.Ac=d);else if(b=c.Ac)c.Ac=null,um(a,b,!0,0,!1)}
489
489
  function vm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.H&&(b.video&&um(a,b.video,c,d,e,f),b.audio&&um(a,b.audio,c,d,e,f))}function wm(a,b){P(function(c){if(1==c.g)return a.G=null,a.u=b,a.H?b.segmentIndex?c.A(2):H(c,b.createSegmentIndex(),2):c.return();um(a,b,!0,0,!1);I(c)})}function xm(a,b){for(var c=t(a.I.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.I.delete(d))}}
490
490
  function um(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Wc?g&&(g.Ac&&(b.trickModeVideo?(g.Ac=b,b=b.trickModeVideo):g.Ac=null),g.stream!=b||e)&&(a.s.has(b)?g.ea=a.s.get(b):g.ea&&Tl(g.ea,b),b.type==Wc&&(e=zf(b.mimeType,b.codecs),pk(a.g.oa,e,a.l.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Za?(e="("+g.type+":"+g.stream.id+")",a.I.has(e)||a.I.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=
491
- b,g.va=null,g.rh=!!f,e?ym(a,!0,!1):(c?g.Fd?g.Af=!0:g.Za?(g.Ec=!0,g.ye=d,g.Af=!0):(jm(g),zm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Za||g.wb||rm(a,g,0),Am(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):pm(a,b)}
491
+ b,g.va=null,g.rh=!!f,e?ym(a,!0,!1):(c?g.Fd?g.zf=!0:g.Za?(g.Fc=!0,g.ye=d,g.zf=!0):(jm(g),zm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Za||g.wb||rm(a,g,0),Am(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):pm(a,b)}
492
492
  function Am(a,b){var c,d;return P(function(e){if(1==e.g){if(!b.Cb)return e.return();c=b.stream;d=b.Cb;return c.segmentIndex?e.A(2):H(e,c.createSegmentIndex(),2)}if(b.Cb!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=wk(a.g.oa,b.type),h=b.stream.segmentIndex.find(b.jb?b.jb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ma?k.Ma-k.eb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.na)&&(h+=(k.Ma?k.Ma-k.eb:null)||0),k=a.g.getBandwidthEstimate(),
493
493
  f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.Cb.h.g>h?!0:!1):f=!1;f&&b.Cb.abort();I(e)})}
494
494
  q.xd=function(){if(this.g)for(var a=this.g.Ld(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.oa;d==Wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=vk(e,d),e=lj(e,a));if(!e){c.ea&&(c.ea.g=null);if("audio"===c.type){e=t(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.va=null;(null!=wk(this.g.oa,d)||c.Za)&&Bm(this,c);c.Cb&&(c.Cb.abort(),c.Cb=null);d===Wc&&(d=this.g.oa,d.J&&d.J.g());c.xd=!0}}};
495
- function Bm(a,b){b.Fd||b.Ec||(b.Za?(b.Ec=!0,b.ye=0):null==uk(a.g.oa,b.type)?null==b.wb&&rm(a,b,0):(jm(b),zm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
495
+ function Bm(a,b){b.Fd||b.Fc||(b.Za?(b.Fc=!0,b.ye=0):null==uk(a.g.oa,b.type)?null==b.wb&&rm(a,b,0):(jm(b),zm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
496
496
  function om(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g){c=Yc;if(!a.j)throw new U(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ia,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.xa,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Oa,a.u),e.add(a.u));f=a.g.oa;return H(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Lh(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=qm(a,l),b.has(l.id)&&(n=
497
- b.get(l.id),Jl(n,function(r,u,w){return Cm(r,u,w||null,a.h.retryParameters,a.g.kc)}),m.ea=n),a.i.set(k,m),rm(a,m,0));I(p)})}function qm(a,b){return{stream:b,type:b.type,va:null,ea:lm(a,b),jb:null,od:null,Se:null,Re:null,Qe:null,Ac:null,endOfStream:!1,Za:!1,wb:null,Ec:!1,ye:0,Af:!1,Fd:!1,xd:!0,Pg:!1,Od:!1,Cb:null}}
497
+ b.get(l.id),Jl(n,function(r,u,w){return Cm(r,u,w||null,a.h.retryParameters,a.g.kc)}),m.ea=n),a.i.set(k,m),rm(a,m,0));I(p)})}function qm(a,b){return{stream:b,type:b.type,va:null,ea:lm(a,b),jb:null,od:null,Se:null,Re:null,Qe:null,Ac:null,endOfStream:!1,Za:!1,wb:null,Fc:!1,ye:0,zf:!1,Fd:!1,xd:!0,Pg:!1,Od:!1,Cb:null}}
498
498
  function lm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Wc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Wc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ea)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Il(a.h.segmentPrefetchLimit,b,function(d,e,f){return Cm(d,e,f||null,a.h.retryParameters,a.g.kc)},0>a.g.Wa()):null}
499
499
  function mm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={Fb:void 0},e=d.next())if(f.Fb=e.value,f.Fb.audio)if(a.s.has(f.Fb.audio)){if(e=a.s.get(f.Fb.audio),Sl(e,b),!(0<b&&c.some(function(h){return function(k){return ad(h.Fb.audio.language,k)}}(f)))){var g=a.i.get(f.Fb.audio.type);e!==(g&&g.ea)&&Rl(e);a.s.delete(f.Fb.audio)}}else 0>=b||!c.some(function(h){return function(k){return ad(h.Fb.audio.language,k)}}(f))||!(e=lm(a,f.Fb.audio))||
500
500
  (f.Fb.audio.segmentIndex||f.Fb.audio.createSegmentIndex(),a.s.set(f.Fb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.oa.vb(a):this.g.oa.vb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
501
- function Dm(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Lh(a.m);if(b.Za||null==b.wb||b.Fd)return k.return();b.wb=null;if(!b.Ec){k.A(2);break}return H(k,zm(a,b,b.Af,b.ye),3);case 3:return k.return();case 2:xm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return H(k,b.stream.createSegmentIndex(),7);case 7:xa(k,6);break;case 5:return d=ya(k),H(k,Em(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Za||b.wb||
501
+ function Dm(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Lh(a.m);if(b.Za||null==b.wb||b.Fd)return k.return();b.wb=null;if(!b.Fc){k.A(2);break}return H(k,zm(a,b,b.zf,b.ye),3);case 3:return k.return();case 2:xm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return H(k,b.stream.createSegmentIndex(),7);case 7:xa(k,6);break;case 5:return d=ya(k),H(k,Em(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Za||b.wb||
502
502
  rm(a,b,0),k.return();case 4:ta(k,9);e=Fm(a,b);null!=e&&(rm(a,b,e),b.Od=!1);xa(k,10);break;case 9:return f=ya(k),H(k,Em(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.H||!g.every(function(l){return l.endOfStream})){k.A(0);break}return H(k,a.g.oa.endOfStream(),13);case 13:Lh(a.m),h=a.g.oa.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.vb(h),I(k)}})}
503
503
  function Fm(a,b){if(Gm(b))return Lk(a.g.oa,b.stream.originalId||""),null;b.type==Wc&&Mk(a.g.oa);if(b.stream.isAudioMuxedInVideo)return null;if(!sk(a.g.oa)&&b.type!=Wc)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.ab(c,!0),Kl(e,c);d=b.jb?b.jb.endTime:c;var f=xk(a.g.oa,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),h=a.l.presentationTimeline.getDuration()-
504
504
  d;e=wk(a.g.oa,b.type);if(1E-6>h&&e)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Wc))&&Gm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.va;e=Hm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.rh&&(f=!0,b.rh=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Gm(k)||k.va&&!k.va.current()||(g=Math.min(g,k.jb?k.jb.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;
505
505
  b.ea&&b.va&&!a.s.has(b.stream)&&(b.ea.ab(e.startTime),Kl(b.ea,e.startTime));Im(a,b,c,e,f).catch(function(){});return null}
506
506
  function Hm(a,b,c,d){if(b.va)return b.va.current();if(b.jb||d)return c=b.jb?b.jb.endTime:d,a=0>a.g.Wa(),b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.cc(c,!1,a)),b.va&&b.va.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Wa();var f=null;d&&(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.cc(e,!1,a)),f=b.va&&b.va.next().value);f||(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.cc(c,!1,a)),f=b.va&&b.va.next().value);return f}
507
507
  function Im(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C;return P(function(D){switch(D.g){case 1:f=Yc;g=b.stream;h=b.va;b.Za=!0;ta(D,2);if(2==d.vc())throw new U(1,1,1011);return H(D,Jm(a,b,d,e),4);case 4:Lh(a.m);if(a.B)return D.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),w=u=!1,z=function(E){var F,K,G,J;return P(function(M){switch(M.g){case 1:if(u)return M.return();
508
- w=!0;Lh(a.m);if(a.B)return M.return();ta(M,2);r=Km(r,E);F=!1;K=0;(new Rh).box("mdat",function(O){K=O.size+O.start;F=!0}).parse(r,!1,!0);if(!F){M.A(4);break}G=r.subarray(0,K);r=r.subarray(K);return H(M,Lm(a,b,c,g,d,G,!0,e),5);case 5:b.ea&&b.va&&Kl(b.ea,d.startTime,!0);case 4:xa(M,0);break;case 2:v=J=ya(M),I(M)}})},H(D,Mm(a,b,d,z),9);n=Mm(a,b,d);return H(D,n,7);case 7:p=D.h;Lh(a.m);if(a.B)return D.return();Lh(a.m);return b.Ec?(b.Za=!1,rm(a,b,0),D.return()):H(D,Lm(a,b,c,g,d,p,!1,e),6);case 9:y=D.h;if(v)throw v;
509
- if(w){D.A(10);break}u=!0;Lh(a.m);return a.B?D.return():b.Ec?(b.Za=!1,rm(a,b,0),D.return()):H(D,Lm(a,b,c,g,d,y,!1,e),10);case 10:b.ea&&b.va&&Kl(b.ea,d.startTime,!0);case 6:Lh(a.m);if(a.B)return D.return();b.jb=d;h.next();b.Za=!1;b.Pg=!1;B=a.g.oa.Vb();A=B[b.type];gb(JSON.stringify(A));b.Ec||a.g.Kg(d,b.stream);rm(a,b,0);xa(D,0);break;case 2:C=ya(D);Lh(a.m,C);if(a.B)return D.return();b.Za=!1;if(7001==C.code)b.Za=!1,jm(b),rm(a,b,0),D.A(0);else if(b.type==f.Oa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Oa),
508
+ w=!0;Lh(a.m);if(a.B)return M.return();ta(M,2);r=Km(r,E);F=!1;K=0;(new Rh).box("mdat",function(O){K=O.size+O.start;F=!0}).parse(r,!1,!0);if(!F){M.A(4);break}G=r.subarray(0,K);r=r.subarray(K);return H(M,Lm(a,b,c,g,d,G,!0,e),5);case 5:b.ea&&b.va&&Kl(b.ea,d.startTime,!0);case 4:xa(M,0);break;case 2:v=J=ya(M),I(M)}})},H(D,Mm(a,b,d,z),9);n=Mm(a,b,d);return H(D,n,7);case 7:p=D.h;Lh(a.m);if(a.B)return D.return();Lh(a.m);return b.Fc?(b.Za=!1,rm(a,b,0),D.return()):H(D,Lm(a,b,c,g,d,p,!1,e),6);case 9:y=D.h;if(v)throw v;
509
+ if(w){D.A(10);break}u=!0;Lh(a.m);return a.B?D.return():b.Fc?(b.Za=!1,rm(a,b,0),D.return()):H(D,Lm(a,b,c,g,d,y,!1,e),10);case 10:b.ea&&b.va&&Kl(b.ea,d.startTime,!0);case 6:Lh(a.m);if(a.B)return D.return();b.jb=d;h.next();b.Za=!1;b.Pg=!1;B=a.g.oa.Vb();A=B[b.type];gb(JSON.stringify(A));b.Fc||a.g.Jg(d,b.stream);rm(a,b,0);xa(D,0);break;case 2:C=ya(D);Lh(a.m,C);if(a.B)return D.return();b.Za=!1;if(7001==C.code)b.Za=!1,jm(b),rm(a,b,0),D.A(0);else if(b.type==f.Oa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Oa),
510
510
  D.A(0);else{if(3017==C.code)return H(D,Nm(a,b,C),0);b.Od=!0;1==C.category&&b.ea&&Ql(b.ea,d);C.severity=2;return H(D,Em(a,b,C),0)}}})}function Km(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
511
511
  function Nm(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Pg}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.C);if(20<h)a.C-=.2;else if(4<h)a.C-=.04;else return b.Od=!0,a.B=!0,a.g.onError(c),l.return();b.Pg=!0;k=a.g.Ld();return H(l,Om(a,b,k),2)}rm(a,b,4);I(l)})}
512
- function Jm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B;return P(function(A){switch(A.g){case 1:e=Yc;f=null==b.jb;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.P)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=If(l);n=Jf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Se&&h==b.Re&&k==b.Qe&&m==b.Dg&&n==b.Eg){A.A(2);break}r=b.Dg&&b.Eg&&Yk(a.g.oa,b.type,n,l);if(!r){A.A(3);break}u=null;b.type===e.xa?u=a.i.get(e.ia):b.type===e.ia&&(u=a.i.get(e.xa));if(!u){A.A(3);
512
+ function Jm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B;return P(function(A){switch(A.g){case 1:e=Yc;f=null==b.jb;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.P)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=If(l);n=Jf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Se&&h==b.Re&&k==b.Qe&&m==b.Cg&&n==b.Dg){A.A(2);break}r=b.Cg&&b.Dg&&Yk(a.g.oa,b.type,n,l);if(!r){A.A(3);break}u=null;b.type===e.xa?u=a.i.get(e.ia):b.type===e.ia&&(u=a.i.get(e.xa));if(!u){A.A(3);
513
513
  break}return H(A,km(u).catch(function(){}),5);case 5:u.od=null,Bm(a,u);case 3:return H(A,Pm(a,b,p,h,k,c,m,n),2);case 2:return ej(c.na,b.od)||(b.od=c.na,c.l&&c.na&&(w=Mm(a,b,c.na),v=function(){var C,D,E,F,K,G,J;return P(function(M){switch(M.g){case 1:return ta(M,2),H(M,w,4);case 4:return C=M.h,Lh(a.m),D=null,E=new Map,F={projection:null,hfov:null},K=new Rh,K.box("moov",Yh).box("trak",Yh).box("mdia",Yh).X("mdhd",function(O){D=Cj(O.reader,O.version).timescale}).box("hdlr",function(O){O=O.reader;O.skip(8);
514
- switch(O.Sc()){case "soun":E.set(e.ia,D);break;case "vide":E.set(e.xa,D)}D=null}).box("minf",Yh).box("stbl",Yh).X("stsd",$h).box("encv",ai).box("avc1",ai).box("avc3",ai).box("hev1",ai).box("hvc1",ai).box("dvav",ai).box("dva1",ai).box("dvh1",ai).box("dvhe",ai).box("dvc1",ai).box("dvi1",ai).box("vexu",Yh).box("proj",Yh).X("prji",function(O){O=O.reader.Sc();F.projection=O}).box("hfov",function(O){O=O.reader.V()/1E3;F.hfov=O}).parse(C),Qm(a,F),E.has(b.type)?c.na.timescale=E.get(b.type):null!=D&&(c.na.timescale=
514
+ switch(O.Uc()){case "soun":E.set(e.ia,D);break;case "vide":E.set(e.xa,D)}D=null}).box("minf",Yh).box("stbl",Yh).X("stsd",$h).box("encv",ai).box("avc1",ai).box("avc3",ai).box("hev1",ai).box("hvc1",ai).box("dvav",ai).box("dva1",ai).box("dvh1",ai).box("dvhe",ai).box("dvc1",ai).box("dvi1",ai).box("vexu",Yh).box("proj",Yh).X("prji",function(O){O=O.reader.Uc();F.projection=O}).box("hfov",function(O){O=O.reader.V()/1E3;F.hfov=O}).parse(C),Qm(a,F),E.has(b.type)?c.na.timescale=E.get(b.type):null!=D&&(c.na.timescale=
515
515
  D),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,H(M,a.g.wh(b.type,C),5);case 5:return H(M,zk(a.g.oa,b.type,C,null,b.stream,G,b.xd,d),6);case 6:xa(M,0);break;case 2:throw J=ya(M),b.od=null,J;}})},z=c.startTime,f&&(y=wk(a.g.oa,b.type),null!=y&&(z=y)),a.g.ik(z,c.na),g.push(v()))),a.l.sequenceMode&&(B=b.jb?b.jb.i:null,c.i!=B&&g.push(Rk(a.g.oa,b.type,c.startTime))),H(A,Promise.all(g),0)}})}
516
- function Pm(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(p){if(1==p.g)return k=Yc,l=new Map,a.j.audio&&l.set(k.ia,a.j.audio),a.j.video&&l.set(k.xa,a.j.video),ta(p,2),b.Re=d,b.Qe=e,g&&(b.Dg=g),h&&(b.Eg=h),b.Se=c,m=a.l.sequenceMode||"HLS"==a.l.type,H(p,Pk(a.g.oa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return xa(p,0);n=ya(p);b.Re=null;b.Qe=null;b.Dg=null;b.Eg=null;b.Se=null;throw n;})}
516
+ function Pm(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(p){if(1==p.g)return k=Yc,l=new Map,a.j.audio&&l.set(k.ia,a.j.audio),a.j.video&&l.set(k.xa,a.j.video),ta(p,2),b.Re=d,b.Qe=e,g&&(b.Cg=g),h&&(b.Dg=h),b.Se=c,m=a.l.sequenceMode||"HLS"==a.l.type,H(p,Pk(a.g.oa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return xa(p,0);n=ya(p);b.Re=null;b.Qe=null;b.Cg=null;b.Dg=null;b.Se=null;throw n;})}
517
517
  function Lm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r;return P(function(u){switch(u.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.h.shouldFixTimestampOffset&&(m="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,n=null,e.na&&(n=e.na.timescale),(p=m&&n&&"video"===d.type&&"DASH"==a.l.type)&&(l=new Rh),p&&l.box("moof",Yh).box("traf",Yh).X("tfdt",function(w){var v,z,y,B,A,C;return P(function(D){v=Bj(w.reader,w.version);z=v.baseMediaDecodeTime;if(!z)return D.return();
518
518
  y=-z/n;B=Number(b.Se)||0;if(!(B<y))return D.A(0);A=b.Re;C=b.Qe;return H(D,Pm(a,b,y,A,C,e),0)})}),p&&l.parse(f,!1,g)),H(u,Om(a,b,c),2);case 2:return Lh(a.m),r=b.xd,b.xd=!1,H(u,a.g.wh(b.type,f),3);case 3:return H(u,zk(a.g.oa,b.type,f,e,d,k,r,h,g),4);case 4:Lh(a.m),I(u)}})}
519
519
  function Om(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof xl&&d.ab(a.l.presentationTimeline.dc());e=Math.max(a.h.bufferBehind*a.C,a.l.presentationTimeline.h);f=uk(a.g.oa,b.type);if(null==f)return a.G==b&&(a.G=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():H(k,a.g.oa.remove(b.type,f,f+h),2)}if(4!=k.g)return Lh(a.m),a.G?H(k,Om(a,a.G,c),4):k.A(0);Lh(a.m);I(k)})}
520
520
  function Gm(a){return a&&a.type==Wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
521
- function Mm(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.Kc())return l.return(e);f=null;if(b.ea){var m=b.ea,n=m.h;c instanceof dj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.gh=d),f=m.Wd):f=null}f||(f=Cm(c,b.stream,d||null,a.h.retryParameters,a.g.kc));g=0;b.va&&(g=b.va.h);b.Cb=f;return H(l,f.promise,2);case 2:h=l.h;b.Cb=null;k=h.data;if(!c.aesKey){l.A(3);break}return H(l,fm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
521
+ function Mm(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.Mc())return l.return(e);f=null;if(b.ea){var m=b.ea,n=m.h;c instanceof dj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.gh=d),f=m.Wd):f=null}f||(f=Cm(c,b.stream,d||null,a.h.retryParameters,a.g.kc));g=0;b.va&&(g=b.va.h);b.Cb=f;return H(l,f.promise,2);case 2:h=l.h;b.Cb=null;k=h.data;if(!c.aesKey){l.A(3);break}return H(l,fm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
522
522
  function Cm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof fj?a:void 0,h=g?1:0;a=gm(a.R(),a.eb,a.Ma,d,c);a.contentType=b.type;return e.request(Ih,a,{type:h,stream:b,segment:g,isPreload:f})}
523
- function zm(a,b,c,d){var e,f;return P(function(g){if(1==g.g)return b.Ec=!1,b.Af=!1,b.ye=0,b.Fd=!0,b.jb=null,b.va=null,b.ea&&!a.s.has(b.stream)&&Rl(b.ea),d?(e=a.g.Ld(),f=a.g.oa.getDuration(),H(g,a.g.oa.remove(b.type,e+d,f),3)):H(g,Ok(a.g.oa,b.type),4);if(3!=g.g)return Lh(a.m),c?H(g,a.g.oa.flush(b.type),3):g.A(3);Lh(a.m);b.Fd=!1;b.endOfStream=!1;b.Za||b.wb||rm(a,b,0);I(g)})}
523
+ function zm(a,b,c,d){var e,f;return P(function(g){if(1==g.g)return b.Fc=!1,b.zf=!1,b.ye=0,b.Fd=!0,b.jb=null,b.va=null,b.ea&&!a.s.has(b.stream)&&Rl(b.ea),d?(e=a.g.Ld(),f=a.g.oa.getDuration(),H(g,a.g.oa.remove(b.type,e+d,f),3)):H(g,Ok(a.g.oa,b.type),4);if(3!=g.g)return Lh(a.m),c?H(g,a.g.oa.flush(b.type),3):g.A(3);Lh(a.m);b.Fd=!1;b.endOfStream=!1;b.Za||b.wb||rm(a,b,0);I(g)})}
524
524
  function rm(a,b,c){var d=b.type;if(d!=Wc||a.i.has(d))b.wb=(new Xb(function(){var e;return P(function(f){if(1==f.g)return ta(f,2),H(f,Dm(a,b),4);if(2!=f.g)return xa(f,0);e=ya(f);if(a.g)a.g.onError(e);I(f)})})).Y(c)}function jm(a){null!=a.wb&&(a.wb.stop(),a.wb=null)}function km(a){return P(function(b){return a.Cb?H(b,a.Cb.abort(),0):b.A(0)})}
525
525
  function Em(a,b,c){var d;return P(function(e){if(1==e.g)return H(e,kh(a.L),2);Lh(a.m);if(1===c.category&&1003!=c.code){if(b.Ac)return tm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);I(e)})}
526
526
  function ym(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.M<e)return l.return(!1);a.M=d}f=Yc;if(g=a.i.get(f.ia))g.od=null,c&&Bm(a,g),km(g).catch(function(){}),g.va&&g.va.Rg();if(h=a.i.get(f.xa))h.od=null,c&&Bm(a,h),km(h).catch(function(){}),h.va&&h.va.Rg();k=new Map;a.j.audio&&k.set(f.ia,a.j.audio);a.j.video&&k.set(f.xa,a.j.video);return H(l,Xk(a.g.oa,k),2)}!h||
@@ -549,7 +549,7 @@ applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enable
549
549
  function fn(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Sm(a,b,c||bn(),d,"")}
550
550
  function en(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=kd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return bd(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
551
551
  h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Wc&&"image"!=c.type||b.push(c);return b}function cn(a){return Um([a],a)}function dn(a){return Um([a],a)}S("shaka.util.PlayerConfiguration",an);an.mergeConfigObjects=fn;an.createDefault=bn;function gn(a,b,c,d){jb.call(this);this.O=a;this.U=b;this.Ga=d.networkingEngine;this.C=c;this.s=null;this.Ca=0;this.Ta=d.cd;this.H=d.ck;this.Ya=d.dk;this.g=d.config;this.j=this.I=this.h=null;this.ka=!1;this.J=d.pk;this.qa=!1;this.l=null;this.aa=!1;this.i=this.G=null;this.$=!1;this.M=new Map;this.ya=!1;this.Fa=d.nk;this.W=new Hl;this.ba=new lh;this.m=new lh;this.P=null;this.u=!1;this.Ka=d.Yi;this.ma=null;this.Ja=d.Xi;this.S=!1;this.L=[];this.K=[];this.B=!0}na(gn,jb);
552
- function hn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function jn(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function kn(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}q=gn.prototype;q.getStartTime=function(){return this.C};q.jd=function(){return this.O};q.pg=function(){return this.h};function ln(a){a.$=!0;return a.i}function mn(a){a.qa=!0;return a.J}q.getStats=function(){return this.W};
552
+ function hn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function jn(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function kn(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}q=gn.prototype;q.getStartTime=function(){return this.C};q.jd=function(){return this.O};q.og=function(){return this.h};function ln(a){a.$=!0;return a.i}function mn(a){a.qa=!0;return a.J}q.getStats=function(){return this.W};
553
553
  function nn(a){a.aa=!0;return a.l}function on(a){a.ya=!0;return a.M}q.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return H(c,Promise.resolve(),2);case 2:return ta(c,3),H(c,pn(a),5);case 5:return qn(a),H(c,rn(a),6);case 6:return qn(a),H(c,sn(a),7);case 7:qn(a);a.m.resolve();xa(c,0);break;case 3:b=ya(c),a.m.reject(b),I(c)}})})()};q.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):jb.prototype.dispatchEvent.call(this,a)};
554
554
  q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function qn(a){if(a.u)throw new U(2,7,7003);}function tn(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
555
555
  function pn(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:tn(a,"manifest-parser");a.j||(a.I=Yi(a.O,a.U),a.j=a.I(),a.j.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;tn(a,"manifest");if(a.h){f.A(2);break}return H(f,a.j.start(a.O,a.Ya),3);case 3:a.h=f.h;case 2:return a.ba.resolve(),c=new T("manifestparsed",void 0),H(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new U(2,4,4036);un(a.h);d=Date.now()/1E3;e=d-b;a.W.J=e;I(f)}})}
@@ -559,8 +559,8 @@ function sn(a){var b,c,d,e,f,g;return P(function(h){a.s||(a.s=new Vg(a.g.preferr
559
559
  f=a.i.chooseVariant();if(!f)return h.A(0);g=[];a.ma=f;f.video&&g.push(vn(a,f.video,c));f.audio&&g.push(vn(a,f.audio,c));return H(h,Promise.all(g),0)})}
560
560
  function vn(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Il(d,b,function(l,m,n){return Cm(l,m,n||null,a.g.streaming.retryParameters,a.Ga,a.B)},!1),a.M.set(b.id,e),H(k,b.createSegmentIndex(),2);f=a.C||0;(h=(g=b.segmentIndex.cc(f))?g.current():null)||(h=Bg(b.segmentIndex));return h?c?h.na?H(k,Ll(e,h.na),0):k.A(0):H(k,Kl(e,h.startTime),0):k.A(0)})}q.Vk=function(){return this.m};
561
561
  q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ka){e.A(2);break}return H(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.A(4);break}return H(e,a.i.stop(),4);case 4:a.J&&!a.qa&&a.J.release();if(!a.l||a.aa){e.A(6);break}return H(e,a.l.destroy(),6);case 6:if(0<a.M.size&&!a.ya)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,Rl(d);I(e)}})};
562
- function un(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))}S("shaka.media.PreloadManager",gn);gn.prototype.destroy=gn.prototype.destroy;gn.prototype.waitForFinish=gn.prototype.Vk;function wn(a,b){jb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Zc:null,Yc:xn,Nc:function(d,e){return yn(c,"enter",d,e)}},{Zc:zn,Yc:xn,Nc:function(d,e){return yn(c,"enter",d,e)}},{Zc:An,Yc:xn,Nc:function(d,e){return yn(c,"enter",d,e)}},{Zc:xn,Yc:zn,Nc:function(d,e){return yn(c,"exit",d,e)}},{Zc:xn,Yc:An,Nc:function(d,e){return yn(c,"exit",d,e)}},{Zc:zn,Yc:An,Nc:function(d,e){return yn(c,"skip",d,e)}},{Zc:An,Yc:zn,Nc:function(d,e){return yn(c,"skip",d,e)}}];this.h=new td;this.h.o(this.i,
563
- "regionremove",function(d){c.g.delete(d.region)})}na(wn,jb);wn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jb.prototype.release.call(this)};wn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?zn:a>d.endTime?An:xn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Zc==e&&h.Yc==f&&h.Nc(d,b)}}};
562
+ function un(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))}S("shaka.media.PreloadManager",gn);gn.prototype.destroy=gn.prototype.destroy;gn.prototype.waitForFinish=gn.prototype.Vk;function wn(a,b){jb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{$c:null,Zc:xn,Pc:function(d,e){return yn(c,"enter",d,e)}},{$c:zn,Zc:xn,Pc:function(d,e){return yn(c,"enter",d,e)}},{$c:An,Zc:xn,Pc:function(d,e){return yn(c,"enter",d,e)}},{$c:xn,Zc:zn,Pc:function(d,e){return yn(c,"exit",d,e)}},{$c:xn,Zc:An,Pc:function(d,e){return yn(c,"exit",d,e)}},{$c:zn,Zc:An,Pc:function(d,e){return yn(c,"skip",d,e)}},{$c:An,Zc:zn,Pc:function(d,e){return yn(c,"skip",d,e)}}];this.h=new td;this.h.o(this.i,
563
+ "regionremove",function(d){c.g.delete(d.region)})}na(wn,jb);wn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jb.prototype.release.call(this)};wn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?zn:a>d.endTime?An:xn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.$c==e&&h.Zc==f&&h.Pc(d,b)}}};
564
564
  function yn(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var zn=1,xn=2,An=3;function Bn(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new pb(a)).mb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Cn[d])return m.return(e);f=0;g=Ah([a],c);ta(m,2);g.method="HEAD";return H(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return H(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
565
565
  e.toLowerCase().split(";").shift():"")}})}
566
566
  var Cn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
@@ -568,7 +568,7 @@ jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"ima
568
568
  k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
569
569
  function En(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
570
570
  case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Fn(a,b){var c=[];a=t(Gn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Fn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Dn(d,b);c.push(e)}return c}
571
- function Gn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Sf:void 0},c=a.next())d.Sf=c.value,b.some(function(e){return function(f){return $e(e.Sf,f)}}(d))||b.push(d.Sf);return b}
571
+ function Gn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Rf:void 0},c=a.next())d.Rf=c.value,b.some(function(e){return function(f){return $e(e.Rf,f)}}(d))||b.push(d.Rf);return b}
572
572
  function Hn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
573
573
  (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
574
574
  function In(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Oe(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Ue:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id,
@@ -577,16 +577,17 @@ q.append=function(a){var b=Fn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b
577
577
  c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(Kn(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"};q.setTextLanguage=function(){};
578
578
  function Kn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Jn);Jn.prototype.setTextLanguage=Jn.prototype.setTextLanguage;Jn.prototype.setTextVisibility=Jn.prototype.setTextVisibility;Jn.prototype.isTextVisible=Jn.prototype.isTextVisible;Jn.prototype.destroy=Jn.prototype.destroy;Jn.prototype.append=Jn.prototype.append;Jn.prototype.remove=Jn.prototype.remove;
579
579
  Jn.prototype.configure=Jn.prototype.configure;function Ln(){}q=Ln.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};q.setTextLanguage=function(){};S("shaka.text.StubTextDisplayer",Ln);Ln.prototype.setTextLanguage=Ln.prototype.setTextLanguage;Ln.prototype.setTextVisibility=Ln.prototype.setTextVisibility;Ln.prototype.isTextVisible=Ln.prototype.isTextVisible;Ln.prototype.destroy=Ln.prototype.destroy;Ln.prototype.append=Ln.prototype.append;
580
- Ln.prototype.remove=Ln.prototype.remove;Ln.prototype.configure=Ln.prototype.configure;function Mn(a,b,c){var d=this;this.m=!1;this.h=[];this.B=a;this.u=b;this.l=null;this.g=V("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);c&&c.captionsUpdatePeriod||Cd("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Yb(function(){d.B.paused||Nn(d)})).Aa(c&&
581
- c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new td;this.j.o(document,"fullscreenchange",function(){Nn(d,!0)});this.j.o(this.B,"seeking",function(){Nn(d,!0)});this.j.o(this.B,"resize",function(){var e=d.B,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Nn(d,!0)}),this.s.observe(this.g));this.C=new Map}q=Mn.prototype;q.configure=function(a){this.G&&this.G.Aa(a.captionsUpdatePeriod)};
582
- q.append=function(a){var b=[].concat(x(this.h));a=t(Gn(a));for(var c=a.next(),d={};!c.done;d={Tf:void 0},c=a.next())d.Tf=c.value,b.some(function(e){return function(f){return $e(f,e.Tf)}}(d))||this.h.push(d.Tf);Nn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};
583
- q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Nn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};q.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};function On(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
584
- function Pn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Pi:null;l&&(g.push(l.Uf),l.Uc&&g.push(l.Uc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?On(a,n)||(f=!0):(Qn(a,k,e),l=a.i.get(k),n=l.Pi,f=!0));0<k.nestedCues.length&&n&&Pn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
585
- r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.Uc?(d.Uc.contains(c)&&d.Uc.removeChild(c),c.appendChild(d.Uc),d.Uc.appendChild(d.Uf)):c.appendChild(d.Uf)}}function Nn(a,b){if(a.g){var c=a.B.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())sj(d.value);sj(a.g);a.i.clear();a.C.clear()}a.m&&Pn(a,a.h,a.g,c,[])}}
580
+ Ln.prototype.remove=Ln.prototype.remove;Ln.prototype.configure=Ln.prototype.configure;function Mn(a,b,c){var d=this;document.fullscreenEnabled||cb("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.B=a;this.u=b;this.l=null;this.g=V("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);c&&c.captionsUpdatePeriod||
581
+ Cd("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Yb(function(){d.B.paused||Nn(d)})).Aa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new td;this.j.o(document,"fullscreenchange",function(){Nn(d,!0)});this.j.o(this.B,"seeking",function(){Nn(d,!0)});this.j.o(this.B,"resize",function(){var e=d.B,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Nn(d,
582
+ !0)}),this.s.observe(this.g));this.C=new Map}q=Mn.prototype;q.configure=function(a){this.G&&this.G.Aa(a.captionsUpdatePeriod)};q.append=function(a){var b=[].concat(x(this.h));a=t(Gn(a));for(var c=a.next(),d={};!c.done;d={Sf:void 0},c=a.next())d.Sf=c.value,b.some(function(e){return function(f){return $e(f,e.Sf)}}(d))||this.h.push(d.Sf);Nn(this)};
583
+ q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Nn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};
584
+ q.setTextVisibility=function(a){this.m=a;Nn(this,!0)};q.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};function On(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
585
+ function Pn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Pi:null;l&&(g.push(l.Tf),l.Wc&&g.push(l.Wc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?On(a,n)||(f=!0):(Qn(a,k,e),l=a.i.get(k),n=l.Pi,f=!0));0<k.nestedCues.length&&n&&Pn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
586
+ r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.Wc?(d.Wc.contains(c)&&d.Wc.removeChild(c),c.appendChild(d.Wc),d.Wc.appendChild(d.Tf)):c.appendChild(d.Tf)}}function Nn(a,b){if(a.g){var c=a.B.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())sj(d.value);sj(a.g);a.i.clear();a.C.clear()}a.m&&Pn(a,a.h,a.g,c,[])}}
586
587
  function Qn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=V(e);"br"!=e&&Rn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Nd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Nd?"%":"px");if(a.C.has(c))c=a.C.get(c);else{e=V("span");var k=g.heightUnits==Nd?"%":"px",l=g.widthUnits==Nd?"%":"px",m=g.viewportAnchorUnits==
587
588
  Nd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
588
589
  g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":
589
- "center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=V("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Uf:f,Pi:e,Uc:c})}function Sn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pe?c:"left"===a||"start"===a&&b===Se||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Se?"line-right":"center"}
590
+ "center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=V("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Tf:f,Pi:e,Wc:c})}function Sn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pe?c:"left"===a||"start"===a&&b===Se||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Se?"line-right":"center"}
590
591
  function Rn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Tn(c.linePadding,c,a.u);f.paddingRight=Tn(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
591
592
  "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=V("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Un(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display=
592
593
  "inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Tn(c.fontSize,
@@ -594,7 +595,7 @@ c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ue&&(g=1,h=16,a.l&&1>a.l&&(h
594
595
  "left",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=
595
596
  c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Te?f.width=c.size+"%":f.height=c.size+"%")}function Tn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
596
597
  function Un(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Mn);Mn.prototype.setTextLanguage=Mn.prototype.setTextLanguage;Mn.prototype.setTextVisibility=Mn.prototype.setTextVisibility;Mn.prototype.isTextVisible=Mn.prototype.isTextVisible;Mn.prototype.remove=Mn.prototype.remove;Mn.prototype.destroy=Mn.prototype.destroy;Mn.prototype.append=Mn.prototype.append;Mn.prototype.configure=Mn.prototype.configure;function Vn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Fn(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
597
- break;case "right":g.push("align:right");break;case Re:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Wn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.s=!0;this.j=this.m=!1}Wn.prototype.configure=function(a){this.g=a};function Xn(a){a.l=!1;a.s=!0;a.m=!1;a.j=!1}function Yn(a,b){a.j=b;a.j?a.i==Zn?a.i=$n:a.i==ao&&(a.i=bo):a.i==$n?a.i=Zn:a.i==bo&&(a.i=ao)}
598
+ break;case "right":g.push("align:right");break;case Qe:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Wn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.s=!0;this.j=this.m=!1}Wn.prototype.configure=function(a){this.g=a};function Xn(a){a.l=!1;a.s=!0;a.m=!1;a.j=!1}function Yn(a,b){a.j=b;a.j?a.i==Zn?a.i=$n:a.i==ao&&(a.i=bo):a.i==$n?a.i=Zn:a.i==bo&&(a.i=ao)}
598
599
  function co(a,b,c){try{if(!a.g.enabled)return b;var d=eo(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=fo;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=go;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=ho;break a}e=void 0}d.ot=e;d.su=
599
600
  !0;var f=io(d);return jo(b,f)}catch(g){return db("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function eo(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
600
601
  function ko(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,eo(a));c.pr=a.h.Wa();var e=c.ot===lo||c.ot===go;a.m&&e&&(c.bs=!0,c.su=!0,a.m=!1);null==c.su&&(c.su=a.s);a=mo(a,c);if(d)d=no(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=io(a);f&&(b.uris=b.uris.map(function(g){return jo(g,f)}))}}}function mo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
@@ -604,37 +605,37 @@ function io(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
604
605
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function no(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=t(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=io(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
605
606
  function jo(a,b){if(!b||a.includes("offline:"))return a;a=new pb(a);a.g.set("CMCD",b);return a.toString()}var ho="m",fo="a",lo="v",go="av",po="i",ro="c",qo="tt",Zn="d",$n="ld",ao="h",bo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Zn,xl:$n,HLS:ao,yl:bo,Ll:"s",OTHER:"o"});function vo(a){this.h=a;this.g=null}q=vo.prototype;q.configure=function(a){this.h=a};q.Nh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(wo)?1E3*this.g.get(wo):null};q.Mh=function(){return this.h.enabled&&this.g&&this.g.has(xo)?1E3*this.g.get(xo):null};q.Bj=function(){return this.h.enabled&&this.g&&this.g.has(yo)?this.g.get(yo):null};q.Cj=function(){return this.h.enabled&&this.g&&this.g.has(zo)?this.g.get(zo):null};
606
607
  q.getBandwidthEstimate=function(a){var b=this.Mh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Ao(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",vo);vo.prototype.getBandwidthEstimate=vo.prototype.getBandwidthEstimate;vo.prototype.getRoundTripTime=vo.prototype.Cj;vo.prototype.getResponseDelay=vo.prototype.Bj;vo.prototype.getEstimatedThroughput=vo.prototype.Mh;
607
- vo.prototype.getMaxBitrate=vo.prototype.Nh;var xo="etp",wo="mb",yo="rd",zo="rtt";function Bo(){this.g=null;this.h=[]}function Co(a,b){return P(function(c){if(1==c.g)return a.g?H(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;I(c)})}Bo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;jb.call(this);var d=this;this.m=Do;this.h=null;this.Cf=b;this.qa=!1;this.le=new td;this.$d=new td;this.l=new td;this.Ka=new td;this.Lb=new td;this.H=this.K=this.G=this.I=null;this.oe=0;this.$=new Bo;this.ma=this.Ta=this.W=this.i=this.Ya=this.J=this.j=this.zc=this.M=this.qh=this.ba=this.P=this.Yd=this.O=this.Df=this.L=this.fc=null;this.Fa=!1;this.Ca=this.s=null;this.Ef=1E9;this.ge=[];this.U=NaN;this.g=Eo(this);this.S=null;this.pe=-1;this.Ja=null;this.ka={width:Infinity,
608
- height:Infinity};this.Bf=new Qi(this.g,this.ka,null);this.je=[];this.B=null;this.Ga=new Vg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,"");this.Nb=this.g.preferredTextLanguage;this.ee=this.g.preferredTextRole;this.ce=this.g.preferForcedSubs;this.ae=[];c&&c(this);this.P=Fo(this);
609
- this.ba=new vo(this.g.cmsd);this.I=Go(this);this.I.$g(this.g.streaming.forceHTTP);this.I.ah(this.g.streaming.forceHTTPS);this.I.m=this.g.streaming.minBytesForProgressEvents;this.jc=this.aa=this.u=null;this.If=!1;this.Gf=new Yb(function(){return P(function(e){if(1==e.g)return d.aa?H(e,d.$b(d.jc,!0),3):e.A(0);if(4!=e.g)return H(e,d.load(d.aa),4);d.If?d.jc.pause():d.jc.play();d.aa=null;d.If=!1;I(e)})});Ho&&(this.u=Ho(),this.u.configure(this.g.ads),this.Lb.o(this.u,"ad-content-pause-requested",function(e){var f;
610
- return P(function(g){if(1==g.g){d.Gf.stop();if(d.aa)return g.A(0);d.jc=d.h;d.If=d.h.ended;f=e.saveLivePosition||!1;return H(g,d.Gh(!0,f),3)}d.aa=g.h;I(g)})}),this.Lb.o(this.u,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.aa){var f=d.aa;f.C&&e&&(f.C+=e)}d.Gf.Y(.1)}),this.Lb.o(this.u,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.jc?e.A(0):H(e,d.$b(d.jc,!0),0)})}));this.le.o(window,"online",function(){Io(d);d.Sg()});this.ie=new Yb(function(){for(var e=Date.now()/
608
+ vo.prototype.getMaxBitrate=vo.prototype.Nh;var xo="etp",wo="mb",yo="rd",zo="rtt";function Bo(){this.g=null;this.h=[]}function Co(a,b){return P(function(c){if(1==c.g)return a.g?H(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;I(c)})}Bo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;jb.call(this);var d=this;this.m=Do;this.h=null;this.Bf=b;this.qa=!1;this.le=new td;this.$d=new td;this.l=new td;this.Ka=new td;this.Lb=new td;this.H=this.K=this.G=this.I=null;this.oe=0;this.$=new Bo;this.ma=this.Ta=this.W=this.i=this.Ya=this.J=this.j=this.zc=this.M=this.qh=this.ba=this.P=this.Yd=this.O=this.Cf=this.L=this.fc=null;this.Fa=!1;this.Ca=this.s=null;this.Df=1E9;this.ge=[];this.U=NaN;this.g=Eo(this);this.S=null;this.pe=-1;this.Ja=null;this.ka={width:Infinity,
609
+ height:Infinity};this.Af=new Qi(this.g,this.ka,null);this.je=[];this.B=null;this.Ga=new Vg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,"");this.Nb=this.g.preferredTextLanguage;this.ee=this.g.preferredTextRole;this.ce=this.g.preferForcedSubs;this.ae=[];c&&c(this);this.P=Fo(this);
610
+ this.ba=new vo(this.g.cmsd);this.I=Go(this);this.I.$g(this.g.streaming.forceHTTP);this.I.ah(this.g.streaming.forceHTTPS);this.I.m=this.g.streaming.minBytesForProgressEvents;this.jc=this.aa=this.u=null;this.Hf=!1;this.Ff=new Yb(function(){return P(function(e){if(1==e.g)return d.aa?H(e,d.$b(d.jc,!0),3):e.A(0);if(4!=e.g)return H(e,d.load(d.aa),4);d.Hf?d.jc.pause():d.jc.play();d.aa=null;d.Hf=!1;I(e)})});Ho&&(this.u=Ho(),this.u.configure(this.g.ads),this.Lb.o(this.u,"ad-content-pause-requested",function(e){var f;
611
+ return P(function(g){if(1==g.g){d.Ff.stop();if(d.aa)return g.A(0);d.jc=d.h;d.Hf=d.h.ended;f=e.saveLivePosition||!1;return H(g,d.Gh(!0,f),3)}d.aa=g.h;I(g)})}),this.Lb.o(this.u,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.aa){var f=d.aa;f.C&&e&&(f.C+=e)}d.Ff.Y(.1)}),this.Lb.o(this.u,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.jc?e.A(0):H(e,d.$b(d.jc,!0),0)})}));this.le.o(window,"online",function(){Io(d);d.Sg()});this.ie=new Yb(function(){for(var e=Date.now()/
611
612
  1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.ie.stop();f&&Jo(d,!1,void 0,!1,!1)});this.ya=null;a&&(Cd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.$b(a,!0));this.C=null}na(X,jb);function Ko(a){null!=a.M&&(gk(a.M),a.M.release(),a.M=null)}
612
613
  function $o(a,b){b.lcevc.enabled?(Ko(a),null==a.M&&(a.M=new fk(a.h,a.qh,b.lcevc),a.K&&(a.K.$=a.M))):Ko(a)}function ap(a,b){return new T(a,b)}q=X.prototype;
613
- q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==bp)return c.return();Ko(a);b=a.detach();a.m=bp;return H(c,b,2);case 2:return H(c,a.Wf(),3);case 3:a.le&&(a.le.release(),a.le=null);a.$d&&(a.$d.release(),a.$d=null);a.l&&(a.l.release(),a.l=null);a.Ka&&(a.Ka.release(),a.Ka=null);a.Lb&&(a.Lb.release(),a.Lb=null);a.Ca=null;a.g=null;a.B=null;a.Cf=null;a.P=null;a.ba=null;if(!a.I){c.A(4);break}return H(c,a.I.destroy(),5);case 5:a.I=null;case 4:a.s&&(a.s.release(),a.s=null),
614
+ q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==bp)return c.return();Ko(a);b=a.detach();a.m=bp;return H(c,b,2);case 2:return H(c,a.Vf(),3);case 3:a.le&&(a.le.release(),a.le=null);a.$d&&(a.$d.release(),a.$d=null);a.l&&(a.l.release(),a.l=null);a.Ka&&(a.Ka.release(),a.Ka=null);a.Lb&&(a.Lb.release(),a.Lb=null);a.Ca=null;a.g=null;a.B=null;a.Bf=null;a.P=null;a.ba=null;if(!a.I){c.A(4);break}return H(c,a.I.destroy(),5);case 5:a.I=null;case 4:a.s&&(a.s.release(),a.s=null),
614
615
  jb.prototype.release.call(a),I(c)}})};function cp(){window.Promise||cb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||dc("Trident/"))return!1;var a=rc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Zb()?!0:$b("application/x-mpegurl")}
615
616
  function dp(a,b){a.dispatchEvent(ap("onstatechange",(new Map).set("state",b)))}
616
617
  q.$b=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==bp)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return H(g,c.detach(),2);case 2:return H(g,ep(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(dp(c,"attach"),e=function(){var h=fp(c,!1);h&&gp(c,h)},c.$d.o(a,"error",e),c.h=a);if(!b||!Zb()||c.K){g.A(6);break}return H(g,hp(c),6);case 6:za(g);c.$.release();Aa(g,0);break;case 5:return f=ya(g),H(g,c.detach(),10);case 10:throw f;
617
618
  }})};q.sh=function(a){this.qh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==bp)throw new U(2,7,7E3);return H(c,b.qc(!1,a),2)}if(3!=c.g)return H(c,ep(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.$d.cb(),b.h=null),dp(b,"detach"),b.u&&!a&&b.u.release()}finally{b.$.release()}I(c)})};function ep(a,b){var c;return P(function(d){return 1==d.g?(c=++a.oe,H(d,Co(a.$,b),2)):c!=a.oe?(a.$.release(),d.return(!0)):d.return(!1)})}
618
- q.qc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return P(function(r){switch(r.g){case 1:return c.m!=bp&&(c.m=Do),H(r,ep(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Fa=!1;dp(c,"unload");a&&!Zb()&&(a=!1);Ko(c);d=c.ae.map(function(u){return u()});c.ae=[];return H(r,Promise.all(d),5);case 5:c.dispatchEvent(ap("unloading"));c.Yd&&(c.Yd.release(),c.Yd=null);c.h&&(c.l.cb(),c.Ka.cb());c.ie.stop();c.fc&&(c.fc.release(),c.fc=null);c.Df&&(c.Df.stop(),c.Df=null);
619
+ q.qc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return P(function(r){switch(r.g){case 1:return c.m!=bp&&(c.m=Do),H(r,ep(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Fa=!1;dp(c,"unload");a&&!Zb()&&(a=!1);Ko(c);d=c.ae.map(function(u){return u()});c.ae=[];return H(r,Promise.all(d),5);case 5:c.dispatchEvent(ap("unloading"));c.Yd&&(c.Yd.release(),c.Yd=null);c.h&&(c.l.cb(),c.Ka.cb());c.ie.stop();c.fc&&(c.fc.release(),c.fc=null);c.Cf&&(c.Cf.stop(),c.Cf=null);
619
620
  if(!c.J){r.A(6);break}return H(r,c.J.stop(),7);case 7:c.J=null,c.Ya=null;case 6:if(!c.s){r.A(8);break}return H(r,c.s.stop(),8);case 8:if(!c.j){r.A(10);break}return H(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.H&&(c.H.release(),c.H=null);if(!xc("webkit")||!c.G){r.A(12);break}return H(r,c.G.destroy(),13);case 13:c.G=null;case 12:if(!c.K){r.A(14);break}return H(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
620
- null);b||c.Gf.stop();c.P&&Xn(c.P);c.ba&&(c.ba.g=null);if(!c.C){r.A(16);break}return H(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&(sj(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.G){r.A(18);break}return H(r,c.G.destroy(),19);case 19:c.G=null;case 18:c.ya&&c.W!=c.ya.jd()&&(c.ya.u||c.ya.destroy(),c.ya=null);c.W=null;c.Ta=null;c.O=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&
621
+ null);b||c.Ff.stop();c.P&&Xn(c.P);c.ba&&(c.ba.g=null);if(!c.C){r.A(16);break}return H(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&(sj(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.G){r.A(18);break}return H(r,c.G.destroy(),19);case 19:c.G=null;case 18:c.ya&&c.W!=c.ya.jd()&&(c.ya.u||c.ya.destroy(),c.ya=null);c.W=null;c.Ta=null;c.O=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&
621
622
  l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(sg={},Wb.clear());c.i=null;c.B=new Hl;c.me=null;c.Ja=null;c.S=null;c.pe=-1;c.ge=[];c.U=NaN;ip(c);case 3:za(r);c.$.release();Aa(r,4);break;case 4:if(a&&Zb()&&!c.K&&c.h)return H(r,hp(c),0);r.A(0)}})};q.Uk=function(a){this.ma=a};
622
623
  q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v;return P(function(z){switch(z.g){case 1:if(d.m==bp)throw new U(2,7,7E3);e=null;f="";a instanceof gn?(e=a,f=e.jd()||""):f=a||"";return H(z,Co(d.$,"load"),2);case 2:d.$.release();if(!d.h)throw new U(2,7,7002);if(!d.W){z.A(3);break}d.W=f;return H(z,d.qc(!1),3);case 3:g=++d.oe;h=function(){return P(function(y){if(1==y.g)return d.oe==g?y.A(0):e?H(y,e.destroy(),3):y.A(3);throw new U(2,7,7E3);})};k=function(y,B){return P(function(A){switch(A.g){case 1:return ua(A,
623
624
  2),H(A,Co(d.$,B),4);case 4:return H(A,h(),5);case 5:return H(A,y(),6);case 6:return H(A,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:za(A),d.$.release(),Aa(A,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.ma=b;d.Fa=!1;d.dispatchEvent(ap("loading"));if(e){c=e.U;z.A(8);break}if(c){z.A(8);break}return H(z,k(function(){return P(function(y){if(1==y.g)return H(y,jp(d,f),2);c=y.h;I(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){kn(e,d);d.B=e.getStats();z.A(11);break}return H(z,kp(d,f,b,c,!0),12);case 12:(e=
624
- z.h)?(e.B=!1,kn(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new Hl;case 11:return m=!e,n=Date.now()/1E3,d.B=e?e.getStats():new Hl,d.W=f,d.Ta=c||null,m?H(z,k(function(){return P(function(y){return H(y,lp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):H(z,k(function(){return P(function(y){if(1==y.g)return H(y,Promise.race([e.ba,e.m]),2);d.Ya=e.I;var B=e;B.ka=!0;d.J=B.j;d.i=e.pg();I(y)})},"waitForFinish"),15);case 15:if(d.K){z.A(16);break}return H(z,k(function(){return P(function(y){return H(y,
625
- hp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return H(z,k(function(){return P(function(y){return H(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Bf=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.Yd=mn(e);d.zc=e.Fa;if(p=e.s)d.Ga=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(mp(d),d.configure("manifest.disableVideo",!0));d.G=nn(e);return H(z,k(function(){return P(function(y){return H(y,d.G.$b(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ca&&
625
+ z.h)?(e.B=!1,kn(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new Hl;case 11:return m=!e,n=Date.now()/1E3,d.B=e?e.getStats():new Hl,d.W=f,d.Ta=c||null,m?H(z,k(function(){return P(function(y){return H(y,lp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):H(z,k(function(){return P(function(y){if(1==y.g)return H(y,Promise.race([e.ba,e.m]),2);d.Ya=e.I;var B=e;B.ka=!0;d.J=B.j;d.i=e.og();I(y)})},"waitForFinish"),15);case 15:if(d.K){z.A(16);break}return H(z,k(function(){return P(function(y){return H(y,
626
+ hp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return H(z,k(function(){return P(function(y){return H(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Af=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.Yd=mn(e);d.zc=e.Fa;if(p=e.s)d.Ga=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(mp(d),d.configure("manifest.disableVideo",!0));d.G=nn(e);return H(z,k(function(){return P(function(y){return H(y,d.G.$b(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ca&&
626
627
  d.Ca==r||(d.s=ln(e),d.Ca=e.G,"function"!=typeof d.s.setMediaElement&&(Cd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Cd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Cd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
627
628
  d.s.trySuggestStreams=function(){})),u=on(e),w=e.ma,H(z,k(function(){return P(function(y){return H(y,np(d,n,w,u),0)})},"loadInner_"),20);case 20:jn(e);d.Ta&&rc()&&Lf(d.Ta)&&mk(d.K,d.W,d.Ta);z.A(14);break;case 21:return H(z,k(function(){return P(function(y){return H(y,op(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(ap("loaded"));case 6:za(z);if(!e){z.A(23);break}return H(z,e.destroy(),23);case 23:d.ya=null;Aa(z,0);break;case 5:v=ya(z);if(!v||7E3==v.code){z.A(25);break}return H(z,d.qc(!1),
628
629
  25);case 25:throw v;}})};function mp(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.Qk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?H(e,pp(c),2):3!=e.g?(d=e.h,H(e,c.qc(a,b),3)):e.return(d)})};
629
630
  q.Gh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?H(e,pp(c,b),2):3!=e.g?(d=e.h,H(e,c.detach(a),3)):e.return(d)})};
630
631
  function pp(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.Ya&&a.W))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return H(e,qp(a,a.W,d,a.Ta,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.Ya;f.h=a.i;f.j=g;f.I=h;f=c;g=a.Ca;f.i=a.s;f.G=g;c.s=a.Ga;c.start();a.i=null;a.J=null;a.Ya=null;a.s=null;a.Ca=null}return e.return(c)})}
631
- q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return H(f,kp(d,a,b,c),2);(e=f.h)?e.start():gp(d,new U(2,7,7005));return f.return(e)})};q.Wf=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.je=[];return H(f,Promise.all(b),0)})};
632
+ q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return H(f,kp(d,a,b,c),2);(e=f.h)?e.start():gp(d,new U(2,7,7005));return f.return(e)})};q.Vf=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.je=[];return H(f,Promise.all(b),0)})};
632
633
  function kp(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.A(2):H(l,jp(a,b),3);2!=l.g&&(d=l.h);if(f=rp(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ca==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=qp(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.B=!1;return m}):k.then(function(m){a.je.push(m);return m});return l.return(k)})}
633
634
  function qp(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,w,v,z,y,B,A,C;return P(function(D){if(1==D.g)return h=null,k=ae(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.S&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(E,F){l()?h.configure(E,F):a.configure(E,F)},Infinity!=a.ka.width||Infinity!=a.ka.height||a.g.ignoreHardwareResolution?D.A(2):H(D,yc(),3);2!=D.g&&(p=D.h,a.ka.width=p.width,a.ka.height=p.height);r=new Qi(k,
634
635
  a.ka,null);u={networkingEngine:a.I,filter:function(E){var F,K;return P(function(G){if(1==G.g)return H(G,Ri(r,E),2);if(4!=G.g){F=G.h;if(!F)return G.A(0);K=ap("trackschanged");return H(G,Promise.resolve(),4)}h.dispatchEvent(K);I(G)})},makeTextStreamsForClosedCaptions:function(E){return sp(a,E)},onTimelineRegionAdded:function(E){var F=h.J;a:{var K=t(F.g);for(var G=K.next();!G.done;G=K.next())if(G=G.value,G.schemeIdUri==E.schemeIdUri&&G.id==E.id&&G.startTime==E.startTime&&G.endTime==E.endTime){K=G;break a}K=
635
636
  null}null==K&&(F.g.add(E),E=new T("regionadd",new Map([["region",E]])),F.dispatchEvent(E))},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.S&&a.j.updateDuration()},newDrmInfo:function(E){var F=h.l,K=F?F.g:null;K&&F.B&&Ui(r,
636
- K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.T());h.dispatchEvent(ap("manifestupdated",E));hn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(E,F,K,G){var J=E;if("com.apple.hls.interstitial"==E&&(J="com.apple.quicktime.HLS",E={startTime:F,endTime:K,values:G},a.u))a.u.onHLSInterstitialMetadata(a,a.h,E);G=t(G);E=G.next();for(var M={};!E.done;M={Og:void 0},E=G.next())M.Og=E.value,
637
- "ID"!=M.Og.name&&hn(h,!1,function(O){return function(){tp(a,F,K,J,O.Og)}}(M))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,F){return a.addFont(E,F)}};w=new Ul(function(){return a.Ia()});w.addEventListener("regionadd",function(E){var F=E.region;up(a,"timelineregionadded",F,h);hn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(F),a.u.onDASHInterstitialMetadata(a,a.h,F))})});v=null;k.streaming.observeQualityChanges&&(v=new Vl(function(){return a.Vb()}),
637
+ K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.T());h.dispatchEvent(ap("manifestupdated",E));hn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(E,F,K,G){var J=E;if("com.apple.hls.interstitial"==E&&(J="com.apple.quicktime.HLS",E={startTime:F,endTime:K,values:G},a.u))a.u.onHLSInterstitialMetadata(a,a.h,E);G=t(G);E=G.next();for(var M={};!E.done;M={Ng:void 0},E=G.next())M.Ng=E.value,
638
+ "ID"!=M.Ng.name&&hn(h,!1,function(O){return function(){tp(a,F,K,J,O.Ng)}}(M))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,F){return a.addFont(E,F)}};w=new Ul(function(){return a.Ia()});w.addEventListener("regionadd",function(E){var F=E.region;up(a,"timelineregionadded",F,h);hn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(F),a.u.onDASHInterstitialMetadata(a,a.h,F))})});v=null;k.streaming.observeQualityChanges&&(v=new Vl(function(){return a.Vb()}),
638
639
  v.addEventListener("qualitychange",function(E){vp(a,E.quality,E.position)}),v.addEventListener("audiotrackchange",function(E){vp(a,E.quality,E.position,!0)}));z=!0;y={kc:a.I,onError:function(E){return h.onError(E)},$e:function(E){hn(h,!0,function(){a:{var F=E,K=ap("keystatuschanged");a.dispatchEvent(K);var G=Object.keys(F);1==G.length&&""==G[0]&&(G=["00"],F={"00":F[""]});K=1==G.length&&"00"==G[0];var J=!1;if(G.length){G=t(a.i.variants);for(var M=G.next();!M.done;M=G.next()){M=M.value;var O=[];M.audio&&
639
640
  O.push(M.audio);M.video&&O.push(M.video);O=t(O);for(var L=O.next();!L.done;L=O.next()){var N=L.value;L=M.allowedByKeySystem;if(N.keyIds.size){M.allowedByKeySystem=!0;N=t(N.keyIds);for(var Q=N.next();!Q.done;Q=N.next())if(Q=Q.value,(Q=F[K?"00":Q])||a.G.H)M.allowedByKeySystem=M.allowedByKeySystem&&!!Q&&!Wi.includes(Q)}L!=M.allowedByKeySystem&&(J=!0)}}}if(J&&(wp(a),!xp(a)))break a;(F=a.j.j)&&!F.allowedByKeySystem&&Jo(a)}})},onExpirationUpdated:function(E,F){var K=ap("expirationupdated");h.dispatchEvent(K);
640
641
  if((K=h.j)&&K.onExpirationUpdated)K.onExpirationUpdated(E,F)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&z&&(z=!1,E=Date.now()/1E3-h.Ca,(a.B||h.getStats()).j=E,a.M&&gk(a.M))}};B=Go(a,l);zh(a.I,B);A=function(){return a.cd(y)};C={config:k,dk:u,pk:w,nk:v,cd:A,ck:r,networkingEngine:B,Yi:e,Xi:g};h=new gn(b,d,c,C);return D.return(h)})}
@@ -645,16 +646,16 @@ jk:function(){a.J&&a.J.update&&a.J.update()}},a.M),b.configure(a.g.mediaSource),
645
646
  function Ap(a,b,c){function d(){return Bp(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&a.L.set(e),e=ap("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return wp(a)}),a.l.o(b.remote,"connecting",function(){return wp(a)}),a.l.o(b.remote,"disconnect",function(){return P(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?H(e,ym(a.j),2):e.A(2);wp(a);I(e)})}));b.audioTracks&&
646
647
  (a.l.o(b.audioTracks,"addtrack",function(){return wp(a)}),a.l.o(b.audioTracks,"removetrack",function(){return wp(a)}),a.l.o(b.audioTracks,"change",function(){return wp(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":Cp(a,e);break;case "chapters":Dp(a,e);break;default:wp(a)}}),a.l.o(b.textTracks,"removetrack",function(){return wp(a)}),a.l.o(b.textTracks,"change",function(){return wp(a)}));"none"!=b.preload&&a.l.sa(b,"loadedmetadata",
647
648
  function(){a.B.G=Date.now()/1E3-c})}
648
- function np(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F;return P(function(K){switch(K.g){case 1:dp(a,"load"),e=a.h,a.L=new yl({Ge:function(){return e.playbackRate},Jc:function(){return e.defaultPlaybackRate},bh:function(G){e.playbackRate=G},bi:function(G){e.currentTime+=G}}),Ap(a,e,b),$o(a,a.g),a.Nb=a.g.preferredTextLanguage,a.ee=a.g.preferredTextRole,a.ce=a.g.preferForcedSubs,Ep(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(G,J,M){a.i&&a.j&&G!=a.j.j&&
649
+ function np(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F;return P(function(K){switch(K.g){case 1:dp(a,"load"),e=a.h,a.L=new yl({Ge:function(){return e.playbackRate},Lc:function(){return e.defaultPlaybackRate},bh:function(G){e.playbackRate=G},bi:function(G){e.currentTime+=G}}),Ap(a,e,b),$o(a,a.g),a.Nb=a.g.preferredTextLanguage,a.ee=a.g.preferredTextRole,a.ce=a.g.preferForcedSubs,Ep(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(G,J,M){a.i&&a.j&&G!=a.j.j&&
649
650
  Fp(a,G,!0,void 0===J?!1:J,void 0===M?0:M)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.ba),a.j=Gp(a),a.j.configure(a.g.streaming),a.m=Hp,a.dispatchEvent(ap("streaming")),f=c;case 2:(h=a.j.j)||f||(f=xp(a)?a.s.chooseVariant():null);k=[];g=h||f;l=t([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0<k.length)){K.A(4);break}return H(K,Promise.all(k),4);case 4:if(!g||0!=g.disabledUntilTime){K.A(2);break}if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(g);
650
651
  a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&cb("Low-latency 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.");a.P&&Yn(a.P,a.i.isLowLatency&&a.g.streaming.lowLatencyMode);Ep(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);nm(a.j,a.g.playRangeStart,a.g.playRangeEnd);p=function(G){a.H=Ip(a,G);a.fc=Jp(a,G);Kp(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};
651
652
  a.g.streaming.startAtSegmentBoundary||(r=a.ma,null==r&&a.i.startTime&&(r=a.i.startTime),p(r));if(h){K.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){K.A(8);break}u=a.i.presentationTimeline;w=a.ma||a.h.currentTime;null==a.ma&&a.i.startTime&&(w=a.i.startTime);v=u.dc();z=u.Wb();w<v?w=v:w>z&&(w=z);return H(K,Lp(f,w),9);case 9:y=K.h,p(y);case 8:Fp(a,f,!0,!1,0);case 7:return a.H.ready(),B=a.ec().find(function(G){return G.active}),B||((A=Jg(a.i.textStreams,a.Nb,a.ee,a.ce)[0]||null)&&Gl(a.B.h,A,!0),
652
- f&&(A?(Mp(a,f.audio,A)&&(a.qa=!0),a.qa&&a.C.setTextVisibility(!0),Np(a)):a.qa=!1),A&&(a.g.streaming.alwaysStreamText||a.Qc())&&(wm(a.j,A),Op(a))),H(K,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Pp(a));wp(a);xp(a);a.i.variants.some(function(G){return G.primary});if((C=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)D=function(){return Qp(a)},a.l.o(e,"timeupdate",D);C||(E=function(){return Rp(a)},
653
+ f&&(A?(Mp(a,f.audio,A)&&(a.qa=!0),a.qa&&a.C.setTextVisibility(!0),Np(a)):a.qa=!1),A&&(a.g.streaming.alwaysStreamText||a.Sc())&&(wm(a.j,A),Op(a))),H(K,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Pp(a));wp(a);xp(a);a.i.variants.some(function(G){return G.primary});if((C=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)D=function(){return Qp(a)},a.l.o(e,"timeupdate",D);C||(E=function(){return Rp(a)},
653
654
  a.l.o(e,"timeupdate",E),Rp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(F=function(){var G;return P(function(J){if(1==J.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return J.A(0);a.l.Na(e,"timeupdate",F);return H(J,a.preload(a.i.nextUrl),4)}a.ya=J.h;I(J)})},a.l.o(e,"timeupdate",F)),a.l.o(e,"ended",function(){a.load(a.ya||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(C);a.Fa=!0;I(K)}})}
654
655
  function lp(a,b){var c,d,e,f,g;return P(function(h){return 1==h.g?(c=Yc,d=Date.now()/1E3,e=!0,a.G=a.cd({kc:a.I,onError:function(k){gp(a,k)},$e:function(){},onExpirationUpdated:function(){var k=ap("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.B.j=Date.now()/1E3-d)}}),a.G.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
655
656
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Jf(b):"",codecs:b?Kf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.xa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1},g.fullMimeTypes.add(zf(g.mimeType,
656
657
  g.codecs)),b.startsWith("audio/")?(g.type=c.ia,f.audio=g):f.video=g,a.G.W=!0,H(h,mi(a.G,[f],[]),2)):H(h,a.G.$b(a.h),0)})}
657
- function op(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w;return P(function(v){switch(v.g){case 1:dp(a,"src-equals");d=a.h;a.H=new ol(d);e=!1;a.ae.push(function(){e=!0});null!=a.ma&&a.H.Hf(a.ma);a.L=new yl({Ge:function(){return d.playbackRate},Jc:function(){return d.defaultPlaybackRate},bh:function(z){d.playbackRate=z},bi:function(z){d.currentTime+=z}});f=a.g.streaming.rebufferingGoal;Kp(a,d,f);d.textTracks&&(yp(a),g=function(){var z=Sp(a).find(function(y){return"disabled"!==y.mode});z&&(z.mode="showing")},
658
+ function op(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w;return P(function(v){switch(v.g){case 1:dp(a,"src-equals");d=a.h;a.H=new ol(d);e=!1;a.ae.push(function(){e=!0});null!=a.ma&&a.H.Gf(a.ma);a.L=new yl({Ge:function(){return d.playbackRate},Lc:function(){return d.defaultPlaybackRate},bh:function(z){d.playbackRate=z},bi:function(z){d.currentTime+=z}});f=a.g.streaming.rebufferingGoal;Kp(a,d,f);d.textTracks&&(yp(a),g=function(){var z=Sp(a).find(function(y){return"disabled"!==y.mode});z&&(z.mode="showing")},
658
659
  h=function(){var z=Sp(a).find(function(y){return"disabled"!==y.mode});z&&(z.mode="hidden")},a.l.o(d,"enterpictureinpicture",function(){return g()}),a.l.o(d,"leavepictureinpicture",function(){return h()}),d.remote?(a.l.o(d.remote,"connect",function(){return h()}),a.l.o(d.remote,"connecting",function(){return h()}),a.l.o(d.remote,"disconnect",function(){return h()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return h()}),k=d,k.webkitSupportsFullscreen&&
659
660
  a.l.o(k,"webkitpresentationmodechanged",function(){"inline"!=k.webkitPresentationMode?g():h()}));Ap(a,d,b);l=co(a.P,a.W,c);!l.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(l+="#t=",0<a.g.playRangeStart&&(l+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(l+=","+a.g.playRangeEnd));if(!a.K){v.A(2);break}return H(v,a.K.destroy(),3);case 3:a.K=null;case 2:return sj(d),d.src=l,(ec()||hc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Lf(c)&&rc()&&d.load(),a.m=Tp,a.dispatchEvent(ap("streaming")),
660
661
  m=new lh,fl(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.H.ready();m.resolve()}),fl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var z,y,B,A,C;return P(function(D){if(1==D.g)return Up(a),z=Sp(a),z.find(function(E){return"disabled"!=E.mode})?(0<z.length&&(a.qa=!0,a.C.setTextVisibility(!0)),D.A(2)):H(D,new Promise(function(E){a.l.sa(d.textTracks,"change",E);(new Yb(E)).Y(1)}),2);if(e)return D.return();y=!1;B=t(z);for(A=B.next();!A.done;A=B.next())C=A.value,"disabled"!==C.mode&&(y?(C.mode=
@@ -668,13 +669,13 @@ function Go(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}funct
668
669
  Ao(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Ao(u[1]))}var w=p}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(ap("downloadfailed",e))},function(e,f,g){d(function(){var h=a.P,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)ko(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
669
670
  h.j?$n:Zn;break a;case 3:case 2:l=h.j?bo:ao;break a;case 5:l="s";break a}l=void 0}h.i=l}ko(h,f,{ot:ho,su:!h.l})}}catch(L){db("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case Ih:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.T()?"l":"v"};n.ot=oo(k);var p=n.ot===lo||n.ot===fo||n.ot===go||n.ot===qo,r=k.stream;if(r){var u=h.h.Wa();if(p&&(n.bl=so(h,r.type),n.ot!==qo)){var w=to(h,r.type);n.dl=u?w/Math.abs(u):w}r.bandwidth&&(n.br=r.bandwidth/
670
671
  1E3);if(r.segmentIndex&&m){var v=r.segmentIndex.cc(m.endTime,!0,0>u);if(v){var z=v.next().value;if(z&&z!=m){if(!Td(m.R(),z.R())){var y=z.R()[0],B=f.uris[0],A=new URL(y),C=new URL(B);if(A.origin!==C.origin)var D=y;else{for(var E=A.pathname.split("/").slice(1),F=C.pathname.split("/").slice(1,-1);E[0]===F[0];)E.shift(),F.shift();for(;F.length;)F.shift(),E.unshift("..");D=E.join("/")}n.nor=D}if((z.eb||z.Ma)&&(m.eb!=z.eb||m.Ma!=z.Ma)){var K=z.eb+"-";z.Ma&&(K+=z.Ma);n.nrr=K}}}var G=h.h.Wa()||1,J=to(h,r.type)||
671
- 500,M=r.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(J/G/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==qo&&(n.tb=uo(h,n.ot)/1E3);ko(h,f,n)}}catch(L){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:ko(h,f,{ot:"k"});break;case 4:ko(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.Fc=isNaN(g.Fc)?f:g.Fc+f,0===e&&(g.Xh=f))}})}
672
+ 500,M=r.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(J/G/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==qo&&(n.tb=uo(h,n.ot)/1E3);ko(h,f,n)}}catch(L){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:ko(h,f,{ot:"k"});break;case 4:ko(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.Gc=isNaN(g.Gc)?f:g.Gc+f,0===e&&(g.Xh=f))}})}
672
673
  function Ip(a,b){return new pl(a.h,a.i,a.g.streaming,b,function(){a.fc&&Bl(a.fc,!0);a.j&&a.j.xd();a.O&&Yp(a)},function(c){return a.dispatchEvent(c)})}
673
674
  function Jp(a,b){b=new wn(a.Yd,a.T()||0<b);b.addEventListener("enter",function(d){up(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){up(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(up(a,"timelineregionenter",e),up(a,"timelineregionexit",e))});var c=new Al(a.h);c.g.add(b);a.zc&&c.g.add(a.zc);return c}
674
- function Kp(a,b,c){a.O=new eh;a.O.g=gh;hh(a.O,c,Math.min(.5,c/2));ip(a);a.Df=(new Yb(function(){Yp(a)})).Aa(.25);a.l.o(b,"waiting",function(){return Yp(a)});a.l.o(b,"stalled",function(){return Yp(a)});a.l.o(b,"canplaythrough",function(){return Yp(a)});a.l.o(b,"progress",function(){return Yp(a)})}
675
+ function Kp(a,b,c){a.O=new eh;a.O.g=gh;hh(a.O,c,Math.min(.5,c/2));ip(a);a.Cf=(new Yb(function(){Yp(a)})).Aa(.25);a.l.o(b,"waiting",function(){return Yp(a)});a.l.o(b,"stalled",function(){return Yp(a)});a.l.o(b,"canplaythrough",function(){return Yp(a)});a.l.o(b,"progress",function(){return Yp(a)})}
675
676
  function Yp(a){switch(a.m){case Tp:if(a.h.ended)var b=!0;else{var c=kj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Hp:a:if(a.h.ended||tk(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.uc();var d=kj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=mj(a.h.buffered,a.h.currentTime);c=a.O;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?fh:gh;c.g=d;(b=b!=d)&&d===fh&&(c.h=Date.now());b&&ip(a)}function zp(a,b,c,d){return new ik(a,b,c,d)}
676
677
  function Fo(a){return new Wn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Vb:function(){return a.Vb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Wa:function(){return a.Wa()},Hb:function(){return a.Hb()},Kb:function(){return a.Kb()},T:function(){return a.T()}},a.g.cmcd)}
677
- function Gp(a){return new hm(a.i,{Ld:function(){return a.H?a.H.qe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Wa:function(){return a.Wa()},oa:a.K,kc:a.I,onError:function(b){return gp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Kg:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Wc){if(a.H){a.H.ci();var f=uk(a.K,e);!a.T()&&a.h.paused&&null!=f&&0<f&&a.H.qe()<f&&a.H.Hf(f)}Yp(a)}d=(new Map).set("start",d).set("end",b).set("contentType",
678
+ function Gp(a){return new hm(a.i,{Ld:function(){return a.H?a.H.qe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Wa:function(){return a.Wa()},oa:a.K,kc:a.I,onError:function(b){return gp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Jg:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Wc){if(a.H){a.H.ci();var f=uk(a.K,e);!a.T()&&a.h.paused&&null!=f&&0<f&&a.H.qe()<f&&a.H.Gf(f)}Yp(a)}d=(new Map).set("start",d).set("end",b).set("contentType",
678
679
  e).set("isMuxed",c);a.dispatchEvent(ap("segmentappended",d))},ik:function(b,c){(c=c.qd)&&a.zc&&Xl(a.zc,c,b)},wh:function(b,c){var d=a.G;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new di(Jb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;vi(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,
679
680
  c){return a.disableStream(b,c)}})}
680
681
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Cd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Cd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
@@ -689,64 +690,64 @@ a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if
689
690
  "dispatchAllEmsgBoxes"in a.streaming&&(Cd("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource.dispatchAllEmsgBoxes=a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&
690
691
  (a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=
691
692
  !1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=fn(this.g,a,Eo(this));Zp(this);return c};
692
- function Zp(a){a.Bf=new Qi(a.g,a.ka,a.G);if(a.J){var b=ae(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.G&&a.G.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=bp&&Si(a.Bf,a.i)&&wp(a)}catch(e){gp(a,e)}a.s&&xp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Jo(a)}a.I&&(a.I.$g(a.g.streaming.forceHTTP),a.I.ah(a.g.streaming.forceHTTPS),a.I.m=a.g.streaming.minBytesForProgressEvents);a.K&&(a.K.configure(a.g.mediaSource),a.K.Ca=a.g.manifest.segmentRelativeVttTiming);
693
+ function Zp(a){a.Af=new Qi(a.g,a.ka,a.G);if(a.J){var b=ae(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.G&&a.G.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=bp&&Si(a.Af,a.i)&&wp(a)}catch(e){gp(a,e)}a.s&&xp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Jo(a)}a.I&&(a.I.$g(a.g.streaming.forceHTTP),a.I.ah(a.g.streaming.forceHTTPS),a.I.m=a.g.streaming.minBytesForProgressEvents);a.K&&(a.K.configure(a.g.mediaSource),a.K.Ca=a.g.manifest.segmentRelativeVttTiming);
693
694
  if(a.C)if(b=a.g.textDisplayFactory,a.me!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):Cd("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextLanguage||Cd("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.K){c=a.K;var d=a.C;c.ba=d;c.h&&(c.h.j=d)}a.me=b;a.j&&(b=a.j,(c=b.i.get(Wc))&&um(b,c.stream,!0,0,!0))}else a.C.configure&&a.C.configure(a.g.textDisplayer);
694
695
  a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Pp(a));a.O&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),hh(a.O,b,Math.min(.5,b/2)));a.i&&Ep(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u&&a.u.configure(a.g.ads);a.P&&a.P.configure(a.g.cmcd);a.ba&&a.ba.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Eo(this);fn(a,this.g,Eo(this));return a};q.Oh=function(){var a=Eo(this);fn(a,this.g,Eo(this));return Vm(this.g,Eo(this))};
695
696
  q.Kh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ia().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.zk=function(){for(var a in this.g)delete this.g[a];fn(this.g,Eo(this),Eo(this));Zp(this)};q.kd=function(){return this.m};q.Fe=function(){return this.i?this.i.type:null};q.yj=function(){return this.h};
696
- q.Hb=function(){return this.I};q.jd=function(){return this.W};q.Ce=function(){return this.u?this.u:null};q.T=function(){return this.i&&!this.bb()?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Pc=function(){return this.i?this.i.presentationTimeline.Pc():!1};q.Oc=function(){if(this.i&&!this.bb()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
697
+ q.Hb=function(){return this.I};q.jd=function(){return this.W};q.Ce=function(){return this.u?this.u:null};q.T=function(){return this.i&&!this.bb()?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Rc=function(){return this.i?this.i.presentationTimeline.Rc():!1};q.Qc=function(){if(this.i&&!this.bb()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
697
698
  q.Ia=function(){if(this.i&&!this.bb()){if(!this.Fa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.dc(),end:a.Wb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Oj=function(){this.T()&&(this.h.currentTime=this.Ia().end)};q.Uh=function(){return this.Fa};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.G?this.G.g:null};
698
- q.Kd=function(){return this.G?this.G.Kd():Infinity};q.mg=function(){return this.G?this.G.mg():[]};q.Ee=function(){return this.G?this.G.Ee():{}};q.Me=function(){return this.O?this.O.g==gh:!1};q.Wa=function(){return this.h?this.L?this.L.i:1:0};
699
- q.Wc=function(a,b){var c=this;b=void 0===b?!0:b;0==a?cb("A trick play rate of 0 is unsupported!"):(this.Ka.cb(),this.h.paused&&this.h.play(),this.L.set(a),this.m==Hp&&(this.s.playbackRateChanged(a),tm(this.j,b&&1<Math.abs(a))),this.T()&&this.Ka.o(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Ia(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.$c():Math.floor(d)<=Math.floor(e.start+f)&&c.$c()}))};
700
- q.$c=function(){var a=this.L.Jc();this.m==Tp&&this.L.set(a);this.m==Hp&&(this.L.set(a),this.s.playbackRateChanged(a),tm(this.j,!1));this.Ka.cb()};
699
+ q.Kd=function(){return this.G?this.G.Kd():Infinity};q.lg=function(){return this.G?this.G.lg():[]};q.Ee=function(){return this.G?this.G.Ee():{}};q.Me=function(){return this.O?this.O.g==gh:!1};q.Wa=function(){return this.h?this.L?this.L.i:1:0};
700
+ q.Ec=function(a,b){var c=this;b=void 0===b?!0:b;0==a?cb("A trick play rate of 0 is unsupported!"):(this.Ka.cb(),this.h.paused&&this.h.play(),this.L.set(a),this.m==Hp&&(this.s.playbackRateChanged(a),tm(this.j,b&&1<Math.abs(a))),this.T()&&this.Ka.o(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Ia(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Hc():Math.floor(d)<=Math.floor(e.start+f)&&c.Hc()}))};
701
+ q.Hc=function(){var a=this.L.Lc();this.m==Tp&&this.L.set(a);this.m==Hp&&(this.L.set(a),this.s.playbackRateChanged(a),tm(this.j,!1));this.Ka.cb()};
701
702
  q.Kb=function(){if(this.i&&!this.bb()){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Hg(e)){var f=yg(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Gg(g)}):[]};
702
703
  q.ec=function(){if(this.i&&!this.bb()){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=zg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Sp(this).map(function(f){return Eg(f)}):[]};q.De=function(){var a=this.ge;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ag(b)})};
703
- q.cj=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=Hp&&b.m!=Tp)return g.return(null);c=b.ge;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.A(2):H(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=$p(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Gc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.rg(a,h.startTime+l*m/k))}}),H(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
704
- function $p(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Gc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
705
- q.rg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A;return P(function(C){if(1==C.g){if(c.m!=Hp&&c.m!=Tp)return C.return(null);d=c.ge;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?C.A(2):H(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=$p(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Gc;n=l/h.rows;p=h.Gc*h.rows;r=g.j-g.startTime;
706
- u=g.B||r/p;w=g.startTime;z=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.Gc*m,z=Math.floor(y/h.Gc)*n);B=!1;if(A=g.thumbnailSprite)B=!0,n=A.height,v=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:z,startTime:w,duration:u,uris:g.R(),width:m,sprite:B})})};
704
+ q.cj=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=Hp&&b.m!=Tp)return g.return(null);c=b.ge;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.A(2):H(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=$p(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ic;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.qg(a,h.startTime+l*m/k))}}),H(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
705
+ function $p(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
706
+ q.qg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A;return P(function(C){if(1==C.g){if(c.m!=Hp&&c.m!=Tp)return C.return(null);d=c.ge;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?C.A(2):H(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=$p(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Ic;n=l/h.rows;p=h.Ic*h.rows;r=g.j-g.startTime;
707
+ u=g.B||r/p;w=g.startTime;z=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.Ic*m,z=Math.floor(y/h.Ic)*n);B=!1;if(A=g.thumbnailSprite)B=!0,n=A.height,v=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:z,startTime:w,duration:u,uris:g.R(),width:m,sprite:B})})};
707
708
  q.Wg=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.j.u&&(Gl(c.B.h,d,!1),wm(c.j,d),aq(c),Op(c),c.Nb=d.language)}var c=this;if(this.i&&this.H&&(b(),!this.bb()))return;(function(){if(c.h&&c.h.textTracks){var d=Sp(c),e=d.find(function(f){return"disabled"!==f.mode});if(d=d.find(function(f){return Cg(f)===a.id}))e!==d&&(e&&(e.mode="disabled",c.l.Na(e,"cuechange"),c.C.remove(0,Infinity)),d&&Vp(c,d)),aq(c),Op(c)}})()};
708
709
  function Vp(a,b){a.l.o(b,"cuechange",function(){a.C.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c=Array.from(b.activeCues||[]).map(In).filter(Xf);a.C.append(c)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
709
- q.lf=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Hg(f)){var g=e.j.j;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount)&&cb("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");e.bb()?Fp(e,f,!1,!1,0):Fp(e,f,!1,b||!1,c||0);e.Ga=new Ug(f,e.g.mediaSource.codecSwitchingStrategy);
710
+ q.kf=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Hg(f)){var g=e.j.j;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount)&&cb("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");e.bb()?Fp(e,f,!1,!1,0):Fp(e,f,!1,b||!1,c||0);e.Ga=new Ug(f,e.g.mediaSource.codecSwitchingStrategy);
710
711
  xp(e)}}var e=this;b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.H&&(d(),!this.bb()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,Cg(g)==a.id){bq(e,g);break}}})()};q.ej=function(){return cq(this.Kb())};q.Fj=function(){return cq(this.ec())};q.dj=function(){return Array.from(dq(this.Kb()))};q.Ej=function(){return Array.from(dq(this.ec()))};
711
- q.Ug=function(a,b,c,d,e){function f(){function h(p,r){return p.video||r.video?p.video&&r.video?Math.abs((p.video.height||0)-(r.video.height||0))+Math.abs((p.video.width||0)-(r.video.width||0)):Infinity:0}g.Ga=new Vg(a,b||"",c||0,"",!1,"","","",g.g.mediaSource.codecSwitchingStrategy,e||"");var k=g.j.j,l=g.Ga.create(g.i.variants),m=null;l=t(l.values());for(var n=l.next();!n.done;n=l.next())n=n.value,Hg(n)&&(!m||h(m,k)>h(n,k))&&(m=n);m!=k&&(m?(k=yg(m),g.lf(k,!0,d||0)):Jo(g))}var g=this;c=void 0===c?
712
- 0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.H&&(f(),!this.bb()))return;(function(){if(g.h&&g.h.audioTracks){var h=Jg(g.Kb(),a,b||"",!1)[0];h&&g.lf(h)}})()};q.Vg=function(a,b,c){function d(){e.Nb=a;e.ee=b||"";e.ce=c||!1;var f=Jg(e.i.textStreams,e.Nb,e.ee,e.ce)[0]||null;f&&f!=e.j.u&&(Gl(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Qc())&&(wm(e.j,f),aq(e),Op(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.H&&(d(),!this.bb()))return;(function(){var f=Jg(e.ec(),a,b||"",c||!1)[0];f&&e.Wg(f)})()};
712
+ q.Ug=function(a,b,c,d,e){function f(){function h(p,r){return p.video||r.video?p.video&&r.video?Math.abs((p.video.height||0)-(r.video.height||0))+Math.abs((p.video.width||0)-(r.video.width||0)):Infinity:0}g.Ga=new Vg(a,b||"",c||0,"",!1,"","","",g.g.mediaSource.codecSwitchingStrategy,e||"");var k=g.j.j,l=g.Ga.create(g.i.variants),m=null;l=t(l.values());for(var n=l.next();!n.done;n=l.next())n=n.value,Hg(n)&&(!m||h(m,k)>h(n,k))&&(m=n);m!=k&&(m?(k=yg(m),g.kf(k,!0,d||0)):Jo(g))}var g=this;c=void 0===c?
713
+ 0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.H&&(f(),!this.bb()))return;(function(){if(g.h&&g.h.audioTracks){var h=Jg(g.Kb(),a,b||"",!1)[0];h&&g.kf(h)}})()};q.Vg=function(a,b,c){function d(){e.Nb=a;e.ee=b||"";e.ce=c||!1;var f=Jg(e.i.textStreams,e.Nb,e.ee,e.ce)[0]||null;f&&f!=e.j.u&&(Gl(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Sc())&&(wm(e.j,f),aq(e),Op(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.H&&(d(),!this.bb()))return;(function(){var f=Jg(e.ec(),a,b||"",c||!1)[0];f&&e.Wg(f)})()};
713
714
  q.Gk=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.Ga=new Vg(f.language,"",0,"",!1,"",a,"",e.g.mediaSource.codecSwitchingStrategy,""),Jo(e,b,c))}var e=this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.H&&(d(),!this.bb()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&bq(e,g)}})()};
714
- q.Qc=function(){var a=this.qa;return this.C?this.C.isTextVisible():a};q.Lh=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?eq(this).map(function(a){return Eg(a)}):[]};
715
- q.ng=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=bd(a),c=eq(this).filter(function(h){return bd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(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};
715
+ q.Sc=function(){var a=this.qa;return this.C?this.C.isTextVisible():a};q.Lh=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?eq(this).map(function(a){return Eg(a)}):[]};
716
+ q.mg=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=bd(a),c=eq(this).filter(function(h){return bd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(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};
716
717
  function Sp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Xp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function eq(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
717
- q.nf=function(a){a=!!a;this.qa!=a&&(this.qa=a,this.m==Hp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Jg(this.i.textStreams,this.Nb,this.ee,this.ce),0<a.length&&(wm(this.j,a[0]),aq(this),Op(this))):sm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),Np(this))};
718
+ q.mf=function(a){a=!!a;this.qa!=a&&(this.qa=a,this.m==Hp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Jg(this.i.textStreams,this.Nb,this.ee,this.ce),0<a.length&&(wm(this.j,a[0]),aq(this),Op(this))):sm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),Np(this))};
718
719
  q.zj=function(){if(this.H)var a=this.H.qe();else{if(null==this.ma)return new Date;a=this.ma}if(this.i&&!this.bb()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Ph=function(){if(this.i&&!this.bb()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
719
720
  q.He=function(){return this.T()?this.i?this.i.presentationTimeline.He():null:null};q.Vb=function(){if(this.m==Hp)return this.K.Vb();var a={total:[],audio:[],video:[],text:[]};this.m==Tp&&(a.total=nj(this.h.buffered));return a};
720
721
  q.getStats=function(){if(this.m!=Hp&&this.m!=Tp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
721
722
  stateHistory:[]};Bp(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.T()){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.H&&(this.B.S=this.H.oh(),this.B.U=this.H.ph());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.P=Number(c.droppedVideoFrames);b.O=d;this.B.M=Number(c.corruptedVideoFrames)}this.G?(c=this.G,c=c.J?c.J:NaN):c=NaN;this.B.s=c;if(this.m==Hp){c=this.j.j;b=this.j.u;if(c){d=this.L?this.L.i:1;
722
- var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.B.B=e}c&&c.video&&(b=this.B,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.T()&&(c=this.Ph().valueOf()+1E3*a.currentTime,this.B.C=(Date.now()-c)/1E3);this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.K=this.i.presentationTimeline.h));c=this.s.getBandwidthEstimate();this.B.u=c}this.m==Tp&&(c=this.B,c.Fc=isNaN(c.Fc)?NaN:c.Fc+NaN,c=this.B,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=
723
- b);var f=this.B;a=f.m;c=f.l;b=f.B;d=f.O;e=f.P;var g=f.M,h=f.U,k=f.S,l=f.u,m=f.i,n=f.G,p=f.J,r=f.j,u=Dl(f.g,"playing"),w=Dl(f.g,"paused"),v=Dl(f.g,"buffering"),z=f.s,y=f.C,B=f.K,A=f.Xh,C=f.Fc,D=f.L,E=f.I,F=f.H,K=El(f.g),G=[];f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,G.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
723
+ var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.B.B=e}c&&c.video&&(b=this.B,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.T()&&(c=this.Ph().valueOf()+1E3*a.currentTime,this.B.C=(Date.now()-c)/1E3);this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.K=this.i.presentationTimeline.h));c=this.s.getBandwidthEstimate();this.B.u=c}this.m==Tp&&(c=this.B,c.Gc=isNaN(c.Gc)?NaN:c.Gc+NaN,c=this.B,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=
724
+ b);var f=this.B;a=f.m;c=f.l;b=f.B;d=f.O;e=f.P;var g=f.M,h=f.U,k=f.S,l=f.u,m=f.i,n=f.G,p=f.J,r=f.j,u=Dl(f.g,"playing"),w=Dl(f.g,"paused"),v=Dl(f.g,"buffering"),z=f.s,y=f.C,B=f.K,A=f.Xh,C=f.Gc,D=f.L,E=f.I,F=f.H,K=El(f.g),G=[];f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,G.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
724
725
  estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:w,bufferingTime:v,licenseTime:z,liveLatency:y,maxSegmentDuration:B,manifestSizeBytes:A,bytesDownloaded:C,nonFatalErrorCount:D,manifestPeriodCount:E,manifestGapCount:F,stateHistory:K,switchHistory:G}};
725
726
  q.Ti=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,w,v,z,y,B;return P(function(A){switch(A.g){case 1:if(h.m!=Hp&&h.m!=Tp)throw new U(1,7,7004);"subtitles"!=c&&"captions"!=c&&cb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.A(2);break}return H(A,fq(h,a),3);case 3:d=A.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.m!=Tp){A.A(4);break}g&&(c="forced");return H(A,gq(h,a,b,c,d,f||"",k),5);case 5:l=bd(b);m=h.ec();if(n=m.find(function(C){return bd(C.language)==
726
- l&&C.label==(f||"")&&C.kind==c}))return wp(h),A.return(n);throw new U(1,2,2012);case 4:p=Yc;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new U(1,4,4033);if(!k.length){A.A(6);break}return H(A,hq(h,a,h.I,h.g.streaming.retryParameters),7);case 7:u=A.h,w=iq(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=lk(v),d="text/vtt";case 6:z={id:h.Ef++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wl(0,r,[a]),mimeType:d||"",
727
+ l&&C.label==(f||"")&&C.kind==c}))return wp(h),A.return(n);throw new U(1,2,2012);case 4:p=Yc;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new U(1,4,4033);if(!k.length){A.A(6);break}return H(A,hq(h,a,h.I,h.g.streaming.retryParameters),7);case 7:u=A.h,w=iq(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=lk(v),d="text/vtt";case 6:z={id:h.Df++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wl(0,r,[a]),mimeType:d||"",
727
728
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.Oa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([zf(d||"",e||"")]),isAudioMuxedInVideo:!1};y=zf(z.mimeType,z.codecs);B=Nf(y);if(!B)throw new U(2,2,2014,d);h.i.textStreams.push(z);wp(h);return A.return(zg(z))}})};
728
729
  q.Ui=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B;return P(function(A){switch(A.g){case 1:if(c.m!=Hp&&c.m!=Tp)throw new U(1,7,7004);if(b){A.A(2);break}return H(A,fq(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new U(1,2,2017,a);d=Yc;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new U(1,4,4045);return H(A,hq(c,a,c.I,c.g.streaming.retryParameters),4);case 4:f=A.h;g=Of[b];if(!g)throw new U(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
729
- vttOffset:0};l=Jb(f);m=h.parseMedia(l,k,a,[]);n=[];p=t(m);r=p.next();for(u={};!r.done;u={yf:void 0,dd:void 0},r=p.next())u.dd=r.value,u.yf=null,w=function(C){return function(){null==C.yf&&(C.yf=Pc([a],[C.dd.payload]));return C.yf||[]}}(u),v=new fj(u.dd.startTime,u.dd.endTime,w,0,null,null,0,0,Infinity),u.dd.payload.includes("#xywh")&&(z=u.dd.payload.split("#xywh=")[1].split(","),4===z.length&&v.pf({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
730
- 10)})),n.push(v);y=b;if(!n.length){A.A(5);break}return H(A,Bn(n[0].R()[0],c.I,c.g.manifest.retryParameters),6);case 6:y=A.h;case 5:return B={id:c.Ef++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ul(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ff,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
730
+ vttOffset:0};l=Jb(f);m=h.parseMedia(l,k,a,[]);n=[];p=t(m);r=p.next();for(u={};!r.done;u={xf:void 0,dd:void 0},r=p.next())u.dd=r.value,u.xf=null,w=function(C){return function(){null==C.xf&&(C.xf=Pc([a],[C.dd.payload]));return C.xf||[]}}(u),v=new fj(u.dd.startTime,u.dd.endTime,w,0,null,null,0,0,Infinity),u.dd.payload.includes("#xywh")&&(z=u.dd.payload.split("#xywh=")[1].split(","),4===z.length&&v.nf({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
731
+ 10)})),n.push(v);y=b;if(!n.length){A.A(5);break}return H(A,Bn(n[0].R()[0],c.I,c.g.manifest.retryParameters),6);case 6:y=A.h;case 5:return B={id:c.Df++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ul(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ef,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
731
732
  spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([zf(y||"","")]),isAudioMuxedInVideo:!1},c.m==Tp?c.ge.push(B):c.i.imageStreams.push(B),wp(c),A.return(Ag(B))}})};
732
733
  q.Si=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=Hp&&d.m!=Tp)throw new U(1,7,7004);if(c){k.A(2);break}return H(k,fq(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),H(k,gq(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Lh();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return H(k,new Promise(function(l,m){d.l.sa(f,"load",l);d.l.sa(f,"error",function(){m(new U(1,2,2015))})}),6);case 6:return wp(d),k.return(h);case 5:throw new U(1,
733
734
  2,2012);}})};function fq(a,b){var c;return P(function(d){switch(d.g){case 1:return ta(d,2),H(d,Bn(b,a.I,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
734
735
  function gq(a,b,c,d,e,f,g){var h,k,l,m;return P(function(n){if(1==n.g)return"text/vtt"!=e||g.length?H(n,hq(a,b,a.I,a.g.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=iq(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=lk(l),e="text/vtt");m=document.createElement("track");var p=a.P,r=b;try{if(p.g.enabled){var u=eo(p);u.ot=ro;u.su=!0;var w=io(u);var v=jo(r,w)}else v=r}catch(z){db("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),v=r}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
735
736
  a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function hq(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){e=Ih;f=Ah([b],d);f.method="GET";var k=a.P;try{k.g.enabled&&ko(k,f,{ot:ro,su:!0})}catch(l){db("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return H(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
736
737
  function iq(a,b,c,d){var e=Of[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Jb(b),b=c.parseMedia(b,a,null,[]),Vn(b,d);throw new U(2,2,2014,c);}q.Mk=function(a,b){this.ka.width=a;this.ka.height=b};q.Sg=function(a){if(this.m==Hp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.B)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Od||d.Za||d.wb||(d.Od=!1,rm(b,d,a));b=!0}}else b=!1;return b};
737
- q.pg=function(){cb("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.vj=function(){return this.Ya};
738
+ q.og=function(){cb("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.vj=function(){return this.Ya};
738
739
  q.oj=function(){var a={video:null,audio:null,text:null};if(this.m!=Hp)return a;var b=this.j.j,c=this.h.currentTime;b=t([b.video,b.audio,this.j.u]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==Wc&&(a.text=e)}return a};
739
- function Eo(a){var b=bn();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Sg(d))}};b.textDisplayFactory=function(){if(a.Cf){var c=a.getConfiguration();return new Mn(a.h,a.Cf,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Jn(a.h,"Shaka Player TextTrack"):new Ln};return b}q.eh=function(a){this.Cf=a};
740
- function sp(a,b){for(var c=new Set,d=t(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=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(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 xl,l=e.closedCaptions.get(g);h={id:a.Ef++,originalId:g,groupId:null,
740
+ function Eo(a){var b=bn();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Sg(d))}};b.textDisplayFactory=function(){if(!a.Bf||rc()&&!document.fullscreenEnabled)return HTMLMediaElement.prototype.addTextTrack?new Jn(a.h,"Shaka Player TextTrack"):new Ln;var c=a.getConfiguration();return new Mn(a.h,a.Bf,c.textDisplayer)};return b}q.eh=function(a){this.Bf=a};
741
+ function sp(a,b){for(var c=new Set,d=t(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=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(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 xl,l=e.closedCaptions.get(g);h={id:a.Df++,originalId:g,groupId:null,
741
742
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([zf(h,"")]),isAudioMuxedInVideo:!1};b.textStreams.push(h);c.add(g)}}
742
743
  function Lp(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return P(function(r){if(1==r.g)return k?H(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},H(h,e(c,b),2);if(3!=h.g)return f=h.h,H(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
743
744
  function ip(a){var b=a.Me();if(a.B&&a.O&&a.H){var c=a.L;c.j=b;zl(c);a.P&&(c=a.P,b||c.l||(c.l=!0),c.l&&b&&(c.m=!0),c.s=b);Bp(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.pe<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.S&&(a.S=Math.min(a.S+ ++a.pe*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(ap("buffering",
744
745
  b))}function Bp(a){if(a.B&&a.O){var b=a.B.g,c="playing";a.O.g==gh?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(ap("statechanged",c)))}}
745
- function Qp(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Kh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Wc(d,!1):1==e&&b!==a.L.Jc()&&a.$c()}if(c&&(c=a.Ia(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
746
- a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
747
- d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.S||"number"!==typeof g||(a.S=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ja&&null!==a.S&&"number"===typeof g&&a.pe<n&&Date.now()-a.Ja>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.S=Math.max(a.S-(g-f)/2,f+d),
748
- a.Ja=Date.now());e&&null!==a.S&&(h=a.S+d,k=a.S-d);g=c.end-a.h.currentTime;d=0;a.m==Tp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.O.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Wc(m,!1):h&&l&&g-d>h?(b!=l&&a.Wc(l,!1),a.Ja=null):k&&m&&g-d<k?(b!=m&&a.Wc(m,!1),a.Ja=null):b!==a.L.Jc()&&(a.$c(),a.Ja=Date.now())}}
749
- function Rp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.U)?(a.U=c,b=!0):(c=Math.max(a.U,c),a.U!=c&&(a.U=c,b=!0)));if(b){var d;0==a.U?d=ap("started"):25==a.U?d=ap("firstquartile"):50==a.U?d=ap("midpoint"):75==a.U?d=ap("thirdquartile"):100==a.U&&(d=ap("complete"));d&&a.dispatchEvent(d)}}}function xp(a){try{Vi(a.Bf,a.i)}catch(c){return gp(a,c),!1}var b=Ig(a.i.variants);b=a.Ga.create(b);a.s.setVariants(Array.from(b.values()));return!0}
746
+ function Qp(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Kh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Ec(d,!1):1==e&&b!==a.L.Lc()&&a.Hc()}if(c&&(c=a.Ia(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
747
+ if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
748
+ k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.S||"number"!==typeof g||(a.S=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ja&&null!==a.S&&"number"===typeof g&&a.pe<n&&Date.now()-a.Ja>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
749
+ a.S=Math.max(a.S-(g-f)/2,f+d),a.Ja=Date.now());e&&null!==a.S&&(h=a.S+d,k=a.S-d);g=c.end-a.h.currentTime;d=0;a.m==Tp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.O.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Ec(m,!1):h&&l&&g-d>h?(b!=l&&a.Ec(l,!1),a.Ja=null):k&&m&&g-d<k?(b!=m&&a.Ec(m,!1),a.Ja=null):b!==a.L.Lc()&&(a.Hc(),a.Ja=Date.now())}}
750
+ function Rp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.U)?(a.U=c,b=!0):(c=Math.max(a.U,c),a.U!=c&&(a.U=c,b=!0)));if(b){var d;0==a.U?d=ap("started"):25==a.U?d=ap("firstquartile"):50==a.U?d=ap("midpoint"):75==a.U?d=ap("thirdquartile"):100==a.U&&(d=ap("complete"));d&&a.dispatchEvent(d)}}}function xp(a){try{Vi(a.Af,a.i)}catch(c){return gp(a,c),!1}var b=Ig(a.i.variants);b=a.Ga.create(b);a.s.setVariants(Array.from(b.values()));return!0}
750
751
  function Jo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=xp(a)?a.s.chooseVariant():null)&&Fp(a,f,e,b,c,d)}
751
752
  function Fp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&vm(a.j,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));vm(a.j,b,d,e,f,c);d=null;g&&(d=yg(g));b=yg(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.M&&hk(a.M,b,a.Fe()),c=ap("adaptation",c),jq(a,c)):kq(a,d,b)}}
752
753
  function bq(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Gg(c),b=Gg(b),kq(a,c,b))}function Mp(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=bd(a.g.preferredTextLanguage);c=bd(c.language);if(2==a.g.autoShowText)return ad(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=bd(b.language);return ad(c,d)&&!ad(a,c)}cb("Invalid autoShowText setting!");return!1}
@@ -761,16 +762,16 @@ function vp(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth
761
762
  function fp(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Ep(a,b,c){0<b&&(a.T()||a.Bi(b));b=a.getDuration();c<b&&(a.T()||a.vb(c))}function jq(a,b){P(function(c){if(1==c.g)return H(c,Promise.resolve(),2);a.m!=bp&&a.dispatchEvent(b);I(c)})}
762
763
  function dq(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(bd(c.language)):b.add("und");return b}
763
764
  function cq(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=bd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
764
- h.push({language:l,role:m,label:n})}});return h}q.bb=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};S("shaka.Player",X);X.prototype.isRemotePlayback=X.prototype.bb;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.eh;X.prototype.getFetchedPlaybackInfo=X.prototype.oj;X.prototype.getManifestParserFactory=X.prototype.vj;X.prototype.getManifest=X.prototype.pg;X.prototype.retryStreaming=X.prototype.Sg;
765
- X.prototype.setMaxHardwareResolution=X.prototype.Mk;X.prototype.addChaptersTrack=X.prototype.Si;X.prototype.addThumbnailsTrack=X.prototype.Ui;X.prototype.addTextTrackAsync=X.prototype.Ti;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Vb;X.prototype.getSegmentAvailabilityDuration=X.prototype.He;X.prototype.getPresentationStartTimeAsDate=X.prototype.Ph;X.prototype.getPlayheadTimeAsDate=X.prototype.zj;X.prototype.setTextTrackVisibility=X.prototype.nf;
766
- X.prototype.getChapters=X.prototype.ng;X.prototype.getChaptersTracks=X.prototype.Lh;X.prototype.isTextTrackVisible=X.prototype.Qc;X.prototype.selectVariantsByLabel=X.prototype.Gk;X.prototype.selectTextLanguage=X.prototype.Vg;X.prototype.selectAudioLanguage=X.prototype.Ug;X.prototype.getTextLanguages=X.prototype.Ej;X.prototype.getAudioLanguages=X.prototype.dj;X.prototype.getTextLanguagesAndRoles=X.prototype.Fj;X.prototype.getAudioLanguagesAndRoles=X.prototype.ej;X.prototype.selectVariantTrack=X.prototype.lf;
767
- X.prototype.selectTextTrack=X.prototype.Wg;X.prototype.getThumbnails=X.prototype.rg;X.prototype.getAllThumbnails=X.prototype.cj;X.prototype.getImageTracks=X.prototype.De;X.prototype.getTextTracks=X.prototype.ec;X.prototype.getVariantTracks=X.prototype.Kb;X.prototype.cancelTrickPlay=X.prototype.$c;X.prototype.trickPlay=X.prototype.Wc;X.prototype.getPlaybackRate=X.prototype.Wa;X.prototype.isBuffering=X.prototype.Me;X.prototype.getKeyStatuses=X.prototype.Ee;X.prototype.getActiveSessionsMetadata=X.prototype.mg;
768
- X.prototype.getExpiration=X.prototype.Kd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Uh;X.prototype.goToLive=X.prototype.Oj;X.prototype.seekRange=X.prototype.Ia;X.prototype.isAudioOnly=X.prototype.Oc;X.prototype.isInProgress=X.prototype.Pc;X.prototype.isLive=X.prototype.T;X.prototype.getAdManager=X.prototype.Ce;X.prototype.getAssetUri=X.prototype.jd;X.prototype.getNetworkingEngine=X.prototype.Hb;
769
- X.prototype.getMediaElement=X.prototype.yj;X.prototype.getManifestType=X.prototype.Fe;X.prototype.getLoadMode=X.prototype.kd;X.prototype.resetConfiguration=X.prototype.zk;X.prototype.getBufferFullness=X.prototype.Kh;X.prototype.getNonDefaultConfiguration=X.prototype.Oh;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.vk;X.prototype.destroyAllPreloads=X.prototype.Wf;X.prototype.preload=X.prototype.preload;
765
+ h.push({language:l,role:m,label:n})}});return h}q.bb=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};S("shaka.Player",X);X.prototype.isRemotePlayback=X.prototype.bb;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.eh;X.prototype.getFetchedPlaybackInfo=X.prototype.oj;X.prototype.getManifestParserFactory=X.prototype.vj;X.prototype.getManifest=X.prototype.og;X.prototype.retryStreaming=X.prototype.Sg;
766
+ X.prototype.setMaxHardwareResolution=X.prototype.Mk;X.prototype.addChaptersTrack=X.prototype.Si;X.prototype.addThumbnailsTrack=X.prototype.Ui;X.prototype.addTextTrackAsync=X.prototype.Ti;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Vb;X.prototype.getSegmentAvailabilityDuration=X.prototype.He;X.prototype.getPresentationStartTimeAsDate=X.prototype.Ph;X.prototype.getPlayheadTimeAsDate=X.prototype.zj;X.prototype.setTextTrackVisibility=X.prototype.mf;
767
+ X.prototype.getChapters=X.prototype.mg;X.prototype.getChaptersTracks=X.prototype.Lh;X.prototype.isTextTrackVisible=X.prototype.Sc;X.prototype.selectVariantsByLabel=X.prototype.Gk;X.prototype.selectTextLanguage=X.prototype.Vg;X.prototype.selectAudioLanguage=X.prototype.Ug;X.prototype.getTextLanguages=X.prototype.Ej;X.prototype.getAudioLanguages=X.prototype.dj;X.prototype.getTextLanguagesAndRoles=X.prototype.Fj;X.prototype.getAudioLanguagesAndRoles=X.prototype.ej;X.prototype.selectVariantTrack=X.prototype.kf;
768
+ X.prototype.selectTextTrack=X.prototype.Wg;X.prototype.getThumbnails=X.prototype.qg;X.prototype.getAllThumbnails=X.prototype.cj;X.prototype.getImageTracks=X.prototype.De;X.prototype.getTextTracks=X.prototype.ec;X.prototype.getVariantTracks=X.prototype.Kb;X.prototype.cancelTrickPlay=X.prototype.Hc;X.prototype.trickPlay=X.prototype.Ec;X.prototype.getPlaybackRate=X.prototype.Wa;X.prototype.isBuffering=X.prototype.Me;X.prototype.getKeyStatuses=X.prototype.Ee;X.prototype.getActiveSessionsMetadata=X.prototype.lg;
769
+ X.prototype.getExpiration=X.prototype.Kd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Uh;X.prototype.goToLive=X.prototype.Oj;X.prototype.seekRange=X.prototype.Ia;X.prototype.isAudioOnly=X.prototype.Qc;X.prototype.isInProgress=X.prototype.Rc;X.prototype.isLive=X.prototype.T;X.prototype.getAdManager=X.prototype.Ce;X.prototype.getAssetUri=X.prototype.jd;X.prototype.getNetworkingEngine=X.prototype.Hb;
770
+ X.prototype.getMediaElement=X.prototype.yj;X.prototype.getManifestType=X.prototype.Fe;X.prototype.getLoadMode=X.prototype.kd;X.prototype.resetConfiguration=X.prototype.zk;X.prototype.getBufferFullness=X.prototype.Kh;X.prototype.getNonDefaultConfiguration=X.prototype.Oh;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.vk;X.prototype.destroyAllPreloads=X.prototype.Vf;X.prototype.preload=X.prototype.preload;
770
771
  X.prototype.detachAndSavePreload=X.prototype.Gh;X.prototype.unloadAndSavePreload=X.prototype.Qk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Uk;X.prototype.unload=X.prototype.qc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.sh;X.prototype.attach=X.prototype.$b;
771
772
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return H(k,Ni(),3);case 3:b=k.h;case 2:var l={};if(Zb())for(var m in Zi)l[m]=!0;m=t(["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,l[n]=Zb()?!!Zi[n]:$b(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Af));
772
773
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Nf(n)?!0:Zb()?yd(n)||(tf(n)?!0:!1):$b(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return H(k,yc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=lq;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=cp;X.setAdManagerFactory=function(a){Ho=a};X.registerSupportPlugin=function(a,b){lq[a]=b};X.prototype.destroy=X.prototype.destroy;var bp=0,Do=1,Hp=2,Tp=3;
773
- X.LoadMode={DESTROYED:bp,NOT_LOADED:Do,MEDIA_SOURCE:Hp,SRC_EQUALS:Tp};X.version="v4.12.0";var mq=["4","12"];Dd=new function(a){this.g=a;this.i=Ed;this.h=Fd}(new Bd(Number(mq[0]),Number(mq[1])));var lq={},Ho=null;function nq(){this.g=[];this.i=this.l=this.j=this.h=0}function oq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function pq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new td;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=pq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.isUsingAnotherMediaElement=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};
774
+ X.LoadMode={DESTROYED:bp,NOT_LOADED:Do,MEDIA_SOURCE:Hp,SRC_EQUALS:Tp};X.version="v4.12.1";var mq=["4","12"];Dd=new function(a){this.g=a;this.i=Ed;this.h=Fd}(new Bd(Number(mq[0]),Number(mq[1])));var lq={},Ho=null;function nq(){this.g=[];this.i=this.l=this.j=this.h=0}function oq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function pq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new td;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=pq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.isUsingAnotherMediaElement=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};
774
775
  q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};
775
776
  q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
776
777
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
@@ -783,7 +784,7 @@ function rq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(ne(a,"Ad"));for(var e=a.next();
783
784
  0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=oe(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}S("shaka.ads.Utils",qq);qq.ADS_LOADED="ads-loaded";qq.AD_STARTED="ad-started";qq.AD_FIRST_QUARTILE="ad-first-quartile";qq.AD_MIDPOINT="ad-midpoint";qq.AD_THIRD_QUARTILE="ad-third-quartile";
784
785
  qq.AD_COMPLETE="ad-complete";qq.AD_STOPPED="ad-stopped";qq.AD_SKIPPED="ad-skipped";qq.AD_VOLUME_CHANGED="ad-volume-changed";qq.AD_MUTED="ad-muted";qq.AD_PAUSED="ad-paused";qq.AD_RESUMED="ad-resumed";qq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";qq.CUEPOINTS_CHANGED="ad-cue-points-changed";qq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";qq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";qq.AD_CLICKED="ad-clicked";qq.AD_PROGRESS="ad-progress";qq.AD_BUFFERING="ad-buffering";
785
786
  qq.AD_IMPRESSION="ad-impression";qq.AD_DURATION_CHANGED="ad-duration-changed";qq.AD_CLOSED="ad-closed";qq.AD_LOADED="ad-loaded";qq.ALL_ADS_COMPLETED="all-ads-completed";qq.AD_LINEAR_CHANGED="ad-linear-changed";qq.AD_METADATA="ad-metadata";qq.AD_RECOVERABLE_ERROR="ad-recoverable-error";qq.AD_ERROR="ad-error";qq.AD_BREAK_READY="ad-break-ready";qq.AD_INTERACTION="ad-interaction";qq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";qq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
786
- qq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function sq(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.B=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new td;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.12.0");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
787
+ qq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function sq(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.B=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new td;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.12.1");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
787
788
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tq(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){uq(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.sa(this.i,"play",function(){f.H=!0})}sq.prototype.configure=function(a){this.s=a};sq.prototype.stop=function(){this.g&&this.g.stop();this.u&&sj(this.u)};
788
789
  sq.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function uq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));vq(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
789
790
  function tq(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -806,14 +807,14 @@ zq.prototype.isSkippable=zq.prototype.isSkippable;zq.prototype.isPaused=zq.proto
806
807
  0,f.G);k&&Cq(f,k,1,1,Date.now())}});this.L=new Yb(e);if("requestVideoFrameCallback"in this.g&&!uc()){var g=this.g,h=function(){e();g.requestVideoFrameCallback(h)};g.requestVideoFrameCallback(h)}else this.L.Aa(.025);this.P=(new Yb(function(){var k,l,m,n,p,r,u,w,v,z,y;return P(function(B){switch(B.g){case 1:if(!f.C.size||null==f.j){B.A(0);break}k=f.B.kd();if(k==bp||k==Do)return B.return();l=!1;m=Array.from(f.C);n=f.B.Ia();p=t(m);r=p.next();case 3:if(r.done){B.A(5);break}u=r.value;if(u==f.G){B.A(4);
807
808
  break}w=u.endTime||u.startTime;if(!(1<=n.start-w)){v=u.startTime-f.j;0<v&&10>=v&&(f.u.has(u)||f.u.set(u,f.i.preload(u.uri)));B.A(4);break}if(!f.u.has(u)){B.A(7);break}return H(B,f.u.get(u),8);case 8:(z=B.h)&&z.destroy(),f.u.delete(u);case 7:y=JSON.stringify(u),f.K.has(y)&&f.K.delete(y),f.C.delete(u),l=!0;case 4:r=p.next();B.A(3);break;case 5:l&&Eq(f),I(B)}})})).Aa(1)}Aq.prototype.configure=function(a){this.M=a;Fq(this)};
808
809
  function Fq(a){if(a.I&&a.M&&!a.J){var b=a.M.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.s==b&&(a.s=!b,a.s?(a.l=a.g,a.H&&(a.H.parentElement&&a.I.removeChild(a.H),a.H=null)):(a.H||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.H=b),a.l=a.H))}}
809
- Aq.prototype.stop=function(){this.m&&this.m.cb();this.K.clear();this.C.clear();this.i.Wf();this.u.clear();this.i.detach();this.J=!1;this.G=this.j=null};Aq.prototype.release=function(){this.stop();this.O&&this.O.release();this.m&&this.m.release();this.I&&sj(this.I);this.L&&(this.L.stop(),this.L=null);this.P&&(this.P.stop(),this.P=null);this.i.destroy()};function Gq(a,b){var c;P(function(d){if(1==d.g)return Dq(a),H(d,Hq(a,b),2);c=d.h;c.length?Iq(a,c):cb("Unsupported HLS interstitial",b);I(d)})}
810
- Aq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},H(n,Jq(b,a,c),2);case 2:d=n.h;e=ce(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,4001);f=[];if("VAST"==e.tagName){f=rq(e,b.j);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var p=[],r=t(ne(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=$d(v),(w=re(w,"vmap:AdSource"))&&
811
- (w=re(w,"vmap:AdTagURI"))&&(w=oe(w))&&p.push({time:u,uri:w}))}g=t(p);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return H(n,Jq(b,k.uri,c),8);case 8:l=n.h;m=ce(l,"VAST");if(!m)throw new U(2,10,4001);f.push.apply(f,x(rq(m,k.time)));h=g.next();n.A(5);break;case 3:Iq(b,f),I(n)}})};
810
+ Aq.prototype.stop=function(){this.m&&this.m.cb();this.K.clear();this.C.clear();this.i.Vf();this.u.clear();this.i.detach();this.J=!1;this.G=this.j=null};Aq.prototype.release=function(){this.stop();this.O&&this.O.release();this.m&&this.m.release();this.I&&sj(this.I);this.L&&(this.L.stop(),this.L=null);this.P&&(this.P.stop(),this.P=null);this.i.destroy()};function Gq(a,b){var c;P(function(d){if(1==d.g)return Dq(a),H(d,Hq(a,b),2);c=d.h;c.length?Iq(a,c):cb("Unsupported HLS interstitial",b);I(d)})}
811
+ Aq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},H(n,Jq(b,a,c),2);case 2:d=n.h;e=ce(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=rq(e,b.j);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var p=[],r=t(ne(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=$d(v),(w=re(w,"vmap:AdSource"))&&
812
+ (w=re(w,"vmap:AdTagURI"))&&(w=oe(w))&&p.push({time:u,uri:w}))}g=t(p);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return H(n,Jq(b,k.uri,c),8);case 8:l=n.h;m=ce(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(rq(m,k.time)));h=g.next();n.A(5);break;case 3:Iq(b,f),I(n)}})};
812
813
  function Iq(a,b){var c=!1;b=t(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;var e=d.id||JSON.stringify(d);if(!a.K.has(e)){c=!0;a.K.add(e);a.C.add(d);e=!1;if(d.pre&&null==a.j)e=!0;else if(0==d.startTime&&!d.canJump)e=!0;else if(null!=a.j){var f=d.startTime-a.j;0<f&&10>=f&&(e=!0)}e&&(a.u.has(d)||a.u.set(d,a.i.preload(d.uri)))}}c&&Eq(a)}
813
- function Bq(a,b,c,d){var e=0,f=null;if(a.C.size&&null!=a.j){var g=a.g.ended,h=Array.from(a.C).sort(function(n,p){return p.startTime-n.startTime});h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=!1;if(b)l=k.pre;else if(g)l=k.post;else if(!k.pre&&!k.post){var m=a.j-Math.round(1E3*k.startTime)/1E3;0<m&&(1>=m||!k.canJump)&&(l=1<m&&d&&!d.pre&&!d.post&&d.startTime>=k.startTime?!1:!0)}if(l){if(e==c){f=k;break}e++}}}return f}
814
+ function Bq(a,b,c,d){var e=0,f=null;if(a.C.size&&null!=a.j){var g=a.g.ended,h=Array.from(a.C).sort(function(n,p){return p.startTime-n.startTime});h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=!1;if(b)l=k.pre;else if(g)l=k.post;else if(!k.pre&&!k.post){var m=a.j-Math.round(1E3*k.startTime)/1E3;0<m&&(1>=m||!k.canJump)&&(l=d&&!d.pre&&!d.post&&d.startTime>=k.startTime?!1:!0)}if(l){if(e==c){f=k;break}e++}}}return f}
814
815
  function Cq(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D;P(function(E){switch(E.g){case 1:Fq(a);a.G=b;g=Date.now();!a.l.parentElement&&a.I&&a.I.appendChild(a.l);1==d&&1==c&&(c=Array.from(a.C).filter(function(F){return b.pre?F.pre==b.pre:b.post?F.post==b.post:.001>Math.abs(F.startTime-b.startTime)}).length);if(b.once||b.pre)f++,a.C.delete(b),Eq(a);a.J=!0;if(!a.s||1!=d){E.A(2);break}a.h(new T("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new lh;k=function(F){return P(function(K){if(1==
815
816
  K.g)return"detach"!=F.state?K.A(0):uc()?H(K,new Promise(function(G){return(new Yb(G)).Y(.1)}),3):K.A(3);h.resolve();a.m.Na(a.B,"onstatechange",k);I(K)})};a.m.o(a.B,"onstatechange",k);return H(E,h,2);case 2:return a.s||(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.s&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var F=Date.now();a.g.currentTime+=
816
- (F-e)/1E3;e=F}},p=function(){var F,K;return P(function(G){if(1==G.g)return n(),m&&m.stop(),(F=Bq(a,b.pre,d-f))?(a.h(new T("ad-stopped")),a.m.cb(),Cq(a,F,c,++d,e,f),G.A(0)):a.s?H(G,a.i.detach(),4):H(G,a.i.qc(),4);a.s&&(K=b.resumeOffset,null==K&&(K=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.h(new T("ad-content-resume-requested",(new Map).set("offset",K))));a.h(new T("ad-stopped"));a.m.cb();a.J=!1;a.s||(n(),a.g.ended||a.g.play());Fq(a);I(G)})},r=function(F){return P(function(K){if(l)return K.return();
817
+ (F-e)/1E3;e=F}},p=function(){var F,K;return P(function(G){if(1==G.g)return n(),m&&m.stop(),(F=Bq(a,b.pre,d-f))?(a.h(new T("ad-stopped")),a.m.cb(),Cq(a,F,c,++d,e,f),G.A(0)):a.s?H(G,a.i.detach(),4):H(G,a.i.qc(),4);a.s&&(K=b.resumeOffset,null==K&&(K=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.h(new T("ad-content-resume-requested",(new Map).set("offset",K))));a.h(new T("ad-stopped"));a.m.cb();a.J=!1;a.s?Eq(a):(n(),a.g.ended||a.g.play());Fq(a);I(G)})},r=function(F){return P(function(K){if(l)return K.return();
817
818
  l=!0;a.h(new T("ad-error",(new Map).set("originalEvent",F)));return H(K,p(),0)})},u=function(){return P(function(F){if(1==F.g){if(l)return F.return();l=!0;return H(F,p(),2)}a.h(new T("ad-complete"));I(F)})},w=function(){return P(function(F){if(l)return F.return();l=!0;a.h(new T("ad-skipped"));return H(F,p(),0)})},v=new zq(a.l,b.isSkippable,b.skipOffset,b.skipFor,w,c,d,!a.s),a.s||(v.setMuted(a.g.muted),v.setVolume(a.g.volume)),a.h(new T("ad-started",(new Map).set("ad",v))),(z=v.canSkipNow())&&a.h(new T("ad-skip-state-changed")),
818
819
  y=new Set,a.m.sa(a.i,"error",r),a.m.o(a.l,"timeupdate",function(){var F=a.l.duration;if(F){var K=v.canSkipNow();z!=K&&0<v.getRemainingTime()&&0<v.getDuration()&&a.h(new T("ad-skip-state-changed"));z=K;F=100*a.l.currentTime/F;25<=F&&!y.has("firstquartile")?(n(),a.h(new T("ad-first-quartile")),y.add("firstquartile")):50<=F&&!y.has("midpoint")?(n(),a.h(new T("ad-midpoint")),y.add("midpoint")):75<=F&&!y.has("thirdquartile")&&(n(),a.h(new T("ad-third-quartile")),y.add("thirdquartile"))}}),a.m.sa(a.i,"complete",
819
820
  u),a.m.o(a.l,"play",function(){a.h(new T("ad-resumed"))}),a.m.o(a.l,"pause",function(){var F=a.i.getConfiguration();a.l.currentTime>=F.playRangeEnd?u():a.h(new T("ad-paused"))}),a.m.o(a.l,"volumechange",function(){a.l.muted?a.h(new T("ad-muted")):a.h(new T("ad-volume-changed"))}),ta(E,4),Dq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(B=b.endTime-b.startTime,0<B&&a.i.configure("playRangeEnd",B)),b.playoutLimit&&(m=(new Yb(function(){v.skip()})).Y(b.playoutLimit),a.i.configure("playRangeEnd",
@@ -866,11 +867,11 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
866
867
  q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new nq};q.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)};
867
868
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Lq(a,b,c,function(e){return $q(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new lh,Oq(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
868
869
  q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new Xq(a,b,this.s,function(d){return $q(c,d)});this.g.configure(this.l)};
869
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('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="v4.12.0";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
870
- (c.I=!0),c.j=new lh,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&cb('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="v4.12.0";this.g.g.replaceAdTagParameters(a)};
870
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('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="v4.12.1";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
871
+ (c.I=!0),c.j=new lh,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&cb('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="v4.12.1";this.g.g.replaceAdTagParameters(a)};
871
872
  q.getServerSideCuePoints=function(){Cd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:oq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
872
873
  q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,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)};q.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.h||this.initInterstitial(null,a,b),this.h&&Gq(this.h,c))};
873
- q.onDASHInterstitialMetadata=function(a,b,c){if(!(this.l&&this.l.disableDASHInterstitial||"urn:mpeg:dash:event:alternativeMPD:2022"!=c.schemeIdUri)&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&Iq(a,[{id:null,startTime:c.startTime,endTime:b?c.endTime:null,uri:f,isSkippable:!1,
874
+ q.onDASHInterstitialMetadata=function(a,b,c){if(!(this.l&&this.l.disableDASHInterstitial||"urn:mpeg:dash:event:alternativeMPD:2022"!=c.schemeIdUri)&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&Iq(a,[{id:null,startTime:c.startTime,endTime:c.endTime,uri:f,isSkippable:!1,
874
875
  skipOffset:null,skipFor:null,canJump:!0,resumeOffset:g?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!g}])):cb("Unsupported MPD alternate",c)}};q.addCustomInterstitial=function(a){if(!this.h)throw new U(1,10,10006);Iq(this.h,[a])};q.addAdUrlInterstitial=function(a){if(!this.h)throw new U(1,10,10006);return this.h.addAdUrlInterstitial(a)};
875
876
  function $q(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Zq);Zq.prototype.addAdUrlInterstitial=Zq.prototype.addAdUrlInterstitial;Zq.prototype.addCustomInterstitial=Zq.prototype.addCustomInterstitial;Zq.prototype.onDASHInterstitialMetadata=Zq.prototype.onDASHInterstitialMetadata;
876
877
  Zq.prototype.onHLSInterstitialMetadata=Zq.prototype.onHLSInterstitialMetadata;Zq.prototype.onCueMetadataChange=Zq.prototype.onCueMetadataChange;Zq.prototype.onHlsTimedMetadata=Zq.prototype.onHlsTimedMetadata;Zq.prototype.onDashTimedMetadata=Zq.prototype.onDashTimedMetadata;Zq.prototype.onManifestUpdated=Zq.prototype.onManifestUpdated;Zq.prototype.getStats=Zq.prototype.getStats;Zq.prototype.getCuePoints=Zq.prototype.getCuePoints;Zq.prototype.getServerSideCuePoints=Zq.prototype.getServerSideCuePoints;
@@ -885,7 +886,7 @@ function cr(a){return{length:a.length,start:function(b){return a.start[b]},end:f
885
886
  var dr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),er="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),fr=["loop","playbackRate"],gr=["pause","play"],hr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
886
887
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},ir={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},jr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},kr=[["getConfiguration","configure"]],lr=[["isTextTrackVisible","setTextTrackVisibility"]],mr="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
887
888
  nr=["attach","attachCanvas","detach","load","unload"];function or(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Yb(b);this.M=c;this.u=!1;this.B=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.C=function(){return pr(h)};this.G=function(k,l){k=br(l);switch(k.type){case "event":var m=k.targetName,n=Xa(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new U(p.severity,p.category,
888
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;qr.add(this)}q=or.prototype;q.destroy=function(){qr.delete(this);rr(this);sr&&tr(this);this.l&&(this.l.stop(),this.l=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ua=function(){return this.h};q.ef=function(){return this.K};
889
+ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;qr.add(this)}q=or.prototype;q.destroy=function(){qr.delete(this);rr(this);sr&&tr(this);this.l&&(this.l.stop(),this.l=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ua=function(){return this.h};q.df=function(){return this.K};
889
890
  q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ra();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(qr),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new lh;d.u=!0;ur(d,e)}},function(b){for(var c=t(qr),d=c.next();!d.done;d=c.next())d=d.value,vr="available"==b,d.l.Ra()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vr&&this.l.Y(wr);(a=sr)&&
890
891
  a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new lh,this.u=!0,ur(this,a)):sr=null}else window.__onGCastApiAvailable!==xr&&(yr=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=xr)};q.Xg=function(a){this.s=a;this.h&&zr(this,{type:"appData",appData:this.s})};
891
892
  q.cast=function(){var a=this;return P(function(b){if(!a.m)throw new U(1,8,8E3);if(!vr)throw new U(1,8,8001);if(a.h)throw new U(1,8,8002);a.j=new lh;chrome.cast.requestSession(function(c){return ur(a,c)},function(c){return Ar(a,c)});return H(b,a.j,0)})};function Br(a){a.h&&chrome.cast.requestSession(function(b){return ur(a,b)},function(b){return Ar(a,b)})}q.hd=function(){if(this.h){rr(this);if(sr){tr(this);try{sr.stop(function(){},function(){})}catch(a){}sr=null}pr(this)}};
@@ -894,7 +895,7 @@ q.set=function(a,b,c){this.g[a][b]=c;zr(this,{type:"set",targetName:a,property:b
894
895
  q.mi=function(a,b){zr(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.wk=function(a,b){var c=Ia.apply(2,arguments),d=new lh,e=this.J.toString();this.J++;this.i[e]=d;try{zr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function tr(a){var b=sr;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
895
896
  function pr(a){var b=sr?"connected"==sr.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};rr(a)}a.h=b;a.K=b?sr.receiver.friendlyName:"";a.l.Ra()}function rr(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new U(1,7,7E3))}}function zr(a,b){b=ar(b);var c=sr;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.B("player",c),a.hd(),b;}}var wr=.02,vr=!1,sr=null,yr=null,qr=new Set;
896
897
  function xr(a){yr?window.__onGCastApiAvailable=yr:delete window.__onGCastApiAvailable;yr=null;if(a)for(var b=t(qr),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Cr(a,b,c,d){d=void 0===d?!1:d;jb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.C=d;this.B=new Map;this.g=new or(c,function(){return Dr(e)},function(){return Er(e)},function(f,g){return Fr(e,f,g)},function(){return Gr(e)},function(){return Hr(e)},d);Ir(this)}na(Cr,jb);q=Cr.prototype;
897
- q.destroy=function(a){a&&this.g.hd();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;jb.prototype.release.call(this);return Promise.all(a)};q.wc=function(){return this.l};q.ld=function(){return this.u};q.Mf=function(){return this.g.m&&vr};q.Ua=function(){return this.g.Ua()};q.ef=function(){return this.g.ef()};
898
+ q.destroy=function(a){a&&this.g.hd();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;jb.prototype.release.call(this);return Promise.all(a)};q.wc=function(){return this.l};q.ld=function(){return this.u};q.Lf=function(){return this.g.m&&vr};q.Ua=function(){return this.g.Ua()};q.df=function(){return this.g.df()};
898
899
  q.cast=function(){var a=this;return P(function(b){return 1==b.g?H(b,a.g.cast(),2):a.h?H(b,a.h.qc(),0):b.return()})};q.Xg=function(a){this.g.Xg(a)};q.Gi=function(){Br(this.g)};q.hd=function(){this.g.hd()};
899
900
  q.Ah=function(a,b){b=void 0===b?!1:b;var c=this;return P(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.hd();return H(d,c.g.destroy(),2)}c.g=null;c.g=new or(a,function(){return Dr(c)},function(){return Er(c)},function(e,f){return Fr(c,e,f)},function(){return Gr(c)},function(){return Hr(c)},b);c.g.init();I(d)})};
900
901
  function Ir(a){a.g.init();a.m=new td;for(var b=t(dr),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ua()||(f=Xa(f),a.j.dispatchEvent(f))});for(var d in Ya)a.m.o(a.h,Ya[d],function(f){a.g.Ua()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Sd:b.Sd},b.Sd=e,Object.defineProperty(a.l,b.Sd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jr(a,f.Sd)}}(b),set:function(f){return function(g){var h=f.Sd;a.g.Ua()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};Kr(a,
@@ -903,11 +904,11 @@ function Kr(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!
903
904
  function Hr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.jd(),startTime:null};a.i.pause();for(var c=t(fr),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(kr);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(lr);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Dr(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
904
905
  function Er(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
905
906
  function Gr(a){for(var b=t(kr),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(fr);for(d=c.next();!d.done;d=c.next())d=
906
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(fr),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(lr);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.nf(h);g&&a.h.Vg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
907
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(fr),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(lr);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.mf(h);g&&a.h.Vg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
907
908
  function Jr(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ua()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
908
909
  function Lr(a,b){a.B.has(b)&&(b=a.B.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Hb()};if("getDrmEngine"==b)return function(){return a.h.G};if("getAdManager"==b)return function(){return a.h.Ce()};
909
910
  if("setVideoContainer"==b)return function(c){return a.h.eh(c)};if(a.g.Ua()){if("getManifest"==b||"drmInfo"==b)return function(){cb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){cb(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ua()&&0==Object.keys(a.g.g.video).length&&(hr[b]||ir[b])||!a.g.Ua()?a.h[b].bind(a.h):a.g.get("player",b)}
910
- function Fr(a,b,c){a.g.Ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}S("shaka.cast.CastProxy",Cr);Cr.prototype.changeReceiverId=Cr.prototype.Ah;Cr.prototype.forceDisconnect=Cr.prototype.hd;Cr.prototype.suggestDisconnect=Cr.prototype.Gi;Cr.prototype.setAppData=Cr.prototype.Xg;Cr.prototype.cast=Cr.prototype.cast;Cr.prototype.receiverName=Cr.prototype.ef;Cr.prototype.isCasting=Cr.prototype.Ua;Cr.prototype.canCast=Cr.prototype.Mf;Cr.prototype.getPlayer=Cr.prototype.ld;
911
+ function Fr(a,b,c){a.g.Ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}S("shaka.cast.CastProxy",Cr);Cr.prototype.changeReceiverId=Cr.prototype.Ah;Cr.prototype.forceDisconnect=Cr.prototype.hd;Cr.prototype.suggestDisconnect=Cr.prototype.Gi;Cr.prototype.setAppData=Cr.prototype.Xg;Cr.prototype.cast=Cr.prototype.cast;Cr.prototype.receiverName=Cr.prototype.df;Cr.prototype.isCasting=Cr.prototype.Ua;Cr.prototype.canCast=Cr.prototype.Lf;Cr.prototype.getPlayer=Cr.prototype.ld;
911
912
  Cr.prototype.getVideo=Cr.prototype.wc;Cr.prototype.destroy=Cr.prototype.destroy;function Nr(a,b,c,d){jb.call(this);var e=this;this.g=a;this.h=b;this.j=new td;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.B=!0;this.u=this.l=null;this.G=new Yb(function(){Or(e)});Pr(this)}na(Nr,jb);q=Nr.prototype;q.isConnected=function(){return this.I};q.Tj=function(){return this.s};q.Jk=function(a){this.i=a};q.$i=function(){this.i=null};
912
913
  q.Kk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Ik=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Hk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
913
914
  q.destroy=function(){var a=this,b,c;return P(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.J=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,jb.prototype.release.call(a),H(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
@@ -930,7 +931,7 @@ function ps(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=qs.has(c)?qs.g
930
931
  var qs=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),rs=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),ss=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
931
932
  [37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ts=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
932
933
  [41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),ns=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function vs(a,b){this.h=0;this.s=new ks(a,b);this.i=new ks(a,b);this.g=this.j=new ks(a,b);this.l=0;this.m=null}function ws(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=ms(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,os(c,0,15),c=a.j,c.g=0<c.h?c.h:0,os(c,0,15),d.g=15);a.h=3;d.h=b;return e}function xs(a){a.h=1;a.g=a.j;a.g.h=0}function ys(a){db("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=4}var zs="black green blue cyan red yellow magenta black".split(" "),As="white green blue cyan red yellow magenta white_italics".split(" ");function Bs(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.s=this.I=this.M=this.J=0;this.H=2;this.i=[];this.g=this.h=this.j=0;this.G=this.B=!1;this.C="white";this.u="black";Cs(this)}function Cs(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Ds())}function Ds(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Es(a,b){Fs(a)&&(a.i[a.h][a.g]=new js(b,a.G,a.B,a.u,a.C),a.g++)}function Fs(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}Bs.prototype.isVisible=function(){return this.l};
933
- function Gs(a,b,c){var d=new Oe(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Re;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Nd:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
934
+ function Gs(a,b,c){var d=new Oe(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Qe;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Nd:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
934
935
  50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=gs(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Bs.prototype.display=function(){this.l=!0};function Hs(){this.i=[];this.h=null;this.g=0}function Is(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Js(a.h)),a.h=null,a.g=0))}function Js(a){this.g=0;this.h=a}Js.prototype.Ha=function(){return this.g<this.h.length};Js.prototype.Pa=function(){return this.g};function Ks(a){if(!a.Ha())throw new U(2,2,3E3);return a.h[a.g++]}Js.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};function Ls(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
935
936
  function Ms(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Ks(b).value;b=null;c=t(Ns(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Gs(e,d,a.i)),Cs(e);return b}if(137===c)for(b=Ks(b).value,b=t(Ns(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=Ks(b).value;b=null;c=t(Ns(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Gs(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ks(b).value;
936
937
  b=null;c=t(Ns(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Gs(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ks(b).value,Os(a,b,d);if(143===c)return d=Os(a,255,d),Ps(a),d;if(144===c)b.skip(1),d=Ks(b).value,a.g&&(a.g.B=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Ks(b).value,c=Ks(b).value,b.skip(1),a.g&&(b=Qs((c&48)>>4,(c&12)>>2,c&3),a.g.C=Qs((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Ks(b).value,b=Ks(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
@@ -953,10 +954,10 @@ function(f){f=Cj(f.reader,f.version);e.push(f.timescale)}).box("minf",Yh).box("s
953
954
  d.forEach(function(f,g){c.j.set(f,e[g])})};
954
955
  Zs.prototype.parse=function(a){var b=this;if(this.g==$s)return[];var c=[],d=0,e=[];(new Rh).box("moof",function(f){d=f.start;e=[];Yh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Id:b.h,ze:b.i,gi:[],timescale:9E4});Yh(f)}).X("trun",function(f){var g=e[e.length-1];f=Dj(f.reader,f.version,f.flags);g.gi.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=Aj(f.reader,f.flags);g.Id=f.Id||b.h;g.ze=f.ze||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length-
955
956
  1];f=Bj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Pa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw cb("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);bt(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Id,l.ze,g,l.gi,c)}}).parse(a,!1);return c};
956
- function bt(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.oi});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].bj);b.Ha();){g=b.V();var p=b.Z(),r=null;r=!1;h=1;switch(a.g){case ct:r=p&31;r=6==r;break;case dt:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case et:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].hf||0),p=(c+p)/d,h=t(Ys(b.Rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
957
+ function bt(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.oi});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].bj);b.Ha();){g=b.V();var p=b.Z(),r=null;r=!1;h=1;switch(a.g){case ct:r=p&31;r=6==r;break;case dt:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case et:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].gf||0),p=(c+p)/d,h=t(Ys(b.Rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
957
958
  h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Tg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Zs);var $s=0,ct=1,dt=2,et=3,at={avc1:ct,avc3:ct,dvav:ct,dva1:ct,hev1:dt,hvc1:dt,dvh1:dt,dvhe:dt,vvc1:et,vvi1:et,dvc1:et,dvi1:et};Kd["video/mp4"]=function(){return new Zs};function ft(){this.g=null}ft.prototype.init=function(){};ft.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Wj;var b=[];a=Jb(a);if(!ek(a))return b;a=this.g.parse(a);var c=a.Jd(),d=a.Ie();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Ys(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
958
959
  S("shaka.cea.TsCeaParser",ft);Kd["video/mp2t"]=function(){return new ft};function gt(a,b,c){var d=ht(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.wd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=it(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.wd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.wd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
959
- l.wd});f.length&&(a=jt(e,k,f,c,h),0==a.length&&(a=[Qc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Qc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Eh:h,em:e,drmInfos:a,Jf:g,Jh:!0}}
960
+ l.wd});f.length&&(a=jt(e,k,f,c,h),0==a.length&&(a=[Qc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Qc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Eh:h,em:e,drmInfos:a,If:g,Jh:!0}}
960
961
  function kt(a,b,c,d){var e=gt(a,c,d);if(b.Jh){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Jh=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new U(2,4,4008);return e.Eh||b.Eh}
961
962
  function lt(a){var b=0,c=Nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Jb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function mt(a){a=t(qe(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return oe(c)}return""}
962
963
  function nt(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=oe(b)))return b;a=se(a.node,"urn:microsoft:playready","pro");if(!a||!oe(a))return"";a=oe(a);a=Lc(a);a=lt(a).filter(function(c){return c.type===ot})[0];if(!a)return"";a=Bc(a.value,!0);return(a=de(a,"WRMHEADER"))?mt(a):""}
@@ -980,42 +981,42 @@ function Bt(a){var b=Ct(a);if(7<b.length)throw new U(2,3,3002);var c=0;b=t(b);fo
980
981
  d)}function Ct(a){var b=a.g.Pa(),c=a.g.Z();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Jb(a.h,b,c)}var Dt=[[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 Et(a,b){this.id=a;this.g=b}
981
982
  function Ft(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(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 Gt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new At(a.g);for(var n=null,p=null;a.Ha();){var r=Bt(a);if(187==r.id){var u=Ht(r);u&&(r=c*u.Tk,u=b+u.tk,null!=n&&m.push(new fj(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new fj(n+g,d+g,l,p,null,f,g,h,k));return m}
982
983
  function Ht(a){var b=new At(a.g);a=Bt(b);if(179!=a.id)throw new U(2,3,3013);a=Ft(a);b=Bt(b);if(183!=b.id)throw new U(2,3,3012);b=new At(b.g);for(var c=0;b.Ha();){var d=Bt(b);if(241==d.id){c=Ft(d);break}}return{Tk:a,tk:c}};function It(a,b,c){b=ut(a,b,"Initialization");if(!b)return null;var d=a.N.gb(),e=b.attributes.sourceURL;e&&(d=Pc(d,[Hc(e)],a.Eb()));e=0;var f=null;if(b=ue(b,"range",ze))e=b.start,f=b.end;c=new dj(function(){return d},e,f,Jt(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c}
983
- function Kt(a,b,c){var d=Number(tt(a,Lt,"presentationTimeOffset"))||0,e=tt(a,Lt,"timescale"),f=1;e&&(f=Be(e)||1);var g=d/f||0,h=It(a,Lt,c);Mt(a,h);var k=be(a);return{Ic:function(){var l=ut(k,Lt,"RepresentationIndex");var m=k.N.gb();l&&(l=Hc(l.attributes.sourceURL))&&(m=Pc(m,[l],k.Eb()));l=Nt(k);return Ot(k,b,h,m,l.start,l.end,g)}}}
984
- function Ot(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F;return P(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.Tb||!a.wa.Ag,l=a.wa.start,m=a.wa.duration,n=a.N.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.R(),c.eb,c.Ma,!0):null],p=null,H(K,Promise.all(u),2);w=K.h;v=w[0];z=w[1]||null;y=null;B=l-g;A=l;C=m?l+m:Infinity;if("mp4"==n)var G=yt(v,e,d,c,B,A,C);else{G=v;var J=new At(z);if(440786851!=Bt(J).id)throw new U(2,3,3008);var M=Bt(J);if(408125543!=M.id)throw new U(2,
984
+ function Kt(a,b,c){var d=Number(tt(a,Lt,"presentationTimeOffset"))||0,e=tt(a,Lt,"timescale"),f=1;e&&(f=Be(e)||1);var g=d/f||0,h=It(a,Lt,c);Mt(a,h);var k=be(a);return{Kc:function(){var l=ut(k,Lt,"RepresentationIndex");var m=k.N.gb();l&&(l=Hc(l.attributes.sourceURL))&&(m=Pc(m,[l],k.Eb()));l=Nt(k);return Ot(k,b,h,m,l.start,l.end,g)}}}
985
+ function Ot(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F;return P(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.Tb||!a.wa.zg,l=a.wa.start,m=a.wa.duration,n=a.N.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.R(),c.eb,c.Ma,!0):null],p=null,H(K,Promise.all(u),2);w=K.h;v=w[0];z=w[1]||null;y=null;B=l-g;A=l;C=m?l+m:Infinity;if("mp4"==n)var G=yt(v,e,d,c,B,A,C);else{G=v;var J=new At(z);if(440786851!=Bt(J).id)throw new U(2,3,3008);var M=Bt(J);if(408125543!=M.id)throw new U(2,
985
986
  3,3009);J=M.g.byteOffset;M=new At(M.g);for(var O=null;M.Ha();){var L=Bt(M);if(357149030==L.id){O=L;break}}if(!O)throw new U(2,3,3010);O=new At(O.g);L=1E6;for(M=null;O.Ha();){var N=Bt(O);if(2807729==N.id)L=Ft(N);else if(17545==N.id)if(4==N.g.byteLength)M=N.g.getFloat32(0);else if(8==N.g.byteLength)M=N.g.getFloat64(0);else throw new U(2,3,3003);}if(null==M)throw new U(2,3,3011);O=L/1E9;M*=O;G=Bt(new At(G));if(475249515!=G.id)throw new U(2,3,3007);G=Gt(G,J,O,M,d,c,B,A,C)}y=G;D=t(y);for(E=D.next();!E.done;E=
986
987
  D.next())F=E.value,F.codecs=a.N.codecs,F.mimeType=a.N.mimeType,F.bandwidth=a.bandwidth;h.Vd(y);r=new ul(y);k&&r.gd(A,C,!0);return K.return(r)})}function Lt(a){return a.yd}function Nt(a){var b=ut(a,Lt,"RepresentationIndex");a=tt(a,Lt,"indexRange");a=ze(a||"");b&&(a=ue(b,"range",ze,a));return a}function Mt(a,b){Pt(a,b);if(!Nt(a))throw new U(2,4,4002);}
987
988
  function Pt(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Wc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
988
- function Jt(a){var b=a.N;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.Ze,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ua.label||null,roles:a.roles||null,language:a.ua.language||null}};function Qt(a,b,c){var d=It(a,Rt,c),e=St(a);if(!e.ib&&!e.timeline&&1<e.rd.length)throw new U(2,4,4002);if(!e.ib&&!a.wa.duration&&!e.timeline&&1==e.rd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.Da.id&&a.N.id&&(g=b[a.Da.id+","+a.N.id])&&(f=g.segmentIndex);var h=Tt(a.wa.start,a.wa.duration,a.N.gb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Eb);b=!f;f?f.Ud(h,a.presentationTimeline.Ib()):f=new ul(h);a.presentationTimeline.Vd(h);a.Tb&&a.wa.Ag||
989
- f.gd(a.wa.start,a.wa.duration?a.wa.start+a.wa.duration:Infinity,b);g&&(g.segmentIndex=f);return{Ic:function(){f&&0!=f.getNumReferences()||f.Ve(h);return Promise.resolve(f)}}}function Rt(a){return a.nc}function St(a){var b=Ut(a);a=st(a,Rt);var c=a.be;0==c&&(c=1);var d=0;a.ib?d=a.ib*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ib:a.ib,startTime:d,be:c,mc:a.mc,timeline:a.timeline,rd:b}}
990
- function Tt(a,b,c,d,e,f,g,h,k,l){var m=d.rd.length;d.timeline&&d.timeline.length!=d.rd.length&&(m=Math.min(d.timeline.length,d.rd.length));for(var n=a-d.mc,p=b?a+b:Infinity,r=[],u=d.startTime,w={},v=0;v<m;w={uf:void 0,jf:void 0},v++){w.jf=d.rd[v];var z=u;u=void 0;u=null!=d.ib?z+d.ib:d.timeline?d.timeline[v].end:z+b;w.uf=null;w=new fj(a+z,a+u,function(y){return function(){null==y.uf&&(y.uf=Pc(c(),[y.jf.gk],l()));return y.uf}}(w),w.jf.start,w.jf.end,e,n,a,p,[],"",null,null,gj,f);w.codecs=h;w.mimeType=
991
- g;w.bandwidth=k;r.push(w)}return r}function Ut(a){return[a.N.nc,a.ua.nc,a.Da.nc].filter(Xf).map(function(b){return ne(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.xg&&(a.xg=!0);var c=Hc(b.attributes.media);b=ue(b,"mediaRange",ze,{start:0,end:null});return{gk:c,start:b.start,end:b.end}})};function Vt(a,b,c,d,e,f,g,h,k){k||a.N.Le||(a.N.Le=tt(a,Wt,"initialization"));var l=a.N.Le?Xt(a,g):null,m=Yt(a);Zt(m);var n=be(a);if(m.Pd)return Pt(a,l),{Ic:function(){var v=rt(m.Pd,n.N.id,null,null,n.bandwidth||null,null);v=Pc(n.N.gb(),[v]);return Ot(n,b,l,v,0,null,m.mc)}};if(m.ib)return d||"image"===a.ua.contentType||"text"===a.ua.contentType||(c=a.wa.start,d=a.Da.id,k=a.wa.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.Hg(m.ib),a.presentationTimeline.di(c,d)),{Ic:function(){return $t(n,
992
- m,e,l,f,g,h,a.N.kf)}};var p=null;d=d=null;a.Da.id&&a.N.id&&(d=a.Da.id+","+a.N.id,d=c[d])&&(p=d.segmentIndex);var r=a.wa.start,u=a.wa.duration?r+a.wa.duration:Infinity,w=!(a.Tb&&a.wa.Ag);p?(c=p,au(c,m,r,u,w,l),c.ab(a.presentationTimeline.Ib())):p=new bu(m,a.N.id,a.bandwidth,a.N.gb,a.Eb,r,u,l,w,g,a.N.kf);m.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.ei(m.timeline,r);d&&a.Tb&&(d.segmentIndex=p);return{Ic:function(){p instanceof bu&&0==p.getNumReferences()&&
989
+ function Jt(a){var b=a.N;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.Ze,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ua.label||null,roles:a.roles||null,language:a.ua.language||null}};function Qt(a,b,c){var d=It(a,Rt,c),e=St(a);if(!e.ib&&!e.timeline&&1<e.rd.length)throw new U(2,4,4002);if(!e.ib&&!a.wa.duration&&!e.timeline&&1==e.rd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.Da.id&&a.N.id&&(g=b[a.Da.id+","+a.N.id])&&(f=g.segmentIndex);var h=Tt(a.wa.start,a.wa.duration,a.N.gb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Eb);b=!f;f?f.Ud(h,a.presentationTimeline.Ib()):f=new ul(h);a.presentationTimeline.Vd(h);a.Tb&&a.wa.zg||
990
+ f.gd(a.wa.start,a.wa.duration?a.wa.start+a.wa.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.getNumReferences()||f.Ve(h);return Promise.resolve(f)}}}function Rt(a){return a.nc}function St(a){var b=Ut(a);a=st(a,Rt);var c=a.be;0==c&&(c=1);var d=0;a.ib?d=a.ib*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ib:a.ib,startTime:d,be:c,mc:a.mc,timeline:a.timeline,rd:b}}
991
+ function Tt(a,b,c,d,e,f,g,h,k,l){var m=d.rd.length;d.timeline&&d.timeline.length!=d.rd.length&&(m=Math.min(d.timeline.length,d.rd.length));for(var n=a-d.mc,p=b?a+b:Infinity,r=[],u=d.startTime,w={},v=0;v<m;w={tf:void 0,hf:void 0},v++){w.hf=d.rd[v];var z=u;u=void 0;u=null!=d.ib?z+d.ib:d.timeline?d.timeline[v].end:z+b;w.tf=null;w=new fj(a+z,a+u,function(y){return function(){null==y.tf&&(y.tf=Pc(c(),[y.hf.gk],l()));return y.tf}}(w),w.hf.start,w.hf.end,e,n,a,p,[],"",null,null,gj,f);w.codecs=h;w.mimeType=
992
+ g;w.bandwidth=k;r.push(w)}return r}function Ut(a){return[a.N.nc,a.ua.nc,a.Da.nc].filter(Xf).map(function(b){return ne(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.wg&&(a.wg=!0);var c=Hc(b.attributes.media);b=ue(b,"mediaRange",ze,{start:0,end:null});return{gk:c,start:b.start,end:b.end}})};function Vt(a,b,c,d,e,f,g,h,k){k||a.N.Le||(a.N.Le=tt(a,Wt,"initialization"));var l=a.N.Le?Xt(a,g):null,m=Yt(a);Zt(m);var n=be(a);if(m.Pd)return Pt(a,l),{Kc:function(){var v=rt(m.Pd,n.N.id,null,null,n.bandwidth||null,null);v=Pc(n.N.gb(),[v]);return Ot(n,b,l,v,0,null,m.mc)}};if(m.ib)return d||"image"===a.ua.contentType||"text"===a.ua.contentType||(c=a.wa.start,d=a.Da.id,k=a.wa.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.Gg(m.ib),a.presentationTimeline.di(c,d)),{Kc:function(){return $t(n,
993
+ m,e,l,f,g,h,a.N.jf)}};var p=null;d=d=null;a.Da.id&&a.N.id&&(d=a.Da.id+","+a.N.id,d=c[d])&&(p=d.segmentIndex);var r=a.wa.start,u=a.wa.duration?r+a.wa.duration:Infinity,w=!(a.Tb&&a.wa.zg);p?(c=p,au(c,m,r,u,w,l),c.ab(a.presentationTimeline.Ib())):p=new bu(m,a.N.id,a.bandwidth,a.N.gb,a.Eb,r,u,l,w,g,a.N.jf);m.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.ei(m.timeline,r);d&&a.Tb&&(d.segmentIndex=p);return{Kc:function(){p instanceof bu&&0==p.getNumReferences()&&
993
994
  au(p,m,r,u,w,l);return Promise.resolve(p)}}}function Wt(a){return a.Bc}function Yt(a){var b=st(a,Wt),c=tt(a,Wt,"media"),d=tt(a,Wt,"index"),e=tt(a,Wt,"k"),f=0;e&&(f=parseInt(e,10));return{ib:b.ib,timescale:b.timescale,be:b.be,mc:b.mc,mh:b.mh,timeline:b.timeline,yc:c&&Hc(c),Pd:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,hk:f}}
994
995
  function Zt(a){var b=a.Pd?1:0;b+=a.timeline?1:0;b+=a.ib?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Pd&&(a.timeline=null),a.ib=null);if(!a.Pd&&!a.yc)throw new U(2,4,4002);}
995
996
  function $t(a,b,c,d,e,f,g,h){function k(O){var L=(O-v)*w,N=L+b.mc,Q=L+p;L=Q+w;var R=Math.min(L,m()),Y=[],pa=b.hk;if(pa)for(var oa=(R-Q)/pa,va={},Ea=0;Ea<pa;va={Ei:void 0},Ea++){var Ja=Q+oa*Ea,$a=Ja+oa;va.Ei=Ea+1;va=new fj(Ja,$a,function(Na){return function(){var wa=N*z;"BigInt"in window&&wa>Number.MAX_SAFE_INTEGER&&(wa=BigInt(N)*BigInt(z));wa=rt(y,A,O,Na.Ei,B,wa);return Pc(C(),[wa],D())}}(va),0,null,d,E,p,m(),[],"",null,null,gj,f);va.codecs=a.N.codecs;va.mimeType=a.N.mimeType;0==h?0<Ea&&va.pd():0!=
996
997
  Ea%h&&va.pd();Y.push(va)}Q=new fj(Q,R,function(){if(pa)return[];var Na=N*z;"BigInt"in window&&Na>Number.MAX_SAFE_INTEGER&&(Na=BigInt(N)*BigInt(z));Na=rt(y,A,O,null,B,Na);return Pc(C(),[Na],D())},0,null,d,E,p,m(),Y,"",null,null,gj,f,0<Y.length);Q.codecs=a.N.codecs;Q.mimeType=a.N.mimeType;Q.bandwidth=a.bandwidth;Q.j=L;return Q}function l(){var O=[Math.max(n.Ib(),p),Math.min(n.uc(),m())].map(function(L){return L-p});O=[Math.ceil(O[0]/w),Math.ceil(O[1]/w)-1];a.N.ob&&O[1]++;return O.map(function(L){return L+
997
- v})}function m(){var O=null!=r&&e[r]||u;return O?p+O:Infinity}var n=a.presentationTimeline,p=a.wa.start,r=a.Da.id,u=a.wa.duration,w=b.ib,v=b.be,z=b.timescale,y=b.yc,B=a.bandwidth||null,A=a.N.id,C=a.N.gb,D=a.Eb,E=p-b.mc,F=l();c=a.Tb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var K=c;K<=g;++K){var G=k(K);F.push(G)}var J=new ul(F);F=n.uc()<m();K=n.T();if(F||K){var M=Math.max(c,g+1);c=w;a.N.ob&&(c=.1);J.tf(c,function(){var O=n.Ib();J.ab(O);var L=t(l());L.next();L=L.next().value;for(var N=[];M<=L;){var Q=
998
+ v})}function m(){var O=null!=r&&e[r]||u;return O?p+O:Infinity}var n=a.presentationTimeline,p=a.wa.start,r=a.Da.id,u=a.wa.duration,w=b.ib,v=b.be,z=b.timescale,y=b.yc,B=a.bandwidth||null,A=a.N.id,C=a.N.gb,D=a.Eb,E=p-b.mc,F=l();c=a.Tb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var K=c;K<=g;++K){var G=k(K);F.push(G)}var J=new ul(F);F=n.uc()<m();K=n.T();if(F||K){var M=Math.max(c,g+1);c=w;a.N.ob&&(c=.1);J.rf(c,function(){var O=n.Ib();J.ab(O);var L=t(l());L.next();L=L.next().value;for(var N=[];M<=L;){var Q=
998
999
  k(M);N.push(Q);M++}return O>m()&&!N.length?null:N})}return Promise.resolve(J)}function Xt(a,b){var c=a.N.Le;c||(c=tt(a,Wt,"initialization"));if(!c)return null;c=Hc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.gb,g=a.Eb;b=new dj(function(){var h=rt(c,d,null,null,e,null);return Pc(f(),[h],g())},0,null,Jt(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}
999
1000
  function bu(a,b,c,d,e,f,g,h,k,l,m){ul.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.B=l;this.I=m;k&&cu(this)}na(bu,ul);q=bu.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){ul.prototype.release.call(this);this.h=null};
1000
1001
  q.ab=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
1001
1002
  function au(a,b,c,d,e,f){du(a,f);if(a.h){c=a.h.timeline;a.h.yc!==b.yc&&(a.h.yc=b.yc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&cu(a)}function du(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&ij(c,b)}}
1002
1003
  function cu(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.ab(a.j)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
1003
- q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Fk,f=this.h.mh+d.nh;c=this.j-this.h.mc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Xb,r={},u=0;u<d.Xb;r={vf:void 0,Fi:void 0},u++){var w=d.start+p*u,v=w+p;r.Fi=u+1;r.vf=null;r=new fj(this.j+w,this.j+v,function(z){return function(){if(!b.h)return[];
1004
- null==z.vf&&(z.vf=eu(b.h.yc,b.H,e,b.C,f,z.Fi,b.G,b.J));return z.vf}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,gj,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.I?0<u&&r.pd():0!=u%this.I&&r.pd();n.push(r)}c=new fj(this.j+d.start,h,function(){return 0<d.Xb||!b.h?[]:eu(b.h.yc,b.H,e,b.C,f,null,b.G,b.J)},0,null,this.u,c,this.j,this.l,n,"",null,null,gj,this.B,0<d.Xb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
1004
+ q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Fk,f=this.h.mh+d.nh;c=this.j-this.h.mc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Xb,r={},u=0;u<d.Xb;r={uf:void 0,Fi:void 0},u++){var w=d.start+p*u,v=w+p;r.Fi=u+1;r.uf=null;r=new fj(this.j+w,this.j+v,function(z){return function(){if(!b.h)return[];
1005
+ null==z.uf&&(z.uf=eu(b.h.yc,b.H,e,b.C,f,z.Fi,b.G,b.J));return z.uf}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,gj,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.I?0<u&&r.pd():0!=u%this.I&&r.pd();n.push(r)}c=new fj(this.j+d.start,h,function(){return 0<d.Xb||!b.h?[]:eu(b.h.yc,b.H,e,b.C,f,null,b.G,b.J)},0,null,this.u,c,this.j,this.l,n,"",null,null,gj,this.B,0<d.Xb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
1005
1006
  q.Ub=function(a){cu(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function eu(a,b,c,d,e,f,g,h){a=rt(a,b,c,f,d||null,e);return Pc(g(),[a],h()).map(function(k){return k.toString()})};function fu(a){this.s=null;this.B=a;this.I=new th;this.i=[];this.h=null;this.m=[];this.C=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}fu.prototype.configure=function(a){this.s=a};fu.prototype.destroy=function(){this.B=this.s=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};fu.prototype.setManifestType=function(a){this.u=a};
1006
1007
  function gu(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Pc(a.i,[hu(a,b)]),d=Ah(c,a.s.retryParameters),e=a.B.networkingEngine.request(8,d),uh(a.I,e),ta(l,2),H(l,e.promise,4);if(2!=l.g)return f=l.h,g=Ac(f.data),h=JSON.parse(g),1==h.VERSION&&iu(a,h,f.uri),xa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Yb(function(){gu(a,b)});a.g.Y(a.G);I(l)})}
1007
1008
  function hu(a,b){if(!a.m.length)return b;b=new pb(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Fb(e)&&tb(b,e);return b.toString()}function iu(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Yb(function(){gu(a,d)});if(c=b.TTL)a.G=c;a.g.Y(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
1008
1009
  function ju(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}fu.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
1009
- function ku(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={td:void 0},f=e.next())if(g.td=f.value,f=b.get(g.td))d.push({Ng:g.td,location:f});else if(f=a.H.find(function(k){return function(l){return l.ul==k.td}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Qi?(h=new pb(h),rb(h,f["URI-REPLACEMENT"].Qi),d.push({Ng:g.td,location:h.toString()})):d.push({Ng:g.td,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
1010
- h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new pb(k.location)).bc))return!1;return!0});d.length&&(a.C=d[0].Ng);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Pc(a.i,d)};function lu(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=lu.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};q.Lj=function(){return this.l};q.qg=function(){return this.j.slice()};q.pj=function(){return this.i};
1010
+ function ku(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={td:void 0},f=e.next())if(g.td=f.value,f=b.get(g.td))d.push({Mg:g.td,location:f});else if(f=a.H.find(function(k){return function(l){return l.ul==k.td}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Qi?(h=new pb(h),rb(h,f["URI-REPLACEMENT"].Qi),d.push({Mg:g.td,location:h.toString()})):d.push({Mg:g.td,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
1011
+ h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new pb(k.location)).bc))return!1;return!0});d.length&&(a.C=d[0].Mg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Pc(a.i,d)};function lu(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=lu.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};q.Lj=function(){return this.l};q.pg=function(){return this.j.slice()};q.pj=function(){return this.i};
1011
1012
  q.Fh=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Wc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
1012
1013
  d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
1013
1014
  function mu(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[nu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[ou(n),n]})),l=new Map(h.textStreams.map(function(n){return[pu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[qu(n),n]}));if(b){var m=ru(Wc);l.set(pu(m),m);m=ru("image");h.set(qu(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{vh:c,Ni:d,Hi:e,Sh:f}}
1014
- q.Qf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R;return P(function(Y){if(1==Y.g){e=Yc;if(!b&&1==a.length)return f=mu(a,!1),g=f.vh,h=f.Ni,k=f.Hi,l=f.Sh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),Y.A(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return Y.return();u=mu(a,!0);w=u.vh;v=u.Ni;z=u.Hi;y=u.Sh;return H(Y,
1015
+ q.Pf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R;return P(function(Y){if(1==Y.g){e=Yc;if(!b&&1==a.length)return f=mu(a,!1),g=f.vh,h=f.Ni,k=f.Hi,l=f.Sh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),Y.A(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return Y.return();u=mu(a,!0);w=u.vh;v=u.Ni;z=u.Hi;y=u.Sh;return H(Y,
1015
1016
  Promise.all([su(d,d.h,w,n,tu,uu,m),su(d,d.g,v,n,tu,uu,m),su(d,d.j,z,n,tu,uu,m),su(d,d.i,y,n,tu,uu,m)]),2)}B=0;A=[];if(d.g.length&&d.h.length)for(G=t(d.h),J=G.next();!J.done;J=G.next())for(M=J.value,O=t(d.g),L=O.next();!L.done;L=O.next())N=L.value,Q=Tb(M.drmInfos,N.drmInfos),M.drmInfos.length&&N.drmInfos.length&&!Q.length||(R=B++,A.push({id:R,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:N,bandwidth:(M.bandwidth||0)+(N.bandwidth||0),drmInfos:Q,allowedByApplication:!0,allowedByKeySystem:!0,
1016
1017
  decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),E=D.next();!E.done;E=D.next())F=E.value,K=B++,A.push({id:K,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.ia?F:null,video:F.type==e.xa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=A;I(Y)})};
1017
1018
  function vu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L;return P(function(N){switch(N.g){case 1:b=Yc;if(1==a.length)return N.return(a[0]);c=a.map(function(Q){return new Map(Q.filter(function(R){return R.type===b.ia}).map(function(R){return[nu(R),R]}))});d=a.map(function(Q){return new Map(Q.filter(function(R){return R.type===b.xa}).map(function(R){return[ou(R),R]}))});e=a.map(function(Q){return new Map(Q.filter(function(R){return R.type===b.Oa}).map(function(R){return[pu(R),
1018
- R]}))});f=a.map(function(Q){return new Map(Q.filter(function(R){return R.type===b.Ff}).map(function(R){return[qu(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=wu(b.Oa),k.set(pu(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=wu(b.Ff),p.set(qu(r),r);u=new lu;return H(N,su(u,[],c,0,xu,yu,0),2);case 2:return w=N.h,H(N,su(u,[],d,0,xu,yu,0),3);case 3:return v=N.h,H(N,su(u,[],e,0,xu,yu,0),4);case 4:return z=N.h,H(N,su(u,[],f,0,xu,yu,0),5);case 5:y=N.h;B=0;if(v.length&&w.length)for(F=
1019
+ R]}))});f=a.map(function(Q){return new Map(Q.filter(function(R){return R.type===b.Ef}).map(function(R){return[qu(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=wu(b.Oa),k.set(pu(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=wu(b.Ef),p.set(qu(r),r);u=new lu;return H(N,su(u,[],c,0,xu,yu,0),2);case 2:return w=N.h,H(N,su(u,[],d,0,xu,yu,0),3);case 3:return v=N.h,H(N,su(u,[],e,0,xu,yu,0),4);case 4:return z=N.h,H(N,su(u,[],f,0,xu,yu,0),5);case 5:y=N.h;B=0;if(v.length&&w.length)for(F=
1019
1020
  t(w),K=F.next();!K.done;K=F.next())for(G=K.value,J=t(v),M=J.next();!M.done;M=J.next())O=M.value,L=B++,O.variantIds.push(L),G.variantIds.push(L);else for(A=v.concat(w),C=t(A),D=C.next();!D.done;D=C.next())E=D.value,E.variantIds=[B++];return N.return(v.concat(w).concat(z).concat(y))}})}
1020
1021
  function su(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G;return P(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return H(J,zu(a,n,c,d,f,h,g),5);case 5:p=J.h;if(!p)throw new U(2,4,4037);m=l.next();J.A(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w),z=v.next();!z.done;z=v.next())y=z.value,(B=Au(a,y,c,e,f,h))&&b.push(B);A=t(h);for(C=A.next();!C.done;C=
1021
1022
  A.next())for(D=C.value,E=t(D),F=E.next(),K={};!F.done;K={fh:void 0},F=E.next())if(K.fh=F.value,!Bu(K.fh)&&(G=b.some(function(M){return function(O){return Cu(a,M.fh,O)}}(K))))throw new U(2,4,4037);return J.return(b)}})}function zu(a,b,c,d,e,f,g){return P(function(h){if(1==h.g)return Du(a,c,b,0<g),b.matchedStreams?b.segmentIndex?H(h,Eu(b,d+g),2):h.A(2):h.return(!1);Fu(b,d,e,f,g);return h.return(!0)})}
@@ -1040,7 +1041,7 @@ function wu(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
1040
1041
  function ru(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ul([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}}
1041
1042
  function Pu(a,b,c){if(b==a&&a!=c)return Ru;if(c==a&&a!=b)return Qu;if(b>a){if(c<=a||c-a<b-a)return Qu;if(c-a>b-a)return Ru}else{if(c>a)return Ru;if(a-c<a-b)return Qu;if(a-c>a-b)return Ru}return Tu}function Su(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Qu:b<a?Ru:Tu}function Bu(a){switch(a.type){case Wc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
1042
1043
  function ou(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Ou(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function nu(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Ou(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function pu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
1043
- function qu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Ou(a){if(!Uu.has(a)){var b=Gf(a);Uu.set(a,b)}return Uu.get(a)}S("shaka.util.PeriodCombiner",lu);lu.prototype.setUseStreamOnce=lu.prototype.Ai;lu.prototype.setAllowMultiTypeVariants=lu.prototype.pi;lu.prototype.combinePeriods=lu.prototype.Qf;lu.prototype.deleteStream=lu.prototype.Fh;lu.prototype.getImageStreams=lu.prototype.pj;lu.prototype.getTextStreams=lu.prototype.qg;lu.prototype.getVariants=lu.prototype.Lj;
1044
+ function qu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Ou(a){if(!Uu.has(a)){var b=Gf(a);Uu.set(a,b)}return Uu.get(a)}S("shaka.util.PeriodCombiner",lu);lu.prototype.setUseStreamOnce=lu.prototype.Ai;lu.prototype.setAllowMultiTypeVariants=lu.prototype.pi;lu.prototype.combinePeriods=lu.prototype.Pf;lu.prototype.deleteStream=lu.prototype.Fh;lu.prototype.getImageStreams=lu.prototype.pj;lu.prototype.getTextStreams=lu.prototype.pg;lu.prototype.getVariants=lu.prototype.Lj;
1044
1045
  var Qu=1,Tu=0,Ru=-1,Uu=new Map;function Vu(a,b){var c=new DOMParser,d=Wu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Xu(a,b){try{var c=Dc(a);return Vu(c,b)}catch(d){return null}}
1045
1046
  var Wu=new Qb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Yu(){var a=this;this.j=this.g=null;this.B=[];this.i=null;this.Ba=1;this.H=[];this.l={Xe:"",type:"",profiles:[],ic:null,ob:0,gb:null,Xd:0};this.u=new Map;this.s={};this.C={};this.ma={};this.m=new lu;this.L=0;this.qa=new qd(5);this.M=new Yb(function(){if(a.K&&!a.g.continueLoadingWhenPaused&&(a.I.Na(a.K,"timeupdate"),a.K.paused)){a.I.sa(a.K,"timeupdate",function(){return Zu(a)});return}Zu(a)});this.S=new th;this.P=null;this.G=[];this.aa=Infinity;this.J=!1;this.h=null;this.O=0;this.ka=!1;this.I=
1046
1047
  new td;this.K=null;this.U=!1;this.$="";this.ba=function(){return!1};this.W=[]}q=Yu.prototype;q.configure=function(a,b){var c=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&(this.ba=b);c&&this.i&&this.i.presentationTimeline.T()&&this.M.Ra();this.h&&this.h.configure(this.g);this.m&&(this.m.pi(this.g.dash.multiTypeVariantsAllowed&&Ad()),this.m.Ai(this.g.dash.useStreamOnceInPeriodFlattening))};
@@ -1051,25 +1052,25 @@ q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=funct
1051
1052
  function $u(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=bv(a),e=a.B,d.length?(e=d,c="Patch",b=6):1<a.B.length&&a.h&&(f=ku(a.h,"Location",!0),f.length&&(e=f)),g=Ah(e,a.g.retryParameters),h=Date.now(),H(p,cv(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new pb(k.uri);a.$=l.g.toString();return H(p,dv(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.qa.sample(1,n);return p.return(n)})}
1052
1053
  function dv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return P(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=cn;if(f!=g){Cd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Xu(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Ec(h.outerHTML)}k=ce(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=dn;l!=m&&l(k);if("Patch"===d)return w.return(ev(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(fv(a,k,c));
1053
1054
  p=a.g.dash.xlinkFailGracefully;r=xt(k,a.g.retryParameters,p,c,a.j.networkingEngine);uh(a.S,r);return H(w,r.promise,2)}u=w.h;return w.return(fv(a,u,c))})}
1054
- function fv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa,oa,va,Ea,Ja,$a,Na,wa,Qa,Ob,Oa,Za,Tc,xb,ed,Le,ge,Wf,Me,Tj,Gh,Uj,Hh;return P(function(pc){switch(pc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ne(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=pe(l))p=Pc(d,[n])[0],m&&(a.h?ju(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=ku(a.h,"Location",!0),0<r.length&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.Xe=b.attributes.id||
1055
+ function fv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa,oa,va,Ea,Ja,$a,Na,wa,Qa,Ob,Oa,Za,Tc,xb,ed,Me,ge,Wf,Ne,Uj,Gh,Vj,Hh;return P(function(pc){switch(pc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ne(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=pe(l))p=Pc(d,[n])[0],m&&(a.h?ju(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=ku(a.h,"Location",!0),0<r.length&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.Xe=b.attributes.id||
1055
1056
  "";a.l.Xd=ue(b,"publishTime",xe)||0;a.H=ne(b,"PatchLocation");u=Promise.resolve();if((w=re(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new fu(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,z=pe(w))(y=ue(w,"queryBeforeStart",Ee,!1))?u=gu(a.h,z):gu(a.h,z);B=t(f.keys());for(A=B.next();!A.done;A=B.next())C=A.value,D=f.get(C),ju(a.h,"Location",C,D)}E=ne(b,"BaseURL");F=!1;if(a.h)for(K=t(E),G=K.next();!G.done;G=K.next())J=G.value,
1056
1057
  M=J.attributes.serviceLocation,O=pe(J),M&&O&&(ju(a.h,"BaseURL",M,O),F=!0);a.W=null;F&&a.h||(L=E.map(pe),a.W=Pc(d,L));N=function(){return a.h&&F?ku(a.h,"BaseURL"):a.W?a.W:[]};a.l.gb=N;Q=0;E&&E.length&&(Q=ue(E[0],"availabilityTimeOffset",De)||0);a.l.ob=Q;R=a.g.dash.ignoreMinBufferTime;Y=0;R||(Y=ue(b,"minBufferTime",ye)||0);a.L=ue(b,"minimumUpdatePeriod",ye,-1);pa=ue(b,"availabilityStartTime",xe);oa=ue(b,"timeShiftBufferDepth",ye);va=a.g.dash.ignoreSuggestedPresentationDelay;Ea=null;va||(Ea=ue(b,"suggestedPresentationDelay",
1057
- ye));Ja=a.g.dash.ignoreMaxSegmentDuration;$a=null;Ja||($a=ue(b,"maxSegmentDuration",ye));Na=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.U=a.i.presentationTimeline.T()&&"static"==Na);a.l.type=Na;gv(a);if(a.i)for(wa=a.i.presentationTimeline,Qa=t(Object.values(a.s)),Ob=Qa.next();!Ob.done;Ob=Qa.next())Oa=Ob.value,Oa.segmentIndex&&Oa.segmentIndex.ab(wa.Ib());else Za=a.g.defaultPresentationDelay||1.5*Y,Tc=null!=Ea?Ea:Za,wa=new Zk(pa,Tc,a.g.dash.autoCorrectDrift);wa.Vc("static"==Na);(xb=
1058
- wa.T())&&!isNaN(a.g.availabilityWindowOverride)&&(oa=a.g.availabilityWindowOverride);null==oa&&(oa=Infinity);wa.mf(oa);ed=b.attributes.profiles||"";a.l.profiles=ed.split(",");Le={Tb:"static"!=Na,presentationTimeline:wa,Da:null,wa:null,ua:null,N:null,bandwidth:0,xg:!1,ob:Q,ic:null,profiles:ed.split(","),roles:null,Eb:function(){return""}};a.O=0;ge=hv(a,Le,N,b,!1);Wf=ge.duration;Me=ge.periods;("static"!=Na||a.U)&&ge.Hh||wa.vb(Wf||Infinity);a.ka&&!a.J&&(Tj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
1059
- a.J=a.j.isLowLatencyMode());a.J&&wa.ri(a.aa);wa.Hg($a||1);return H(pc,u,2);case 2:a.J&&(Y=0,Gh=null!=Ea?Ea:a.g.defaultPresentationDelay,wa.Yg(Gh));if(!a.i)return H(pc,a.m.Qf(Me,Le.Tb),6);a.i.periodCount=Me.length;a.i.gapCount=a.O;return H(pc,iv(a,Me,!1),4);case 6:a.i={presentationTimeline:wa,variants:a.m.l,textStreams:a.m.qg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:Y||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:jv(b),
1060
- nextUrl:kv(b),periodCount:Me.length,gapCount:a.O,isLowLatency:a.ka,startTime:null};if(!wa.Ki()){pc.A(7);break}Uj=ne(b,"UTCTiming");return H(pc,lv(a,N,Uj),8);case 8:Hh=pc.h;if(!a.j)return pc.return();wa.si(Hh);case 7:wa.Te();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(pc)}})}function iv(a,b,c){var d;return P(function(e){if(1==e.g)return H(e,a.m.Qf(b,!0,c),2);a.i.variants=a.m.l;d=a.m.qg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
1058
+ ye));Ja=a.g.dash.ignoreMaxSegmentDuration;$a=null;Ja||($a=ue(b,"maxSegmentDuration",ye));Na=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.U=a.i.presentationTimeline.T()&&"static"==Na);a.l.type=Na;if(a.i)for(wa=a.i.presentationTimeline,Qa=t(Object.values(a.s)),Ob=Qa.next();!Ob.done;Ob=Qa.next())Oa=Ob.value,Oa.segmentIndex&&Oa.segmentIndex.ab(wa.Ib());else Za=a.g.defaultPresentationDelay||1.5*Y,Tc=null!=Ea?Ea:Za,wa=new Zk(pa,Tc,a.g.dash.autoCorrectDrift);wa.Xc("static"==Na);(xb=wa.T())&&
1059
+ !isNaN(a.g.availabilityWindowOverride)&&(oa=a.g.availabilityWindowOverride);null==oa&&(oa=Infinity);wa.lf(oa);ed=b.attributes.profiles||"";a.l.profiles=ed.split(",");Me={Tb:"static"!=Na,presentationTimeline:wa,Da:null,wa:null,ua:null,N:null,bandwidth:0,wg:!1,ob:Q,ic:null,profiles:ed.split(","),roles:null,Eb:function(){return""}};a.O=0;ge=gv(a,Me,N,b,!1);Wf=ge.duration;Ne=ge.periods;("static"!=Na||a.U)&&ge.Hh||wa.vb(Wf||Infinity);a.ka&&!a.J&&(Uj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
1060
+ a.J=a.j.isLowLatencyMode());a.J&&wa.ri(a.aa);wa.Gg($a||1);return H(pc,u,2);case 2:a.J&&(Y=0,Gh=null!=Ea?Ea:a.g.defaultPresentationDelay,wa.Yg(Gh));if(!a.i)return H(pc,a.m.Pf(Ne,Me.Tb),6);a.i.periodCount=Ne.length;a.i.gapCount=a.O;return H(pc,hv(a,Ne,!1),4);case 6:a.i={presentationTimeline:wa,variants:a.m.l,textStreams:a.m.pg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:Y||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:iv(b),
1061
+ nextUrl:jv(b),periodCount:Ne.length,gapCount:a.O,isLowLatency:a.ka,startTime:null};if(!wa.Ki()){pc.A(7);break}Vj=ne(b,"UTCTiming");return H(pc,kv(a,N,Vj),8);case 8:Hh=pc.h;if(!a.j)return pc.return();wa.si(Hh);case 7:wa.Te();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),lv(a),I(pc)}})}function hv(a,b,c){var d;return P(function(e){if(1==e.g)return H(e,a.m.Pf(b,!0,c),2);a.i.variants=a.m.l;d=a.m.pg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
1061
1062
  function ev(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=ue(b,"originalPublishTime",xe);if(!c||c!==a.l.Xe||d!==a.l.Xd)throw a.H=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(me(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ge(l.attributes.sel||""),n=m[m.length-1],p=pe(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.rc){r=pe(l)||"";var L=ye(r);if(null!=L){a.l.ic=L;for(var N=t(a.u.values()),Q=N.next();!Q.done;Q=N.next())Q.value.ic=
1062
- L}}else if("type"===n.rc){a.i.presentationTimeline.Vc("static"==p);a.l.type=p;L=t(a.u.values());for(N=L.next();!N.done;N=L.next())N.value.Tb="dynamic"==p;"static"==p&&(a.L=-1)}else"publishTime"===n.rc?a.l.Xd=xe(p)||0:null===n.rc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)He(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&mv(a,n.id);else if("SegmentTemplate"===n.name){N=Ge(l.attributes.sel||"");L=N[N.length-1];if(L.rc){N=nv(a,N);Q=pe(l)||
1063
+ L}}else if("type"===n.rc){a.i.presentationTimeline.Xc("static"==p);a.l.type=p;L=t(a.u.values());for(N=L.next();!N.done;N=L.next())N.value.Tb="dynamic"==p;"static"==p&&(a.L=-1)}else"publishTime"===n.rc?a.l.Xd=xe(p)||0:null===n.rc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)He(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&mv(a,n.id);else if("SegmentTemplate"===n.name){N=Ge(l.attributes.sel||"");L=N[N.length-1];if(L.rc){N=nv(a,N);Q=pe(l)||
1063
1064
  "";for(var R=t(N),Y=R.next();!Y.done;Y=R.next())Y=a.u.get(Y.value),Je(Y.N.Bc,l.tagName,L.rc,Q);L=N}else L=[];u=L;w=t(u);for(v=w.next();!v.done;v=w.next())z=v.value,g.add(z)}else if("SegmentTimeline"===n.name||"S"===n.name){L=Ge(l.attributes.sel||"");L=nv(a,L);N=t(L);for(Q=N.next();!Q.done;Q=N.next())Q=a.u.get(Q.value),Q=ut(Q,Wt,"SegmentTimeline"),R=ne(Q,"S"),He(R,l),Q.children=R;y=L;B=t(y);for(A=B.next();!A.done;A=B.next())C=A.value,g.add(C)}D=t(g);for(E=D.next();!E.done;E=D.next())F=E.value,ov(a,
1064
- F);K=t(f);for(G=K.next();!G.done;G=K.next())J=G.value,e.push.apply(e,x(pv(a,J)));if(!e.length)return O.A(2);a.i.periodCount+=e.length;a.i.gapCount=a.O;return H(O,iv(a,e,!0),2)}"static"==a.l.type&&(M=a.l.ic,a.i.presentationTimeline.vb(M||Infinity));I(O)})}
1065
- function pv(a,b){return hv(a,{Tb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Da:null,wa:null,ua:null,N:null,bandwidth:0,xg:!1,ob:a.l.ob,profiles:a.l.profiles,ic:a.l.ic,roles:null,Eb:function(){return""}},a.l.gb,b,!0).periods}function mv(a,b){a.i.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);ut(e,Wt,"SegmentTimeline").children=[];ov(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
1065
+ F);K=t(f);for(G=K.next();!G.done;G=K.next())J=G.value,e.push.apply(e,x(pv(a,J)));if(!e.length)return O.A(2);a.i.periodCount+=e.length;a.i.gapCount=a.O;return H(O,hv(a,e,!0),2)}"static"==a.l.type&&(M=a.l.ic,a.i.presentationTimeline.vb(M||Infinity));I(O)})}
1066
+ function pv(a,b){return gv(a,{Tb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Da:null,wa:null,ua:null,N:null,bandwidth:0,wg:!1,ob:a.l.ob,profiles:a.l.profiles,ic:a.l.ic,roles:null,Eb:function(){return""}},a.l.gb,b,!0).periods}function mv(a,b){a.i.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);ut(e,Wt,"SegmentTimeline").children=[];ov(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
1066
1067
  function nv(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Da.id===c&&a.ua.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(-1<e)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Da.id===c&&a.ua.position===e&&a.N.id&&b.push(c+
1067
- ","+a.N.id);return b}function ov(a,b){var c=a.u.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.ab(a.i.presentationTimeline.Ib());try{var e=Vt(c,function(f,g,h,k){return qv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.ma,c.N.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.A(0):H(f,e.Ic(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.N.contentType,b!=Wc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1068
- function jv(a){var b=re(a,"ServiceDescription");if(!b)return null;a=re(b,"Latency");b=re(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
1069
- return c}function kv(a){a=ne(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
1070
- function hv(a,b,c,d,e){var f=b.ic;f||(f=ue(d,"mediaPresentationDuration",ye),a.l.ic=f);var g=0;a.i&&a.i.presentationTimeline&&a.U&&(g=a.i.presentationTimeline.dc());var h=[],k=g;d=ne(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=ue(m,"start",ye,k),r=m.attributes.id,u=ue(m,"duration",ye);p=0==l&&0==p&&a.U?g:p;var w=null;if(n){var v=ue(n,"start",ye);null!=v&&(w=v-p+g)}else null!=f&&(w=f-p+g);v=Zc;w&&u&&Math.abs(w-u)>v&&w>u&&a.O++;null==w&&(w=u);if(!(null!==a.P&&null!==r&&null!==p&&p<
1071
- a.P)||a.G.includes(r)||l+1==d.length){null!==p&&(null===a.P||p>a.P)&&(a.P=p);k=rv(a,b,c,{start:p,duration:w,node:m,Ag:null==w||!n});h.push(k);b.Da.id&&w&&(a.ma[b.Da.id]=w);if(null==w){k=null;break}k=p+w}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Hh:!1}:{periods:h,duration:k,Hh:!0}}
1072
- function gv(a){var b=Object.keys(a.C).filter(function(f){return!a.G.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.C[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.Fh(a.s[e],c),delete a.s[e];delete a.C[c]}}
1068
+ ","+a.N.id);return b}function ov(a,b){var c=a.u.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.ab(a.i.presentationTimeline.Ib());try{var e=Vt(c,function(f,g,h,k){return qv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.ma,c.N.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.A(0):H(f,e.Kc(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.N.contentType,b!=Wc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1069
+ function iv(a){var b=re(a,"ServiceDescription");if(!b)return null;a=re(b,"Latency");b=re(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
1070
+ return c}function jv(a){a=ne(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
1071
+ function gv(a,b,c,d,e){var f=b.ic;f||(f=ue(d,"mediaPresentationDuration",ye),a.l.ic=f);var g=0;a.i&&a.i.presentationTimeline&&a.U&&(g=a.i.presentationTimeline.dc());var h=[],k=g;d=ne(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=ue(m,"start",ye,k),r=m.attributes.id,u=ue(m,"duration",ye);p=0==l&&0==p&&a.U?g:p;var w=null;if(n){var v=ue(n,"start",ye);null!=v&&(w=v-p+g)}else null!=f&&(w=f-p+g);v=Zc;w&&u&&Math.abs(w-u)>v&&w>u&&a.O++;null==w&&(w=u);if(!(null!==a.P&&null!==r&&null!==p&&p<
1072
+ a.P)||a.G.includes(r)||l+1==d.length){null!==p&&(null===a.P||p>a.P)&&(a.P=p);k=rv(a,b,c,{start:p,duration:w,node:m,zg:null==w||!n});h.push(k);b.Da.id&&w&&(a.ma[b.Da.id]=w);if(null==w){k=null;break}k=p+w}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Hh:!1}:{periods:h,duration:k,Hh:!0}}
1073
+ function lv(a){var b=Object.keys(a.C).filter(function(h){return!a.G.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.C[c]),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s[f];g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Fh(a.s[f],c),delete a.s[f])}d&&delete a.C[c]}}
1073
1074
  function rv(a,b,c,d){b.Da=sv(a,d.node,null,c);b.wa=d;b.Da.ob=b.ob;b.Da.id||(b.Da.id="__shaka_period_"+d.start);var e=ne(d.node,"EventStream");c=b.presentationTimeline.Ib();e=t(e);for(var f=e.next();!f.done;f=e.next())tv(a,d.start,d.duration,f.value,c);c=ne(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=uv(a,e)))b.Eb=e;c=ne(d.node,"AdaptationSet").map(function(l,m){return vv(a,b,m,l)}).filter(Xf);if(b.Tb){d=
1074
1075
  [];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.yk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);}d=c.filter(function(l){return!l.lh});c=c.filter(function(l){return l.lh});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next()){e=e.value;f=e.lh.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())Lg(k.value,e.streams)}}c=wv(a.g.disableAudio,
1075
1076
  d,"audio");e=wv(a.g.disableVideo,d,"video");f=wv(a.g.disableText,d,Wc);d=wv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Da.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function wv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
@@ -1083,25 +1084,25 @@ if(0==d.length){c="image"==b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet
1083
1084
  v.keyIds||r.keyIds;r.groupId=m}n=n.map(function(J){return J.attributes.id}).filter(Xf);return{id:m,contentType:b.ua.contentType,language:K,fm:h,streams:d,drmInfos:F.drmInfos,lh:c,yk:n}}
1084
1085
  function uv(a,b){if((b=se(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ue(b,"useMPDUrlQuery",Ee,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.$:c.split("&").map(function(d){if("$querypart$"==d)return a.$;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new vb(a.$)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
1085
1086
  function xv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=sv(a,l,b.ua,null);var p=b.N.id;a.aa=Math.min(a.aa,b.N.ob);a.ka=0<a.aa;if(!zv(b.N))return null;var r=b.wa.start;b.bandwidth=ue(l,"bandwidth",Be)||0;b.roles=h;var u=ne(l,"SupplementalProperty"),w=ne(l,"EssentialProperty"),v=null,z=w.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});z?v=uv(a,z):(z=u.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(v=uv(a,z));v&&(b.Eb=v);z=b.N.contentType;v=z==Wc||
1086
- "application"==z;z="image"==z;try{var y=void 0;if(c.Jf){var B=b.N.gb,A=b.Eb,C=Pc(B(),[c.Jf.Zj],A()),D=Ah(C,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Jf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,Q,R;return P(function(Y){if(1==Y.g)return H(Y,cv(a,D,6),2);if(3!=Y.g){N=Y.h;if(!N.data||16!=N.data.byteLength)throw new U(2,4,4049);Q={name:"AES-CBC"};R=y;return H(Y,window.crypto.subtle.importKey("raw",N.data,Q,!0,["decrypt"]),3)}R.cryptoKey=Y.h;y.fetchKey=void 0;I(Y)})}}}b.N.aesKey=
1087
- y;B=function(N,Q,R,Y){return qv(a,N,Q,R,Y)};if(b.N.yd)var E=Kt(b,B,y);else if(b.N.nc)E=Qt(b,a.s,y);else if(b.N.Bc)E=Vt(b,B,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.ma,y,n,!1);else{var F=b.wa.duration||0,K=b.N.gb,G=b.N.mimeType,J=b.N.codecs;E={Ic:function(){var N=wl(r,F,K());N.Ub(function(Q){Q.mimeType=G;Q.codecs=J});return Promise.resolve(N)}}}}catch(N){if((v||z)&&4002==N.code)return null;throw N;}l=ne(l,"ContentProtection");l=kt(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
1087
+ "application"==z;z="image"==z;try{var y=void 0;if(c.If){var B=b.N.gb,A=b.Eb,C=Pc(B(),[c.If.Zj],A()),D=Ah(C,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.If.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,Q,R;return P(function(Y){if(1==Y.g)return H(Y,cv(a,D,6),2);if(3!=Y.g){N=Y.h;if(!N.data||16!=N.data.byteLength)throw new U(2,4,4049);Q={name:"AES-CBC"};R=y;return H(Y,window.crypto.subtle.importKey("raw",N.data,Q,!0,["decrypt"]),3)}R.cryptoKey=Y.h;y.fetchKey=void 0;I(Y)})}}}b.N.aesKey=
1088
+ y;B=function(N,Q,R,Y){return qv(a,N,Q,R,Y)};if(b.N.yd)var E=Kt(b,B,y);else if(b.N.nc)E=Qt(b,a.s,y);else if(b.N.Bc)E=Vt(b,B,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.ma,y,n,!1);else{var F=b.wa.duration||0,K=b.N.gb,G=b.N.mimeType,J=b.N.codecs;E={Kc:function(){var N=wl(r,F,K());N.Ub(function(Q){Q.mimeType=G;Q.codecs=J});return Promise.resolve(N)}}}}catch(N){if((v||z)&&4002==N.code)return null;throw N;}l=ne(l,"ContentProtection");l=kt(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
1088
1089
  []);n=!1;u.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value})&&(n=!0);u=!1;v&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var M;if(z&&((w=w.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(M=w.attributes.value),!M))return null;var O;v=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&
1089
1090
  (v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(O="PQ");w=b.N.id?b.Da.id+","+b.N.id:"";a.H.length&&p&&a.u.set(b.Da.id+","+p,Av(b));var L=w&&a.s[w]?a.s[w]:{id:a.Ba++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){L.segmentIndex&&(L.segmentIndex.release(),L.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:v,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,
1090
1091
  height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:l,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.N.Ze,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:n,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:M,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([zf(b.N.mimeType,b.N.codecs)]),isAudioMuxedInVideo:!1};
1091
- L.createSegmentIndex=function(){var N;return P(function(Q){if(1==Q.g){if(L.segmentIndex)return Q.A(0);N=L;return H(Q,E.Ic(),3)}N.segmentIndex=Q.h;I(Q)})};w&&b.Tb&&!a.s[w]&&(b=b.Da.id||"",a.C[b]||(a.C[b]=[]),a.s[w]=L,a.C[b].push(w));return L}function Av(a){function b(c){if(!c)return null;c=be(c);c.yd=null;c.nc=null;c.Bc=Ne(c.Bc);return c}a=be(a);a.Da=b(a.Da);a.ua=b(a.ua);a.N=b(a.N);a.wa&&(a.wa=be(a.wa),a.wa.node=null);return a}
1092
+ L.createSegmentIndex=function(){var N;return P(function(Q){if(1==Q.g){if(L.segmentIndex)return Q.A(0);N=L;return H(Q,E.Kc(),3)}N.segmentIndex=Q.h;I(Q)})};w&&b.Tb&&!a.s[w]&&(b=b.Da.id||"",a.C[b]||(a.C[b]=[]),a.s[w]=L,a.C[b].push(w));return L}function Av(a){function b(c){if(!c)return null;c=be(c);c.yd=null;c.nc=null;c.Bc=Le(c.Bc);return c}a=be(a);a.Da=b(a.Da);a.ua=b(a.ua);a.N=b(a.N);a.wa&&(a.wa=be(a.wa),a.wa.node=null);return a}
1092
1093
  function Zu(a){var b,c;return P(function(d){switch(d.g){case 1:return b=0,ta(d,2),H(d,$u(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=ya(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();av(a,b);I(d)}})}function av(a,b){if(!(0>a.L)){var c=a.L;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.M.Y(Math.max(c-b,rd(a.qa)))}}
1093
- function sv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ze:null,audioSamplingRate:null,ob:0,kf:0};d=d||c.gb;var e=b.attributes.id,f=ne(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=pe(m);l&&m&&(ju(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(pe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ve(b,
1094
+ function sv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ze:null,audioSamplingRate:null,ob:0,jf:0};d=d||c.gb;var e=b.attributes.id,f=ne(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=pe(m);l&&m&&(ju(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(pe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ve(b,
1094
1095
  "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=cm(m).join(",");n=ue(b,"frameRate",Fe)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Bv(ne(b,"InbandEventStream"),c.emsgSchemeIdUris),u=ne(b,"AudioChannelConfiguration");u=Cv(u)||c.Ze;var w=ue(b,"audioSamplingRate",Ce)||c.audioSamplingRate;k||(k=yv(l,m));var v=re(b,"SegmentBase"),z=re(b,"SegmentTemplate"),y=v?ue(v,"availabilityTimeOffset",De)||0:0,B=z?ue(z,"availabilityTimeOffset",De)||0:0,A=f&&f.length?ue(f[0],"availabilityTimeOffset",
1095
1096
  De)||0:0;y=c.ob+A+y+B;B=null;(A=re(b,"SegmentSequenceProperties"))&&(A=re(A,"SAP"))&&(B=ue(A,"cadence",Ae));A=b.attributes.label;var C=ne(b,"Label");C&&C.length&&(C=C[0],oe(C)&&(A=oe(C)));return{gb:function(){return Pc(d(),f.length?a.h&&h?ku(a.h,e):g?g:[]:[])},yd:v||c.yd,nc:re(b,"SegmentList")||c.nc,Bc:z||c.Bc,width:ue(b,"width",Ce)||c.width,height:ue(b,"height",Ce)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Ze:u,audioSamplingRate:w,
1096
- ob:y,Le:null,kf:B||c.kf,label:A||null}}function Bv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
1097
+ ob:y,Le:null,jf:B||c.jf,label:A||null}}function Bv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
1097
1098
  function Cv(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
1098
1099
  16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
1099
1100
  function zv(a){var b=a.yd?1:0;b+=a.nc?1:0;b+=a.Bc?1:0;if(0==b)return a.contentType==Wc||"application"==a.contentType?!0:!1;1!=b&&(a.yd&&(a.nc=null),a.Bc=null);return!0}
1100
1101
  function Dv(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[Hc(c)],f=Pc(b(),e),g=Ah(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ba()}),uh(a.S,h),H(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Ac(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
1101
- function lv(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
1102
+ function kv(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
1102
1103
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":cb("NTP UTCTiming scheme is not supported");break;default:cb("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return H(n,Dv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return H(n,Dv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
1103
1104
  3);break;case 5:ya(n);case 3:g=f.next();n.A(2);break;case 4:return cb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
1104
- function tv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=ue(d,"timescale",Ce)||1,k=ue(d,"presentationTimeOffset",Ce)||0;d=t(ne(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=ue(l,"presentationTime",Ce)||0,n=ue(l,"duration",Ce)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ke(l),eventNode:Ne(l)},a.j.onTimelineRegionAdded(l))}}
1105
+ function tv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=ue(d,"timescale",Ce)||1,k=ue(d,"presentationTimeOffset",Ce)||0;d=t(ne(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=ue(l,"presentationTime",Ce)||0,n=ue(l,"duration",Ce)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ke(l),eventNode:Le(l)},a.j.onTimelineRegionAdded(l))}}
1105
1106
  function qv(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=Ih,g=e?0:1,h=gm(b,c,d,a.g.retryParameters),H(l,cv(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function yv(a,b){b=zf(a,b);return Nf(b)?Wc:a.split("/")[0]}function cv(a,b,c,d){d||(d={});d.isPreload=a.ba();b=a.j.networkingEngine.request(c,b,d);uh(a.S,b);return b.promise}
1106
1107
  function bv(a){var b=a.l.Xd;if(!a.l.Xe||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Ce(e.attributes.ttl);return!e||b+e>c}).map(pe).filter(Xf);return d.length?Pc(a.B,d):[]}S("shaka.dash.DashParser",Yu);Zi["application/dash+xml"]=function(){return new Yu};Zi["video/vnd.mpeg.dash.mpd"]=function(){return new Yu};function Ev(){}S("shaka.dependencies",Ev);Ev.has=function(a){return Fv.has(a)};Ev.add=function(a,b){if(!Gv[a])throw Error(a+" is not supported");a==Hv?Cd("mux.js","mux.js is no longer used in Shaka Player."):Fv.set(a,function(){return b})};var Hv="muxjs",Gv={gm:Hv,ISOBoxer:"ISOBoxer"};Ev.Allowed=Gv;var Fv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Iv(a,b,c){this.type=a;this.ha=b;this.segments=c||null}function Jv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Jv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
1107
1108
  function Kv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Lv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Mv(a,b,c){return(a=Lv(a,b))?a.value:c||null}function Nv(a,b){a=Lv(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function Ov(a,b,c){c=void 0===c?[]:c;this.ha=b;this.g=a;this.Xb=c}function Pv(a,b){this.name=a;this.value=b};function Qv(a,b){return a.filter(function(c){return c.name==b})}function Rv(a,b){return a.filter(function(c){return Nv(c,"TYPE")==b})}function Sv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Tv(a,b,c){c=void 0===c?0:c;return(a=Sv(a,b))?Number(a.value):c}function Uv(a,b,c){return b?Vv(a,[b],c):[]}function Vv(a,b,c){if(!b.length)return[];b=Pc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Wv(d.value,c));return a}
@@ -1118,22 +1119,22 @@ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1
1118
1119
  a.h.updateDuration());h&&ow(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.isAudioMuxedInVideo||!p.stream.segmentIndex||Bg(p.stream.segmentIndex)||a.h.disableStream(p.stream);I(r)})};function pw(a,b){return jw(a)?a.P.get(b.type):b.Ue}
1119
1120
  function kw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa,oa;return P(function(va){switch(va.g){case 1:if(b.stream.isAudioMuxedInVideo)return va.return();c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new pb(f),h=g.g,b.we&&(0<=b.Pb&&h.add("_HLS_msn",String(b.Pb)),0<=b.Qb&&h.add("_HLS_part",String(b.Qb))),b.xe&&h.add("_HLS_skip","YES"),Fb(h)&&tb(g,h),c.push(g.toString());ta(va,2);return H(va,hw(a,c,!0).promise,4);case 4:k=va.h;xa(va,3);break;case 2:throw l=
1120
1121
  ya(va),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return va.return();m=Yv(a.Ka,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.R().includes(n)||b.li.push(n);p=Qv(m.ha,"EXT-X-DEFINE");r=qw(a,p,n);u=b.stream;w=pw(a,b);return H(va,rw(a,m,u.mimeType,b.R,r),5);case 5:v=va.h;z=v.keyIds;y=v.drmInfos;B=function(Ea,Ja){return Ea.size===Ja.size&&[].concat(x(Ea)).every(function($a){return Ja.has($a)})};B(u.keyIds,z)||(u.keyIds=z,u.drmInfos=y,a.h.newDrmInfo(u));
1121
- A=sw(a,m,w,r,b.R,b.type);C=A.segments;if(D=A.bandwidth)u.bandwidth=D;E=$l(u);F=t(C);for(K=F.next();!K.done;K=F.next())G=K.value,G.na&&(G.na.qd=E);u.segmentIndex.Ud(C,a.l.Ib());C.length&&(J=Tv(m.ha,"EXT-X-MEDIA-SEQUENCE",0),O=(M=Sv(m.ha,"EXT-X-SKIP"))?Number(Mv(M,"SKIPPED-SEGMENTS")):0,L=tw(J,C),N=L.Pb,Q=L.Qb,b.Pb=N+O,b.Qb=Q,R=w.get(J),u.segmentIndex.ab(R));if(Y=Bg(u.segmentIndex))b.Rc=Y.startTime,pa=C[C.length-1],b.hc=pa.endTime;if(oa=Sv(m.ha,"EXT-X-ENDLIST"))b.Nd=!0;uw(a,m);vw(a,m.ha,u.type,r,b.R);
1122
+ A=sw(a,m,w,r,b.R,b.type);C=A.segments;if(D=A.bandwidth)u.bandwidth=D;E=$l(u);F=t(C);for(K=F.next();!K.done;K=F.next())G=K.value,G.na&&(G.na.qd=E);u.segmentIndex.Ud(C,a.l.Ib());C.length&&(J=Tv(m.ha,"EXT-X-MEDIA-SEQUENCE",0),O=(M=Sv(m.ha,"EXT-X-SKIP"))?Number(Mv(M,"SKIPPED-SEGMENTS")):0,L=tw(J,C),N=L.Pb,Q=L.Qb,b.Pb=N+O,b.Qb=Q,R=w.get(J),u.segmentIndex.ab(R));if(Y=Bg(u.segmentIndex))b.Tc=Y.startTime,pa=C[C.length-1],b.hc=pa.endTime;if(oa=Sv(m.ha,"EXT-X-ENDLIST"))b.Nd=!0;uw(a,m);vw(a,m.ha,u.type,r,b.R);
1122
1123
  I(va)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.$=a};
1123
- function ww(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=pw(a,f);if(g=Bg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.Xf=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,xw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Xf,0<f&&(e.g.splice(0,f),e=Bg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
1124
+ function ww(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=pw(a,f);if(g=Bg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.Wf=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,xw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Wf,0<f&&(e.g.splice(0,f),e=Bg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
1124
1125
  yw(a,d,e)}
1125
1126
  function zw(a,b){if(Infinity==a.ka){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Bg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ka=Math.min(a.ka,c.h))}b=a.ka;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!xw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Bg(e);if(f)if(null==f.h)bb("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.R(),"Expect AV sync issues!");else for(yw(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.hh(b)}}}}
1126
- function yw(a,b,c){b.Rc+=c;b.hc+=c;a=pw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
1127
- function iw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa;return P(function(oa){switch(oa.g){case 1:d=Yc;e=Yv(a.Ka,b);f=Qv(e.ha,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Zk(null,0);a.l.Vc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.S=!1,A=Qv(e.ha,"EXT-X-DEFINE"),n=qw(a,A,a.O),m=d.xa,C="",D=new Map,H(oa,Aw(a,a.G++,n,e,l,"",m,C,!0,"Media Playlist",null,D,null,!1,null,!1),7);Bw(a,f);p=Qv(e.ha,"EXT-X-MEDIA");r=Qv(e.ha,"EXT-X-STREAM-INF");u=Qv(e.ha,"EXT-X-IMAGE-STREAM-INF");
1127
+ function yw(a,b,c){b.Tc+=c;b.hc+=c;a=pw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
1128
+ function iw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa;return P(function(oa){switch(oa.g){case 1:d=Yc;e=Yv(a.Ka,b);f=Qv(e.ha,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Zk(null,0);a.l.Xc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.S=!1,A=Qv(e.ha,"EXT-X-DEFINE"),n=qw(a,A,a.O),m=d.xa,C="",D=new Map,H(oa,Aw(a,a.G++,n,e,l,"",m,C,!0,"Media Playlist",null,D,null,!1,null,!1),7);Bw(a,f);p=Qv(e.ha,"EXT-X-MEDIA");r=Qv(e.ha,"EXT-X-STREAM-INF");u=Qv(e.ha,"EXT-X-IMAGE-STREAM-INF");
1128
1129
  w=Qv(e.ha,"EXT-X-I-FRAME-STREAM-INF");v=Qv(e.ha,"EXT-X-SESSION-KEY");z=Qv(e.ha,"EXT-X-SESSION-DATA");y=Qv(e.ha,"EXT-X-CONTENT-STEERING");Cw(a,z);return H(oa,Dw(a,y),4);case 4:return Ew(a,r),Fw(a,p),B=Gw(a,w),H(oa,Hw(a,r,v,p,l,a.B,B),5);case 5:return g=oa.h,h=Iw(a,p),H(oa,Jw(a,u,w),6);case 6:k=oa.h;oa.A(3);break;case 7:E=oa.h,a.i.set(c,E),E.stream&&(F=$l(E.stream),E.stream.segmentIndex.Ub(function(va){va.na&&(va.na.qd=F)})),m=E.stream.type,g.push({id:0,language:bd(C||"und"),disabledUntilTime:0,primary:!0,
1129
1130
  audio:"audio"==m?E.stream:null,video:"video"==m?E.stream:null,bandwidth:E.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Kw(a,e);1==e.type&&(jw(a)&&(Lw(a,e),K=a.s,a.C.Y(K)),G=Array.from(a.i.values()),Mw(a,G),ow(a),vw(a,e.ha,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
1130
1131
  type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u};if(a.ba||!a.g.hls.disableCodecGuessing){oa.A(8);break}J=[];M=t(a.m.variants);for(O=M.next();!O.done;O=M.next())L=O.value,L.audio&&""===L.audio.codecs&&J.push(L.audio.createSegmentIndex()),L.video&&""===L.video.codecs&&J.push(L.video.createSegmentIndex());return H(oa,Promise.all(J),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];Q=g[0];R=t([Q.video,Q.audio]);for(Y=R.next();!Y.done;Y=
1131
1132
  R.next())(pa=Y.value)&&!pa.segmentIndex&&N.push(pa.createSegmentIndex());if(0<N.length)return H(oa,Promise.all(N),0)}oa.A(0)}})}
1132
1133
  function Nw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F;return P(function(K){switch(K.g){case 1:c=am(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return K.return(c);d=Ow(a,b);e=d.segment;f=d.segmentIndex;g=e.R();h=g[0];k=new pb(h);l=k.mb.split(".").pop();if(m=Pw[l])return K.return(am(m));n=Ih;r=p=null;u=e.na;if(!u){K.A(2);break}w=gm(u.R(),u.Jb(),u.Gb(),a.g.retryParameters);return H(K,Qw(a,w,n,{type:0}).promise,3);case 3:v=K.h;p=v.data;if(!u.aesKey){K.A(4);break}return H(K,fm(p,u.aesKey,
1133
1134
  0),5);case 5:p=K.h;case 4:(r=v.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return z=gm(e.R(),e.Jb(),e.Gb(),a.g.retryParameters),H(K,Qw(a,z,n,{type:1}).promise,6);case 6:y=K.h;B=y.data;if(!e.aesKey){K.A(7);break}return H(K,fm(B,e.aesKey,f),8);case 8:B=K.h;case 7:(A=y.headers["content-type"])&&(A=A.split(";")[0].toLowerCase());C="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");D=["audio/mp4","video/mp4","video/iso.segment"];if(ek(Jb(B))){var G=B;var J=Jb(G);J=(new Wj).parse(J);
1134
- var M=J.Jd();J=J.sg();var O=[],L=!1,N=!1;switch(M.audio){case "aac":case "aac-loas":O.push("mp4a.40.2");L=!0;break;case "mp3":O.push("mp4a.40.34");L=!0;break;case "ac3":O.push("ac-3");L=!0;break;case "ec3":O.push("ec-3");L=!0;break;case "opus":O.push("opus"),L=!0}switch(M.video){case "avc":J.codec?O.push(J.codec):O.push("avc1.42E01E");N=!0;break;case "hvc":J.codec?O.push(J.codec):O.push("hvc1.1.6.L93.90");N=!0;break;case "av1":O.push("av01.0.01M.08"),N=!0}if(O.length){M=L&&!N;L=new Map;if(N){N=new Jd("video/mp2t");
1135
+ var M=J.Jd();J=J.rg();var O=[],L=!1,N=!1;switch(M.audio){case "aac":case "aac-loas":O.push("mp4a.40.2");L=!0;break;case "mp3":O.push("mp4a.40.34");L=!0;break;case "ac3":O.push("ac-3");L=!0;break;case "ec3":O.push("ec-3");L=!0;break;case "opus":O.push("opus"),L=!0}switch(M.video){case "avc":J.codec?O.push(J.codec):O.push("avc1.42E01E");N=!0;break;case "hvc":J.codec?O.push(J.codec):O.push("hvc1.1.6.L93.90");N=!0;break;case "av1":O.push("av01.0.01M.08"),N=!0}if(O.length){M=L&&!N;L=new Map;if(N){N=new Jd("video/mp2t");
1135
1136
  N.i(G);G=t(N.j());for(var Q=G.next();!Q.done;Q=G.next())Q=Q.value,L.set(Q,Q);N.g()}J={type:M?"audio":"video",mimeType:"video/mp2t",codecs:O.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:L,fe:null,colorGamut:null,frameRate:J.frameRate}}else J=null;if(E=J)return K.return(E)}else if(C.includes(l)||D.includes(A)||r&&D.includes(r))if(F=bm(p,B))return K.return(F);return A?K.return(am(A)):r?K.return(am(r)):K.return(c)}})}
1136
- function ow(a){if(jw(a)){if(a.Ca==Rw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.hc),c=Math.min(c,e.Rc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.mf(b)}}else a.l.vb(Sw(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Bg(c.stream.segmentIndex))&&
1137
+ function ow(a){if(jw(a)){if(a.Ca==Rw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.hc),c=Math.min(c,e.Tc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.lf(b)}}else a.l.vb(Sw(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Bg(c.stream.segmentIndex))&&
1137
1138
  c.h&&a.l.wi(c.h);a.l.Te()}function Bw(a,b){var c=(new pb(a.O)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Mv(e,"NAME");var f=Mv(e,"VALUE");e=Mv(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}}
1138
1139
  function qw(a,b,c){c=(new pb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Mv(f,"NAME"),h=Mv(f,"VALUE");e=Mv(f,"QUERYPARAM");f=Mv(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.B.get(f))&&d.set(f,e)}return d}
1139
1140
  function Ew(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Mv(d,"AUDIO");c=Mv(d,"VIDEO");var f=Mv(d,"SUBTITLES");d=Tw(a,d);if(f){var g=Uc(Wc,d);a.I.set(f,g);Qd(d,g)}e&&(f=Uc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Uc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
@@ -1161,17 +1162,17 @@ function Zw(a,b){var c="video",d=Nv(b,"URI"),e=Mv(b,"CODECS")||"";"mjpg"==e&&(c=
1161
1162
  function fx(a,b,c,d){for(var e=a.G++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Nv(k,"URI");k=Mv(k,"PATHWAY-ID");a.j&&k&&ju(a.j,e,k,h);f.push(h)}g=f.sort().join(",");if(a.i.has(g))return a.i.get(g);a:{b=Mv(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.S=!1;b=null;break a}if(b){if("NONE"!=b){b=a.H.get(b);break a}a.S=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Sc(d,c);d=hx(a,e,f,c,d,null,!1,null,null,b,null,!1,null,
1162
1163
  !1);a.i.set(g,d);return d}
1163
1164
  function hx(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa,oa,va,Ea,Ja,$a,Na,wa,Qa,Ob;return P(function(Oa){switch(Oa.g){case 1:return D=Yc,ta(Oa,2),E=y.R(),H(Oa,C.promise,4);case 4:F=Oa.h;if(C.aborted)return Oa.return();K=F.uri;K==F.originalUri||E.includes(K)||z.push(K);G=Yv(a.Ka,F.data);if(1!=G.type)throw new U(2,4,4017);J=Qv(G.ha,"EXT-X-DEFINE");M=qw(a,J,K);O=!1;(!a.ba&&a.g.hls.disableCodecGuessing||a.S&&e==D.xa&&!a.g.hls.disableClosedCaptionsDetection)&&0<G.segments.length&&
1164
- (a.S=!1,O=!0);L=!a.ba&&a.g.hls.disableCodecGuessing;N=jw(a);return H(Oa,Aw(a,0,M,G,w,d,e,f,g,h,k,l,m,n,p,r,void 0,O,L),5);case 5:Q=Oa.h;if(C.aborted)return Oa.return();R=Q.stream;Kw(a,G);jw(a)&&!N&&Lw(a,G);y.Rc=Q.Rc;y.hc=Q.hc;y.xe=Q.xe;y.we=Q.we;y.Nd=Q.Nd;y.Ue=Q.Ue;y.Pb=Q.Pb;y.Qb=Q.Qb;y.Fg=!0;v.segmentIndex=R.segmentIndex;v.encrypted=R.encrypted;v.drmInfos=R.drmInfos;v.keyIds=R.keyIds;v.mimeType=R.mimeType;v.bandwidth=v.bandwidth||R.bandwidth;v.codecs=v.codecs||R.codecs;v.closedCaptions=v.closedCaptions||
1165
+ (a.S=!1,O=!0);L=!a.ba&&a.g.hls.disableCodecGuessing;N=jw(a);return H(Oa,Aw(a,0,M,G,w,d,e,f,g,h,k,l,m,n,p,r,void 0,O,L),5);case 5:Q=Oa.h;if(C.aborted)return Oa.return();R=Q.stream;Kw(a,G);jw(a)&&!N&&Lw(a,G);y.Tc=Q.Tc;y.hc=Q.hc;y.xe=Q.xe;y.we=Q.we;y.Nd=Q.Nd;y.Ue=Q.Ue;y.Pb=Q.Pb;y.Qb=Q.Qb;y.Eg=!0;v.segmentIndex=R.segmentIndex;v.encrypted=R.encrypted;v.drmInfos=R.drmInfos;v.keyIds=R.keyIds;v.mimeType=R.mimeType;v.bandwidth=v.bandwidth||R.bandwidth;v.codecs=v.codecs||R.codecs;v.closedCaptions=v.closedCaptions||
1165
1166
  R.closedCaptions;v.width=v.width||R.width;v.height=v.height||R.height;v.hdr=v.hdr||R.hdr;v.colorGamut=v.colorGamut||R.colorGamut;v.frameRate=v.frameRate||R.frameRate;"und"==v.language&&"und"!=R.language&&(v.language=R.language);v.language=v.language||R.language;v.channelsCount=v.channelsCount||R.channelsCount;v.audioSamplingRate=v.audioSamplingRate||R.audioSamplingRate;Xw(v);v.drmInfos.length&&a.h.newDrmInfo(v);Y=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Y=!0;
1166
- a.m&&Y&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.xa||e==D.ia)for(pa=t(a.i.values()),oa=pa.next();!oa.done;oa=pa.next())va=oa.value,va.Fg||va.type!=e||(va.stream.mimeType=R.mimeType,Xw(va.stream));e==D.Oa&&(Ea=Bg(R.segmentIndex))&&Ea.na&&(v.mimeType="application/mp4",Xw(v));Ja=$l(v);v.segmentIndex.Ub(function(Za){Za.na&&(Za.na.qd=Ja)});ix(a)&&(a.jc?Mw(a,[y]):(a.jc=!0,$a=Array.from(a.i.values()),Na=$a.filter(function(Za){return Za.stream.segmentIndex}),Mw(a,Na),ow(a),wa=a.s,0<wa&&a.C.Y(wa)));
1167
- vw(a,G.ha,v.type,M,w);a.m&&(a.m.startTime=a.u);xa(Oa,0);break;case 2:Qa=ya(Oa);v.closeSegmentIndex();if(7001===Qa.code)return Oa.return();Ob=a.h.disableStream(v);if(!Ob)throw Qa;I(Oa)}})}function w(){return a.j&&1<c.length?ku(a.j,b):z.concat(Vv([a.O],c,a.B))}var v=jx(a,d,e,f,g,h,k,l,m,n,p,r);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",Xw(v));var z=[],y={stream:v,type:e,li:z,R:w,Rc:0,hc:0,Ue:new Map,xe:!1,we:!1,Nd:!1,Xf:-1,Pb:-1,Qb:-1,Fg:!1},B=null,A;v.createSegmentIndex=
1167
+ a.m&&Y&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.xa||e==D.ia)for(pa=t(a.i.values()),oa=pa.next();!oa.done;oa=pa.next())va=oa.value,va.Eg||va.type!=e||(va.stream.mimeType=R.mimeType,Xw(va.stream));e==D.Oa&&(Ea=Bg(R.segmentIndex))&&Ea.na&&(v.mimeType="application/mp4",Xw(v));Ja=$l(v);v.segmentIndex.Ub(function(Za){Za.na&&(Za.na.qd=Ja)});ix(a)&&(a.jc?Mw(a,[y]):(a.jc=!0,$a=Array.from(a.i.values()),Na=$a.filter(function(Za){return Za.stream.segmentIndex}),Mw(a,Na),ow(a),wa=a.s,0<wa&&a.C.Y(wa)));
1168
+ vw(a,G.ha,v.type,M,w);a.m&&(a.m.startTime=a.u);xa(Oa,0);break;case 2:Qa=ya(Oa);v.closeSegmentIndex();if(7001===Qa.code)return Oa.return();Ob=a.h.disableStream(v);if(!Ob)throw Qa;I(Oa)}})}function w(){return a.j&&1<c.length?ku(a.j,b):z.concat(Vv([a.O],c,a.B))}var v=jx(a,d,e,f,g,h,k,l,m,n,p,r);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",Xw(v));var z=[],y={stream:v,type:e,li:z,R:w,Tc:0,hc:0,Ue:new Map,xe:!1,we:!1,Nd:!1,Wf:-1,Pb:-1,Qb:-1,Eg:!1},B=null,A;v.createSegmentIndex=
1168
1169
  function(){if(B)return B;if(v.isAudioMuxedInVideo)return v.segmentIndex=new ul([]),Promise.resolve();A=hw(a,y.R(),!0);return B=new Promise(function(C){C(u(A))})};v.closeSegmentIndex=function(){B&&!v.segmentIndex&&A.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);B=null};return y}
1169
1170
  function Sw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.hc));return b}function lw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Ub(function(e){c.push(e)});a.l.Vd(c)}
1170
1171
  function Mw(a,b){if(!jw(a))for(var c=Sw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.gd(0,c);lw(a,b.map(function(f){return f.stream}));c=jw(a)&&!a.zc;a.g.hls.ignoreManifestProgramDateTime||c?ww(a,b,c):(zw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&ww(a,b))}function xw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
1171
1172
  function ix(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1172
1173
  function Aw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y){z=void 0===z?!0:z;y=void 0===y?!0:y;var B,A,C,D,E,F,K,G,J,M,O,L,N,Q,R,Y,pa,oa,va,Ea,Ja,$a,Na,wa,Qa,Ob,Oa,Za,Tc;return P(function(xb){switch(xb.g){case 1:B=d.segments||[];A=B.every(function(ed){return Sv(ed.ha,"EXT-X-GAP")?!0:!1});if(!B.length||A)throw new U(2,4,4053);kx(a,d);jw(a)&&uw(a,d);C=jw(a)?a.P.get(g):new Map;D=sw(a,d,C,c,e,g);E=D.segments;F=D.bandwidth;O=M=J=G=K=null;if(!(0<E.length&&z)){xb.A(2);break}return H(xb,Nw(a,E),3);case 3:L=xb.h,
1173
1174
  g=L.type,h=L.language,m=L.channelCount,u=L.sampleRate,a.g.disableText||(n=L.closedCaptions),G=L.height,K=L.width,J=L.fe,M=L.colorGamut,O=L.frameRate,y&&(v=L.mimeType,f=L.codecs);case 2:if(v){xb.A(4);break}return H(xb,lx(a,g,f,E),5);case 5:v=xb.h;case 4:return H(xb,rw(a,d,v,e,c),6);case 6:N=xb.h;Q=N.drmInfos;R=N.keyIds;Y=N.encrypted;pa=N.Vi;if(Y&&!Q.length&&!pa)throw new U(2,4,4026);oa=jx(a,f,g,h,k,l,m,n,p,r,u,w);oa.encrypted=Y;oa.drmInfos=Q;oa.keyIds=R;oa.mimeType=v;F&&(oa.bandwidth=F);Xw(oa);"video"==
1174
- g&&(K||G||J||M)&&gx(oa,K,G,O,J,null,M);jw(a)&&uw(a,d);va=E[0].startTime;Ea=E[E.length-1];Ja=Ea.endTime;$a=new ul(E);oa.segmentIndex=$a;wa=(Na=Sv(d.ha,"EXT-X-SERVER-CONTROL"))?null!=Lv(Na,"CAN-SKIP-UNTIL"):!1;Qa=Na?null!=Lv(Na,"CAN-BLOCK-RELOAD"):!1;Ob=Tv(d.ha,"EXT-X-MEDIA-SEQUENCE",0);Oa=tw(Ob,E);Za=Oa.Pb;Tc=Oa.Qb;return xb.return({stream:oa,type:g,li:[],R:e,Rc:va,hc:Ja,xe:wa,we:Qa,Nd:!1,Xf:-1,Pb:Za,Qb:Tc,Ue:C,Fg:!1})}})}
1175
+ g&&(K||G||J||M)&&gx(oa,K,G,O,J,null,M);jw(a)&&uw(a,d);va=E[0].startTime;Ea=E[E.length-1];Ja=Ea.endTime;$a=new ul(E);oa.segmentIndex=$a;wa=(Na=Sv(d.ha,"EXT-X-SERVER-CONTROL"))?null!=Lv(Na,"CAN-SKIP-UNTIL"):!1;Qa=Na?null!=Lv(Na,"CAN-BLOCK-RELOAD"):!1;Ob=Tv(d.ha,"EXT-X-MEDIA-SEQUENCE",0);Oa=tw(Ob,E);Za=Oa.Pb;Tc=Oa.Qb;return xb.return({stream:oa,type:g,li:[],R:e,Tc:va,hc:Ja,xe:wa,we:Qa,Nd:!1,Wf:-1,Pb:Za,Qb:Tc,Ue:C,Eg:!1})}})}
1175
1176
  function tw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Pb:a,Qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Pb:a,Qb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Pb:a,Qb:c}}
1176
1177
  function jx(a,b,c,d,e,f,g,h,k,l,m,n){var p=Vw(c,b)||Ww(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Wc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1177
1178
  segmentIndex:null,mimeType:p,codecs:b,kind:c==Wc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:bd(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
@@ -1182,26 +1183,26 @@ function nx(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw cb("Web Cr
1182
1183
  256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return P(function(w){if(1==w.g)return l=Uv(d(),Nv(b,"URI"),e),m=l.sort().join(""),a.M.has(m)||(n=Ah(l,a.g.retryParameters),p=Qw(a,n,6).promise,a.M.set(m,p)),H(w,a.M.get(m),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new U(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return H(w,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=w.h;k.fetchKey=void 0;
1183
1184
  I(w)})};a.ma.set(c,k)}return a.ma.get(c)}function Kw(a,b){null==a.u&&(b=Sv(b.ha,"EXT-X-START"))&&(a.u=Number(Nv(b,"TIME-OFFSET")))}function kx(a,b){var c=Sv(b.ha,"EXT-X-PLAYLIST-TYPE");b=Sv(b.ha,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?nw(a,gw):c?nw(a,Rw):nw(a,ox)}
1184
1185
  function uw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Sv(d[e].ha,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Sv(b.ha,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Sv(b.ha,"EXT-X-PART-INF"))a.U=Number(Nv(e,"PART-TARGET"));b=Sv(b.ha,"EXT-X-SERVER-CONTROL");a.L&&a.U?(a.s=a.fc?5*a.U<=c?Math.min(a.U,a.s):Math.min(c,a.s):Math.min(a.U,a.s),a.Ja=b?Number(Nv(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),
1185
- c=b?Lv(b,"HOLD-BACK"):null,a.Ga=c?Number(c.value):0);a.Ta=Math.max(d,a.Ta)}function Lw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ja)c=a.Ja;else if(a.Ga)c=a.Ga;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Sv(b.segments[e].ha,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.Ta}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.zi(0);a.l.Yg(c);a.l.Vc(!1)}
1186
+ c=b?Lv(b,"HOLD-BACK"):null,a.Ga=c?Number(c.value):0);a.Ta=Math.max(d,a.Ta)}function Lw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ja)c=a.Ja;else if(a.Ga)c=a.Ga;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Sv(b.segments[e].ha,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.Ta}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.zi(0);a.l.Yg(c);a.l.Xc(!1)}
1186
1187
  function mx(a,b,c,d,e){var f=Sv(c,"EXT-X-MAP");if(!f)return null;var g=Nv(f,"URI"),h=Uv(d(),g,e);g=[h.toString(),Mv(f,"BYTERANGE","")].join("-");if(!a.ya.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?ax(Nv(m,"METHOD"))&&m.id<f.id&&(k=nx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=px(h,f,l,k);a.ya.set(g,b)}return a.ya.get(g)}
1187
1188
  function px(a,b,c,d){var e=0,f=null;b=Mv(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new dj(function(){return a},e,f,null,null,null,d)}
1188
1189
  function qx(a,b,c,d,e,f,g,h,k){function l(Y){Y=(new pb(Y)).mb.split(".").pop();var pa=rx[g][Y];pa||(pa=Pw[Y]);return pa}var m=d.ha,n=Sv(m,"EXTINF"),p=0,r=0,u=null;d.Xb.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Sv(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=xe(v.value),a.zc=!0)}var z=gj;Sv(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(0==d.Xb.length)throw new U(2,4,4024,"EXTINF");if(!a.L)return null}var y=[];v=!1;var B=null,A=!1,C=!1;if(a.L&&d.Xb.length){p=
1189
- b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=w,E={},F=0;F<d.Xb.length;E={wf:void 0,bf:void 0},F++){var K=d.Xb[F],G=0==F?c:y[y.length-1],J=0==F?e:G.endTime,M=Number(Mv(K,"DURATION"))||a.U;if(M){var O=J+M,L=0,N=null;"EXT-X-PRELOAD-HINT"==K.name?(L=(L=Mv(K,"BYTERANGE-START"))?Number(L):0,(G=Mv(K,"BYTERANGE-LENGTH"))?N=L+Number(G)-1:L&&(N=Number.MAX_SAFE_INTEGER)):(L=Mv(K,"BYTERANGE"),N=t(sx(G,L)),L=N.next().value,N=N.next().value);E.bf=Mv(K,"URI");if(E.bf){G=gj;"YES"==
1190
- Mv(K,"GAP")&&(a.m.gapCount++,G=2,A=!0);E.wf=null;var Q=function(Y){return function(){null==Y.wf&&(Y.wf=Uv(h(),Y.bf,f));return Y.wf}}(E);p&&0<=L&&null!=N&&(B=Q,v=!0);J=new fj(J,O,Q,L,N,b,0,0,Infinity,[],"",null,D,G,k);"EXT-X-PRELOAD-HINT"==K.name&&(J.Gg(),C=!0);"YES"!=Mv(K,"INDEPENDENT")&&0<F&&J.pd();if(E=l(E.bf))J.mimeType=E,tx.has(E)&&(J.na=null);y.push(J);D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;v&&(A||
1191
- 0!=y[0].eb?(v=!1,B=null):y=[]);(n=Sv(m,"EXT-X-BYTERANGE"))?(u=t(sx(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].eb,u=y[y.length-1].Ma);c="";n=null;"image"==g&&(c="1x1",m=Sv(m,"EXT-X-TILES"))&&(c=Nv(m,"LAYOUT"),(m=Mv(m,"DURATION"))&&(n=Number(m)));var R=null;b=new fj(e,p,function(){if(B)return B();null==R&&(R=Uv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,y,c,n,w,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,tx.has(e)&&(b.na=null);v&&(a.fc=!0,b.Yh(),C&&b.Gg());return b}
1190
+ b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=w,E={},F=0;F<d.Xb.length;E={vf:void 0,bf:void 0},F++){var K=d.Xb[F],G=0==F?c:y[y.length-1],J=0==F?e:G.endTime,M=Number(Mv(K,"DURATION"))||a.U;if(M){var O=J+M,L=0,N=null;"EXT-X-PRELOAD-HINT"==K.name?(L=(L=Mv(K,"BYTERANGE-START"))?Number(L):0,(G=Mv(K,"BYTERANGE-LENGTH"))?N=L+Number(G)-1:L&&(N=Number.MAX_SAFE_INTEGER)):(L=Mv(K,"BYTERANGE"),N=t(sx(G,L)),L=N.next().value,N=N.next().value);E.bf=Mv(K,"URI");if(E.bf){G=gj;"YES"==
1191
+ Mv(K,"GAP")&&(a.m.gapCount++,G=2,A=!0);E.vf=null;var Q=function(Y){return function(){null==Y.vf&&(Y.vf=Uv(h(),Y.bf,f));return Y.vf}}(E);p&&0<=L&&null!=N&&(B=Q,v=!0);J=new fj(J,O,Q,L,N,b,0,0,Infinity,[],"",null,D,G,k);"EXT-X-PRELOAD-HINT"==K.name&&(J.Fg(),C=!0);"YES"!=Mv(K,"INDEPENDENT")&&0<F&&J.pd();if(E=l(E.bf))J.mimeType=E,tx.has(E)&&(J.na=null);y.push(J);D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;v&&(A||
1192
+ 0!=y[0].eb?(v=!1,B=null):y=[]);(n=Sv(m,"EXT-X-BYTERANGE"))?(u=t(sx(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].eb,u=y[y.length-1].Ma);c="";n=null;"image"==g&&(c="1x1",m=Sv(m,"EXT-X-TILES"))&&(c=Nv(m,"LAYOUT"),(m=Mv(m,"DURATION"))&&(n=Number(m)));var R=null;b=new fj(e,p,function(){if(B)return B();null==R&&(R=Uv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,y,c,n,w,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,tx.has(e)&&(b.na=null);v&&(a.fc=!0,b.Yh(),C&&b.Fg());return b}
1192
1193
  function sx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ma+1,d=c+b-1);return[c,d]}
1193
1194
  function vw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!xw(a,c))for(b=Qv(b,"EXT-X-DATERANGE"),b=b.sort(function(J,M){J=Nv(J,"START-DATE");M=Nv(M,"START-DATE");return J<M?-1:J>M?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Nv(g,"ID");if(!a.Fa.has(h)){var k=Nv(g,"START-DATE"),l=xe(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,p=Mv(g,"END-DATE");if(p){var r=xe(p);if(!isNaN(r)&&(n=r-f,0>n))continue}if(null==n){var u=Mv(g,"DURATION")||Mv(g,"PLANNED-DURATION");if(u){var w=parseFloat(u);isNaN(w)||
1194
1195
  (n=m+w);if(0>l-f+w)continue}}var v=Mv(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==Mv(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;y<b.length;y++){var B=Mv(b[y],"CLASS")||"com.apple.quicktime.HLS";if(v==B){var A=Nv(b[y],"START-DATE"),C=xe(A);if(!isNaN(C)&&C&&C>l){n=Math.max(0,C-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],E=t(g.attributes),F=E.next();!F.done;F=E.next()){var K=F.value;if(!y.includes(K.name)){var G=Wv(K.value,d);if("X-ASSET-URI"==
1195
1196
  K.name||"X-ASSET-LIST"==K.name)G=Uv(e(),K.value,d)[0];D.push({key:K.name,description:"",data:G,mimeType:null,pictureType:null})}}if(1<D.length)a.h.onMetadata(v,m,n,D);a.Fa.add(h)}}}catch(J){}}}}
1196
1197
  function sw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Tv(b.ha,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Tv(b.ha,"EXT-X-MEDIA-SEQUENCE",0),m=Sv(b.ha,"EXT-X-SKIP"),n=m?Number(Mv(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;jw(a)&&c.has(p)&&(r=c.get(p));0===r&&a.Ca==Rw&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.Ib());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var z=g[v],y=0==v?r:w.endTime;p=l+n+v;Sv(z.ha,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.ha);for(var A=B.next();!A.done;A=B.next())A=A.value,"EXT-X-KEY"==A.name&&
1197
1198
  (ax(Nv(A,"METHOD"))?h=nx(a,A,b,e,d):h=void 0);c.set(p,y);B=mx(a,b,z.ha,e,d);!a.L&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.L=a.h.isLowLatencyMode());if(y=qx(a,B,w,z,y,d,f,e,h))(w=Tv(z.ha,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:y.endTime-y.startTime}):m.length&&(w=m.pop(),w.duration+=y.endTime-y.startTime,m.push(w)),w=y,y.i=k,xw(a,f)&&null!=a.K&&p<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,D){return C+D.duration},0),b=Math.round(m.reduce(function(C,D){return C+D.bitrate*
1198
- D.duration},0)/b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Be:void 0,Ae:void 0,se:void 0,Tc:void 0,re:void 0},d++)if(c.Tc=u[d],null==c.Tc.h)for(c.Ae=0,c.Be=d,e=function(C){return function(){var D=u[C.Be];if(D){if(null!=D.h)return D.h+C.Ae;C.Ae-=D.endTime-D.startTime;C.Be+=1}return null}}(c),c.re=0,c.se=d,g=function(C){return function(){var D=u[C.se];if(D){D!=C.Tc&&(C.re+=D.endTime-D.startTime);if(null!=D.h)return D.h+C.re;--C.se}return null}}(c);null==c.Tc.h;)c.Tc.h=
1199
- g(),null==c.Tc.h&&(c.Tc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ka;if(m&&Infinity!=c&&!xw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.hh(c);return{segments:u,bandwidth:b}}
1199
+ D.duration},0)/b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Be:void 0,Ae:void 0,se:void 0,Vc:void 0,re:void 0},d++)if(c.Vc=u[d],null==c.Vc.h)for(c.Ae=0,c.Be=d,e=function(C){return function(){var D=u[C.Be];if(D){if(null!=D.h)return D.h+C.Ae;C.Ae-=D.endTime-D.startTime;C.Be+=1}return null}}(c),c.re=0,c.se=d,g=function(C){return function(){var D=u[C.se];if(D){D!=C.Vc&&(C.re+=D.endTime-D.startTime);if(null!=D.h)return D.h+C.re;--C.se}return null}}(c);null==c.Vc.h;)c.Vc.h=
1200
+ g(),null==c.Vc.h&&(c.Vc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ka;if(m&&Infinity!=c&&!xw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.hh(c);return{segments:u,bandwidth:b}}
1200
1201
  function Vw(a,b){if(a==Wc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function Ww(a){return a==Wc?"text/vtt":rx[a].mp4}function Ow(a,b){a=jw(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.vc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
1201
1202
  function lx(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,z;return P(function(y){switch(y.g){case 1:e=Ih;f=Ow(a,d);g=f.segment;if(2==g.status)return y.return(Ww(b));h=g.R();k=new pb(h[0]);l=k.mb.split(".").pop();m=rx[b];if((n=m[l])||(n=Pw[l])||(n=Vw(b,c)))return y.return(n);r=1;u=Ah(h,a.g.retryParameters);ta(y,2);u.method="HEAD";return H(y,Qw(a,u,e,{type:r}).promise,4);case 4:w=y.h;p=w.headers["content-type"];xa(y,3);break;case 2:v=ya(y);if(!v||1002!=v.code&&1001!=v.code){y.A(3);break}u.method="GET";return H(y,
1202
1203
  Qw(a,u,e,{type:r}).promise,6);case 6:z=y.h,p=z.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(Ww(b))}})}function gx(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function hw(a,b,c){return Qw(a,Ah(b,a.g.retryParameters),0,{type:c?2:3})}
1203
1204
  function fw(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return H(h,a.update(),4);case 4:c=Date.now();jw(a)&&(d=(c-b)/1E3,a.Lb.sample(1,d),e=0<a.g.hls.updatePeriod?a.g.hls.updatePeriod:a.s,f=Math.max(0,e-rd(a.Lb)),a.C.Y(f));xa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.C.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
1204
- I(h)}})}function jw(a){return a.Ca!=gw}function nw(a,b){a.Ca=b;a.l&&a.l.Vc(!jw(a));jw(a)||a.C.stop()}function Qw(a,b,c,d){if(!a.aa)throw new U(2,7,7001);d||(d={});d.isPreload=a.Nb();b=a.h.networkingEngine.request(c,b,d);uh(a.aa,b);return b}function ax(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1205
+ I(h)}})}function jw(a){return a.Ca!=gw}function nw(a,b){a.Ca=b;a.l&&a.l.Xc(!jw(a));jw(a)||a.C.stop()}function Qw(a,b,c,d){if(!a.aa)throw new U(2,7,7001);d||(d={});d.isPreload=a.Nb();b=a.h.networkingEngine.request(c,b,d);uh(a.aa,b);return b}function ax(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1205
1206
  function cx(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,z,y,B,A;return P(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(xc())throw new U(2,4,4041);g=Nv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=Uv(d(),Nv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Nc(Lc(k[0].split("data:text/plain;base64,").pop()));C.A(2);break}m=k.sort().join("");a.qa.has(m)||(n=Ah(k,a.g.retryParameters),p=Qw(a,n,6).promise,a.qa.set(m,p));return H(C,
1206
1207
  a.qa.get(m),3);case 3:r=C.h,l=Nc(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.A(4);break}if(a.Ba.has(e)){w=a.Ba.get(e);C.A(5);break}v=gm(e.R(),e.Jb(),e.Gb(),a.g.retryParameters);z=Ih;return H(C,Qw(a,v,z,{type:0}).promise,6);case 6:y=C.h,w=em(y.data),a.Ba.set(e,w);case 5:w&&(u=w);case 4:return B=new Map,B.set(u,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),C.return(Rc(B,A))}})}S("shaka.hls.HlsParser",ew);
1207
1208
  var Pw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},rx={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
@@ -1231,7 +1232,7 @@ var Ax=!1,Gx=Math.pow(2,32)-1,jy={},Ix=new Uint8Array([0,0,0,0,0,0,0,0,118,105,1
1231
1232
  function ly(a){var b;P(function(c){switch(c.g){case 1:return ta(c,2),H(c,my(a),4);case 4:xa(c,3);break;case 2:b=ya(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()};
1232
1233
  q.update=function(){var a=this,b;return P(function(c){if(1==c.g)return ta(c,2),H(c,my(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
1233
1234
  function my(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g)return b=Ah(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.B()}),uh(a.C,e),H(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=cn){Cd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Xu(m,"SmoothStreamingMedia");if(!m)throw new U(2,
1234
- 4,4046,l);n(m);m=Ec(m.outerHTML)}var p=ce(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=dn&&l(p);a.i||(a.i=new Zk(null,0));if(l=ue(p,"IsLive",Ee,!1))throw new U(2,4,4047);a.i.Vc(!l);n=ue(p,"TimeScale",Ce,1E7);m=ue(p,"DVRWindowLength",Ce);l&&(0===m||isNaN(m))&&(m=Infinity);var r=ue(p,"CanSeek",Ee,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.mf(r);
1235
+ 4,4046,l);n(m);m=Ec(m.outerHTML)}var p=ce(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=dn&&l(p);a.i||(a.i=new Zk(null,0));if(l=ue(p,"IsLive",Ee,!1))throw new U(2,4,4047);a.i.Xc(!l);n=ue(p,"TimeScale",Ce,1E7);m=ue(p,"DVRWindowLength",Ce);l&&(0===m||isNaN(m))&&(m=Infinity);var r=ue(p,"CanSeek",Ee,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.lf(r);
1235
1236
  m=ue(p,"Duration",Ce,Infinity);l||a.i.vb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=ne(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(ne(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),z=n[v];if(z){var y=wx(w);if(y)a:{y=t(qe(y,"DATA"));for(var B=y.next();!B.done;B=y.next())if(B=re(B.value,"KID")){y=Lc(oe(B));y=new Uint8Array([y[3],y[2],y[1],y[0],
1236
1237
  y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=Nc(y);break a}y=null}else y=null;B=Lc(oe(w));v=Mc(v.replace(/-/g,""));v=[{initData:ei(B,v,new Set,0),initDataType:"cenc",keyId:y}];v=Qc(z,"cenc",v);y&&v.keyIds.add(y);if(z=yx.get(z))v.licenseServerUri=z(w);r.push(v)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=ne(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;z=ne(w,"QualityLevel");v=l.timescale;y=l.duration;B=ne(w,"c");for(var A=[],C=0,D=0;D<B.length;++D){var E=B[D],F=B[D+1],K=ue(E,"t",Ce),
1237
1238
  G=ue(E,"d",Ce);E=ue(E,"r",Ae);if(!G)break;K=null!=K?K:C;(E=E||0)&&E--;if(0>E)if(F){F=ue(F,"t",Ce);if(null==F)break;else if(K>=F)break;E=Math.ceil((F-K)/G)-1}else{if(Infinity==y)break;else if(K/v>=y)break;E=Math.ceil((y*v-K)/G)-1}for(F=0;F<=E;++F)C=K+G,A.push({start:K/v,end:C/v,nh:K}),K=C}v=A;z=t(z);for(y=z.next();!y.done;y=z.next())(y=ny(a,w,y.value,v,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Wc||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<
@@ -1245,7 +1246,7 @@ null;if(!py.includes(e.toUpperCase()))return cb("Codec not supported:",e),null;c
1245
1246
  a.m.set(v.id,z);z=ty(a,new dj(function(){return[]},0,null,$l(v),v.mssPrivateData.timescale,z),v,b,d);v.segmentIndex=new ul(z);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
1246
1247
  function qy(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1247
1248
  b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ry(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function sy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1248
- function ty(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={qf:void 0},g=e.next())h.qf=g.value,d.push(new fj(h.qf.start,h.qf.end,function(k){return function(){return Pc(a.l,[f.replace("{start time}",String(k.qf.nh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",ky);var py="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),oy={CAPT:"main",SUBT:"alternate",DESC:"main"};
1249
+ function ty(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={pf:void 0},g=e.next())h.pf=g.value,d.push(new fj(h.pf.start,h.pf.end,function(k){return function(){return Pc(a.l,[f.replace("{start time}",String(k.pf.nh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",ky);var py="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),oy={CAPT:"main",SUBT:"alternate",DESC:"main"};
1249
1250
  Zi["application/vnd.ms-sstr+xml"]=function(){return new ky};function uy(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Dc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function vy(){}
1250
1251
  function wy(a,b,c,d,e,f){var g=new xy;Mh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new yy,k={xh:!1,Ji:!1};a=zy(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new mh(a,function(){k.xh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Yb(function(){k.Ji=!0;h.abort()});l.Y(b/1E3);a.finally(function(){l.stop()})}return a}
1251
1252
  function zy(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,w,v,z,y,B,A;return P(function(C){switch(C.g){case 1:return k=Ay,l=By,r=p=0,u=Date.now(),ta(C,2),H(C,k(a,c),4);case 4:m=C.h;f(Cy(m.headers));if("HEAD"==c.method){C.A(5);break}w=m.clone().body.getReader();z=(v=m.headers.get("Content-Length"))?parseInt(v,10):0;y=function(D){function E(){var F,K,G,J;return P(function(M){switch(M.g){case 1:return ta(M,2),H(M,w.read(),4);case 4:F=M.h;xa(M,3);break;case 2:return ya(M),M.return();case 3:if(F.done){M.A(5);break}p+=
@@ -1261,8 +1262,8 @@ function Uy(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerr
1261
1262
  q.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function bz(a,b,c){a=Wy(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Wy(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return $y(this,this.g,a,b)};
1262
1263
  q.getManifests=function(a){var b=this,c;return P(function(d){if(1==d.g)return H(d,az(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Gd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Xy(a.h,a.g,"readonly"),c=new Map,H(d,Uy(b,function(e,f){var g;return P(function(h){if(1==h.g)return H(h,a.Gd(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?H(d,b.promise(),3):d.return(c)})};q.Dh=function(a){return a};q.Gd=function(a){return Promise.resolve(a)};
1263
1264
  function Zy(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Wy(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Qg:void 0},h=g.next())l=h.value,k.Qg=e.add(l),k.Qg.onsuccess=function(n){return function(){f.push(n.Qg.result)}}(k);return H(m,d.promise(),2)}return m.return(f)})};
1264
- function $y(a,b,c,d){a=Wy(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Cg:void 0},e=c.next())f.Cg=e.value,b.delete(f.Cg).onsuccess=function(g){return function(){return d(g.Cg)}}(f);return a.promise()}
1265
- function az(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Xy(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={gf:void 0,Pe:void 0},k=h.next())l.Pe=k.value,l.gf=e.get(l.Pe),l.gf.onsuccess=function(n){return function(){void 0==n.gf.result&&g.push(n.Pe);f[n.Pe]=n.gf.result}}(l);return H(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function cz(a){this.g=new Vy(a)}cz.prototype.destroy=function(){return this.g.destroy()};cz.prototype.getAll=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Xy(a.g,"session-ids","readonly"),c=[],H(d,Uy(b,function(e,f){c.push(f)}),2)):3!=d.g?H(d,b.promise(),3):d.return(c)})};cz.prototype.add=function(a){var b=Wy(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1265
+ function $y(a,b,c,d){a=Wy(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Bg:void 0},e=c.next())f.Bg=e.value,b.delete(f.Bg).onsuccess=function(g){return function(){return d(g.Bg)}}(f);return a.promise()}
1266
+ function az(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Xy(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ef:void 0,Pe:void 0},k=h.next())l.Pe=k.value,l.ef=e.get(l.Pe),l.ef.onsuccess=function(n){return function(){void 0==n.ef.result&&g.push(n.Pe);f[n.Pe]=n.ef.result}}(l);return H(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function cz(a){this.g=new Vy(a)}cz.prototype.destroy=function(){return this.g.destroy()};cz.prototype.getAll=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Xy(a.g,"session-ids","readonly"),c=[],H(d,Uy(b,function(e,f){c.push(f)}),2)):3!=d.g?H(d,b.promise(),3):d.return(c)})};cz.prototype.add=function(a){var b=Wy(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1266
1267
  cz.prototype.remove=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Wy(b.g,"session-ids"),H(d,Uy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):H(d,c.promise(),0)})};function dz(){this.g=new Map}dz.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};dz.prototype.init=function(){var a=this;ez.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1267
1268
  function fz(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ob:d,fb:f},fb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function gz(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ob:d,fb:f},e)})})}
1268
1269
  function hz(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function iz(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function jz(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
@@ -1291,7 +1292,7 @@ function Az(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t
1291
1292
  b.next())for(g=e.value,e=Bz(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Bz(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
1292
1293
  function Bz(a,b,c){var d=b.segments.map(function(e){return Cz(a,e,b)});c.Vd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ul(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1293
1294
  null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([zf(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1}}
1294
- function Cz(a,b,c){var d=new wz("segment",a.h,a.g,b.dataKey);a=new fj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Dz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.pf(b.thumbnailSprite);return a}function Dz(a,b){var c=new wz("segment",a.h,a.g,b);return new dj(function(){return[c.toString()]},0,null)};function Ez(){this.g=null}q=Ez.prototype;q.configure=function(){};
1295
+ function Cz(a,b,c){var d=new wz("segment",a.h,a.g,b.dataKey);a=new fj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Dz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.nf(b.thumbnailSprite);return a}function Dz(a,b){var c=new wz("segment",a.h,a.g,b);return new dj(function(){return[c.toString()]},0,null)};function Ez(){this.g=null}q=Ez.prototype;q.configure=function(){};
1295
1296
  q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=xz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new dz;ua(m,2);return H(m,e.init(),4);case 4:return H(m,hz(e,d.Ob(),d.fb()),5);case 5:return f=m.h,H(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new yz(d.Ob(),d.fb()),l=zz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return za(m),H(m,e.destroy(),7);case 7:Aa(m,0)}})};q.stop=function(){return Promise.resolve()};
1296
1297
  q.update=function(){};
1297
1298
  q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new dz,ta(m,2,3),H(m,e.init(),5);case 5:return H(m,hz(e,d.Ob(),d.fb()),6);case 6:return f=m.h,H(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.A(3);break}return H(m,f.updateManifestExpiration(d.key(),b),3);case 3:return za(m),H(m,e.destroy(),10);case 10:Aa(m,0);break;case 2:ya(m),m.A(3)}})};
@@ -1302,7 +1303,7 @@ h.g)return ta(h,2),H(h,zi(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);I(h)}
1302
1303
  function Mz(a){var b=[],c=Ig(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(yg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(zg(c.value));return b};function Oz(){this.g={}}function Pz(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 Qz(a,b){a.g[b.id]=b.bandwidth||2048}function Rz(a,b){a=a.g[b];null==a&&(a=0);return a};function Sz(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Hb()):(this.h=bn(),this.g=new vh);this.i=[];this.j=[];var c=!a;this.l=new Kh(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return H(k,Promise.all(b.j.map(function(l){return Oy(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return H(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return H(k,b.g.destroy(),4);
1303
1304
  case 4:b.h=null,b.g=null,I(k)}})});this.m=1E9}function Tz(){if(Zb())a:{var a=t(ez.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=Sz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tm(a,b));return fn(this.h,a)};q.getConfiguration=function(){var a=bn();fn(a,this.h,bn());return a};q.Hb=function(){return this.g};
1304
1305
  q.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new Ny(this.g);this.j.push(h);b=Uz(this,a,b||{},d||[],e||[],function(){var k;return P(function(l){if(1==l.g)return c?l.A(2):H(l,Bn(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Yi(a,c||null);return l.return(k())})},g,h);b=new mh(b,function(){return Oy(h)});b.finally(function(){Qd(f.j,h)});return Vz(this,b)};
1305
- function Uz(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O;return P(function(L){switch(L.g){case 1:return Wz(),l=k=null,m=new dz,r=p=n=null,ta(L,2,3),H(L,f(),5);case 5:return k=L.h,H(L,Xz(a,b,k,g),6);case 6:u=L.h;Yz(a);w=!u.presentationTimeline.T()&&!u.presentationTimeline.Pc();if(!w)throw new U(2,9,9005,b);v=t(d);z=v.next();case 7:if(z.done){L.A(9);break}y=z.value;return H(L,Zz(a,y,u),10);case 10:B=L.h;u.imageStreams.push(B);Yz(a);z=v.next();L.A(7);break;case 9:A=t(e),C=A.next();
1306
+ function Uz(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,w,v,z,y,B,A,C,D,E,F,K,G,J,M,O;return P(function(L){switch(L.g){case 1:return Wz(),l=k=null,m=new dz,r=p=n=null,ta(L,2,3),H(L,f(),5);case 5:return k=L.h,H(L,Xz(a,b,k,g),6);case 6:u=L.h;Yz(a);w=!u.presentationTimeline.T()&&!u.presentationTimeline.Rc();if(!w)throw new U(2,9,9005,b);v=t(d);z=v.next();case 7:if(z.done){L.A(9);break}y=z.value;return H(L,Zz(a,y,u),10);case 10:B=L.h;u.imageStreams.push(B);Yz(a);z=v.next();L.A(7);break;case 9:A=t(e),C=A.next();
1306
1307
  case 11:if(C.done)return H(L,a.cd(u,function(N){r=r||N},g),15);D=C.value;return H(L,$z(a,u,D.uri,D.language,D.kind,D.mime,D.codecs),14);case 14:E=L.h;u.textStreams.push(E);Yz(a);C=A.next();L.A(11);break;case 15:l=L.h;Yz(a);if(r)throw r;return H(L,aA(u,l,g),16);case 16:return H(L,m.init(),17);case 17:return Yz(a),H(L,fz(m),18);case 18:return n=L.h,Yz(a),F=bA(l,u,b,c,g,h),K=F.bk,G=F.kh,H(L,n.fb.addManifests([K]),19);case 19:J=L.h;Yz(a);p=J[0];Yz(a);if(r)throw r;return H(L,cA(a,G,p,K,h,g,n.fb,u,l),20);
1307
1308
  case 20:return Yz(a),dA(u,K,l,g),H(L,n.fb.updateManifest(p,K),21);case 21:return Yz(a),M=new wz("manifest",n.path.Ob,n.path.fb,p),L.return(Nz(M,K));case 3:return za(L),H(L,m.destroy(),22);case 22:if(!k){L.A(23);break}return H(L,k.stop(),23);case 23:if(!l){L.A(25);break}return H(L,l.destroy(),25);case 25:Aa(L,0);break;case 2:O=ya(L);if(null==p){L.A(27);break}return H(L,eA(p),27);case 27:throw r||O;}})}
1308
1309
  function cA(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,w,v,z,y;return P(function(B){switch(B.g){case 1:l={};m=0;n=function(A,C){var D,E,F,K,G,J,M;return P(function(O){if(1==O.g){D=t(A);E=D.next();for(F={};!E.done;F={fd:void 0},E=D.next())F.fd=E.value,K=Ky(F.fd,f),G=F.fd.i,J=F.fd.h,M=function(L){return function(N){var Q,R,Y;return P(function(pa){if(1==pa.g)return H(pa,g.addSegments([{data:N}]),2);Q=pa.h;Yz(a);R=L.fd.g;Y=Jy(R);l[Y]=Q[0];m+=N.byteLength;I(pa)})}}(F),Qy(e,F.fd.groupId,K,G,J,M);return H(O,Sy(e),
@@ -1323,8 +1324,8 @@ function sA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:r
1323
1324
  q.list=function(){return lA(this,tA())};function tA(){var a,b,c;return P(function(d){switch(d.g){case 1:return Wz(),a=[],b=new dz,ua(d,2),H(d,b.init(),4);case 4:return c=Promise.resolve(),gz(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return H(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Nz(new wz("manifest",e.Ob,e.fb,l),k);a.push(k)});I(h)})})}),H(d,c,2);case 2:return za(d),H(d,b.destroy(),6);case 6:Aa(d,3);break;case 3:return d.return(a)}})}
1324
1325
  function Xz(a,b,c,d){var e,f,g,h,k;return P(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,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(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
1325
1326
  onMetadata:function(){},disableStream:function(){},addFont:function(){}},c.configure(d.manifest),Yz(a),H(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Yz(a),k=uA(h),H(l,Promise.all(kb(k,function(m){return m.createSegmentIndex()})),3);Yz(a);if(e)throw e;return l.return(h)})}
1326
- function Zz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z;return P(function(y){switch(y.g){case 1:return H(y,vA(a,b),2);case 2:d=y.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return H(y,wA(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=Of[d];if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Jb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);p=n.next();for(r={};!p.done;r={xf:void 0,ed:void 0},p=n.next())r.ed=p.value,r.xf=null,
1327
- u=function(B){return function(){null==B.xf&&(B.xf=Pc([b],[B.ed.payload]));return B.xf||[]}}(r),w=new fj(r.ed.startTime,r.ed.endTime,u,0,null,null,0,0,Infinity),r.ed.payload.includes("#xywh")&&(v=r.ed.payload.split("#xywh=")[1].split(","),4===v.length&&w.pf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);z=d;if(!m.length){y.A(4);break}return H(y,Bn(m[0].R()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++,
1327
+ function Zz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z;return P(function(y){switch(y.g){case 1:return H(y,vA(a,b),2);case 2:d=y.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return H(y,wA(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=Of[d];if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Jb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);p=n.next();for(r={};!p.done;r={wf:void 0,ed:void 0},p=n.next())r.ed=p.value,r.wf=null,
1328
+ u=function(B){return function(){null==B.wf&&(B.wf=Pc([b],[B.ed.payload]));return B.wf||[]}}(r),w=new fj(r.ed.startTime,r.ed.endTime,u,0,null,null,0,0,Infinity),r.ed.payload.includes("#xywh")&&(v=r.ed.payload.split("#xywh=")[1].split(","),4===v.length&&w.nf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);z=d;if(!m.length){y.A(4);break}return H(y,Bn(m[0].R()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++,
1328
1329
  originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ul(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([zf(z||"","")]),
1329
1330
  isAudioMuxedInVideo:!1})}})}
1330
1331
  function $z(a,b,c,d,e,f,g){var h,k,l;return P(function(m){if(1==m.g)return f?m.A(2):H(m,vA(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wl(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:Wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
@@ -1400,7 +1401,7 @@ p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.period
1400
1401
  k&&k.attributes["xml:id"]){var C=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==C})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=CC(l,"region",f,"")[0]);FC(b,u,g,w,v,e,a,0==h.length);return b}
1401
1402
  function zC(a,b,c){var d=new Md,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=GC.exec(c)||HC.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=IC(a,b,"extent");if(g){var h=(f=GC.exec(g))||HC.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Nd:0,d.heightUnits=f||null!=e?Nd:0)}if(a=IC(a,b,"origin"))if(h=(f=GC.exec(a))||HC.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
1402
1403
  d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Nd,d.height=100-d.viewportAnchorY,d.heightUnits=Nd):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Nd:0;return d}function JC(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
1403
- function FC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==KC(b,c,f,"direction",g)&&(a.direction="rtl");h=KC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Se);(h=KC(b,c,f,"textAlign",!0))?(a.positionAlign=LC[h],a.lineAlign=MC[h],a.textAlign=mf[h.toUpperCase()]):a.textAlign=Re;if(h=KC(b,c,f,"displayAlign",!0))a.displayAlign=nf[h.toUpperCase()];if(h=KC(b,c,f,"color",g))a.color=JC(h);if(h=KC(b,c,f,"backgroundColor",
1404
+ function FC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==KC(b,c,f,"direction",g)&&(a.direction="rtl");h=KC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Se);(h=KC(b,c,f,"textAlign",!0))?(a.positionAlign=LC[h],a.lineAlign=MC[h],a.textAlign=mf[h.toUpperCase()]):a.textAlign=Qe;if(h=KC(b,c,f,"displayAlign",!0))a.displayAlign=nf[h.toUpperCase()];if(h=KC(b,c,f,"color",g))a.color=JC(h);if(h=KC(b,c,f,"backgroundColor",
1404
1405
  g))a.backgroundColor=JC(h);if(h=KC(b,c,f,"border",g))a.border=h;if(h=KC(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
1405
1406
  k}).join(",")}(h=KC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=jf);h=KC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=KC(b,c,f,"lineHeight",g))&&h.match(NC)&&(a.lineHeight=h);(h=KC(b,c,f,"fontSize",g))&&(h.match(NC)||h.match(OC))&&(a.fontSize=h);if(h=KC(b,c,f,"fontStyle",g))a.fontStyle=pf[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=oe(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1406
1407
  e);if(d=KC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(NC)?a.textStrokeColor=a.color:(a.textStrokeColor=JC(d[0]),d.shift()),d[0]&&d[0].match(NC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=KC(b,c,f,"letterSpacing",g))&&d.match(NC)&&(a.letterSpacing=d);(d=KC(b,c,f,"linePadding",g))&&d.match(NC)&&(a.linePadding=d);if(d=KC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=IC(c,f,"textDecoration"))&&PC(a,d);(d=QC(b,f,"textDecoration"))&&PC(a,d);if(d=KC(b,c,f,"textCombine",g))a.textCombineUpright=
@@ -1410,7 +1411,7 @@ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.inclu
1410
1411
  function RC(a,b,c){a=CC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ve(a[e],"urn:ebu:tt:style",c);f||(f=we(a[e],wC,c));f||(f=QC(a[e],b,c));f&&(d=f)}return d}function CC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ve(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
1411
1412
  function EC(a,b,c,d){a=DC(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function DC(a,b){var c=SC(a.attributes.begin,b),d=SC(a.attributes.end,b);a=SC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1412
1413
  function SC(a,b){var c=null;if(TC.test(a)){a=TC.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(UC.test(a))c=VC(UC,a);else if(WC.test(a))c=VC(WC,a);else if(XC.test(a))a=XC.exec(a),c=Number(a[1])/b.frameRate;else if(YC.test(a))a=YC.exec(a),c=Number(a[1])/b.g;else if(ZC.test(a))c=VC(ZC,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
1413
- function VC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function yC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Gc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",uC);uC.prototype.parseMedia=uC.prototype.parseMedia;uC.prototype.setManifestType=uC.prototype.setManifestType;uC.prototype.setSequenceMode=uC.prototype.setSequenceMode;uC.prototype.parseInit=uC.prototype.parseInit;
1414
+ function VC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function yC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",uC);uC.prototype.parseMedia=uC.prototype.parseMedia;uC.prototype.setManifestType=uC.prototype.setManifestType;uC.prototype.setSequenceMode=uC.prototype.setSequenceMode;uC.prototype.parseInit=uC.prototype.parseInit;
1414
1415
  function xC(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1415
1416
  var GC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,OC=/^(\d{1,4}(?:\.\d+)?|100)%$/,NC=/^(\d+px|\d+em|\d*\.?\d+c)$/,HC=/^(\d+)px (\d+)px$/,TC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,UC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,WC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,XC=/^(\d*(?:\.\d*)?)f$/,YC=/^(\d*(?:\.\d*)?)t$/,ZC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),MC={left:Ve,center:"center",right:"end",start:Ve,
1416
1417
  end:"end"},LC={left:"line-left",center:"center",right:"line-right"},vC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],wC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],BC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Of["application/ttml+xml"]=function(){return new uC};function $C(){this.g=new uC}$C.prototype.parseInit=function(a){var b=!1;(new Rh).box("moov",Yh).box("trak",Yh).box("mdia",Yh).box("minf",Yh).box("stbl",Yh).X("stsd",$h).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};$C.prototype.setSequenceMode=function(){};$C.prototype.setManifestType=function(){};
@@ -1423,11 +1424,11 @@ d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split(
1423
1424
  h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Oe(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=
1424
1425
  r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=jf;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Ye;break;case "italic":m=!0;l.fontStyle=kf;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||
1425
1426
  "STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Ud(l[0]),g=Yd(h),n=Wd(h,/[ \t]+--\x3e[ \t]+/g),k=Yd(h),null==g||null==n||null==k)cb("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Oe(g,k,m);Vd(h);for(g=Xd(h);g;)bD(l,g,b),Vd(h),g=Xd(h);af(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
1426
- function bD(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Re:a.textAlign=mf[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1427
+ function bD(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qe:a.textAlign=mf[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1427
1428
  b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pe);else if(d=/^region:(.*)$/.exec(b)){if(b=cD(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=of[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ue,a.line=Number(c[1]),c[2]&&(a.lineAlign=of[c[2].toUpperCase()])}
1428
1429
  function cD(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",aD);aD.prototype.parseMedia=aD.prototype.parseMedia;aD.prototype.setManifestType=aD.prototype.setManifestType;aD.prototype.setSequenceMode=aD.prototype.setSequenceMode;aD.prototype.parseInit=aD.prototype.parseInit;Of["text/vtt"]=function(){return new aD};Of['text/vtt; codecs="vtt"']=function(){return new aD};Of['text/vtt; codecs="wvtt"']=function(){return new aD};function dD(){this.g=null}dD.prototype.parseInit=function(a){var b=this,c=!1;(new Rh).box("moov",Yh).box("trak",Yh).box("mdia",Yh).X("mdhd",function(d){d=Cj(d.reader,d.version);b.g=d.timescale}).box("minf",Yh).box("stbl",Yh).X("stsd",$h).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};dD.prototype.setSequenceMode=function(){};dD.prototype.setManifestType=function(){};
1429
1430
  dD.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Rh).box("moof",Yh).box("traf",Yh).X("tfdt",function(B){g=!0;c=Bj(B.reader,B.version).baseMediaDecodeTime}).X("tfhd",function(B){l=Aj(B.reader,B.flags).Id}).X("trun",function(B){h=!0;d=Dj(B.reader,B.version,B.flags).oi}).box("mdat",ci(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Oh(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1430
- p.value;var r=p.Tg||l,u=p.hf?c+p.hf:a;a=u+(r||0);var w=0;do{var v=m.V();w+=v;var z=m.V(),y=null;"vttc"==Xh(z)?8<v&&(y=m.Rb(v-8)):m.skip(v-8);r&&y&&(v=eD(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Xf)};function eD(a,b,c){var d,e,f;(new Rh).box("payl",ci(function(g){d=Ac(g)})).box("iden",ci(function(g){e=Ac(g)})).box("sttg",ci(function(g){f=Ac(g)})).parse(a);return d?fD(d,e,f,b,c):null}
1431
+ p.value;var r=p.Tg||l,u=p.gf?c+p.gf:a;a=u+(r||0);var w=0;do{var v=m.V();w+=v;var z=m.V(),y=null;"vttc"==Xh(z)?8<v&&(y=m.Rb(v-8)):m.skip(v-8);r&&y&&(v=eD(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Xf)};function eD(a,b,c){var d,e,f;(new Rh).box("payl",ci(function(g){d=Ac(g)})).box("iden",ci(function(g){e=Ac(g)})).box("sttg",ci(function(g){f=Ac(g)})).parse(a);return d?fD(d,e,f,b,c):null}
1431
1432
  function fD(a,b,c,d,e){a=new Oe(d,e,a);af(a);b&&(a.id=b);if(c)for(b=new Ud(c),c=Xd(b);c;)bD(a,c,[]),Vd(b),c=Xd(b);return a}S("shaka.text.Mp4VttParser",dD);dD.prototype.parseMedia=dD.prototype.parseMedia;dD.prototype.setManifestType=dD.prototype.setManifestType;dD.prototype.setSequenceMode=dD.prototype.setSequenceMode;dD.prototype.parseInit=dD.prototype.parseInit;Of['application/mp4; codecs="wvtt"']=function(){return new dD};function gD(){}gD.prototype.parseInit=function(){};gD.prototype.setSequenceMode=function(){};gD.prototype.setManifestType=function(){};gD.prototype.parseMedia=function(a){var b=Ac(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ud(c[0]),e=Yd(d),f=Wd(d,/,/g);d=Yd(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Oe(e,d,c.slice(1).join("\n").trim()))}return a};
1432
1433
  S("shaka.text.SbvTextParser",gD);gD.prototype.parseMedia=gD.prototype.parseMedia;gD.prototype.setManifestType=gD.prototype.setManifestType;gD.prototype.setSequenceMode=gD.prototype.setSequenceMode;gD.prototype.parseInit=gD.prototype.parseInit;Of["text/x-subviewer"]=function(){return new gD};function hD(){this.g=new aD}hD.prototype.parseInit=function(){};hD.prototype.setSequenceMode=function(){};hD.prototype.setManifestType=function(){};hD.prototype.parseMedia=function(a,b,c){a=Ac(a);a=iD(a);a=Jb(Ec(a));return this.g.parseMedia(a,b,c,[])};
1433
1434
  function iD(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",hD);hD.srt2webvtt=iD;hD.prototype.parseMedia=hD.prototype.parseMedia;
@@ -1435,8 +1436,8 @@ hD.prototype.setManifestType=hD.prototype.setManifestType;hD.prototype.setSequen
1435
1436
  jD.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Ac(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=kD.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=lD.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(mD);else if("Style"==a){a=f.split(mD);f={};for(var g=0;g<e.length&&
1436
1437
  g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Di:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=lD.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(mD);else if("Dialogue"==f){g=g.split(mD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=nD(f.Start);var k=nD(f.End);g=new Oe(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Di=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1437
1438
  l.Di}}(a)))&&oD(g,a);e.push(g)}return e};
1438
- function oD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=pD(c))a.color=c;if(c=b.BackColour)if(c=pD(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=jf);b.Italic&&(a.fontStyle=kf);b.Underline&&a.textDecoration.push(lf);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=We;a.textAlign="start";break;case 2:a.displayAlign=We;a.textAlign=Re;break;case 3:a.displayAlign=We;a.textAlign="end";break;case 5:a.displayAlign=
1439
- "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Re;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Re;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function pD(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
1439
+ function oD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=pD(c))a.color=c;if(c=b.BackColour)if(c=pD(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=jf);b.Italic&&(a.fontStyle=kf);b.Underline&&a.textDecoration.push(lf);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=We;a.textAlign="start";break;case 2:a.displayAlign=We;a.textAlign=Qe;break;case 3:a.displayAlign=We;a.textAlign="end";break;case 5:a.displayAlign=
1440
+ "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qe;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Qe;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function pD(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
1440
1441
  function nD(a){a=qD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",jD);jD.prototype.parseMedia=jD.prototype.parseMedia;jD.prototype.setManifestType=jD.prototype.setManifestType;jD.prototype.setSequenceMode=jD.prototype.setSequenceMode;jD.prototype.parseInit=jD.prototype.parseInit;var kD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,lD=/^\s*([^:]+):\s*(.*)/,mD=/\s*,\s*/,qD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
1441
1442
  Of["text/x-ssa"]=function(){return new jD};function rD(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Je:c,ra:a}:null}function sD(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
1442
1443
  function tD(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
@@ -1455,15 +1456,15 @@ size:l.ra,duration:1536,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}});f+=l.ra}a=M
1455
1456
  AD.prototype.getOriginalMimeType=AD.prototype.getOriginalMimeType;AD.prototype.convertCodecs=AD.prototype.convertCodecs;AD.prototype.isSupported=AD.prototype.isSupported;AD.prototype.destroy=AD.prototype.destroy;rf("audio/ec3",function(){return new AD("audio/ec3")},xf);function BD(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new Jj(b.data),d=Rj(c);Rj(c);Rj(c);Oj(c);if(CD.includes(d)&&(d=W(c),3===d&&Lj(c,1),Oj(c),Oj(c),Lj(c,1),Qj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Qj(c)&&(6>e?Sj(c,16):Sj(c,64))}Oj(c);d=W(c);if(0===d)W(c);else if(1===d)for(Lj(c,1),Oj(c),Oj(c),d=W(c),e=0;e<d;e++)Oj(c);Oj(c);Lj(c,1);var f=W(c),g=W(c),h=Mj(c,1);0===h&&Lj(c,1);Lj(c,1);var k=0,l=0,m=0,n=0;
1456
1457
  Qj(c)&&(k=W(c),l=W(c),m=W(c),n=W(c));e=d=1;if(Qj(c)&&Qj(c)){var p=Rj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Mj(c,16),e=Mj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
1457
1458
  k[5],255,225].concat(k,[1],b));return{height:c,width:f,Sa:a,Xa:d,$a:e}}
1458
- function DD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=Vj(new Jj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1459
- {data:Oc.apply(Ic,x(c)),Rd:b}:null}var CD=[100,110,122,244,44,83,86,118,128,138,139,134];function ED(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=FD(b.fullData);a=GD(c.fullData);var f=HD(d.fullData);b=ID(b.fullData,c.fullData,d.fullData,{Ig:e.Ig,ih:e.ih,kg:a.kg,lg:a.lg,eg:a.eg,jg:a.jg,fg:a.fg,gg:a.gg,hg:a.hg,ig:a.ig,Yf:a.Yf,Zf:a.Zf,$f:a.$f,ag:a.ag,cg:a.cg,dg:a.dg,Rf:a.Rf,We:a.We,Pf:a.Pf,Lf:a.Lf,Kf:a.Kf,Lg:f.Lg});return{height:a.height,width:a.width,
1460
- Sa:b,Xa:a.Ek,$a:a.Dk}}function FD(a){var b=new Jj(a,!0);Rj(b);Rj(b);Mj(b,4);Mj(b,2);Mj(b,6);a=Mj(b,3);b=Qj(b);return{Ig:a+1,ih:b}}
1459
+ function DD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=Tj(new Jj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1460
+ {data:Oc.apply(Ic,x(c)),Rd:b}:null}var CD=[100,110,122,244,44,83,86,118,128,138,139,134];function ED(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=FD(b.fullData);a=GD(c.fullData);var f=HD(d.fullData);b=ID(b.fullData,c.fullData,d.fullData,{Hg:e.Hg,ih:e.ih,jg:a.jg,kg:a.kg,dg:a.dg,ig:a.ig,eg:a.eg,fg:a.fg,gg:a.gg,hg:a.hg,Xf:a.Xf,Yf:a.Yf,Zf:a.Zf,$f:a.$f,ag:a.ag,cg:a.cg,Qf:a.Qf,We:a.We,Of:a.Of,Kf:a.Kf,Jf:a.Jf,Kg:f.Kg});return{height:a.height,width:a.width,
1461
+ Sa:b,Xa:a.Ek,$a:a.Dk}}function FD(a){var b=new Jj(a,!0);Rj(b);Rj(b);Mj(b,4);Mj(b,2);Mj(b,6);a=Mj(b,3);b=Qj(b);return{Hg:a+1,ih:b}}
1461
1462
  function GD(a){a=new Jj(a,!0);Rj(a);Rj(a);var b=0,c=0,d=0,e=0;Mj(a,4);var f=Mj(a,3);Qj(a);for(var g=Mj(a,2),h=Mj(a,1),k=Mj(a,5),l=Rj(a),m=Rj(a),n=Rj(a),p=Rj(a),r=Rj(a),u=Rj(a),w=Rj(a),v=Rj(a),z=Rj(a),y=Rj(a),B=Rj(a),A=[],C=[],D=0;D<f;D++)A.push(Qj(a)),C.push(Qj(a));if(0<f)for(D=f;8>D;D++)Mj(a,2);for(D=0;D<f;D++)A[D]&&Mj(a,88),C[D]&&Rj(a);W(a);A=W(a);3==A&&Mj(a,1);C=W(a);D=W(a);Qj(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var E=W(a),F=W(a),K=W(a);if(Qj(a))for(var G=0;G<=f;G++)W(a),W(a),W(a);else W(a),
1462
1463
  W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(Qj(a)&&Qj(a))for(G=0;4>G;G++)for(var J=0;J<(3===G?2:6);J++)if(Qj(a)){var M=Math.min(64,1<<4+(G<<1));1<G&&Pj(a);for(var O=0;O<M;O++)Pj(a)}else W(a);Qj(a);Qj(a);Qj(a)&&(Rj(a),W(a),W(a),Qj(a));G=W(a);for(M=J=0;M<G;M++)if(O=!1,0!==M&&(O=Qj(a)),O){M===G&&W(a);Qj(a);W(a);for(var L=O=0;L<=J;L++){var N=Qj(a),Q=!1;N||(Q=Qj(a));(N||Q)&&O++}J=O}else{L=W(a);O=W(a);J=L+O;for(N=0;N<L;N++)W(a),Qj(a);for(L=0;L<O;L++)W(a),Qj(a)}if(Qj(a))for(G=W(a),J=0;J<G;J++){for(M=0;M<
1463
1464
  K+4;M++)Mj(a,1);Mj(a,1)}G=K=1;J=0;Qj(a);Qj(a);if(Qj(a)){Qj(a)&&(M=Rj(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(K=O[M-1],G=L[M-1]):255===M&&(K=Mj(a,16),G=Mj(a,16)));Qj(a)&&Qj(a);Qj(a)&&(Mj(a,3),Qj(a),Qj(a)&&(Rj(a),Rj(a),Rj(a)));Qj(a)&&(W(a),W(a));Qj(a);Qj(a);Qj(a);if(M=Qj(a))W(a),W(a),W(a),W(a);if(Qj(a)&&(Mj(a,32),Mj(a,32),Qj(a)&&W(a),Qj(a))){L=!1;M=Qj(a);O=Qj(a);if(M||O){if(L=Qj(a))Rj(a),Mj(a,5),Qj(a),Mj(a,5);Mj(a,4);Mj(a,4);L&&
1464
- Mj(a,4);Mj(a,5);Mj(a,5);Mj(a,5)}for(N=0;N<=f;N++){var R=!0;Q=1;Qj(a)||(R=Qj(a));var Y=!1;R?W(a):Y=Qj(a);Y||(Q=W(a)+1);if(M){for(R=0;R<Q;R++)W(a),W(a),L&&(W(a),W(a));Qj(a)}if(O){for(R=0;R<Q;R++)W(a),W(a),L&&(W(a),W(a));Qj(a)}}}Qj(a)&&(Qj(a),Qj(a),Qj(a),J=W(a),W(a),W(a),W(a),W(a))}return{eg:B,kg:g,lg:h,jg:k,fg:l,gg:m,hg:n,ig:p,Yf:r,Zf:u,$f:w,ag:v,cg:z,dg:y,We:J,Rf:0,Pf:A,Lf:E,Kf:F,width:C-(b+c)*(1===A||2===A?2:1),height:D-(d+e)*(1===A?2:1),Ek:K,Dk:G}}
1465
- function HD(a){var b=new Jj(a,!0);Rj(b);Rj(b);W(b);W(b);Qj(b);Qj(b);Mj(b,3);Qj(b);Qj(b);W(b);W(b);Pj(b);Qj(b);Qj(b);Qj(b)&&W(b);Pj(b);Pj(b);Qj(b);Qj(b);Qj(b);Qj(b);a=Qj(b);b=Qj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Lg:c}}
1466
- function ID(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.kg&3)<<6|(d.lg?1:0)<<5|d.jg&31;e[2]=d.fg;e[3]=d.gg;e[4]=d.hg;e[5]=d.ig;e[6]=d.Yf;e[7]=d.Zf;e[8]=d.$f;e[9]=d.ag;e[10]=d.cg;e[11]=d.dg;e[12]=d.eg;e[13]=240|(d.We&3840)>>8;e[14]=d.We&255;e[15]=252|d.Lg&3;e[16]=252|d.Pf&3;e[17]=248|d.Lf&7;e[18]=248|d.Kf&7;e[19]=0;e[20]=0;e[21]=(d.Rf&3)<<6|(d.Ig&7)<<3|(d.ih?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1465
+ Mj(a,4);Mj(a,5);Mj(a,5);Mj(a,5)}for(N=0;N<=f;N++){var R=!0;Q=1;Qj(a)||(R=Qj(a));var Y=!1;R?W(a):Y=Qj(a);Y||(Q=W(a)+1);if(M){for(R=0;R<Q;R++)W(a),W(a),L&&(W(a),W(a));Qj(a)}if(O){for(R=0;R<Q;R++)W(a),W(a),L&&(W(a),W(a));Qj(a)}}}Qj(a)&&(Qj(a),Qj(a),Qj(a),J=W(a),W(a),W(a),W(a),W(a))}return{dg:B,jg:g,kg:h,ig:k,eg:l,fg:m,gg:n,hg:p,Xf:r,Yf:u,Zf:w,$f:v,ag:z,cg:y,We:J,Qf:0,Of:A,Kf:E,Jf:F,width:C-(b+c)*(1===A||2===A?2:1),height:D-(d+e)*(1===A?2:1),Ek:K,Dk:G}}
1466
+ function HD(a){var b=new Jj(a,!0);Rj(b);Rj(b);W(b);W(b);Qj(b);Qj(b);Mj(b,3);Qj(b);Qj(b);W(b);W(b);Pj(b);Qj(b);Qj(b);Qj(b)&&W(b);Pj(b);Pj(b);Qj(b);Qj(b);Qj(b);Qj(b);a=Qj(b);b=Qj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Kg:c}}
1467
+ function ID(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.jg&3)<<6|(d.kg?1:0)<<5|d.ig&31;e[2]=d.eg;e[3]=d.fg;e[4]=d.gg;e[5]=d.hg;e[6]=d.Xf;e[7]=d.Yf;e[8]=d.Zf;e[9]=d.$f;e[10]=d.ag;e[11]=d.cg;e[12]=d.dg;e[13]=240|(d.We&3840)>>8;e[14]=d.We&255;e[15]=252|d.Kg&3;e[16]=252|d.Of&3;e[17]=248|d.Kf&7;e[18]=248|d.Jf&7;e[19]=0;e[20]=0;e[21]=(d.Qf&3)<<6|(d.Hg&7)<<3|(d.ih?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1467
1468
  255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function JD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*KD[14*(3===c?3-d:3===d?3:4)+e-1];f=LD[3*(3===c?0:2===c?1:2)+f];c=MD[c][d];var h=ND[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ra:k,Ck:8*c*h}}return null}
1468
1469
  function OD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function PD(a,b){if(b+1<a.length&&OD(a,b)){var c=JD(a,b),d=4;c&&c.ra&&(d=c.ra);b+=d;return b===a.length||b+1<a.length&&OD(a,b)}return!1}
1469
1470
  var KD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],LD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],MD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ND=[0,1,1,4];function QD(a){this.i=a;this.h=0;this.g=new Map}q=QD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?yd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
@@ -1488,21 +1489,21 @@ m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");
1488
1489
  SD.prototype.getOriginalMimeType=SD.prototype.getOriginalMimeType;SD.prototype.convertCodecs=SD.prototype.convertCodecs;SD.prototype.isSupported=SD.prototype.isSupported;SD.prototype.destroy=SD.prototype.destroy;var UD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);rf("mss/audio/mp4",function(){return new SD("mss/audio/mp4")},xf);rf("mss/video/mp4",function(){return new SD("mss/video/mp4")},xf);function WD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=WD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1489
1490
  q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Kf(c).split(",");c=Uc("audio",d);d=Uc("video",d);if(c&&(c=Gf(c),!XD.includes(c))||d&&(c=Gf(d),!YD.includes(c)))return!1;if(b)return yd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return yd(b)||yd(a)};
1490
1491
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Kf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return pg(c,"audio/mp4")}).map(og).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1491
- q.transmux=function(a,b,c,d,e){var f=Jb(a);if("audio"==e&&!ek(f)){for(var g=zj(f),h=g.length;h<f.length;h++)if(PD(f,h))return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(tD(f,h))return this.h||(this.h=new vD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new Wj;var k=this.j.parse(f),l=[],m=k.Jd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],w=k.Lc();
1492
+ q.transmux=function(a,b,c,d,e){var f=Jb(a);if("audio"==e&&!ek(f)){for(var g=zj(f),h=g.length;h<f.length;h++)if(PD(f,h))return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(tD(f,h))return this.h||(this.h=new vD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new Wj;var k=this.j.parse(f),l=[],m=k.Jd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],w=k.Nc();
1492
1493
  if(!w.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var v=0;v<w.length;v++){var z=w[v],y=z.nalus;u.push.apply(u,x(y));var B=DD(y);if(B){null==r&&(r=z.dts);var A=void 0;A=v+1<w.length?(w[v+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:B.data,size:B.data.byteLength,duration:A,zb:Math.round((z.pts||0)-(z.dts||0)),flags:{Ab:0,sb:0,rb:0,pb:0,qb:B.Rd?2:1,Bb:B.Rd?0:1}})}}var C=BD(u);if(!C||null==r)throw new U(2,3,3018,c?c.R()[0]:null);b.height=C.height;
1493
- b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,xb:[],Ea:new Uint8Array([]),Sa:C.Sa,Xa:C.Xa,$a:C.$a,data:{Sb:this.g,baseMediaDecodeTime:r,ub:p},stream:b};break;case "hvc":var D=[],E=null,F=[],K=k.Lc();if(!K.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var G=0;G<K.length;G++){var J=K[G],M=J.nalus;F.push.apply(F,x(M));for(var O=!1,L=[],N=!1,Q=t(M),R=Q.next();!R.done;R=Q.next()){var Y=R.value;switch(Y.type){case 1:case 0:var pa=
1494
+ b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,xb:[],Ea:new Uint8Array([]),Sa:C.Sa,Xa:C.Xa,$a:C.$a,data:{Sb:this.g,baseMediaDecodeTime:r,ub:p},stream:b};break;case "hvc":var D=[],E=null,F=[],K=k.Nc();if(!K.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var G=0;G<K.length;G++){var J=K[G],M=J.nalus;F.push.apply(F,x(M));for(var O=!1,L=[],N=!1,Q=t(M),R=Q.next();!R.done;R=Q.next()){var Y=R.value;switch(Y.type){case 1:case 0:var pa=
1494
1495
  N=!0;break;case 19:case 20:case 21:O=pa=N=!0;break;case 32:pa=!0;break;case 33:pa=!0;break;case 34:pa=!0;break;case 35:N=pa=!0;break;case 39:case 40:pa=!0;break;default:pa=!1}if(N&&pa){var oa=Y.fullData.byteLength,va=new Uint8Array(4);va[0]=oa>>24&255;va[1]=oa>>16&255;va[2]=oa>>8&255;va[3]=oa&255;L.push(va);L.push(Y.fullData)}}var Ea=L.length?{data:Oc.apply(Ic,x(L)),Rd:O}:null;if(Ea){null==E&&null!=J.dts&&(E=J.dts);var Ja=void 0;Ja=G+1<K.length?(K[G+1].dts||0)-(J.dts||0):1<K.length?(J.dts||0)-(K[G-
1495
1496
  1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ea.data,size:Ea.data.byteLength,duration:Ja,zb:Math.round((J.pts||0)-(J.dts||0)),flags:{Ab:0,sb:0,rb:0,pb:0,qb:Ea.Rd?2:1,Bb:Ea.Rd?0:1}})}}var $a=ED(F);if(!$a||null==E)throw new U(2,3,3018,c?c.R()[0]:null);b.height=$a.height;b.width=$a.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,xb:[],Ea:new Uint8Array([]),Sa:$a.Sa,Xa:$a.Xa,$a:$a.$a,data:{Sb:this.g,baseMediaDecodeTime:E,ub:D},stream:b}}n&&
1496
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Na=[],wa,Qa=null,Ob=t(k.tc()),Oa=Ob.next();!Oa.done;Oa=Ob.next()){var Za=Oa.value,Tc=Za.data;if(Tc){var xb=0;wa=sD(Tc,xb);if(!wa)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=wa.sampleRate;b.channelsCount=wa.channelCount;null==Qa&&null!==Za.pts&&(Qa=Za.pts);for(;xb<Tc.length;){var ed=rD(Tc,xb);if(ed){var Le=ed.Je+ed.ra;xb+Le<=Tc.length&&Na.push({data:Tc.subarray(xb+ed.Je,xb+Le),size:ed.ra,duration:1024,zb:0,flags:{Ab:0,
1497
- sb:0,rb:0,pb:0,qb:2,Bb:0}});xb+=Le}else xb++}}}if(!wa||null==Qa){if(!k.Lc().length)throw new U(2,3,3018,c?c.R()[0]:null);Qa=9E4*c.startTime;var ge=Uc("audio",b.codecs.split(","));if(!ge||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.R()[0]:null);wa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:ge};var Wf=uD(ge,b.channelsCount);if(!Wf)throw new U(2,3,3018,c?c.R()[0]:null);for(var Me=Qa+9E4*(c.endTime-c.startTime),Tj=Qa;Tj<Me;)Na.push({data:Wf,size:Wf.byteLength,
1498
- duration:1024,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),Tj+=1024/wa.sampleRate*9E4}var Gh=wa.sampleRate,Uj=Qa/9E4*Gh;n={id:b.id,type:"audio",codecs:wa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gh,duration:d,xb:[],Ea:new Uint8Array([]),Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:Uj,ub:Na},stream:b};break;case "ac3":for(var Hh=[],pc=0,Lo=new Uint8Array([]),Ck=null,Qx=t(k.tc()),Mo=Qx.next();!Mo.done;Mo=Qx.next()){var No=Mo.value,Oo=No.data;null==Ck&&null!==
1499
- No.pts&&(Ck=No.pts);for(var cg=0;cg<Oo.length;){var je=wD(Oo,cg);je?(b.audioSamplingRate=je.sampleRate,b.channelsCount=je.channelCount,pc=je.sampleRate,Lo=je.Ea,Hh.push({data:Oo.subarray(cg,cg+je.ra),size:je.ra,duration:1536,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),cg+=je.ra):cg++}}if(0==pc||0==Lo.byteLength||null==Ck)throw new U(2,3,3018,c?c.R()[0]:null);var JH=Ck/9E4*pc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:pc,duration:d,xb:[],Ea:Lo,Sa:new Uint8Array([]),
1500
- Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:JH,ub:Hh},stream:b};break;case "ec3":for(var Rx=[],Dk=0,Po=new Uint8Array([]),Ek=null,Sx=t(k.tc()),Qo=Sx.next();!Qo.done;Qo=Sx.next()){var Ro=Qo.value,So=Ro.data;null==Ek&&null!==Ro.pts&&(Ek=Ro.pts);for(var dg=0;dg<So.length;){var ke=zD(So,dg);ke?(b.audioSamplingRate=ke.sampleRate,b.channelsCount=ke.channelCount,Dk=ke.sampleRate,Po=ke.Ea,Rx.push({data:So.subarray(dg,dg+ke.ra),size:ke.ra,duration:1536,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),dg+=ke.ra):
1501
- dg++}}if(0==Dk||0==Po.byteLength||null==Ek)throw new U(2,3,3018,c?c.R()[0]:null);var KH=Ek/9E4*Dk;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Dk,duration:d,xb:[],Ea:Po,Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:KH,ub:Rx},stream:b};break;case "mp3":for(var Tx=[],Fk,Gk=null,Ux=t(k.tc()),To=Ux.next();!To.done;To=Ux.next()){var Uo=To.value,Uh=Uo.data;if(Uh){null==Gk&&null!==Uo.pts&&(Gk=Uo.pts);for(var Qe=0;Qe<Uh.length;){var eg=JD(Uh,
1502
- Qe);eg?(Fk||(Fk=eg),Qe+eg.ra<=Uh.length&&Tx.push({data:Uh.subarray(Qe,Qe+eg.ra),size:eg.ra,duration:1152,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),Qe+=eg.ra):Qe++}}}if(!Fk||null==Gk)throw new U(2,3,3018,c?c.R()[0]:null);var Vx=Fk.sampleRate,LH=Gk/9E4*Vx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vx,duration:d,xb:[],Ea:new Uint8Array([]),Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:LH,ub:Tx},stream:b};break;case "opus":var Wx=
1503
- [],Hk=null,nd=k.H;if(!nd)throw new U(2,3,3018,c?c.R()[0]:null);var Rb=[];switch(nd.Zi){case 1:case 2:Rb=[0];break;case 0:Rb=[255,1,1,0,1];break;case 128:Rb=[255,2,0,0,1];break;case 3:Rb=[1,2,1,0,2,1];break;case 4:Rb=[1,2,2,0,1,2,3];break;case 5:Rb=[1,3,2,0,4,1,2,3];break;case 6:Rb=[1,4,2,0,4,1,2,3,5];break;case 7:Rb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Rb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Rb=[1,1,2,0,1];break;case 131:Rb=[1,1,3,0,1,2];break;case 132:Rb=[1,1,4,0,1,2,3];break;case 133:Rb=[1,1,5,
1504
- 0,1,2,3,4];break;case 134:Rb=[1,1,6,0,1,2,3,4,5];break;case 135:Rb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Rb=[1,1,8,0,1,2,3,4,5,6,7]}var Xx=new Uint8Array([0,nd.channelCount,0,0,nd.sampleRate>>>24&255,nd.sampleRate>>>17&255,nd.sampleRate>>>8&255,nd.sampleRate>>>0&255,0,0].concat(x(Rb)));for(var Yx=nd.sampleRate,Zx=t(k.tc()),Vo=Zx.next();!Vo.done;Vo=Zx.next()){var Wo=Vo.value,fg=Wo.data;null==Hk&&null!==Wo.pts&&(Hk=Wo.pts);for(var Vh=0;Vh<fg.length;){for(var MH=0!==(fg[Vh+1]&16),NH=0!==(fg[Vh+1]&8),
1505
- Sd=Vh+2,Ik=0;255===fg[Sd];)Ik+=255,Sd+=1;Ik+=fg[Sd];Sd+=1;Sd+=MH?2:0;Sd+=NH?2:0;var $x=fg.slice(Sd,Sd+Ik);Wx.push({data:$x,size:$x.byteLength,duration:960,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}});Vh=Sd+Ik}}if(0==Xx.byteLength||null==Hk)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=nd.sampleRate;b.channelsCount=nd.channelCount;var OH=Hk/9E4*Yx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Yx,duration:d,xb:[],Ea:Xx,Sa:new Uint8Array([]),Xa:0,
1497
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Na=[],wa,Qa=null,Ob=t(k.tc()),Oa=Ob.next();!Oa.done;Oa=Ob.next()){var Za=Oa.value,Tc=Za.data;if(Tc){var xb=0;wa=sD(Tc,xb);if(!wa)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=wa.sampleRate;b.channelsCount=wa.channelCount;null==Qa&&null!==Za.pts&&(Qa=Za.pts);for(;xb<Tc.length;){var ed=rD(Tc,xb);if(ed){var Me=ed.Je+ed.ra;xb+Me<=Tc.length&&Na.push({data:Tc.subarray(xb+ed.Je,xb+Me),size:ed.ra,duration:1024,zb:0,flags:{Ab:0,
1498
+ sb:0,rb:0,pb:0,qb:2,Bb:0}});xb+=Me}else xb++}}}if(!wa||null==Qa){if(!k.Nc().length)throw new U(2,3,3018,c?c.R()[0]:null);Qa=9E4*c.startTime;var ge=Uc("audio",b.codecs.split(","));if(!ge||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.R()[0]:null);wa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:ge};var Wf=uD(ge,b.channelsCount);if(!Wf)throw new U(2,3,3018,c?c.R()[0]:null);for(var Ne=Qa+9E4*(c.endTime-c.startTime),Uj=Qa;Uj<Ne;)Na.push({data:Wf,size:Wf.byteLength,
1499
+ duration:1024,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),Uj+=1024/wa.sampleRate*9E4}var Gh=wa.sampleRate,Vj=Qa/9E4*Gh;n={id:b.id,type:"audio",codecs:wa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gh,duration:d,xb:[],Ea:new Uint8Array([]),Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:Vj,ub:Na},stream:b};break;case "ac3":for(var Hh=[],pc=0,Lo=new Uint8Array([]),Dk=null,Qx=t(k.tc()),Mo=Qx.next();!Mo.done;Mo=Qx.next()){var No=Mo.value,Oo=No.data;null==Dk&&null!==
1500
+ No.pts&&(Dk=No.pts);for(var cg=0;cg<Oo.length;){var je=wD(Oo,cg);je?(b.audioSamplingRate=je.sampleRate,b.channelsCount=je.channelCount,pc=je.sampleRate,Lo=je.Ea,Hh.push({data:Oo.subarray(cg,cg+je.ra),size:je.ra,duration:1536,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),cg+=je.ra):cg++}}if(0==pc||0==Lo.byteLength||null==Dk)throw new U(2,3,3018,c?c.R()[0]:null);var JH=Dk/9E4*pc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:pc,duration:d,xb:[],Ea:Lo,Sa:new Uint8Array([]),
1501
+ Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:JH,ub:Hh},stream:b};break;case "ec3":for(var Rx=[],Ek=0,Po=new Uint8Array([]),Fk=null,Sx=t(k.tc()),Qo=Sx.next();!Qo.done;Qo=Sx.next()){var Ro=Qo.value,So=Ro.data;null==Fk&&null!==Ro.pts&&(Fk=Ro.pts);for(var dg=0;dg<So.length;){var ke=zD(So,dg);ke?(b.audioSamplingRate=ke.sampleRate,b.channelsCount=ke.channelCount,Ek=ke.sampleRate,Po=ke.Ea,Rx.push({data:So.subarray(dg,dg+ke.ra),size:ke.ra,duration:1536,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),dg+=ke.ra):
1502
+ dg++}}if(0==Ek||0==Po.byteLength||null==Fk)throw new U(2,3,3018,c?c.R()[0]:null);var KH=Fk/9E4*Ek;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ek,duration:d,xb:[],Ea:Po,Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:KH,ub:Rx},stream:b};break;case "mp3":for(var Tx=[],Gk,Hk=null,Ux=t(k.tc()),To=Ux.next();!To.done;To=Ux.next()){var Uo=To.value,Uh=Uo.data;if(Uh){null==Hk&&null!==Uo.pts&&(Hk=Uo.pts);for(var Re=0;Re<Uh.length;){var eg=JD(Uh,
1503
+ Re);eg?(Gk||(Gk=eg),Re+eg.ra<=Uh.length&&Tx.push({data:Uh.subarray(Re,Re+eg.ra),size:eg.ra,duration:1152,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}}),Re+=eg.ra):Re++}}}if(!Gk||null==Hk)throw new U(2,3,3018,c?c.R()[0]:null);var Vx=Gk.sampleRate,LH=Hk/9E4*Vx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vx,duration:d,xb:[],Ea:new Uint8Array([]),Sa:new Uint8Array([]),Xa:0,$a:0,data:{Sb:this.g,baseMediaDecodeTime:LH,ub:Tx},stream:b};break;case "opus":var Wx=
1504
+ [],Ik=null,od=k.H;if(!od)throw new U(2,3,3018,c?c.R()[0]:null);var Rb=[];switch(od.Zi){case 1:case 2:Rb=[0];break;case 0:Rb=[255,1,1,0,1];break;case 128:Rb=[255,2,0,0,1];break;case 3:Rb=[1,2,1,0,2,1];break;case 4:Rb=[1,2,2,0,1,2,3];break;case 5:Rb=[1,3,2,0,4,1,2,3];break;case 6:Rb=[1,4,2,0,4,1,2,3,5];break;case 7:Rb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Rb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Rb=[1,1,2,0,1];break;case 131:Rb=[1,1,3,0,1,2];break;case 132:Rb=[1,1,4,0,1,2,3];break;case 133:Rb=[1,1,5,
1505
+ 0,1,2,3,4];break;case 134:Rb=[1,1,6,0,1,2,3,4,5];break;case 135:Rb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Rb=[1,1,8,0,1,2,3,4,5,6,7]}var Xx=new Uint8Array([0,od.channelCount,0,0,od.sampleRate>>>24&255,od.sampleRate>>>17&255,od.sampleRate>>>8&255,od.sampleRate>>>0&255,0,0].concat(x(Rb)));for(var Yx=od.sampleRate,Zx=t(k.tc()),Vo=Zx.next();!Vo.done;Vo=Zx.next()){var Wo=Vo.value,fg=Wo.data;null==Ik&&null!==Wo.pts&&(Ik=Wo.pts);for(var Vh=0;Vh<fg.length;){for(var MH=0!==(fg[Vh+1]&16),NH=0!==(fg[Vh+1]&8),
1506
+ Sd=Vh+2,Jk=0;255===fg[Sd];)Jk+=255,Sd+=1;Jk+=fg[Sd];Sd+=1;Sd+=MH?2:0;Sd+=NH?2:0;var $x=fg.slice(Sd,Sd+Jk);Wx.push({data:$x,size:$x.byteLength,duration:960,zb:0,flags:{Ab:0,sb:0,rb:0,pb:0,qb:2,Bb:0}});Vh=Sd+Jk}}if(0==Xx.byteLength||null==Ik)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=od.sampleRate;b.channelsCount=od.channelCount;var OH=Ik/9E4*Yx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Yx,duration:d,xb:[],Ea:Xx,Sa:new Uint8Array([]),Xa:0,
1506
1507
  $a:0,data:{Sb:this.g,baseMediaDecodeTime:OH,ub:Wx},stream:b}}n&&(l.push(n),n=null)}}catch(Xo){return Xo&&3023==Xo.code?Promise.resolve(new Uint8Array([])):Promise.reject(Xo)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));var ay=new zx(l),Yo=b.id+"_"+c.i;if(this.i.has(Yo))var Zo=this.i.get(Yo);else Zo=Fx(ay),this.i.set(Yo,Zo);var PH=hy(ay);this.g++;var QH=Oc(Zo,PH);return Promise.resolve(QH)};S("shaka.transmuxer.TsTransmuxer",WD);WD.prototype.transmux=WD.prototype.transmux;
1507
1508
  WD.prototype.getOriginalMimeType=WD.prototype.getOriginalMimeType;WD.prototype.convertCodecs=WD.prototype.convertCodecs;WD.prototype.isSupported=WD.prototype.isSupported;WD.prototype.destroy=WD.prototype.destroy;var XD=["aac","ac-3","ec-3","mp3","opus"],YD=["avc","hevc"];rf("video/mp2t",function(){return new WD("video/mp2t")},vf);/*
1508
1509
  @license
@@ -1579,7 +1580,7 @@ function BE(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%6
1579
1580
  !1)});this.eventManager.o(window,"click",function(){AE(c.g,!1)});GE(this)}na(FE,vE);FE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];vE.prototype.release.call(this)};function HE(a,b){IE.set(a,b)}function GE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=IE.get(c);d?a.i.push(d.create(a.g,a.controls)):cb("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",FE);
1580
1581
  FE.registerElement=HE;var IE=new Map;function JE(a,b){vE.call(this,a,b);var c=this;this.button=qj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
1581
1582
  c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?KE(c.controls):LE(c.controls)});this.ad&&(this.g(),this.h())}na(JE,vE);JE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.B.paused&&!a.W;return a};
1582
- JE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};JE.prototype.g=function(){};JE.prototype.h=function(){};S("shaka.ui.PlayButton",JE);function ME(a,b){JE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(ME,JE);ME.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};ME.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};S("shaka.ui.BigPlayButton",ME);function NE(a,b){vE.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Yb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.og()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=V("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.xc()&&(c.controls.Dd()?(d.preventDefault(),c.controls.Mc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1583
+ JE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};JE.prototype.g=function(){};JE.prototype.h=function(){};S("shaka.ui.PlayButton",JE);function ME(a,b){JE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(ME,JE);ME.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};ME.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};S("shaka.ui.BigPlayButton",ME);function NE(a,b){vE.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Yb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.ng()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=V("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.xc()&&(c.controls.Dd()?(d.preventDefault(),c.controls.Oc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1583
1584
  c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.Y(1)):(c.s=!0,c.m=Date.now(),c.j.Y(1))))});this.h=V("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=V("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}na(NE,vE);S("shaka.ui.HiddenSeekButton",NE);function OE(a,b){NE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}na(OE,NE);S("shaka.ui.HiddenFastForwardButton",OE);function PE(a,b){NE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}na(PE,NE);S("shaka.ui.HiddenRewindButton",PE);function QE(a,b,c,d){vE.call(this,a,b);var e=this;this.container=V("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.I=new Yb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1584
1585
  this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.xc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.xc()&&(e.h=!0,RE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(RE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
1585
1586
  (e.h=!1,RE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,RE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}na(QE,vE);q=QE.prototype;
@@ -1596,7 +1597,7 @@ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.b
1596
1597
  function TE(a){if(a.G.length){for(var b=a.player.Ia(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
1597
1598
  100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function XE(a){function b(){TE(a);var c=a.player.Ia();c=c.end-c.start;a.player.T()&&5<c&&a.C.Aa(.25)}a.player.Uh()?b():a.eventManager.sa(a.player,"loaded",b)}
1598
1599
  function WE(a){var b=a.player.Ia();b=b.end-b.start;return a.player.T()&&(5>b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function VE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
1599
- function ZE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A;P(function(C){switch(C.g){case 1:d=aF(a);if(!d)return UE(a),C.return();0>c&&(c=0);e=a.player.Ia();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return H(C,a.player.rg(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return UE(a),C.return();a.player.T()?(h=e.end-c,a.B.textContent=1>h?a.localization.resolve("LIVE"):"-"+$E(h)):a.B.textContent=$E(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1600
+ function ZE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A;P(function(C){switch(C.g){case 1:d=aF(a);if(!d)return UE(a),C.return();0>c&&(c=0);e=a.player.Ia();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return H(C,a.player.qg(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return UE(a),C.return();a.player.T()?(h=e.end-c,a.B.textContent=1>h?a.localization.resolve("LIVE"):"-"+$E(h)):a.B.textContent=$E(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1600
1601
  -(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.m&&p===a.m.uris[0].split("#xywh=")[0]&&g.segment.Jb()==a.m.segment.Jb()&&g.segment.Gb()==a.m.segment.Gb()){C.A(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){C.A(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);r=Ih;u=gm(g.segment.R(),g.segment.Jb(),g.segment.Gb(),a.player.getConfiguration().streaming.retryParameters);
1601
1602
  a.l=a.player.Hb().request(r,u,{type:1});return H(C,a.l.promise,7);case 7:w=C.h;a.l=null;"mjpg"==d.codecs?(v=(new Rh).box("mdat",ci(function(D){p=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),v.parse(w.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([w.data],{type:z}),p=URL.createObjectURL(y));xa(C,4);break;case 5:B=ya(C);if(7001==B.code)return C.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(D){}a.g=V("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p;
1602
1603
  a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:A=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform="scale("+A+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
@@ -1635,8 +1636,8 @@ function vF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight
1635
1636
  function xF(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.C?a.M:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=gF(),g=gF(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
1636
1637
  e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,iF(f,e,f)):a.H-=c;c=gF();e=gF();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
1637
1638
  d-k*g;c[7]=r*d-l*g;iF(f,c,f);pF(a,!1)}function yF(a,b){if(void 0===b||b)jF(a.h,a.G),a.U=0,a.B=lF(),a.B[0]=(a.h[0]-a.L[0])/20,a.B[1]=(a.h[1]-a.L[1])/20,a.B[2]=(a.h[2]-a.L[2])/20,a.B[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.B[0];a.h[1]-=a.B[1];a.h[2]-=a.B[2];a.h[3]-=a.B[3];b=gF();mF(a.h,a.h);kF(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.U?a.J=(new Yb(function(){yF(a,!1);a.H=0;a.U++;pF(a,!1)})).Y(.025):(kF(b,a.L),a.G=b)};function zF(a,b,c,d,e){jb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new td;this.h=new td;this.G=AF(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.B=0;this.l=null;this.s.o(d,"loading",function(){f.g&&yF(f.g);BF(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}BF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;BF(f)});this.s.o(d,
1638
- "unloading",function(){f.l=null;BF(f)});BF(this)}na(zF,jb);q=zF.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jb.prototype.release.call(this)};q.configure=function(a){this.u=a;BF(this)};q.Nf=function(){return!!this.G};q.Mb=function(){return!!this.g};q.Cd=function(){this.g?this.g.Cd():cb("Not playing VR content")};q.wg=function(a){this.g?xF(this.g,a*CF,0,0):cb("Not playing VR content")};
1639
- q.ug=function(a){this.g?xF(this.g,0,a*CF,0):cb("Not playing VR content")};q.vg=function(a){this.g?xF(this.g,0,0,a*CF):cb("Not playing VR content")};
1639
+ "unloading",function(){f.l=null;BF(f)});BF(this)}na(zF,jb);q=zF.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jb.prototype.release.call(this)};q.configure=function(a){this.u=a;BF(this)};q.Mf=function(){return!!this.G};q.Mb=function(){return!!this.g};q.Cd=function(){this.g?this.g.Cd():cb("Not playing VR content")};q.vg=function(a){this.g?xF(this.g,a*CF,0,0):cb("Not playing VR content")};
1640
+ q.sg=function(a){this.g?xF(this.g,0,a*CF,0):cb("Not playing VR content")};q.ug=function(a){this.g?xF(this.g,0,0,a*CF):cb("Not playing VR content")};
1640
1641
  function BF(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.C!=b&&(a.h.cb(),a.g.release(),DF(a,b)):(a.m.style.display="",DF(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.cb(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}function DF(a,b){a.G&&a.m&&(a.g=new nF(a.L,a.K,a.m,a.G,b),EF(a))}
1641
1642
  function AF(a){if(!a.m||uc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
1642
1643
  function EF(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.B=e;a.C=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.B=e;a.C=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);pF(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&FF(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
@@ -1649,26 +1650,26 @@ null);a.H&&(a.l.removeChild(a.H),a.H=null);if(!a.aa){b.A(6);break}return H(b,a.a
1649
1650
  q.configure=function(a){this.g=a;this.G.Ah(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.s&&(this.s=null);this.Ja&&(this.Ja=null);this.Ga&&(this.Ga=null);this.u&&this.u.configure(a);this.i?(sj(this.i),NF(this)):(RF(this),SF(this),this.u=new zF(this.i,this.Nb,this.m,this.C,this.g));this.l.classList.add("shaka-video-container");this.m.classList.add("shaka-video");TF(this);this.g.addBigPlayButton&&UF(this);this.g.customContextMenu&&(this.Ga=new FE(this.U,this),this.I.push(this.Ga));this.L||
1650
1651
  VF(this);this.g.seekOnTaps&&(WF(this),XF(this));this.Fa=V("div");this.Fa.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.Fa);YF(this);this.K=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,x(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));ZF(this);this.Ta=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));HF(this);a=t(this.l.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
1651
1652
  a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.j.o(b,"click",c);this.j.o(b,"dblclick",c)}};q.Zg=function(a){(this.$=a)?(this.l.setAttribute("shaka-controls","true"),this.m.tabIndex=-1,this.m.controls=!1):this.l.removeAttribute("shaka-controls");HF(this)};q.ti=function(a){this.m.controls=a;this.m.tabIndex=a?0:-1;a&&this.Zg(!1)};q.getAd=function(){return this.h};q.gj=function(){return this.G};q.uj=function(){return this.ya};q.Mj=function(){return this.l};q.wc=function(){return this.B};
1652
- q.tj=function(){return this.m};q.ld=function(){return this.C};q.sj=function(){return this.aa};q.kj=function(){return this.i};q.Dj=function(){return this.Fa};q.hj=function(){return this.H};q.ij=function(){return this.g};q.Xj=function(){return this.W};q.dh=function(a){this.W=a};q.Sj=function(){return this.qa};q.og=function(){return this.s?this.s.getValue():this.B.currentTime};q.xi=function(a){this.J=a};q.Dd=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
1653
- q.Mc=function(){this.O.Ra()};function $F(a){return!document.fullscreenEnabled||a.m.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&(navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&"xr"in navigator?!1:!0}q.Qd=function(){return $F(this)||(!this.h||!this.h.isUsingAnotherMediaElement())&&this.m.webkitSupportsFullscreen?!0:!1};
1653
+ q.tj=function(){return this.m};q.ld=function(){return this.C};q.sj=function(){return this.aa};q.kj=function(){return this.i};q.Dj=function(){return this.Fa};q.hj=function(){return this.H};q.ij=function(){return this.g};q.Xj=function(){return this.W};q.dh=function(a){this.W=a};q.Sj=function(){return this.qa};q.ng=function(){return this.s?this.s.getValue():this.B.currentTime};q.xi=function(a){this.J=a};q.Dd=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
1654
+ q.Oc=function(){this.O.Ra()};function $F(a){return!document.fullscreenEnabled||a.m.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&(navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&"xr"in navigator?!1:!0}q.Qd=function(){return $F(this)||(!this.h||!this.h.isUsingAnotherMediaElement())&&this.m.webkitSupportsFullscreen?!0:!1};
1654
1655
  q.nd=function(){if($F(this))return!!document.fullscreenElement;var a=this.m;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1655
1656
  function aG(a){var b,c,d;return P(function(e){switch(e.g){case 1:ta(e,2);if(!$F(a)){b=a.m;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.A(4);break}if(!document.pictureInPictureElement){e.A(5);break}return H(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,H(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.A(4);break}ta(e,9);return H(e,screen.orientation.lock("landscape"),11);case 11:xa(e,4,2);break;
1656
- case 9:ya(e,2);case 4:xa(e,0);break;case 2:d=ya(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),I(e)}})}function bG(a){var b;return P(function(c){if(!$F(a))return b=a.m,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.A(0);screen.orientation&&screen.orientation.unlock();return H(c,document.exitFullscreen(),0)})}q.rf=function(){var a=this;return P(function(b){return a.nd()?H(b,bG(a),0):H(b,aG(a),0)})};
1657
+ case 9:ya(e,2);case 4:xa(e,0);break;case 2:d=ya(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),I(e)}})}function bG(a){var b;return P(function(c){if(!$F(a))return b=a.m,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.A(0);screen.orientation&&screen.orientation.unlock();return H(c,document.exitFullscreen(),0)})}q.qf=function(){var a=this;return P(function(b){return a.nd()?H(b,bG(a),0):H(b,aG(a),0)})};
1657
1658
  q.Ne=function(){return this.G.Ua()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.m.disablePictureInPicture:!1};q.Oe=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
1658
1659
  q.Bd=function(){var a=this,b,c;return P(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?H(d,cG(a),5):document.pictureInPictureElement?H(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.m,H(d,b.requestPictureInPicture(),5));if(2!=d.g)return xa(d,0);c=ya(d);a.dispatchEvent(new T("error",(new Map).set("detail",c)));I(d)})};
1659
1660
  function cG(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return H(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;dG(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
1660
1661
  d.document.head.append(g);d.document.body.append(b);a.j.sa(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
1661
1662
  function dG(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.Ci=function(){AE(this.M,!0);AE(this.H,!0);this.i.setAttribute("ad-active","true")};
1662
- q.Qh=function(){AE(this.M,!1);AE(this.H,!1);this.i.removeAttribute("ad-active")};function LE(a){a.$&&a.B.duration&&(a.C.$c(),a.B.paused&&!a.W?a.B.play():a.B.pause())}function KE(a){a.h&&a.h.isPaused()?a.h.play():a.h&&a.h.pause()}
1663
- function RF(a){a.i=V("div");a.i.classList.add("shaka-controls-container");a.l.appendChild(a.i);a.l.setAttribute("shaka-controls","true");a.j.o(a.i,"touchstart",function(b){a.B.duration&&(a.xc()?a.J=Date.now():(eG(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.j.o(a.i,"click",function(){fG(a)});a.j.o(a.i,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Qd()&&a.rf()})}
1663
+ q.Qh=function(){AE(this.M,!1);AE(this.H,!1);this.i.removeAttribute("ad-active")};function LE(a){a.$&&a.B.duration&&(a.C.Hc(),a.B.paused&&!a.W?a.B.play():a.B.pause())}function KE(a){a.h&&a.h.isPaused()?a.h.play():a.h&&a.h.pause()}
1664
+ function RF(a){a.i=V("div");a.i.classList.add("shaka-controls-container");a.l.appendChild(a.i);a.l.setAttribute("shaka-controls","true");a.j.o(a.i,"touchstart",function(b){a.B.duration&&(a.xc()?a.J=Date.now():(eG(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.j.o(a.i,"click",function(){fG(a)});a.j.o(a.i,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Qd()&&a.qf()})}
1664
1665
  function UF(a){var b=V("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Ja=new ME(b,a);a.I.push(a.Ja)}function TF(a){var b=V("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function gG(a){a.M=V("div");a.M.classList.add("shaka-ad-controls");var b=null!=a.h&&a.h.isLinear();AE(a.M,b);a.P.appendChild(a.M);b=new DE(a.M,a);a.I.push(b);b=new CE(a.M,a);a.I.push(b);b=new cF(a.M,a);a.I.push(b)}
1665
1666
  function VF(a){a.L=V("div");a.L.classList.add("shaka-spinner-container");a.l.appendChild(a.L);var b=V("div");b.classList.add("shaka-spinner");a.L.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");b.setAttribute("fill",
1666
1667
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function WF(a){var b=V("div");b.classList.add("shaka-hidden-fast-forward-container");a.i.appendChild(b);a.Ya=new OE(b,a);a.I.push(a.Ya)}function XF(a){var b=V("div");b.classList.add("shaka-hidden-rewind-container");a.i.appendChild(b);a.Lb=new PE(b,a);a.I.push(a.Lb)}
1667
- function YF(a){a.P=V("div");a.P.classList.add("shaka-bottom-controls");a.P.classList.add("shaka-no-propagation");a.i.appendChild(a.P);a.j.o(a.P,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Mc()});gG(a);a.U=V("div");a.U.classList.add("shaka-controls-button-panel");a.U.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.U.classList.add("shaka-tooltips-on");a.P.appendChild(a.U);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,QF.get(c)?
1668
+ function YF(a){a.P=V("div");a.P.classList.add("shaka-bottom-controls");a.P.classList.add("shaka-no-propagation");a.i.appendChild(a.P);a.j.o(a.P,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Oc()});gG(a);a.U=V("div");a.U.classList.add("shaka-controls-button-panel");a.U.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.U.classList.add("shaka-tooltips-on");a.P.appendChild(a.U);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,QF.get(c)?
1668
1669
  (c=QF.get(c).create(a.U,a),a.I.push(c)):cb("Unrecognized control panel element requested:",c)}function ZF(a){if(a.g.addSeekBar)a.s=hG.create(a.P,a),a.I.push(a.s);else{a=t(a.K);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function SF(a){a.H=V("div");a.H.classList.add("shaka-client-side-ad-container");AE(a.H,!1);a.j.o(a.H,"click",function(){fG(a)});a.l.appendChild(a.H)}
1669
- function KF(a){a.j.o(a.C,"buffering",function(){iG(a)});iG(a);a.j.o(window,"keydown",function(b){jG(a,b)});a.j.o(window,"click",function(){return a.Mc()});a.j.o(a,"submenuopen",function(){a.Mc()});a.j.o(a.B,"play",function(){HF(a)});a.j.o(a.B,"pause",function(){HF(a)});a.j.o(a.l,"mousemove",function(b){eG(a,b)});a.j.o(a.l,"touchmove",function(b){eG(a,b)},{passive:!0});a.j.o(a.l,"touchend",function(b){eG(a,b)},{passive:!0});a.j.o(a.l,"mouseleave",function(){a.J||a.S.Ra()});a.j.o(a.G,"caststatuschanged",
1670
+ function KF(a){a.j.o(a.C,"buffering",function(){iG(a)});iG(a);a.j.o(window,"keydown",function(b){jG(a,b)});a.j.o(window,"click",function(){return a.Oc()});a.j.o(a,"submenuopen",function(){a.Oc()});a.j.o(a.B,"play",function(){HF(a)});a.j.o(a.B,"pause",function(){HF(a)});a.j.o(a.l,"mousemove",function(b){eG(a,b)});a.j.o(a.l,"touchmove",function(b){eG(a,b)},{passive:!0});a.j.o(a.l,"touchend",function(b){eG(a,b)},{passive:!0});a.j.o(a.l,"mouseleave",function(){a.J||a.S.Ra()});a.j.o(a.G,"caststatuschanged",
1670
1671
  function(){MF(a)});a.j.o(a.u,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.j.o(a.l,"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.i.contains(c)&&eG(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.s&&e&&!d&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()-c));break;
1671
- case "ArrowRight":a.s&&e&&!d&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()+c));break;case "PageDown":a.s&&e&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()-f));break;case "PageUp":a.s&&e&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()+f));break;case "Home":a.s&&kG(a,a.C.Ia().start);break;case "End":a.s&&kG(a,a.C.Ia().end);break;case "f":a.Qd()&&a.rf();break;case "m":a.h&&a.h.isLinear()?a.h.setMuted(!a.h.isMuted()):a.m.muted=!a.m.muted;break;case "p":a.Ne()&&a.Bd();break;case " ":e&&lG(a)}}});a.j.o(a.l,
1672
+ case "ArrowRight":a.s&&e&&!d&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()+c));break;case "PageDown":a.s&&e&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()-f));break;case "PageUp":a.s&&e&&0<c&&(b.preventDefault(),kG(a,a.s.getValue()+f));break;case "Home":a.s&&kG(a,a.C.Ia().start);break;case "End":a.s&&kG(a,a.C.Ia().end);break;case "f":a.Qd()&&a.qf();break;case "m":a.h&&a.h.isLinear()?a.h.setMuted(!a.h.isMuted()):a.m.muted=!a.m.muted;break;case "p":a.Ne()&&a.Bd();break;case " ":e&&lG(a)}}});a.j.o(a.l,
1672
1673
  "keyup",function(b){a.ka.delete(b.key)});a.j.o(a.ma,"ad-started",function(b){a.h=b.ad;a.Ci();iG(a)});a.j.o(a.ma,"ad-stopped",function(){a.h=null;a.Qh();iG(a)});screen.orientation&&a.j.o(screen.orientation,"change",function(){return P(function(b){return H(b,mG(a),0)})})}
1673
1674
  function LF(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(d,e){try{navigator.mediaSession.setActionHandler(d,function(f){e(f)})}catch(f){}},c=function(d){var e=a.g.keyboardSeekDistance,f=a.C.Ia();switch(d.action){case "pause":lG(a);break;case "play":lG(a);break;case "seekbackward":a.h&&a.h.isLinear()||kG(a,a.s.getValue()-(d.seekOffset||e));break;case "seekforward":a.h&&a.h.isLinear()||kG(a,a.s.getValue()+(d.seekOffset||e));break;case "seekto":a.h&&a.h.isLinear()||kG(a,f.start+
1674
1675
  d.seekTime);break;case "stop":a.C.qc();break;case "enterpictureinpicture":a.h&&a.h.isLinear()||a.Bd()}};b("pause",c);b("play",c);b("seekbackward",c);b("seekforward",c);b("seekto",c);b("stop",c);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",c);a.j.o(a.B,"timeupdate",function(){var d=a.C.Ia(),e=d.end-d.start;d=parseFloat((a.B.currentTime-d.start).toFixed(2));a.C.T()&&1>Math.abs(e-d)&&(e=Infinity);try{a.h&&a.h.isLinear()?navigator.mediaSession.setPositionState():
@@ -1681,9 +1682,9 @@ function MF(a){var b=a.G.Ua();a.dispatchEvent(new T("caststatuschanged",(new Map
1681
1682
  function IF(a){if(a.s)if(a.s.setValue(a.B.currentTime),a.s.update(),a.s.isShowing())for(var b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new T("timeandseekrangeupdated"))}
1682
1683
  function jG(a,b){a.ka.add(b.key);var c=a.Dd();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),HF(a),a.j.o(window,"mousedown",function(){a.j.Na(window,"mousedown")}));"Escape"==b.key&&a.O.Ra();c&&a.ka.has("Tab")&&oG(a,b)}
1683
1684
  function oG(a,b){var c=a.K.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ka.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1684
- q.Pk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});eG(this,a)};q.Rj=function(){this.J||this.S.Ra()};q.Nf=function(){return this.u.Nf()};q.Mb=function(){return this.u.Mb()};
1685
+ q.Pk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});eG(this,a)};q.Rj=function(){this.J||this.S.Ra()};q.Mf=function(){return this.u.Mf()};q.Mb=function(){return this.u.Mb()};
1685
1686
  q.Kj=function(){var a=this.u;if(a.g){a=a.g;jF(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else cb("Not playing VR content"),a=null;return a};q.Jj=function(){var a=this.u;a.g?a=a.g.i:(cb("Not playing VR content"),a=null);return a};
1686
- q.Ok=function(a){var b=this.u;b.g?(0>a?(cb("Field of view should be greater than 0"),a=0):100<a&&(cb("Field of view should be less than 100"),a=100),b=b.g,b.i=a,pF(b,!1)):cb("Not playing VR content")};q.Cd=function(){this.u.Cd()};q.wg=function(a){this.u.wg(a)};q.ug=function(a){this.u.ug(a)};q.vg=function(a){this.u.vg(a)};
1687
+ q.Ok=function(a){var b=this.u;b.g?(0>a?(cb("Field of view should be greater than 0"),a=0):100<a&&(cb("Field of view should be less than 100"),a=100),b=b.g,b.i=a,pF(b,!1)):cb("Not playing VR content")};q.Cd=function(){this.u.Cd()};q.vg=function(a){this.u.vg(a)};q.sg=function(a){this.u.sg(a)};q.ug=function(a){this.u.ug(a)};
1687
1688
  function JF(){var a=new ld("en");a.Qa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],
1688
1689
  ["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],
1689
1690
  ["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],
@@ -1760,14 +1761,14 @@ a.Qa("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/
1760
1761
  ["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
1761
1762
  ["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
1762
1763
  "\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.yh(navigator.languages||
1763
- []);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.vg;Z.prototype.incrementPitch=Z.prototype.ug;Z.prototype.incrementYaw=Z.prototype.wg;Z.prototype.toggleStereoscopicMode=Z.prototype.Cd;Z.prototype.setVRFieldOfView=Z.prototype.Ok;Z.prototype.getVRFieldOfView=Z.prototype.Jj;Z.prototype.getVRNorth=Z.prototype.Kj;Z.prototype.isPlayingVR=Z.prototype.Mb;Z.prototype.canPlayVR=Z.prototype.Nf;Z.prototype.hideUI=Z.prototype.Rj;Z.prototype.showUI=Z.prototype.Pk;
1764
- Z.prototype.isOpaque=Z.prototype.xc;Z.prototype.hideAdUI=Z.prototype.Qh;Z.prototype.showAdUI=Z.prototype.Ci;Z.prototype.togglePiP=Z.prototype.Bd;Z.prototype.isPiPEnabled=Z.prototype.Oe;Z.prototype.isPiPAllowed=Z.prototype.Ne;Z.prototype.toggleFullScreen=Z.prototype.rf;Z.prototype.isFullScreenEnabled=Z.prototype.nd;Z.prototype.isFullScreenSupported=Z.prototype.Qd;Z.prototype.hideSettingsMenus=Z.prototype.Mc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Dd;Z.prototype.setLastTouchEventTime=Z.prototype.xi;
1765
- Z.prototype.getDisplayTime=Z.prototype.og;Z.prototype.isCastAllowed=Z.prototype.Sj;Z.prototype.setSeeking=Z.prototype.dh;Z.prototype.isSeeking=Z.prototype.Xj;Z.prototype.getConfig=Z.prototype.ij;Z.prototype.getClientSideAdContainer=Z.prototype.hj;Z.prototype.getServerSideAdContainer=Z.prototype.Dj;Z.prototype.getControlsContainer=Z.prototype.kj;Z.prototype.getLocalPlayer=Z.prototype.sj;Z.prototype.getPlayer=Z.prototype.ld;Z.prototype.getLocalVideo=Z.prototype.tj;Z.prototype.getVideo=Z.prototype.wc;
1764
+ []);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.ug;Z.prototype.incrementPitch=Z.prototype.sg;Z.prototype.incrementYaw=Z.prototype.vg;Z.prototype.toggleStereoscopicMode=Z.prototype.Cd;Z.prototype.setVRFieldOfView=Z.prototype.Ok;Z.prototype.getVRFieldOfView=Z.prototype.Jj;Z.prototype.getVRNorth=Z.prototype.Kj;Z.prototype.isPlayingVR=Z.prototype.Mb;Z.prototype.canPlayVR=Z.prototype.Mf;Z.prototype.hideUI=Z.prototype.Rj;Z.prototype.showUI=Z.prototype.Pk;
1765
+ Z.prototype.isOpaque=Z.prototype.xc;Z.prototype.hideAdUI=Z.prototype.Qh;Z.prototype.showAdUI=Z.prototype.Ci;Z.prototype.togglePiP=Z.prototype.Bd;Z.prototype.isPiPEnabled=Z.prototype.Oe;Z.prototype.isPiPAllowed=Z.prototype.Ne;Z.prototype.toggleFullScreen=Z.prototype.qf;Z.prototype.isFullScreenEnabled=Z.prototype.nd;Z.prototype.isFullScreenSupported=Z.prototype.Qd;Z.prototype.hideSettingsMenus=Z.prototype.Oc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Dd;Z.prototype.setLastTouchEventTime=Z.prototype.xi;
1766
+ Z.prototype.getDisplayTime=Z.prototype.ng;Z.prototype.isCastAllowed=Z.prototype.Sj;Z.prototype.setSeeking=Z.prototype.dh;Z.prototype.isSeeking=Z.prototype.Xj;Z.prototype.getConfig=Z.prototype.ij;Z.prototype.getClientSideAdContainer=Z.prototype.hj;Z.prototype.getServerSideAdContainer=Z.prototype.Dj;Z.prototype.getControlsContainer=Z.prototype.kj;Z.prototype.getLocalPlayer=Z.prototype.sj;Z.prototype.getPlayer=Z.prototype.ld;Z.prototype.getLocalVideo=Z.prototype.tj;Z.prototype.getVideo=Z.prototype.wc;
1766
1767
  Z.prototype.getVideoContainer=Z.prototype.Mj;Z.prototype.getLocalization=Z.prototype.uj;Z.prototype.getCastProxy=Z.prototype.gj;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ti;Z.prototype.setEnabledShakaControls=Z.prototype.Zg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.$j;Z.prototype.allowCast=Z.prototype.Wi;Z.registerSeekBar=function(a){hG=a};Z.registerElement=PF;Z.prototype.destroy=Z.prototype.destroy;
1767
1768
  var QF=new Map,hG=new bF;function pG(a,b){vE.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.i;this.i=[];this.g=qj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=V("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1768
1769
  this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);qG(this);this.eventManager.o(this.localization,"locale-updated",function(){rG(c)});this.eventManager.o(this.localization,"locale-changed",function(){rG(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&AE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){AE(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){AE(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.xi(Date.now());
1769
1770
  d.stopPropagation()});this.eventManager.o(this.g,"click",function(){sG(c)});rG(this);this.ad&&this.ad.isLinear()&&AE(this.g,!1)}na(pG,vE);pG.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];vE.prototype.release.call(this)};function tG(a,b){uG.set(a,b)}
1770
- function qG(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,uG.get(c)?(c=uG.get(c),a.i.push(c.create(a.h,a.controls))):cb("Unrecognized overflow menu element requested:",c)}function sG(a){if(a.controls.Dd())a.controls.Mc();else{AE(a.h,!0);HF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};mb(a.h.childNodes,b)&&nb(a.h.childNodes,b)[0].focus()}}function rG(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1771
+ function qG(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,uG.get(c)?(c=uG.get(c),a.i.push(c.create(a.h,a.controls))):cb("Unrecognized overflow menu element requested:",c)}function sG(a){if(a.controls.Dd())a.controls.Oc();else{AE(a.h,!0);HF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};mb(a.h.childNodes,b)&&nb(a.h.childNodes,b)[0].focus()}}function rG(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1771
1772
  S("shaka.ui.OverflowMenu",pG);pG.registerElement=tG;function vG(){}vG.prototype.create=function(a,b){return new pG(a,b)};PF("overflow_menu",new vG);var uG=new Map;function wG(a,b){function c(e){return d.j[e]}vE.call(this,a,b);var d=this;this.h=qj();this.h.classList.add("shaka-ad-statistics-button");this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="insert_chart_outlined";this.h.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");this.u=V("span");a.appendChild(this.u);this.m=V("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.h.appendChild(a);this.parent.appendChild(this.h);
1772
1773
  this.g=V("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");this.controls.i.appendChild(this.g);this.C=[];this.j=this.adManager.getStats();this.s={};this.B={loadTimes:function(e){var f=0;e=t(d.j[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f},averageLoadTime:c,started:c,playedCompletely:c,skipped:c,errors:c};this.l=new Yb(function(){d.j=
1773
1774
  d.adManager.getStats();for(var e=t(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s[f].textContent=d.B[f](f)});xG(this);yG(this);this.eventManager.o(this.localization,"locale-updated",function(){xG(d)});this.eventManager.o(this.localization,"locale-changed",function(){xG(d)});this.eventManager.o(this.h,"click",function(){zG(d);xG(d)});this.eventManager.o(this.player,"loading",function(){AE(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){AE(d.h,!0)})}na(wG,vE);
@@ -1777,39 +1778,39 @@ function yG(a){var b=V("div");b.classList.add("shaka-no-propagation");b.classLis
1777
1778
  S("shaka.ui.AdStatisticsButton",wG);function BG(){}BG.prototype.create=function(a,b){return new wG(a,b)};tG("ad_statistics",new BG);HE("ad_statistics",new BG);function CG(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);
1778
1779
  this.i=V("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);DG(this);EG(this);this.eventManager.o(this.localization,"locale-updated",function(){DG(c)});this.eventManager.o(this.localization,"locale-changed",function(){DG(c)});this.eventManager.o(this.g,"click",function(){c.controls.wc().webkitShowPlaybackTargetPicker()});a=this.controls.wc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1779
1780
  c.player.kd()==Tp;AE(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){EG(c)})}na(CG,vE);function EG(a){var b=a.controls.wc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function DG(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",CG);function FG(){}FG.prototype.create=function(a,b){return new CG(a,b)};tG("airplay",new FG);
1780
- PF("airplay",new FG);function GG(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=HG(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Bg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.eh(b);b.ui=this;c.ui=this}q=GG.prototype;q.destroy=function(){var a=this;return P(function(b){if(1==b.g)return a.g?H(b,a.g.destroy(),2):b.A(2);if(4!=b.g)return a.g=null,a.i?H(b,a.i.destroy(),4):b.A(4);a.i=null;I(b)})};
1781
- q.Bg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:lc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=HG(this);Sm(a,this.h,HG(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tm(a,b));Sm(this.h,a,HG(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new T("uiupdated"))};q.jj=function(){return this.g};
1781
+ PF("airplay",new FG);function GG(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=HG(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ag()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.eh(b);b.ui=this;c.ui=this}q=GG.prototype;q.destroy=function(){var a=this;return P(function(b){if(1==b.g)return a.g?H(b,a.g.destroy(),2):b.A(2);if(4!=b.g)return a.g=null,a.i?H(b,a.i.destroy(),4):b.A(4);a.i=null;I(b)})};
1782
+ q.Ag=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:lc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=HG(this);Sm(a,this.h,HG(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tm(a,b));Sm(this.h,a,HG(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new T("uiupdated"))};q.jj=function(){return this.g};
1782
1783
  q.Lk=function(a){this.g.Zg(a)};
1783
1784
  function HG(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language chapter picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started playedCompletely skipped errors".split(" "),
1784
1785
  contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1785
1786
  level:"rgb(255, 255, 255)"},trackLabelFormat:IG,textTrackLabelFormat:IG,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:0<navigator.maxTouchPoints,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",
1786
- setupMediaSession:!0,preferVideoFullScreenInVisionOS:!1};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Bg()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));b.overflowMenuButtons.push("save_video_frame");return b}
1787
+ setupMediaSession:!0,preferVideoFullScreenInVisionOS:!1};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ag()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));b.overflowMenuButtons.push("save_video_frame");return b}
1787
1788
  function JG(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,z,y,B,A,C;return P(function(D){switch(D.g){case 1:AA();if(!cp())return KG("shaka-ui-load-failed",LG),D.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){D.A(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
1788
1789
  g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=MG(h,c,d),m=l.Wh,n=l.Oi,NG(h,g,m,n));D.A(2);break}p=t(a);r=p.next();case 4:if(r.done){D.A(2);break}u=r.value;if(u.ui){D.A(5);break}w=null;v=t(b);for(z=v.next();!z.done;z=v.next())if(y=z.value,y.parentElement==u){w=y;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),u.appendChild(w));B=MG(u,c,d);A=B.Wh;C=B.Oi;ta(D,7);return H(D,NG(u,w,A,C),9);case 9:xa(D,5);break;case 7:return ya(D),
1789
1790
  KG("shaka-ui-load-failed",OG),D.return();case 5:r=p.next();D.A(4);break;case 2:KG("shaka-ui-loaded"),I(D)}})}function KG(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1790
1791
  function NG(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w;return P(function(v){switch(v.g){case 1:e=new X;f=new GG(e,a,b,d);e.sh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
1791
1792
  b.controls&&f.g.ti(!0);k=[];if(l=b.getAttribute("src"))k.push(l),b.removeAttribute("src");m=t(b.getElementsByTagName("source"));for(n=m.next();!n.done;n=m.next())p=n.value,k.push(p.src),b.removeChild(p);return H(v,e.$b(b),2);case 2:r=t(k),u=r.next();case 3:if(u.done){v.A(0);break}w=u.value;ta(v,6);return H(v,f.g.ld().load(w),8);case 8:v.A(0);break;case 6:ya(v);case 4:u=r.next(),v.A(3)}})}
1792
1793
  function MG(a,b,c){var d=null;b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}b||(b=document.createElement("canvas"),b.classList.add("shaka-vr-canvas-container"),a.appendChild(b));return{Wh:d,Oi:b}}S("shaka.ui.Overlay",GG);GG.prototype.setEnabled=GG.prototype.Lk;
1793
- GG.prototype.getControls=GG.prototype.jj;GG.prototype.configure=GG.prototype.configure;GG.prototype.getConfiguration=GG.prototype.getConfiguration;GG.prototype.isMobile=GG.prototype.Bg;GG.prototype.destroy=GG.prototype.destroy;var IG=0;GG.TrackLabelFormat={LANGUAGE:IG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var LG=0,OG=1;GG.FailReasonCode={NO_BROWSER_SUPPORT:LG,PLAYER_FAILED_TO_LOAD:OG};
1794
+ GG.prototype.getControls=GG.prototype.jj;GG.prototype.configure=GG.prototype.configure;GG.prototype.getConfiguration=GG.prototype.getConfiguration;GG.prototype.isMobile=GG.prototype.Ag;GG.prototype.destroy=GG.prototype.destroy;var IG=0;GG.TrackLabelFormat={LANGUAGE:IG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var LG=0,OG=1;GG.FailReasonCode={NO_BROWSER_SUPPORT:LG,PLAYER_FAILED_TO_LOAD:OG};
1794
1795
  "complete"==document.readyState?P(function(a){if(1==a.g)return H(a,Promise.resolve(),2);JG();I(a)}):window.addEventListener("load",JG);function PG(a,b,c,d,e,f,g,h){function k(J){var M="";J=J.toLowerCase();J.startsWith("mp4a")?M="AAC":"ac-3"===J?M="Dolby":"ec-3"===J?M="DD+":"opus"===J?M="Opus":"flac"===J&&(M="fLaC");return M?" "+M:M}function l(J){var M="";5<=J&&(M=" "+f.resolve("SURROUND"));return M}function m(J,M,O,L,N){M=[J,M];h&&null!=L&&M.push(L);p(J)&&N&&M.push(N);O&&3==g&&M.push(O);return M.join(": ")}function n(J){return"variant"==J.type?J.audioRoles?J.audioRoles.join(", "):void 0:J.roles.join(", ")}function p(J){return u.has(J)&&
1795
1796
  1<u.get(J).size}for(var r=a.find(function(J){return 1==J.active}),u=new Map,w=t(a),v=w.next();!v.done;v=w.next())v=v.value,v.audioCodec&&(u.has(v.language)||u.set(v.language,new Set),u.get(v.language).add(v.audioCodec));w=wE(b);sj(b);b.appendChild(w);w=new Map;v=t(a);for(var z=v.next();!z.done;z=v.next())z=z.value,w.has(z.language)||w.set(z.language,new Set),w.get(z.language).add(n(z));w=new Set;r=r?m(r.language,n(r),r.label,r.channelsCount,r.audioCodec):"";a=t(a);z=a.next();for(v={};!z.done;v={Zb:void 0},
1796
1797
  z=a.next()){v.Zb=z.value;z=v.Zb.language;var y=v.Zb.forced,B=f.resolve("SUBTITLE_FORCED"),A=n(v.Zb),C=v.Zb.label,D=v.Zb.channelsCount,E=v.Zb.audioCodec,F=m(z,A,C,D,E);if(!w.has(F)){w.add(F);var K=qj();K.addEventListener("click",function(J){return function(){c(J.Zb)}}(v));var G=V("span");K.appendChild(G);G.textContent=QG(z,f);switch(g){case IG:p(z)&&(G.textContent+=k(E));h&&(G.textContent+=l(D));y&&(G.textContent+=" ("+B+")");break;case 1:p(z)&&(G.textContent+=k(E));h&&(G.textContent+=l(D));A?G.textContent=
1797
1798
  A:(cb("Track #"+v.Zb.id+" does not have a role, but the UI is configured to only show role."),G.textContent="?");y&&(G.textContent+=" ("+B+")");break;case 2:p(z)&&(G.textContent+=k(E));h&&(G.textContent+=l(D));A&&(G.textContent+=": "+A);y&&(G.textContent+=" ("+B+")");break;case 3:C?G.textContent=C:(cb("Track #"+v.Zb.id+" does not have a label, but the UI is configured to only show labels."),G.textContent="?")}d&&F==r&&(K.appendChild(zE()),G.classList.add("shaka-chosen-item"),K.ariaSelected="true",
1798
1799
  e.textContent=G.textContent);b.appendChild(K)}}}function QG(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=hd(a);return a in rE?rE[a].D:c in rE?rE[c].D+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function RG(a,b,c){vE.call(this,a,b);var d=this;SG(this,c);TG(this);UG(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new T("submenuopen")),AE(d.menu,!0),yE(d.menu)):AE(d.menu,!1)})}na(RG,vE);
1799
1800
  function SG(a,b){a.button=qj();a.button.classList.add("shaka-overflow-button");a.icon=V("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=V("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=V("span");b.appendChild(a.nameSpan);a.currentSelection=V("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1800
- function TG(a){a.menu=V("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=qj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Mc()});var b=V("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1801
+ function TG(a){a.menu=V("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=qj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Oc()});var b=V("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1801
1802
  V("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}function UG(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")}AE(a.parent,!0);mb(a.parent.childNodes,b)&&nb(a.parent.childNodes,b)[0].focus();HF(a.controls)}))}S("shaka.ui.SettingsMenu",RG);function VG(a,b){RG.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(){WG(c)});this.eventManager.o(this.localization,"locale-changed",function(){WG(c)});this.eventManager.o(this.player,"loading",function(){XG(c)});this.eventManager.o(this.player,"trackschanged",function(){XG(c)});this.eventManager.o(this.player,
1802
1803
  "variantchanged",function(){YG(c)});WG(this);YG(this)}na(VG,RG);
1803
1804
  function YG(a){var b=a.player.Kb();PG(b,a.menu,function(c){var d=void 0;c.channelsCount&&a.controls.g.showAudioChannelCountVariants&&(d=c.channelsCount);var e=void 0;c.audioCodec&&(e=c.audioCodec);a.player.Ug(c.language,c.roles[0],d,0,e)},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);yE(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);AE(a.button,2<
1804
1805
  a.menu.getElementsByTagName("button").length)}function XG(a){var b=0<a.player.Kb().length;AE(a.button,b);YG(a)}function WG(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")}S("shaka.ui.AudioLanguageSelection",VG);function ZG(){}ZG.prototype.create=function(a,b){return new VG(a,b)};tG("language",new ZG);PF("language",new ZG);function $G(a,b){vE.call(this,a,b);var c=this;this.h=this.controls.G;this.g=qj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=V("span");a.appendChild(this.l);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
1805
1806
  a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);aH(this);bH(this);this.eventManager.o(this.localization,"locale-updated",function(){aH(c)});this.eventManager.o(this.localization,"locale-changed",function(){aH(c)});this.eventManager.o(this.g,"click",function(){cH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){bH(c)})}na($G,vE);
1806
- function cH(a){var b;P(function(c){if(1==c.g){if(a.h.Ua())return a.h.Gi(),c.A(0);ta(c,3);a.g.disabled=!0;return H(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,xa(c,0);b=ya(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));I(c)})}function bH(a){var b=a.h.Mf()&&a.controls.qa,c=a.h.Ua();AE(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");dH(a)}
1807
- function dH(a){a.j.textContent=a.h.Ua()?a.h.ef():a.localization.resolve("OFF")}function aH(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");dH(a)}S("shaka.ui.CastButton",$G);function eH(){}eH.prototype.create=function(a,b){return new $G(a,b)};tG("cast",new eH);PF("cast",new eH);function fH(a,b){RG.call(this,a,b,"bookmarks");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,"locale-updated",function(){gH(c);hH(c)});this.eventManager.o(this.localization,"locale-changed",function(){gH(c);hH(c)});this.eventManager.o(this.player,"unloading",function(){iH(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",
1807
+ function cH(a){var b;P(function(c){if(1==c.g){if(a.h.Ua())return a.h.Gi(),c.A(0);ta(c,3);a.g.disabled=!0;return H(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,xa(c,0);b=ya(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));I(c)})}function bH(a){var b=a.h.Lf()&&a.controls.qa,c=a.h.Ua();AE(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");dH(a)}
1808
+ function dH(a){a.j.textContent=a.h.Ua()?a.h.df():a.localization.resolve("OFF")}function aH(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");dH(a)}S("shaka.ui.CastButton",$G);function eH(){}eH.prototype.create=function(a,b){return new $G(a,b)};tG("cast",new eH);PF("cast",new eH);function fH(a,b){RG.call(this,a,b,"bookmarks");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,"locale-updated",function(){gH(c);hH(c)});this.eventManager.o(this.localization,"locale-changed",function(){gH(c);hH(c)});this.eventManager.o(this.player,"unloading",function(){iH(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",
1808
1809
  function(){hH(c)});gH(this);hH(this)}na(fH,RG);function gH(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("CHAPTERS");a.nameSpan.textContent=a.localization.resolve("CHAPTERS");a.backSpan.textContent=a.localization.resolve("CHAPTERS")}function iH(a){var b=wE(a.menu);sj(a.menu);a.menu.appendChild(b);AE(a.button,!1)}
1809
- function hH(a){function b(h,k){return!h&&!k||h.id===k.id&&h.title===k.title&&h.startTime===k.startTime&&h.endTime===k.endTime}for(var c="und",d=[],e=t(Array.from(a.localization.g)),f=e.next();!f.done&&(c=f.value,d=a.player.ng(c),!d.length);f=e.next());d.length||(c="und",d=a.player.ng(c));e=c!==a.h;f=a.g.length!==d.length||!a.g.some(function(h,k){k=d.at(k);return b(h,k)||d.some(function(l){return b(h,l)})});a.h=c;a.g=d;if(!d.length)iH(a);else if(e||f){c=t(a.g);f=c.next();for(e={};!f.done;e={Of:void 0},
1810
- f=c.next()){e.Of=f.value;f=qj();var g=V("span");g.classList.add("shaka-chapter");g.textContent=e.Of.title;f.appendChild(g);a.eventManager.o(f,"click",function(h){return function(){a.video.currentTime=h.Of.startTime}}(e));a.menu.appendChild(f)}AE(a.button,!0);yE(a.menu)}}S("shaka.ui.ChapterSelection",fH);function jH(){}jH.prototype.create=function(a,b){return new fH(a,b)};tG("chapter",new jH);PF("chapter",new jH);function kH(a,b){vE.call(this,a,b);var c=this;this.g=qj();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);lH(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){lH(c)});this.eventManager.o(this.localization,"locale-changed",function(){lH(c)});
1811
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Wa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Wc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(kH,vE);function lH(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",kH);function mH(){}mH.prototype.create=function(a,b){return new kH(a,b)};PF("fast_forward",new mH);function nH(a,b){vE.call(this,a,b);var c=this;this.h=this.controls.m;this.g=qj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");oH(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);pH(this);this.eventManager.o(this.localization,"locale-updated",function(){pH(c)});this.eventManager.o(this.localization,"locale-changed",function(){pH(c)});this.eventManager.o(this.g,"click",function(){return P(function(d){return H(d,
1812
- c.controls.rf(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.nd()?"fullscreen_exit":"fullscreen";pH(c)});this.eventManager.o(this.h,"loadedmetadata",function(){oH(c)});this.eventManager.o(this.h,"loadeddata",function(){oH(c)});this.eventManager.o(this.adManager,"ad-started",function(){oH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){oH(c)})}na(nH,vE);
1810
+ function hH(a){function b(h,k){return!h&&!k||h.id===k.id&&h.title===k.title&&h.startTime===k.startTime&&h.endTime===k.endTime}for(var c="und",d=[],e=t(Array.from(a.localization.g)),f=e.next();!f.done&&(c=f.value,d=a.player.mg(c),!d.length);f=e.next());d.length||(c="und",d=a.player.mg(c));e=c!==a.h;f=a.g.length!==d.length||!a.g.some(function(h,k){k=d.at(k);return b(h,k)||d.some(function(l){return b(h,l)})});a.h=c;a.g=d;if(!d.length)iH(a);else if(e||f){c=t(a.g);f=c.next();for(e={};!f.done;e={Nf:void 0},
1811
+ f=c.next()){e.Nf=f.value;f=qj();var g=V("span");g.classList.add("shaka-chapter");g.textContent=e.Nf.title;f.appendChild(g);a.eventManager.o(f,"click",function(h){return function(){a.video.currentTime=h.Nf.startTime}}(e));a.menu.appendChild(f)}AE(a.button,!0);yE(a.menu)}}S("shaka.ui.ChapterSelection",fH);function jH(){}jH.prototype.create=function(a,b){return new fH(a,b)};tG("chapter",new jH);PF("chapter",new jH);function kH(a,b){vE.call(this,a,b);var c=this;this.g=qj();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);lH(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){lH(c)});this.eventManager.o(this.localization,"locale-changed",function(){lH(c)});
1812
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Wa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ec(d);c.g.setAttribute("shaka-status",d+"x")}})}na(kH,vE);function lH(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",kH);function mH(){}mH.prototype.create=function(a,b){return new kH(a,b)};PF("fast_forward",new mH);function nH(a,b){vE.call(this,a,b);var c=this;this.h=this.controls.m;this.g=qj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");oH(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);pH(this);this.eventManager.o(this.localization,"locale-updated",function(){pH(c)});this.eventManager.o(this.localization,"locale-changed",function(){pH(c)});this.eventManager.o(this.g,"click",function(){return P(function(d){return H(d,
1813
+ c.controls.qf(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.nd()?"fullscreen_exit":"fullscreen";pH(c)});this.eventManager.o(this.h,"loadedmetadata",function(){oH(c)});this.eventManager.o(this.h,"loadeddata",function(){oH(c)});this.eventManager.o(this.adManager,"ad-started",function(){oH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){oH(c)})}na(nH,vE);
1813
1814
  function oH(a){a.controls.Qd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function pH(a){var b=a.controls.nd()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}S("shaka.ui.FullscreenButton",nH);function qH(){}qH.prototype.create=function(a,b){return new nH(a,b)};PF("fullscreen",new qH);function rH(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=V("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
1814
1815
  a.appendChild(this.j);this.g.appendChild(a);sH(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){sH(c)});this.eventManager.o(this.localization,"locale-changed",function(){sH(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ra();c.h.Aa(1)});this.m=this.video.loop;this.h=new Yb(function(){c.m!=c.video.loop&&(sH(c),c.m=c.video.loop)});this.h.Aa(1)}na(rH,vE);
1815
1816
  rH.prototype.release=function(){this.h.stop();this.h=null;vE.prototype.release.call(this)};function sH(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}S("shaka.ui.LoopButton",rH);function tH(){}tH.prototype.create=function(a,b){return new rH(a,b)};tG("loop",new tH);PF("loop",new tH);HE("loop",new tH);function uH(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="volume_up";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=V("span");this.i.textContent=this.localization.resolve("MUTE");a.appendChild(this.i);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
@@ -1819,33 +1820,33 @@ function xH(){}xH.prototype.create=function(a,b){return new uH(a,b)};tG("mute",n
1819
1820
  V("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);zH(this);this.parent.appendChild(this.g);this.controls.Ne()||AE(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){zH(c)});this.eventManager.o(this.localization,"locale-changed",function(){zH(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bd()});this.eventManager.o(this.l,"enterpictureinpicture",function(){AH(c)});this.eventManager.o(this.l,"leavepictureinpicture",
1820
1821
  function(){BH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){CH(c)});this.eventManager.o(this.player,"trackschanged",function(){CH(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){AH(c);c.eventManager.sa(d.window,"pagehide",function(){BH(c)})})}na(yH,vE);
1821
1822
  function AH(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function BH(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
1822
- function zH(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Oe();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function CH(a){P(function(b){if(!a.controls.Ne())return AE(a.g,!1),a.controls.Oe()?H(b,a.controls.Bd(),0):b.A(0);if(!a.player||!a.player.Oc())return AE(a.g,!0),b.A(0);AE(a.g,!1);return a.controls.Oe()?H(b,a.controls.Bd(),0):b.A(0)})}S("shaka.ui.PipButton",yH);
1823
+ function zH(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Oe();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function CH(a){P(function(b){if(!a.controls.Ne())return AE(a.g,!1),a.controls.Oe()?H(b,a.controls.Bd(),0):b.A(0);if(!a.player||!a.player.Qc())return AE(a.g,!0),b.A(0);AE(a.g,!1);return a.controls.Oe()?H(b,a.controls.Bd(),0):b.A(0)})}S("shaka.ui.PipButton",yH);
1823
1824
  function DH(){}DH.prototype.create=function(a,b){return new yH(a,b)};tG("picture_in_picture",new DH);PF("picture_in_picture",new DH);HE("picture_in_picture",new DH);function EH(a,b){RG.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(){FH(c)});this.eventManager.o(this.localization,"locale-changed",function(){FH(c)});this.eventManager.o(this.player,"loaded",function(){GH(c,c.player.Wa())});this.eventManager.o(this.player,"ratechange",function(){GH(c,
1824
1825
  c.player.Wa())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));FH(this);HH(this);GH(this,this.player.Wa())}na(EH,RG);function FH(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")}
1825
1826
  function GH(a,b){var c=xE(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(zE()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1826
- "x")}function HH(a){for(var b=t(a.g.keys()),c=b.next(),d={};!c.done;d={df:void 0},c=b.next()){d.df=c.value;c=qj();var e=V("span");e.textContent=d.df;c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.df);a.video.defaultPlaybackRate=a.g.get(f.df)}}(d));a.menu.appendChild(c)}yE(a.menu)}S("shaka.ui.PlaybackRateSelection",EH);function IH(){}IH.prototype.create=function(a,b){return new EH(a,b)};tG("playback_rate",new IH);PF("playback_rate",new IH);function RH(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-current-time");SH(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.player,"loading",function(){AE(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.W,e=c.controls.og(),f=c.player.Ia(),g=f.end-f.start;isFinite(g)?c.player.T()?(e=Math.max(0,Math.floor(f.end-
1827
+ "x")}function HH(a){for(var b=t(a.g.keys()),c=b.next(),d={};!c.done;d={Og:void 0},c=b.next()){d.Og=c.value;c=qj();var e=V("span");e.textContent=d.Og;c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){var g=a.g.get(f.Og);1==g?a.player.Hc():a.player.Ec(g,!1)}}(d));a.menu.appendChild(c)}yE(a.menu)}S("shaka.ui.PlaybackRateSelection",EH);function IH(){}IH.prototype.create=function(a,b){return new EH(a,b)};tG("playback_rate",new IH);PF("playback_rate",new IH);function RH(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-current-time");SH(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.player,"loading",function(){AE(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.W,e=c.controls.ng(),f=c.player.Ia(),g=f.end-f.start;isFinite(g)?c.player.T()?(e=Math.max(0,Math.floor(f.end-
1827
1828
  e)),g=3600<=g,1<=e||d?(SH(c,"- "+BE(e,g)),c.g.disabled=!1):(SH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=BE(Math.max(0,e-f.start),d),g&&(e+=" / "+BE(g,d)),SH(c,e),c.g.disabled=!0):(SH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){AE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",
1828
1829
  function(){AE(c.g,!0)})}na(RH,vE);function SH(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",RH);function TH(){}TH.prototype.create=function(a,b){return new RH(a,b)};PF("time_and_duration",new TH);function UH(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);this.i=V("span");this.i.classList.add("shaka-current-selection-span");
1829
1830
  a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);VH(this);this.eventManager.o(this.localization,"locale-updated",function(){VH(c)});this.eventManager.o(this.localization,"locale-changed",function(){VH(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.g?yF(d.g):cb("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){AE(c.g,c.controls.Mb())});AE(this.g,this.controls.Mb())}na(UH,vE);
1830
1831
  function VH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",UH);function WH(){}WH.prototype.create=function(a,b){return new UH(a,b)};tG("recenter_vr",new WH);PF("recenter_vr",new WH);function XH(a,b){vE.call(this,a,b);var c=this;this.j=!!rc();this.g=qj();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=V("i");this.i.classList.add("material-icons-round");this.i.textContent=this.j?"airplay":"cast";this.g.appendChild(this.i);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=V("span");a.appendChild(this.m);this.l=V("span");this.l.classList.add("shaka-current-selection-span");
1831
1832
  a.appendChild(this.l);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;YH(this);AE(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){YH(c)}),this.eventManager.o(this.localization,"locale-changed",function(){YH(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){ZH(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,"connect",function(){ZH(c);$H(c)}),this.eventManager.o(this.video.remote,
1832
1833
  "connecting",function(){ZH(c);$H(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){ZH(c);$H(c)}),this.eventManager.o(this.player,"loaded",function(){ZH(c)}),ZH(this,!0),$H(this)):this.g.classList.add("shaka-hidden")}na(XH,vE);XH.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});vE.prototype.release.call(this)};
1833
- function ZH(a,b){b=void 0===b?!1:b;var c,d;P(function(e){switch(e.g){case 1:if(a.controls.G.Mf()&&a.controls.qa){AE(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.A(0);break}if("disconnected"==a.video.remote.state||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;rc()&&a.player.kd()==Hp&&"HLS"!=a.player.Fe()&&(h=!1);AE(a.g,h&&f&&!g)}else AE(a.g,!1)};ta(e,7);if(-1==a.h){e.A(9);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){e.A(0);
1834
+ function ZH(a,b){b=void 0===b?!1:b;var c,d;P(function(e){switch(e.g){case 1:if(a.controls.G.Lf()&&a.controls.qa){AE(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.A(0);break}if("disconnected"==a.video.remote.state||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;rc()&&a.player.kd()==Hp&&"HLS"!=a.player.Fe()&&(h=!1);AE(a.g,h&&f&&!g)}else AE(a.g,!1)};ta(e,7);if(-1==a.h){e.A(9);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){e.A(0);
1834
1835
  break}return H(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.A(0);break;case 10:a.h=-1;case 9:xa(e,8);break;case 7:ya(e);case 8:return ta(e,11),H(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;xa(e,0);break;case 11:ya(e),c(!0),I(e)}})}function YH(a){var b=a.j?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}function $H(a){a.j||(a.i.textContent="disconnected"==a.video.remote.state?"cast":"cast_connected")}
1835
1836
  S("shaka.ui.RemoteButton",XH);function aI(){}aI.prototype.create=function(a,b){return new XH(a,b)};tG("remote",new aI);PF("remote",new aI);function bI(a,b){RG.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(){cI(c)});this.eventManager.o(this.localization,"locale-changed",function(){cI(c)});this.eventManager.o(this.player,"loading",function(){dI(c)});this.eventManager.o(this.player,"variantchanged",function(){dI(c)});this.eventManager.o(this.player,
1836
1837
  "trackschanged",function(){dI(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){dI(c)});dI(this)}na(bI,RG);
1837
- function dI(a){var b=[];a.player.kd()!=Tp&&(b=a.player.Kb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Oc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
1838
- k.bandwidth})==l}):1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).filter(Xf).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Oc()?b.sort(function(k,
1839
- l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=wE(a.menu);sj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g={Dc:void 0},f=e.next()){g.Dc=f.value;f=qj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Dc;a.player.configure({abr:{enabled:!1}});a.player.lf(l,a.controls.g.clearBufferOnQualityChange)}}(g));
1840
- var h=V("span");h.textContent=!a.player.Oc()&&g.Dc.height&&g.Dc.width?eI(g.Dc,b):g.Dc.bandwidth?Math.round(g.Dc.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);d||g.Dc!=c||(f.ariaSelected="true",f.appendChild(zE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}e=qj();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});dI(a)});a.g=V("span");a.g.classList.add("shaka-auto-span");
1838
+ function dI(a){var b=[];a.player.kd()!=Tp&&(b=a.player.Kb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Qc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
1839
+ k.bandwidth})==l}):1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).filter(Xf).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Qc()?b.sort(function(k,
1840
+ l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=wE(a.menu);sj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g={Dc:void 0},f=e.next()){g.Dc=f.value;f=qj();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Dc;a.player.configure({abr:{enabled:!1}});a.player.kf(l,a.controls.g.clearBufferOnQualityChange)}}(g));
1841
+ var h=V("span");h.textContent=!a.player.Qc()&&g.Dc.height&&g.Dc.width?eI(g.Dc,b):g.Dc.bandwidth?Math.round(g.Dc.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);d||g.Dc!=c||(f.ariaSelected="true",f.appendChild(zE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}e=qj();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});dI(a)});a.g=V("span");a.g.classList.add("shaka-auto-span");
1841
1842
  a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(zE()),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);yE(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));cI(a);AE(a.button,1<b.length)}
1842
1843
  function eI(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");e=new Set;d=t(b);for(var f=d.next();!f.done;f=d.next())f=f.value,f.frameRate&&e.add(Math.round(f.frameRate));1<e.size&&(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(g){return g!=a&&g.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
1843
- function cI(a){var b=a.player.Oc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",bI);function fI(){}
1844
+ function cI(a){var b=a.player.Qc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",bI);function fI(){}
1844
1845
  fI.prototype.create=function(a,b){return new bI(a,b)};tG("quality",new fI);PF("quality",new fI);function gI(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);hI(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){hI(c)});this.eventManager.o(this.localization,"locale-changed",function(){hI(c)});
1845
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Wa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Wc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(gI,vE);function hI(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",gI);function iI(){}iI.prototype.create=function(a,b){return new gI(a,b)};PF("rewind",new iI);function jI(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=V("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
1846
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Wa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ec(d);c.g.setAttribute("shaka-status",d+"x")}})}na(gI,vE);function hI(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",gI);function iI(){}iI.prototype.create=function(a,b){return new gI(a,b)};PF("rewind",new iI);function jI(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=V("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=V("span");this.j.classList.add("shaka-current-selection-span");
1846
1847
  a.appendChild(this.j);this.g.appendChild(a);kI(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){kI(c)});this.eventManager.o(this.localization,"locale-changed",function(){kI(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download=
1847
1848
  "videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.u,"vrstatuschanged",function(){lI(c)});this.eventManager.o(this.adManager,"ad-started",function(){lI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){lI(c)});this.eventManager.o(this.player,"unloading",function(){lI(c)});this.eventManager.o(this.player,"loaded",function(){lI(c)});this.eventManager.o(this.player,"loaded",function(){lI(c)});this.eventManager.o(this.video,"play",function(){lI(c)});
1848
- this.eventManager.o(this.video,"pause",function(){lI(c)});this.eventManager.o(this.video,"seeking",function(){lI(c)});lI(this)}na(jI,vE);function lI(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Oc())b=!1;a.ad&&(b=!1);a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);AE(a.g,b)}function kI(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",jI);
1849
+ this.eventManager.o(this.video,"pause",function(){lI(c)});this.eventManager.o(this.video,"seeking",function(){lI(c)});lI(this)}na(jI,vE);function lI(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Qc())b=!1;a.ad&&(b=!1);a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);AE(a.g,b)}function kI(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",jI);
1849
1850
  function mI(){}mI.prototype.create=function(a,b){return new jI(a,b)};tG("save_video_frame",new mI);HE("save_video_frame",new mI);function nI(a,b){JE.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}na(nI,JE);nI.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
1850
1851
  nI.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};S("shaka.ui.SmallPlayButton",nI);function oI(){}oI.prototype.create=function(a,b){return new nI(a,b)};PF("play_pause",new oI);function pI(a,b){vE.call(this,a,b);a=V("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}na(pI,vE);S("shaka.ui.Spacer",pI);function qI(){}qI.prototype.create=function(a,b){return new pI(a,b)};PF("spacer",new qI);function rI(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return BE(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}vE.call(this,a,b);var l=this;this.i=qj();this.i.classList.add("shaka-statistics-button");this.j=V("i");this.j.classList.add("material-icons-round");
1851
1852
  this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=V("label");a.classList.add("shaka-overflow-button-label");this.u=V("span");a.appendChild(this.u);this.m=V("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=V("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
@@ -1854,11 +1855,11 @@ bytesDownloaded:c,nonFatalErrorCount:function(m){return l.g[m]+" (errors)"},mani
1854
1855
  function(){sI(l)});this.eventManager.o(this.i,"click",function(){uI(l);sI(l)})}na(rI,vE);function uI(a){AE(a.parent,!1);a.h.classList.contains("shaka-hidden")?(a.j.textContent="insert_chart",a.l.Aa(.1),AE(a.h,!0)):(a.j.textContent="insert_chart_outlined",a.l.stop(),AE(a.h,!1))}function sI(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
1855
1856
  function vI(a,b){var c=V("div"),d=V("label");d.textContent=b+":";c.appendChild(d);d=V("span");d.textContent=a.B[b](b);c.appendChild(d);a.s[b]=d;return c}
1856
1857
  function tI(a){var b=V("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=V("i");c.classList.add("material-icons-round");c.textContent="close";b.appendChild(c);a.h.appendChild(b);a.eventManager.o(c,"click",function(){uI(a)});b=t(a.controls.g.statisticsList);for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=vI(a,c);a.h.appendChild(d);a.C.push(c)}else cb("Unrecognized statistic element:",c)}
1857
- rI.prototype.release=function(){this.l.stop();this.l=null;vE.prototype.release.call(this)};S("shaka.ui.StatisticsButton",rI);function wI(){}wI.prototype.create=function(a,b){return new rI(a,b)};tG("statistics",new wI);HE("statistics",new wI);function xI(a,b){RG.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.Qc()?this.button.ariaPressed="true":this.button.ariaPressed="false";yI(this);this.eventManager.o(this.localization,"locale-updated",function(){zI(c);AI(c)});this.eventManager.o(this.localization,"locale-changed",function(){zI(c);AI(c)});this.eventManager.o(this.player,
1858
+ rI.prototype.release=function(){this.l.stop();this.l=null;vE.prototype.release.call(this)};S("shaka.ui.StatisticsButton",rI);function wI(){}wI.prototype.create=function(a,b){return new rI(a,b)};tG("statistics",new wI);HE("statistics",new wI);function xI(a,b){RG.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.Sc()?this.button.ariaPressed="true":this.button.ariaPressed="false";yI(this);this.eventManager.o(this.localization,"locale-updated",function(){zI(c);AI(c)});this.eventManager.o(this.localization,"locale-changed",function(){zI(c);AI(c)});this.eventManager.o(this.player,
1858
1859
  "loading",function(){BI(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){CI(c);AI(c)});this.eventManager.o(this.player,"textchanged",function(){AI(c)});this.eventManager.o(this.player,"trackschanged",function(){BI(c)});CI(this);zI(this);AI(this);BI(this)}na(xI,RG);function yI(a){var b=qj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(zE());a.g=V("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1859
- function CI(a){a.player.Qc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
1860
- function AI(a){var b=a.player.ec();PG(b,a.menu,function(c){return DI(a,c)},a.player.Qc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=qj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.nf(!1);AI(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Qc()||(b.ariaSelected="true",b.appendChild(zE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1861
- a.button.setAttribute("shaka-status",a.currentSelection.textContent);yE(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"))}function DI(a,b){return P(function(c){a.player.Wg(b);return H(c,a.player.nf(!0),0)})}
1860
+ function CI(a){a.player.Sc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
1861
+ function AI(a){var b=a.player.ec();PG(b,a.menu,function(c){return DI(a,c)},a.player.Sc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=qj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.mf(!1);AI(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Sc()||(b.ariaSelected="true",b.appendChild(zE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1862
+ a.button.setAttribute("shaka-status",a.currentSelection.textContent);yE(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"))}function DI(a,b){return P(function(c){a.player.Wg(b);return H(c,a.player.mf(!0),0)})}
1862
1863
  function zI(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")}function BI(a){var b=0<a.player.ec().length;AE(a.button,b);AI(a)}S("shaka.ui.TextSelection",xI);function EI(){}EI.prototype.create=function(a,b){return new xI(a,b)};tG("captions",new EI);PF("captions",new EI);function FI(a,b){vE.call(this,a,b);var c=this;this.g=qj();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=V("span");a.appendChild(this.j);this.i=V("span");this.i.classList.add("shaka-current-selection-span");
1863
1864
  a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);GI(this);this.eventManager.o(this.localization,"locale-updated",function(){GI(c)});this.eventManager.o(this.localization,"locale-changed",function(){GI(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.Cd()});this.eventManager.o(d,"vrstatuschanged",function(){AE(c.g,c.controls.Mb())});AE(this.g,this.controls.Mb())}na(FI,vE);
1864
1865
  function GI(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",FI);function HI(){}HI.prototype.create=function(a,b){return new FI(a,b)};tG("toggle_stereoscopic",new HI);PF("toggle_stereoscopic",new HI);function II(a,b){QE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return JI(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return KI(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return KI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return JI(c)});this.eventManager.o(this.localization,"locale-updated",function(){return LI(c)});