shaka-player 4.8.18 → 4.8.19

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.
@@ -77,10 +77,10 @@ var qc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
77
77
  SPDX-License-Identifier: Apache-2.0
78
78
  */
79
79
  function rc(a){var b;a instanceof rc?(sc(this,a.kb),this.jc=a.jc,tc(this,a.wb),uc(this,a.yc),this.Ma=a.Ma,vc(this,a.g.clone()),this.Sb=a.Sb):a&&(b=String(a).match(qc))?(sc(this,b[1]||"",!0),this.jc=wc(b[2]||""),tc(this,b[3]||"",!0),uc(this,b[4]),this.Ma=wc(b[5]||"",!0),vc(this,b[6]||"",!0),this.Sb=wc(b[7]||"")):this.g=new xc(null)}r=rc.prototype;r.kb="";r.jc="";r.wb="";r.yc=null;r.Ma="";r.Sb="";
80
- r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.jc;c&&a.push(yc(c,zc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.yc;null!=b&&a.push(":",String(b))}if(b=this.Ma)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(yc(b,"/"==b.charAt(0)?Ac:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sb)&&a.push("#",yc(b,Dc));return a.join("")};
80
+ r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.jc;c&&a.push(yc(c,zc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.yc;null!=b&&a.push(":",String(b))}if(b=this.Ma)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(yc(b,"/"==b.charAt(0)?Ac:Bc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sb)&&a.push("#",yc(b,Dc));return a.join("")};
81
81
  r.resolve=function(a){var b=this.clone();"data"===b.kb&&(b=new rc);var c=!!a.kb;c?sc(b,a.kb):c=!!a.jc;c?b.jc=a.jc:c=!!a.wb;c?tc(b,a.wb):c=null!=a.yc;var d=a.Ma;if(c)uc(b,a.yc);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.wb&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.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(""):".."==
82
82
  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.Ma=d:c=""!==a.g.toString();c?vc(b,a.g.clone()):c=!!a.Sb;c&&(b.Sb=a.Sb);return b};r.clone=function(){return new rc(this)};function sc(a,b,c){a.kb=c?wc(b,!0):b;a.kb&&(a.kb=a.kb.replace(/:$/,""))}function tc(a,b,c){a.wb=c?wc(b,!0):b}function uc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.yc=b}else a.yc=null}
83
- function vc(a,b,c){b instanceof xc?a.g=b:(c||(b=yc(b,Ec)),a.g=new xc(b))}function wc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var zc=/[#\/\?@]/g,Cc=/[#\?:]/g,Ac=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function xc(a){this.g=a||null}
83
+ function vc(a,b,c){b instanceof xc?a.g=b:(c||(b=yc(b,Ec)),a.g=new xc(b))}function wc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var zc=/[#\/\?@]/g,Bc=/[#\?:]/g,Ac=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function xc(a){this.g=a||null}
84
84
  function Gc(a){if(!a.Ca&&(a.Ca={},a.Wc=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," ")))}}r=xc.prototype;r.Ca=null;r.Wc=null;function Hc(a){Gc(a);return a.Wc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ca.hasOwnProperty(a)?this.Ca[a]:null;c||(this.Ca[a]=c=[]);c.push(b);this.Wc++;return this};
85
85
  r.set=function(a,b){Gc(this);this.g=null;this.Ca.hasOwnProperty(a)?this.Ca[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ca[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ca)return"";var a=[],b;for(b in this.Ca)for(var c=encodeURIComponent(b),d=this.Ca[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
86
86
  r.clone=function(){var a=new xc;a.g=this.g;if(this.Ca){var b={},c;for(c in this.Ca)b[c]=this.Ca[c].concat();a.Ca=b;a.Wc=this.Wc}return a};function R(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ic)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}R.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};P("shaka.util.Error",R);var Ic=!0;R.Severity={RECOVERABLE:1,CRITICAL:2};R.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
@@ -92,10 +92,10 @@ HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORT
92
92
  MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
93
93
  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,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
94
94
  CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,
95
- 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};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.prototype.U=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};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Mc(a){this.h=a;this.g=null}Mc.prototype.hc=function(){this.stop();this.h();return this};Mc.prototype.U=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).U(a);return this};Mc.prototype.Pa=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.U(a);b.h()})).U(a);return this};Mc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Mc);Mc.prototype.stop=Mc.prototype.stop;Mc.prototype.tickEvery=Mc.prototype.Pa;
96
- Mc.prototype.tickAfter=Mc.prototype.U;Mc.prototype.tickNow=Mc.prototype.hc;function Nc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Tc(){return Rc("Tizen 3")}function Uc(){return Rc("Tizen 2")}function Vc(){return Rc("Web0S")}function Wc(){return Vc()&&38===Xc()}function Yc(){return Rc("CrKey")}
95
+ 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};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Kc(a){this.h=a;this.g=null}Kc.prototype.V=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};Kc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Mc(a){this.h=a;this.g=null}Mc.prototype.hc=function(){this.stop();this.h();return this};Mc.prototype.V=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.h()})).V(a);return this};Mc.prototype.Pa=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.g.V(a);b.h()})).V(a);return this};Mc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Mc);Mc.prototype.stop=Mc.prototype.stop;Mc.prototype.tickEvery=Mc.prototype.Pa;
96
+ Mc.prototype.tickAfter=Mc.prototype.V;Mc.prototype.tickNow=Mc.prototype.hc;function Nc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Tc(){return Rc("Tizen 3")}function Uc(){return Rc("Tizen 2")}function Vc(){return Rc("Web0S")}function Wc(){return Vc()&&38===Xc()}function Yc(){return Rc("CrKey")}
97
97
  function Xc(){if(!Rc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function Zc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("PC=APL")&&!Rc("VirginMedia")&&!Rc("SOPOpenBrowser")&&!$c()&&!Rc("AFT")&&!Rc("WPE")&&!Rc("DT_STB_BCM")}function ad(){return Rc("PlayStation 5")}function $c(){return Rc("PlayStation 4")}function bd(){return Rc("Hisense")||Rc("VIDAA")}
98
- function cd(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Rc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.U(1);return dd}
98
+ function cd(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Rc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.V(1);return dd}
99
99
  function fd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
100
100
  function gd(){var a,b,c,d,e,f,g,h,k,l,m,n,q,p;return L(function(u){switch(u.g){case 1:a={width:Infinity,height:Infinity};if(Yc()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ra(u,15);if(!(n=m)){u.u(17);break}return D(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Sc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
101
101
  a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(v){Va("Tizen: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if(Qc()){c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=null;try{do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',
@@ -113,7 +113,7 @@ function zd(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
113
113
  function Cd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
114
114
  function Fd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=ud(wd(h),!1));var l=g;22!=l.length&&(l=ud(wd(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:Ab(od(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
115
115
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Gd(a,b){if(1==b.length)return b[0];a=Hd(a,b);if(null!=a)return a;throw new R(2,4,4025,b);}function Hd(a,b){for(var c=t(Id[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==Jd?"":null}
116
- function Kd(a,b){var c=[];a=t(Id[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 Jd="text",Ld={fa:"video",S:"audio",ma:Jd,xe:"image",Ii:"application"},Id={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Md(){}function Nd(a,b){var c=a;b&&!Od.includes(a)&&(c+='; codecs="'+b+'"');return c}function Pd(a,b){b&&(a+='; codecs="'+b+'"');return a}function Qd(a,b,c){var d=Nd(a,b);b=Pd(a,b);lc(b)?(a=lc(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}
116
+ function Kd(a,b){var c=[];a=t(Id[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 Jd="text",Ld={fa:"video",T:"audio",ma:Jd,xe:"image",Ii:"application"},Id={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 Md(){}function Nd(a,b){var c=a;b&&!Od.includes(a)&&(c+='; codecs="'+b+'"');return c}function Pd(a,b){b&&(a+='; codecs="'+b+'"');return a}function Qd(a,b,c){var d=Nd(a,b);b=Pd(a,b);lc(b)?(a=lc(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}
117
117
  function Rd(a,b,c){var d=[b];Sd.forEach(function(e,f){var g=a[f];"codecs"==f?Od.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Td(a){return a.split(";")[0].split("/")[1]}
118
118
  function Ud(a){var b=Vd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
119
119
  a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function Wd(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Vd(c.value),b.push(c[0]);return b.sort().join(",")}function Xd(a){return a.split(";")[0]}
@@ -177,7 +177,7 @@ r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.r
177
177
  this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=tf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=uf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=tf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=tf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
178
178
  a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.A=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
179
179
  r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.o&&vf(this)};r.trySuggestStreams=function(){null!=this.A&&this.o&&vf(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};r.setVariants=function(a){this.m=a};
180
- r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.U(wf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
180
+ r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.V(wf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
181
181
  function vf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function tf(a,b,c,d,e){if(a.j){var f=a.j.gg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Fe(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
182
182
  function uf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",of);of.prototype.configure=of.prototype.configure;of.prototype.setCmsdManager=of.prototype.setCmsdManager;of.prototype.setMediaElement=of.prototype.setMediaElement;of.prototype.playbackRateChanged=of.prototype.playbackRateChanged;of.prototype.setVariants=of.prototype.setVariants;
183
183
  of.prototype.getBandwidthEstimate=of.prototype.getBandwidthEstimate;of.prototype.trySuggestStreams=of.prototype.trySuggestStreams;of.prototype.segmentDownloaded=of.prototype.segmentDownloaded;of.prototype.disable=of.prototype.disable;of.prototype.enable=of.prototype.enable;of.prototype.chooseVariant=of.prototype.chooseVariant;of.prototype.init=of.prototype.init;of.prototype.release=of.prototype.release;of.prototype.stop=of.prototype.stop;var wf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{jj:"reload",Sg:"smooth"});function xf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}xf.prototype.add=function(a,b,c){return yf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
@@ -187,7 +187,7 @@ function Cf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;th
187
187
  Cf.prototype.create=function(a){var b=[];b=Df(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ef(b,this.A);a.length&&(b=a);this.l&&(a=Ff(b,this.l),a.length&&(b=a));this.i&&(a=Gf(b,this.i),a.length&&(b=a));this.h&&(a=Hf(b,this.h),a.length&&(b=a));this.g&&(a=If(b,this.g),a.length&&(b=a));this.j&&(a=Jf(b,this.j),a.length&&(b=a));a=Kf(b,this.B);a.length&&(b=a);return new xf(b[0],b,!("smooth"==this.m&&nb()),this.o)};
188
188
  function Df(a,b){b=re(b);var c=ye(b,a.map(function(d){return xe(d)}));return c?a.filter(function(d){return c==xe(d)}):[]}function Ef(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function If(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Jf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
189
189
  function Hf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Gf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ff(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Kf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Lf(){this.g=Mf;this.i=(new Map).set(Mf,2).set(Nf,1);this.h=0}function Of(a,b,c){a.i.set(Mf,c).set(Nf,b)}var Nf=0,Mf=1;function Pf(a,b){var c=Qf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
190
- function Rf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new R(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return D(d,new Promise(function(e){(new Mc(e)).U(c/1E3)}),2)}a.h*=a.m;G(d)})}function Qf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Sf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Sf.prototype.resolve=function(){};Sf.prototype.reject=function(){};function Tf(a,b){this.promise=a;this.i=b;this.g=!1}function Uf(a){return new Tf(Promise.reject(a),function(){return Promise.resolve()})}function Vf(){var a=Promise.reject(new R(2,7,7001));a.catch(function(){});return new Tf(a,function(){return Promise.resolve()})}function Wf(a){return new Tf(Promise.resolve(a),function(){return Promise.resolve()})}function Xf(a){return new Tf(a,function(){return a.catch(function(){})})}Tf.prototype.abort=function(){this.g=!0;return this.i()};
190
+ function Rf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new R(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return D(d,new Promise(function(e){(new Mc(e)).V(c/1E3)}),2)}a.h*=a.m;G(d)})}function Qf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Sf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Sf.prototype.resolve=function(){};Sf.prototype.reject=function(){};function Tf(a,b){this.promise=a;this.i=b;this.g=!1}function Uf(a){return new Tf(Promise.reject(a),function(){return Promise.resolve()})}function Vf(){var a=Promise.reject(new R(2,7,7001));a.catch(function(){});return new Tf(a,function(){return Promise.resolve()})}function Wf(a){return new Tf(Promise.resolve(a),function(){return Promise.resolve()})}function Xf(a){return new Tf(a,function(){return a.catch(function(){})})}Tf.prototype.abort=function(){this.g=!0;return this.i()};
191
191
  function Yf(a){return new Tf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Tf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
192
192
  Tf.prototype.wa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Zf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Sf,g=new R(2,7,7001);this.promise.then(c(!0),c(!1));return new Tf(f,function(){return d()})};
193
193
  function Zf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}P("shaka.util.AbortableOperation",Tf);Tf.prototype.chain=Tf.prototype.wa;Tf.prototype["finally"]=Tf.prototype.finally;Tf.all=Yf;Tf.prototype.abort=Tf.prototype.abort;Tf.notAbortable=Xf;Tf.completed=Wf;Tf.aborted=Vf;Tf.failed=Uf;function T(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
@@ -200,7 +200,7 @@ r.request=function(a,b,c){var d=this,e=new kg;if(this.i){var f=Promise.reject(ne
200
200
  var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.wa(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Kh||!d.l||u.fromCache||"HEAD"==b.method||a!=pg||d.l(u.timeMs,u.data.byteLength,qg(c));d.B&&d.B(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new lg(n.promise,function(){return n.abort()},e);dg(this.m,f);return f};
201
201
  function mg(a,b,c,d){function e(h){f=f.wa(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=Wf(void 0);a.A&&e(a.A);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.wa(void 0,function(h){if(h instanceof R&&7001==h.code)throw h;throw new R(2,1,1006,h);})}
202
202
  function ng(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.C&&a.C(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.kb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=hg[l])?l.je:null;if(!n)return Uf(new R(2,1,1E3,k));var q=l.di,p=null,u=null,v=!1,w=!1,A;return Xf(Rf(e)).wa(function(){if(a.i)return Vf();A=Date.now();var y=0;c.requestStartTime=Date.now();var z=n(c.uris[f],c,b,function(F,J,I){p&&p.stop();
203
- u&&u.U(C/1E3);a.l&&b==pg&&(y++,c.packetNumber=y,a.l(F,J,qg(d),c),m=!0,h.g=I)},function(F){a.j&&a.j(F,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return z;var B=c.retryParameters.connectionTimeout;B&&(p=new Mc(function(){v=!0;z.abort()}),p.U(B/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Mc(function(){v=!0;z.abort()}));return z}).wa(function(y){p&&p.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var z={response:y,Kh:m};!w&&a.j&&a.j(y.headers,c,b);return z},
203
+ u&&u.V(C/1E3);a.l&&b==pg&&(y++,c.packetNumber=y,a.l(F,J,qg(d),c),m=!0,h.g=I)},function(F){a.j&&a.j(F,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return z;var B=c.retryParameters.connectionTimeout;B&&(p=new Mc(function(){v=!0;z.abort()}),p.V(B/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Mc(function(){v=!0;z.abort()}));return z}).wa(function(y){p&&p.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var z={response:y,Kh:m};!w&&a.j&&a.j(y.headers,c,b);return z},
204
204
  function(y){p&&p.stop();u&&u.stop();if(a.s){var z=null,B=0;y instanceof R&&(z=y,1001==y.code&&(B=y.data[1]));a.s(c,z,B,v)}if(a.i)return Vf();v&&(y=new R(1,1,1003,c.uris[f],b));if(y instanceof R){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return z=(new Map).set("error",y),z=new T("retry",z),a.dispatchEvent(z),f=(f+1)%c.uris.length,ng(a,b,c,d,e,f,y,h)}throw y;})}
205
205
  function og(a,b,c,d){var e=Wf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={te:f.te},g=a.next())f.te=g.value,e=e.wa(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.te(b,k,d)}}(f));return e.wa(function(){return c},function(h){var k=2;if(h instanceof R){if(7001==h.code)throw h;k=h.severity}throw new R(k,1,1007,h);})}function qg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.nd)return!1}return!0}P("shaka.net.NetworkingEngine",eg);
206
206
  eg.prototype.request=eg.prototype.request;eg.prototype.destroy=eg.prototype.destroy;eg.makeRequest=jg;eg.defaultRetryParameters=function(){return Qf()};eg.prototype.clearAllResponseFilters=eg.prototype.fh;eg.prototype.unregisterResponseFilter=eg.prototype.Ei;eg.prototype.registerResponseFilter=eg.prototype.hi;eg.prototype.clearAllRequestFilters=eg.prototype.eh;eg.prototype.unregisterRequestFilter=eg.prototype.Di;eg.prototype.registerRequestFilter=eg.prototype.gi;eg.unregisterScheme=function(a){delete hg[a]};
@@ -228,12 +228,12 @@ function Zg(a){if(!Array.from(a.children).every(function(b){return"string"===typ
228
228
  function dh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function eh(a,b,c){b=Tg(b);return a.attributes[b+":"+c]||null}function ch(a,b,c){b=Tg(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function fh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=eh(a,d.value,c))return d;return null}
229
229
  function gh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function hh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
230
230
  function ih(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function jh(a){a=Number(a);return 0===a%1?a:null}function kh(a){a=Number(a);return 0===a%1&&0<a?a:null}function lh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function mh(a){a=Number(a);return isNaN(a)?null:a}function nh(a){return a?"true"===a.toLowerCase():!1}
231
- function oh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function ph(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&ph(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=ph(b,!1,!0),d.appendChild(c);return d}var Ug=new Map([]);function qh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new eb;this.i=new Map;this.A=new Map;this.l=new Sf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return rh(b)});this.T=!1;this.M=[];this.Y=!1;this.K=new Mc(function(){sh(b)});this.l.catch(function(){});this.j=new rg(function(){return th(b)});this.ba=!1;this.F=this.G=null}r=qh.prototype;r.destroy=function(){return this.j.destroy()};
231
+ function oh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function ph(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&ph(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=ph(b,!1,!0),d.appendChild(c);return d}var Ug=new Map([]);function qh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new eb;this.i=new Map;this.A=new Map;this.l=new Sf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return rh(b)});this.U=!1;this.M=[];this.Y=!1;this.K=new Mc(function(){sh(b)});this.l.catch(function(){});this.j=new rg(function(){return th(b)});this.ba=!1;this.F=this.G=null}r=qh.prototype;r.destroy=function(){return this.j.destroy()};
232
232
  function th(a){return L(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,D(b,uh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return D(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Pa(this.h.updateExpirationTime)};
233
- function vh(a,b,c){a.ia=!0;a.A=new Map;a.T=c;return wh(a,b)}function xh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.T=0<a.A.size;return wh(a,b)}
233
+ function vh(a,b,c){a.ia=!0;a.A=new Map;a.U=c;return wh(a,b)}function xh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.U=0<a.A.size;return wh(a,b)}
234
234
  function yh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return zh(a,g,[])}
235
235
  function wh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y;return L(function(z){if(1==z.g){if(c=Ah(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=wg(a.h.servers),Bh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ch(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);v=t(k);for(p=v.next();!p.done;p=
236
- v.next())w=p.value,Dh(w,wg(a.h.servers),wg(a.h.advanced||{}),a.h.keySystemsMapping);return D(z,Le(b,a.T,a.ba,a.h.preferredKeySystems),2)}sg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.da=!0,z.return(Promise.resolve());y=zh(a,void 0,b);return z.return(g?y:y.catch(function(){}))})}
236
+ v.next())w=p.value,Dh(w,wg(a.h.servers),wg(a.h.advanced||{}),a.h.keySystemsMapping);return D(z,Le(b,a.U,a.ba,a.h.preferredKeySystems),2)}sg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.da=!0,z.return(Promise.resolve());y=zh(a,void 0,b);return z.return(g?y:y.catch(function(){}))})}
237
237
  function Eh(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return D(c,a.G,3);case 3:return sg(a.j),c.return();case 2:return ra(c,4),a.G=a.m.setMediaKeys(a.s),D(c,a.G,6);case 6:ta(c,5);break;case 4:b=va(c),a.o(new R(2,6,6003,b.message));case 5:sg(a.j),G(c)}})}function Fh(a,b){return L(function(c){if(1==c.g)return D(c,Eh(a),2);Gh(a,b.initDataType,Ab(b.initData));G(c)})}
238
238
  r.Sc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new R(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=t(b.M),e=d.next();!e.done;e=d.next())Hh(b,e.value);b.Y=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return uh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
239
239
  b.A.size?D(c,Eh(b),2):c.u(2)}Ih(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Fh(b,d)});G(c)})};
@@ -243,7 +243,7 @@ function Ih(a){var b,c,d,e,f;return L(function(g){if(1==g.g){if(!a.A.size)return
243
243
  function Gh(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Nh(a)&&(a.l.resolve(),a.l=new Sf,a.l.catch(function(){}));Oh(a,b,c,a.g.sessionType)}}function Ph(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Qh(a){a=a.i.keys();a=tg(a,function(b){return b.sessionId});return Array.from(a)}
244
244
  r.Ve=function(){var a=this,b=this.i.keys();b=tg(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)};r.dd=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};r.Md=function(){return xg(this.ea)};
245
245
  function zh(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A;return L(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=Rh(a,c,d);y.u(2);break}return D(y,Sh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new R(2,6,6001);sg(a.j);ra(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(m=q.next();!m.done;m=q.next())p=m.value,a.H.add(p.contentType.toLowerCase());if(c.length){var z=
246
- f.keySystem;var B=d.get(f.keySystem);var C=[],F=[],J=[],I=[],E=[],H=new Set;Th(B,C,F,I,J,E,H);var K=a.T?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:C[0],licenseServerUri:F[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||K,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:E,keyIds:H};B=t(B);
246
+ f.keySystem;var B=d.get(f.keySystem);var C=[],F=[],J=[],I=[],E=[],H=new Set;Th(B,C,F,I,J,E,H);var K=a.U?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:C[0],licenseServerUri:F[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||K,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:E,keyIds:H};B=t(B);
247
247
  for(C=B.next();!C.done;C=B.next())C=C.value,C.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(z.persistentStateRequired=C.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),C=[],F=[],J=[],I=[],E=[],H=new Set,Th(z.drmInfos,C,F,I,J,E,H),B={keySystem:B,encryptionScheme:C[0],licenseServerUri:F[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,
248
248
  sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:J[0],initData:E,keyIds:H};a.g=B;if(!a.g.licenseServerUri)throw new R(2,6,6012,a.g.keySystem);return D(y,f.createMediaKeys(),6);case 6:u=y.h;sg(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){y.u(7);break}ra(y,8);return D(y,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
249
249
  10);case 10:v=y.h;if("usable"!=v)throw new R(2,6,6018);sg(a.j);ta(y,7,4);break;case 8:w=va(y,4);if(w instanceof R)throw w;throw new R(2,6,6019,w.message);case 7:return a.da=!0,D(y,Jh(a),11);case 11:sg(a.j);ta(y,0);break;case 4:A=va(y);sg(a.j,A);a.g=null;a.H.clear();if(A instanceof R)throw A;throw new R(2,6,6002,A.message);}})}
@@ -251,19 +251,19 @@ function Rh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ch(e.va
251
251
  l.se}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
252
252
  function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w;return L(function(A){switch(A.g){case 1:if(1==b.size&&b.has(""))throw new R(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){A.u(4);break}k=h.value;if(!b.has(k)){A.u(3);break}l=b.get(k);ra(A,6);return D(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
253
253
  A.h,A.return(c);case 6:va(A);case 7:sg(a.j);case 3:h=g.next();A.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.u(11);break}q=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();A.u(9);break}u=h.value;v=b.get(u);w=v.drmInfos.some(function(y){return!!y.licenseServerUri});if(w!=q){A.u(13);break}ra(A,15);return D(A,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=A.h,A.return(c);case 15:va(A);case 16:sg(a.j);case 13:h=p.next();A.u(12);break;case 11:return A.return(c)}})}
254
- function Ah(a){a=wg(a.h.clearKeys);return 0==a.size?null:Fd(a)}function Uh(a){Nh(a)&&a.l.resolve()}function Vh(a,b){(new Mc(function(){b.loaded=!0;Uh(a)})).U(Wh)}
254
+ function Ah(a){a=wg(a.h.clearKeys);return 0==a.size?null:Fd(a)}function Uh(a){Nh(a)&&a.l.resolve()}function Vh(a,b){(new Mc(function(){b.loaded=!0;Uh(a)})).V(Wh)}
255
255
  function Lh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new R(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.M.push(n):Hh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Xh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,nf:Infinity,bb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return D(m,
256
256
  d.load(b),4);case 4:return g=m.h,sg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new R(h,6,6013)),f.loaded=!0),Vh(a,f),Uh(a),m.return(d);case 2:k=va(m),sg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new R(l,6,6005,k.message)),f.loaded=!0,Uh(a);case 3:return m.return(Promise.resolve())}})}
257
257
  function Oh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new R(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.M.push(f):Hh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Xh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,nf:Infinity,bb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof R||(b=new R(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&ud(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
258
258
  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.o(new R(2,6,6006,f.message,f,h))}})}
259
259
  function Hh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;L(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&ud(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=jg([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(Ph(a.g.keySystem)){var w=
260
260
  jd(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Rg(w,"PlayReadyKeyMessage");var A=$g(w,"HttpHeader");A=t(A);for(var y=A.next();!y.done;y=A.next()){var z=y.value;y=$g(z,"name")[0];z=$g(z,"value")[0];g.headers[Yg(y)]=Yg(z)}w=$g(w,"Challenge")[0];g.body=vd(Yg(w))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(v,2);l=a.C.zb.request(2,g);return D(v,l.promise,4);case 4:k=v.h;ta(v,3);break;case 2:m=va(v);if(a.j.g)return v.return();n=new R(2,6,6007,m);1==a.i.size?(a.o(n),
261
- d&&d.bb&&d.bb.reject(n)):(d&&d.bb&&d.bb.reject(n),a.i.delete(c),Nh(a)&&(a.l.resolve(),a.L.U(.1)));return v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ud(k.data);ra(v,5);return D(v,c.update(k.data),7);case 7:ta(v,6);break;case 5:return q=va(v),p=new R(2,6,6008,q.message),a.o(p),d&&d.bb&&d.bb.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new T("drmsessionupdate");a.C.onEvent(u);d&&(d.bb&&d.bb.resolve(),Vh(a,d));G(v)}})}
261
+ d&&d.bb&&d.bb.reject(n)):(d&&d.bb&&d.bb.reject(n),a.i.delete(c),Nh(a)&&(a.l.resolve(),a.L.V(.1)));return v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ud(k.data);ra(v,5);return D(v,c.update(k.data),7);case 7:ta(v,6);break;case 5:return q=va(v),p=new R(2,6,6008,q.message),a.o(p),d&&d.bb&&d.bb.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new T("drmsessionupdate");a.C.onEvent(u);d&&(d.bb&&d.bb.resolve(),Vh(a,d));G(v)}})}
262
262
  function Xh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Ph(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||$c())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=zd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.bb&&(a.i.delete(b),
263
- b.close().catch(function(){}));Nh(a)&&(a.l.resolve(),a.L.U(Yh))}function rh(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new R(2,6,6014));a.C.he(xg(c))}
263
+ b.close().catch(function(){}));Nh(a)&&(a.l.resolve(),a.L.V(Yh))}function rh(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new R(2,6,6014));a.C.he(xg(c))}
264
264
  function Zh(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,q;return L(function(p){switch(p.g){case 1:ra(p,
265
265
  2);if("org.w3.clearkey"===l&&cd())throw Error("Unsupported keySystem");return D(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Tc()&&(q=!1),f.set(l,{persistentState:q}),D(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:va(p),f.set(l,null),G(p)}})},h=a.map(function(l){return g(l)}),D(k,Promise.all(h),2)):k.return(xg(f))})}
266
- function $h(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).U(ai)}),ra(c,2),D(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);va(c);G(c)})}
266
+ function $h(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).V(ai)}),ra(c,2),D(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);va(c);G(c)})}
267
267
  function uh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return D(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return ra(g,2),a.ia||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?D(g,$h(e),5):D(g,e.remove(),5);if(2!=g.g)return ta(g,0);va(g);G(g)})})),0)})}function bi(a,b){return a.length&&b.length&&a!==b?0<ci(a,b).length:!0}
