shaka-player 3.2.19 → 3.2.20

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.
Files changed (54) hide show
  1. package/.github/workflows/build-and-test.yaml +4 -4
  2. package/.github/workflows/demo-version-index.yaml +6 -0
  3. package/.github/workflows/selenium-lab-tests.yaml +55 -16
  4. package/.github/workflows/update-screenshots.yaml +142 -0
  5. package/CHANGELOG.md +22 -0
  6. package/demo/common/asset.js +15 -0
  7. package/demo/common/assets.js +4 -2
  8. package/demo/common/message_ids.js +1 -0
  9. package/demo/custom.js +19 -0
  10. package/demo/locales/en.json +1 -0
  11. package/demo/locales/source.json +4 -0
  12. package/demo/main.js +14 -0
  13. package/dist/demo.compiled.debug.js +150 -148
  14. package/dist/demo.compiled.debug.map +3 -3
  15. package/dist/demo.compiled.js +150 -148
  16. package/dist/demo.compiled.map +3 -3
  17. package/dist/deps.js +1 -1
  18. package/dist/locales.js +28 -28
  19. package/dist/receiver.compiled.debug.js +19 -19
  20. package/dist/receiver.compiled.debug.map +2 -2
  21. package/dist/receiver.compiled.js +19 -19
  22. package/dist/receiver.compiled.map +2 -2
  23. package/dist/shaka-player.compiled.d.ts +7 -0
  24. package/dist/shaka-player.compiled.debug.d.ts +7 -0
  25. package/dist/shaka-player.compiled.debug.js +31 -31
  26. package/dist/shaka-player.compiled.debug.map +2 -2
  27. package/dist/shaka-player.compiled.js +84 -83
  28. package/dist/shaka-player.compiled.map +3 -3
  29. package/dist/shaka-player.ui.d.ts +7 -0
  30. package/dist/shaka-player.ui.debug.d.ts +7 -0
  31. package/dist/shaka-player.ui.debug.js +33 -33
  32. package/dist/shaka-player.ui.debug.map +2 -2
  33. package/dist/shaka-player.ui.js +56 -55
  34. package/dist/shaka-player.ui.map +3 -3
  35. package/docs/tutorials/errors.md +94 -0
  36. package/docs/tutorials/index.json +2 -0
  37. package/docs/tutorials/widevine-service-certs.md +45 -0
  38. package/externs/ima.js +9 -0
  39. package/lib/ads/client_side_ad_manager.js +6 -3
  40. package/lib/hls/hls_parser.js +2 -0
  41. package/lib/media/transmuxer.js +13 -7
  42. package/lib/media/video_wrapper.js +3 -3
  43. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  44. package/lib/player.js +3 -1
  45. package/lib/polyfill/media_capabilities.js +2 -8
  46. package/lib/polyfill/mediasource.js +7 -2
  47. package/lib/text/ui_text_displayer.js +1 -0
  48. package/lib/text/vtt_text_parser.js +4 -5
  49. package/lib/util/mime_utils.js +1 -1
  50. package/lib/util/stream_utils.js +26 -14
  51. package/package.json +1 -1
  52. package/test/polyfill/media_capabilities_unit.js +20 -22
  53. package/test/text/vtt_text_parser_unit.js +26 -2
  54. package/test/text/web_vtt_layout_integration.js +0 -3
@@ -94,8 +94,8 @@ q.Me=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a
94
94
  q.ba=function(a,b,c){a=Ob(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new M("locale-updated"));return this};q.Pg=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new M("unknown-localization",a));return""};
