@castlabs/prestoplay 6.6.1-beta.2 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +403 -403
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +47 -41
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +68 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +24 -23
  16. package/cjs/cl.mse.js +263 -260
  17. package/cjs/cl.muxdata.js +11 -12
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +70 -69
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +13 -13
  28. package/cjs/cl.vtt.js +11 -11
  29. package/cjs/cl.youbora.js +19 -19
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +345 -343
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +47 -41
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +57 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +17 -16
  44. package/cl.mse.js +227 -227
  45. package/cl.muxdata.js +9 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -15
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +14 -14
  58. package/package.json +1 -1
  59. package/typings.d.ts +118 -12
package/cjs/cl.cast.js CHANGED
@@ -1,115 +1,115 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var lL="Cannot seek during ads playout.",mL="Cannot switch track",nL="Media session does not exist.",oL="No receivers available",pL="Reset ABR functionality not available on cast.",qL="SDK not yet ready",rL="Sender is destroyed.",sL="clpp.cast.CastProxy",tL="clpp.cast.Player",uL="clpp.cast.Receiver",vL="urn:x-cast:castlabs",wL="urn:x-cast:com.google.cast.media",xL=function(a){return _.A(function(b){return 1==b.a?_.x(b,a.fc(_.Pd),2):_.x(b,a.fc(_.Od),0)})},yL=function(a,b){this.log=new _.H(b);this.a=
3
- a;this.j=null;this.g=_.Ym;this.m=_.Zm;this.h=2;this.B=Date.now();this.A=-1},zL=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ld){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ld?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},AL=function(a){if(typeof a!==_.ve)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
- "Infinity"===c?Infinity:c})}catch(b){return a}},BL=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.A(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Ii(d,a.mimeType,g);if(!f||!g)return q.G(2);l=_.Oh(a.url);return _.x(q,c.fetch(l).O,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.N(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},CL=function(a,b){if(window.chrome&&
5
- chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Te:return d.FMP4;case _.Se:return b===_.ji?d.MPEG2_TS:c.TS;case _.lc:return c.AAC;case _.nc:return c.AC3;case _.oc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.pc:return c.FMP4}},EL=function(a){a=
6
- void 0===a?DL:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},FL=function(a){yL.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.f=null;this.w=this.Ab.bind(this)},GL=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},HL=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},JL=function(a,b){var c=HL(a);return IL(a,b).find(function(d){return c.includes(d.id)})||null},IL=function(a,b){return a.g.filter(function(c){return c.type===b})},LL=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.P){var e=a.na();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;KL(a,b)},function(f){a.f[b]=null;a.h.debug(mL,f)})}else b===_.P&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){KL(a,b)},function(f){a.h.debug(mL,f)}))},KL=function(a,b){b===_.Q?a.a.trigger(new _.I(_.Mj)):b===_.P&&a.a.trigger(new _.I(_.Nj))},PL=function(a,b,c,d){_.Tj.call(this);this.j=new _.H(_.Ic);this.$=a;this.o=new _.Ti(b);this.Z=c;this.ca=d;this.g=this.J=
9
- _.Zj();this.D=[];this.B=0;this.M=new _.ei;this.H=this.m=this.a=null;this.A=this.w=!1;this.fa="";this.Ra=1E6;this.f=new GL;this.f.initialize(this);this.h=new FL(this);this.I=new _.eg;this.K=null;this.F=new Set;this.S=this.Ui.bind(this);this.Ka=this.mj.bind(this);this.aa=this.dj.bind(this);this.U=this.Yi.bind(this);this.P=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){ML(!0)},0)}});NL(this);OL.add(this)},
10
- QL=function(a){var b,c;return _.A(function(d){if(1==d.a)return OL["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.S),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ka)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.h&&(c.push(a.h.destroy()),a.h=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Z=null;a.ca=null;_.z(d)})},SL=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(RL);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=EL(RL[b]);return Object.assign(b,a)},TL=function(a){var b=void 0===b?DL:b;return Object.values(RL).includes(a)?a:b},VL=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},NL=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.$.length){a.w=!0;a.o.$e();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.$;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.S);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ka);$L&&a.o.Y(.02)}},eM=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=null;
13
- a=null===a?null:a+b;return null===a?b:a},gM=function(a,b){fM(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.aa);b.addMessageListener(vL,a.U)},fM=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.I.release(),a.H=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.m),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Pg.bind(a)),a.f&&a.f.load(),a.h&&a.h.init(),a.trigger(new _.I(_.xd))))},hM=function(a){return _.A(function(b){return a.ib()?
14
- b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},iM=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,w,y,B,E,F;return _.A(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.Bq,_.x(D,hM(a),2);case 2:if(!b)return D["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Db;m=h.audioMimeType;g.hlsVideoSegmentFormat=CL(l,d.VIDEO);
15
- g.hlsSegmentFormat=CL(m,d.AUDIO);if(!b.Pa){D.G(3);break}if(!a.P){D.G(4);break}return _.x(D,Promise.resolve(a.P(b.Pa)),5);case 5:if(n=D.f)b.Pa=n;case 4:a.g=b.Pa;a.D=_.qn(a.g);a.B=a.D.findIndex(function(J){return J.url===b.source.url});if(!b.Pa.remoteTextTracks){D.G(6);break}return _.x(D,Promise.all(b.Pa.remoteTextTracks.map(a.Uh.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(J){return J}),b.Pa.remoteTextTracks=void 0;case 6:delete b.Pa.autoplay,b.Pa.startTime=null,g.customData={playerConfiguration:zL(b.Pa)};
16
- case 3:q=a.cb()||{};r=TL(q.metadataType);typeof b.Qe===_.k&&(w={metadataType:r,sectionStartAbsoluteTime:b.Qe});b.source.name&&(y={metadataType:r,title:b.source.name});B=VL(q);if(E=SL(Object.assign({},w,y,B)))g.metadata=E;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.tc&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(D,f.loadMedia(F),0)}})},jM=function(a,b,c){c=void 0===c?0:c;var d,e;return _.A(function(f){(d=a.f.na())&&d.language&&(a.g.preferredTextLanguage=
17
- d.language);(e=a.f.ma())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,iM(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Qe:a.getPresentationStartTime(),autoplay:b,Pa:a.g}),0)})},ML=function(a){if(a){a=_.u(OL);for(var b=a.next();!b.done;b=a.next())NL(b.value)}},lM=function(a,b,c){_.Tj.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ld?c:function(e,f){d.f&&e!==_.en&&e!==_.Ym&&d.f.load(f)};this.a=kM(this);this.g=new _.H(sL);this.addDelegate(this.f)},kM=
18
- function(a){return new PL(a.h,function(){a.trigger(new _.I(_.zc))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.kf&&(d.preferredAudioLanguage=c.kf);c.vg&&(d.preferredTextLanguage=c.vg);_.xo(a.f,null);a.trigger(new _.I("castingended"));a.j(b,d)},function(){return mM(a)})},mM=function(a){var b;return _.A(function(c){if(1==c.a)return a.trigger(new _.I(_.yc)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.xo(a.f,a.a);_.z(c)})},nM=function(a){yL.call(this,a,"clpp.cast.StateManager");this.I=this.Tg.bind(this);this.H=this.Sg.bind(this);this.w=this.$i.bind(this);this.o=this.Ti.bind(this);this.K=this.Vg.bind(this);this.J=this.Ug.bind(this);this.M=this.pj.bind(this);this.F=this.cj.bind(this);this.D=this.T.bind(this);this.f=this.Rg.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.h=typeof c===_.k?c:1;this.j=typeof d===_.k?d:1;this.g=
20
- typeof e===_.k?e:0},oM=function(a){this.a=a},qM=function(a){this.l=a;this.a=null;this.g=this.Wg.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];
21
- pM().addEventListener(this.f,this.g)},tM=function(a,b,c){var d,e,f,g,h,l,m;return _.A(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.zf(n,2);rM=!1;e=_.Oh(d);return _.x(n,c.fetch(e).O,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.wh(f.data),h=new DOMParser,l=h.parseFromString(g,_.Ee),l.getElementsByTagName("vmap:VMAP").length)_.G("VMAP detected."),a.vmapAdsRequest=sM(g);else if(l.getElementsByTagName("VAST").length){_.G("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=sM(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.G("Unsupported schema."),rM=!0;return _.Af(n,0)}m=_.Bf(n);_.G("Failed to fetch an ad",m);rM=!0;_.z(n)})},sM=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},pM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},vM=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=uM(a,c))&&(d={ad:c});a.l.trigger(new _.I(b,d))}},wM=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},uM=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ve&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ve&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,
24
- h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new Z(d,e,b.index,b.total,f)}return c},xM=function(a){this.Tb=a;this.a=this.f.bind(this)},yM=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},zM=function(a){var b=a.dashTimedMetadata,c=_.Le;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ke)?
25
- _.og:_.mg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},AM=function(){this.g=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.wj.bind(this);this.a=this.f=null},BM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},DM=function(a){a.a=BM().getTextTracksManager();var b=a.a.getTracks();a.j=CM(_.P,b)},EM=function(a,b,c,d){c=_.Fg(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.Q?f=a.getAudioTracks():b===_.P&&(f=a.ha());if(c=c.find(function(h){var l=_.Ki(h);return f.some(function(m){m=_.Ki(m.language||"");return _.Oi(l,m)})})){var g=_.Ki(c);c=f.filter(function(h){h=_.Ki(h.language||"");return _.Oi(g,h)});f=c.length?c:f;e=e||!!c.length}_.Fh(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.Q?a.sa(e):b===_.P&&a.Aa(e))},CM=function(a,b){for(var c=[],d=_.u(b),e=
27
- d.next();!e.done;e=d.next()){e=e.value;var f=new _.hi(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.pi(f.id,f));c.push(f)}return c},FM=function(){_.Tj.call(this);this.A=new _.H(tL);this.g=this.o=_.Zj();this.w=null;this.j=-1;this.F=new _.ei;this.f=this.m=
28
- this.h=this.a=this.B=null;this.D=!1},GM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},JM=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.yk(d);if(e){var f=[_.Rc];_.qn(a)[0].type!==_.ic&&f.unshift(_.Sc);d.preferredDrmSystem===_.Rc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Qa[g];h?(d=g===_.Sc?cast.framework.ContentProtection.WIDEVINE:
29
- g===_.Rc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},HM(b,h,a,d),IM(b,h,a,d)):c()}else c()}else c()},HM=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Oh({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=
30
- f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},IM=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.A(function(h){return 1==h.a?(g=_.Ph(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},KM=function(){this.a=!1;this.h=new _.H(uL);this.f=this.l=null;this.g=new Set;this.A=this.bj.bind(this);this.w=this.Qg.bind(this);this.j=null;this.o=new _.eg;this.m=null},
31
- MM=function(){return LM||(LM=new KM)},NM=function(){return cast.framework.CastReceiverContext.getInstance()},PM=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=NM();c=(NM().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Te:_.Se;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=OM(h,_.oa),m=OM(h,_.ib),n=_.u([]),
32
- p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},OM=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},QM=function(a){this.f=a;this.a=null;this.g=new _.eg;this.h=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
33
- cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},SM=function(a,b){var c=null,d=RM(a);d&&(c={ad:d});a.f.trigger(new _.I(b,c))},RM=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
34
- b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},TM=function(){},UM=function(){};_.t=yL.prototype;_.t.release=function(){this.la(_.Ym)};_.t.destroy=function(){this.j=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.la(_.jn)};
35
- _.t.la=function(a){if(a!==this.g)if(this.g===_.jn&&a!==_.Ym)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.m=this.g;this.g=a;this.g===_.cn?(this.A=b,this.a.trigger(new _.I(_.vc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.cn&&this.a.trigger(new _.I(_.uc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Om(this.j,this.g);this.a.trigger(new _.I(_.se,
36
- {detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var DL=0,RL={GENERIC:DL,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.v(FL,yL);FL.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.w),this.f=b,this.f.addUpdateListener(this.w),this.o=a.m)};FL.prototype.destroy=function(){var a=this;return _.A(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.x(b,yL.prototype.destroy.call(a),0)})};FL.prototype.la=function(a){var b=this.a.m;b&&b.isPlayingBreak||yL.prototype.la.call(this,a)};
37
- FL.prototype.Ab=function(){if(this.f&&this.o&&!this.o.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.la(_.en);break;case chrome.cast.media.IdleReason.ERROR:this.la(_.jn);break;default:this.la(_.Ym)}break;case chrome.cast.media.PlayerState.PLAYING:this.la(_.mn);break;case chrome.cast.media.PlayerState.PAUSED:this.la(_.ln);break;case chrome.cast.media.PlayerState.BUFFERING:this.la(_.cn)}};_.v(GL,_.R);_.t=GL.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
38
- _.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.ji;break;case chrome.cast.media.TrackType.AUDIO:c=_.Q;break;case chrome.cast.media.TrackType.TEXT:c=_.P}c=new _.hi(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
39
- c.renditions.push(new _.pi(c.id,c));return c}):[],this.a.trigger(new _.I(_.Dq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return IL(this,_.ji)};_.t.getAudioTracks=function(){return IL(this,_.Q)};_.t.ha=function(){return IL(this,_.P)};_.t.ga=function(){var a=this.Fa();return a?a.renditions[0]:null};_.t.Da=function(){var a=this.ma();return a?a.renditions[0]:null};_.t.Ea=function(){var a=this.na();return a?a.renditions[0]:null};_.t.Ta=function(){return this.f[_.ji]||null};
40
- _.t.eb=function(){return this.f[_.Q]||null};_.t.fb=function(){return this.f[_.P]||null};_.t.Fa=function(){return JL(this,_.ji)};_.t.ma=function(){return JL(this,_.Q)};_.t.na=function(){return JL(this,_.P)};_.t.Za=function(a){LL(this,_.ji,a)};_.t.sa=function(a){LL(this,_.Q,a)};_.t.Aa=function(a){LL(this,_.P,a)};_.t.Ya=function(a){this.Za(a&&a.track)};_.t.lb=function(a){this.sa(a&&a.track)};_.t.mb=function(a){this.Aa(a&&a.track)};_.t.addTextTrack=function(){return _.A(function(a){_.z(a)})};_.t.ja=function(){return!0};
41
- GL.prototype.isAbrEnabled=GL.prototype.ja;GL.prototype.addTextTrack=GL.prototype.addTextTrack;GL.prototype.setTextRendition=GL.prototype.mb;GL.prototype.setAudioRendition=GL.prototype.lb;GL.prototype.setVideoRendition=GL.prototype.Ya;GL.prototype.setTextTrack=GL.prototype.Aa;GL.prototype.setAudioTrack=GL.prototype.sa;GL.prototype.setVideoTrack=GL.prototype.Za;GL.prototype.getTextTrack=GL.prototype.na;GL.prototype.getAudioTrack=GL.prototype.ma;GL.prototype.getVideoTrack=GL.prototype.Fa;
42
- GL.prototype.getLoadingTextRendition=GL.prototype.fb;GL.prototype.getLoadingAudioRendition=GL.prototype.eb;GL.prototype.getLoadingVideoRendition=GL.prototype.Ta;GL.prototype.getTextRendition=GL.prototype.Ea;GL.prototype.getAudioRendition=GL.prototype.Da;GL.prototype.getVideoRendition=GL.prototype.ga;GL.prototype.getTextTracks=GL.prototype.ha;GL.prototype.getAudioTracks=GL.prototype.getAudioTracks;GL.prototype.getVideoTracks=GL.prototype.getVideoTracks;_.v(PL,_.Tj);_.t=PL.prototype;_.t.init=function(a,b){this.g=this.J=b};_.t.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.h&&a.h.release()})};_.t.destroy=function(){return _.A(function(a){_.z(a)})};_.t.md=function(a){this.P=a};_.t.bc=function(){return this.w};_.t.ib=function(){return this.A};_.t.te=function(){return this.fa};
43
- _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.A(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.G(2);break}_.zf(g,3);return _.x(g,e.sendMessage(a,zL(b)),5);case 5:_.Af(g,2);break;case 3:f=_.Bf(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
44
- _.t.cast=function(){var a=this,b,c;return _.A(function(d){if(1==d.a){if(!a.bc())throw a.j.warn(qL),new _.L(1,8,8001,void 0);if(!$L)throw a.j.warn(oL),new _.L(1,8,8002,void 0);if(a.ib())throw a.j.warn("Already casting"),new _.L(1,8,8003,void 0);_.zf(d,2);return _.x(d,hM(a),4)}if(2!=d.a)return _.Af(d,0);b=_.Bf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
45
- _.t.pe=function(){this.ib()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.ld&&this.F.add(a)};_.t.removeMessageListener=function(a){typeof a===_.ld&&this.F["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?jM(this,!0):new Promise(function(b,c){if(!a.a)return c(nL);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(nL);a.a.pause(null,b,c)})};
46
- _.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.en};_.t.seek=function(a){var b=this;return this.isEnded()?jM(this,!1,a):new Promise(function(c,d){b.a||d(nL);b.m.isPlayingBreak&&d(lL);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.I(_.Ne));b.a.seek(e,function(){b.trigger(new _.I(_.Me));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
47
- _.t.getDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(wL,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var UL="Cannot seek during ads playout.",VL="Cannot switch track",WL="Media session does not exist.",XL="No receivers available",YL="Reset ABR functionality not available on cast.",ZL="SDK not yet ready",$L="Sender is destroyed.",aM="clpp.cast.CastProxy",bM="clpp.cast.Player",cM="clpp.cast.Receiver",dM="urn:x-cast:castlabs",eM="urn:x-cast:com.google.cast.media",fM=function(a){return _.B(function(b){return 1==b.a?_.x(b,a.ic(_.Pd),2):_.x(b,a.ic(_.Od),0)})},gM=function(a,b){this.log=new _.H(b);this.a=
3
+ a;this.m=null;this.g=_.Ym;this.o=_.Zm;this.j=2;this.D=Date.now();this.B=-1},hM=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ld){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ld?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},iM=function(a){if(typeof a!==_.ve)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
+ "Infinity"===c?Infinity:c})}catch(b){return a}},jM=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.B(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Wi(d,a.mimeType,g);if(!f||!g)return q.G(2);l=_.Zh(a.url);return _.x(q,c.fetch(l).O,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.N(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},kM=function(a,b){if(window.chrome&&
5
+ chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Te:return d.FMP4;case _.Se:return b===_.ui?d.MPEG2_TS:c.TS;case _.nc:return c.AAC;case _.pc:return c.AC3;case _.qc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.rc:return c.FMP4}},mM=function(a){a=
6
+ void 0===a?lM:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},nM=function(a){gM.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.w=this.f=null;this.A=this.Db.bind(this)},oM=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},pM=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},rM=function(a,b){var c=pM(a);return qM(a,b).find(function(d){return c.includes(d.id)})||null},qM=function(a,b){return a.g.filter(function(c){return c.type===b})},tM=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.O){var e=a.qa();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;sM(a,b)},function(f){a.f[b]=null;a.h.debug(VL,f)})}else b===_.O&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){sM(a,b)},function(f){a.h.debug(VL,f)}))},sM=function(a,b){b===_.Q?a.a.trigger(new _.I(_.Uj)):b===_.O&&a.a.trigger(new _.I(_.Vj))},xM=function(a,b,c,d){_.bk.call(this);this.h=new _.H(_.Kc);this.ga=a;this.o=new _.aj(b);this.da=c;this.ma=d;this.g=this.J=
9
+ _.hk();this.D=[];this.B=0;this.M=new _.pi;this.H=this.m=this.a=null;this.A=this.w=!1;this.na="";this.Va=1E6;this.f=new oM;this.f.initialize(this);this.j=new nM(this);this.I=new _.eg;this.K=null;this.F=new Set;this.T=this.Zj.bind(this);this.Ga=this.rk.bind(this);this.ha=this.hk.bind(this);this.V=this.bk.bind(this);this.P=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){uM(!0)},0)}});vM(this);wM.add(this)},
10
+ yM=function(a){var b,c;return _.B(function(d){if(1==d.a)return wM["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.da=null;a.ma=null;_.z(d)})},AM=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(zM);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=mM(zM[b]);return Object.assign(b,a)},BM=function(a){var b=void 0===b?lM:b;return Object.values(zM).includes(a)?a:b},FM=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},vM=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ga.length){a.w=!0;a.o.sf();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ga;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga);KM&&a.o.Z(.02)}},PM=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
+ null;a=null===a?null:a+b;return null===a?b:a},RM=function(a,b){QM(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(dM,a.V)},QM=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.m),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.yh.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.I(_.xd)))},SM=function(a){return _.B(function(b){return a.lb()?
14
+ b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},TM=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,v,y,A,E,F;return _.B(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.Bq,_.x(D,SM(a),2);case 2:if(!b)return D["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Gb;m=h.audioMimeType;g.hlsVideoSegmentFormat=kM(l,d.VIDEO);
15
+ g.hlsSegmentFormat=kM(m,d.AUDIO);if(!b.Ta){D.G(3);break}if(!a.P){D.G(4);break}return _.x(D,Promise.resolve(a.P(b.Ta)),5);case 5:if(n=D.f)b.Ta=n;case 4:a.g=b.Ta;a.D=_.qn(a.g);a.B=a.D.findIndex(function(J){return J.url===b.source.url});if(!b.Ta.remoteTextTracks){D.G(6);break}return _.x(D,Promise.all(b.Ta.remoteTextTracks.map(a.Ii.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(J){return J}),b.Ta.remoteTextTracks=void 0;case 6:delete b.Ta.autoplay,b.Ta.startTime=null,g.customData={playerConfiguration:hM(b.Ta)};
16
+ case 3:q=a.gb()||{};r=BM(q.metadataType);typeof b.ff===_.k&&(v={metadataType:r,sectionStartAbsoluteTime:b.ff});b.source.name&&(y={metadataType:r,title:b.source.name});A=FM(q);if(E=AM(Object.assign({},v,y,A)))g.metadata=E;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.vc&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(D,f.loadMedia(F),0)}})},UM=function(a,b,c){c=void 0===c?0:c;var d,e;return _.B(function(f){(d=a.f.qa())&&d.language&&(a.g.preferredTextLanguage=
17
+ d.language);(e=a.f.pa())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,TM(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),ff:a.getPresentationStartTime(),autoplay:b,Ta:a.g}),0)})},uM=function(a){if(a){a=_.u(wM);for(var b=a.next();!b.done;b=a.next())vM(b.value)}},WM=function(a,b,c){_.bk.call(this);var d=this;this.f=a;this.g=b;this.j=typeof c===_.ld?c:function(e,f){d.f&&e!==_.en&&e!==_.Ym&&d.f.load(f)};this.a=VM(this);this.h=new _.H(aM);this.addDelegate(this.f)},VM=
18
+ function(a){return new xM(a.g,function(){a.trigger(new _.I(_.Bc))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.Df&&(d.preferredAudioLanguage=c.Df);c.Zg&&(d.preferredTextLanguage=c.Zg);_.xo(a.f,null);a.trigger(new _.I("castingended"));a.j(b,d)},function(){return XM(a)})},XM=function(a){var b;return _.B(function(c){if(1==c.a)return a.trigger(new _.I(_.Ac)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.xo(a.f,a.a);_.z(c)})},YM=function(a){gM.call(this,a,"clpp.cast.StateManager");this.J=this.Ch.bind(this);this.I=this.Bh.bind(this);this.A=this.dk.bind(this);this.w=this.Yj.bind(this);this.M=this.Eh.bind(this);this.K=this.Dh.bind(this);this.P=this.uk.bind(this);this.H=this.gk.bind(this);this.F=this.S.bind(this);this.f=this.Ah.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.m=typeof d===_.k?d:1;this.g=
20
+ typeof e===_.k?e:0},ZM=function(a){this.a=a},aN=function(a){this.l=a;this.a=null;this.g=this.Fh.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];
21
+ $M().addEventListener(this.f,this.g)},dN=function(a,b,c){var d,e,f,g,h,l,m;return _.B(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.Af(n,2);bN=!1;e=_.Zh(d);return _.x(n,c.fetch(e).O,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.wh(f.data),h=new DOMParser,l=h.parseFromString(g,_.Ee),l.getElementsByTagName("vmap:VMAP").length)_.G("VMAP detected."),a.vmapAdsRequest=cN(g);else if(l.getElementsByTagName("VAST").length){_.G("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=cN(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.G("Unsupported schema."),bN=!0;return _.Bf(n,0)}m=_.Cf(n);_.G("Failed to fetch an ad",m);bN=!0;_.z(n)})},cN=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},$M=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},fN=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=eN(a,c))&&(d={ad:c});a.l.trigger(new _.I(b,d))}},gN=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},eN=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ve&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ve&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,
24
+ h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new Z(d,e,b.index,b.total,f)}return c},hN=function(a){this.Wb=a;this.a=this.f.bind(this)},iN=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},jN=function(a){var b=a.dashTimedMetadata,c=_.Le;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ke)?
25
+ _.og:_.mg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},kN=function(){this.h=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.g=[];this.j=[];this.m=this.Ik.bind(this);this.a=this.f=null},lN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},nN=function(a){a.a=lN().getTextTracksManager();var b=a.a.getTracks();a.j=mN(_.O,b)},oN=function(a,b,c,d){c=_.Fg(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.Q?f=a.getAudioTracks():b===_.O&&(f=a.ia());if(c=c.find(function(h){var l=_.gh(h);return f.some(function(m){m=_.gh(m.language||"");return _.hh(l,m)})})){var g=_.gh(c);c=f.filter(function(h){h=_.gh(h.language||"");return _.hh(g,h)});f=c.length?c:f;e=e||!!c.length}_.Fh(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.h.info("Will select track",e),b===_.Q?a.va(e):b===_.O&&a.Ea(e))},mN=function(a,b){for(var c=[],d=_.u(b),e=
27
+ d.next();!e.done;e=d.next()){e=e.value;var f=new _.si(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Ai(f.id,f));c.push(f)}return c},pN=function(){_.bk.call(this);this.h=new _.H(bM);this.g=this.w=_.hk();this.A=null;this.m=-1;this.F=new _.pi;this.f=this.o=
28
+ this.j=this.a=this.B=null;this.D=!1},qN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},tN=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.yk(d);if(e){var f=[_.Tc];_.qn(a)[0].type!==_.jc&&f.unshift(_.Uc);d.preferredDrmSystem===_.Tc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Ua[g];h?(d=g===_.Uc?cast.framework.ContentProtection.WIDEVINE:
29
+ g===_.Tc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},rN(b,h,a,d),sN(b,h,a,d)):c()}else c()}else c()},rN=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Zh({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=
30
+ f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},sN=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.B(function(h){return 1==h.a?(g=_.$h(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},uN=function(){this.a=!1;this.h=new _.H(cM);this.f=this.l=null;this.g=new Set;this.A=this.fk.bind(this);this.w=this.zh.bind(this);this.j=null;this.o=new _.eg;this.m=null},
31
+ wN=function(){return vN||(vN=new uN)},xN=function(){return cast.framework.CastReceiverContext.getInstance()},zN=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=xN();c=(xN().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Te:_.Se;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=yN(h,_.na),m=yN(h,_.jb),n=_.u([]),
32
+ p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},yN=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},AN=function(a){this.f=a;this.a=null;this.g=new _.eg;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
33
+ cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},CN=function(a,b){var c=null,d=BN(a);d&&(c={ad:d});a.f.trigger(new _.I(b,c))},BN=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
34
+ b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},DN=function(){},EN=function(){};_.t=gM.prototype;_.t.release=function(){this.oa(_.Ym)};_.t.destroy=function(){this.m=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.oa(_.jn)};
35
+ _.t.oa=function(a){if(a!==this.g)if(this.g===_.jn&&a!==_.Ym)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.o=this.g;this.g=a;this.g===_.cn?(this.B=b,this.a.trigger(new _.I(_.xc,{detail:{bufferedTimeMS:-1,reason:this.j}}))):this.o===_.cn&&this.a.trigger(new _.I(_.wc,{detail:{bufferedTimeMS:b-this.B,reason:this.j}}));a={currentState:this.g,previousState:this.o,timeSinceLastStateChangeMS:b-this.D};this.D=b;this.m&&_.Om(this.m,this.g);this.a.trigger(new _.I(_.se,
36
+ {detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var lM=0,zM={GENERIC:lM,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(nM,gM);nM.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.A),this.f=b,this.f.addUpdateListener(this.A),this.w=a.m)};nM.prototype.destroy=function(){var a=this;return _.B(function(b){a.f&&(a.f.removeUpdateListener(a.A),a.f=null);return _.x(b,gM.prototype.destroy.call(a),0)})};nM.prototype.oa=function(a){var b=this.a.m;b&&b.isPlayingBreak||gM.prototype.oa.call(this,a)};
37
+ nM.prototype.Db=function(){if(this.f&&this.w&&!this.w.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.oa(_.en);break;case chrome.cast.media.IdleReason.ERROR:this.oa(_.jn);break;default:this.oa(_.Ym)}break;case chrome.cast.media.PlayerState.PLAYING:this.oa(_.mn);break;case chrome.cast.media.PlayerState.PAUSED:this.oa(_.ln);break;case chrome.cast.media.PlayerState.BUFFERING:this.oa(_.cn)}};_.w(oM,_.R);_.t=oM.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
38
+ _.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.ui;break;case chrome.cast.media.TrackType.AUDIO:c=_.Q;break;case chrome.cast.media.TrackType.TEXT:c=_.O}c=new _.si(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
39
+ c.renditions.push(new _.Ai(c.id,c));return c}):[],this.a.trigger(new _.I(_.Dq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return qM(this,_.ui)};_.t.getAudioTracks=function(){return qM(this,_.Q)};_.t.ia=function(){return qM(this,_.O)};_.t.fa=function(){var a=this.La();return a?a.renditions[0]:null};_.t.Ia=function(){var a=this.pa();return a?a.renditions[0]:null};_.t.Ja=function(){var a=this.qa();return a?a.renditions[0]:null};_.t.Xa=function(){return this.f[_.ui]||null};
40
+ _.t.hb=function(){return this.f[_.Q]||null};_.t.ib=function(){return this.f[_.O]||null};_.t.La=function(){return rM(this,_.ui)};_.t.pa=function(){return rM(this,_.Q)};_.t.qa=function(){return rM(this,_.O)};_.t.cb=function(a){tM(this,_.ui,a)};_.t.va=function(a){tM(this,_.Q,a)};_.t.Ea=function(a){tM(this,_.O,a)};_.t.bb=function(a){this.cb(a&&a.track)};_.t.ob=function(a){this.va(a&&a.track)};_.t.pb=function(a){this.Ea(a&&a.track)};_.t.addTextTrack=function(){return _.B(function(a){_.z(a)})};_.t.ka=function(){return!0};
41
+ oM.prototype.isAbrEnabled=oM.prototype.ka;oM.prototype.addTextTrack=oM.prototype.addTextTrack;oM.prototype.setTextRendition=oM.prototype.pb;oM.prototype.setAudioRendition=oM.prototype.ob;oM.prototype.setVideoRendition=oM.prototype.bb;oM.prototype.setTextTrack=oM.prototype.Ea;oM.prototype.setAudioTrack=oM.prototype.va;oM.prototype.setVideoTrack=oM.prototype.cb;oM.prototype.getTextTrack=oM.prototype.qa;oM.prototype.getAudioTrack=oM.prototype.pa;oM.prototype.getVideoTrack=oM.prototype.La;
42
+ oM.prototype.getLoadingTextRendition=oM.prototype.ib;oM.prototype.getLoadingAudioRendition=oM.prototype.hb;oM.prototype.getLoadingVideoRendition=oM.prototype.Xa;oM.prototype.getTextRendition=oM.prototype.Ja;oM.prototype.getAudioRendition=oM.prototype.Ia;oM.prototype.getVideoRendition=oM.prototype.fa;oM.prototype.getTextTracks=oM.prototype.ia;oM.prototype.getAudioTracks=oM.prototype.getAudioTracks;oM.prototype.getVideoTracks=oM.prototype.getVideoTracks;_.w(xM,_.bk);_.t=xM.prototype;_.t.init=function(a,b){this.g=this.J=b};_.t.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.t.destroy=function(){return _.B(function(a){_.z(a)})};_.t.ud=function(a){this.P=a};_.t.ec=function(){return this.w};_.t.lb=function(){return this.A};_.t.He=function(){return this.na};
43
+ _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.B(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.G(2);break}_.Af(g,3);return _.x(g,e.sendMessage(a,hM(b)),5);case 5:_.Bf(g,2);break;case 3:f=_.Cf(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
44
+ _.t.cast=function(){var a=this,b,c;return _.B(function(d){if(1==d.a){if(!a.ec())throw a.h.warn(ZL),new _.L(1,8,8001,void 0);if(!KM)throw a.h.warn(XL),new _.L(1,8,8002,void 0);if(a.lb())throw a.h.warn("Already casting"),new _.L(1,8,8003,void 0);_.Af(d,2);return _.x(d,SM(a),4)}if(2!=d.a)return _.Bf(d,0);b=_.Cf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
45
+ _.t.Be=function(){this.lb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.ld&&this.F.add(a)};_.t.removeMessageListener=function(a){typeof a===_.ld&&this.F["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?UM(this,!0):new Promise(function(b,c){if(!a.a)return c(WL);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(WL);a.a.pause(null,b,c)})};
46
+ _.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.en};_.t.seek=function(a){var b=this;return this.isEnded()?UM(this,!1,a):new Promise(function(c,d){b.a||d(WL);b.m.isPlayingBreak&&d(UL);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.I(_.Ne));b.a.seek(e,function(){b.trigger(new _.I(_.Me));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
47
+ _.t.getDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(eM,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
48
48
  _.t.getVolume=function(){return this.a&&this.a.volume.level};_.t.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.t.isMuted=function(){return this.a&&this.a.volume.muted};_.t.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
49
- _.t.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.h?this.h.getState():_.Zm};
50
- _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?AL(this.a.customData.stats):_.Um()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.A(function(e){if(!b.bc())return b.j.warn(qL),e["return"]();if(!$L)return b.j.warn(oL),e["return"]();b.D=_.qn(a);_.ck(a)&&(b.g=_.bk(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Pa:b.g,Db:c.Db,audioMimeType:c.audioMimeType};return _.x(e,iM(b,d),0)})};
51
- _.t.getBufferInfo=function(){return new _.Sj};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.M=a};_.t.getNetworkEngine=function(){return this.M};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
- _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.j.warn(pL)};_.t.onError=function(a){if(a&&(this.trigger(new _.I(_.jd,{detail:a})),this.h))this.h.onError(a)};_.t.namespace=function(){return _.Ic};_.t.canPlay=function(){return this.bc()?2:0};_.t.cb=function(){return this.K};_.t.ic=function(a){this.K=SL(a)};_.t.je=function(){this.K=null};_.t.We=function(a){var b=this.cb()||{};a={metadataType:TL(b.metadataType),title:a};this.ic(Object.assign({},b,a))};
53
- _.t.Ue=function(a){var b=this.cb()||{},c=TL(b.metadataType);a=new chrome.cast.Image(a);this.ic(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.Te=function(a){var b=this.cb()||{};this.ic(Object.assign({},b,{metadataType:3,artist:a}))};_.t.Ve=function(a){var b=this.cb()||{};a={metadataType:TL(b.metadataType),releaseDate:a};this.ic(Object.assign({},b,a))};
54
- _.t.Ui=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;$L=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.fa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.$e()};
55
- _.t.mj=function(a){this.j.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;gM(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.ib()||(this.A=!0,gM(this,a.session),this.ca());break;case cast.framework.SessionState.SESSION_ENDED:if(this.ib()&&this.a){var b=this.a.media,c=this.f.ma(),d=this.f.na();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Z(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
- isLive:this.isLive()},currentTime:eM(this),vg:d,kf:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.aa);a.session.removeMessageListener(vL,this.U);this.A=!1;this.a=null;this.I.release();this.m=this.H=null}};_.t.dj=function(a){this.j.debug("New media session",a.mediaSession);fM(this,a.mediaSession)};_.t.Yi=function(a,b){if(a===vL&&0<this.F.size){var c=AL(b);this.F.forEach(function(d){return d(c)})}};_.t.Pg=function(){this.trigger(new _.I(_.Fe))};
57
- _.t.Uh=function(a){var b=this,c,d;return _.A(function(e){if(1==e.a)return c=null,_.x(e,BL(a,[_.De,_.hc],b.M,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ra++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.t.getTextDisplayer=function(){return null};PL.prototype.getTextDisplayer=PL.prototype.getTextDisplayer;PL.prototype.getNetworkEngine=PL.prototype.getNetworkEngine;
58
- PL.prototype.setNetworkEngine=PL.prototype.setNetworkEngine;var $L=!1,OL=new Set;window.__onGCastApiAvailable=ML;_.v(lM,_.Tj);_.t=lM.prototype;_.t.destroy=function(){var a=this;return _.A(function(b){if(1==b.a)return a.a?_.x(b,QL(a.a),3):b.G(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.fe=function(){return!!this.a&&this.a.bc()&&$L};_.t.ib=function(){return!!this.a&&this.a.ib()};_.t.te=function(){return this.a?this.a.te():""};_.t.md=function(a){this.a&&this.a.md(a)};
59
- _.t.cast=function(a){var b=this,c,d,e;return _.A(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.zf(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.ma();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.na())l.language&&
60
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.tc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Qe:b.f.getPresentationStartTime(),Db:m,audioMimeType:p,Pa:g}}c=g;return _.x(f,mM(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.G(7);break}return _.x(f,iM(b.a,c),7);case 7:_.Af(f,0);break;case 2:d=_.Bf(f),
61
- b.g.error("Error while trying to cast",d),e=new _.I(_.jd,{detail:d}),b.trigger(e),_.z(f)}})};_.t.pe=function(){this.a&&this.a.pe()};_.t.Lg=function(a){var b=this;return _.A(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,QL(b.a),2):c.G(2)}b.a=kM(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.A(function(c){return b.a?_.x(c,b.a.sendMessage(vL,a),0):(b.g.warn(rL),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(rL)};
62
- _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(rL)};_.t.cb=function(){return this.a&&this.a.cb()};_.t.ic=function(a){this.a&&this.a.ic(a)};_.t.je=function(){this.a&&this.a.je()};_.t.We=function(a){this.a&&this.a.We(a)};_.t.Ue=function(a){this.a&&this.a.Ue(a)};_.t.Te=function(a){this.a&&this.a.Te(a)};_.t.Ve=function(a){this.a&&this.a.Ve(a)};_.C(sL,lM);lM.prototype.setContentReleaseDate=lM.prototype.Ve;lM.prototype.setContentArtist=lM.prototype.Te;
63
- lM.prototype.setContentImage=lM.prototype.Ue;lM.prototype.setContentTitle=lM.prototype.We;lM.prototype.clearContentMetadata=lM.prototype.je;lM.prototype.setContentMetadata=lM.prototype.ic;lM.prototype.getContentMetadata=lM.prototype.cb;lM.prototype.removeMessageListener=lM.prototype.removeMessageListener;lM.prototype.addMessageListener=lM.prototype.addMessageListener;lM.prototype.sendMessage=lM.prototype.sendMessage;lM.prototype.changeReceiverId=lM.prototype.Lg;lM.prototype.forceDisconnect=lM.prototype.pe;
64
- lM.prototype.cast=lM.prototype.cast;lM.prototype.setPlayerConfigInterceptor=lM.prototype.md;lM.prototype.getReceiverName=lM.prototype.te;lM.prototype.isCasting=lM.prototype.ib;lM.prototype.canCast=lM.prototype.fe;lM.prototype.destroy=lM.prototype.destroy;_.v(nM,yL);_.t=nM.prototype;
65
- _.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.M);b.addEventListener(a.PLAYER_LOADING,this.F);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
- _.t.destroy=function(){var a=this,b,c;return _.A(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.M);c.removeEventListener(b.PLAYER_LOADING,a.F);c.removeEventListener(b.ERROR,
67
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,yL.prototype.destroy.call(a),0)})};_.t.Tg=function(){this.a.trigger(new _.I(_.Zd));this.la(_.mn)};_.t.Sg=function(){this.la(_.ln)};_.t.$i=function(){this.la(_.en)};_.t.Ti=function(a){a.isBuffering?this.la(_.cn):(a=this.a.isPaused()?_.ln:_.mn,this.la(a))};_.t.Vg=function(){this.h=1;this.a.trigger(new _.I(_.Ne))};_.t.Ug=function(){this.a.trigger(new _.I(_.Me))};_.t.pj=function(){this.h=2};_.t.cj=function(){this.la(_.kn)};
68
- _.t.Rg=function(a){var b=this.a.getStats();this.a.trigger(new _.I(_.sc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.T=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.I(_.jd,{detail:a}));this.la(_.jn)};_.t=Z.prototype;_.t.rb=function(){return"Google Cast Framework"};_.t.sb=function(){return cast.framework.VERSION};_.t.xb=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
69
- _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.dc=function(){return!1};_.t.Jb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.ub=function(){return 0};_.t.tb=function(){return 0};_.t.gb=function(){return 0};_.t.Ua=function(){switch(this.Kb()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Kb=function(){return this.f.position};_.t.Lb=function(){return this.h};
70
- _.t.wb=function(){return this.j};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.wb;Z.prototype.getPositionInSequence=Z.prototype.Lb;Z.prototype.getPodTimeOffset=Z.prototype.Kb;
71
- Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ua;Z.prototype.getMediaBitrate=Z.prototype.gb;Z.prototype.getMediaHeight=Z.prototype.tb;Z.prototype.getMediaWidth=Z.prototype.ub;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Jb;Z.prototype.isBumper=Z.prototype.dc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
72
- Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.xb;Z.prototype.getAdManagerVersion=Z.prototype.sb;Z.prototype.getAdManagerName=Z.prototype.rb;oM.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};oM.prototype.Mb=function(){return!!this.a.find(function(a){return 0===a.position})};oM.prototype.hb=function(){return!!this.a.find(function(a){return-1===a.position})};oM.prototype.hasPostroll=oM.prototype.hb;oM.prototype.hasPreroll=oM.prototype.Mb;oM.prototype.getCuePoints=oM.prototype.getCuePoints;_.t=qM.prototype;_.t.load=function(){var a=this;return _.A(function(b){rM&&(rM=!1,wM(a,0));_.z(b)})};_.t.start=function(){return _.A(function(a){pM().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&pM().play()};_.t.pause=function(){-1!==this.getPosition()&&pM().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
73
- _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.A(function(b){pM().removeEventListener(a.f,a.g);_.z(b)})};
74
- _.t.Wg=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=pM().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.I(_.Xb,{adsTimeline:new oM(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:vM(this,_.Nb,a);break;case cast.framework.events.EventType.BREAK_STARTED:vM(this,_.Gb,a);break;case cast.framework.events.EventType.BREAK_ENDED:vM(this,_.Hb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:vM(this,
75
- _.Tb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(vM(this,_.Sb,a),vM(this,_.Ub,a)):a.endedReason===b.STOPPED?vM(this,_.Ub,a):a.endedReason===b.END_OF_STREAM?(vM(this,_.Kb,a),vM(this,_.Ub,a)):a.endedReason===b.ERROR&&wM(this,1);break;case cast.framework.events.EventType.PLAYING:vM(this,_.Rb,a);break;case cast.framework.events.EventType.PAUSE:vM(this,_.Pb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?vM(this,_.Ib,a):vM(this,_.Rb,a)}};
76
- qM.prototype.getPosition=qM.prototype.getPosition;qM.prototype.setVolume=qM.prototype.setVolume;qM.prototype.getVolume=qM.prototype.getVolume;qM.prototype.skip=qM.prototype.skip;qM.prototype.pause=qM.prototype.pause;qM.prototype.resume=qM.prototype.resume;var rM=!1;xM.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(yM(),this.a)};xM.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(yM(),this.a)};xM.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return zM(a)})};
77
- xM.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.pg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.rg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.sg}b&&this.Tb(new _.I(b,{detail:zM(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Tb(new _.I(_.pg,{detail:b.value}))};_.v(AM,_.R);_.t=AM.prototype;_.t.initialize=function(a){this.l=a;BM().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;BM().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ha=function(){return this.j};_.t.ga=function(){return null};
78
- _.t.Da=function(){var a=this.ma();return a&&a.renditions[0]};_.t.Ea=function(){var a=this.na();return a&&a.renditions[0]};_.t.Ta=function(){return null};_.t.eb=function(){return null};_.t.fb=function(){return null};_.t.Fa=function(){return null};_.t.ma=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
79
- _.t.na=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ha().find(function(c){return c.id===b})||null)}return a};_.t.Za=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.sa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Aa=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.Ya=function(){this.g.warn("Video renditions unavailable on Cast")};_.t.lb=function(a){this.sa(a&&a.track)};
80
- _.t.mb=function(a){this.Aa(a&&a.track)};
81
- _.t.addTextTrack=function(a){var b=this,c,d,e;return _.A(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,BL(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),DM(b)}catch(g){throw b.g.warn("failed on track",
82
- a),g;}}_.z(f)})};_.t.ja=function(){return!0};_.t.wj=function(){this.f=BM().getAudioTracksManager();var a=this.f.getTracks();this.h=CM(_.Q,a);DM(this);a=this.l.getConfiguration();EM(this,_.Q,a.preferredAudioLanguage,a.preferredAudioRole);EM(this,_.P,a.preferredTextLanguage,a.preferredTextRole)};AM.prototype.isAbrEnabled=AM.prototype.ja;AM.prototype.addTextTrack=AM.prototype.addTextTrack;AM.prototype.setTextRendition=AM.prototype.mb;AM.prototype.setAudioRendition=AM.prototype.lb;
83
- AM.prototype.setVideoRendition=AM.prototype.Ya;AM.prototype.setTextTrack=AM.prototype.Aa;AM.prototype.setAudioTrack=AM.prototype.sa;AM.prototype.setVideoTrack=AM.prototype.Za;AM.prototype.getTextTrack=AM.prototype.na;AM.prototype.getAudioTrack=AM.prototype.ma;AM.prototype.getVideoTrack=AM.prototype.Fa;AM.prototype.getLoadingTextRendition=AM.prototype.fb;AM.prototype.getLoadingAudioRendition=AM.prototype.eb;AM.prototype.getLoadingVideoRendition=AM.prototype.Ta;AM.prototype.getTextRendition=AM.prototype.Ea;
84
- AM.prototype.getAudioRendition=AM.prototype.Da;AM.prototype.getVideoRendition=AM.prototype.ga;AM.prototype.getTextTracks=AM.prototype.ha;AM.prototype.getAudioTracks=AM.prototype.getAudioTracks;AM.prototype.getVideoTracks=AM.prototype.getVideoTracks;_.v(FM,_.Tj);_.t=FM.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.o=b);var d=GM();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ej.bind(this));d.setMediaPlaybackInfoHandler(this.Fg.bind(this));this.a=new nM(this);this.a.init();this.h=new AM;this.h.initialize(this);this.m=new xM(function(e){return c.trigger(e)});this.m.init()};
85
- _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=GM();b.getPlayerState()!==a.IDLE&&b.stop();this.h&&this.h.release();this.m&&this.m.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.A(function(b){if(1==b.a)return a.B=null,a.o=_.Zj(),a.g=a.o,a.j=-1,a.w=null,a.a?_.x(b,a.a.destroy(),3):b.G(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.z(b)})};
86
- _.t.play=function(){var a=GM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=GM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return GM().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
- _.t.isEnded=function(){return GM().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=GM();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(lL);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return GM().getCurrentTimeSec()};_.t.getDuration=function(){var a=GM().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return GM().getPlaybackRate()};
88
- _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;GM().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
89
- _.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=GM().getMediaInformation();if(a){var b=GM().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.w&&-1!==this.j?this.w[this.j]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,pk:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
- _.t.getPresentationStartTime=function(){return GM().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=GM().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.Zm};
91
- _.t.getStats=function(){var a=_.Um();if(this.f){a=GM().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.m=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.o=a.width||NaN;b.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.j=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.h=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
92
- _.t.load=function(a){var b=this,c,d;return _.A(function(e){b.f=new _.Tm;b.a.j=b.f.a;b.w=_.qn(a);_.ck(a)&&(b.g=_.bk(b.o,a));if(b.D)return b.D=!1,e["return"]();c=b.w[b.j];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:zL(b.g),local:!0};return _.x(e,GM().load(d),0)})};_.t.getBufferInfo=function(){this.A.warn(_.ra);return new _.Sj};
93
- _.t.getTrackManager=function(){return this.h};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.j};_.t.setSourceIndex=function(a){this.j=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return tL};_.t.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.t.resetAbr=function(){this.A.warn(pL)};
94
- _.t.onError=function(a){this.trigger(new _.I(_.jd,{detail:a}))};_.t.canPlay=function(){return _.Zi()?2:0};
95
- _.t.ej=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=zL(this.getStats());var b=GM(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.A.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
96
- (!e||e&&f)){d=GM().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};_.t.Fg=function(a,b){var c=null;a.media.customData&&(c=AL(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;JM(c,b);return b};
97
- _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};FM.prototype.getTextDisplayer=FM.prototype.getTextDisplayer;FM.prototype.getNetworkEngine=FM.prototype.getNetworkEngine;FM.prototype.setNetworkEngine=FM.prototype.setNetworkEngine;_.t=KM.prototype;_.t.init=function(a){var b=this;a&&(this.f=new FM,_.xo(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.A(function(c){return b.l&&b.l.getState()!==_.Ym?_.x(c,xL(b.l),0):c.G(0)})}))};
98
- _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=NM(),b=NM().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[vL]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.zi.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
99
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.yi.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(vL,this.w)}};
100
- _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=NM();NM().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(vL,this.w);a.stop();this.l=this.f=null}};_.t.md=function(a){this.j=a};_.t.Jj=function(a){this.m=a};_.t.on=function(a,b){NM().addEventListener(a,b)};_.t.off=function(a,b){NM().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.ld&&this.g.add(a)};
101
- _.t.removeMessageListener=function(a){typeof a===_.ld&&this.g["delete"](a)};_.t.sendMessage=function(a,b){NM().sendCustomMessage(vL,b,zL(a))};_.t.bc=function(){return this.a};_.t.cb=function(){var a=NM().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
- _.t.zi=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return PM(this,a);try{var b=(new DOMParser).parseFromString(a,_.Ee)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=NM();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.fa),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Re||g===_.kc){g=e[f].getAttribute(_.Dd);for(var h=e[f].getElementsByTagName(_.kb),l=
103
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Dd)||g,n=h[l].getAttribute(_.Nc),p=h[l].getAttribute(_.ff)||void 0,q=h[l].getAttribute(_.md)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.kb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.fa).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.sb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=NM();c=a.getElementsByTagName("StreamIndex");
104
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Re){e=c[d].getElementsByTagName(_.hb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Wa)||void 0,h=e[f].getAttribute(_.Va)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Te,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.hb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
- _.t.yi=function(a){var b=this,c,d,e,f,g,h;return _.A(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=AL(c.media.customData.playerConfiguration));if(!b.l||!d){l.G(2);break}if(!b.j){l.G(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.G(5);break}return _.x(l,tM(c.media,d.ima,b.l.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.G(7);
106
- break}b.f.D=!0;return _.x(l,_.Bo(b.l,d),8);case 8:return _.x(l,_.Co(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Db&&(c.media.hlsVideoSegmentFormat=CL(f.Db,_.ji)),f.audioMimeType&&(c.media.hlsSegmentFormat=CL(f.audioMimeType,_.Q));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.l.getConfiguration().autoplay);case 2:if(!b.m){l.G(10);
107
- break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.bj=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.si;var b=NM().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.l.seek(b))}_.Eo(this.l)}};
108
- _.t.Qg=function(a){if(0<this.g.size){var b=AL(a.data);this.g.forEach(function(c){return c(b)})}};_.C(uL,KM);KM.prototype.getContentMetadata=KM.prototype.cb;KM.prototype.isApiReady=KM.prototype.bc;KM.prototype.sendMessage=KM.prototype.sendMessage;KM.prototype.removeMessageListener=KM.prototype.removeMessageListener;KM.prototype.addMessageListener=KM.prototype.addMessageListener;KM.prototype.off=KM.prototype.off;KM.prototype.on=KM.prototype.on;KM.prototype.setLoadRequestDataInterceptor=KM.prototype.Jj;
109
- KM.prototype.setPlayerConfigInterceptor=KM.prototype.md;KM.prototype.stop=KM.prototype.stop;KM.prototype.start=KM.prototype.start;KM.prototype.init=KM.prototype.init;KM.getInstance=MM;var LM=null;_.t=QM.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.A(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.rj.bind(a),d=_.u(a.h),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.z(g)})};_.t.start=function(){return _.A(function(a){_.z(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
110
- _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(wL,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.A(function(b){a.g.release();_.z(b)})};
111
- _.t.rj=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.I(_.Xb,{adsTimeline:new oM(a.breaks)})));break;case "isPlayingBreak":a.value?SM(this,_.Gb):(SM(this,_.Kb),SM(this,_.Ub),SM(this,_.Hb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(SM(this,_.Kb),SM(this,_.Ub)),SM(this,_.Tb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?SM(this,_.Pb):SM(this,_.Rb))}};QM.prototype.getPosition=QM.prototype.getPosition;
112
- QM.prototype.setVolume=QM.prototype.setVolume;QM.prototype.getVolume=QM.prototype.getVolume;QM.prototype.skip=QM.prototype.skip;QM.prototype.pause=QM.prototype.pause;QM.prototype.resume=QM.prototype.resume;TM.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};TM.prototype.ba=function(a,b){return a.namespace()!==_.Ic?!1:!(!b||!b.ima)};TM.prototype.create=function(a){return new QM(a.a)};TM.prototype.create=TM.prototype.create;TM.prototype.isSupported=TM.prototype.ba;TM.prototype.name=TM.prototype.name;_.Fn(new TM);UM.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};UM.prototype.ba=function(a,b){return MM().bc()?!(!b||!b.ima):!1};UM.prototype.create=function(a){return new qM(a)};UM.prototype.create=UM.prototype.create;UM.prototype.isSupported=UM.prototype.ba;UM.prototype.name=UM.prototype.name;_.Fn(new UM);};
49
+ _.t.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.j?this.j.getState():_.Zm};
50
+ _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?iM(this.a.customData.stats):_.Um()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.B(function(e){if(!b.ec())return b.h.warn(ZL),e["return"]();if(!KM)return b.h.warn(XL),e["return"]();b.D=_.qn(a);_.kk(a)&&(b.g=_.jk(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Ta:b.g,Gb:c.Gb,audioMimeType:c.audioMimeType};return _.x(e,TM(b,d),0)})};
51
+ _.t.getBufferInfo=function(){return new _.ak};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.M=a};_.t.getNetworkEngine=function(){return this.M};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
+ _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.h.warn(YL)};_.t.onError=function(a){if(a&&(this.trigger(new _.I(_.jd,{detail:a})),this.j))this.j.onError(a)};_.t.namespace=function(){return _.Kc};_.t.canPlay=function(){return this.ec()?2:0};_.t.gb=function(){return this.K};_.t.kc=function(a){this.K=AM(a)};_.t.te=function(){this.K=null};_.t.mf=function(a){var b=this.gb()||{};a={metadataType:BM(b.metadataType),title:a};this.kc(Object.assign({},b,a))};
53
+ _.t.kf=function(a){var b=this.gb()||{},c=BM(b.metadataType);a=new chrome.cast.Image(a);this.kc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.jf=function(a){var b=this.gb()||{};this.kc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.lf=function(a){var b=this.gb()||{};a={metadataType:BM(b.metadataType),releaseDate:a};this.kc(Object.assign({},b,a))};
54
+ _.t.Zj=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;KM=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.sf()};
55
+ _.t.rk=function(a){this.h.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;RM(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.lb()||(this.A=!0,RM(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.lb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.qa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.da(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
+ isLive:this.isLive()},currentTime:PM(this),Zg:d,Df:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(dM,this.V);this.A=!1;this.a=null;this.I.release();this.m=this.H=null}};_.t.hk=function(a){this.h.debug("New media session",a.mediaSession);QM(this,a.mediaSession)};_.t.bk=function(a,b){if(a===dM&&0<this.F.size){var c=iM(b);this.F.forEach(function(d){return d(c)})}};_.t.yh=function(){this.trigger(new _.I(_.Fe))};
57
+ _.t.Ii=function(a){var b=this,c,d;return _.B(function(e){if(1==e.a)return c=null,_.x(e,jM(a,[_.De,_.ic],b.M,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Va++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.t.getTextDisplayer=function(){return null};xM.prototype.getTextDisplayer=xM.prototype.getTextDisplayer;xM.prototype.getNetworkEngine=xM.prototype.getNetworkEngine;
58
+ xM.prototype.setNetworkEngine=xM.prototype.setNetworkEngine;var KM=!1,wM=new Set;window.__onGCastApiAvailable=uM;_.w(WM,_.bk);_.t=WM.prototype;_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.a?_.x(b,yM(a.a),3):b.G(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.qe=function(){return!!this.a&&this.a.ec()&&KM};_.t.lb=function(){return!!this.a&&this.a.lb()};_.t.He=function(){return this.a?this.a.He():""};_.t.ud=function(a){this.a&&this.a.ud(a)};
59
+ _.t.cast=function(a){var b=this,c,d,e;return _.B(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.Af(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.pa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.qa())l.language&&
60
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.vc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),ff:b.f.getPresentationStartTime(),Gb:m,audioMimeType:p,Ta:g}}c=g;return _.x(f,XM(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.G(7);break}return _.x(f,TM(b.a,c),7);case 7:_.Bf(f,0);break;case 2:d=_.Cf(f),
61
+ b.h.error("Error while trying to cast",d),e=new _.I(_.jd,{detail:d}),b.trigger(e),_.z(f)}})};_.t.Be=function(){this.a&&this.a.Be()};_.t.uh=function(a){var b=this;return _.B(function(c){if(1==c.a){if(a===b.g)return c["return"]();b.g=a;return b.a?_.x(c,yM(b.a),2):c.G(2)}b.a=VM(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.B(function(c){return b.a?_.x(c,b.a.sendMessage(dM,a),0):(b.h.warn($L),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.h.warn($L)};
62
+ _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.h.warn($L)};_.t.gb=function(){return this.a&&this.a.gb()};_.t.kc=function(a){this.a&&this.a.kc(a)};_.t.te=function(){this.a&&this.a.te()};_.t.mf=function(a){this.a&&this.a.mf(a)};_.t.kf=function(a){this.a&&this.a.kf(a)};_.t.jf=function(a){this.a&&this.a.jf(a)};_.t.lf=function(a){this.a&&this.a.lf(a)};_.C(aM,WM);WM.prototype.setContentReleaseDate=WM.prototype.lf;WM.prototype.setContentArtist=WM.prototype.jf;
63
+ WM.prototype.setContentImage=WM.prototype.kf;WM.prototype.setContentTitle=WM.prototype.mf;WM.prototype.clearContentMetadata=WM.prototype.te;WM.prototype.setContentMetadata=WM.prototype.kc;WM.prototype.getContentMetadata=WM.prototype.gb;WM.prototype.removeMessageListener=WM.prototype.removeMessageListener;WM.prototype.addMessageListener=WM.prototype.addMessageListener;WM.prototype.sendMessage=WM.prototype.sendMessage;WM.prototype.changeReceiverId=WM.prototype.uh;WM.prototype.forceDisconnect=WM.prototype.Be;
64
+ WM.prototype.cast=WM.prototype.cast;WM.prototype.setPlayerConfigInterceptor=WM.prototype.ud;WM.prototype.getReceiverName=WM.prototype.He;WM.prototype.isCasting=WM.prototype.lb;WM.prototype.canCast=WM.prototype.qe;WM.prototype.destroy=WM.prototype.destroy;_.w(YM,gM);_.t=YM.prototype;
65
+ _.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.J);b.addEventListener(a.PAUSE,this.I);b.addEventListener(a.MEDIA_FINISHED,this.A);b.addEventListener(a.BUFFERING,this.w);b.addEventListener(a.SEEKING,this.M);b.addEventListener(a.SEEKED,this.K);b.addEventListener(a.STALLED,this.P);b.addEventListener(a.PLAYER_LOADING,this.H);b.addEventListener(a.ERROR,this.F);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
+ _.t.destroy=function(){var a=this,b,c;return _.B(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.J);c.removeEventListener(b.PAUSE,a.I);c.removeEventListener(b.MEDIA_FINISHED,a.A);c.removeEventListener(b.BUFFERING,a.w);c.removeEventListener(b.SEEKING,a.M);c.removeEventListener(b.SEEKED,a.K);c.removeEventListener(b.STALLED,a.P);c.removeEventListener(b.PLAYER_LOADING,a.H);c.removeEventListener(b.ERROR,
67
+ a.F);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,gM.prototype.destroy.call(a),0)})};_.t.Ch=function(){this.a.trigger(new _.I(_.Zd));this.oa(_.mn)};_.t.Bh=function(){this.oa(_.ln)};_.t.dk=function(){this.oa(_.en)};_.t.Yj=function(a){a.isBuffering?this.oa(_.cn):(a=this.a.isPaused()?_.ln:_.mn,this.oa(a))};_.t.Eh=function(){this.j=1;this.a.trigger(new _.I(_.Ne))};_.t.Dh=function(){this.a.trigger(new _.I(_.Me))};_.t.uk=function(){this.j=2};_.t.gk=function(){this.oa(_.kn)};
68
+ _.t.Ah=function(a){var b=this.a.getStats();this.a.trigger(new _.I(_.uc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.S=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.I(_.jd,{detail:a}));this.oa(_.jn)};_.t=Z.prototype;_.t.ub=function(){return"Google Cast Framework"};_.t.vb=function(){return cast.framework.VERSION};_.t.Ab=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
69
+ _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.gc=function(){return!1};_.t.Nb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.xb=function(){return 0};_.t.wb=function(){return 0};_.t.jb=function(){return 0};_.t.Ya=function(){switch(this.Ob()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Ob=function(){return this.f.position};_.t.Pb=function(){return this.j};
70
+ _.t.zb=function(){return this.m};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.zb;Z.prototype.getPositionInSequence=Z.prototype.Pb;Z.prototype.getPodTimeOffset=Z.prototype.Ob;
71
+ Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ya;Z.prototype.getMediaBitrate=Z.prototype.jb;Z.prototype.getMediaHeight=Z.prototype.wb;Z.prototype.getMediaWidth=Z.prototype.xb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Nb;Z.prototype.isBumper=Z.prototype.gc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
72
+ Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.Ab;Z.prototype.getAdManagerVersion=Z.prototype.vb;Z.prototype.getAdManagerName=Z.prototype.ub;ZM.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};ZM.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};ZM.prototype.kb=function(){return!!this.a.find(function(a){return-1===a.position})};ZM.prototype.hasPostroll=ZM.prototype.kb;ZM.prototype.hasPreroll=ZM.prototype.Qb;ZM.prototype.getCuePoints=ZM.prototype.getCuePoints;_.t=aN.prototype;_.t.load=function(){var a=this;return _.B(function(b){bN&&(bN=!1,gN(a,0));_.z(b)})};_.t.start=function(){return _.B(function(a){$M().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&$M().play()};_.t.pause=function(){-1!==this.getPosition()&&$M().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
73
+ _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.B(function(b){$M().removeEventListener(a.f,a.g);_.z(b)})};
74
+ _.t.Fh=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=$M().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.I(_.Zb,{adsTimeline:new ZM(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:fN(this,_.Pb,a);break;case cast.framework.events.EventType.BREAK_STARTED:fN(this,_.Ib,a);break;case cast.framework.events.EventType.BREAK_ENDED:fN(this,_.Jb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:fN(this,
75
+ _.Vb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(fN(this,_.Ub,a),fN(this,_.Wb,a)):a.endedReason===b.STOPPED?fN(this,_.Wb,a):a.endedReason===b.END_OF_STREAM?(fN(this,_.Mb,a),fN(this,_.Wb,a)):a.endedReason===b.ERROR&&gN(this,1);break;case cast.framework.events.EventType.PLAYING:fN(this,_.Tb,a);break;case cast.framework.events.EventType.PAUSE:fN(this,_.Rb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?fN(this,_.Kb,a):fN(this,_.Tb,a)}};
76
+ aN.prototype.getPosition=aN.prototype.getPosition;aN.prototype.setVolume=aN.prototype.setVolume;aN.prototype.getVolume=aN.prototype.getVolume;aN.prototype.skip=aN.prototype.skip;aN.prototype.pause=aN.prototype.pause;aN.prototype.resume=aN.prototype.resume;var bN=!1;hN.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(iN(),this.a)};hN.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(iN(),this.a)};hN.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return jN(a)})};
77
+ hN.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.pg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.rg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.sg}b&&this.Wb(new _.I(b,{detail:jN(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Wb(new _.I(_.pg,{detail:b.value}))};_.w(kN,_.R);_.t=kN.prototype;_.t.initialize=function(a){this.l=a;lN().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.g=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;lN().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.g};_.t.ia=function(){return this.j};_.t.fa=function(){return null};
78
+ _.t.Ia=function(){var a=this.pa();return a&&a.renditions[0]};_.t.Ja=function(){var a=this.qa();return a&&a.renditions[0]};_.t.Xa=function(){return null};_.t.hb=function(){return null};_.t.ib=function(){return null};_.t.La=function(){return null};_.t.pa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
79
+ _.t.qa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.cb=function(){this.h.warn("Video tracks unavailable on Cast")};_.t.va=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ea=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.bb=function(){this.h.warn("Video renditions unavailable on Cast")};_.t.ob=function(a){this.va(a&&a.track)};
80
+ _.t.pb=function(a){this.Ea(a&&a.track)};
81
+ _.t.addTextTrack=function(a){var b=this,c,d,e;return _.B(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,jM(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),nN(b)}catch(g){throw b.h.warn("failed on track",
82
+ a),g;}}_.z(f)})};_.t.ka=function(){return!0};_.t.Ik=function(){this.f=lN().getAudioTracksManager();var a=this.f.getTracks();this.g=mN(_.Q,a);nN(this);a=this.l.getConfiguration();oN(this,_.Q,a.preferredAudioLanguage,a.preferredAudioRole);oN(this,_.O,a.preferredTextLanguage,a.preferredTextRole)};kN.prototype.isAbrEnabled=kN.prototype.ka;kN.prototype.addTextTrack=kN.prototype.addTextTrack;kN.prototype.setTextRendition=kN.prototype.pb;kN.prototype.setAudioRendition=kN.prototype.ob;
83
+ kN.prototype.setVideoRendition=kN.prototype.bb;kN.prototype.setTextTrack=kN.prototype.Ea;kN.prototype.setAudioTrack=kN.prototype.va;kN.prototype.setVideoTrack=kN.prototype.cb;kN.prototype.getTextTrack=kN.prototype.qa;kN.prototype.getAudioTrack=kN.prototype.pa;kN.prototype.getVideoTrack=kN.prototype.La;kN.prototype.getLoadingTextRendition=kN.prototype.ib;kN.prototype.getLoadingAudioRendition=kN.prototype.hb;kN.prototype.getLoadingVideoRendition=kN.prototype.Xa;kN.prototype.getTextRendition=kN.prototype.Ja;
84
+ kN.prototype.getAudioRendition=kN.prototype.Ia;kN.prototype.getVideoRendition=kN.prototype.fa;kN.prototype.getTextTracks=kN.prototype.ia;kN.prototype.getAudioTracks=kN.prototype.getAudioTracks;kN.prototype.getVideoTracks=kN.prototype.getVideoTracks;_.w(pN,_.bk);_.t=pN.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.w=b);var d=qN();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ik.bind(this));d.setMediaPlaybackInfoHandler(this.mh.bind(this));this.a=new YM(this);this.a.init();this.j=new kN;this.j.initialize(this);this.o=new hN(function(e){return c.trigger(e)});this.o.init()};
85
+ _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=qN();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.B=null,a.w=_.hk(),a.g=a.w,a.m=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.G(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.z(b)})};
86
+ _.t.play=function(){var a=qN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=qN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return qN().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
+ _.t.isEnded=function(){return qN().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=qN();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(UL);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return qN().getCurrentTimeSec()};_.t.getDuration=function(){var a=qN().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return qN().getPlaybackRate()};
88
+ _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;qN().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
89
+ _.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=qN().getMediaInformation();if(a){var b=qN().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.m?this.A[this.m]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Fl:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
+ _.t.getPresentationStartTime=function(){return qN().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=qN().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.Zm};
91
+ _.t.getStats=function(){var a=_.Um();if(this.f){a=qN().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.m=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
92
+ _.t.load=function(a){var b=this,c,d;return _.B(function(e){b.f=new _.Tm;b.a.m=b.f.a;b.A=_.qn(a);_.kk(a)&&(b.g=_.jk(b.w,a));if(b.D)return b.D=!1,e["return"]();c=b.A[b.m];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:hM(b.g),local:!0};return _.x(e,qN().load(d),0)})};_.t.getBufferInfo=function(){this.h.warn(_.qa);return new _.ak};
93
+ _.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.m};_.t.setSourceIndex=function(a){this.m=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return bM};_.t.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.t.resetAbr=function(){this.h.warn(YL)};
94
+ _.t.onError=function(a){this.trigger(new _.I(_.jd,{detail:a}))};_.t.canPlay=function(){return _.gj()?2:0};
95
+ _.t.ik=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=hM(this.getStats());var b=qN(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.h.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
96
+ (!e||e&&f)){d=qN().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};_.t.mh=function(a,b){var c=null;a.media.customData&&(c=iM(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;tN(c,b);return b};
97
+ _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};pN.prototype.getTextDisplayer=pN.prototype.getTextDisplayer;pN.prototype.getNetworkEngine=pN.prototype.getNetworkEngine;pN.prototype.setNetworkEngine=pN.prototype.setNetworkEngine;_.t=uN.prototype;_.t.init=function(a){var b=this;a&&(this.f=new pN,_.xo(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.B(function(c){return b.l&&b.l.getState()!==_.Ym?_.x(c,fM(b.l),0):c.G(0)})}))};
98
+ _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=xN(),b=xN().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[dM]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Dj.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
99
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Cj.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(dM,this.w)}};
100
+ _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=xN();xN().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(dM,this.w);a.stop();this.l=this.f=null}};_.t.ud=function(a){this.j=a};_.t.Uk=function(a){this.m=a};_.t.on=function(a,b){xN().addEventListener(a,b)};_.t.off=function(a,b){xN().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.ld&&this.g.add(a)};
101
+ _.t.removeMessageListener=function(a){typeof a===_.ld&&this.g["delete"](a)};_.t.sendMessage=function(a,b){xN().sendCustomMessage(dM,b,hM(a))};_.t.ec=function(){return this.a};_.t.gb=function(){var a=xN().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
+ _.t.Dj=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return zN(this,a);try{var b=(new DOMParser).parseFromString(a,_.Ee)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=xN();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.fa),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Re||g===_.lc){g=e[f].getAttribute(_.Dd);for(var h=e[f].getElementsByTagName(_.lb),l=
103
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Dd)||g,n=h[l].getAttribute(_.Pc),p=h[l].getAttribute(_.gf)||void 0,q=h[l].getAttribute(_.md)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.lb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.fa).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ub)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=xN();c=a.getElementsByTagName("StreamIndex");
104
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Re){e=c[d].getElementsByTagName(_.ib);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Wa)||void 0,h=e[f].getAttribute(_.Va)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Te,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.ib).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
+ _.t.Cj=function(a){var b=this,c,d,e,f,g,h;return _.B(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=iM(c.media.customData.playerConfiguration));if(!b.l||!d){l.G(2);break}if(!b.j){l.G(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.G(5);break}return _.x(l,dN(c.media,d.ima,b.l.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.G(7);
106
+ break}b.f.D=!0;return _.x(l,_.Bo(b.l,d),8);case 8:return _.x(l,_.Co(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Gb&&(c.media.hlsVideoSegmentFormat=kM(f.Gb,_.ui)),f.audioMimeType&&(c.media.hlsSegmentFormat=kM(f.audioMimeType,_.Q));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.l.getConfiguration().autoplay);case 2:if(!b.m){l.G(10);
107
+ break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.fk=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.vj;var b=xN().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.l.seek(b))}_.Eo(this.l)}};
108
+ _.t.zh=function(a){if(0<this.g.size){var b=iM(a.data);this.g.forEach(function(c){return c(b)})}};_.C(cM,uN);uN.prototype.getContentMetadata=uN.prototype.gb;uN.prototype.isApiReady=uN.prototype.ec;uN.prototype.sendMessage=uN.prototype.sendMessage;uN.prototype.removeMessageListener=uN.prototype.removeMessageListener;uN.prototype.addMessageListener=uN.prototype.addMessageListener;uN.prototype.off=uN.prototype.off;uN.prototype.on=uN.prototype.on;uN.prototype.setLoadRequestDataInterceptor=uN.prototype.Uk;
109
+ uN.prototype.setPlayerConfigInterceptor=uN.prototype.ud;uN.prototype.stop=uN.prototype.stop;uN.prototype.start=uN.prototype.start;uN.prototype.init=uN.prototype.init;uN.getInstance=wN;var vN=null;_.t=AN.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.B(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.wk.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.z(g)})};_.t.start=function(){return _.B(function(a){_.z(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
110
+ _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(eM,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.B(function(b){a.g.release();_.z(b)})};
111
+ _.t.wk=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.I(_.Zb,{adsTimeline:new ZM(a.breaks)})));break;case "isPlayingBreak":a.value?CN(this,_.Ib):(CN(this,_.Mb),CN(this,_.Wb),CN(this,_.Jb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(CN(this,_.Mb),CN(this,_.Wb)),CN(this,_.Vb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?CN(this,_.Rb):CN(this,_.Tb))}};AN.prototype.getPosition=AN.prototype.getPosition;
112
+ AN.prototype.setVolume=AN.prototype.setVolume;AN.prototype.getVolume=AN.prototype.getVolume;AN.prototype.skip=AN.prototype.skip;AN.prototype.pause=AN.prototype.pause;AN.prototype.resume=AN.prototype.resume;DN.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};DN.prototype.$=function(a,b){return a.namespace()!==_.Kc?!1:!(!b||!b.ima)};DN.prototype.create=function(a){return new AN(a.a)};DN.prototype.create=DN.prototype.create;DN.prototype.isSupported=DN.prototype.$;DN.prototype.name=DN.prototype.name;_.Fn(new DN);EN.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};EN.prototype.$=function(a,b){return wN().ec()?!(!b||!b.ima):!1};EN.prototype.create=function(a){return new aN(a)};EN.prototype.create=EN.prototype.create;EN.prototype.isSupported=EN.prototype.$;EN.prototype.name=EN.prototype.name;_.Fn(new EN);};
113
113
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
114
114
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
115
115
  else{_=this.clpp._;(f.call(g,this));}