268
268
  function ci(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||
269
269
  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}
@@ -347,13 +347,13 @@ function pj(a){var b={height:null,width:null,Ea:null};a=a.Qd();if(!a.length)retu
347
347
  a.toString(16).toUpperCase());b.Ea=e;return b}function oj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function sj(a){return 0>mj(a)?!1:!0}function mj(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}P("shaka.util.TsParser",fj);fj.syncOffset=mj;fj.probe=sj;fj.prototype.getVideoInfo=fj.prototype.Ze;fj.prototype.getVideoResolution=fj.prototype.Ih;fj.prototype.getVideoNalus=fj.prototype.Qd;
348
348
  fj.prototype.getCodecs=fj.prototype.cd;fj.prototype.getStartTime=fj.prototype.getStartTime;fj.prototype.getVideoData=fj.prototype.uc;fj.prototype.getAudioData=fj.prototype.Gb;fj.prototype.getMetadata=fj.prototype.getMetadata;fj.prototype.parseNalus=fj.prototype.tf;fj.prototype.parseAvcNalus=fj.prototype.ci;fj.prototype.parse=fj.prototype.parse;fj.prototype.clearData=fj.prototype.clearData;fj.Timescale=9E4;var rj=[100,110,122,244,44,83,86,118,128,138,139,134];function tj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Va("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,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Va("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Va("Could not find LCEVC Library on this page"),
349
349
  a=!1):(this.h.SupportObject.SupportStatus||Va(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 uj(a){a.g&&a.i.classList.add("shaka-hidden")}
350
- tj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vj(a,b,c){var d=wj,e=xj;switch(b.mimeType){case "video/webm":d=yj;break;case "video/mp4":d=zj}switch(c){case "DASH":e=Aj;break;case "HLS":e=Bj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",tj);tj.prototype.release=tj.prototype.release;var wj=0,yj=1,zj=2,Bj=0,Aj=1,xj=-1;function Cj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ua=c||function(){};this.T=d||null;this.j={};this.o=new eb;this.m={};this.H=null;this.L=new Sf;this.M="";this.da=!1;this.l=Dj(this,this.L);this.C=!1;this.I=new rg(function(){return Ej(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.ta=!1;this.ia=new Sf;this.s=!1;this.ea=!0;this.K=this.Y=null}
350
+ tj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vj(a,b,c){var d=wj,e=xj;switch(b.mimeType){case "video/webm":d=yj;break;case "video/mp4":d=zj}switch(c){case "DASH":e=Aj;break;case "HLS":e=Bj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",tj);tj.prototype.release=tj.prototype.release;var wj=0,yj=1,zj=2,Bj=0,Aj=1,xj=-1;function Cj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ua=c||function(){};this.U=d||null;this.j={};this.o=new eb;this.m={};this.H=null;this.L=new Sf;this.M="";this.da=!1;this.l=Dj(this,this.L);this.C=!1;this.I=new rg(function(){return Ej(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.ta=!1;this.ia=new Sf;this.s=!1;this.ea=!0;this.K=this.Y=null}
351
351
  function Dj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.M=Fj(c);a.i.src=a.M;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.M=Fj(c);a.i.src=a.M;return c}
352
- function Gj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?D(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Ld;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Nd(h,k),!ee(m))return p.return(!1)}else if(b==c.fa?k=Oe(k):b==c.S&&(k=Pe(k,h)),n=
352
+ function Gj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?D(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Ld;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Nd(h,k),!ee(m))return p.return(!1)}else if(b==c.fa?k=Oe(k):b==c.T&&(k=Pe(k,h)),n=
353
353
  Rd(a,h,k),q=Pd(h,k),!kb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=Cj.prototype;r.destroy=function(){return this.I.destroy()};
354
354
  function Ej(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(ne)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new R(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return D(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
355
- a.j={};a.T=null;a.K=null;G(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Ld,D(m,e.L,2);case 2:e.B=b,e.aa=c,e.ta=d,e.pa=!e.B&&"HLS"==e.aa&&!e.ta,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return D(m,Hj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.S]=[],e.j[f.fa]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
356
- function Hj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v;return L(function(w){switch(w.g){case 1:return e=Ld,f=Oa,g=Pa,D(w,Gj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Nd(c.mimeType,d);if(b==e.ma){Ij(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!kb(h)||!a.B&&Od.includes(h))k=!0;l=Pd(c.mimeType,d);if(!k){w.u(4);break}m=Hd(e.S,(d||"").split(","));n=Hd(e.fa,(d||"").split(","));if(!m||!n){w.u(5);break}a.s=!0;return D(w,Hj(a,e.S,c,m),6);case 6:return D(w,
355
+ a.j={};a.U=null;a.K=null;G(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Ld,D(m,e.L,2);case 2:e.B=b,e.aa=c,e.ta=d,e.pa=!e.B&&"HLS"==e.aa&&!e.ta,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return D(m,Hj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.T]=[],e.j[f.fa]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
356
+ function Hj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v;return L(function(w){switch(w.g){case 1:return e=Ld,f=Oa,g=Pa,D(w,Gj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Nd(c.mimeType,d);if(b==e.ma){Ij(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!kb(h)||!a.B&&Od.includes(h))k=!0;l=Pd(c.mimeType,d);if(!k){w.u(4);break}m=Hd(e.T,(d||"").split(","));n=Hd(e.fa,(d||"").split(","));if(!m||!n){w.u(5);break}a.s=!0;return D(w,Hj(a,e.T,c,m),6);case 6:return D(w,
357
357
  Hj(a,e.fa,c,n),7);case 7:return w.return();case 5:if(q=lc(l))p=q(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.I);try{v=a.l.addSourceBuffer(u)}catch(A){throw new R(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.B&&(v.mode=Jj);a.o.D(v,"error",function(){a.j[b][0].p.reject(new R(2,3,3014,a.i.error?a.i.error.code:0))});a.o.D(v,"updateend",function(){return Kj(a,b)});a.h[b]=v;a.G[b]=h;a.qa[b]=!!c.drmInfos.length;G(w)}})}
358
358
  r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
359
359
  function Ij(a,b,c,d){a.g||(a.g=new de(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ba;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,fe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):pb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):pb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
@@ -361,22 +361,22 @@ function Lj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Mj(a,b){a.C
361
361
  r.ob=function(){var a={total:this.C?[]:Ei(this.i.buffered),audio:this.C?[]:Ei(Nj(this,"audio")),video:this.C?[]:Ei(Nj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Nj(a,b){try{return a.h[b].buffered}catch(c){return null}}
362
362
  function Qj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Od.includes(e))f=Li(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ua([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(n){l=Oi(n.reader,
363
363
  n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!sj(h)||(a.K?a.K.clearData():a.K=new fj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ua(h,f,d?d.endTime:null));return g}
364
- function Rj(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,q,p,u,v,w,A,y,z,B;return L(function(C){switch(C.g){case 1:m=Ld;if(b!=m.ma){C.u(2);break}if(!a.B){C.u(3);break}return D(C,a.ia,4);case 4:n=C.h,a.g.s=n;case 3:return D(C,he(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return C.return();case 2:if(l||!a.s){C.u(6);break}return D(C,Rj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return D(C,Rj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
364
+ function Rj(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,q,p,u,v,w,A,y,z,B;return L(function(C){switch(C.g){case 1:m=Ld;if(b!=m.ma){C.u(2);break}if(!a.B){C.u(3);break}return D(C,a.ia,4);case 4:n=C.h,a.g.s=n;case 3:return D(C,he(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return C.return();case 2:if(l||!a.s){C.u(6);break}return D(C,Rj(a,m.T,c,d,e,f,g,h,k,!0),7);case 7:return D(C,Rj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
365
365
  case 6:if(!a.h[b])return C.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Qj(a,b,c,d,p,q),null!=u&&(v=d.startTime-u,w=Math.abs(q-v),(.001<=w||g||h)&&(!k||0<v||!q)&&(q=v,a.pa&&(Sj(a,b,function(){return Tj(a,b)}),Sj(a,b,function(){return Uj(a,b,q)}))),A=b==m.fa||!(m.fa in a.h),a.B&&A&&a.ia.resolve(q)));f&&b==m.fa&&(a.g||Ij(a,"application/cea-608",a.B,!1),a.H||(y=p.split(";",1)[0],a.H=new Gb(y)),d?(z=a.H.i(c),z.length&&le(a.g,z,d.startTime,d.endTime,q)):a.H.init(c,
366
- h));if(!a.m[b]){C.u(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=Vj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(B=d.startTime,Sj(a,b,function(){return Tj(a,b)}),Sj(a,b,function(){return Uj(a,b,B)})),D(C,Sj(a,b,function(){var F=c;if("video"==b&&a.T){var J=a.T;J.g&&J.g.appendBuffer(F,"video",J.o,-q)}a.h[b].appendBuffer(F)}),11);case 11:G(C)}})}function Wj(a,b){var c=Oj(a,"video")||0;je(a.g,b,c)}function Xj(a){a.g&&je(a.g,"",0)}
367
- r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Ld,a==e.ma?D(f,d.g.remove(b,c),0):D(f,Sj(d,a,function(){return Yj(d,a,b,c)}),4)):d.s?D(f,Sj(d,e.S,function(){return Yj(d,e.S,b,c)}),0):f.u(0)})};function Zj(a,b){var c;return L(function(d){return 1==d.g?(c=Ld,b==c.ma?a.g?D(d,a.g.remove(0,Infinity),0):d.return():D(d,Sj(a,b,function(){return Yj(a,b,0,a.l.duration)}),4)):a.s?D(d,Sj(a,c.S,function(){return Yj(a,c.S,0,a.l.duration)}),0):d.u(0)})}
368
- r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ld,a==c.ma?d.return():D(d,Sj(b,a,function(){b.i.currentTime-=.001;Kj(b,a)}),2)):b.s?D(d,Sj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Kj(b,e)}),0):d.u(0)})};
369
- function ak(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Ld;if(b==l.ma)return f||(a.g.s=c),ie(a.g,d,e),q.return();m=[];return D(q,bk(a,b,g,h,k),2)}n=q.h;n||(m.push(Sj(a,b,function(){return Tj(a,b)})),a.s&&m.push(Sj(a,l.S,function(){return Tj(a,l.S)})));f||(m.push(Sj(a,b,function(){return Uj(a,b,c)})),a.s&&m.push(Sj(a,l.S,function(){return Uj(a,l.S,c)})));m.push(Sj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Kj(a,b)}));a.s&&m.push(Sj(a,
370
- l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Kj(a,p)}));return D(q,Promise.all(m),0)})}function ck(a,b,c){var d;return L(function(e){if(1==e.g){d=Ld;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Sf);Sj(a,b,function(){return Tj(a,b)});a.s&&Sj(a,d.S,function(){return Tj(a,d.S)});return D(e,Sj(a,b,function(){return Uj(a,b,c)}),2)}return a.s?D(e,Sj(a,d.S,function(){return Uj(a,d.S,c)}),0):e.u(0)})}
366
+ h));if(!a.m[b]){C.u(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=Vj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(B=d.startTime,Sj(a,b,function(){return Tj(a,b)}),Sj(a,b,function(){return Uj(a,b,B)})),D(C,Sj(a,b,function(){var F=c;if("video"==b&&a.U){var J=a.U;J.g&&J.g.appendBuffer(F,"video",J.o,-q)}a.h[b].appendBuffer(F)}),11);case 11:G(C)}})}function Wj(a,b){var c=Oj(a,"video")||0;je(a.g,b,c)}function Xj(a){a.g&&je(a.g,"",0)}
367
+ r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Ld,a==e.ma?D(f,d.g.remove(b,c),0):D(f,Sj(d,a,function(){return Yj(d,a,b,c)}),4)):d.s?D(f,Sj(d,e.T,function(){return Yj(d,e.T,b,c)}),0):f.u(0)})};function Zj(a,b){var c;return L(function(d){return 1==d.g?(c=Ld,b==c.ma?a.g?D(d,a.g.remove(0,Infinity),0):d.return():D(d,Sj(a,b,function(){return Yj(a,b,0,a.l.duration)}),4)):a.s?D(d,Sj(a,c.T,function(){return Yj(a,c.T,0,a.l.duration)}),0):d.u(0)})}
368
+ r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ld,a==c.ma?d.return():D(d,Sj(b,a,function(){b.i.currentTime-=.001;Kj(b,a)}),2)):b.s?D(d,Sj(b,c.T,function(){var e=c.T;b.i.currentTime-=.001;Kj(b,e)}),0):d.u(0)})};
369
+ function ak(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Ld;if(b==l.ma)return f||(a.g.s=c),ie(a.g,d,e),q.return();m=[];return D(q,bk(a,b,g,h,k),2)}n=q.h;n||(m.push(Sj(a,b,function(){return Tj(a,b)})),a.s&&m.push(Sj(a,l.T,function(){return Tj(a,l.T)})));f||(m.push(Sj(a,b,function(){return Uj(a,b,c)})),a.s&&m.push(Sj(a,l.T,function(){return Uj(a,l.T,c)})));m.push(Sj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Kj(a,b)}));a.s&&m.push(Sj(a,
370
+ l.T,function(){var p=l.T;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Kj(a,p)}));return D(q,Promise.all(m),0)})}function ck(a,b,c){var d;return L(function(e){if(1==e.g){d=Ld;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Sf);Sj(a,b,function(){return Tj(a,b)});a.s&&Sj(a,d.T,function(){return Tj(a,d.T)});return D(e,Sj(a,b,function(){return Uj(a,b,c)}),2)}return a.s?D(e,Sj(a,d.T,function(){return Uj(a,d.T,c)}),0):e.u(0)})}
371
371
  r.endOfStream=function(a){var b=this;return L(function(c){return D(c,dk(b,function(){Lj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.ab=function(a){var b=this;return L(function(c){return D(c,dk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Sf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Yj(a,b,c,d){d<=c?Kj(a,b):a.h[b].remove(c,d)}
372
372
  function Tj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Kj(a,b)}function Uj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Kj(a,b)}function Kj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),ek(a,b))}}function Sj(a,b,c){sg(a.I);c={start:c,p:new Sf};a.j[b].push(c);1==a.j[b].length&&fk(a,b);return c.p}
373
373
  function dk(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:sg(a.I);c=[];d={};for(e in a.h)d.Jc=new Sf,f={start:function(m){return function(){return m.Jc.resolve()}}(d),p:d.Jc},a.j[e].push(f),c.push(d.Jc),1==a.j[e].length&&f.start(),d={Jc:d.Jc};ra(l,2);return D(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),D(l,b(),6);case 6:xa(l);for(h in a.h)ek(a,h);ya(l,0);break;case 5:throw k=va(l),new R(2,3,3015,k,a.i.error||"No error in the media element");
374
374
  }})}function ek(a,b){a.j[b].shift();fk(a,b)}function fk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new R(2,3,3017,b)):c.p.reject(new R(2,3,3015,d,a.i.error||"No error in the media element")),ek(a,b)}}function Vj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Sc()||Qc()||Rc("SOPOpenBrowser"))&&"mp4"==Td(a.G[d])&&(b=ni(b));return b}
375
375
  function gk(a,b,c,d){return Sj(a,b,function(){b!==Jd&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Kj(a,b))})}