95
95
  function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Sb:f.Sb},h=g.next()){f.Sb=h.value;e.add(f.Sb);e.add(Tb(f.Sb));h=gb(b.keys(),function(l){return function(m){var n=l.Sb,p=Tb(m),r=Tb(n);return m!=p&&n!=r&&p==r}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=gb(b.keys(),function(l){return function(m){return Tb(m)==l.Sb}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=
96
96
  b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new M("missing-localizations",d)))}function Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}K("shaka.ui.Localization",Wb);
97
- Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Pg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Me;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Qh:"REPLAY",Hh:"NOT_APPLICABLE",vh:"FAST_FORWARD",jh:"CAPTIONS",Wh:"SKIP_TO_LIVE",wh:"FULL_SCREEN",nh:"ENTER_PICTURE_IN_PICTURE",xh:"LANGUAGE",Jh:"ON",ah:"AD_DURATION",rh:"EXIT_PICTURE_IN_PICTURE",Vh:"SKIP_AD",ki:"VOLUME",Oh:"PLAY",Uh:"SEEK",BACK:"BACK",Ph:"PLAYBACK_RATE",dh:"AIRPLAY",yh:"LOOP",Sh:"REWIND",Dh:"MORE_SETTINGS",mh:"ENTER_LOOP_MODE",bh:"AD_TIME",ei:"UNDETERMINED_LANGUAGE",qh:"EXIT_LOOP_MODE",Mh:"PAUSE",Ie:"LIVE",Ih:"OFF",Nh:"PICTURE_IN_PICTURE",kh:"CAST",gi:"UNMUTE",ii:"UNRECOGNIZED_LANGUAGE",
98
- Rh:"RESOLUTION",AD_PROGRESS:"AD_PROGRESS",ph:"EXIT_FULL_SCREEN",Eh:"MULTIPLE_LANGUAGES",fh:"AUTO_QUALITY",Fh:"MUTE",Af:"SUBTITLE_FORCED"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={xd:d.xd},e=a.next()){d.xd=e.value;e=b.findIndex(function(f){return function(g){return c(f.xd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
97
+ Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Pg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Me;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={wh:"FULL_SCREEN",rh:"EXIT_PICTURE_IN_PICTURE",bh:"AD_TIME",Ie:"LIVE",ph:"EXIT_FULL_SCREEN",nh:"ENTER_PICTURE_IN_PICTURE",BACK:"BACK",Mh:"PAUSE",Jh:"ON",dh:"AIRPLAY",Qh:"REPLAY",Wh:"SKIP_TO_LIVE",Ih:"OFF",Oh:"PLAY",Hh:"NOT_APPLICABLE",Dh:"MORE_SETTINGS",gi:"UNMUTE",Ph:"PLAYBACK_RATE",Vh:"SKIP_AD",vh:"FAST_FORWARD",Sh:"REWIND",ei:"UNDETERMINED_LANGUAGE",AD_PROGRESS:"AD_PROGRESS",qh:"EXIT_LOOP_MODE",xh:"LANGUAGE",Eh:"MULTIPLE_LANGUAGES",ah:"AD_DURATION",yh:"LOOP",kh:"CAST",mh:"ENTER_LOOP_MODE",
98
+ jh:"CAPTIONS",fh:"AUTO_QUALITY",Rh:"RESOLUTION",ki:"VOLUME",Af:"SUBTITLE_FORCED",Fh:"MUTE",Uh:"SEEK",ii:"UNRECOGNIZED_LANGUAGE",Nh:"PICTURE_IN_PICTURE"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={xd:d.xd},e=a.next()){d.xd=e.value;e=b.findIndex(function(f){return function(g){return c(f.xd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
99
  function gc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
100
100
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
101
101
  function sc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gc(a.nestedCues,b.nestedCues,sc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",hc);var kc="auto";
@@ -112,9 +112,9 @@ function gd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
112
112
  function hd(a){if(window.TextEncoder&&!Zc()){var b=new TextEncoder;return Fc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Fc(b)}function id(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}K("shaka.util.StringUtils",cd);cd.resetFromCharCode=function(){fd.g=void 0};cd.toUTF16=id;cd.toUTF8=hd;cd.fromBytesAutoDetect=gd;cd.fromUTF16=ed;
113
113
  cd.fromUTF8=dd;var fd=new Mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={qb:65536};0<b.qb;b={qb:b.qb},b.qb/=2)if(a(b.qb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.qb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.qb));return e}}(b);return null});function jd(){}function kd(a){a=Ec(a);a=fd.value()(a);return btoa(a)}function ld(a,b){b=void 0==b?!0:b;var c=kd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function md(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function nd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
114
114
  function od(a){var b=Ec(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function pd(){for(var a=Ea.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}K("shaka.util.Uint8ArrayUtils",jd);jd.concat=pd;jd.toHex=od;jd.fromHex=nd;jd.fromBase64=md;jd.toBase64=ld;jd.toStandardBase64=kd;
115
- jd.equal=function(a,b){yb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Cc(a,b)};function qd(){var a=this;this.v=Jc.get("muxjs")();this.g=new this.v.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(pd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:pd.apply(jd,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}qd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
115
+ jd.equal=function(a,b){yb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Cc(a,b)};function qd(){var a=this;this.v=Jc.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.v&&(this.g=new this.v.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(pd(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:pd.apply(jd,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}qd.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
116
116
  function rd(a,b){if(!Jc.get("muxjs")()||!sd(a))return!1;if(b)return MediaSource.isTypeSupported(td(b,a));var c=td("audio",a),d=td("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function sd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
117
- function td(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function ud(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];var c=Ec(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function vd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function wd(a,b,c){a=vd(a,b);if(sd(a)){if(Jc.get("muxjs")())return td(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
117
+ function td(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function ud(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];var c=Ec(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function vd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function wd(a,b,c){b=vd(a,b);if(sd(b)){if(Jc.get("muxjs")())return td(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
118
118
  function xd(a){var b=yd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===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"===a&&"b2"===b:return"dtsx";
119
119
  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"}return a}function zd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function yd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
120
120
  (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ad(a){this.l=null;this.i=a;this.j=this.B=0;this.m=Infinity;this.h=this.g=null;this.A="";this.v=new Map}function Bd(a){return Cd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Ad.prototype.destroy=function(){this.i=this.l=null;this.v.clear();return Promise.resolve()};
@@ -136,9 +136,9 @@ function ce(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return I(function(v){if(d=a.some(fu
136
136
  function ge(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=de(f);g=Ib("audio",g);g=wd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=de(f);f=wd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
137
137
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ee(d.codecs),f=wd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
138
138
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),v=r.next();!v.done;v=r.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
139
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ee(a){return Vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
140
- function de(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function $d(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!he(d,a.audio)||c&&a&&a.video&&!he(c,a.video)?!1:!0})}function ae(a){a.textStreams=a.textStreams.filter(function(b){return Bd(vd(b.mimeType,b.codecs))})}
141
- function be(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Wc()||Vc()||Xc())&&c.push("image/webp");return c.includes(b.mimeType)})}function he(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
139
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
140
+ function ee(a){return Vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function de(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function $d(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!he(d,a.audio)||c&&a&&a.video&&!he(c,a.video)?!1:!0})}
141
+ function ae(a){a.textStreams=a.textStreams.filter(function(b){return Bd(vd(b.mimeType,b.codecs))})}function be(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Wc()||Vc()||Xc())&&c.push("image/webp");return c.includes(b.mimeType)})}function he(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
142
142
  function ie(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
143
143
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
144
144
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
@@ -182,8 +182,8 @@ function Gf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
182
182
  function Jf(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}
183
183
  function Kf(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 Lf(a){a=Number(a);return 0===a%1?a:null}function Mf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Nf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Of(a){a=Number(a);return isNaN(a)?null:a}function Pf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
184
184
  function Qf(a,b){var c=new DOMParser,d=Rf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Sf(a,b){try{var c=dd(a);return Qf(c,b)}catch(d){return null}}
185
- var Rf=new Mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Tf(a,b){var c=this;b=void 0===b?1:b;this.F=a;this.G=new Set;this.l=this.A=null;this.$=this.Y=!1;this.H=0;this.g=null;this.v=new nf;this.i=new Map;this.D=[];this.B=new Lc;this.h=null;this.m=function(d){c.B.reject(d);a.onError(d)};this.aa=new Map;this.ua=new Map;this.R=new P(function(){return Uf(c)});this.J=!1;this.I=[];this.M=!1;this.Z=(new P(function(){Vf(c)})).ia(b);this.B["catch"](function(){});this.j=new lf(function(){return Wf(c)});this.W=!1}q=Tf.prototype;q.destroy=function(){return this.j.destroy()};
186
- function Wf(a){return I(function(b){switch(b.g){case 1:return a.v.release(),a.v=null,a.B.reject(),a.Z.stop(),a.Z=null,a.R.stop(),a.R=null,u(b,Xf(a),2);case 2:if(!a.l){b.C(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.A=null,a.D=[],a.h=null,a.m=function(){},a.F=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function Yf(a,b,c){a.$=!0;a.D=[];a.J=c;return Zf(a,b)}
185
+ var Rf=new Mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Tf(a,b){var c=this;b=void 0===b?1:b;this.F=a;this.G=new Set;this.l=this.A=null;this.$=this.Y=!1;this.H=0;this.g=null;this.v=new nf;this.i=new Map;this.D=[];this.B=new Lc;this.h=null;this.m=function(d){c.B.reject(d);a.onError(d)};this.aa=new Map;this.Z=new Map;this.R=new P(function(){return Uf(c)});this.J=!1;this.I=[];this.M=!1;this.ua=(new P(function(){Vf(c)})).ia(b);this.B["catch"](function(){});this.j=new lf(function(){return Wf(c)});this.W=!1}q=Tf.prototype;q.destroy=function(){return this.j.destroy()};
186
+ function Wf(a){return I(function(b){switch(b.g){case 1:return a.v.release(),a.v=null,a.B.reject(),a.ua.stop(),a.ua=null,a.R.stop(),a.R=null,u(b,Xf(a),2);case 2:if(!a.l){b.C(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.A=null,a.D=[],a.h=null,a.m=function(){},a.F=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function Yf(a,b,c){a.$=!0;a.D=[];a.J=c;return Zf(a,b)}
187
187
  function $f(a,b,c){a.D=c;a.J=0<c.length;return Zf(a,b)}function ag(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 bg(a,g,[])}
188
188
  function Zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){if(1==x.g){if(c=dg(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=vf(a.h.servers),eg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=fg(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,gg(r,vf(a.h.servers),vf(a.h.advanced||{}));return u(x,
189
189
  ce(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,x["return"](Promise.resolve());y=bg(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
@@ -192,7 +192,7 @@ c,2)}mf(b.j);ig(b);b.g.initData.length||b.D.length||(d=function(f){return jg(b,f
192
192
  function kg(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.C(2);break}b=df([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.F.Kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ec(d.data);ua(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
193
193
  A(g,6);return u(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function lg(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,mg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.$a=new Lc,d.push(e.$a);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
194
194
  function ig(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,jg(a,d.initDataType,d.initData);c=t(a.D);for(d=c.next();!d.done;d=c.next())mg(a,d.value);b.length||a.D.length||a.B.resolve();return a.B}function jg(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Cc(c,e.value.initData)&&!Uc("Tizen 2"))return;ng(a,b,c,a.g.sessionType)}function og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
195
- function pg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Zc=function(){return wf(this.ua)};
195
+ function pg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Zc=function(){return wf(this.Z)};
196
196
  function bg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=qg(a,c,d);x.C(2);break}return u(x,rg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);mf(a.j);A(x,4);a.G.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.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var w=
197
197
  f.keySystem;var C=d.get(f.keySystem);var B=[],D=[],E=[],G=[],H=new Set;sg(C,B,E,D,G,H);var L=a.J?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:B[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:D[0],initData:G,keyIds:H};C=t(C);for(B=C.next();!B.done;B=
198
198
  C.next())B=B.value,B.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(w.persistentStateRequired=B.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),B=[],D=[],E=[],G=[],H=new Set,sg(w.drmInfos,B,E,D,G,H),C={keySystem:C,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
@@ -211,7 +211,7 @@ function hg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;I(function(x){switch(x.g){case
211
211
  l.promise,4);case 4:k=x.h;ua(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.$a&&d.$a.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:ua(x,6);break;case 5:return p=F(x),r=new N(2,6,6008,p.message),a.m(r),d&&d.$a&&d.$a.reject(r),x["return"]();case 6:if(a.j.g)return x["return"]();v=new M("drmsessionupdate");a.F.onEvent(v);d&&(d.$a&&d.$a.resolve(),y=new P(function(){d.loaded=
212
212
  !0;ug(a)&&a.B.resolve()}),y.P(xg));z(x)}})}function wg(a){var b=ed(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Qf(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=md(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
213
213
  function tg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(og(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){k=Hc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=od(h).slice(0,32);a.aa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.$a&&(a.i["delete"](c),
214
- c.close()["catch"](function(){}));ug(a)&&(a.B.resolve(),a.R.P(yg))}function Uf(a){var b=a.aa,c=a.ua;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.m(new N(2,6,6014));a.F.jd(wf(c))}
214
+ c.close()["catch"](function(){}));ug(a)&&(a.B.resolve(),a.R.P(yg))}function Uf(a){var b=a.aa,c=a.Z;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.m(new N(2,6,6014));a.F.jd(wf(c))}
215
215
  function zg(){var a,b,c,d,e,f,g,h;return I(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".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,
216
216
  c],f=new Map,g=function(l){var m,n,p;return I(function(r){switch(r.g){case 1:return A(r,2),u(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Uc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(r,m.createMediaKeys(),5);case 5:ua(r,0);break;case 2:F(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
217
217
  function Ag(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).P(Bg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);z(c)})}
@@ -286,7 +286,7 @@ Q.prototype.setUserSeekStart=Q.prototype.tf;Q.prototype.getSegmentAvailabilitySt
286
286
  Q.prototype.setSegmentAvailabilityDuration=Q.prototype.xe;Q.prototype.setStatic=Q.prototype.Hc;Q.prototype.setClockOffset=Q.prototype.qf;Q.prototype.getPresentationStartTime=Q.prototype.kg;Q.prototype.setDuration=Q.prototype.Za;Q.prototype.getMaxSegmentDuration=Q.prototype.gg;Q.prototype.getDuration=Q.prototype.getDuration;function Ni(a,b){this.j=a;this.m=Oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.v=b;this.i=function(){}}Ni.prototype.release=function(){this.j=null;this.i=function(){}};function Pi(a,b){a.i=b}function Qi(a){this.g=a}function Oi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(li(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ri(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.l=c;this.B=e;this.i=new nf;this.A=!1;this.F=a.readyState;this.j=!1;this.h=d;this.v=!1;this.i.o(a,"waiting",function(){return Si(f)});this.m=(new P(function(){Si(f)})).ia(.25)}Ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.D=this.B=null};Ri.prototype.ee=function(){this.v=!0;Si(this)};
287
287
  function Si(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Oi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.v&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=mi(b,g,a.l.gapDetectionThreshold);if(!(null==
288
288
  c||0==c&&!a.v||(d=b.start(c),d>=a.D.ib()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new M("largegap",g),g.cancelable=!0,a.B(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ti(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ui.value().get(b),c.Ga(a,b,d))}var Ui=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Vi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new nf;this.i=new Wi(a);Ti(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Xi(d,d.j)})}Vi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Yi(a){return a.m?a.g.currentTime:a.j}function Zi(a,b){0<a.g.readyState?$i(a.i,b):Ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Xi(a,a.j)})}
289
- function Xi(a,b){.001>Math.abs(a.g.currentTime-b)?aj(a):(a.h.Ga(a.g,"seeking",function(){aj(a)}),$i(a.i,0==a.g.currentTime?b:a.g.currentTime))}function aj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
289
+ function Xi(a,b){.001>Math.abs(a.g.currentTime-b)?aj(a):(a.h.Ga(a.g,"seeking",function(){aj(a)}),$i(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function aj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
290
290
  function $i(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ia(.1)};function bj(a){this.g=a;this.j=!1;this.h=null;this.i=new nf}q=bj.prototype;q.Kd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ti(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Ld=function(a){this.h=this.j?this.h:a};q.Oc=function(){return(this.j?this.g.currentTime:this.h)||0};q.gf=function(){};
291
291
  function cj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.v=null;this.j=new Ri(a,b.presentationTimeline,c,dj(a,c),f);this.h=new Vi(a,function(){a:{var h=g.j;h.A=!0;h.v=!1;h.j=!1;var k=Yi(g.h);h=ej(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.v||g.v<k-1)){g.v=k;Zi(g.h,h);h=void 0;break a}g.A();h=void 0}return h},fj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Yi(g.h),k=g.g.Xb(),l=g.g.ib();3>l-k&&(k=l-
292
292
  3);h<k&&(h=ej(g,h),g.i.currentTime=h)}})}q=cj.prototype;q.Kd=function(){this.m.ia(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Ld=function(a){Zi(this.h,a)};q.Oc=function(){var a=Yi(this.h);return 0<this.i.readyState&&!this.i.paused?gj(this,a):a};
@@ -343,7 +343,7 @@ function qk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.
343
343
  r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Ec?(c.appendChild(d.Ec),d.Ec.appendChild(d.Nd)):c.appendChild(d.Nd)}}function ok(a,b){if(a.g){var c=a.D.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.v.values()),e=d.next();!e.done;e=d.next())mk(e.value);mk(a.g);a.h.clear();a.v.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));qk(a,a.i,a.g,c,[])}}}
344
344
  function rk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&yb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&sk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==zc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==zc?"%":"px"),a.v.has(e))c=a.v.get(e);else{var g=R("span"),h=c.heightUnits==zc?"%":"px",k=c.widthUnits==zc?
345
345
  "%":"px",l=c.viewportAnchorUnits==zc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.v.set(e,g);c=g}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),
346
- e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Nd:f,zf:e,Ec:c})}
346
+ e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Nd:f,zf:e,Ec:c})}
347
347
  function sk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=tk(c.linePadding,c,a.m);f.paddingRight=tk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
348
348
  "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=uk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==
349
349
  c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=tk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==mc?(f.width="100%",c.lineAlign==oc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+
@@ -363,10 +363,10 @@ minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLa
363
363
  e.trackSelectionCallback=function(g){return I(function(h){return h["return"](Ck(g,f.preferredAudioLanguage))})};return f}function Dk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return xk(a,b,c||Bk(),d,"")}
364
364
  function Ck(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Vb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ob(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
365
365
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Lb&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",Ak);Ak.mergeConfigObjects=Dk;function Ek(){this.g=null;this.h=[]}function Fk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Gk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
366
- function Hk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ik(){this.i=this.h=null;this.g=[]}function Jk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Kk(){this.B=this.D=this.H=this.F=this.A=this.j=this.G=this.m=this.i=this.I=this.J=this.M=this.l=this.v=NaN;this.g=new Ek;this.h=new Ik};function S(a,b){cb.call(this);var c=this;this.l=Lk;this.Rc=this.g=null;this.$=!1;this.dd=new nf;this.fb=new nf;this.v=new nf;this.Vd=this.B=this.eb=this.i=this.ed=this.I=this.j=this.aa=this.J=this.Vc=this.H=this.Oa=this.D=this.M=this.m=this.G=null;this.ke=1E9;this.h=Mk(this);this.ge={width:Infinity,height:Infinity};this.A=null;this.va=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.sb=this.h.preferredTextRole;
367
- this.bb=this.h.preferForcedSubs;this.gb=[];b&&b(this);this.G=Nk(this);this.G.se(this.h.streaming.forceHTTPS);this.F=null;Ok&&(this.F=Fb(Ok));this.dd.o(window,"online",function(){c.je()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.Ee={name:"manifest-parser"};this.fe={name:"manifest"};this.Ca={name:"media-source"};this.Yd={name:"drm-engine"};this.Y={name:"load"};this.He={name:"src-equals-drm-engine"};this.Va={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Te(Pk(c,
368
- e,f))});d.set(this.R,function(e){e.K&&(c.fb.ob(),e.K=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.Z,function(e){return Te(Qk(c,e))});d.set(this.Ca,function(e){e=Rk(c,e);return Te(e)});d.set(this.Ee,function(e,f){var g=Sk(c,e,f);return Te(g)});d.set(this.fe,function(e){return Tk(c,e)});d.set(this.Yd,function(e){e=Uk(c,e);return Te(e)});d.set(this.Y,function(e,f){return Te(Vk(c,e,f))});d.set(this.He,function(e,f){var g=Wk(c,e,f);return Te(g)});d.set(this.Va,function(e,
369
- f){return Xk(c,e,f)});this.ka=new ak(this.R,{ig:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.W);e==c.W&&(k=g==c.R||f.K!=h.K?c.R:g==c.W?c.W:g==c.Ca||g==c.Y?c.Ca:g==c.Va?c.He:null);e==c.Ca&&(k=g==c.Y&&f.K==h.K?c.Ee:c.Z);e==c.Ee&&(k=Yk(c.Y,c.fe,c.Z,g,f,h));e==c.fe&&(k=Yk(c.Y,c.Yd,c.Z,g,f,h));e==c.Yd&&(k=Yk(c.Y,c.Y,c.Z,g,f,h));e==c.He&&(k=g==c.Va&&f.K==h.K?c.Va:c.Z);if(e==c.Y||e==c.Va)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Nf:function(e,f,g){c.dispatchEvent(Zk($k,(new Map).set("state",
366
+ function Hk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ik(){this.i=this.h=null;this.g=[]}function Jk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Kk(){this.B=this.D=this.H=this.F=this.A=this.j=this.G=this.m=this.i=this.I=this.J=this.M=this.l=this.v=NaN;this.g=new Ek;this.h=new Ik};function S(a,b){cb.call(this);var c=this;this.l=Lk;this.Rc=this.g=null;this.Z=!1;this.dd=new nf;this.fb=new nf;this.v=new nf;this.Vd=this.B=this.eb=this.i=this.ed=this.I=this.j=this.aa=this.J=this.Vc=this.H=this.Oa=this.D=this.M=this.m=this.G=null;this.ke=1E9;this.h=Mk(this);this.ge={width:Infinity,height:Infinity};this.A=null;this.va=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.sb=this.h.preferredTextRole;
367
+ this.bb=this.h.preferForcedSubs;this.gb=[];b&&b(this);this.G=Nk(this);this.G.se(this.h.streaming.forceHTTPS);this.F=null;Ok&&(this.F=Fb(Ok));this.dd.o(window,"online",function(){c.je()});this.R={name:"detach"};this.W={name:"attach"};this.$={name:"unload"};this.Ee={name:"manifest-parser"};this.fe={name:"manifest"};this.Ca={name:"media-source"};this.Yd={name:"drm-engine"};this.Y={name:"load"};this.He={name:"src-equals-drm-engine"};this.Va={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Te(Pk(c,
368
+ e,f))});d.set(this.R,function(e){e.K&&(c.fb.ob(),e.K=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.$,function(e){return Te(Qk(c,e))});d.set(this.Ca,function(e){e=Rk(c,e);return Te(e)});d.set(this.Ee,function(e,f){var g=Sk(c,e,f);return Te(g)});d.set(this.fe,function(e){return Tk(c,e)});d.set(this.Yd,function(e){e=Uk(c,e);return Te(e)});d.set(this.Y,function(e,f){return Te(Vk(c,e,f))});d.set(this.He,function(e,f){var g=Wk(c,e,f);return Te(g)});d.set(this.Va,function(e,
369
+ f){return Xk(c,e,f)});this.ka=new ak(this.R,{ig:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.W);e==c.W&&(k=g==c.R||f.K!=h.K?c.R:g==c.W?c.W:g==c.Ca||g==c.Y?c.Ca:g==c.Va?c.He:null);e==c.Ca&&(k=g==c.Y&&f.K==h.K?c.Ee:c.$);e==c.Ee&&(k=Yk(c.Y,c.fe,c.$,g,f,h));e==c.fe&&(k=Yk(c.Y,c.Yd,c.$,g,f,h));e==c.Yd&&(k=Yk(c.Y,c.Y,c.$,g,f,h));e==c.He&&(k=g==c.Va&&f.K==h.K?c.Va:c.$);if(e==c.Y||e==c.Va)k=c.$;e==c.$&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Nf:function(e,f,g){c.dispatchEvent(Zk($k,(new Map).set("state",
370
370
  e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,Qk(c,e),2):f["return"](e.K?c.W:c.R)})},Dg:function(e){c.dispatchEvent(Zk(al,(new Map).set("state",e.name)))}});a&&this.qc(a,!0)}pa(S,cb);function Zk(a,b){return new M(a,b)}q=S.prototype;
371
371
  q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==bl)return c["return"]();a.l=bl;b=fk(a.ka,function(){return{node:a.R,payload:bk(),Fb:!1}});return u(c,new Promise(function(d){b.ac=function(){};b.hd=function(){d()};b.Mb=function(){d()};b.onError=function(){d()};b.kd=function(){d()}}),2);case 2:return u(c,a.ka.destroy(),3);case 3:a.dd&&(a.dd.release(),a.dd=null);a.fb&&(a.fb.release(),a.fb=null);a.v&&(a.v.release(),a.v=null);a.Vd=null;a.B=null;a.h=null;a.A=null;a.Rc=null;
372
372
  if(!a.G){c.C(4);break}return u(c,a.G.destroy(),5);case 5:a.G=null;case 4:cb.prototype.release.call(a),z(c)}})};
@@ -387,15 +387,15 @@ function Uk(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=
387
387
  function Vk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.eb=e;a.H=new mj({bd:function(){return d.playbackRate},Yc:function(){return d.defaultPlaybackRate},ve:function(x){d.playbackRate=x},ef:function(x){d.currentTime+=x}});f=function(){return zl(a)};g=function(){return Al(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Vd==h||(a.Vd=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
388
388
  (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.va=new Ee(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.sb=a.h.preferredTextRole;a.bb=a.h.preferForcedSubs;Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&Cl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.D=Dl(a,b.startTime);a.Oa=El(a);
389
389
  k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Fl(a,k);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Gl(a);a.j.configure(a.h.streaming);a.l=Hl;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Il(a,x)}});a.dispatchEvent(Zk(Jl));l=null;if(m=a.Eb().find(function(x){return x.active})){y.C(2);break}l=Kl(a)?a.B.chooseVariant():null;Cl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
390
- break}n=a.D.Oc();return u(y,Ll(l,n),4);case 4:p=y.h,a.D.Ld(p);case 3:Ml(a,null,ie(l));case 2:return a.D.Kd(),r=a.kb().find(function(x){return x.active}),r||((v=se(a.i.textStreams,a.Ba,a.sb,a.bb)[0]||null)&&Jk(a.A.h,v,!0),l&&(v?(l.audio&&Nl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),Ol(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Jb())&&Jj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Pl(a)),$d(a.j?a.j.l:null,a.i),Ql(a.i),Rl(a),Kl(a),a.i.variants.some(function(x){return x.primary}),
390
+ break}n=a.D.Oc();return u(y,Ll(l,n),4);case 4:p=y.h,a.D.Ld(p);case 3:Ml(a,null,ie(l));case 2:return a.D.Kd(),r=a.kb().find(function(x){return x.active}),r||((v=se(a.i.textStreams,a.Ba,a.sb,a.bb)[0]||null)&&Jk(a.A.h,v,!0),l&&(v?(l.audio&&Nl(a,l.audio,v)&&(a.Z=!0),a.Z&&a.M.l.setTextVisibility(!0),Ol(a)):a.Z=!1),v&&(a.h.streaming.alwaysStreamText||a.Jb())&&Jj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Pl(a)),$d(a.j?a.j.l:null,a.i),Ql(a.i),Rl(a),Kl(a),a.i.variants.some(function(x){return x.primary}),
391
391
  a.v.Ga(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ae}),z(y)}})}
392
392
  function Wk(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Mb,e=Date.now()/1E3,f=!0,a.m=vl(a,{Kb:a.G,onError:function(n){kl(a,n)},jd:function(n){wl(a,n)},onExpirationUpdated:function(n,p){xl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==yl&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Hg(g),k=il[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
393
393
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?zd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.cb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,$f(a.m,[l],[]),2)):u(m,a.m.qc(b.K),
394
394
  0)})}
395
395
  function Xk(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.eb=b.uri;var e=b.K;a.D=new bj(e);var f=!1;a.gb.push(function(){f=!0});null!=b.startTime&&a.D.Ld(b.startTime);a.H=new mj({bd:function(){return e.playbackRate},Yc:function(){return e.defaultPlaybackRate},ve:function(h){e.playbackRate=h},ef:function(h){e.currentTime+=h}});Fl(a,a.h.streaming.rebufferingGoal);a.v.o(e,"playing",d);a.v.o(e,"pause",d);a.v.o(e,"ended",d);a.v.o(e,"ratechange",function(){return Al(a)});"none"!=e.preload&&
396
396
  a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ae});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"change",function(){return Rl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Sl(a,h);break;case "chapters":Il(a,h);break;default:Rl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.textTracks,
397
- "change",function(){return Rl(a)}));e.src=b.uri;(Vc()||Wc())&&e.load();a.l=Tl;a.dispatchEvent(Zk(Jl));var g=new Lc;Ti(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){a.D.Kd();g.resolve()});Ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return I(function(k){if(1==k.g)return Ul(a),h=Vl(a),h.find(function(l){return"disabled"!=l.mode})?k.C(2):u(k,new Promise(function(l){a.v.Ga(e.textTracks,"change",l);(new P(l)).P(1)}),2);if(f)return k["return"]();Wl(a);z(k)})});e.error?g.reject(jl(a)):
398
- "none"==e.preload&&(Pa('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.'),g.resolve());a.v.Ga(e,"error",function(){g.reject(jl(a))});return new Pe(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
397
+ "change",function(){return Rl(a)}));e.src=b.uri;(Vc()||Wc())&&e.load();a.l=Tl;a.dispatchEvent(Zk(Jl));var g=new Lc;Ti(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){a.D.Kd();g.resolve()});Ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return I(function(k){if(1==k.g)return Ul(a),h=Vl(a),h.find(function(l){return"disabled"!=l.mode})?(0<h.length&&(a.Z=!0),k.C(2)):u(k,new Promise(function(l){a.v.Ga(e.textTracks,"change",l);(new P(l)).P(1)}),2);if(f)return k["return"]();Wl(a);z(k)})});e.error?
398
+ g.reject(jl(a)):"none"==e.preload&&(Pa('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.'),g.resolve());a.v.Ga(e,"error",function(){g.reject(jl(a))});return new Pe(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
399
399
  function Ul(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.pd(b);var c=a.h.preferredVariantRole;""!=c&&a.pd(b,c)}}function Wl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.me(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.me(b,d,c)}}
400
400
  function Sl(a,b){if("metadata"==b.kind){b.mode="hidden";a.v.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ol(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Xl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().P(.5);a.gb.push(function(){c.stop()})}}
401
401
  function ol(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Zk(Yl,b))}function Il(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Aa().P(.5);a.gb.push(function(){c.stop()})}}function ul(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function vl(a,b){return new Tf(b,a.h.drm.updateExpirationTime)}
@@ -416,16 +416,16 @@ q.Eb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.va
416
416
  q.kb=function(){if(this.i){for(var a=this.j?this.j.v:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=je(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Vl(this).map(function(f){return ne(f)}):[]};q.Zf=function(){return this.i?this.i.imageStreams.map(function(a){return ke(a)}):[]};
417
417
  q.pg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D;return I(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.C(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.C(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
418
418
  v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;B=C=0;1<v&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,C=D%m*p,B=Math.floor(D/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:B,startTime:w,duration:x,uris:f.Ea(),width:p})}return E["return"](null)})};
419
- q.oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.v&&(Jk(this.A.h,b,!1),Jj(this.j,b),em(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";em(this)}};
419
+ q.oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.v&&(Jk(this.A.h,b,!1),Jj(this.j,b),em(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";em(this)}};
420
420
  q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Pa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&qe(d)&&(Cl(this,d,!1,b,c),this.va=new Ce(d),Kl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
421
421
  le(c)==a.id){fm(this,c);break}};q.Pf=function(){return gm(this.Eb())};q.og=function(){return gm(this.kb())};q.Of=function(){return Array.from(hm(this.Eb()))};q.ng=function(){return Array.from(hm(this.kb()))};
422
422
  q.pd=function(a,b){if(this.i&&this.D){this.va=new Ee(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.va.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=ie(f),this.pe(c,!0)):dm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ob(a);f=d=null;e=
423
423
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=pe(g);Ob(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?fm(this,f):d&&fm(this,d)}};
424
424
  q.me=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ba=a,this.sb=b||"",this.bb=c,(a=se(this.i.textStreams,this.Ba,this.sb,this.bb)[0]||null)&&a!=this.j.v&&(Jk(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Jb()))Jj(this.j,a),em(this)}else{var d=Ob(a);(a=this.kb().find(function(e){return Ob(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
425
- q.Qg=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.va=new Ee(b.language,"",0,a),dm(this))}};q.Jb=function(){var a=this.$;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Vl(this).some(function(b){return"showing"==b.mode}):a};q.Ue=function(){return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(a){return ne(a)}):[]};
425
+ q.Qg=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.va=new Ee(b.language,"",0,a),dm(this))}};q.Jb=function(){var a=this.Z;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Vl(this).some(function(b){return"showing"==b.mode}):a};q.Ue=function(){return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(a){return ne(a)}):[]};
426
426
  q.Sf=function(a){var b=Ob(a),c=im(this).filter(function(h){return Ob(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
427
427
  function Vl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Xl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function im(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
428
- q.ye=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Hl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=se(this.i.textStreams,this.Ba,this.sb,this.bb),0<a.length&&(Jj(this.j,a[0]),em(this))):Fj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ol(this)}};
428
+ q.ye=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==Hl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=se(this.i.textStreams,this.Ba,this.sb,this.bb),0<a.length&&(Jj(this.j,a[0]),em(this))):Fj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ol(this)}};
429
429
  q.jg=function(){if(!this.V())return null;var a=this.ka.l,b=0;if(this.D)b=this.D.Oc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
430
430
  q.Xe=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Xc=function(){if(this.l==Hl)return this.M.Xc();var a={total:[],audio:[],video:[],text:[]};this.l==Tl&&(a.total=li(this.g.buffered));return a};
431
431
  q.getStats=function(){if(this.l!=Hl&&this.l!=Tl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};zl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?
@@ -471,22 +471,22 @@ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h
471
471
  Oc()?!!Ig[p]:Pc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
472
472
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Bd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Dm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=cl;S.setAdManagerFactory=function(a){Ok=a};S.registerSupportPlugin=function(a,b){Dm[a]=b};S.prototype.destroy=S.prototype.destroy;
473
473
  var zm="abrstatuschanged",tm="adaptation",qm="buffering",yl="drmsessionupdate",Yj="emsg",Am="error",Cm="expirationupdated",hl="loaded",fl="loading",tl="manifestparsed",Yl="metadata",$k="onstatechange",al="onstateidle",rm="ratechange",Jl="streaming",xm="textchanged",ym="texttrackvisibility",ql="timelineregionadded",$l="timelineregionenter",am="timelineregionexit",vm="trackschanged",ll="unloading",wm="variantchanged",Em={gh:zm,hh:tm,ih:qm,lh:yl,sh:Yj,Error:Am,uh:Cm,Ah:"largegap",Bh:hl,Ch:fl,Gh:tl,Metadata:Yl,
474
- Kh:$k,Lh:al,Th:rm,Xh:"sessiondata",Yh:Jl,Zh:xm,$h:ym,ai:ql,bi:$l,ci:am,di:vm,ji:ll,li:wm},bl=0,Lk=1,Hl=2,Tl=3;S.LoadMode={DESTROYED:bl,NOT_LOADED:Lk,MEDIA_SOURCE:Hl,SRC_EQUALS:Tl};S.version="v3.2.19";var Fm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(Fm[0]),Number(Fm[1])));
474
+ Kh:$k,Lh:al,Th:rm,Xh:"sessiondata",Yh:Jl,Zh:xm,$h:ym,ai:ql,bi:$l,ci:am,di:vm,ji:ll,li:wm},bl=0,Lk=1,Hl=2,Tl=3;S.LoadMode={DESTROYED:bl,NOT_LOADED:Lk,MEDIA_SOURCE:Hl,SRC_EQUALS:Tl};S.version="v3.2.20";var Fm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(Fm[0]),Number(Fm[1])));
475
475
  var Bm=["output-restricted","internal-error"],Dm={},Ok=null,il={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},jm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
476
476
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Gm(){this.h=[];this.j=this.i=this.g=0};function Hm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new nf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Hm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
477
477
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
478
478
  q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};K("shaka.ads.ClientSideAd",Hm);
479
479
  Hm.prototype.release=Hm.prototype.release;Hm.prototype.getPositionInSequence=Hm.prototype.getPositionInSequence;Hm.prototype.getSequenceLength=Hm.prototype.getSequenceLength;Hm.prototype.setMuted=Hm.prototype.setMuted;Hm.prototype.resize=Hm.prototype.resize;Hm.prototype.isMuted=Hm.prototype.isMuted;Hm.prototype.setVolume=Hm.prototype.setVolume;Hm.prototype.getVolume=Hm.prototype.getVolume;Hm.prototype.play=Hm.prototype.play;Hm.prototype.pause=Hm.prototype.pause;Hm.prototype.skip=Hm.prototype.skip;
480
- Hm.prototype.canSkipNow=Hm.prototype.canSkipNow;Hm.prototype.getTimeUntilSkippable=Hm.prototype.getTimeUntilSkippable;Hm.prototype.isSkippable=Hm.prototype.isSkippable;Hm.prototype.isPaused=Hm.prototype.isPaused;Hm.prototype.getRemainingTime=Hm.prototype.getRemainingTime;Hm.prototype.getMinSuggestedDuration=Hm.prototype.getMinSuggestedDuration;Hm.prototype.getDuration=Hm.prototype.getDuration;function Im(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.19");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Jm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
481
- function(f){Km(e,f)});this.i.onended=function(){e.l.contentComplete()}}Im.prototype.stop=function(){this.g&&this.g.stop();this.m&&mk(this.m)};Im.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Km(a,b){b.getError();Lm(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
480
+ Hm.prototype.canSkipNow=Hm.prototype.canSkipNow;Hm.prototype.getTimeUntilSkippable=Hm.prototype.getTimeUntilSkippable;Hm.prototype.isSkippable=Hm.prototype.isSkippable;Hm.prototype.isPaused=Hm.prototype.isPaused;Hm.prototype.getRemainingTime=Hm.prototype.getRemainingTime;Hm.prototype.getMinSuggestedDuration=Hm.prototype.getMinSuggestedDuration;Hm.prototype.getDuration=Hm.prototype.getDuration;function Im(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.20");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Jm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
481
+ function(f){Km(e,f)});this.h.o(this.i,"ended",function(){e.l.contentComplete()})}Im.prototype.stop=function(){this.g&&this.g.stop();this.m&&mk(this.m)};Im.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Km(a,b){b.getError();Lm(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
482
482
  function Jm(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Mm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
483
483
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){Lm(a,null)}}
484
484
  function Mm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new M(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Km(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Nm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Nm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
485
485
  function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Lm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Lm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
486
486
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.v.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.v.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
487
487
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
488
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Nm(a,b){var c=b.getAd();a.v=new Hm(c,a.g);c=(new Map).set("ad",a.v).set("sdkAdObject",c).set("originalEvent",b);a.j(new M("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
489
- function Lm(a,b){a.j(new M("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function Om(a,b){this.i=a;this.h=null;this.g=b}q=Om.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
488
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
489
+ function Nm(a,b){var c=b.getAd();a.v=new Hm(c,a.g);c=(new Map).set("ad",a.v).set("sdkAdObject",c).set("originalEvent",b);a.j(new M("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause();a.v.setVolume(a.i.muted?0:a.i.volume)}function Lm(a,b){a.j(new M("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.ended||a.i.play()};function Om(a,b){this.i=a;this.h=null;this.g=b}q=Om.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
490
490
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
491
491
  q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};K("shaka.ads.ServerSideAd",Om);Om.prototype.release=Om.prototype.release;Om.prototype.getPositionInSequence=Om.prototype.getPositionInSequence;Om.prototype.getSequenceLength=Om.prototype.getSequenceLength;Om.prototype.setMuted=Om.prototype.setMuted;Om.prototype.resize=Om.prototype.resize;Om.prototype.isMuted=Om.prototype.isMuted;
492
492
  Om.prototype.setVolume=Om.prototype.setVolume;Om.prototype.getVolume=Om.prototype.getVolume;Om.prototype.play=Om.prototype.play;Om.prototype.pause=Om.prototype.pause;Om.prototype.skip=Om.prototype.skip;Om.prototype.canSkipNow=Om.prototype.canSkipNow;Om.prototype.getTimeUntilSkippable=Om.prototype.getTimeUntilSkippable;Om.prototype.isSkippable=Om.prototype.isSkippable;Om.prototype.isPaused=Om.prototype.isPaused;Om.prototype.getRemainingTime=Om.prototype.getRemainingTime;
@@ -498,8 +498,8 @@ f;e.i(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Pm.prototyp
498
498
  function Qm(a,b){a.i(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.v=d,a.l.currentTime=e.start)}})};function T(){cb.call(this);this.g=this.i=null;this.h=new Gm;this.j=navigator.language}pa(T,cb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Im(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
499
499
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new M("ad-stopped"));this.h=new Gm};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
500
500
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Pm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
501
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.19";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
502
- (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.19";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.F};
501
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.20";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
502
+ (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.20";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.F};
503
503
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};K("shaka.ads.AdManager",T);
504
504
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
505
505
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
@@ -575,9 +575,9 @@ function Do(a,b){var c=Number(oo(a,Eo,"presentationTimeOffset"))||0,d=oo(a,Eo,"t
575
575
  function Ho(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,B,D,E;return I(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.tb||!a.X.Pd,l=a.X.start,m=a.X.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.Ea(),c.za,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;B=l-g;D=l;E=m?l+m:Infinity;if("mp4"==n)var H=so(x,e,d,c,B,D,E);else{H=new uo(w);if(440786851!=vo(H).id)throw new N(2,3,3008);var L=vo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
576
576
  L=new uo(L.g);for(var J=null;L.Fa();){var O=vo(L);if(357149030==O.id){J=O;break}}if(!J)throw new N(2,3,3010);J=new uo(J.g);O=1E6;for(L=null;J.Fa();){var V=vo(J);if(2807729==V.id)O=zo(V);else if(17545==V.id)if(4==V.g.byteLength)L=V.g.getFloat32(0);else if(8==V.g.byteLength)L=V.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);J=O/1E9;L*=J;O=vo(new uo(x));if(475249515!=O.id)throw new N(2,3,3007);H=Ao(O,H,J,L,d,c,B,D,E)}C=H;h.$b(C);r=new ij(C);k&&r.ub(D,E,!0);return G["return"](r)})}
577
577
  function Eo(a){return a.Fc}function Go(a){var b=po(a,Eo,"RepresentationIndex");a=oo(a,Eo,"indexRange");a=Kf(a||"");b&&(a=Hf(b,"range",Kf,a));return a}function Fo(a,b){Io(a,b);if(!Go(a))throw new N(2,4,4002);}function Io(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Jo(a,b){var c=Co(a,Ko),d=Lo(a);if(!d.ya&&!d.timeline&&1<d.Yb.length)throw new N(2,4,4002);if(!d.ya&&!a.X.duration&&!d.timeline&&1==d.Yb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=a.sa.id+","+a.L.id,e=b[f]);c=Mo(a.X.start,a.X.duration,a.L.Pa,d,c);d=!e;e?e.Zb(c,a.presentationTimeline.jb()):(e=new ij(c),f&&a.tb&&(b[f]=e));a.presentationTimeline.$b(c);a.tb&&a.X.Pd||e.ub(a.X.start,a.X.duration?a.X.start+a.X.duration:
578
- Infinity,d);return{Vb:function(){return Promise.resolve(e)}}}function Ko(a){return a.xb}function Lo(a){var b=Vo(a);a=no(a,Ko);var c=a.ec;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,ec:c,pb:a.pb,timeline:a.timeline,Yb:b}}
578
+ Infinity,d);return{Vb:function(){return Promise.resolve(e)}}}function Ko(a){return a.xb}function Lo(a){var b=No(a);a=no(a,Ko);var c=a.ec;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,ec:c,pb:a.pb,timeline:a.timeline,Yb:b}}
579
579
  function Mo(a,b,c,d,e){var f=d.Yb.length;d.timeline&&d.timeline.length!=d.Yb.length&&(f=Math.min(d.timeline.length,d.Yb.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={zd:m.zd},n++){var p=d.Yb[n];m.zd=Gb(c,[p.Cg]);var r=void 0;r=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new Mi(a+l,a+r,function(v){return function(){return v.zd}}(m),p.start,p.end,e,g,a,h));l=r}return k}
580
- function Vo(a){return[a.L.xb,a.wa.xb,a.sa.xb].filter(Eb).map(function(b){return zf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.$e&&(a.$e=!0);var c=b.getAttribute("media");b=Hf(b,"mediaRange",Kf,{start:0,end:null});return{Cg:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Xe(a);if(h.Bc)return Io(a,g),{Vb:function(){var v=mo(h.Bc,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Pa,[v]);return Ho(k,b,g,v,0,null,h.pb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.Zd(h.ya),a.presentationTimeline.$d(a.X.start)),{Vb:function(){return $o(k,h,e,g,f)}};var l=null;d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,l=c[d]);var m=ap(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=!(a.tb&&
580
+ function No(a){return[a.L.xb,a.wa.xb,a.sa.xb].filter(Eb).map(function(b){return zf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.$e&&(a.$e=!0);var c=b.getAttribute("media");b=Hf(b,"mediaRange",Kf,{start:0,end:null});return{Cg:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Xe(a);if(h.Bc)return Io(a,g),{Vb:function(){var v=mo(h.Bc,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Pa,[v]);return Ho(k,b,g,v,0,null,h.pb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.Zd(h.ya),a.presentationTimeline.$d(a.X.start)),{Vb:function(){return $o(k,h,e,g,f)}};var l=null;d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,l=c[d]);var m=ap(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=!(a.tb&&
581
581
  a.X.Pd);l?(r&&(new ij(m)).ub(n,p,!0),l.Zb(m,a.presentationTimeline.jb())):(l=new ij(m),d&&a.tb&&(c[d]=l));a.presentationTimeline.$b(m);r&&l.ub(n,p);return{Vb:function(){return Promise.resolve(l)}}}function bp(a){return a.Gc}function Yo(a){var b=no(a,bp),c=oo(a,bp,"media");a=oo(a,bp,"index");return{ya:b.ya,timescale:b.timescale,ec:b.ec,pb:b.pb,Ge:b.Ge,timeline:b.timeline,Xd:c,Bc:a}}
582
582
  function Zo(a){var b=a.Bc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Bc&&(a.timeline=null),a.ya=null);if(!a.Bc&&!a.Xd)throw new N(2,4,4002);}
583
583
  function $o(a,b,c,d,e){function f(J){var O=(J-r)*p,V=O+b.pb,Z=O+l;O=Z+p;var W=Math.min(O,h());Z=new Mi(Z,W,function(){var ma=mo(y,w,J,x,V*v);return Gb(C,[ma])},0,null,d,B,l,h());Z.l=O;return Z}function g(){var J=[Math.max(k.jb(),l),Math.min(k.Db(),h())].map(function(O){return O-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(O){return O+r})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.sa.id,n=a.X.duration,p=b.ya,r=b.ec,v=b.timescale,
@@ -651,12 +651,12 @@ function nq(a,b,c){b=dd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
651
651
  var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=oq(a,m),pq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Gb([d],[m.trim()])[0],h&&g.push(h),e.push(new cq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new cq("",g,k)));return new $p(c,b,f,e)}f.push(h);
652
652
  "EXT-X-STREAM-INF"==h.name&&(h.g.push(new dq("URI",k)),e=!0)}}return new $p(c,b,f)}function oq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new iq(f);var h;(h=kq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=kq(f,k);)d.push(new dq(h[1],h[2]||h[3])),jq(f)}return new aq(c,e,d,g)}
653
653
  var pq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),qq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function rq(){}function sq(a){try{var b=tq(a);return Se({uri:a,hf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Qe(c)}}function tq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=md(a):e=hd(a);return{data:e,contentType:c}}
654
- K("shaka.net.DataUriPlugin",rq);rq.parse=sq;af("data",sq);function uq(){var a=this;this.g=this.j=null;this.Ba=1;this.v=new Map;this.B=new Map;this.va=new Set;this.h=new Map;this.i=null;this.M="";this.ua=new mq;this.ka=0;this.D=new P(function(){vq(a)});this.m=wq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Ye;this.W=[];this.J=new Map;this.Ca=!1;this.A=new Map;this.R=null;this.Z=new Map;this.I=new Map;this.l=!1}q=uq.prototype;q.configure=function(a){this.g=a};
654
+ K("shaka.net.DataUriPlugin",rq);rq.parse=sq;af("data",sq);function uq(){var a=this;this.g=this.j=null;this.Ba=1;this.v=new Map;this.B=new Map;this.va=new Set;this.h=new Map;this.i=null;this.M="";this.Z=new mq;this.ka=0;this.D=new P(function(){vq(a)});this.m=wq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Ye;this.W=[];this.J=new Map;this.Ca=!1;this.A=new Map;this.R=null;this.ua=new Map;this.I=new Map;this.l=!1}q=uq.prototype;q.configure=function(a){this.g=a};
655
655
  q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,xq(c,df([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,yq(c,d.data),3);e=c.ka;0<e&&c.D.P(e);return f["return"](c.F)})};q.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.j=null;this.va.clear();this.F=null;this.h.clear();this.B.clear();this.A.clear();this.v.clear();return Promise.all(a)};
656
656
  q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==wq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?u(e,zq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(zq(a,c[d]));return u(e,Promise.all(b),0)})};
657
- function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){if(1==y.g)return c=Aq,d=b.Cf,e=new ib(d),a.l&&b.Hf&&nb(e,new pb("_HLS_skip=YES")),u(y,xq(a,df([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=nq(a.ua,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=eq(g.g,"EXT-X-DEFINE");k=Bq(a,h);l=b.stream;return u(y,Cq(a,b.rd,g,l.type,l.mimeType,b.Wd,k,b.Mf),3)}m=y.h;l.segmentIndex.Zb(m,a.i.jb());m.length&&(n=hq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Wd.get(n),l.segmentIndex.Ab(p));
658
- r=m[m.length-1];if(v=gq(g.g,"EXT-X-ENDLIST"))Dq(a,c.Bf),a.i.Za(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
659
- function yq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd;return I(function(kb){switch(kb.g){case 1:c=nq(a.ua,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=eq(c.g,"EXT-X-DEFINE");Eq(a,d);e=eq(c.g,"EXT-X-MEDIA");f=eq(c.g,"EXT-X-STREAM-INF");g=eq(c.g,"EXT-X-IMAGE-STREAM-INF");Fq(a,f);h=eq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=U(m,"DATA-ID"),p=U(m,"URI"),r=U(m,"LANGUAGE"),v=U(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
657
+ function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){if(1==y.g)return c=Aq,d=b.Cf,e=new ib(d),a.l&&b.Hf&&nb(e,new pb("_HLS_skip=YES")),u(y,xq(a,df([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=nq(a.Z,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=eq(g.g,"EXT-X-DEFINE");k=Bq(a,h);l=b.stream;return u(y,Cq(a,b.rd,g,l.type,l.mimeType,b.Wd,k,b.Mf),3)}m=y.h;l.segmentIndex.Zb(m,a.i.jb());m.length&&(n=hq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Wd.get(n),l.segmentIndex.Ab(p));r=
658
+ m[m.length-1];if(v=gq(g.g,"EXT-X-ENDLIST"))Dq(a,c.Bf),a.i.Za(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
659
+ function yq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd;return I(function(kb){switch(kb.g){case 1:c=nq(a.Z,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=eq(c.g,"EXT-X-DEFINE");Eq(a,d);e=eq(c.g,"EXT-X-MEDIA");f=eq(c.g,"EXT-X-STREAM-INF");g=eq(c.g,"EXT-X-IMAGE-STREAM-INF");Fq(a,f);h=eq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=U(m,"DATA-ID"),p=U(m,"URI"),r=U(m,"LANGUAGE"),v=U(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
660
660
  Gb([a.M],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new M("sessiondata",y),a.j)a.j.onEvent(x);return u(kb,Gq(a,e),2);case 2:return Hq(a,e),u(kb,Iq(a,f),3);case 3:return w=kb.h,u(kb,Jq(a,e),4);case 4:return C=kb.h,u(kb,Kq(a,g),5);case 5:B=kb.h;if(!a.j)throw new N(2,7,7001);if(a.Ca&&0==w.length)throw new N(2,4,4034);E=D=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())L=H.value,D=Math.min(D,L.df),"text"!=L.stream.type&&(E=Math.min(E,L.Bg-L.df));a.m!=wq?(a.i=new Q(0,a.g.defaultPresentationDelay?
661
661
  a.g.defaultPresentationDelay:a.Y?a.Y:3*a.$),a.i.Hc(!1)):(a.i=new Q(null,0),a.i.Hc(!0));if(a.m!=wq)a.ka=a.H,J=Aq,a.m==J.Ie&&(O=a.i.md,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.xe(O));else for(a.i.Za(E),a.i.offset(-D),V=t(a.h.values()),H=V.next();!H.done;H=V.next())Z=H.value,Z.stream.segmentIndex.offset(-D),Z.stream.segmentIndex.ub(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ua=ya.value,Ra=t([Ua.video,Ua.audio]),Fa=Ra.next();!Fa.done;Fa=Ra.next())(Va=
662
662
  Fa.value)&&W.push(Va);return u(kb,Promise.all(W.map(function(Rc){return I(function(De){return u(De,Rc.createSegmentIndex(),0)})})),6);case 6:Qc=t(W);for(Fa=Qc.next();!Fa.done;Fa=Qc.next())Dd=Fa.value,a.W.push(Dd.segmentIndex.N);Lq(a);a.i.Ud();a.F={presentationTimeline:a.i,variants:w,textStreams:C,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(kb)}})}
@@ -677,12 +677,12 @@ v="YES"==r;return u(x,Uq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.B.has(c)?a.B.get
677
677
  function Oq(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=Tq(bq(b,"URI"),a.v);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Sq(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,Uq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
678
678
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
679
679
  function Qq(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=Tq(bq(b,"URI"),a.v);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Ib(d,c);return u(k,Uq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
680
- function Uq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd,kb,Rc,De,No,Oo,Po,Qo,Di,Ei,cg,Ro,So,To,Uo;return I(function(lb){switch(lb.g){case 1:return p=Gb([a.M],[b])[0],u(lb,xq(a,df([p],a.g.retryParameters),0),2);case 2:r=lb.h;p=r.uri;v=nq(a.ua,r.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,B=eq(C.g,"EXT-X-KEY"),y.push.apply(y,ha(B));D=!1;E=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
680
+ function Uq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd,kb,Rc,De,Oo,Po,Qo,Ro,Di,Ei,cg,So,To,Uo,Vo;return I(function(lb){switch(lb.g){case 1:return p=Gb([a.M],[b])[0],u(lb,xq(a,df([p],a.g.retryParameters),0),2);case 2:r=lb.h;p=r.uri;v=nq(a.Z,r.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,B=eq(C.g,"EXT-X-KEY"),y.push.apply(y,ha(B));D=!1;E=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
681
681
  H.next())if(J=L.value,O=bq(J,"METHOD"),"NONE"!=O){D=!0;if("AES-128"==O)return a.Ca=!0,lb["return"](null);V=bq(J,"KEYFORMAT");if(W=(Z=Vq[V])?Z(J):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ua=ya.value,G.add(Ua);E.push(W)}}if(D&&!E.length)throw new N(2,4,4026);Ra=eq(v.g,"EXT-X-DEFINE");Fa=Bq(a,Ra);Wq(a,v);return u(lb,Xq(a,d,c,v,Fa),3);case 3:return Va=lb.h,Yq.includes(Va)&&(c=""),Qc=new Map,Dd=new Map,kb=a.l,A(lb,4),u(lb,Cq(a,b,v,d,Va,Qc,Fa,Dd),6);case 6:Rc=lb.h;ua(lb,5);
682
- break;case 4:De=F(lb);if(4035==De.code)return Pa("Skipping unsupported HLS stream",Va,b),lb["return"](null);throw De;case 5:kb!=a.l&&Wq(a,v);No=Rc[0].startTime;Oo=Rc[Rc.length-1].endTime;Po=new ij(Rc);Qo=d==Lb?"subtitle":void 0;Di=[];if(l)for(Ei=t(l.split(",")),cg=Ei.next();!cg.done;cg=Ei.next())Ro=cg.value,Di.push(Ro);To=(So=gq(v.g,"EXT-X-SERVER-CONTROL"))?null!=So.getAttribute("CAN-SKIP-UNTIL"):!1;Uo={id:a.Ba++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Po,
683
- mimeType:Va,codecs:c,kind:Qo,encrypted:D,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Di,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Uo,rd:b,Cf:p,df:No,Bg:Oo,Wd:Qc,Mf:Dd,Hf:To})}})}
682
+ break;case 4:De=F(lb);if(4035==De.code)return Pa("Skipping unsupported HLS stream",Va,b),lb["return"](null);throw De;case 5:kb!=a.l&&Wq(a,v);Oo=Rc[0].startTime;Po=Rc[Rc.length-1].endTime;Qo=new ij(Rc);Ro=d==Lb?"subtitle":void 0;Di=[];if(l)for(Ei=t(l.split(",")),cg=Ei.next();!cg.done;cg=Ei.next())So=cg.value,Di.push(So);Uo=(To=gq(v.g,"EXT-X-SERVER-CONTROL"))?null!=To.getAttribute("CAN-SKIP-UNTIL"):!1;Vo={id:a.Ba++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qo,
683
+ mimeType:Va,codecs:c,kind:Ro,encrypted:D,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Di,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Vo,rd:b,Cf:p,df:Oo,Bg:Po,Wd:Qc,Mf:Dd,Hf:Uo})}})}
684
684
  function Wq(a,b){var c=gq(b.g,"EXT-X-PLAYLIST-TYPE"),d=gq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Dq(a,wq);else{c?Dq(a,Zq):Dq(a,$q);d=gq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=gq(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(bq(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=gq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(bq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
685
- function ar(a,b,c,d){c=gq(c,"EXT-X-MAP");if(!c)return null;var e=bq(c,"URI");d=Tq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=br(d,c),a.Z.set(b,c));return a.Z.get(b)}function br(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Ki(function(){return[a]},c,d)}
685
+ function ar(a,b,c,d){c=gq(c,"EXT-X-MAP");if(!c)return null;var e=bq(c,"URI");d=Tq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=br(d,c),a.ua.set(b,c));return a.ua.get(b)}function br(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Ki(function(){return[a]},c,d)}
686
686
  function cr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Tq(d.h,g),n=gq(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={Bd:y.Bd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],B=0==x?e:C.endTime,D=Number(U(w,"DURATION"))||a.aa;if(D){D=B+D;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(C=U(w,"BYTERANGE-START"))?Number(C):0:(E=U(w,"BYTERANGE"),C=t(dr(C,E)),E=C.next().value,G=C.next().value);if(w=U(w,"URI"))y.Bd=Gb([h],
687
687
  [w])[0],v.push(new Mi(B,D,function(H){return function(){return[H.Bd]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=gq(l,"EXT-X-BYTERANGE"))?(r=t(dr(c,a.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].za,r=v[v.length-1].ra);c="";a=null;"image"==k&&(c="1x1",k=gq(l,"EXT-X-TILES"))&&(c=bq(k,"LAYOUT"),(k=U(k,"DURATION"))&&(a=Number(k)));return new Mi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,a)}
688
688
  function dr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ra+1,d=c+d-1);return[c,d]}function Lq(a){if(a.i){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.i.$b(c.value);a.W=[]}}
@@ -698,9 +698,10 @@ function ir(a,b,c){function d(){f.seek(g+188);h=f.ha();71!=h&&(f.seek(g+192),h=f
698
698
  f.cc();var l=f.cc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Tq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
699
699
  function Xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x;return I(function(w){if(1==w.g){f=Mb;g=kf;h=Math.trunc((d.segments.length-1)/2);k=Tq(d.segments[h].h,e);l=new ib(k);m=l.Na.split(".").pop();n=jr[b];if(p=n[m])return w["return"](p);if(b==f.ma)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.pc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=df([k],a.g.retryParameters);r.method="HEAD";return u(w,xq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
700
700
  w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function vq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ka,a.D.P(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.D.P(.1);z(d)})}function Dq(a,b){a.m=b;a.i&&a.i.Hc(a.m==wq);a.m!=wq||a.D.stop()}function xq(a,b,c){if(!a.G)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ze(a.G,b);return b.promise}K("shaka.hls.HlsParser",uq);
701
- var Yq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],jr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
702
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Vq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,"URI");b=tq(b);b=Ec(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
703
- bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=tq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$n(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},wq="VOD",$q="EVENT",Zq="LIVE",Aq={Bf:wq,oh:$q,Ie:Zq};Ig.m3u8=function(){return new uq};Gg["application/x-mpegurl"]=function(){return new uq};Gg["application/vnd.apple.mpegurl"]=function(){return new uq};function kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function lr(){}function mr(a,b,c,d){var e=new nr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new or,g={Le:!1,wf:!1};a=pr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Le=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.wf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
701
+ var Yq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],jr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
702
+ m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Vq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,"URI");b=tq(b);b=Ec(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
703
+ return b},"com.microsoft.playready":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=tq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$n(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},wq="VOD",$q="EVENT",Zq="LIVE",Aq={Bf:wq,oh:$q,Ie:Zq};Ig.m3u8=function(){return new uq};Gg["application/x-mpegurl"]=function(){return new uq};
704
+ Gg["application/vnd.apple.mpegurl"]=function(){return new uq};function kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function lr(){}function mr(a,b,c,d){var e=new nr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new or,g={Le:!1,wf:!1};a=pr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Le=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.wf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
704
705
  function pr(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,B;return I(function(D){switch(D.g){case 1:return g=qr,h=rr,n=m=0,p=Date.now(),A(D,2),u(D,g(a,c),4);case 4:return k=D.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var H,L;return I(function(J){switch(J.g){case 1:return A(J,2),u(J,r.read(),4);case 4:H=J.h;ua(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.C(5);break}m+=H.value.byteLength;if(!f){J.C(5);break}return u(J,
705
706
  f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?E.close():(E.enqueue(H.value),G());z(J)}})}G()},new h({start:x}),u(D,k.arrayBuffer(),5);case 5:l=D.h;ua(D,3);break;case 2:w=F(D);if(d.Le)throw new N(1,1,7001,a,b);if(d.wf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},B=k.headers,B.forEach(function(E,G){C[G.trim()]=E}),D["return"](kr(C,l,k.status,a,k.url,b))}})}
706
707
  function sr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",lr);lr.isSupported=sr;lr.parse=mr;var qr=window.fetch,or=window.AbortController,rr=window.ReadableStream,nr=window.Headers;sr()&&(af("http",mr,2,!0),af("https",mr,2,!0));function tr(){}
@@ -729,7 +730,7 @@ cs.prototype.sc=function(a){var b,c,d,e,f,g;return I(function(h){if(1==h.g){b=[]
729
730
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
730
731
  function ds(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,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,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
731
732
  dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function es(){Kr.apply(this,arguments)}pa(es,Kr);es.prototype.hasFixedKeySpace=function(){return!1};es.prototype.addSegments=function(a){return this.add(this.i,a)};es.prototype.addManifests=function(a){return this.add(this.h,a)};es.prototype.sc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function fs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=fs.prototype;
732
- q.init=function(){var a=this,b=new Lc,c=!1,d=new P(function(){c=!0;b.reject(new N(2,9,9017))});d.P(2);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 Yr(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new cs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
733
+ q.init=function(){var a=this,b=new Lc,c=!1,d=new P(function(){c=!0;b.reject(new N(2,9,9017))});d.P(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 Yr(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new cs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
733
734
  new cs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new es(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Or(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 N(2,
734
735
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.C(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
735
736
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
@@ -787,10 +788,10 @@ Dm.offline=Ds;function ct(){}function dt(){for(var a=t(et),b=a.next();!b.done;b=
787
788
  function nt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
788
789
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ot);document.addEventListener("webkitfullscreenerror",ot);document.addEventListener("mozfullscreenchange",ot);document.addEventListener("mozfullscreenerror",ot);document.addEventListener("MSFullscreenChange",ot);document.addEventListener("MSFullscreenError",ot)}}
789
790
  function ot(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}ct.Fullscreen=mt;mt.install=nt;ft(nt);function pt(){}function qt(){}ct.MathRound=pt;pt.install=qt;ft(qt);function rt(){}function st(){if(Xc()||Yc()||Zc()||Uc("PlayStation 5")||Wc()||Vc()||Uc("PC=EOS")||Uc("Hisense")||Uc("VIDAA")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),tt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ut}
790
- function ut(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w;return I(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return C["return"](b);if(c){if(Xc()){if(!window.cast)throw new N(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+
791
- c.framerate);"pq"===c.transferFunction&&(B+="; eotf=smpte2084");B=cast.__platform__.canDisplayType(B)}else B=MediaSource.isTypeSupported(c.contentType)}else B=MediaSource.isTypeSupported(c.contentType);e=B;if(!e)return C["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return C["return"](b)}else return C["return"](b);if(!a.keySystemConfiguration)return b.supported=
792
- !0,C["return"](Promise.resolve(b));n=a.keySystemConfiguration;p=[];r=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},r.push(y));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);r.length&&(x.videoCapabilities=r);A(C,3);return u(C,navigator.requestMediaKeySystemAccess(n.keySystem,
793
- [x]),5);case 5:w=C.h;ua(C,4);break;case 3:F(C);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return C["return"](b)}})}ct.MediaCapabilities=rt;rt.install=st;var tt=null;rt.originalMcap=tt;ft(st,-1);function vt(){}function wt(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?xt():a?(yt(),12>=a?(zt(),At()):zt()):(Uc("Tizen 2")||Uc("Tizen 3")||Uc("Tizen 4"))&&Bt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ct()}
791
+ function ut(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w;return I(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return C["return"](b);if(c){if(Xc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+c.framerate);"pq"===c.transferFunction&&
792
+ (B+="; eotf=smpte2084");B=cast.__platform__.canDisplayType(B)}else B=MediaSource.isTypeSupported(c.contentType);else B=MediaSource.isTypeSupported(c.contentType);e=B;if(!e)return C["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return C["return"](b)}else return C["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,C["return"](Promise.resolve(b));n=
793
+ a.keySystemConfiguration;p=[];r=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},r.push(y));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);r.length&&(x.videoCapabilities=r);A(C,3);return u(C,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),
794
+ 5);case 5:w=C.h;ua(C,4);break;case 3:F(C);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return C["return"](b)}})}ct.MediaCapabilities=rt;rt.install=st;var tt=null;rt.originalMcap=tt;ft(st,-1);function vt(){}function wt(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?xt():a?(yt(),12>=a?(zt(),At()):15>=a&&zt()):navigator.userAgent.match(/Edge?\//)?yt():(Uc("Tizen 2")||Uc("Tizen 3")||Uc("Tizen 4"))&&Bt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ct()}
794
795
  function zt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ea.apply(0,arguments));b.abort=function(){};return b}}function At(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function yt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
795
796
  function Bt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=yd(b)[0]&&a(b)}}function xt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
796
797
  function Ct(){var a=MediaSource.isTypeSupported;Wc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}ct.MediaSource=vt;vt.install=wt;ft(wt);function Dt(){}function Et(){screen.orientation||void 0!=window.orientation&&Ft()}function Ft(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Gt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}ct.Orientation=Dt;
@@ -861,20 +862,20 @@ wv.prototype.parseMedia=function(a,b){var c=dd(a);c=c.replace(/\r\n|\r(?=[^\n]|$
861
862
  (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");jq(g);k=lq(g)}f.push(h)}e=new Map;yv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]){l=[];k=-1;for(m=1;m<h.length;m++)h[m].includes("::cue")&&(l.push([]),k=l.length-1),-1!=k&&(l[k].push(h[m]),h[m].includes("}")&&(k=-1));l=t(l);for(k=l.next();!k.done;k=l.next()){var n=k.value;k="global";(m=n[0].match(/\((.*)\)/))&&
862
863
  (k=m.pop());m=n.slice(1,-1);n[0].includes("}")&&(n=/\{(.*?)\}/.exec(n[0]))&&(m=n[1].split(";"));(n=e.get(k))||(n=new hc(0,0,""));for(var p=!1,r=0;r<m.length;r++){var v=/^\s*([^:]+):\s*(.*)/.exec(m[r]);if(v){var y=v[2].trim().replace(";","");switch(v[1].trim()){case "background-color":case "background":p=!0;n.backgroundColor=y;break;case "color":p=!0;n.color=y;break;case "font-family":p=!0;n.fontFamily=y;break;case "font-size":p=!0;n.fontSize=y;break;case "font-weight":if(700<=parseInt(y,10)||"bold"==
863
864
  y)p=!0,n.fontWeight=700;break;case "font-style":switch(y){case "normal":p=!0;n.fontStyle=rc;break;case "italic":p=!0;n.fontStyle="italic";break;case "oblique":p=!0,n.fontStyle="oblique"}break;case "opacity":p=!0;n.opacity=parseFloat(y);break;case "text-shadow":p=!0;n.textShadow=y;break;case "white-space":p=!0,n.wrapLine="noWrap"!=y}}}p&&e.set(k,n)}}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0]||"REGION"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));
864
- k=new iq(h[0]);m=xv(k);r=kq(k,/[ \t]+--\x3e[ \t]+/g);n=xv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=zv(h.slice(1).join("\n").trim());e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new hc(m,n,"");Av(p,h,e);jq(k);for(m=lq(k);m;)Bv(h,m,f),jq(k),m=lq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
865
+ k=new iq(h[0]);m=xv(k);r=kq(k,/[ \t]+--\x3e[ \t]+/g);n=xv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new hc(m,n,"");zv(p,h,e);jq(k);for(m=lq(k);m;)Av(h,m,f),jq(k),m=lq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
865
866
  function yv(a){for(var b=t(Object.entries(wc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(xc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
866
- function Av(a,b,c){0===c.size&&yv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
867
+ function zv(a,b,c){0===c.size&&yv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
867
868
  h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=
868
- Qf("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(e);for(e=a.next();!e.done;e=a.next())Cv(e.value,b,d,c);b.nestedCues=d}else b.payload=a}function Dv(a,b){return a&&0<a.length?a:b}
869
+ Qf("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Bv(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())Cv(e.value,b,d,c);b.nestedCues=d}else b.payload=Bv(a)}function Dv(a,b){return a&&0<a.length?a:b}
869
870
  function Cv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Dv(h.backgroundColor,e.backgroundColor),e.color=Dv(h.color,e.color),e.fontFamily=Dv(h.fontFamily,e.fontFamily),e.fontSize=Dv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
870
- h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}}if(Gf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Cv(a.value,e,c,d)}
871
- function Bv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lc:a.textAlign=tc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
871
+ h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}}if(Gf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Bv(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Cv(a.value,e,c,d)}
872
+ function Av(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lc:a.textAlign=tc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
872
873
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Ev(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=vc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nc,a.line=Number(c[1]),c[2]&&(a.lineAlign=vc[c[2].toUpperCase()])}function Ev(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
873
- function xv(a){a=kq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function zv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}K("shaka.text.VttTextParser",wv);
874
+ function xv(a){a=kq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Bv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}K("shaka.text.VttTextParser",wv);
874
875
  wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;Cd["text/vtt"]=function(){return new wv};Cd['text/vtt; codecs="vtt"']=function(){return new wv};Cd['text/vtt; codecs="wvtt"']=function(){return new wv};function Fv(){this.g=null}Fv.prototype.parseInit=function(a){var b=this,c=!1;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).T("mdhd",function(d){d=di(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).T("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
875
876
  Fv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ng).box("moof",Rg).box("traf",Rg).T("tfdt",function(D){g=!0;c=ci(D.reader,D.version).Md}).T("tfhd",function(D){l=bi(D.reader,D.flags).Qe}).T("trun",function(D){h=!0;d=ei(D.reader,D.version,D.flags).mf}).box("mdat",Ug(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Kg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.le||l,y=r.od?
876
877
  c+r.od:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var C=n.O(),B=null;"vttc"==Vg(C)?8<w&&(B=n.wb(w-8)):n.skip(w-8);v&&B&&(w=Gv(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Eb)};function Gv(a,b,c){var d,e,f;(new Ng).box("payl",Ug(function(g){d=dd(g)})).box("iden",Ug(function(g){e=dd(g)})).box("sttg",Ug(function(g){f=dd(g)})).parse(a);return d?Hv(d,e,f,b,c):null}
877
- function Hv(a,b,c,d,e){d=new hc(d,e,"");Av(a,d,new Map);b&&(d.id=b);if(c)for(a=new iq(c),b=lq(a);b;)Bv(d,b,[]),jq(a),b=lq(a);return d}K("shaka.text.Mp4VttParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Fv};function Iv(){}Iv.prototype.parseInit=function(){};Iv.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new iq(c[0]),e=Jv(d),f=kq(d,/,/g);d=Jv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
878
+ function Hv(a,b,c,d,e){d=new hc(d,e,"");zv(a,d,new Map);b&&(d.id=b);if(c)for(a=new iq(c),b=lq(a);b;)Av(d,b,[]),jq(a),b=lq(a);return d}K("shaka.text.Mp4VttParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Fv};function Iv(){}Iv.prototype.parseInit=function(){};Iv.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new iq(c[0]),e=Jv(d),f=kq(d,/,/g);d=Jv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
878
879
  function Jv(a){a=kq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.SbvTextParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.parseInit=Iv.prototype.parseInit;Cd["text/x-subviewer"]=function(){return new Iv};function Kv(){this.g=new wv}Kv.prototype.parseInit=function(){};Kv.prototype.parseMedia=function(a,b){var c=dd(a);c=Lv(c);c=Ec(hd(c));return this.g.parseMedia(c,b)};function Lv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",Kv);Kv.srt2webvtt=Lv;Kv.prototype.parseMedia=Kv.prototype.parseMedia;
879
880
  Kv.prototype.parseInit=Kv.prototype.parseInit;Cd["text/srt"]=function(){return new Kv};function Mv(){}Mv.prototype.parseInit=function(){};
880
881
  Mv.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Nv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Ov.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Pv);else if("Style"==e){e=f.split(Pv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=