376
376
  function hk(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E;return L(function(H){switch(H.g){case 1:c=Ld;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(H,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(ne)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new R(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.l.removeSourceBuffer(v)}catch(K){}}return D(H,
377
- Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Sf,a.l=Dj(a,a.L),D(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),A=new Sf,y=a.l.sourceBuffers,z=b.size,B=0,C=function(){B++;B===z&&(A.resolve(),a.o.Kb(y,"addsourcebuffer",C))},a.o.D(y,"addsourcebuffer",C),F=t(b.keys()),J=F.next();case 6:if(J.done)return a.i.currentTime=d,D(H,A,2);I=J.value;E=b.get(I);return D(H,Hj(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=F.next();H.u(6);
377
+ Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Sf,a.l=Dj(a,a.L),D(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),A=new Sf,y=a.l.sourceBuffers,z=b.size,B=0,C=function(){B++;B===z&&(A.resolve(),a.o.Kb(y,"addsourcebuffer",C))},a.o.D(y,"addsourcebuffer",C),F=t(b.keys()),J=F.next();case 6:if(J.done)return a.i.currentTime=d,D(H,A,2);I=J.value;E=b.get(I);return D(H,Hj(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.T]=[],a.j[c.fa]=[]):a.j[I]=[];J=F.next();H.u(6);
378
378
  break;case 2:xa(H),a.C=!1,sg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function ik(a,b){return dk(a,function(){return hk(a,b)})}
379
- function bk(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,z;return L(function(B){if(1==B.g){f=Ld;if(b==f.ma)return B.return(!1);g=Wd(Yd(a.G[b]));h=Xd(a.G[b]);l=!1;m=Nd(c,d);n=a.A.forceTransmux;if(!kb(m)||!a.B&&Od.includes(m))n=!0;n&&(q=Pd(c,d),p=lc(q))&&(k=p(),u=Hd(f.S,(d||"").split(",")),v=Hd(f.fa,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.S&&(w=u),m=k.convertCodecs(b,Pd(c,w))):m=k.convertCodecs(b,q));A=Wd(Yd(m));y=Xd(m);if(g===A&&h===y)return B.return(!1);z=!0;if(a.s||l&&k&&!a.m[b])z=!1;if(z&&"smooth"===
379
+ function bk(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,z;return L(function(B){if(1==B.g){f=Ld;if(b==f.ma)return B.return(!1);g=Wd(Yd(a.G[b]));h=Xd(a.G[b]);l=!1;m=Nd(c,d);n=a.A.forceTransmux;if(!kb(m)||!a.B&&Od.includes(m))n=!0;n&&(q=Pd(c,d),p=lc(q))&&(k=p(),u=Hd(f.T,(d||"").split(",")),v=Hd(f.fa,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.T&&(w=u),m=k.convertCodecs(b,Pd(c,w))):m=k.convertCodecs(b,q));A=Wd(Yd(m));y=Xd(m);if(g===A&&h===y)return B.return(!1);z=!0;if(a.s||l&&k&&!a.m[b])z=!1;if(z&&"smooth"===
380
380
  a.A.codecSwitchingStrategy&&nb())return D(B,gk(a,b,m,k),3);k&&k.destroy();return D(B,ik(a,e),3)}return B.return(!0)})}function jk(a,b,c,d){if(b==Jd)var e=!1;else{e=Wd(Yd(a.G[b]));var f=Xd(a.G[b]),g=Nd(c,d),h=a.A.forceTransmux;if(!kb(g)||!a.B&&Od.includes(g))h=!0;c=Pd(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Wd(Yd(g));g=Xd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Fj=window.URL.createObjectURL,Jj="sequence";function kk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=kk.prototype;r.getDuration=function(){return this.j};r.uh=function(){return this.g};r.Gg=function(a){this.i=a};r.ab=function(a){this.j=a};r.yh=function(){return this.i};r.Eg=function(a){this.A=a};r.Bc=function(a){this.F=a};r.me=function(a){this.m=a};r.Pd=function(){return this.m};r.Ff=function(a){this.s=a};r.nh=function(){return this.s};
381
381
  r.tg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.fe(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
382
382
  r.md=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.g=Math.max(this.g,e.endTime-e.startTime));this.fe(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Zd=function(){this.o=!0};r.Sh=function(){return this.o};r.Fg=function(a){this.B=a};r.rh=function(){return this.B};
@@ -413,49 +413,49 @@ function $k(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();
413
413
  function Zk(a,b,c){var d=new Uint8Array(0);a.ie=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=Ad(d,e):d=e,a.If?D(f,a.If(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}Yk.prototype.abort=function(){this.ie&&this.ie.abort()};function fl(a){bg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(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))})).Pa(2)}na(fl,bg);fl.prototype.release=function(){this.g.clear();this.h.stop();bg.prototype.release.call(this)};function gl(a){bg.call(this);this.g=new Map;this.h=a}na(gl,bg);gl.prototype.release=function(){this.g.clear();bg.prototype.release.call(this)};function hl(a,b){var c=a.g.get(b);c||(c={od:[],Yf:null,contentType:b},a.g.set(b,c));return c}function il(a,b,c){var d=hl(a,b.contentType);jl(a,d);a={jf:b,position:c};d=d.od;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
414
414
  gl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.od;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.jf;break a}}d=null}if(e=d)e=c.Yf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
415
415
  if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Yf=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function jl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.od;b.od=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.od=[]};function kl(a,b,c,d,e){a=jg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ll(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new rg(function(){return ml(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.M=0;this.L=Infinity}r=ll.prototype;r.destroy=function(){return this.l.destroy()};
416
- function ml(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,nl(e),b.push(ol(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,cl(h);return D(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
417
- r.configure=function(a){this.h=a;this.I=new Pf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.X&&(cl(b.X),b.X=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,cl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Jd))&&
418
- b.X&&(cl(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.X&&(cl(b.X),b.X=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.X?(dl(c.X,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.X=null)):0<a.segmentPrefetchLimit&&(c.X=pl(this,c.stream));a.disableAudioPrefetch||ql(this)};function rl(a,b,c){a.m.presentationTimeline.R()||(a.M=b,a.L=c)}
419
- r.start=function(a){var b=this;return L(function(c){if(1==c.g)return D(c,sl(b,a||new Map),2);sg(b.l);b.C=!0;G(c)})};function tl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Ld,a.H++,d=a.H,ra(l,2),D(l,Zj(a.g.W,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Nd(b.mimeType,b.codecs),Ij(a.g.W,f,a.m.sequenceMode,b.external),g=a.g.W.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=ul(a,b),a.i.set(c.ma,k),vl(a,k,0)),G(l)}})}
416
+ function ml(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,nl(e),b.push(ol(e)),e.S&&(cl(e.S),e.S=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,cl(h);return D(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
417
+ r.configure=function(a){this.h=a;this.I=new Pf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.S&&(cl(b.S),b.S=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,cl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Jd))&&
418
+ b.S&&(cl(b.S),b.S=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.S&&(cl(b.S),b.S=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.S?(dl(c.S,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(cl(c.S),c.S=null)):0<a.segmentPrefetchLimit&&(c.S=pl(this,c.stream));a.disableAudioPrefetch||ql(this)};function rl(a,b,c){a.m.presentationTimeline.R()||(a.M=b,a.L=c)}
419
+ r.start=function(a){var b=this;return L(function(c){if(1==c.g)return D(c,sl(b,a||new Map),2);sg(b.l);b.C=!0;G(c)})};function tl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Ld,a.H++,d=a.H,ra(l,2),D(l,Zj(a.g.X,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Nd(b.mimeType,b.codecs),Ij(a.g.X,f,a.m.sequenceMode,b.external),g=a.g.X.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=ul(a,b),a.i.set(c.ma,k),vl(a,k,0)),G(l)}})}
420
420
  function wl(a){var b=a.i.get(Jd);b&&(nl(b),ol(b).catch(function(){}),a.i.delete(Jd));a.s=null}function xl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.le(c);(d=a.i.get("audio"))&&d.Z&&d.Z.le(c);(d=a.i.get(Jd))&&d.Z&&d.Z.le(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.fc&&(yl(a,b,!1,0,!1),c.fc=d);else if(b=c.fc)c.fc=null,yl(a,b,!0,0,!1)}
421
421
  function zl(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.C&&(b.video&&yl(a,b.video,c,d,e,f),b.audio&&yl(a,b.audio,c,d,e,f))}function Al(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):D(c,b.createSegmentIndex(),2):c.return();yl(a,b,!0,0,!1);G(c)})}
422
- function yl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Jd?g&&(g.fc&&(b.trickModeVideo?(g.fc=b,b=b.trickModeVideo):g.fc=null),g.stream!=b||e)&&(a.o.has(b)?g.X=a.o.get(b):g.X&&el(g.X,b),b.type==Jd&&(e=Nd(b.mimeType,b.codecs),Ij(a.g.W,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Sf=!!f,c&&(g.Uc?g.oe=!0:g.Na?(g.Lb=!0,g.Jd=d,g.oe=!0):(nl(g),Bl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Cl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
422
+ function yl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Jd?g&&(g.fc&&(b.trickModeVideo?(g.fc=b,b=b.trickModeVideo):g.fc=null),g.stream!=b||e)&&(a.o.has(b)?g.S=a.o.get(b):g.S&&el(g.S,b),b.type==Jd&&(e=Nd(b.mimeType,b.codecs),Ij(a.g.X,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Sf=!!f,c&&(g.Uc?g.oe=!0:g.Na?(g.Lb=!0,g.Jd=d,g.oe=!0):(nl(g),Bl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Cl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
423
423
  tl(a,b)}
424
- function Cl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.$a)return e.return();c=b.stream;d=b.$a;return c.segmentIndex?e.u(2):D(e,c.createSegmentIndex(),2)}if(b.$a!=d||b.stream!=c)return e.return();var f=a.g.Nd();var g=Oj(a.g.W,b.type),h=b.stream.segmentIndex.find(b.La?b.La.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
424
+ function Cl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.$a)return e.return();c=b.stream;d=b.$a;return c.segmentIndex?e.u(2):D(e,c.createSegmentIndex(),2)}if(b.$a!=d||b.stream!=c)return e.return();var f=a.g.Nd();var g=Oj(a.g.X,b.type),h=b.stream.segmentIndex.find(b.La?b.La.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
425
425
  8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.$a.h.g>h?!0:!1):f=!1;f&&b.$a.abort();G(e)})}
426
- r.pd=function(){if(this.g)for(var a=this.g.Nd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.W;e.C?e=!1:d==Jd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Nj(e,d),e=Ci(e,a));e||((null!=Oj(this.g.W,d)||c.Na)&&Dl(this,c),c.$a&&(c.$a.abort(),c.$a=null),d===Jd&&(d=this.g.W,d.H&&d.H.g()),c.pd=!0)}};
427
- function Dl(a,b){b.Uc||b.Lb||(b.Na?(b.Lb=!0,b.Jd=0):null==Mj(a.g.W,b.type)?null==b.ub&&vl(a,b,0):(nl(b),Bl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
428
- function sl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Ld;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.W;return D(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(a.l);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=ul(a,l),b.has(l.id)&&(n=
429
- b.get(l.id),Vk(n,function(p,u,v){return El(p,u,v||null,a.h.retryParameters,a.g.zb)}),m.X=n),a.i.set(k,m),vl(a,m,0));G(q)})}function ul(a,b){return{stream:b,type:b.type,Z:null,X:pl(a,b),La:null,bc:null,ff:null,df:null,cf:null,fc:null,endOfStream:!1,Na:!1,ub:null,Lb:!1,Jd:0,oe:!1,Uc:!1,pd:!0,yf:!1,hd:!1,$a:null}}
430
- function pl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Jd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Jd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.X)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Uk(a.h.segmentPrefetchLimit,b,function(d,e,f){return El(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
431
- function ql(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),dl(f,b),!(0<b&&c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.X)&&cl(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d))||!(f=pl(a,d.Fa.audio))||
432
- (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.W.ab(a):this.g.W.ab(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
426
+ r.pd=function(){if(this.g)for(var a=this.g.Nd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.X;e.C?e=!1:d==Jd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Nj(e,d),e=Ci(e,a));e||((null!=Oj(this.g.X,d)||c.Na)&&Dl(this,c),c.$a&&(c.$a.abort(),c.$a=null),d===Jd&&(d=this.g.X,d.H&&d.H.g()),c.pd=!0)}};
427
+ function Dl(a,b){b.Uc||b.Lb||(b.Na?(b.Lb=!0,b.Jd=0):null==Mj(a.g.X,b.type)?null==b.ub&&vl(a,b,0):(nl(b),Bl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
428
+ function sl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Ld;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.T,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.X;return D(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(a.l);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=ul(a,l),b.has(l.id)&&(n=
429
+ b.get(l.id),Vk(n,function(p,u,v){return El(p,u,v||null,a.h.retryParameters,a.g.zb)}),m.S=n),a.i.set(k,m),vl(a,m,0));G(q)})}function ul(a,b){return{stream:b,type:b.type,Z:null,S:pl(a,b),La:null,bc:null,ff:null,df:null,cf:null,fc:null,endOfStream:!1,Na:!1,ub:null,Lb:!1,Jd:0,oe:!1,Uc:!1,pd:!0,yf:!1,hd:!1,$a:null}}
430
+ function pl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Jd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Jd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.S)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Uk(a.h.segmentPrefetchLimit,b,function(d,e,f){return El(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
431
+ function ql(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),dl(f,b),!(0<b&&c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.S)&&cl(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d))||!(f=pl(a,d.Fa.audio))||
432
+ (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.X.ab(a):this.g.X.ab(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
433
433
  function Fl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:sg(a.l);if(b.Na||null==b.ub||b.Uc)return h.return();b.ub=null;if(!b.Lb){h.u(2);break}return D(h,Bl(a,b,b.oe,b.Jd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Na||b.ub||vl(a,b,0),h.return();case 4:ra(h,6);d=Gl(a,b);null!=d&&(vl(a,b,d),b.hd=!1);ta(h,7);break;case 6:return e=
434
- va(h),D(h,Hl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return D(h,a.g.W.endOfStream(),10);case 10:sg(a.l),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),G(h)}})}
435
- function Gl(a,b){if(Il(b))return Wj(a.g.W,b.stream.originalId||""),null;b.type==Jd&&Xj(a.g.W);if(!a.g.W.ea&&b.type!=Jd)return a.h.updateIntervalSeconds/2;var c=a.g.Nd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ia(c,!0),Wk(e,c);d=b.La?b.La.endTime:c;e=Pj(a.g.W,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Oj(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=
436
- !0,"video"==b.type&&(a=a.i.get(Jd))&&Il(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Jl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Il(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.La?h.La.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.X&&b.Z&&!a.o.has(b.stream)&&(b.X.Ia(c),Wk(b.X,e.startTime));Kl(a,b,c,e).catch(function(){});return null}
434
+ va(h),D(h,Hl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return D(h,a.g.X.endOfStream(),10);case 10:sg(a.l),g=a.g.X.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),G(h)}})}
435
+ function Gl(a,b){if(Il(b))return Wj(a.g.X,b.stream.originalId||""),null;b.type==Jd&&Xj(a.g.X);if(!a.g.X.ea&&b.type!=Jd)return a.h.updateIntervalSeconds/2;var c=a.g.Nd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ia(c,!0),Wk(e,c);d=b.La?b.La.endTime:c;e=Pj(a.g.X,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Oj(a.g.X,b.type);if(1E-6>g&&h)return b.endOfStream=
436
+ !0,"video"==b.type&&(a=a.i.get(Jd))&&Il(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Jl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Il(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.La?h.La.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.S&&b.Z&&!a.o.has(b.stream)&&(b.S.Ia(c),Wk(b.S,e.startTime));Kl(a,b,c,e).catch(function(){});return null}
437
437
  function Jl(a,b,c,d){if(b.Z)return b.Z.current();if(b.La||d)return b.Z=b.stream.segmentIndex.xb(b.La?b.La.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
438
438
  function Kl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z;return L(function(B){switch(B.g){case 1:e=Ld;f=b.stream;g=b.Z;b.Na=!0;ra(B,2);if(2==d.Yb())throw new R(1,1,1011);return D(B,Ll(a,b,d),4);case 4:sg(a.l);if(a.A)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,v=function(C){var F,J,I,E;return L(function(H){switch(H.g){case 1:if(q)return H.return();p=!0;sg(a.l);if(a.A)return H.return();
439
- ra(H,2);n=Ml(n,C);F=!1;J=0;(new Bg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return D(H,Nl(a,b,c,f,d,I,!0),5);case 5:b.X&&b.Z&&Wk(b.X,d.startTime,!0);case 4:ta(H,0);break;case 2:u=E=va(H),G(H)}})},D(B,Ol(a,b,d,v),9);l=Ol(a,b,d);return D(B,l,7);case 7:m=B.h;sg(a.l);if(a.A)return B.return();sg(a.l);return b.Lb?(b.Na=!1,vl(a,b,0),B.return()):D(B,Nl(a,b,c,f,d,m),6);case 9:w=B.h;if(u)throw u;if(p){B.u(10);break}q=!0;sg(a.l);return a.A?
440
- B.return():b.Lb?(b.Na=!1,vl(a,b,0),B.return()):D(B,Nl(a,b,c,f,d,w),10);case 10:b.X&&b.Z&&Wk(b.X,d.startTime,!0);case 6:sg(a.l);if(a.A)return B.return();b.La=d;g.next();b.Na=!1;b.yf=!1;A=a.g.W.ob();y=A[b.type];ab(JSON.stringify(y));b.Lb||a.g.pf(d,b.stream);vl(a,b,0);ta(B,0);break;case 2:z=va(B);sg(a.l,z);if(a.A)return B.return();b.Na=!1;if(7001==z.code)b.Na=!1,nl(b),vl(a,b,0),B.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),B.u(0);else if(3017==z.code)Pl(a,b,z),B.u(0);else return b.hd=
441
- !0,1==z.category&&b.X&&bl(b.X,d),z.severity=2,D(B,Hl(a,b,z),0)}})}function Ql(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):D(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
439
+ ra(H,2);n=Ml(n,C);F=!1;J=0;(new Bg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return D(H,Nl(a,b,c,f,d,I,!0),5);case 5:b.S&&b.Z&&Wk(b.S,d.startTime,!0);case 4:ta(H,0);break;case 2:u=E=va(H),G(H)}})},D(B,Ol(a,b,d,v),9);l=Ol(a,b,d);return D(B,l,7);case 7:m=B.h;sg(a.l);if(a.A)return B.return();sg(a.l);return b.Lb?(b.Na=!1,vl(a,b,0),B.return()):D(B,Nl(a,b,c,f,d,m),6);case 9:w=B.h;if(u)throw u;if(p){B.u(10);break}q=!0;sg(a.l);return a.A?
440
+ B.return():b.Lb?(b.Na=!1,vl(a,b,0),B.return()):D(B,Nl(a,b,c,f,d,w),10);case 10:b.S&&b.Z&&Wk(b.S,d.startTime,!0);case 6:sg(a.l);if(a.A)return B.return();b.La=d;g.next();b.Na=!1;b.yf=!1;A=a.g.X.ob();y=A[b.type];ab(JSON.stringify(y));b.Lb||a.g.pf(d,b.stream);vl(a,b,0);ta(B,0);break;case 2:z=va(B);sg(a.l,z);if(a.A)return B.return();b.Na=!1;if(7001==z.code)b.Na=!1,nl(b),vl(a,b,0),B.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),B.u(0);else if(3017==z.code)Pl(a,b,z),B.u(0);else return b.hd=
441
+ !0,1==z.category&&b.S&&bl(b.S,d),z.severity=2,D(B,Hl(a,b,z),0)}})}function Ql(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):D(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
442
442
  function Ml(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Pl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.yf})){if(0<a.h.maxDisabledTime&&a.g.Ld(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.hd=!0;a.A=!0;a.g.onError(c);return}b.yf=!0}vl(a,b,4)}
443
- function Ll(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return L(function(w){switch(w.g){case 1:d=Ld;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.M)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=Wd(b.stream.codecs);k=Xd(b.stream.mimeType);l=c.timestampOffset;if(l==b.ff&&f==b.df&&g==b.cf&&h==b.ef&&k==b.ng){w.u(2);break}m=b.ef&&b.ng&&jk(a.g.W,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return D(w,ol(n).catch(function(){}),5);case 5:n.bc=
444
- null,Dl(a,n);case 3:return q=function(){var A,y,z;return L(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d.S,a.j.audio),a.j.video&&A.set(d.fa,a.j.video),ra(B,2),b.df=f,b.cf=g,b.ef=h,b.ng=k,b.ff=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(B,ak(a.g.W,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=B.g)return ta(B,0);z=va(B);b.df=null;b.cf=null;b.ef=null;b.ff=null;throw z;})},D(w,q(),2);case 2:return si(c.ca,b.bc)||(b.bc=c.ca,c.l&&c.ca&&(p=Ol(a,b,c.ca),u=function(){var A,
445
- y,z,B,C,F,J;return L(function(I){switch(I.g){case 1:return ra(I,2),D(I,p,4);case 4:return A=I.h,sg(a.l),y=null,z=new Map,B={projection:null,hfov:null},C=new Bg,C.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){y=Pi(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.dc()){case "soun":z.set(d.S,y);break;case "vide":z.set(d.fa,y)}y=null}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("avc1",Lg).box("avc3",Lg).box("hev1",Lg).box("hvc1",
446
- Lg).box("dvav",Lg).box("dva1",Lg).box("dvh1",Lg).box("dvhe",Lg).box("vexu",Gg).box("proj",Gg).O("prji",function(E){E=E.reader.dc();B.projection=E}).box("hfov",function(E){E=E.reader.N()/1E3;B.hfov=E}).parse(A),Rl(a,B),z.has(b.type)?c.ca.timescale=z.get(b.type):null!=y&&(c.ca.timescale=y),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Uf(b.type,A),5);case 5:return D(I,Rj(a.g.W,b.type,A,null,b.stream,F),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.bc=null,J;}})},a.g.$h(c.startTime,
447
- c.ca),e.push(u()))),a.m.sequenceMode&&(v=b.La?b.La.j:null,c.j!=v&&e.push(ck(a.g.W,b.type,c.startTime))),D(w,Promise.all(e),0)}})}
443
+ function Ll(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return L(function(w){switch(w.g){case 1:d=Ld;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.M)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=Wd(b.stream.codecs);k=Xd(b.stream.mimeType);l=c.timestampOffset;if(l==b.ff&&f==b.df&&g==b.cf&&h==b.ef&&k==b.ng){w.u(2);break}m=b.ef&&b.ng&&jk(a.g.X,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.T):b.type===d.T&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return D(w,ol(n).catch(function(){}),5);case 5:n.bc=
444
+ null,Dl(a,n);case 3:return q=function(){var A,y,z;return L(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d.T,a.j.audio),a.j.video&&A.set(d.fa,a.j.video),ra(B,2),b.df=f,b.cf=g,b.ef=h,b.ng=k,b.ff=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(B,ak(a.g.X,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=B.g)return ta(B,0);z=va(B);b.df=null;b.cf=null;b.ef=null;b.ff=null;throw z;})},D(w,q(),2);case 2:return si(c.ca,b.bc)||(b.bc=c.ca,c.l&&c.ca&&(p=Ol(a,b,c.ca),u=function(){var A,
445
+ y,z,B,C,F,J;return L(function(I){switch(I.g){case 1:return ra(I,2),D(I,p,4);case 4:return A=I.h,sg(a.l),y=null,z=new Map,B={projection:null,hfov:null},C=new Bg,C.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){y=Pi(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.dc()){case "soun":z.set(d.T,y);break;case "vide":z.set(d.fa,y)}y=null}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("avc1",Lg).box("avc3",Lg).box("hev1",Lg).box("hvc1",
446
+ Lg).box("dvav",Lg).box("dva1",Lg).box("dvh1",Lg).box("dvhe",Lg).box("vexu",Gg).box("proj",Gg).O("prji",function(E){E=E.reader.dc();B.projection=E}).box("hfov",function(E){E=E.reader.N()/1E3;B.hfov=E}).parse(A),Rl(a,B),z.has(b.type)?c.ca.timescale=z.get(b.type):null!=y&&(c.ca.timescale=y),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Uf(b.type,A),5);case 5:return D(I,Rj(a.g.X,b.type,A,null,b.stream,F),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.bc=null,J;}})},a.g.$h(c.startTime,
447
+ c.ca),e.push(u()))),a.m.sequenceMode&&(v=b.La?b.La.j:null,c.j!=v&&e.push(ck(a.g.X,b.type,c.startTime))),D(w,Promise.all(e),0)}})}
448
448
  function Nl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new Bg;l&&k.O("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.dc();var A=u.reader.dc();var y=u.reader.N();var z=u.reader.N();var B=u.reader.N();var C=u.reader.N();var F=e.startTime+z/y}else y=u.reader.N(),F=u.reader.zc()/
449
449
  y+e.timestampOffset,z=F-e.startTime,B=u.reader.N(),C=u.reader.N(),w=u.reader.dc(),A=u.reader.dc();u=u.reader.sb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.ai():(v=(new Map).set("detail",{startTime:F,endTime:F+B/y,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:z,eventDuration:B,id:C,messageData:u}),v=new T("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
450
450
  w||(w=Li(u),w.length&&e&&a.g.bi([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.F&&e.ca.timescale){var v=u.reader,w=u.version;v.N();u=v.N();var A=v.N();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.N():(w=v.N(),v=v.N(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ca.timescale*1E3)});v=new T("prft",v);a.g.onEvent(v);
451
- a.F=!0}});(l||m)&&k.parse(f);return D(p,Sl(a,b,c),2);case 2:return sg(a.l),n=b.pd,b.pd=!1,q=b.Sf,b.Sf=!1,D(p,a.g.Uf(b.type,f),3);case 3:return D(p,Rj(a.g.W,b.type,f,e,d,h,n,q,g),4);case 4:sg(a.l),G(p)}})}function Sl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mj(a.g.W,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():D(h,a.g.W.remove(b.type,e,e+g),2)}sg(a.l);G(h)})}
451
+ a.F=!0}});(l||m)&&k.parse(f);return D(p,Sl(a,b,c),2);case 2:return sg(a.l),n=b.pd,b.pd=!1,q=b.Sf,b.Sf=!1,D(p,a.g.Uf(b.type,f),3);case 3:return D(p,Rj(a.g.X,b.type,f,e,d,h,n,q,g),4);case 4:sg(a.l),G(p)}})}function Sl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mj(a.g.X,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():D(h,a.g.X.remove(b.type,e,e+g),2)}sg(a.l);G(h)})}
452
452
  function Il(a){return a&&a.type==Jd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
453
- function Ol(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.fd())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof ri&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.ie):f=null}f||(f=El(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.$a=f;return D(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.u(3);break}return D(l,Ql(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
453
+ function Ol(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.fd())return l.return(e);f=null;if(b.S){var m=b.S,n=m.g;c instanceof ri&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.ie):f=null}f||(f=El(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.$a=f;return D(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.u(3);break}return D(l,Ql(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
454
454
  function El(a,b,c,d,e){var f=a instanceof ti?a:void 0,g=f?1:0;a=kl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(pg,a,{type:g,stream:b,segment:f})}
455
- function Bl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.oe=!1,b.Jd=0,b.Uc=!0,b.La=null,b.bc=null,b.Z=null,b.X&&!a.o.has(b.stream)&&cl(b.X),d?(e=a.g.Nd(),f=a.g.W.getDuration(),D(g,a.g.W.remove(b.type,e+d,f),3)):D(g,Zj(a.g.W,b.type),4);if(3!=g.g)return sg(a.l),c?D(g,a.g.W.flush(b.type),3):g.u(3);sg(a.l);b.Uc=!1;b.endOfStream=!1;b.Na||b.ub||vl(a,b,0);G(g)})}
456
- function vl(a,b,c){var d=b.type;if(d!=Jd||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),D(f,Fl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).U(c)}function nl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function ol(a){return L(function(b){return a.$a?D(b,a.$a.abort(),0):b.u(0)})}
455
+ function Bl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.oe=!1,b.Jd=0,b.Uc=!0,b.La=null,b.bc=null,b.Z=null,b.S&&!a.o.has(b.stream)&&cl(b.S),d?(e=a.g.Nd(),f=a.g.X.getDuration(),D(g,a.g.X.remove(b.type,e+d,f),3)):D(g,Zj(a.g.X,b.type),4);if(3!=g.g)return sg(a.l),c?D(g,a.g.X.flush(b.type),3):g.u(3);sg(a.l);b.Uc=!1;b.endOfStream=!1;b.Na||b.ub||vl(a,b,0);G(g)})}
456
+ function vl(a,b,c){var d=b.type;if(d!=Jd||a.i.has(d))b.ub=(new Kc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),D(f,Fl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).V(c)}function nl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function ol(a){return L(function(b){return a.$a?D(b,a.$a.abort(),0):b.u(0)})}
457
457
  function Hl(a,b,c){var d;return L(function(e){if(1==e.g)return D(e,Rf(a.I),2);sg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Ld(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
458
- function Tl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Ld;if(e=a.i.get(d.S))e.bc=null,Dl(a,e),ol(e).catch(function(){});if(f=a.i.get(d.fa))f.bc=null,Dl(a,f),ol(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return D(h,ik(a.g.W,g),2)}return h.return(!0)})}
458
+ function Tl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Ld;if(e=a.i.get(d.T))e.bc=null,Dl(a,e),ol(e).catch(function(){});if(f=a.i.get(d.fa))f.bc=null,Dl(a,f),ol(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.T,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return D(h,ik(a.g.X,g),2)}return h.return(!0)})}
459
459
  function Rl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Ul(){}
460
460
  function Vl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ze(l)),k=Vl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
461
461
  k),g=!1)}return g}function Wl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Xl(a,b){return a&&b}P("shaka.util.ConfigUtils",Ul);Ul.convertToConfigObject=Wl;Ul.mergeConfigObjects=Vl;function Yl(){}function Zl(a){a=nd(a);return(new rc(a)).wb}function $l(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new R(2,6,6015);var e;"string"==typeof b?e=pd(b,!0):e=b;a=nd(a);a=pd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function am(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=nd(a).split("skd://").pop();return $l(a,c,b)}
@@ -477,13 +477,13 @@ preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",
477
477
  textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(gm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
478
478
  function hm(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:""}};return Vl(a,b,c||dm(),d,"")}
479
479
  function gm(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=ye(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return re(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-
480
- 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!=Jd&&"image"!=c.type||b.push(c);return b}function em(a){return Xl([a],a)}function fm(a){return Xl([a],a)}P("shaka.util.PlayerConfiguration",cm);cm.mergeConfigObjects=hm;cm.createDefault=dm;function im(a,b,c,d,e){bg.call(this);this.K=a;this.T=b;this.Ra=e.networkingEngine;this.Y=d;this.o=null;this.Qb=c;this.ua=0;this.lb=e.oc;this.B=e.Vh;this.mb=e.Wh;this.g=e.config;this.j=this.C=this.h=null;this.ea=!1;this.F=e.fi;this.qa=!1;this.l=null;this.da=!1;this.i=this.s=null;this.ba=!1;this.I=new Map;this.ta=!1;this.Sa=e.ei;this.aa=new Tk;this.m=new Sf;this.L=null;this.A=!1;this.cb=e.Zg;this.pa=null;this.Ta=e.Yg;this.M=!1;this.H=[];this.G=[]}na(im,bg);
480
+ 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!=Jd&&"image"!=c.type||b.push(c);return b}function em(a){return Xl([a],a)}function fm(a){return Xl([a],a)}P("shaka.util.PlayerConfiguration",cm);cm.mergeConfigObjects=hm;cm.createDefault=dm;function im(a,b,c,d,e){bg.call(this);this.K=a;this.U=b;this.Ra=e.networkingEngine;this.Y=d;this.o=null;this.Qb=c;this.ua=0;this.lb=e.oc;this.B=e.Vh;this.mb=e.Wh;this.g=e.config;this.j=this.C=this.h=null;this.ea=!1;this.F=e.fi;this.qa=!1;this.l=null;this.da=!1;this.i=this.s=null;this.ba=!1;this.I=new Map;this.ta=!1;this.Sa=e.ei;this.aa=new Tk;this.m=new Sf;this.L=null;this.A=!1;this.cb=e.Zg;this.pa=null;this.Ta=e.Yg;this.M=!1;this.H=[];this.G=[]}na(im,bg);
481
481
  function jm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function km(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function lm(a,b){a.L=b;a.M=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=im.prototype;r.getStartTime=function(){return this.Y};r.bd=function(){return this.K};r.We=function(){return this.h};function mm(a){a.ba=!0;return a.i}function nm(a){a.ea=!0;return a.j}function om(a){a.qa=!0;return a.F}r.getStats=function(){return this.aa};
482
482
  function pm(a){a.da=!0;return a.l}function qm(a){a.ta=!0;return a.I}
483
483
  r.start=function(){var a=this;(function(){var b;return L(function(c){switch(c.g){case 1:return D(c,Promise.resolve(),2);case 2:return ra(c,3),D(c,rm(a),5);case 5:return sm(a),D(c,tm(a),6);case 6:sm(a);a.o||(a.o=new Cf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
484
484
  if(a.Ta){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.cb){d=a.h.presentationTimeline.R();var e=lf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.pa=e,e.video&&um(a,e.video,d),e.audio&&um(a,e.audio,d)}return D(c,void 0,7);case 7:sm(a);a.m.resolve();ta(c,0);break;case 3:b=va(c),a.m.reject(b),G(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):bg.prototype.dispatchEvent.call(this,a)};
485
485
  r.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 sm(a){if(a.A)throw new R(2,7,7003);}function vm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
486
- function rm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){vm(a,"manifest-parser");a.j||(a.C=li(a.K,a.T),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;vm(a,"manifest");if(a.h)return g.u(2);c=a;return D(g,a.j.start(a.K,a.mb),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new R(2,4,4036);wm(a.h);e=Date.now()/1E3;f=e-b;a.aa.F=f;G(g)})}
486
+ function rm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){vm(a,"manifest-parser");a.j||(a.C=li(a.K,a.U),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;vm(a,"manifest");if(a.h)return g.u(2);c=a;return D(g,a.j.start(a.K,a.mb),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new R(2,4,4036);wm(a.h);e=Date.now()/1E3;f=e-b;a.aa.F=f;G(g)})}
487
487
  function tm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:vm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.lb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Ge(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new T("trackschanged",void 0);return D(g,Promise.resolve(),3);case 3:sm(a),a.dispatchEvent(c);case 2:return d=lf(a.h.variants),D(g,xh(a.l,d,a.h.offlineSessionIds),4);case 4:return sm(a),D(g,fi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new T("trackschanged",void 0);return D(g,
488
488
  Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=Wl(a,b);hm(this.g,a)};r.getConfiguration=function(){return ze(this.g)};
489
489
  function um(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Uk(d,b,function(l,m,n){return El(l,m,n||null,a.g.streaming.retryParameters,a.Ra)}),a.I.set(b.id,e),D(k,b.createSegmentIndex(),2);f=a.Y||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Xk(e,h.ca):Wk(e,h.startTime));G(k)})}r.Hi=function(){return this.m};
@@ -526,20 +526,20 @@ function qn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
526
526
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function vn(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=qn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
527
527
  function rn(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var pn="m",nn="a",tn="v",on="av",xn="i",zn="c",yn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Sg:"s",OTHER:"o"});function Dn(a){this.h=a;this.g=null}r=Dn.prototype;r.configure=function(a){this.h=a};r.gg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(En)?1E3*this.g.get(En):null};r.fg=function(){return this.h.enabled&&this.g&&this.g.has(Fn)?1E3*this.g.get(Fn):null};r.zh=function(){return this.h.enabled&&this.g&&this.g.has(Gn)?this.g.get(Gn):null};r.Ah=function(){return this.h.enabled&&this.g&&this.g.has(Hn)?this.g.get(Hn):null};
528
528
  r.getBandwidthEstimate=function(a){var b=this.fg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function In(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",Dn);Dn.prototype.getBandwidthEstimate=Dn.prototype.getBandwidthEstimate;Dn.prototype.getRoundTripTime=Dn.prototype.Ah;Dn.prototype.getResponseDelay=Dn.prototype.zh;Dn.prototype.getEstimatedThroughput=Dn.prototype.fg;
529
- Dn.prototype.getMaxBitrate=Dn.prototype.gg;var Fn="etp",En="mb",Gn="rd",Hn="rtt";function Jn(){this.g=null;this.h=[]}function Kn(a,b){return L(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Jn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){bg.call(this);var c=this;this.l=Ln;this.Td=this.g=null;this.da=!1;this.$d=new eb;this.Qb=new eb;this.m=new eb;this.ua=new eb;this.C=this.F=this.A=this.G=null;this.ee=0;this.Y=new Jn;this.ea=this.mf=this.qa=this.i=this.Ra=this.I=this.j=this.lb=this.K=this.yg=this.aa=this.T=this.mb=this.L=this.Vd=this.H=this.cb=null;this.Ta=!1;this.pa=this.o=null;this.wf=1E9;this.ad=[];this.M=NaN;this.h=Mn(this);this.ba={width:Infinity,height:Infinity};this.Rd=new ei(this.h,this.ba,null);this.qf=[];
530
- this.s=null;this.ta=new Cf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Sa=this.h.preferredTextLanguage;this.$c=this.h.preferredTextRole;this.Zc=this.h.preferForcedSubs;this.Xc=[];b&&b(this);this.T=Nn(this);this.aa=new Dn(this.h.cmsd);
529
+ Dn.prototype.getMaxBitrate=Dn.prototype.gg;var Fn="etp",En="mb",Gn="rd",Hn="rtt";function Jn(){this.g=null;this.h=[]}function Kn(a,b){return L(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Jn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){bg.call(this);var c=this;this.l=Ln;this.Td=this.g=null;this.da=!1;this.$d=new eb;this.Qb=new eb;this.m=new eb;this.ua=new eb;this.C=this.F=this.A=this.G=null;this.ee=0;this.Y=new Jn;this.ea=this.mf=this.qa=this.i=this.Ra=this.I=this.j=this.lb=this.K=this.yg=this.aa=this.U=this.mb=this.L=this.Vd=this.H=this.cb=null;this.Ta=!1;this.pa=this.o=null;this.wf=1E9;this.ad=[];this.M=NaN;this.h=Mn(this);this.ba={width:Infinity,height:Infinity};this.Rd=new ei(this.h,this.ba,null);this.qf=[];
530
+ this.s=null;this.ta=new Cf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Sa=this.h.preferredTextLanguage;this.$c=this.h.preferredTextRole;this.Zc=this.h.preferForcedSubs;this.Xc=[];b&&b(this);this.U=Nn(this);this.aa=new Dn(this.h.cmsd);
531
531
  this.G=On(this);this.G.Gf(this.h.streaming.forceHTTPS);this.B=null;Pn&&(this.B=Pn(),this.B.configure(this.h.ads));this.$d.D(window,"online",function(){Qn(c);c.zf()});this.Wd=new Mc(function(){return Rn(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sc(a,!0))}na(X,bg);function Sn(a){null!=a.K&&(uj(a.K),a.K.release(),a.K=null)}
532
- function Tn(a,b){b.lcevc.enabled?(Sn(a),null==a.K&&(a.K=new tj(a.g,a.yg,b.lcevc),a.F&&(a.F.T=a.K))):Sn(a)}function Un(a,b){return new T(a,b)}r=X.prototype;
533
- r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==Vn)return g.return();Sn(a);b=a.detach();a.l=Vn;return D(g,b,2);case 2:c=[];d=t(a.qf);for(e=d.next();!e.done;e=d.next())f=e.value,f.A||c.push(f.destroy());a.qf=[];return D(g,Promise.all(c),3);case 3:a.$d&&(a.$d.release(),a.$d=null);a.Qb&&(a.Qb.release(),a.Qb=null);a.m&&(a.m.release(),a.m=null);a.ua&&(a.ua.release(),a.ua=null);a.pa=null;a.h=null;a.s=null;a.Td=null;a.T=null;a.aa=null;if(!a.G){g.u(4);break}return D(g,
532
+ function Tn(a,b){b.lcevc.enabled?(Sn(a),null==a.K&&(a.K=new tj(a.g,a.yg,b.lcevc),a.F&&(a.F.U=a.K))):Sn(a)}function Un(a,b){return new T(a,b)}r=X.prototype;
533
+ r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==Vn)return g.return();Sn(a);b=a.detach();a.l=Vn;return D(g,b,2);case 2:c=[];d=t(a.qf);for(e=d.next();!e.done;e=d.next())f=e.value,f.A||c.push(f.destroy());a.qf=[];return D(g,Promise.all(c),3);case 3:a.$d&&(a.$d.release(),a.$d=null);a.Qb&&(a.Qb.release(),a.Qb=null);a.m&&(a.m.release(),a.m=null);a.ua&&(a.ua.release(),a.ua=null);a.pa=null;a.h=null;a.s=null;a.Td=null;a.U=null;a.aa=null;if(!a.G){g.u(4);break}return D(g,
534
534
  a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),bg.prototype.release.call(a),G(g)}})};function Wn(a,b){a.dispatchEvent(Un("onstatechange",(new Map).set("state",b)))}
535
535
  r.Sc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Vn)throw new R(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return D(g,c.detach(),2);case 2:return D(g,Xn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Wn(c,"attach"),e=function(){var h=Yn(c);h&&Zn(c,h)},c.Qb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return D(g,$n(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),D(g,c.detach(),10);case 10:throw f;
536
536
  }})};r.$g=function(a){this.yg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Vn)throw new R(2,7,7E3);return D(c,b.ic(!1,a),2)}if(3!=c.g)return D(c,Xn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Qb.ib(),b.g=null),Wn(b,"detach"),b.B&&!a&&b.B.release()}finally{b.Y.release()}G(c)})};function Xn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.ee,D(d,Kn(a.Y,b),2)):c!=a.ee?(a.Y.release(),d.return(!0)):d.return(!1)})}
537
537
  r.ic=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;return L(function(q){switch(q.g){case 1:return c.l!=Vn&&(c.l=Ln),D(q,Xn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ta=!1;Wn(c,"unload");a&&!Nc()&&(a=!1);Sn(c);d=c.Xc.map(function(p){return p()});c.Xc=[];return D(q,Promise.all(d),5);case 5:c.dispatchEvent(Un("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ua.ib());c.Wd.stop();c.cb&&(c.cb.release(),c.cb=null);c.Vd&&(c.Vd.stop(),c.Vd=null);
538
538
  if(!c.I){q.u(6);break}return D(q,c.I.stop(),7);case 7:c.I=null,c.Ra=null;case 6:if(!c.o){q.u(8);break}return D(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return D(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!fd("webkit")||!c.A){q.u(12);break}return D(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){q.u(14);break}return D(q,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Zm(c.g);
539
- if(!c.g||!c.g.src){q.u(16);break}return D(q,new Promise(function(p){return(new Mc(p)).U(.1)}),17);case 17:c.g.removeAttribute("src"),c.g.load();case 16:if(!c.A){q.u(18);break}return D(q,c.A.destroy(),19);case 19:c.A=null;case 18:c.qa=null;c.mf=null;c.L=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&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,
539
+ if(!c.g||!c.g.src){q.u(16);break}return D(q,new Promise(function(p){return(new Mc(p)).V(.1)}),17);case 17:c.g.removeAttribute("src"),c.g.load();case 16:if(!c.A){q.u(18);break}return D(q,c.A.destroy(),19);case 19:c.A=null;case 18:c.qa=null;c.mf=null;c.L=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&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,
540
540
  n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Tk;c.vf=null;c.ad=[];c.M=NaN;ao(c);case 3:xa(q);c.Y.release();ya(q,4);break;case 4:if(a&&Nc()&&!c.F)return D(q,$n(c),0);q.u(0)}})};r.Gi=function(a){this.ea=a};
541
541
  r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,v,w;return L(function(A){switch(A.g){case 1:if(d.l==Vn)throw new R(2,7,7E3);e=null;f="";a instanceof im?(e=a,f=e.bd()||""):f=a||"";return D(A,Kn(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new R(2,7,7002);if(!d.qa){A.u(3);break}return D(A,d.ic(!1),3);case 3:g=++d.ee;h=function(){return L(function(y){if(1==y.g)return d.ee==g?y.u(0):e?D(y,e.destroy(),3):y.u(3);throw new R(2,7,7E3);})};k=function(y,z){return L(function(B){switch(B.g){case 1:return sa(B,
542
- 2),D(B,Kn(d.Y,z),4);case 4:return D(B,h(),5);case 5:return D(B,y(),6);case 6:return D(B,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:xa(B),d.Y.release(),ya(B,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ta=!1;d.dispatchEvent(Un("loading"));if(e){c=e.T;A.u(8);break}if(c){A.u(8);break}return D(A,k(function(){return L(function(y){if(1==y.g)return D(y,bo(d,f),2);c=y.h;G(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){lm(e,d);d.s=e.getStats();A.u(11);break}return D(A,co(d,f,b,c,!0),12);case 12:(e=
542
+ 2),D(B,Kn(d.Y,z),4);case 4:return D(B,h(),5);case 5:return D(B,y(),6);case 6:return D(B,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:xa(B),d.Y.release(),ya(B,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ta=!1;d.dispatchEvent(Un("loading"));if(e){c=e.U;A.u(8);break}if(c){A.u(8);break}return D(A,k(function(){return L(function(y){if(1==y.g)return D(y,bo(d,f),2);c=y.h;G(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){lm(e,d);d.s=e.getStats();A.u(11);break}return D(A,co(d,f,b,c,!0),12);case 12:(e=
543
543
  A.h)?(lm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Tk;case 11:m=!e;n=e?e.Qb:Date.now()/1E3;d.s=e?e.getStats():new Tk;d.qa=f;d.mf=c||null;if(m)return D(A,k(function(){return L(function(y){return D(y,eo(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return D(A,k(function(){return L(function(y){return D(y,$n(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return D(A,k(function(){return L(function(y){return D(y,e.m,0)})},"waitForFinish"),17);case 17:d.h=
544
544
  e.getConfiguration();d.Rd=e.B;d.Ra=e.C;d.I=nm(e);d.mb=om(e);d.lb=e.Sa;d.i=e.We();if(q=e.o)d.ta=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(fo(d),d.configure("manifest.disableVideo",!0));d.A=pm(e);return D(A,k(function(){return L(function(y){return D(y,d.A.Sc(d.g),0)})},"drmEngine_.attach"),18);case 18:return!(p=e.s)||d.pa&&d.pa==p||(d.o=mm(e),d.pa=e.s,"function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
545
545
  function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=qm(e),v=e.pa,D(A,k(function(){return L(function(y){return D(y,go(d,n,v,u),0)})},"loadInner_"),19);case 19:km(e);A.u(14);break;case 20:return D(A,
@@ -564,18 +564,18 @@ break}v=a.i.presentationTimeline;w=a.ea||a.g.currentTime;A=v.Wb();y=v.pb();w<A?w
564
564
  mo(a);no(a);a.i.variants.some(function(H){return H.primary});if((F=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Go(a)},a.m.D(e,"timeupdate",J);F||(I=function(){return Ho(a)},a.m.D(e,"timeupdate",I),Ho(a));if(a.B)a.B.onManifestUpdated(F);a.Ta=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(E)}})}
565
565
  function eo(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Ld,d=Date.now()/1E3,e=!0,a.A=a.oc({zb:a.G,onError:function(k){Zn(a,k)},he:function(){},onExpirationUpdated:function(){var k=Un("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
566
566
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Xd(b):"",codecs:b?Yd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,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},g.fullMimeTypes.add(Nd(g.mimeType,
567
- g.codecs)),b.startsWith("audio/")?(g.type=c.S,f.audio=g):f.video=g,a.A.ba=!0,D(h,xh(a.A,[f],[]),2)):D(h,a.A.Sc(a.g),0)})}
567
+ g.codecs)),b.startsWith("audio/")?(g.type=c.T,f.audio=g):f.video=g,a.A.ba=!0,D(h,xh(a.A,[f],[]),2)):D(h,a.A.Sc(a.g),0)})}
568
568
  function ho(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(u){if(1==u.g)return Wn(a,"src-equals"),d=a.g,a.C=new Ak(d),e=!1,a.Xc.push(function(){e=!0}),null!=a.ea&&a.C.ze(a.ea),a.H=new Kk({Od:function(){return d.playbackRate},Tb:function(){return d.defaultPlaybackRate},Hf:function(v){d.playbackRate=v},rg:function(v){d.currentTime+=v}}),f=a.h.streaming.rebufferingGoal,Bo(a,d,f),g=function(){return ro(a)},h=function(){return so(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
569
569
  "ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return mo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return mo(a)}),a.m.D(d.audioTracks,"change",function(){return mo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":Io(a,v);break;case "chapters":xo(a,v);break;default:mo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return mo(a)}),
570
- a.m.D(d.textTracks,"change",function(){return mo(a)})),d.src=ln(a.T,a.qa,c),(Sc()||Vc())&&d.load(),"none"!=d.preload&&!d.autoplay&&ce(c)&&cd()&&d.load(),a.l=Jo,a.dispatchEvent(Un("streaming")),k=new Sf,rk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ye();k.resolve()}),rk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return L(function(w){if(1==w.g)return Ko(a),v=Lo(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.da=!0),w.u(2)):D(w,new Promise(function(A){a.m.na(d.textTracks,
571
- "change",A);(new Mc(A)).U(1)}),2);if(e)return w.return();Mo(a);G(w)})}),d.error?k.reject(Yn(a)):"none"==d.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Yn(a))}),l=new Promise(function(v,w){(new Mc(w)).U(a.h.streaming.loadTimeout)}),D(u,Promise.race([k,
570
+ a.m.D(d.textTracks,"change",function(){return mo(a)})),d.src=ln(a.U,a.qa,c),(Sc()||Vc())&&d.load(),"none"!=d.preload&&!d.autoplay&&ce(c)&&cd()&&d.load(),a.l=Jo,a.dispatchEvent(Un("streaming")),k=new Sf,rk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ye();k.resolve()}),rk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return L(function(w){if(1==w.g)return Ko(a),v=Lo(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.da=!0),w.u(2)):D(w,new Promise(function(A){a.m.na(d.textTracks,
571
+ "change",A);(new Mc(A)).V(1)}),2);if(e)return w.return();Mo(a);G(w)})}),d.error?k.reject(Yn(a)):"none"==d.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Yn(a))}),l=new Promise(function(v,w){(new Mc(w)).V(a.h.streaming.loadTimeout)}),D(u,Promise.race([k,
572
572
  l]),2);if((m=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Go(a)},a.m.D(d,"timeupdate",n);m||(q=function(){return Ho(a)},a.m.D(d,"timeupdate",q),Ho(a));a.B&&(a.B.onManifestUpdated(m),m&&(p=a.Ib().end,a.m.D(d,"progress",function(){var v=a.Ib().end;p!=v&&(a.B.onManifestUpdated(a.R()),p=v)})));a.Ta=!0;G(u)})}function Ko(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Ag(b,a.h.preferredVariantRole)}
573
573
  function Mo(a){var b=a.h.preferredTextLanguage;""!=b&&a.Cf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
574
- function Io(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,No(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Oo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).hc().U(.5);a.Xc.push(function(){c.stop()})}}
574
+ function Io(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,No(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Oo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).hc().V(.5);a.Xc.push(function(){c.stop()})}}
575
575
  function qo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())No(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function No(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Un("metadata",b))}
576
- function xo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).hc().U(.5);a.Xc.push(function(){c.stop()})}}r.ji=function(){for(var a=this.Y;a.g;)a.release()};r.oc=function(a){return new qh(a)};
576
+ function xo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).hc().V(.5);a.Xc.push(function(){c.stop()})}}r.ji=function(){for(var a=this.Y;a.g;)a.release()};r.oc=function(a){return new qh(a)};
577
577
  function On(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?jm(b(),!0,e):e()}b||(b=function(){return null});return new eg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Un("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
578
- In(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],In(u[1]))}var v=q}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Un("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)sn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
578
+ In(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],In(u[1]))}var v=q}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Un("downloadfailed",e))},function(e,f,g){d(function(){var h=a.U,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)sn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
579
579
  "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}sn(h,f,{ot:pn,su:!h.i})}}catch(O){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",O)}break;case pg: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.R()?"l":"v"};n.ot=wn(k);var q=n.ot===tn||n.ot===nn||n.ot===on||n.ot===yn,p=k.stream;if(p){var u=h.h.eb();if(q&&(n.bl=An(h,p.type),n.ot!==yn)){var v=Bn(h,p.type);n.dl=u?v/Math.abs(u):v}p.bandwidth&&(n.br=p.bandwidth/1E3);
580
580
  if(p.segmentIndex&&m){var w=p.segmentIndex.xb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Mb(m.$(),A.$())){var y=A.$()[0],z=f.uris[0],B=new URL(y),C=new URL(z);if(B.origin!==C.origin)var F=y;else{for(var J=B.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");F=J.join("/")}n.nor=F}if((A.Aa||A.ja)&&(m.Aa!=A.Aa||m.ja!=A.ja)){var E=A.Aa+"-";A.ja&&(E+=A.ja);n.nrr=E}}}var H=h.h.eb()||1,K=Bn(h,p.type)||
581
581
  500,M=p.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==yn&&(n.tb=Cn(h,n.ot)/1E3);sn(h,f,n)}}catch(O){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",O)}break;case 2:case 5:case 6:sn(h,f,{ot:"k"});break;case 4:sn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Fd=isNaN(f.Fd)?e:f.Fd+e)})}
@@ -584,7 +584,7 @@ function Ao(a,b){b=new xm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d
584
584
  function Bo(a,b,c){a.L=new Lf;a.L.g=Nf;Of(a.L,c,Math.min(.5,c/2));ao(a);a.Vd=(new Mc(function(){Po(a)})).Pa(.25);a.m.D(b,"waiting",function(){return Po(a)});a.m.D(b,"stalled",function(){return Po(a)});a.m.D(b,"canplaythrough",function(){return Po(a)});a.m.D(b,"progress",function(){return Po(a)})}
585
585
  function Po(a){switch(a.l){case Jo:if(a.g.ended)var b=!0;else{var c=Bi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case wo:a:if(a.g.ended||Lj(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Hb();var d=Bi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Di(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Mf:Nf;c.g=d;(b=b!=d)&&d===Mf&&(c.h=Date.now());b&&ao(a)}function po(a,b,c,d){return new Cj(a,b,c,d)}
586
586
  function Nn(a){return new kn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Vb:function(){return a.Vb()},Zb:function(){return a.Zb()},R:function(){return a.R()}},a.h.cmcd)}
587
- function vo(a){return new ll(a.i,{Nd:function(){return a.C?a.C.Ed():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},W:a.F,zb:a.G,onError:function(b){return Zn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ai:function(){a.I&&a.I.update&&a.I.update()},pf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.sg();var g=Mj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Ed()<g&&a.C.ze(g)}Po(a);d=(new Map).set("start",d).set("end",e).set("contentType",
587
+ function vo(a){return new ll(a.i,{Nd:function(){return a.C?a.C.Ed():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},X:a.F,zb:a.G,onError:function(b){return Zn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ai:function(){a.I&&a.I.update&&a.I.update()},pf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.sg();var g=Mj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Ed()<g&&a.C.ze(g)}Po(a);d=(new Map).set("start",d).set("end",e).set("contentType",
588
588
  f);a.dispatchEvent(Un("segmentappended",d));a.o&&c.fastSwitching&&b.nd&&b.Yd&&a.o.trySuggestStreams()},$h:function(b,c){(c=c.jf)&&a.lb&&il(a.lb,c,b)},Uf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Og(Ab(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Gh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
589
589
  return d},bi:function(b,c,d){qo(a,b,c,d)},Ld:function(b,c){return a.Ld(b,c)}})}
590
590
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Wl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
@@ -593,7 +593,7 @@ a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a
593
593
  100),void 0==a.manifest&&(a.manifest={}),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));var d=hm(this.h,a,Mn(this));Qo(this);return d};
594
594
  function Qo(a){a.Rd=new ei(a.h,a.ba,a.A);if(a.I){var b=ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.A&&a.A.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Vn&&gi(a.Rd,a.i)&&mo(a)}catch(f){Zn(a,f)}a.o&&no(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||oo(a)}a.G&&a.G.Gf(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.vf!=b){var c=b();c.configure?
595
595
  c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.vf=b;a.j&&(b=a.j,(c=b.i.get(Jd))&&yl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Fo(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Of(a.L,b,Math.min(.5,
596
- b/2)));a.i&&to(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B&&a.B.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Mn(this);hm(a,this.h,Mn(this));return a};
596
+ b/2)));a.i&&to(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B&&a.B.configure(a.h.ads);a.U&&a.U.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Mn(this);hm(a,this.h,Mn(this));return a};
597
597
  r.dg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.ni=function(){for(var a in this.h)delete this.h[a];hm(this.h,Mn(this),Mn(this));Qo(this)};r.sh=function(){return this.l};r.Xe=function(){return this.i?this.i.type:null};r.vh=function(){return this.g};
598
598
  r.Vb=function(){return this.G};r.bd=function(){return this.qa};r.cg=function(){return this.B?this.B:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.ac=function(){return this.i?this.i.presentationTimeline.ac():!1};r.Mh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
599
599
  r.Ib=function(){if(this.i){if(!this.Ta&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Wb(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Jh=function(){this.R()&&(this.g.currentTime=this.Ib().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.dd=function(){return this.A?this.A.dd():Infinity};
@@ -632,15 +632,15 @@ n.push(w);y={id:c.wf++,originalId:null,groupId:null,createSegmentIndex:function(
632
632
  "","")])};c.l==Jo?c.ad.push(y):c.i.imageStreams.push(y);mo(c);return z.return($e(y))}})};
633
633
  r.Ug=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=wo&&d.l!=Jo)throw new R(1,7,7004);if(c){k.u(2);break}return D(k,Xo(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),D(k,Yo(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.eg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return D(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new R(1,2,2015))})}),6);case 6:return mo(d),k.return(h);case 5:throw new R(1,
634
634
  2,2012);}})};function Xo(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),D(d,Pm(b,a.G,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new R(1,2,2011,b);}})}
635
- function Yo(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,Zo(a,b,a.G,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=$o(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fj(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var u=mn(q);u.ot=zn;u.su=!0;var v=qn(u);var w=rn(p,v)}else w=p}catch(A){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
636
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Zo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&sn(k,f,{ot:zn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
635
+ function Yo(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,Zo(a,b,a.G,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=$o(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fj(l),e="text/vtt");m=document.createElement("track");var q=a.U,p=b;try{if(q.g.enabled){var u=mn(q);u.ot=zn;u.su=!0;var v=qn(u);var w=rn(p,v)}else w=p}catch(A){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
636
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Zo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&sn(k,f,{ot:zn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
637
637
  function $o(a,b,c,d){var e=fe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),jn(b,d);throw new R(2,2,2014,c);}r.zi=function(a,b){this.ba.width=a;this.ba.height=b};r.zf=function(a){if(this.l==wo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.hd||d.Na||d.ub||(d.hd=!1,vl(b,d,a));b=!0}}else b=!1;return b};
638
638
  r.We=function(){Va("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};r.th=function(){return this.Ra};
639
639
  function Mn(a){var b=dm();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.zf(d))}};b.textDisplayFactory=function(){if(a.Td){var c=a.getConfiguration();return new $m(a.g,a.Td,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Um(a.g,"Shaka Player TextTrack"):new Xm};return b}r.Lg=function(a){this.Td=a};
640
640
  function ko(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 Jk,l=e.closedCaptions.get(g);h={id:a.wf++,originalId:g,groupId:null,
641
641
  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:Jd,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([Nd(h,"")])};b.textStreams.push(h);c.add(g)}}
642
642
  function Co(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?D(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(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)})}
643
- function ao(a){var b=a.$e();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Lk(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);ro(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Un("buffering",b))}function so(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Un("ratechange"),a.dispatchEvent(b))}
643
+ function ao(a){var b=a.$e();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Lk(c);a.U&&(c=a.U,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);ro(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Un("buffering",b))}function so(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Un("ratechange"),a.dispatchEvent(b))}
644
644
  function ro(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Nf?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");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(Un("statechanged",c)))}}
645
645
  function Go(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.dg();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.td(d):1==e&&b!==a.H.Tb()&&a.Tc()}if(c&&(e=a.Ib(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
646
646
  g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Jo){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
@@ -665,14 +665,14 @@ X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prot
665
665
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?D(h,Zh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in mi)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!mi[m]:Oc(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.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(Od));
666
666
  k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=ee(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=cp;for(g in f)e[g]=f[g]();return h.return(e)})};
667
667
  X.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Pn=a};
668
- X.registerSupportPlugin=function(a,b){cp[a]=b};X.prototype.destroy=X.prototype.destroy;var Vn=0,Ln=1,wo=2,Jo=3;X.LoadMode={DESTROYED:Vn,NOT_LOADED:Ln,MEDIA_SOURCE:wo,SRC_EQUALS:Jo};X.version="v4.8.18";var dp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(dp[0]),Number(dp[1])));var cp={},Pn=null;function ep(){this.h=[];this.j=this.i=this.g=0};function fp(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 eb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=fp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
668
+ X.registerSupportPlugin=function(a,b){cp[a]=b};X.prototype.destroy=X.prototype.destroy;var Vn=0,Ln=1,wo=2,Jo=3;X.LoadMode={DESTROYED:Vn,NOT_LOADED:Ln,MEDIA_SOURCE:wo,SRC_EQUALS:Jo};X.version="v4.8.19";var dp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(dp[0]),Number(dp[1])));var cp={},Pn=null;function ep(){this.h=[];this.j=this.i=this.g=0};function fp(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 eb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=fp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
669
669
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
670
670
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.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)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
671
671
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
672
672
  r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",fp);fp.prototype.release=fp.prototype.release;
673
673
  fp.prototype.getPodIndex=fp.prototype.getPodIndex;fp.prototype.getTimeOffset=fp.prototype.getTimeOffset;fp.prototype.getMediaUrl=fp.prototype.getMediaUrl;fp.prototype.getAdvertiserName=fp.prototype.getAdvertiserName;fp.prototype.getCreativeAdId=fp.prototype.getCreativeAdId;fp.prototype.getAdId=fp.prototype.getAdId;fp.prototype.getVastMediaWidth=fp.prototype.getVastMediaWidth;fp.prototype.getVastMediaHeight=fp.prototype.getVastMediaHeight;fp.prototype.getVastMediaBitrate=fp.prototype.getVastMediaBitrate;
674
674
  fp.prototype.getDescription=fp.prototype.getDescription;fp.prototype.getTitle=fp.prototype.getTitle;fp.prototype.getPositionInSequence=fp.prototype.getPositionInSequence;fp.prototype.getSequenceLength=fp.prototype.getSequenceLength;fp.prototype.setMuted=fp.prototype.setMuted;fp.prototype.resize=fp.prototype.resize;fp.prototype.isLinear=fp.prototype.isLinear;fp.prototype.isMuted=fp.prototype.isMuted;fp.prototype.setVolume=fp.prototype.setVolume;fp.prototype.getVolume=fp.prototype.getVolume;
675
- fp.prototype.play=fp.prototype.play;fp.prototype.pause=fp.prototype.pause;fp.prototype.skip=fp.prototype.skip;fp.prototype.canSkipNow=fp.prototype.canSkipNow;fp.prototype.getTimeUntilSkippable=fp.prototype.getTimeUntilSkippable;fp.prototype.isSkippable=fp.prototype.isSkippable;fp.prototype.isPaused=fp.prototype.isPaused;fp.prototype.getRemainingTime=fp.prototype.getRemainingTime;fp.prototype.getMinSuggestedDuration=fp.prototype.getMinSuggestedDuration;fp.prototype.getDuration=fp.prototype.getDuration;function gp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new eb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.18");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
675
+ fp.prototype.play=fp.prototype.play;fp.prototype.pause=fp.prototype.pause;fp.prototype.skip=fp.prototype.skip;fp.prototype.canSkipNow=fp.prototype.canSkipNow;fp.prototype.getTimeUntilSkippable=fp.prototype.getTimeUntilSkippable;fp.prototype.isSkippable=fp.prototype.isSkippable;fp.prototype.isPaused=fp.prototype.isPaused;fp.prototype.getRemainingTime=fp.prototype.getRemainingTime;fp.prototype.getMinSuggestedDuration=fp.prototype.getMinSuggestedDuration;fp.prototype.getDuration=fp.prototype.getDuration;function gp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new eb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.19");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
676
676
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){hp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){ip(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}gp.prototype.configure=function(a){this.s=a};gp.prototype.stop=function(){this.g&&this.g.stop();this.o&&Zm(this.o)};
677
677
  gp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function ip(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));jp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
678
678
  function hp(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.B);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -691,8 +691,8 @@ r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a
691
691
  r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",np);np.prototype.release=np.prototype.release;np.prototype.getPodIndex=np.prototype.getPodIndex;np.prototype.getTimeOffset=np.prototype.getTimeOffset;np.prototype.getMediaUrl=np.prototype.getMediaUrl;np.prototype.getAdvertiserName=np.prototype.getAdvertiserName;
692
692
  np.prototype.getCreativeAdId=np.prototype.getCreativeAdId;np.prototype.getAdId=np.prototype.getAdId;np.prototype.getVastMediaWidth=np.prototype.getVastMediaWidth;np.prototype.getVastMediaHeight=np.prototype.getVastMediaHeight;np.prototype.getVastMediaBitrate=np.prototype.getVastMediaBitrate;np.prototype.getDescription=np.prototype.getDescription;np.prototype.getTitle=np.prototype.getTitle;np.prototype.getPositionInSequence=np.prototype.getPositionInSequence;np.prototype.getSequenceLength=np.prototype.getSequenceLength;
693
693
  np.prototype.setMuted=np.prototype.setMuted;np.prototype.resize=np.prototype.resize;np.prototype.isLinear=np.prototype.isLinear;np.prototype.isMuted=np.prototype.isMuted;np.prototype.setVolume=np.prototype.setVolume;np.prototype.getVolume=np.prototype.getVolume;np.prototype.play=np.prototype.play;np.prototype.pause=np.prototype.pause;np.prototype.skip=np.prototype.skip;np.prototype.canSkipNow=np.prototype.canSkipNow;np.prototype.getTimeUntilSkippable=np.prototype.getTimeUntilSkippable;
694
- np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.M=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new eb}op.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);pp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.M=[];this.F.clear()};
695
- op.prototype.release=function(){this.stop();this.o&&this.o.release()};op.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(qp(this,this.G,this.T),this.T=!1)};op.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
694
+ np.prototype.isSkippable=np.prototype.isSkippable;np.prototype.isPaused=np.prototype.isPaused;np.prototype.getRemainingTime=np.prototype.getRemainingTime;np.prototype.getMinSuggestedDuration=np.prototype.getMinSuggestedDuration;np.prototype.getDuration=np.prototype.getDuration;function op(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.M=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.U=!0;this.H="";this.o=new eb}op.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);pp(this);this.m=[];this.s=[];this.G="";this.U=!0;this.H="";this.A=null;this.j=[];this.M=[];this.F.clear()};
695
+ op.prototype.release=function(){this.stop();this.o&&this.o.release()};op.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(qp(this,this.G,this.U),this.U=!1)};op.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
696
696
  function rp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(u){if(1==u.g)return d=jg([b],Qf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=od(e)),f=a.K.request(7,d),ra(u,2),D(u,f.promise,4);if(2!=u.g){g=u.h;h=id(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new T("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
697
697
  return ta(u,0)}va(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;G(u)})}
698
698
  function qp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A;L(function(y){if(1==y.g)return d=jg([b],Qf()),e=a.K.request(7,d),ra(y,2),D(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=id(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,sp(a,A);g=a.getCuePoints();a.i(new T("ad-cue-points-changed",
@@ -723,8 +723,8 @@ function Bp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
723
723
  r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);bg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new ep};r.requestClientSideAds=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
724
724
  r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new op(a,b,c,function(e){return Cp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new Sf,rp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
725
725
  r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.G=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new R(2,10,10002);this.g&&this.g.release();this.g=new Ap(a,b,this.m,function(d){return Cp(c,d)});this.g.configure(this.l)};
726
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.8.18";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
727
- (c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Va('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.8.18";this.g.g.replaceAdTagParameters(a)};
726
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.8.19";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
727
+ (c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Va('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.8.19";this.g.g.replaceAdTagParameters(a)};
728
728
  r.getServerSideCuePoints=function(){pb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
729
729
  r.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)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
730
730
  function Cp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
@@ -739,7 +739,7 @@ var Gp="ended play playing pause pausing ratechange seeked seeking timeupdate vo
739
739
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Lp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Mp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Np=[["getConfiguration","configure"]],Op=[["isTextTrackVisible","setTextTrackVisibility"]],Pp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
740
740
  Qp=["attach","attachCanvas","detach","load","unload"];function Rp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.M=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Sp(h)};this.C=function(k,l){k=Ep(l);switch(k.type){case "event":var m=k.targetName,n=$f(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new R(q.severity,q.category,
741
741
  q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Tp.add(this)}r=Rp.prototype;r.destroy=function(){Tp.delete(this);Up(this);Vp&&Wp(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Wa=function(){return this.h};r.xf=function(){return this.I};
742
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.hc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Tp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Sf;d.s=!0;Xp(d,e)}},function(b){for(var c=t(Tp),d=c.next();!d.done;d=c.next())d=d.value,Yp="available"==b,d.l.hc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Yp&&this.l.U(Zp);(a=Vp)&&
742
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.hc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Tp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Sf;d.s=!0;Xp(d,e)}},function(b){for(var c=t(Tp),d=c.next();!d.done;d=c.next())d=d.value,Yp="available"==b,d.l.hc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Yp&&this.l.V(Zp);(a=Vp)&&
743
743
  a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Sf,this.s=!0,Xp(this,a)):Vp=null}else window.__onGCastApiAvailable!==$p&&(aq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=$p)};r.Ef=function(a){this.o=a;this.h&&bq(this,{type:"appData",appData:this.o})};
744
744
  r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new R(1,8,8E3);if(!Yp)throw new R(1,8,8001);if(a.h)throw new R(1,8,8002);a.j=new Sf;chrome.cast.requestSession(function(c){return Xp(a,c)},function(c){return cq(a,c)});return D(b,a.j,0)})};function dq(a){a.h&&chrome.cast.requestSession(function(b){return Xp(a,b)},function(b){return cq(a,b)})}r.rc=function(){if(this.h){Up(this);if(Vp){Wp(this);try{Vp.stop(function(){},function(){})}catch(a){}Vp=null}Sp(this)}};
745
745
  r.get=function(a,b){var c=this;if("video"==a){if(Jp.includes(b))return function(){return c.xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(Mp[b]&&!this.get("player","isLive")())return function(){};if(Pp.includes(b))return function(){return c.xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Qp.includes(b))return function(){return c.ki.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Kp[b]||Lp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
@@ -766,10 +766,10 @@ r.yi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.
766
766
  r.destroy=function(){var a=this,b,c;return L(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.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,bg.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
767
767
  function rq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return sq(a)};b.onSenderDisconnected=function(){return sq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&tq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);tq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return uq(a,
768
768
  e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return vq(a,e)};b.start();b=t(Gp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return wq(a,"video",e)});for(var d in ag)a.j.D(a.h,ag[d],function(e){return wq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;xq(a)});a.j.D(a.g,"playing",function(){a.o=!1;xq(a)});a.j.D(a.g,"pause",function(){xq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;xq(a)});
769
- a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,xq(a))})).U(yq)})}function sq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;xq(a)}function xq(a){var b;L(function(c){if(1==c.g)return D(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);zq(a)||Aq(a);G(c)})}
769
+ a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,xq(a))})).V(yq)})}function sq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;xq(a)}function xq(a){var b;L(function(c){if(1==c.g)return D(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);zq(a)||Aq(a);G(c)})}
770
770
  function Bq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),D(p,a.h.load(b.manifest,b.startTime),7)):D(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
771
771
  a.g.autoplay=f;b.manifest&&(a.g.play(),Aq(a));G(p)}})}function wq(a,b,c){a.h&&(qq(a),tq(a,{type:"event",targetName:b,event:c},a.l))}
772
- function qq(a){a.G.U(Cq);for(var b={video:{},player:{}},c=t(Hp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Mp)0==a.m%Mp[e]&&(b.player[e]=a.h[e]());for(var f in Kp)0==a.m%Kp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;tq(a,{type:"update",update:b},a.l);for(var g in Lp)0==a.m%Lp[g]&&(b={player:{}},b.player[g]=a.h[g](),tq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
772
+ function qq(a){a.G.V(Cq);for(var b={video:{},player:{}},c=t(Hp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Mp)0==a.m%Mp[e]&&(b.player[e]=a.h[e]());for(var f in Kp)0==a.m%Kp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;tq(a,{type:"update",update:b},a.l);for(var g in Lp)0==a.m%Lp[g]&&(b={player:{}},b.player[g]=a.h[g](),tq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
773
773
  1);zq(a)}function zq(a){return a.A&&(a.g.duration||a.h.R())?(Dq(a),a.A=!1,!0):!1}function Dq(a,b){var c={contentId:a.h.bd(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Aq(a,void 0===b?0:b,c)}
774
774
  function vq(a,b){var c=Ep(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Bq(a,c.initState,c.appData);qq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
775
775
  "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Eq(a,g,f,null)},function(h){return Eq(a,g,f,h)})}}
@@ -821,8 +821,8 @@ if(!a||!b)throw new R(2,4,4051);a=wd(a.substr(2));if(16!=a.byteLength)throw new
821
821
  var js=1,ks=(new Map).set("com.widevine.alpha",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"urn:microsoft","laurl"))?rd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",is).set("com.microsoft.playready.recommendation",is).set("com.microsoft.playready.software",is).set("com.microsoft.playready.hardware",is).set("org.w3.clearkey",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"http://dashif.org/guidelines/clearKey",
822
822
  "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Yg(a))?a:""});function ms(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Va("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
823
823
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
824
- function ns(a,b){var c=os(a,b,"timescale"),d=1;c&&(d=kh(c)||1);c=os(a,b,"duration");(c=kh(c||""))&&(c/=d);var e=os(a,b,"startNumber"),f=Number(os(a,b,"presentationTimeOffset"))||0,g=lh(e||"");if(null==e||null==g)g=1;var h=ps(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Xg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=dh(n,"t",lh),u=dh(n,"d",lh),v=dh(n,"r",jh);n=dh(n,"k",jh)||0;null!=p&&(p-=f);if(!u)break;p=null!=p?p:l;v=v||0;if(0>v)if(q){q=dh(q,"t",
825
- lh);if(null==q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=v;++q)l=p+u,k.push({start:p/b,end:l/b,Of:p,rb:n,ti:k.length+e}),p=l}b=k}return{timescale:d,Da:c,sd:g,Bb:f/d||0,Nf:f,timeline:b}}function qs(a,b){return[b(a.J),b(a.va),b(a.za)].filter(oe)}function os(a,b,c){b=qs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
824
+ function ns(a,b){var c=os(a,b,"timescale"),d=1;c&&(d=kh(c)||1);c=os(a,b,"duration");(c=kh(c||""))&&(c/=d);var e=os(a,b,"startNumber"),f=Number(os(a,b,"presentationTimeOffset"))||0,g=lh(e||"");if(null==e||null==g)g=1;var h=ps(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Xg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=dh(n,"t",lh),u=dh(n,"d",lh),v=dh(n,"r",jh);n=dh(n,"k",jh)||0;null!=p&&(p-=f);if(u){p=null!=p?p:l;v=v||0;if(0>v)if(q){q=dh(q,"t",lh);if(null==
825
+ q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=v;++q)l=p+u,k.push({start:p/b,end:l/b,Of:p,rb:n,ti:k.length+e}),p=l}}b=k}return{timescale:d,Da:c,sd:g,Bb:f/d||0,Nf:f,timeline:b}}function qs(a,b){return[b(a.J),b(a.va),b(a.za)].filter(oe)}function os(a,b,c){b=qs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
826
826
  function ps(a,b,c){b=qs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=ah(d.value,c));d=b.next());return a}
827
827
  function rs(a,b,c,d,e,f){for(var g=eh(a,"http://www.w3.org/1999/xlink","href"),h=eh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Tg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Uf(new R(2,4,4028));if("onLoad"!=h)return Uf(new R(2,4,4027));var q=Bd([d],[g]);return e.request(0,jg(q,b)).wa(function(p){p=Qg(p.data,a.tagName);if(!p)return Uf(new R(2,4,4001,g));for(a.children=
828
828
  [];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=p.attributes[v];return ss(a,b,c,q[0],e,f+1)})}
@@ -852,16 +852,16 @@ r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.
852
852
  r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.wc,e=this.h.timeline[a],f=e.ti,g=this.h.Nf+e.Of;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},u=0;u<e.rb;p={Qc:p.Qc,ve:p.ve},u++){var v=e.start+q*u,w=v+q;p.ve=u+1;p.Qc=null;v=new ti(this.i+v,this.i+w,function(A){return function(){if(!b.h)return[];
853
853
  null==A.Qc&&(A.Qc=$s(b.h.wc,b.F,f,b.B,g,A.ve,b.C));return A.Qc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,ui,this.A);v.codecs=l;v.mimeType=m;0==this.G?0<u&&v.ae():0!=u%this.G&&v.ae();n.push(v)}c=new ti(this.i+e.start,k,function(){return 0<e.rb?[]:$s(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,ui,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
854
854
  function $s(a,b,c,d,e,f,g){a=ms(a,b,c,f,d||null,e);return Bd(g(),[a]).map(function(h){return h.toString()})};function at(a){this.o=null;this.A=a;this.G=new cg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}at.prototype.configure=function(a){this.o=a};at.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};at.prototype.setManifestType=function(a){this.s=a};
855
- function bt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Bd(a.i,[ct(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),dg(a.G,e),ra(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=id(f.data),h=JSON.parse(g),1==h.VERSION&&dt(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){bt(a,b)});a.g.U(a.C);G(l)})}
856
- function ct(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function dt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){bt(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
855
+ function bt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Bd(a.i,[ct(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),dg(a.G,e),ra(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=id(f.data),h=JSON.parse(g),1==h.VERSION&&dt(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){bt(a,b)});a.g.V(a.C);G(l)})}
856
+ function ct(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function dt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){bt(a,d)});if(c=b.TTL)a.C=c;a.g.V(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
857
857
  function et(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}at.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
858
858
  function ft(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Pb:e.Pb},g=f.next())if(e.Pb=g.value,g=b.get(e.Pb))d.push({uf:e.Pb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Xi==k.Pb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Rg?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Rg),d.push({uf:e.Pb,location:h.toString()})):d.push({uf:e.Pb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
859
859
  h=a.j.get(g),e>h&&a.j.delete(g);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 rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].uf);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(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Bd(a.i,d)};function gt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=gt.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Gh=function(){return this.j};r.Ye=function(){return this.l.slice()};r.ph=function(){return this.i};
860
860
  function ht(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[it(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[jt(n),n]})),l=new Map(h.textStreams.map(function(n){return[kt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[lt(n),n]}));if(b){var m=mt(Jd);l.set(kt(m),m);m=mt("image");h.set(lt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Tf:c,Pg:d,Mg:e,kg:f}}
861
861
  r.Wf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O,S;return L(function(V){if(1==V.g){d=Ld;if(!b&&1==a.length)return e=ht(a,!1),f=e.Tf,g=e.Pg,h=e.Mg,k=e.kg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),V.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return V.return();q=ht(a,!0);p=q.Tf;u=q.Pg;v=q.Mg;w=q.kg;return D(V,Promise.all([nt(c,c.h,p,l,ot,
862
862
  pt),nt(c,c.g,u,l,ot,pt),nt(c,c.l,v,l,ot,pt),nt(c,c.i,w,l,ot,pt)]),2)}A=0;y=[];if(c.g.length&&c.h.length)for(I=t(c.h),E=I.next();!E.done;E=I.next())for(H=E.value,K=t(c.g),M=K.next();!M.done;M=K.next())N=M.value,O=ci(H.drmInfos,N.drmInfos),H.drmInfos.length&&N.drmInfos.length&&!O.length||(S=A++,y.push({id:S,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:N,bandwidth:(H.bandwidth||0)+(N.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
863
- else for(z=c.g.length?c.g:c.h,B=t(z),C=B.next();!C.done;C=B.next())F=C.value,J=A++,y.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==d.S?F:null,video:F.type==d.fa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=y;G(V)})};
864
- function qt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O;return L(function(S){switch(S.g){case 1:b=Ld;if(1==a.length)return S.return(a[0]);c=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.S}).map(function(Q){return[it(Q),Q]}))});d=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.fa}).map(function(Q){return[jt(Q),Q]}))});e=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.ma}).map(function(Q){return[kt(Q),Q]}))});
863
+ else for(z=c.g.length?c.g:c.h,B=t(z),C=B.next();!C.done;C=B.next())F=C.value,J=A++,y.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==d.T?F:null,video:F.type==d.fa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=y;G(V)})};
864
+ function qt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O;return L(function(S){switch(S.g){case 1:b=Ld;if(1==a.length)return S.return(a[0]);c=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.T}).map(function(Q){return[it(Q),Q]}))});d=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.fa}).map(function(Q){return[jt(Q),Q]}))});e=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.ma}).map(function(Q){return[kt(Q),Q]}))});
865
865
  f=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.xe}).map(function(Q){return[lt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=rt(b.ma),k.set(kt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=rt(b.xe),q.set(lt(p),p);u=new gt;return D(S,nt(u,[],c,0,st,tt),2);case 2:return v=S.h,D(S,nt(u,[],d,0,st,tt),3);case 3:return w=S.h,D(S,nt(u,[],e,0,st,tt),4);case 4:return A=S.h,D(S,nt(u,[],f,0,st,tt),5);case 5:y=S.h;z=0;if(w.length&&v.length)for(I=t(v),E=
866
866
  I.next();!E.done;E=I.next())for(H=E.value,K=t(w),M=K.next();!M.done;M=K.next())N=M.value,O=z++,N.variantIds.push(O),H.variantIds.push(O);else for(B=w.concat(v),C=t(B),F=C.next();!F.done;F=C.next())J=F.value,J.variantIds=[z++];return S.return(w.concat(v).concat(A).concat(y))}})}
867
867
  function nt(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=t(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return D(E,ut(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new R(2,4,4037);m=l.next();E.u(2);break;case 4:p=t(g);for(u=p.next();!u.done;u=p.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(z=vt(a,y,c,e,f,g))&&b.push(z);B=t(g);for(u=
@@ -894,10 +894,10 @@ r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.
894
894
  function Ut(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=ft(a.h,"Location",!0),c.length&&(b=c)),d=jg(b,a.g.retryParameters),e=Date.now(),D(k,Wt(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return D(k,Xt(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
895
895
  function Xt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(u){if(1==u.g){d=b;e=a.g.dash.manifestPreprocessor;f=em;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Rt(d,"MPD");if(!g)throw new R(2,4,4001,c);e(g);d=od(g.outerHTML)}h=Qg(d,"MPD");if(!h)throw new R(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=fm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return u.return(Yt(a,h,c));n=a.g.dash.xlinkFailGracefully;
896
896
  q=ss(h,a.g.retryParameters,n,c,a.i.networkingEngine);dg(a.F,q);return D(u,q.promise,2)}p=u.h;return u.return(Yt(a,p,c))})}
897
- function Yt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,db,Ga,Wa,ua,mb,yb,hb,Za,cf,xd,Zd,kd,Bc,$d,df,ae,yd,vi,vg,wi,xi,ef,be,ff;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Xg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Zg(l))q=Bd(d,[n])[0],m&&(a.h?et(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=ft(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);u=Promise.resolve();
897
+ function Yt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,db,Ga,Wa,ua,mb,yb,hb,Za,cf,xd,Zd,kd,Cc,$d,df,ae,yd,vi,vg,wi,xi,ef,be,ff;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Xg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Zg(l))q=Bd(d,[n])[0],m&&(a.h?et(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=ft(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);u=Promise.resolve();
898
898
  if((v=ah(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new at(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=Zg(v))(y=dh(v,"queryBeforeStart",nh,!1))?u=bt(a.h,A):bt(a.h,A);z=t(f.keys());for(B=z.next();!B.done;B=z.next())C=B.value,F=f.get(C),et(a.h,"Location",C,F)}J=Xg(b,"BaseURL");E=!1;if(a.h)for(H=t(J),K=H.next();!K.done;K=H.next())M=K.value,N=M.attributes.serviceLocation,O=Zg(M),N&&O&&(et(a.h,"BaseURL",N,O),E=!0);E&&a.h||
899
899
  (S=J.map(Zg),I=Bd(d,S));V=function(){return a.h&&E?ft(a.h,"BaseURL"):I?I:[]};Q=0;J&&J.length&&(Q=dh(J[0],"availabilityTimeOffset",mh)||0);wa=a.g.dash.ignoreMinBufferTime;Da=0;wa||(Da=dh(b,"minBufferTime",hh)||0);a.G=dh(b,"minimumUpdatePeriod",hh,-1);db=dh(b,"availabilityStartTime",gh);Ga=dh(b,"timeShiftBufferDepth",hh);Wa=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Wa||(ua=dh(b,"suggestedPresentationDelay",hh));mb=a.g.dash.ignoreMaxSegmentDuration;yb=null;mb||(yb=dh(b,"maxSegmentDuration",hh));
900
- hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,cf=t(Object.values(a.m)),xd=cf.next();!xd.done;xd=cf.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.Ia(Za.qb());else kd=a.g.defaultPresentationDelay||1.5*Da,Bc=null!=ua?ua:kd,Za=new kk(db,Bc,a.g.dash.autoCorrectDrift);Za.Bc("static"==hb);($d=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Ga=a.g.availabilityWindowOverride);null==Ga&&(Ga=Infinity);Za.me(Ga);df=b.attributes.profiles||"";ae={Fb:"static"!=hb,presentationTimeline:Za,
900
+ hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,cf=t(Object.values(a.m)),xd=cf.next();!xd.done;xd=cf.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.Ia(Za.qb());else kd=a.g.defaultPresentationDelay||1.5*Da,Cc=null!=ua?ua:kd,Za=new kk(db,Cc,a.g.dash.autoCorrectDrift);Za.Bc("static"==hb);($d=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Ga=a.g.availabilityWindowOverride);null==Ga&&(Ga=Infinity);Za.me(Ga);df=b.attributes.profiles||"";ae={Fb:"static"!=hb,presentationTimeline:Za,
901
901
  za:null,ha:null,va:null,J:null,bandwidth:0,lg:!1,Eb:Q,profiles:df.split(",")};yd=Zt(a,ae,V,b);vi=yd.duration;vg=yd.periods;"static"!=hb&&yd.$f||Za.ab(vi||Infinity);a.C&&!a.s&&(wi=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.Dg(a.C):a.C&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Za.kf(yb||1);
902
902
  return D(Sb,a.l.Wf(vg,ae.Fb),2);case 2:return D(Sb,u,3);case 3:a.s&&(Da=0,xi=null!=ua?ua:a.g.defaultPresentationDelay,Za.Ff(xi));if(a.j){a.j.variants=a.l.j;ef=a.l.Ye();0<ef.length&&(a.j.textStreams=ef);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.Ye(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Da||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:$t(b)};if(!Za.Og()){Sb.u(5);
903
903
  break}be=Xg(b,"UTCTiming");return D(Sb,au(a,V,be),6);case 6:ff=Sb.h;if(!a.i)return Sb.return();Za.Eg(ff);case 5:Za.Zd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),G(Sb)}})}
@@ -920,7 +920,7 @@ p)&&4002==E.code)return null;throw E;}n=Xg(l,"ContentProtection");n=fs(n,c,a.g.d
920
920
  (F=l.attributes.value),!F))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");u=b.J.id?b.za.id+","+b.J.id:"";var I=u&&a.m[u]?a.m[u]:{id:a.I++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,
921
921
  frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.va.language,label:f,type:b.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:A,channelsCount:b.J.ge,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,
922
922
  fastSwitching:!1,fullMimeTypes:new Set([Nd(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var E;return L(function(H){if(1==H.g){if(I.segmentIndex)return H.u(0);E=I;return D(H,z.sc(),3)}E.segmentIndex=H.h;G(H)})};u&&b.Fb&&!a.m[u]&&(a.m[u]=I);return I}
923
- function Tt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),D(d,Ut(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Vt(a,b);G(d)}})}function Vt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.U(Math.max(c-b,Ra(a.H)))}}
923
+ function Tt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),D(d,Ut(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Vt(a,b);G(d)}})}function Vt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.V(Math.max(c-b,Ra(a.H)))}}
924
924
  function cu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ge:null,audioSamplingRate:null,Eb:0,Bf:0};d=d||c.nb;var e=b.attributes.id,f=Xg(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=Zg(m);l&&m&&(et(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Zg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=dh(b,"frameRate",
925
925
  oh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=wu(Xg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Xg(b,"AudioChannelConfiguration");u=xu(u)||c.ge;var v=dh(b,"audioSamplingRate",lh)||c.audioSamplingRate;k||(k=tu(l,m));var w=ah(b,"SegmentBase"),A=ah(b,"SegmentTemplate"),y=w?dh(w,"availabilityTimeOffset",mh)||0:0,z=A?dh(A,"availabilityTimeOffset",mh)||0:0,B=f&&f.length?dh(f[0],"availabilityTimeOffset",mh)||0:0;y=c.Eb+B+y+z;z=null;(B=ah(b,"SegmentSequenceProperties"))&&(B=ah(B,"SAP"))&&(z=
926
926
  dh(B,"cadence",jh));return{nb:function(){return Bd(d(),f.length?a.h&&h?ft(a.h,e):g?g:[]:[])},qd:w||c.qd,Jb:ah(b,"SegmentList")||c.Jb,rd:A||c.rd,width:dh(b,"width",lh)||c.width,height:dh(b,"height",lh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,ge:u,audioSamplingRate:v,Eb:y,Bf:z||c.Bf}}
@@ -948,7 +948,7 @@ z[J])||F)F="."+E.toString(16).toUpperCase()+F;B+=F;g.push(B);k=!0}).box("dvcC",f
948
948
  C=C.P();var F=z>>>5,J=(C&64)>>6;g.push(B+"."+F+"."+Vi(z&31)+(C>>>7?"H":"M")+"."+Vi(2===F&&J?(C&32)>>5?12:10:J?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+Vi(1)+"."+Vi(1)+"."+Vi(1)+".0");k=!0}).box("enca",Mg).box("encv",Lg).box("sinf",Gg).box("frma",function(z){z=Ti(z.reader).Ea;e(z)}).box("colr",function(z){z=z.reader;var B=null,C=z.sb(4);var F=String.fromCharCode(C[0]);F+=String.fromCharCode(C[1]);F+=String.fromCharCode(C[2]);F+=String.fromCharCode(C[3]);if("nclx"===F)switch(z.sa(),
949
949
  C=z.sa(),z.sa(),C){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}u=B}).parse(a||b,!0);if(!f.length&&!g.length)return null;var w=h&&!k,A=new Map;if(k){var y=new Gb("video/mp4");a&&y.init(a);y.i(b);a=t(y.j());for(b=a.next();!b.done;b=a.next())b=b.value,A.set(b,b);y.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:dv(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:q,sampleRate:p,closedCaptions:A,Pf:u}}
950
950
  function dv(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Wd(d);b.has(e)||(c.push(d),b.add(e))}b=Kd("audio",c);d=Kd("video",c);a=Kd(Jd,c);d=ev(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function ev(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?kb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
951
- function fv(a){var b=null;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("enca",Mg).box("sinf",Gg).box("schi",Gg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=zd(c.sb(16))}).parse(a,!0);return b};function gv(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Jd,new Map);this.K.set("image",new Map);this.Ta=new Set;this.h=new Map;this.l=null;this.aa="";this.Ra=new Uu;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){hv(a)});this.qa=iv;this.C=null;this.Sa=0;this.m=Infinity;this.ua=this.ta=this.L=0;this.M=new cg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
951
+ function fv(a){var b=null;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("enca",Mg).box("sinf",Gg).box("schi",Gg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=zd(c.sb(16))}).parse(a,!0);return b};function gv(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Jd,new Map);this.K.set("image",new Map);this.Ta=new Set;this.h=new Map;this.l=null;this.aa="";this.Ra=new Uu;this.I=-1;this.U=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){hv(a)});this.qa=iv;this.C=null;this.Sa=0;this.m=Infinity;this.ua=this.ta=this.L=0;this.M=new cg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
952
952
  this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.cb=new Qa(5);this.j=null}r=gv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),D(e,jv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,D(e,kv(c,d.data,a),3)):e.return(c.C)})};
953
953
  r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.M&&(a.push(this.M.destroy()),this.M=null);this.g=this.i=null;this.Ta.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.Y.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
954
954
  r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!lv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(mv(a,g));return D(m,Promise.all(b),2)}nv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.gd});d.length&&!h&&(k=ov,pv(a,k.Tg),l=d.map(function(n){return n.yb}),a.l.ab(Math.min.apply(Math,x(l))),a.i.updateDuration());
@@ -958,11 +958,11 @@ b.$().includes(m)||b.wg.push(m);n=Ku(l.g,"EXT-X-DEFINE");q=sv(a,n,m);p=b.stream;
958
958
  "SKIPPED-SEGMENTS")):0,E=vv(F,B),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=u.get(F),p.segmentIndex.Ia(M));N=p.segmentIndex.g[0]||null;b.cc=N.startTime;O=B[B.length-1];b.yb=O.endTime;if(S=Mu(l.g,"EXT-X-ENDLIST"))b.gd=!0;wv(a,l);G(V)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
959
959
  function xv(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=rv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ge=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,yv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ge,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),zv(a,
960
960
  c,d)}
961
- function Av(a,b){if(Infinity==a.T){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!yv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(zv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Jf(b)}}}
961
+ function Av(a,b){if(Infinity==a.U){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.U=Math.min(a.U,d.h))}}b=a.U;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!yv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(zv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Jf(b)}}}
962
962
  function zv(a,b,c){b.cc+=c;b.yb+=c;a=rv(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.$()}
963
963
  function kv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,db,Ga,Wa;return L(function(ua){switch(ua.g){case 1:d=Vu(a.Ra,b);e=Ku(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new kk(null,0);a.l.Bc(!0);k=function(){return[c]};if(1==d.type)return D(ua,Bv(a,d,k),7);Cv(a,e);l=Ku(d.g,"EXT-X-MEDIA");m=Ku(d.g,"EXT-X-STREAM-INF");n=Ku(d.g,"EXT-X-IMAGE-STREAM-INF");q=Ku(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Ku(d.g,"EXT-X-SESSION-KEY");u=Ku(d.g,"EXT-X-SESSION-DATA");v=Ku(d.g,"EXT-X-CONTENT-STEERING");
964
964
  Dv(a,u);return D(ua,Ev(a,v),4);case 4:return Fv(a,m),Gv(a,l),D(ua,Hv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Iv(a,l),D(ua,Jv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return w=ua.h,A=w.type,y=w.mimeType,z=w.codecs,B=w.language,C=w.height,F=w.width,J=w.channelCount,I=w.sampleRate,E=w.closedCaptions,H=w.Pf,D(ua,Kv(a,a.A++,d,k,c,z,A,B,!0,"Media Playlist",J,E,null,!1,I,!1,y),8);case 8:K=ua.h,a.h.set(c,K),"video"==A&&Lv(K.stream,F,C,null,H,null),f.push({id:0,language:re(B||"und"),disabledUntilTime:0,
965
- primary:!0,audio:"audio"==A?K.stream:null,video:"video"==A?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);1==d.type&&(lv(a)&&(Mv(a,d),M=a.m,a.s.U(M)),N=Array.from(a.h.values()),Nv(a,N),qv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
965
+ primary:!0,audio:"audio"==A?K.stream:null,video:"video"==A?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);1==d.type&&(lv(a)&&(Mv(a,d),M=a.m,a.s.V(M)),N=Array.from(a.h.values()),Nv(a,N),qv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
966
966
  type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}O=[];S=t(a.C.variants);for(V=S.next();!V.done;V=S.next())Q=V.value,Q.audio&&""===Q.audio.codecs&&O.push(Q.audio.createSegmentIndex()),Q.video&&""===Q.video.codecs&&O.push(Q.video.createSegmentIndex());return D(ua,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){wa=[];Da=f[0];db=t([Da.video,Da.audio]);for(Ga=db.next();!Ga.done;Ga=db.next())(Wa=Ga.value)&&!Wa.segmentIndex&&wa.push(Wa.createSegmentIndex());
967
967
  if(0<wa.length)return D(ua,Promise.all(wa),0)}ua.u(0)}})}
968
968
  function Bv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,z,B,C,F,J;return L(function(I){switch(I.g){case 1:d=bv(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Ou(c(),e.h);g=f[0];h=new rc(g);k=h.Ma.split(".").pop();if(l=Ov[k])return I.return(bv(l));m=pg;n=null;q=Pv(a,b,e.g,c);a.Y.clear();if(!q){I.u(2);break}p=kl(q.$(),q.Xb(),q.Ub(),a.g.retryParameters);return D(I,Qv(a,p,m,{type:0}),3);case 3:u=I.h,n=u.data;case 2:v=0;w=null;if(A=Mu(e.g,"EXT-X-BYTERANGE"))y=
@@ -997,8 +997,8 @@ function Zv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Hu(b,
997
997
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
998
998
  function jw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Hu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&et(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Gd(d,c);d=$v(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
999
999
  function $v(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(C){var F,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,db,Ga,Wa;return L(function(ua){switch(ua.g){case 1:return F=y.$(),D(ua,jv(a,y.$(),!0),2);case 2:J=ua.h;if(C.aborted)return ua.return();I=J.uri;I==J.originalUri||F.includes(I)||A.push(I);E=Vu(a.Ra,J.data);H=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return D(ua,Bv(a,E,v),4);case 4:K=ua.h,H=K.mimeType,d=K.codecs;case 3:return M=lv(a),D(ua,Kv(a,0,E,v,I,d,e,f,g,h,k,l,m,n,q,p,H),5);case 5:N=ua.h;
1000
- if(C.aborted)return ua.return();O=N.stream;lv(a)&&!M&&Mv(a,E);y.cc=N.cc;y.yb=N.yb;y.Id=N.Id;y.Hd=N.Hd;y.gd=N.gd;y.be=N.be;y.gb=N.gb;y.hb=N.hb;y.gf=!0;w.segmentIndex=O.segmentIndex;w.encrypted=O.encrypted;w.drmInfos=O.drmInfos;w.keyIds=O.keyIds;w.mimeType=O.mimeType;w.bandwidth=w.bandwidth||O.bandwidth;w.codecs=w.codecs||O.codecs;Yv(w);w.drmInfos.length&&a.i.newDrmInfo(w);S=Ld;if(e==S.fa||e==S.S)for(V=t(a.h.values()),Q=V.next();!Q.done;Q=V.next())wa=Q.value,wa.gf||wa.type!=e||(wa.stream.mimeType=O.mimeType,
1001
- Yv(wa.stream));e==S.ma&&(Da=O.segmentIndex.get(0))&&Da.ca&&(w.mimeType="application/mp4",Yv(w));kw(a)&&(a.mb?Nv(a,[y]):(a.mb=!0,db=Array.from(a.h.values()),Ga=db.filter(function(mb){return mb.stream.segmentIndex}),Nv(a,Ga),qv(a),Wa=a.m,0<Wa&&a.s.U(Wa)));G(ua)}})}function v(){return a.j&&1<c.length?ft(a.j,b):A.concat(Pu([a.aa],c,a.o))}var w=lw(a,d,e,f,g,h,k,l,m,n,q,p),A=[],y={stream:w,type:e,wg:A,$:v,cc:0,yb:0,be:new Map,Id:!1,Hd:!1,gd:!1,Ge:-1,gb:-1,hb:-1,gf:!1},z=null,B=new AbortController;w.createSegmentIndex=
1000
+ if(C.aborted)return ua.return();O=N.stream;lv(a)&&!M&&Mv(a,E);y.cc=N.cc;y.yb=N.yb;y.Id=N.Id;y.Hd=N.Hd;y.gd=N.gd;y.be=N.be;y.gb=N.gb;y.hb=N.hb;y.gf=!0;w.segmentIndex=O.segmentIndex;w.encrypted=O.encrypted;w.drmInfos=O.drmInfos;w.keyIds=O.keyIds;w.mimeType=O.mimeType;w.bandwidth=w.bandwidth||O.bandwidth;w.codecs=w.codecs||O.codecs;Yv(w);w.drmInfos.length&&a.i.newDrmInfo(w);S=Ld;if(e==S.fa||e==S.T)for(V=t(a.h.values()),Q=V.next();!Q.done;Q=V.next())wa=Q.value,wa.gf||wa.type!=e||(wa.stream.mimeType=O.mimeType,
1001
+ Yv(wa.stream));e==S.ma&&(Da=O.segmentIndex.get(0))&&Da.ca&&(w.mimeType="application/mp4",Yv(w));kw(a)&&(a.mb?Nv(a,[y]):(a.mb=!0,db=Array.from(a.h.values()),Ga=db.filter(function(mb){return mb.stream.segmentIndex}),Nv(a,Ga),qv(a),Wa=a.m,0<Wa&&a.s.V(Wa)));G(ua)}})}function v(){return a.j&&1<c.length?ft(a.j,b):A.concat(Pu([a.aa],c,a.o))}var w=lw(a,d,e,f,g,h,k,l,m,n,q,p),A=[],y={stream:w,type:e,wg:A,$:v,cc:0,yb:0,be:new Map,Id:!1,Hd:!1,gd:!1,Ge:-1,gb:-1,hb:-1,gf:!1},z=null,B=new AbortController;w.createSegmentIndex=
1002
1002
  function(){if(z)return z;B=new AbortController;return z=new Promise(function(C){C(u(B.signal))})};w.closeSegmentIndex=function(){z&&!w.segmentIndex&&B.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);z=null};return y}function Tv(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
1003
1003
  function nv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.qc(function(e){c.push(e)});a.l.md(c)}function Nv(a,b){if(!lv(a))for(var c=Tv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.pc(0,c);nv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?xv(a,b):(Av(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&xv(a,b))}
1004
1004
  function yv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function kw(a){if(!a.C)return!1;var b=[],c=[];a=t(a.C.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}
@@ -1025,11 +1025,11 @@ function Rv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(
1025
1025
  function uv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Nu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Nu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Mu(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,u=0;lv(a)&&d.has(p)&&(u=d.get(p));0===u&&a.qa==Sv&&0<d.size&&!d.has(p)&&(u=a.l.qb());var v=[],w=null;n=[];for(var A=0;A<h.length;A++){var y=h[A],z=0==A?u:w.endTime;p=m+q+A;Mu(y.g,"EXT-X-DISCONTINUITY")&&l++;var B=t(y.g);for(var C=B.next();!C.done;C=B.next())C=C.value,"EXT-X-KEY"==C.name&&(bw(Hu(C,"METHOD"))?
1026
1026
  k=ow(a,C,b,f,e):k=void 0);d.set(p,z);B=Pv(a,b,y.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(z=qw(a,B,w,y,z,e,c,f,k))(w=Nu(y.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:z.endTime-z.startTime}):n.length&&(w=n.pop(),w.duration+=z.endTime-z.startTime,n.push(w)),w=z,z.j=l,yv(a,g)&&null!=a.I&&p<a.I||v.push(z)}b=void 0;n.length&&(b=n.reduce(function(F,J){return F+J.duration},0),b=Math.round(n.reduce(function(F,J){return F+J.bitrate*J.duration},0)/
1027
1027
  b*1E3));if(n=v.some(function(F){return null!=F.h}))for(c={},d=0;d<v.length;c={Gc:c.Gc,Fc:c.Fc,ud:c.ud,Cb:c.Cb,Cc:c.Cc},d++)if(c.Cb=v[d],null==c.Cb.h)for(c.Fc=0,c.Gc=d,e=function(F){return function(){var J=v[F.Gc];if(J){if(null!=J.h)return J.h+F.Fc;F.Fc-=J.endTime-J.startTime;F.Gc+=1}return null}}(c),c.Cc=0,c.ud=d,f=function(F){return function(){var J=v[F.ud];if(J){J!=F.Cb&&(F.Cc+=J.endTime-J.startTime);if(null!=J.h)return J.h+F.Cc;--F.ud}return null}}(c);null==c.Cb.h;)c.Cb.h=f(),null==c.Cb.h&&(c.Cb.h=
1028
- e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!yv(a,g))for(a=t(v),d=a.next();!d.done;d=a.next())d.value.Jf(c);return{segments:v,bandwidth:b}}function Wv(a,b){if(a==Jd){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"}
1028
+ e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.U;if(n&&Infinity!=c&&!yv(a,g))for(a=t(v),d=a.next();!d.done;d=a.next())d.value.Jf(c);return{segments:v,bandwidth:b}}function Wv(a,b){if(a==Jd){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"}
1029
1029
  function Xv(a){return a==Jd?"text/vtt":rw[a].mp4}
1030
1030
  function nw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,z;return L(function(B){switch(B.g){case 1:g=pg;h=Math.trunc((d.segments.length-1)/2);k=d.segments[h];if(Mu(k.g,"EXT-X-GAP"))return B.return(Xv(b));l=Ou(f(),k.h,e);m=new rc(l[0]);n=m.Ma.split(".").pop();q=rw[b];if((p=q[n])||(p=Ov[n])||(p=Wv(b,c)))return B.return(p);v=1;w=jg(l,a.g.retryParameters);ra(B,2);w.method="HEAD";return D(B,Qv(a,w,g,{type:v}),4);case 4:A=B.h;u=A.headers["content-type"];ta(B,3);break;case 2:y=va(B);if(!y||1002!=y.code&&1001!=
1031
1031
  y.code){B.u(3);break}w.method="GET";return D(B,Qv(a,w,g,{type:v}),6);case 6:z=B.h,u=z.headers["content-type"];case 3:return u?B.return(u.split(";")[0]):B.return(Xv(b))}})}function Lv(a,b,c,d,e,f){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)}function jv(a,b,c){return Qv(a,jg(b,a.g.retryParameters),0,{type:c?2:3})}
1032
- function hv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();lv(a)&&(d=(c-b)/1E3,a.cb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.cb)),a.s.U(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
1032
+ function hv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();lv(a)&&(d=(c-b)/1E3,a.cb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.cb)),a.s.V(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.V(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
1033
1033
  function lv(a){return a.qa!=iv}function pv(a,b){a.qa=b;a.l&&a.l.Bc(!lv(a));lv(a)||a.s.stop()}function Qv(a,b,c,d){if(!a.M)throw new R(2,7,7001);b=a.i.networkingEngine.request(c,b,d);dg(a.M,b);return b.promise}function bw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1034
1034
  function dw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,z,B;return L(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new R(2,4,4040);if(fd())throw new R(2,4,4041);g=Hu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=Ou(d(),Hu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=zd(vd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=jg(k,a.g.retryParameters),q=Qv(a,n,6),a.ia.set(m,q));return D(C,a.ia.get(m),
1035
1035
  3);case 3:p=C.h,l=zd(p.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.pa.has(e)){v=a.pa.get(e);C.u(5);break}w=kl(e.$(),e.Xb(),e.Ub(),a.g.retryParameters);A=pg;return D(C,Qv(a,w,A,{type:0}),6);case 6:y=C.h,v=fv(y.data),a.pa.set(e,v);case 5:v&&(u=v);case 4:return z=new Map,z.set(u,l),B="cenc","SAMPLE-AES"==g&&(B="cbcs"),C.return(Fd(z,B))}})}P("shaka.hls.HlsParser",gv);
@@ -1075,7 +1075,7 @@ A),w,b,d);w.segmentIndex=new Gk(A);return Promise.resolve()};w.closeSegmentIndex
1075
1075
  function cx(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;
1076
1076
  b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function dx(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 ex(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1077
1077
  function fx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Mc:g.Mc},h=e.next())g.Mc=h.value,d.push(new ti(g.Mc.start,g.Mc.end,function(k){return function(){return Bd(a.l,[f.replace("{start time}",String(k.Mc.Of))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Xw);var bx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),ax={CAPT:"main",SUBT:"alternate",DESC:"main"};
1078
- mi["application/vnd.ms-sstr+xml"]=function(){return new Xw};function gx(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"]};e=null;try{e=nd(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function hx(){}function ix(a,b,c,d,e){var f=new jx;wg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new kx,h={Vf:!1,Ng:!1};a=lx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Tf(a,function(){h.Vf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Ng=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
1078
+ mi["application/vnd.ms-sstr+xml"]=function(){return new Xw};function gx(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"]};e=null;try{e=nd(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function hx(){}function ix(a,b,c,d,e){var f=new jx;wg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new kx,h={Vf:!1,Ng:!1};a=lx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Tf(a,function(){h.Vf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Ng=!0;g.abort()});k.V(b/1E3);a.finally(function(){k.stop()})}return a}
1079
1079
  function lx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,z;return L(function(B){switch(B.g){case 1:return h=mx,k=nx,q=n=0,p=Date.now(),ra(B,2),D(B,h(a,c),4);case 4:l=B.h;f(ox(l.headers));if("HEAD"==c.method){B.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(C){function F(){var J,I,E;return L(function(H){switch(H.g){case 1:return ra(H,2),D(H,u.read(),4);case 4:J=H.h;ta(H,3);break;case 2:return va(H),H.return();case 3:if(J.done){H.u(5);break}n+=
1080
1080
  J.value.byteLength;if(!g){H.u(5);break}return D(H,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)E=J.done?0:w-n,e(I-p,n-q,E),q=n,p=I;J.done?C.close():(C.enqueue(J.value),F());G(H)}})}F()};new k({start:A});return D(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:ta(B,3);break;case 2:y=va(B);if(d.Vf)throw new R(1,1,7001,a,b);if(d.Ng)throw new R(1,1,1003,a,b);throw new R(1,1,1002,a,y,b);case 3:return z=ox(l.headers),B.return(gx(z,m,l.status,a,l.url,b))}})}
1081
1081
  function ox(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function px(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",hx);hx.isSupported=px;hx.parse=ix;var mx=window.fetch,kx=window.AbortController,nx=window.ReadableStream,jx=window.Headers;
@@ -1106,7 +1106,7 @@ dy.prototype.Vc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[]
1106
1106
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1107
1107
  function ey(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1108
1108
  appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function fy(){Kx.apply(this,arguments)}na(fy,Kx);r=fy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Ox(this,a,b)};r.Vc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function gy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=gy.prototype;
1109
- r.init=function(){var a=this,b=new Sf,c=!1,d=new Mc(function(){c=!0;b.reject(new R(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Zx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new dy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1109
+ r.init=function(){var a=this,b=new Sf,c=!1,d=new Mc(function(){c=!0;b.reject(new R(2,9,9017))});d.V(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Zx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new dy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1110
1110
  new dy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new fy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Px(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new R(2,
1111
1111
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return D(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return D(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return D(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return D(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return D(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
1112
1112
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
@@ -1202,7 +1202,7 @@ function AA(a,b){a.h=b;a.g.ib();var c=tA;b&&(a.g.D(b,c+"needkey",function(d){var
1202
1202
  d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=BA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?CA(e,"output-restricted"):1==f?CA(e,"expired"):CA(e,"internal-error"))}}))}
1203
1203
  wA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new DA(b,this.l,a);this.i.push(a);return a};wA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};wA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1204
1204
  function BA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function DA(a,b,c){bg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Sf;this.keyStatuses=new EA}na(DA,bg);
1205
- function FA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(od("LOAD_SESSION|"+c));else{var e=od("PERSISTENT|");d=Ad(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Sf;var f=zA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1205
+ function FA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(od("LOAD_SESSION|"+c));else{var e=od("PERSISTENT|");d=Ad(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Sf;var f=zA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
1206
1206
  function GA(a,b,c){if(a.g)a.g.then(function(){return GA(a,b,c)}).catch(function(){return GA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=id(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=vd(e.keys[0].k);e=vd(e.keys[0].kid)}else d=Ab(c),e=null;var f=zA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1207
1207
  function CA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}r=DA.prototype;r.generateRequest=function(a,b){return FA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?FA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Sf;GA(this,b,a);return b};
1208
1208
  r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=zA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function EA(){this.size=0;this.g=void 0}r=EA.prototype;r.Yb=function(){return this.g};
@@ -1263,20 +1263,20 @@ $B.prototype.parseMedia=function(a){var b="",c="";a=id(a).split(/\r?\n\s*\r?\n/)
1263
1263
  function eC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=fC(c))a.color=c;if(c=b.BackColour)if(c=fC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
1264
1264
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;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=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1265
1265
  function fC(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}function dC(a){a=gC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",$B);$B.prototype.parseMedia=$B.prototype.parseMedia;$B.prototype.setManifestType=$B.prototype.setManifestType;$B.prototype.setSequenceMode=$B.prototype.setSequenceMode;$B.prototype.parseInit=$B.prototype.parseInit;
1266
- var aC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,bC=/^\s*([^:]+):\s*(.*)/,cC=/\s*,\s*/,gC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;fe["text/x-ssa"]=function(){return new $B};function hC(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)?{Sd:c,V:a}:null}function iC(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,Ea:"mp4a.40."+e}}
1266
+ var aC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,bC=/^\s*([^:]+):\s*(.*)/,cC=/\s*,\s*/,gC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;fe["text/x-ssa"]=function(){return new $B};function hC(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)?{Sd:c,W:a}:null}function iC(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,Ea:"mp4a.40."+e}}
1267
1267
  function jC(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}
1268
1268
  function kC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1269
1269
  2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function lC(a){this.i=a;this.h=0;this.g=new Map}r=lC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Yd(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1270
- r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Mi(e),g=f.length;g<e.length&&!jC(e,g);g++);a=1E3*c.endTime;f=Li(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=iC(e,g);if(!c)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=hC(e,g);if(!h)return Promise.reject(new R(2,3,3018));var k=h.Sd+h.V;g+k<=e.length&&f.push({data:e.subarray(g+h.Sd,g+k),size:h.V,
1270
+ r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Mi(e),g=f.length;g<e.length&&!jC(e,g);g++);a=1E3*c.endTime;f=Li(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=iC(e,g);if(!c)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=hC(e,g);if(!h)return Promise.reject(new R(2,3,3018));var k=h.Sd+h.W;g+k<=e.length&&f.push({data:e.subarray(g+h.Sd,g+k),size:h.W,
1271
1271
  duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:f},stream:b};a=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(a),this.g.set(b.id,d));b=Uw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",lC);
1272
1272
  lC.prototype.transmux=lC.prototype.transmux;lC.prototype.getOriginalMimeType=lC.prototype.getOriginalMimeType;lC.prototype.convertCodecs=lC.prototype.convertCodecs;lC.prototype.isSupported=lC.prototype.isSupported;lC.prototype.destroy=lC.prototype.destroy;jc("audio/aac",function(){return new lC("audio/aac")},pc);function mC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1273
- 1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ga:a,V:e}}
1273
+ 1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ga:a,W:e}}
1274
1274
  function nC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function oC(a){this.i=a;this.h=0;this.g=new Map}r=oC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1275
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&!nC(a,f);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=mC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,Va:0,flags:{Xa:0,
1276
- Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(a),this.g.set(b.id,d));b=Uw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",oC);oC.prototype.transmux=oC.prototype.transmux;
1277
- oC.prototype.getOriginalMimeType=oC.prototype.getOriginalMimeType;oC.prototype.convertCodecs=oC.prototype.convertCodecs;oC.prototype.isSupported=oC.prototype.isSupported;oC.prototype.destroy=oC.prototype.destroy;jc("audio/ac3",function(){return new oC("audio/ac3")},pc);function pC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Wi(a.subarray(b+2));Yi(c,2);Yi(c,3);var d=Zi(c,11)+1<<1,e=Zi(c,2);if(3==e){e=Zi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Zi(c,2);var g=Zi(c,3),h=Zi(c,1);c=Zi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,V:d}};function qC(a){this.i=a;this.h=0;this.g=new Map}r=qC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1278
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=pC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,
1279
- Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(a),this.g.set(b.id,d));b=Uw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",qC);qC.prototype.transmux=qC.prototype.transmux;
1275
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&!nC(a,f);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=mC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.W),size:k.W,duration:1536,Va:0,flags:{Xa:0,
1276
+ Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.W}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(a),this.g.set(b.id,d));b=Uw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",oC);oC.prototype.transmux=oC.prototype.transmux;
1277
+ oC.prototype.getOriginalMimeType=oC.prototype.getOriginalMimeType;oC.prototype.convertCodecs=oC.prototype.convertCodecs;oC.prototype.isSupported=oC.prototype.isSupported;oC.prototype.destroy=oC.prototype.destroy;jc("audio/ac3",function(){return new oC("audio/ac3")},pc);function pC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Wi(a.subarray(b+2));Yi(c,2);Yi(c,3);var d=Zi(c,11)+1<<1,e=Zi(c,2);if(3==e){e=Zi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Zi(c,2);var g=Zi(c,3),h=Zi(c,1);c=Zi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,W:d}};function qC(a){this.i=a;this.h=0;this.g=new Map}r=qC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1278
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=pC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.W),size:k.W,duration:1536,
1279
+ Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.W}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(a),this.g.set(b.id,d));b=Uw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",qC);qC.prototype.transmux=qC.prototype.transmux;
1280
1280
  qC.prototype.getOriginalMimeType=qC.prototype.getOriginalMimeType;qC.prototype.convertCodecs=qC.prototype.convertCodecs;qC.prototype.isSupported=qC.prototype.isSupported;qC.prototype.destroy=qC.prototype.destroy;jc("audio/ec3",function(){return new qC("audio/ec3")},pc);function rC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new Wi(b.data),d=cj(c);cj(c);cj(c);aj(c);if(sC.includes(d)&&(d=U(c),3===d&&Yi(c,1),aj(c),aj(c),Yi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?dj(c,16):dj(c,64))}aj(c);d=U(c);if(0===d)U(c);else if(1===d)for(Yi(c,1),aj(c),aj(c),d=U(c),e=0;e<d;e++)aj(c);aj(c);Yi(c,1);var f=U(c),g=U(c),h=Zi(c,1);0===h&&Yi(c,1);Yi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1281
1281
  (k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(W(c)&&W(c)){var q=cj(c),p=[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<q&&16>=q?(d=p[q-1],e=u[q-1]):255===q&&(d=Zi(c,16),e=Zi(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],k[5],255,
1282
1282
  225].concat(k,[1],b));return{height:c,width:f,oa:a,xa:d,ya:e}}
@@ -1289,13 +1289,13 @@ U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var K=0;K<(
1289
1289
  f;S++){var Q=!0;V=1;W(a)||(Q=W(a));var wa=!1;Q?U(a):wa=W(a);wa||(V=U(a)+1);if(M){for(Q=0;Q<V;Q++)U(a),U(a),O&&(U(a),U(a));W(a)}if(N){for(Q=0;Q<V;Q++)U(a),U(a),O&&(U(a),U(a));W(a)}}}W(a)&&(W(a),W(a),W(a),K=U(a),U(a),U(a),U(a),U(a))}return{Ne:z,Te:g,Ue:h,Se:k,Oe:l,Pe:m,Qe:n,Re:q,He:p,Ie:u,Je:v,Ke:w,Le:A,Me:y,de:K,Ee:0,De:B,Ce:J,Be:I,width:C-(b+c)*(1===B||2===B?2:1),height:F-(d+e)*(1===B?2:1),si:E,ri:H}}
1290
1290
  function xC(a){var b=new Wi(a,!0);cj(b);cj(b);U(b);U(b);W(b);W(b);Zi(b,3);W(b);W(b);U(b);U(b);bj(b);W(b);W(b);W(b)&&U(b);bj(b);bj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{rf:c}}
1291
1291
  function yC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Te&3)<<6|(d.Ue?1:0)<<5|d.Se&31;e[2]=d.Oe;e[3]=d.Pe;e[4]=d.Qe;e[5]=d.Re;e[6]=d.He;e[7]=d.Ie;e[8]=d.Je;e[9]=d.Ke;e[10]=d.Le;e[11]=d.Me;e[12]=d.Ne;e[13]=240|(d.de&3840)>>8;e[14]=d.de&255;e[15]=252|d.rf&3;e[16]=252|d.De&3;e[17]=248|d.Ce&7;e[18]=248|d.Be&7;e[19]=0;e[20]=0;e[21]=(d.Ee&3)<<6|(d.lf&7)<<3|(d.Kf?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&
1292
- 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 zC(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*AC[14*(3===c?3-d:3===d?3:4)+e-1];f=BC[3*(3===c?0:2===c?1:2)+f];c=CC[c][d];var h=DC[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,V:k,pi:8*c*h}}return null}
1293
- function EC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function FC(a,b){if(b+1<a.length&&EC(a,b)){var c=zC(a,b),d=4;c&&c.V&&(d=c.V);b+=d;return b===a.length||b+1<a.length&&EC(a,b)}return!1}
1292
+ 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 zC(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*AC[14*(3===c?3-d:3===d?3:4)+e-1];f=BC[3*(3===c?0:2===c?1:2)+f];c=CC[c][d];var h=DC[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,W:k,pi:8*c*h}}return null}
1293
+ function EC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function FC(a,b){if(b+1<a.length&&EC(a,b)){var c=zC(a,b),d=4;c&&c.W&&(d=c.W);b+=d;return b===a.length||b+1<a.length&&EC(a,b)}return!1}
1294
1294
  var AC=[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],BC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],CC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],DC=[0,1,1,4];function GC(a){this.i=a;this.h=0;this.g=new Map}r=GC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1295
- r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Mi(c).length;e<c.length&&!FC(c,e);e++);var f;for(a=[];e<c.length;){var g=zC(c,e);if(!g)return Promise.reject(new R(2,3,3018));f||(f=g);e+g.V<=c.length&&a.push({data:c.subarray(e,e+g.V),size:g.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});e+=g.V}if(!f)return Promise.reject(new R(2,3,3018));c=9E4*f.pi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Qa:[],
1295
+ r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Mi(c).length;e<c.length&&!FC(c,e);e++);var f;for(a=[];e<c.length;){var g=zC(c,e);if(!g)return Promise.reject(new R(2,3,3018));f||(f=g);e+g.W<=c.length&&a.push({data:c.subarray(e,e+g.W),size:g.W,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});e+=g.W}if(!f)return Promise.reject(new R(2,3,3018));c=9E4*f.pi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Qa:[],
1296
1296
  ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Oa:a},stream:b};f=new xw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Dw(f),this.g.set(b.id,d));b=Uw(f);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;
1297
1297
  GC.prototype.destroy=GC.prototype.destroy;jc("audio/mpeg",function(){return new GC("audio/mpeg")},pc);function HC(a){this.h=a;this.g=null}r=HC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Yd(a).split(","),c=Hd("audio",b);b=Hd("video",b);return!c||b||"mp3"!=Ud(c)?!1:kb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1298
- r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new fj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.cd().audio||"audio"!=e)return Promise.reject(new R(2,3,3018));e=new Uint8Array([]);a=t(a.Gb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=zC(b,c))?(c+d.V<=b.length&&(e=Ad(e,b.subarray(c,c+d.V))),c+=d.V):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;
1298
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new fj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.cd().audio||"audio"!=e)return Promise.reject(new R(2,3,3018));e=new Uint8Array([]);a=t(a.Gb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=zC(b,c))?(c+d.W<=b.length&&(e=Ad(e,b.subarray(c,c+d.W))),c+=d.W):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;
1299
1299
  HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;jc("video/mp2t",function(){return new HC("video/mp2t")},oc);/*
1300
1300
  @license
1301
1301
  MSS Transmuxer
@@ -1318,16 +1318,16 @@ r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!sj(f)){for(var g=Mi(f
1318
1318
  encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],ga:new Uint8Array([]),oa:C.oa,xa:C.xa,ya:C.ya,data:{jb:this.g,baseMediaDecodeTime:p,Oa:q},stream:b};break;case "hvc":var F=[],J=null,I=[],E=k.uc();if(!E.length)throw new R(2,3,3023);for(var H=0;H<E.length;H++){var K=E[H],M=K.nalus;I.push.apply(I,x(M));for(var N=!1,O=[],S=!1,V=t(M),Q=V.next();!Q.done;Q=V.next()){var wa=Q.value;switch(wa.type){case 1:case 0:var Da=S=!0;break;case 19:case 20:case 21:N=Da=S=!0;break;case 32:Da=
1319
1319
  !0;break;case 33:Da=!0;break;case 34:Da=!0;break;case 35:S=Da=!0;break;case 39:case 40:Da=!0;break;default:Da=!1}if(S&&Da){var db=wa.fullData.byteLength,Ga=new Uint8Array(4);Ga[0]=db>>24&255;Ga[1]=db>>16&255;Ga[2]=db>>8&255;Ga[3]=db&255;O.push(Ga);O.push(wa.fullData)}}var Wa=O.length?{data:Ad.apply(sd,x(O)),kd:N}:null;if(Wa){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=H+1<E.length?(E[H+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[H-1].dts||0):9E4*(c.endTime-c.startTime);F.push({data:Wa.data,
1320
1320
  size:Wa.data.byteLength,duration:ua,Va:Math.round((K.pts||0)-(K.dts||0)),flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:Wa.kd?2:1,Ya:Wa.kd?0:1}})}}var mb=uC(I);if(!mb||null==J)throw new R(2,3,3018);b.height=mb.height;b.width=mb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],ga:new Uint8Array([]),oa:mb.oa,xa:mb.xa,ya:mb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Oa:F},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var yb=
1321
- [],hb,Za=null,cf=t(k.Gb()),xd=cf.next();!xd.done;xd=cf.next()){var Zd=xd.value,kd=Zd.data;if(kd){var Bc=0;hb=iC(kd,Bc);if(!hb)throw new R(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Zd.pts&&(Za=Zd.pts);for(;Bc<kd.length;){var $d=hC(kd,Bc);if($d){var df=$d.Sd+$d.V;Bc+df<=kd.length&&yb.push({data:kd.subarray(Bc+$d.Sd,Bc+df),size:$d.V,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Bc+=df}else Bc++}}}if(!hb||null==Za){if(!k.uc().length)throw new R(2,
1321
+ [],hb,Za=null,cf=t(k.Gb()),xd=cf.next();!xd.done;xd=cf.next()){var Zd=xd.value,kd=Zd.data;if(kd){var Cc=0;hb=iC(kd,Cc);if(!hb)throw new R(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Zd.pts&&(Za=Zd.pts);for(;Cc<kd.length;){var $d=hC(kd,Cc);if($d){var df=$d.Sd+$d.W;Cc+df<=kd.length&&yb.push({data:kd.subarray(Cc+$d.Sd,Cc+df),size:$d.W,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Cc+=df}else Cc++}}}if(!hb||null==Za){if(!k.uc().length)throw new R(2,
1322
1322
  3,3018);Za=9E4*c.startTime;var ae=Hd("audio",b.codecs.split(","));if(!ae||!b.channelsCount||!b.audioSamplingRate)throw new R(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:ae};var yd=kC(ae,b.channelsCount);if(!yd)throw new R(2,3,3018);for(var vi=Za+9E4*(c.endTime-c.startTime),vg=Za;vg<vi;)yb.push({data:yd,size:yd.byteLength,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),vg+=1024/hb.sampleRate*9E4}var wi=hb.sampleRate,xi=Za/9E4*wi;n={id:b.id,type:"audio",codecs:hb.Ea,
1323
1323
  encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wi,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:xi,Oa:yb},stream:b};break;case "ac3":for(var ef=[],be=0,ff=new Uint8Array([]),Sb=null,du=t(k.Gb()),Am=du.next();!Am.done;Am=du.next()){var Bm=Am.value,Cm=Bm.data;null==Sb&&null!==Bm.pts&&(Sb=Bm.pts);for(var pf=0;pf<Cm.length;){var Dd=mC(Cm,pf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,be=Dd.sampleRate,ff=Dd.ga,
1324
- ef.push({data:Cm.subarray(pf,pf+Dd.V),size:Dd.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),pf+=Dd.V):pf++}}if(0==be||0==ff.byteLength||null==Sb)throw new R(2,3,3018);var cD=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Qa:[],ga:ff,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:cD,Oa:ef},stream:b};break;case "ec3":for(var eu=[],gj=0,Dm=new Uint8Array([]),hj=null,fu=t(k.Gb()),Em=fu.next();!Em.done;Em=
1325
- fu.next()){var Fm=Em.value,Gm=Fm.data;null==hj&&null!==Fm.pts&&(hj=Fm.pts);for(var qf=0;qf<Gm.length;){var Ed=pC(Gm,qf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,gj=Ed.sampleRate,Dm=Ed.ga,eu.push({data:Gm.subarray(qf,qf+Ed.V),size:Ed.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),qf+=Ed.V):qf++}}if(0==gj||0==Dm.byteLength||null==hj)throw new R(2,3,3018);var dD=hj/9E4*gj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gj,
1326
- duration:d,Qa:[],ga:Dm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:dD,Oa:eu},stream:b};break;case "mp3":for(var gu=[],ij,jj=null,hu=t(k.Gb()),Hm=hu.next();!Hm.done;Hm=hu.next()){var Im=Hm.value,Jg=Im.data;if(Jg){null==jj&&null!==Im.pts&&(jj=Im.pts);for(var ge=0;ge<Jg.length;){var rf=zC(Jg,ge);rf?(ij||(ij=rf),ge+rf.V<=Jg.length&&gu.push({data:Jg.subarray(ge,ge+rf.V),size:rf.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),ge+=rf.V):ge++}}}if(!ij||null==jj)throw new R(2,
1327
- 3,3018);var iu=ij.sampleRate,eD=jj/9E4*iu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:iu,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:eD,Oa:gu},stream:b};break;case "opus":var ju=[],kj=null,Kc=k.F;if(!Kc)throw new R(2,3,3018);var ub=[];switch(Kc.dh){case 1:case 2:ub=[0];break;case 0:ub=[255,1,1,0,1];break;case 128:ub=[255,2,0,0,1];break;case 3:ub=[1,2,1,0,2,1];break;case 4:ub=[1,2,2,0,1,2,3];
1328
- break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var ku=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
1329
- 8&255,Kc.sampleRate>>>0&255,0,0].concat(x(ub)));for(var lu=Kc.sampleRate,mu=t(k.Gb()),Jm=mu.next();!Jm.done;Jm=mu.next()){var Km=Jm.value,sf=Km.data;null==kj&&null!==Km.pts&&(kj=Km.pts);for(var Kg=0;Kg<sf.length;){for(var fD=0!==(sf[Kg+1]&16),gD=0!==(sf[Kg+1]&8),ld=Kg+2,lj=0;255===sf[ld];)lj+=255,ld+=1;lj+=sf[ld];ld+=1;ld+=fD?2:0;ld+=gD?2:0;var nu=sf.slice(ld,ld+lj);ju.push({data:nu,size:nu.byteLength,duration:960,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Kg=ld+lj}}if(0==ku.byteLength||null==kj)throw new R(2,
1330
- 3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var hD=kj/9E4*lu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lu,duration:d,Qa:[],ga:ku,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:hD,Oa:ju},stream:b}}n&&(l.push(n),n=null)}}catch(Lm){return Lm&&3023==Lm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Lm)}if(!l.length)return Promise.reject(new R(2,3,3018));var ou=new xw(l);if(this.i.has(b.id))var Mm=
1324
+ ef.push({data:Cm.subarray(pf,pf+Dd.W),size:Dd.W,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),pf+=Dd.W):pf++}}if(0==be||0==ff.byteLength||null==Sb)throw new R(2,3,3018);var cD=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Qa:[],ga:ff,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:cD,Oa:ef},stream:b};break;case "ec3":for(var eu=[],gj=0,Dm=new Uint8Array([]),hj=null,fu=t(k.Gb()),Em=fu.next();!Em.done;Em=
1325
+ fu.next()){var Fm=Em.value,Gm=Fm.data;null==hj&&null!==Fm.pts&&(hj=Fm.pts);for(var qf=0;qf<Gm.length;){var Ed=pC(Gm,qf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,gj=Ed.sampleRate,Dm=Ed.ga,eu.push({data:Gm.subarray(qf,qf+Ed.W),size:Ed.W,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),qf+=Ed.W):qf++}}if(0==gj||0==Dm.byteLength||null==hj)throw new R(2,3,3018);var dD=hj/9E4*gj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gj,
1326
+ duration:d,Qa:[],ga:Dm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:dD,Oa:eu},stream:b};break;case "mp3":for(var gu=[],ij,jj=null,hu=t(k.Gb()),Hm=hu.next();!Hm.done;Hm=hu.next()){var Im=Hm.value,Jg=Im.data;if(Jg){null==jj&&null!==Im.pts&&(jj=Im.pts);for(var ge=0;ge<Jg.length;){var rf=zC(Jg,ge);rf?(ij||(ij=rf),ge+rf.W<=Jg.length&&gu.push({data:Jg.subarray(ge,ge+rf.W),size:rf.W,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),ge+=rf.W):ge++}}}if(!ij||null==jj)throw new R(2,
1327
+ 3,3018);var iu=ij.sampleRate,eD=jj/9E4*iu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:iu,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:eD,Oa:gu},stream:b};break;case "opus":var ju=[],kj=null,Lc=k.F;if(!Lc)throw new R(2,3,3018);var ub=[];switch(Lc.dh){case 1:case 2:ub=[0];break;case 0:ub=[255,1,1,0,1];break;case 128:ub=[255,2,0,0,1];break;case 3:ub=[1,2,1,0,2,1];break;case 4:ub=[1,2,2,0,1,2,3];
1328
+ break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var ku=new Uint8Array([0,Lc.channelCount,0,0,Lc.sampleRate>>>24&255,Lc.sampleRate>>>17&255,Lc.sampleRate>>>
1329
+ 8&255,Lc.sampleRate>>>0&255,0,0].concat(x(ub)));for(var lu=Lc.sampleRate,mu=t(k.Gb()),Jm=mu.next();!Jm.done;Jm=mu.next()){var Km=Jm.value,sf=Km.data;null==kj&&null!==Km.pts&&(kj=Km.pts);for(var Kg=0;Kg<sf.length;){for(var fD=0!==(sf[Kg+1]&16),gD=0!==(sf[Kg+1]&8),ld=Kg+2,lj=0;255===sf[ld];)lj+=255,ld+=1;lj+=sf[ld];ld+=1;ld+=fD?2:0;ld+=gD?2:0;var nu=sf.slice(ld,ld+lj);ju.push({data:nu,size:nu.byteLength,duration:960,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Kg=ld+lj}}if(0==ku.byteLength||null==kj)throw new R(2,
1330
+ 3,3018);b.audioSamplingRate=Lc.sampleRate;b.channelsCount=Lc.channelCount;var hD=kj/9E4*lu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lu,duration:d,Qa:[],ga:ku,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:hD,Oa:ju},stream:b}}n&&(l.push(n),n=null)}}catch(Lm){return Lm&&3023==Lm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Lm)}if(!l.length)return Promise.reject(new R(2,3,3018));var ou=new xw(l);if(this.i.has(b.id))var Mm=
1331
1331
  this.i.get(b.id);else Mm=Dw(ou),this.i.set(b.id,Mm);var iD=Uw(ou);this.g++;var jD=Ad(Mm,iD);return Promise.resolve(jD)};P("shaka.transmuxer.TsTransmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;var NC=["aac","ac-3","ec-3","mp3","opus"],OC=["avc","hevc"];
1332
1332
  jc("video/mp2t",function(){return new MC("video/mp2t")},nc);/*
1333
1333
  @license