@castlabs/prestoplay 6.3.0 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +70 -1
  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 +108 -107
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +426 -398
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +72 -69
  10. package/cjs/cl.externs.js +79 -155
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -44
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -32
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +259 -254
  17. package/cjs/cl.muxdata.js +12 -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 +69 -69
  22. package/cjs/cl.thumbnails.js +24 -23
  23. package/cjs/cl.tizen.js +70 -70
  24. package/cjs/cl.ttml.js +27 -26
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +18 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -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 -87
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +365 -348
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -63
  38. package/cl.externs.js +74 -154
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +39 -37
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +233 -222
  45. package/cl.muxdata.js +8 -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 -21
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +16 -15
  58. package/package.json +4 -2
package/cjs/cl.cast.js CHANGED
@@ -1,114 +1,115 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var NJ="Cannot seek during ads playout.",OJ="Cannot switch track",PJ="Media session does not exist.",QJ="No receivers available",RJ="Reset ABR functionality not available on cast.",SJ="SDK not yet ready",TJ="Sender is destroyed.",UJ="clpp.cast.CastProxy",VJ="clpp.cast.Player",WJ="clpp.cast.Receiver",XJ="urn:x-cast:castlabs",YJ="urn:x-cast:com.google.cast.media",ZJ=function(a){return _.A(function(b){return 1==b.a?_.w(b,a.fc(_.Fd),2):_.w(b,a.fc(_.Ed),0)})},$J=function(a,b){this.log=new _.G(b);this.a=
3
- a;this.j=null;this.g=_.Xl;this.m=_.Yl;this.h=2;this.B=Date.now();this.A=-1},aK=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ad){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Bd?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.h?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},bK=function(a){if(typeof a!==_.me)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}},cK=function(a,b,c,d){var e,f,g,k,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(k=0;k<b.length&&!f;)g=b[k++],f=_.sh(d,a.mimeType,g);if(!f||!g)return q.H(2);l=_.ih(a.url);return _.w(q,c.fetch(l).O,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.R(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)})},dK=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 _.Ke:return d.FMP4;case _.Je:return b===_.Bg?d.MPEG2_TS:c.TS;case _.bc:return c.AAC;case _.cc:return c.AC3;case _.dc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.ec:return c.FMP4}},fK=function(a){a=
6
- void 0===a?eK:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.K(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,k=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 k;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},gK=function(a){$J.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.f=null;this.w=this.C.bind(this)},hK=function(){this.h=new _.G("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},iK=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},kK=function(a,b){var c=iK(a);return jK(a,b).find(function(d){return c.includes(d.id)})||null},jK=function(a,b){return a.g.filter(function(c){return c.type===b})},mK=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.N){var e=a.ja();e&&
8
- c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;lK(a,b)},function(f){a.f[b]=null;a.h.debug(OJ,f)})}else b===_.N&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){lK(a,b)},function(f){a.h.debug(OJ,f)}))},lK=function(a,b){b===_.P?a.a.trigger(new _.I(_.Jh)):b===_.N&&a.a.trigger(new _.I(_.Kh))},qK=function(a,b,c,d){_.Ph.call(this);this.j=new _.G(_.yc);this.aa=a;this.o=new _.qh(b);this.Y=c;this.ga=d;this.g=this.J=
9
- _.Xi();this.C=[];this.B=0;this.L=new _.mi;this.G=this.m=this.a=null;this.A=this.w=!1;this.wa="";this.Oa=1E6;this.f=new hK;this.f.initialize(this);this.h=new gK(this);this.I=new _.Wf;this.K=null;this.D=new Set;this.T=this.Ci.bind(this);this.Ga=this.Vi.bind(this);this.ca=this.Mi.bind(this);this.U=this.Gi.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){nK(!0)},0)}});oK(this);pK.add(this)},
10
- rK=function(a){var b,c;return _.A(function(d){if(1==d.a)return pK["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.h&&(c.push(a.h.destroy()),a.h=null),_.w(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.ga=null;_.z(d)})},tK=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(sK);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=fK(sK[b]);return Object.assign(b,a)},uK=function(a){var b=void 0===b?eK:b;return Object.values(sK).includes(a)?a:b},vK=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},oK=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.aa.length){a.w=!0;a.o.Re();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.aa;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);zK&&a.o.$(.02)}},JK=function(a,b){EK(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);
13
- b.addMessageListener(XJ,a.U)},EK=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.I.release(),a.G=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.m),a.I.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Bg.bind(a)),a.f&&a.f.load(),a.h&&a.h.init(),a.trigger(new _.I(_.md))))},KK=function(a){return _.A(function(b){return a.eb()?b.H(0):_.w(b,cast.framework.CastContext.getInstance().requestSession(),0)})},LK=function(a,b){var c,d,e,f,g,k,l,m,n,p,
14
- q,r,x,y,C,H,F;return _.A(function(E){switch(E.a){case 1:return c=chrome.cast.media.StreamType,d=_.zp,_.w(E,KK(a),2);case 2:if(!b)return E["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;k=b;l=k.Bb;m=k.audioMimeType;g.hlsVideoSegmentFormat=dK(l,d.VIDEO);g.hlsSegmentFormat=dK(m,d.AUDIO);if(!b.Ka){E.H(3);break}if(!a.N){E.H(4);break}return _.w(E,Promise.resolve(a.N(b.Ka)),
15
- 5);case 5:if(n=E.f)b.Ka=n;case 4:a.g=b.Ka;a.C=_.tm(a.g);a.B=a.C.findIndex(function(L){return L.url===b.source.url});if(!b.Ka.remoteTextTracks){E.H(6);break}return _.w(E,Promise.all(b.Ka.remoteTextTracks.map(a.Gh.bind(a))),7);case 7:p=E.f,g.tracks=p.filter(function(L){return L}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:aK(b.Ka)};case 3:q=a.Za()||{};r=uK(q.metadataType);typeof b.Ie===_.h&&(x={metadataType:r,sectionStartAbsoluteTime:b.Ie});
16
- b.source.name&&(y={metadataType:r,title:b.source.name});C=vK(q);if(H=tK(Object.assign({},x,y,C)))g.metadata=H;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.jc&&(F.autoplay=b.autoplay);typeof b.currentTime===_.h&&(F.currentTime=b.currentTime);return _.w(E,f.loadMedia(F),0)}})},MK=function(a,b,c){c=void 0===c?0:c;var d,e;return _.A(function(f){(d=a.f.ja())&&d.language&&(a.g.preferredTextLanguage=d.language);(e=a.f.ia())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.w(f,
17
- LK(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Ie:a.getPresentationStartTime(),autoplay:b,Ka:a.g}),0)})},nK=function(a){if(a){a=_.u(pK);for(var b=a.next();!b.done;b=a.next())oK(b.value)}},OK=function(a,b,c){_.Ph.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ad?c:function(e,f){d.f&&e!==_.dm&&e!==_.Xl&&d.f.load(f)};this.a=NK(this);this.g=new _.G(UJ);this.addDelegate(this.f)},NK=function(a){return new qK(a.h,function(){a.trigger(new _.I(_.pc))},function(b,c){var d=a.f.getConfiguration();
18
- 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.af&&(d.preferredAudioLanguage=c.af);c.jg&&(d.preferredTextLanguage=c.jg);_.xn(a.f,null);a.trigger(new _.I("castingended"));a.j(b,d)},function(){return PK(a)})},PK=function(a){var b;return _.A(function(c){if(1==c.a)return a.trigger(new _.I(_.oc)),b=a.f.a,b!==a.a&&a.f&&a.a?_.w(c,a.f.release(),2):c["return"]();_.xn(a.f,a.a);_.z(c)})},QK=function(a){$J.call(this,
19
- a,"clpp.cast.StateManager");this.I=this.Fg.bind(this);this.G=this.Eg.bind(this);this.w=this.Ii.bind(this);this.o=this.Bi.bind(this);this.K=this.Hg.bind(this);this.J=this.Gg.bind(this);this.L=this.Yi.bind(this);this.D=this.Li.bind(this);this.C=this.S.bind(this);this.f=this.Dg.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.h=typeof c===_.h?c:1;this.j=typeof d===_.h?d:1;this.g=typeof e===_.h?e:0},RK=function(a){this.a=a},TK=function(a){this.l=a;this.a=null;this.g=this.Ig.bind(this);this.f=
20
- [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];SK().addEventListener(this.f,this.g)},WK=function(a,b,c){var d,e,f,g,k,l,m;return _.A(function(n){if(1==
21
- n.a){d=b.adTagUrl;if(!d)return n["return"]();_.rf(n,2);UK=!1;e=_.ih(d);return _.w(n,c.fetch(e).O,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.Tg(f.data),k=new DOMParser,l=k.parseFromString(g,_.ve),l.getElementsByTagName("vmap:VMAP").length)_.D("VMAP detected."),a.vmapAdsRequest=VK(g);else if(l.getElementsByTagName("VAST").length){_.D("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=VK(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=
22
- [q]}else _.D("Unsupported schema."),UK=!0;return _.sf(n,0)}m=_.tf(n);_.D("Failed to fetch an ad",m);UK=!0;_.z(n)})},VK=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},SK=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},YK=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=XK(a,c))&&(d={ad:c});a.l.trigger(new _.I(b,d))}},ZK=function(a,b){var c=new _.K(1,10,10003,{errorType:b});
23
- a.l.onError(c)},XK=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.me&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.me&&(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,k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new Z(d,e,b.index,
24
- b.total,f)}return c},$K=function(a){this.Qb=a;this.a=this.f.bind(this)},aL=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]},bL=function(a){var b=a.dashTimedMetadata,c=_.Ce;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Be)?_.hg:_.fg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||
25
- "",eventElement:b&&b.eventElement}},cL=function(){this.g=new _.G("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.cj.bind(this);this.a=this.f=null},dL=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},fL=function(a){a.a=dL().getTextTracksManager();var b=a.a.getTracks();a.j=eL(_.N,b)},gL=function(a,b,c,d){c=_.yh(c).filter(function(k){return k});var e=!1,f=[];b===_.P?f=a.getAudioTracks():b===_.N&&(f=a.ea());if(c=c.find(function(k){var l=
26
- _.uh(k);return f.some(function(m){m=_.uh(m.language||"");return _.vh(l,m)})})){var g=_.uh(c);c=f.filter(function(k){k=_.uh(k.language||"");return _.vh(g,k)});f=c.length?c:f;e=e||!!c.length}_.bh(d)&&(c=f.filter(function(k){return k.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===_.P?a.na(e):b===_.N&&a.ua(e))},eL=function(a,b){for(var c=[],d=_.u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.zg(e.trackId.toString(),a);f.roles=e.roles||
27
- [];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 _.Gg(f.id,f));c.push(f)}return c},hL=function(){_.Ph.call(this);this.C=new _.G(VJ);this.g=this.o=_.Xi();this.w=null;this.j=-1;this.D=new _.mi;this.f=this.m=this.h=this.a=this.A=null;this.B=!1},iL=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},
28
- lL=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=_.xj(d);if(e){var f=[_.Hc];_.tm(a)[0].type!==_.Yb&&f.unshift(_.Ic);d.preferredDrmSystem===_.Hc&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ma[g];k?(d=g===_.Ic?cast.framework.ContentProtection.WIDEVINE:g===_.Hc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=k.licenseUrl,
29
- d={ldlDelay:0,customData:{}},jL(b,k,a,d),kL(b,k,a,d)):c()}else c()}else c()},jL=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ih({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=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},kL=function(a,b,c,d){b.modifiers.licenseResponse?
30
- a.licenseHandler=function(e,f){var g;return _.A(function(k){return 1==k.a?(g=_.jh(Object.assign({},f.headers),e.buffer,200,""),_.w(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.R(g.data))})}:a.licenseHandler=void 0},mL=function(){this.a=!1;this.h=new _.G(WJ);this.f=this.l=null;this.g=new Set;this.A=this.Ki.bind(this);this.w=this.Cg.bind(this);this.j=null;this.o=new _.Wf;this.m=null},oL=function(){return nL||(nL=new mL)},pL=function(){return cast.framework.CastReceiverContext.getInstance()},
31
- rL=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=pL();c=(pL().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Ke:_.Je;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=qL(k,_.la),m=qL(k,"RESOLUTION"),n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,
32
- n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(k);++g}return f.join("\n")},qL=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},sL=function(a){this.f=a;this.a=null;this.g=new _.Wf;this.h=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,
33
- cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},uL=function(a,b){var c=null,d=tL(a);d&&(c={ad:d});a.f.trigger(new _.I(b,c))},tL=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(k){return k.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(k){return 0<=k.position}).sort(function(k,
34
- l){return k.position-l.position}).findIndex(function(k){return k===c})}b.breakClips&&(d=b.breakClips.find(function(k){return k.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},vL=function(){},wL=function(){};_.t=$J.prototype;_.t.release=function(){this.ha(_.Xl)};_.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.ha(_.hm)};
35
- _.t.ha=function(a){if(a!==this.g)if(this.g===_.hm&&a!==_.Xl)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===_.bm?(this.A=b,this.a.trigger(new _.I(_.lc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.bm&&this.a.trigger(new _.I(_.kc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Nl(this.j,this.g);this.a.trigger(new _.I(_.ie,
36
- {detail:a}))}};_.B("clpp.cast.CastUtils",function(){});var eK=0,sK={GENERIC:eK,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.v(gK,$J);gK.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)};gK.prototype.destroy=function(){var a=this;return _.A(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.w(b,$J.prototype.destroy.call(a),0)})};gK.prototype.ha=function(a){var b=this.a.m;b&&b.isPlayingBreak||$J.prototype.ha.call(this,a)};
37
- gK.prototype.C=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.ha(_.dm);break;case chrome.cast.media.IdleReason.ERROR:this.ha(_.hm);break;default:this.ha(_.Xl)}break;case chrome.cast.media.PlayerState.PLAYING:this.ha(_.km);break;case chrome.cast.media.PlayerState.PAUSED:this.ha(_.jm);break;case chrome.cast.media.PlayerState.BUFFERING:this.ha(_.bm)}};_.v(hK,_.Q);_.t=hK.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=_.Bg;break;case chrome.cast.media.TrackType.AUDIO:c=_.P;break;case chrome.cast.media.TrackType.TEXT:c=_.N}c=new _.zg(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 _.Gg(c.id,c));return c}):[],this.a.trigger(new _.I(_.Cp)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return jK(this,_.Bg)};_.t.getAudioTracks=function(){return jK(this,_.P)};_.t.ea=function(){return jK(this,_.N)};_.t.fa=function(){var a=this.Ca();return a?a.renditions[0]:null};_.t.za=function(){var a=this.ia();return a?a.renditions[0]:null};_.t.Ba=function(){var a=this.ja();return a?a.renditions[0]:null};_.t.Qa=function(){return this.f[_.Bg]||null};
40
- _.t.$a=function(){return this.f[_.P]||null};_.t.ab=function(){return this.f[_.N]||null};_.t.Ca=function(){return kK(this,_.Bg)};_.t.ia=function(){return kK(this,_.P)};_.t.ja=function(){return kK(this,_.N)};_.t.Xa=function(a){mK(this,_.Bg,a)};_.t.na=function(a){mK(this,_.P,a)};_.t.ua=function(a){mK(this,_.N,a)};_.t.Wa=function(a){this.Xa(a&&a.track)};_.t.ib=function(a){this.na(a&&a.track)};_.t.jb=function(a){this.ua(a&&a.track)};_.t.addTextTrack=function(){return _.A(function(a){_.z(a)})};_.t.ka=function(){return!0};
41
- hK.prototype.isAbrEnabled=hK.prototype.ka;hK.prototype.addTextTrack=hK.prototype.addTextTrack;hK.prototype.setTextRendition=hK.prototype.jb;hK.prototype.setAudioRendition=hK.prototype.ib;hK.prototype.setVideoRendition=hK.prototype.Wa;hK.prototype.setTextTrack=hK.prototype.ua;hK.prototype.setAudioTrack=hK.prototype.na;hK.prototype.setVideoTrack=hK.prototype.Xa;hK.prototype.getTextTrack=hK.prototype.ja;hK.prototype.getAudioTrack=hK.prototype.ia;hK.prototype.getVideoTrack=hK.prototype.Ca;
42
- hK.prototype.getLoadingTextRendition=hK.prototype.ab;hK.prototype.getLoadingAudioRendition=hK.prototype.$a;hK.prototype.getLoadingVideoRendition=hK.prototype.Qa;hK.prototype.getTextRendition=hK.prototype.Ba;hK.prototype.getAudioRendition=hK.prototype.za;hK.prototype.getVideoRendition=hK.prototype.fa;hK.prototype.getTextTracks=hK.prototype.ea;hK.prototype.getAudioTracks=hK.prototype.getAudioTracks;hK.prototype.getVideoTracks=hK.prototype.getVideoTracks;_.v(qK,_.Ph);_.t=qK.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.dd=function(a){this.N=a};_.t.$b=function(){return this.w};_.t.eb=function(){return this.A};_.t.je=function(){return this.wa};
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 _.K(1,8,8004,void 0);g.H(2);break}_.rf(g,3);return _.w(g,e.sendMessage(a,aK(b)),5);case 5:_.sf(g,2);break;case 3:f=_.tf(g),d=new _.K(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.$b())throw a.j.warn(SJ),new _.K(1,8,8001,void 0);if(!zK)throw a.j.warn(QJ),new _.K(1,8,8002,void 0);if(a.eb())throw a.j.warn("Already casting"),new _.K(1,8,8003,void 0);_.rf(d,2);return _.w(d,KK(a),4)}if(2!=d.a)return _.sf(d,0);b=_.tf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.K(1,8,8E3,c);})};
45
- _.t.de=function(){this.eb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.ad&&this.D.add(a)};_.t.removeMessageListener=function(a){typeof a===_.ad&&this.D["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?MK(this,!0):new Promise(function(b,c){if(!a.a)return c(PJ);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(PJ);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()===_.dm};_.t.seek=function(a){var b=this;return this.isEnded()?MK(this,!1,a):new Promise(function(c,d){b.a||d(PJ);b.m.isPlayingBreak&&d(NJ);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.I(_.Ee));b.a.seek(e,function(){b.trigger(new _.I(_.De));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!==_.h?-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(YJ,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var XK="Cannot seek during ads playout.",YK="Cannot switch track",ZK="Media session does not exist.",$K="No receivers available",aL="Reset ABR functionality not available on cast.",bL="SDK not yet ready",cL="Sender is destroyed.",dL="clpp.cast.CastProxy",eL="clpp.cast.Player",fL="clpp.cast.Receiver",gL="urn:x-cast:castlabs",hL="urn:x-cast:com.google.cast.media",iL=function(a){return _.A(function(b){return 1==b.a?_.y(b,a.gc(_.Md),2):_.y(b,a.gc(_.Ld),0)})},jL=function(a,b){this.log=new _.H(b);this.a=
3
+ a;this.j=null;this.g=_.Om;this.m=_.Pm;this.h=2;this.B=Date.now();this.A=-1},kL=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.hd){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Id?"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}})},lL=function(a){if(typeof a!==_.te)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}},mL=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=_.Di(d,a.mimeType,g);if(!f||!g)return q.H(2);l=_.Hh(a.url);return _.y(q,c.fetch(l).P,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)})},nL=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 _.Re:return d.FMP4;case _.Qe:return b===_.fi?d.MPEG2_TS:c.TS;case _.jc:return c.AAC;case _.kc:return c.AC3;case _.lc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.nc:return c.FMP4}},pL=function(a){a=
6
+ void 0===a?oL: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}},qL=function(a){jL.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.f=null;this.w=this.C.bind(this)},rL=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},sL=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},uL=function(a,b){var c=sL(a);return tL(a,b).find(function(d){return c.includes(d.id)})||null},tL=function(a,b){return a.g.filter(function(c){return c.type===b})},wL=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.la();e&&
8
+ c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;vL(a,b)},function(f){a.f[b]=null;a.h.debug(YK,f)})}else b===_.P&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){vL(a,b)},function(f){a.h.debug(YK,f)}))},vL=function(a,b){b===_.Q?a.a.trigger(new _.I(_.Cj)):b===_.P&&a.a.trigger(new _.I(_.Dj))},AL=function(a,b,c,d){_.Jj.call(this);this.j=new _.H(_.Fc);this.$=a;this.o=new _.Li(b);this.X=c;this.da=d;this.g=this.J=_.Pj();
9
+ this.C=[];this.B=0;this.L=new _.Yh;this.G=this.m=this.a=null;this.A=this.w=!1;this.ia="";this.Ra=1E6;this.f=new rL;this.f.initialize(this);this.h=new qL(this);this.I=new _.cg;this.K=null;this.D=new Set;this.S=this.Ui.bind(this);this.ua=this.mj.bind(this);this.ca=this.dj.bind(this);this.U=this.Yi.bind(this);this.O=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){xL(!0)},0)}});yL(this);zL.add(this)},
10
+ BL=function(a){var b,c;return _.A(function(d){if(1==d.a)return zL["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.ua)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.h&&(c.push(a.h.destroy()),a.h=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.X=null;a.da=null;_.z(d)})},DL=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(CL);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=pL(CL[b]);return Object.assign(b,a)},EL=function(a){var b=void 0===b?oL:b;return Object.values(CL).includes(a)?a:b},FL=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},yL=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.ua);JL&&a.o.Z(.02)}},OL=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},UL=function(a,b){TL(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(gL,a.U)},TL=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.I.release(),a.G=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.m),a.I.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Mg.bind(a)),a.f&&a.f.load(),a.h&&a.h.init(),a.trigger(new _.I(_.ud))))},VL=function(a){return _.A(function(b){return a.ib()?
14
+ b.H(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},WL=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,w,x,C,D,E;return _.A(function(G){switch(G.a){case 1:return c=chrome.cast.media.StreamType,d=_.qq,_.y(G,VL(a),2);case 2:if(!b)return G["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.Cb;m=h.audioMimeType;g.hlsVideoSegmentFormat=nL(l,d.VIDEO);
15
+ g.hlsSegmentFormat=nL(m,d.AUDIO);if(!b.Oa){G.H(3);break}if(!a.O){G.H(4);break}return _.y(G,Promise.resolve(a.O(b.Oa)),5);case 5:if(n=G.f)b.Oa=n;case 4:a.g=b.Oa;a.C=_.fn(a.g);a.B=a.C.findIndex(function(K){return K.url===b.source.url});if(!b.Oa.remoteTextTracks){G.H(6);break}return _.y(G,Promise.all(b.Oa.remoteTextTracks.map(a.Sh.bind(a))),7);case 7:p=G.f,g.tracks=p.filter(function(K){return K}),b.Oa.remoteTextTracks=void 0;case 6:delete b.Oa.autoplay,b.Oa.startTime=null,g.customData={playerConfiguration:kL(b.Oa)};
16
+ case 3:q=a.cb()||{};r=EL(q.metadataType);typeof b.Qe===_.k&&(w={metadataType:r,sectionStartAbsoluteTime:b.Qe});b.source.name&&(x={metadataType:r,title:b.source.name});C=FL(q);if(D=DL(Object.assign({},w,x,C)))g.metadata=D;E=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.rc&&(E.autoplay=b.autoplay);typeof b.currentTime===_.k&&(E.currentTime=b.currentTime);return _.y(G,f.loadMedia(E),0)}})},XL=function(a,b,c){c=void 0===c?0:c;var d,e;return _.A(function(f){(d=a.f.la())&&d.language&&(a.g.preferredTextLanguage=
17
+ d.language);(e=a.f.ka())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.y(f,WL(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Qe:a.getPresentationStartTime(),autoplay:b,Oa:a.g}),0)})},xL=function(a){if(a){a=_.u(zL);for(var b=a.next();!b.done;b=a.next())yL(b.value)}},ZL=function(a,b,c){_.Jj.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.hd?c:function(e,f){d.f&&e!==_.Vm&&e!==_.Om&&d.f.load(f)};this.a=YL(this);this.g=new _.H(dL);this.addDelegate(this.f)},YL=
18
+ function(a){return new AL(a.h,function(){a.trigger(new _.I(_.xc))},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.tg&&(d.preferredTextLanguage=c.tg);_.mo(a.f,null);a.trigger(new _.I("castingended"));a.j(b,d)},function(){return $L(a)})},$L=function(a){var b;return _.A(function(c){if(1==c.a)return a.trigger(new _.I(_.wc)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.mo(a.f,a.a);_.z(c)})},aM=function(a){jL.call(this,a,"clpp.cast.StateManager");this.I=this.Qg.bind(this);this.G=this.Pg.bind(this);this.w=this.$i.bind(this);this.o=this.Ti.bind(this);this.K=this.Sg.bind(this);this.J=this.Rg.bind(this);this.L=this.pj.bind(this);this.D=this.cj.bind(this);this.C=this.T.bind(this);this.f=this.Og.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},bM=function(a){this.a=a},dM=function(a){this.l=a;this.a=null;this.g=this.Tg.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
+ cM().addEventListener(this.f,this.g)},gM=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"]();_.xf(n,2);eM=!1;e=_.Hh(d);return _.y(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.oh(f.data),h=new DOMParser,l=h.parseFromString(g,_.Ce),l.getElementsByTagName("vmap:VMAP").length)_.F("VMAP detected."),a.vmapAdsRequest=fM(g);else if(l.getElementsByTagName("VAST").length){_.F("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=fM(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.F("Unsupported schema."),eM=!0;return _.yf(n,0)}m=_.zf(n);_.F("Failed to fetch an ad",m);eM=!0;_.z(n)})},fM=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},cM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},iM=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=hM(a,c))&&(d={ad:c});a.l.trigger(new _.I(b,d))}},jM=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},hM=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.te&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.te&&(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},kM=function(a){this.Sb=a;this.a=this.f.bind(this)},lM=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]},mM=function(a){var b=a.dashTimedMetadata,c=_.Je;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ie)?
25
+ _.mg:_.kg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},nM=function(){this.g=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.vj.bind(this);this.a=this.f=null},oM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},qM=function(a){a.a=oM().getTextTracksManager();var b=a.a.getTracks();a.j=pM(_.P,b)},rM=function(a,b,c,d){c=_.ai(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.Q?f=a.getAudioTracks():b===_.P&&(f=a.fa());if(c=c.find(function(h){var l=_.Fi(h);return f.some(function(m){m=_.Fi(m.language||"");return _.Gi(l,m)})})){var g=_.Fi(c);c=f.filter(function(h){h=_.Fi(h.language||"");return _.Gi(g,h)});f=c.length?c:f;e=e||!!c.length}_.xh(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.ra(e):b===_.P&&a.Ba(e))},pM=function(a,b){for(var c=[],d=_.u(b),e=
27
+ d.next();!e.done;e=d.next()){e=e.value;var f=new _.di(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 _.li(f.id,f));c.push(f)}return c},sM=function(){_.Jj.call(this);this.A=new _.H(eL);this.g=this.o=_.Pj();this.w=null;this.j=-1;this.D=new _.Yh;this.f=this.m=
28
+ this.h=this.a=this.B=null;this.C=!1},tM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},wM=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=_.ok(d);if(e){var f=[_.Oc];_.fn(a)[0].type!==_.gc&&f.unshift(_.Pc);d.preferredDrmSystem===_.Oc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Qa[g];h?(d=g===_.Pc?cast.framework.ContentProtection.WIDEVINE:
29
+ g===_.Oc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},uM(b,h,a,d),vM(b,h,a,d)):c()}else c()}else c()},uM=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Hh({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},vM=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.A(function(h){return 1==h.a?(g=_.Ih(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},xM=function(){this.a=!1;this.h=new _.H(fL);this.f=this.l=null;this.g=new Set;this.A=this.bj.bind(this);this.w=this.Ng.bind(this);this.j=null;this.o=new _.cg;this.m=null},
31
+ zM=function(){return yM||(yM=new xM)},AM=function(){return cast.framework.CastReceiverContext.getInstance()},CM=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=AM();c=(AM().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Re:_.Qe;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=BM(h,_.pa),m=BM(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")},BM=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},DM=function(a){this.f=a;this.a=null;this.g=new _.cg;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]},FM=function(a,b){var c=null,d=EM(a);d&&(c={ad:d});a.f.trigger(new _.I(b,c))},EM=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},GM=function(){},HM=function(){};_.t=jL.prototype;_.t.release=function(){this.ja(_.Om)};_.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.ja(_.Zm)};
35
+ _.t.ja=function(a){if(a!==this.g)if(this.g===_.Zm&&a!==_.Om)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===_.Tm?(this.A=b,this.a.trigger(new _.I(_.tc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.Tm&&this.a.trigger(new _.I(_.sc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Em(this.j,this.g);this.a.trigger(new _.I(_.pe,
36
+ {detail:a}))}};_.B("clpp.cast.CastUtils",function(){});var oL=0,CL={GENERIC:oL,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.v(qL,jL);qL.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)};qL.prototype.destroy=function(){var a=this;return _.A(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.y(b,jL.prototype.destroy.call(a),0)})};qL.prototype.ja=function(a){var b=this.a.m;b&&b.isPlayingBreak||jL.prototype.ja.call(this,a)};
37
+ qL.prototype.C=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.ja(_.Vm);break;case chrome.cast.media.IdleReason.ERROR:this.ja(_.Zm);break;default:this.ja(_.Om)}break;case chrome.cast.media.PlayerState.PLAYING:this.ja(_.bn);break;case chrome.cast.media.PlayerState.PAUSED:this.ja(_.an);break;case chrome.cast.media.PlayerState.BUFFERING:this.ja(_.Tm)}};_.v(rL,_.R);_.t=rL.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=_.fi;break;case chrome.cast.media.TrackType.AUDIO:c=_.Q;break;case chrome.cast.media.TrackType.TEXT:c=_.P}c=new _.di(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 _.li(c.id,c));return c}):[],this.a.trigger(new _.I(_.sq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return tL(this,_.fi)};_.t.getAudioTracks=function(){return tL(this,_.Q)};_.t.fa=function(){return tL(this,_.P)};_.t.ea=function(){var a=this.Ia();return a?a.renditions[0]:null};_.t.Fa=function(){var a=this.ka();return a?a.renditions[0]:null};_.t.Ga=function(){var a=this.la();return a?a.renditions[0]:null};_.t.Ta=function(){return this.f[_.fi]||null};
40
+ _.t.eb=function(){return this.f[_.Q]||null};_.t.fb=function(){return this.f[_.P]||null};_.t.Ia=function(){return uL(this,_.fi)};_.t.ka=function(){return uL(this,_.Q)};_.t.la=function(){return uL(this,_.P)};_.t.$a=function(a){wL(this,_.fi,a)};_.t.ra=function(a){wL(this,_.Q,a)};_.t.Ba=function(a){wL(this,_.P,a)};_.t.Za=function(a){this.$a(a&&a.track)};_.t.lb=function(a){this.ra(a&&a.track)};_.t.mb=function(a){this.Ba(a&&a.track)};_.t.addTextTrack=function(){return _.A(function(a){_.z(a)})};_.t.ha=function(){return!0};
41
+ rL.prototype.isAbrEnabled=rL.prototype.ha;rL.prototype.addTextTrack=rL.prototype.addTextTrack;rL.prototype.setTextRendition=rL.prototype.mb;rL.prototype.setAudioRendition=rL.prototype.lb;rL.prototype.setVideoRendition=rL.prototype.Za;rL.prototype.setTextTrack=rL.prototype.Ba;rL.prototype.setAudioTrack=rL.prototype.ra;rL.prototype.setVideoTrack=rL.prototype.$a;rL.prototype.getTextTrack=rL.prototype.la;rL.prototype.getAudioTrack=rL.prototype.ka;rL.prototype.getVideoTrack=rL.prototype.Ia;
42
+ rL.prototype.getLoadingTextRendition=rL.prototype.fb;rL.prototype.getLoadingAudioRendition=rL.prototype.eb;rL.prototype.getLoadingVideoRendition=rL.prototype.Ta;rL.prototype.getTextRendition=rL.prototype.Ga;rL.prototype.getAudioRendition=rL.prototype.Fa;rL.prototype.getVideoRendition=rL.prototype.ea;rL.prototype.getTextTracks=rL.prototype.fa;rL.prototype.getAudioTracks=rL.prototype.getAudioTracks;rL.prototype.getVideoTracks=rL.prototype.getVideoTracks;_.v(AL,_.Jj);_.t=AL.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.ld=function(a){this.O=a};_.t.bc=function(){return this.w};_.t.ib=function(){return this.A};_.t.se=function(){return this.ia};
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.H(2);break}_.xf(g,3);return _.y(g,e.sendMessage(a,kL(b)),5);case 5:_.yf(g,2);break;case 3:f=_.zf(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(bL),new _.L(1,8,8001,void 0);if(!JL)throw a.j.warn($K),new _.L(1,8,8002,void 0);if(a.ib())throw a.j.warn("Already casting"),new _.L(1,8,8003,void 0);_.xf(d,2);return _.y(d,VL(a),4)}if(2!=d.a)return _.yf(d,0);b=_.zf(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.oe=function(){this.ib()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.hd&&this.D.add(a)};_.t.removeMessageListener=function(a){typeof a===_.hd&&this.D["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?XL(this,!0):new Promise(function(b,c){if(!a.a)return c(ZK);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(ZK);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()===_.Vm};_.t.seek=function(a){var b=this;return this.isEnded()?XL(this,!1,a):new Promise(function(c,d){b.a||d(ZK);b.m.isPlayingBreak&&d(XK);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.I(_.Le));b.a.seek(e,function(){b.trigger(new _.I(_.Ke));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(hL,{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!==_.h?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===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.h?this.h.getState():_.Yl};
50
- _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?bK(this.a.customData.stats):_.Tl()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.A(function(e){if(!b.$b())return b.j.warn(SJ),e["return"]();if(!zK)return b.j.warn(QJ),e["return"]();b.C=_.tm(a);_.$i(a)&&(b.g=_.Zi(b.J,a));c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Ka:b.g,Bb:c.Bb,audioMimeType:c.audioMimeType};return _.w(e,LK(b,d),0)})};
51
- _.t.getBufferInfo=function(){return new _.Oh};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.L=a};_.t.getNetworkEngine=function(){return this.L};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.C[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
- _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.j.warn(RJ)};_.t.onError=function(a){if(a&&(this.trigger(new _.I(_.Zc,{detail:a})),this.h))this.h.onError(a)};_.t.namespace=function(){return _.yc};_.t.canPlay=function(){return this.$b()?2:0};_.t.Za=function(){return this.K};_.t.ic=function(a){this.K=tK(a)};_.t.Yd=function(){this.K=null};_.t.Oe=function(a){var b=this.Za()||{};a={metadataType:uK(b.metadataType),title:a};this.ic(Object.assign({},b,a))};
53
- _.t.Me=function(a){var b=this.Za()||{},c=uK(b.metadataType);a=new chrome.cast.Image(a);this.ic(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.Le=function(a){var b=this.Za()||{};this.ic(Object.assign({},b,{metadataType:3,artist:a}))};_.t.Ne=function(a){var b=this.Za()||{};a={metadataType:uK(b.metadataType),releaseDate:a};this.ic(Object.assign({},b,a))};
54
- _.t.Ci=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;zK=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.wa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Re()};
55
- _.t.Vi=function(a){this.j.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;JK(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.eb()||(this.A=!0,JK(this,a.session),this.ga());break;case cast.framework.SessionState.SESSION_ENDED:if(this.eb()&&this.a){var b=this.a.media,c=this.f.ia(),d=this.f.ja();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
- isLive:this.isLive()},currentTime:this.getPosition(),jg:d,af:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(XJ,this.U);this.A=!1;this.a=null;this.I.release();this.m=this.G=null}};_.t.Mi=function(a){this.j.debug("New media session",a.mediaSession);EK(this,a.mediaSession)};_.t.Gi=function(a,b){if(a===XJ&&0<this.D.size){var c=bK(b);this.D.forEach(function(d){return d(c)})}};_.t.Bg=function(){this.trigger(new _.I(_.we))};
57
- _.t.Gh=function(a){var b=this,c,d;return _.A(function(e){if(1==e.a)return c=null,_.w(e,cK(a,[_.ue,_.Xb],b.L,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Oa++,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};qK.prototype.getTextDisplayer=qK.prototype.getTextDisplayer;qK.prototype.getNetworkEngine=qK.prototype.getNetworkEngine;
58
- qK.prototype.setNetworkEngine=qK.prototype.setNetworkEngine;var zK=!1,pK=new Set;window.__onGCastApiAvailable=nK;_.v(OK,_.Ph);_.t=OK.prototype;_.t.destroy=function(){var a=this;return _.A(function(b){if(1==b.a)return a.a?_.w(b,rK(a.a),3):b.H(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.Xd=function(){return!!this.a&&this.a.$b()&&zK};_.t.eb=function(){return!!this.a&&this.a.eb()};_.t.je=function(){return this.a?this.a.je():""};_.t.dd=function(a){this.a&&this.a.dd(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"]();var g=null,k=b.f.getLoadedSource();if(k){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.ia();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.ja())l.language&&(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=
60
- l.roles[0]);l=k&&typeof k.isLive===_.jc?k.isLive:b.f.isLive();g={source:k,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Ie:b.f.getPresentationStartTime(),Bb:m,audioMimeType:p,Ka:g}}c=g;_.rf(f,2);return _.w(f,b.a.cast(),4);case 4:return b.f&&b.a?_.w(f,PK(b),5):f["return"]();case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.w(f,b.f.load(a),7);if(b.a.a){f.H(7);break}return _.w(f,LK(b.a,c),7);case 7:_.sf(f,0);break;case 2:d=_.tf(f),b.g.error("Error while trying to cast",
61
- d),e=new _.I(_.Zc,{detail:d}),b.trigger(e),_.z(f)}})};_.t.de=function(){this.a&&this.a.de()};_.t.xg=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?_.w(c,rK(b.a),2):c.H(2)}b.a=NK(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.A(function(c){return b.a?_.w(c,b.a.sendMessage(XJ,a),0):(b.g.warn(TJ),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(TJ)};
62
- _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(TJ)};_.t.Za=function(){return this.a&&this.a.Za()};_.t.ic=function(a){this.a&&this.a.ic(a)};_.t.Yd=function(){this.a&&this.a.Yd()};_.t.Oe=function(a){this.a&&this.a.Oe(a)};_.t.Me=function(a){this.a&&this.a.Me(a)};_.t.Le=function(a){this.a&&this.a.Le(a)};_.t.Ne=function(a){this.a&&this.a.Ne(a)};_.B(UJ,OK);OK.prototype.setContentReleaseDate=OK.prototype.Ne;OK.prototype.setContentArtist=OK.prototype.Le;
63
- OK.prototype.setContentImage=OK.prototype.Me;OK.prototype.setContentTitle=OK.prototype.Oe;OK.prototype.clearContentMetadata=OK.prototype.Yd;OK.prototype.setContentMetadata=OK.prototype.ic;OK.prototype.getContentMetadata=OK.prototype.Za;OK.prototype.removeMessageListener=OK.prototype.removeMessageListener;OK.prototype.addMessageListener=OK.prototype.addMessageListener;OK.prototype.sendMessage=OK.prototype.sendMessage;OK.prototype.changeReceiverId=OK.prototype.xg;OK.prototype.forceDisconnect=OK.prototype.de;
64
- OK.prototype.cast=OK.prototype.cast;OK.prototype.setPlayerConfigInterceptor=OK.prototype.dd;OK.prototype.getReceiverName=OK.prototype.je;OK.prototype.isCasting=OK.prototype.eb;OK.prototype.canCast=OK.prototype.Xd;OK.prototype.destroy=OK.prototype.destroy;_.v(QK,$J);_.t=QK.prototype;
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():_.Pm};
50
+ _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?lL(this.a.customData.stats):_.Km()};_.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(bL),e["return"]();if(!JL)return b.j.warn($K),e["return"]();b.C=_.fn(a);_.Sj(a)&&(b.g=_.Rj(b.J,a));c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Oa:b.g,Cb:c.Cb,audioMimeType:c.audioMimeType};return _.y(e,WL(b,d),0)})};
51
+ _.t.getBufferInfo=function(){return new _.Ij};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.L=a};_.t.getNetworkEngine=function(){return this.L};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.C[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
+ _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.j.warn(aL)};_.t.onError=function(a){if(a&&(this.trigger(new _.I(_.fd,{detail:a})),this.h))this.h.onError(a)};_.t.namespace=function(){return _.Fc};_.t.canPlay=function(){return this.bc()?2:0};_.t.cb=function(){return this.K};_.t.jc=function(a){this.K=DL(a)};_.t.he=function(){this.K=null};_.t.We=function(a){var b=this.cb()||{};a={metadataType:EL(b.metadataType),title:a};this.jc(Object.assign({},b,a))};
53
+ _.t.Ue=function(a){var b=this.cb()||{},c=EL(b.metadataType);a=new chrome.cast.Image(a);this.jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.Te=function(a){var b=this.cb()||{};this.jc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.Ve=function(a){var b=this.cb()||{};a={metadataType:EL(b.metadataType),releaseDate:a};this.jc(Object.assign({},b,a))};
54
+ _.t.Ui=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;JL=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ia=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;UL(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.ib()||(this.A=!0,UL(this,a.session),this.da());break;case cast.framework.SessionState.SESSION_ENDED:if(this.ib()&&this.a){var b=this.a.media,c=this.f.ka(),d=this.f.la();c=c&&c.language||void 0;d=d&&d.language||void 0;this.X(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
+ isLive:this.isLive()},currentTime:OL(this),tg:d,kf:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(gL,this.U);this.A=!1;this.a=null;this.I.release();this.m=this.G=null}};_.t.dj=function(a){this.j.debug("New media session",a.mediaSession);TL(this,a.mediaSession)};_.t.Yi=function(a,b){if(a===gL&&0<this.D.size){var c=lL(b);this.D.forEach(function(d){return d(c)})}};_.t.Mg=function(){this.trigger(new _.I(_.De))};
57
+ _.t.Sh=function(a){var b=this,c,d;return _.A(function(e){if(1==e.a)return c=null,_.y(e,mL(a,[_.Be,_.fc],b.L,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};AL.prototype.getTextDisplayer=AL.prototype.getTextDisplayer;AL.prototype.getNetworkEngine=AL.prototype.getNetworkEngine;
58
+ AL.prototype.setNetworkEngine=AL.prototype.setNetworkEngine;var JL=!1,zL=new Set;window.__onGCastApiAvailable=xL;_.v(ZL,_.Jj);_.t=ZL.prototype;_.t.destroy=function(){var a=this;return _.A(function(b){if(1==b.a)return a.a?_.y(b,BL(a.a),3):b.H(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.ee=function(){return!!this.a&&this.a.bc()&&JL};_.t.ib=function(){return!!this.a&&this.a.ib()};_.t.se=function(){return this.a?this.a.se():""};_.t.ld=function(a){this.a&&this.a.ld(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"]();_.xf(f,2);return _.y(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.ka();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.la())l.language&&
60
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.rc?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(),Cb:m,audioMimeType:p,Oa:g}}c=g;return _.y(f,$L(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.H(7);break}return _.y(f,WL(b.a,c),7);case 7:_.yf(f,0);break;case 2:d=_.zf(f),
61
+ b.g.error("Error while trying to cast",d),e=new _.I(_.fd,{detail:d}),b.trigger(e),_.z(f)}})};_.t.oe=function(){this.a&&this.a.oe()};_.t.Ig=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?_.y(c,BL(b.a),2):c.H(2)}b.a=YL(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.A(function(c){return b.a?_.y(c,b.a.sendMessage(gL,a),0):(b.g.warn(cL),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(cL)};
62
+ _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(cL)};_.t.cb=function(){return this.a&&this.a.cb()};_.t.jc=function(a){this.a&&this.a.jc(a)};_.t.he=function(){this.a&&this.a.he()};_.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)};_.B(dL,ZL);ZL.prototype.setContentReleaseDate=ZL.prototype.Ve;ZL.prototype.setContentArtist=ZL.prototype.Te;
63
+ ZL.prototype.setContentImage=ZL.prototype.Ue;ZL.prototype.setContentTitle=ZL.prototype.We;ZL.prototype.clearContentMetadata=ZL.prototype.he;ZL.prototype.setContentMetadata=ZL.prototype.jc;ZL.prototype.getContentMetadata=ZL.prototype.cb;ZL.prototype.removeMessageListener=ZL.prototype.removeMessageListener;ZL.prototype.addMessageListener=ZL.prototype.addMessageListener;ZL.prototype.sendMessage=ZL.prototype.sendMessage;ZL.prototype.changeReceiverId=ZL.prototype.Ig;ZL.prototype.forceDisconnect=ZL.prototype.oe;
64
+ ZL.prototype.cast=ZL.prototype.cast;ZL.prototype.setPlayerConfigInterceptor=ZL.prototype.ld;ZL.prototype.getReceiverName=ZL.prototype.se;ZL.prototype.isCasting=ZL.prototype.ib;ZL.prototype.canCast=ZL.prototype.ee;ZL.prototype.destroy=ZL.prototype.destroy;_.v(aM,jL);_.t=aM.prototype;
65
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.G);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.L);b.addEventListener(a.PLAYER_LOADING,this.D);b.addEventListener(a.ERROR,this.C);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
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.G);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.L);c.removeEventListener(b.PLAYER_LOADING,a.D);c.removeEventListener(b.ERROR,
67
- a.C);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.w(d,$J.prototype.destroy.call(a),0)})};_.t.Fg=function(){this.a.trigger(new _.I(_.Pd));this.ha(_.km)};_.t.Eg=function(){this.ha(_.jm)};_.t.Ii=function(){this.ha(_.dm)};_.t.Bi=function(a){a.isBuffering?this.ha(_.bm):(a=this.a.isPaused()?_.jm:_.km,this.ha(a))};_.t.Hg=function(){this.h=1;this.a.trigger(new _.I(_.Ee))};_.t.Gg=function(){this.a.trigger(new _.I(_.De))};_.t.Yi=function(){this.h=2};_.t.Li=function(){this.ha(_.im)};
68
- _.t.Dg=function(a){var b=this.a.getStats();this.a.trigger(new _.I(_.ic,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.S=function(a){a=new _.K(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.I(_.Zc,{detail:a}));this.ha(_.hm)};_.t=Z.prototype;_.t.ob=function(){return"Google Cast Framework"};_.t.pb=function(){return cast.framework.VERSION};_.t.ub=function(){return 0};_.t.ba=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};_.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};
69
- _.t.bc=function(){return!1};_.t.Hb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.rb=function(){return 0};_.t.qb=function(){return 0};_.t.bb=function(){return 0};_.t.Ra=function(){switch(this.Ib()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Ib=function(){return this.f.position};_.t.Jb=function(){return this.h};_.t.tb=function(){return this.j};
70
- _.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.tb;Z.prototype.getPositionInSequence=Z.prototype.Jb;Z.prototype.getPodTimeOffset=Z.prototype.Ib;Z.prototype.getPodIndex=Z.prototype.getPodIndex;
71
- Z.prototype.getPodType=Z.prototype.Ra;Z.prototype.getMediaBitrate=Z.prototype.bb;Z.prototype.getMediaHeight=Z.prototype.qb;Z.prototype.getMediaWidth=Z.prototype.rb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Hb;Z.prototype.isBumper=Z.prototype.bc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;
72
- Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.ba;Z.prototype.getTechnology=Z.prototype.ub;Z.prototype.getAdManagerVersion=Z.prototype.pb;Z.prototype.getAdManagerName=Z.prototype.ob;RK.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};RK.prototype.Kb=function(){return!!this.a.find(function(a){return 0===a.position})};RK.prototype.cb=function(){return!!this.a.find(function(a){return-1===a.position})};RK.prototype.hasPostroll=RK.prototype.cb;RK.prototype.hasPreroll=RK.prototype.Kb;RK.prototype.getCuePoints=RK.prototype.getCuePoints;_.t=TK.prototype;_.t.load=function(){var a=this;return _.A(function(b){UK&&(UK=!1,ZK(a,0));_.z(b)})};_.t.start=function(){return _.A(function(a){SK().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&SK().play()};_.t.pause=function(){-1!==this.getPosition()&&SK().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===_.h?a:-1};_.t.dispose=function(){var a=this;return _.A(function(b){SK().removeEventListener(a.f,a.g);_.z(b)})};
74
- _.t.Ig=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=SK().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.I(_.Nb,{adsTimeline:new RK(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:YK(this,_.Db,a);break;case cast.framework.events.EventType.BREAK_STARTED:YK(this,_.wb,a);break;case cast.framework.events.EventType.BREAK_ENDED:YK(this,_.xb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:YK(this,
75
- _.Jb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(YK(this,_.Ib,a),YK(this,_.Kb,a)):a.endedReason===b.STOPPED?YK(this,_.Kb,a):a.endedReason===b.END_OF_STREAM?(YK(this,_.Ab,a),YK(this,_.Kb,a)):a.endedReason===b.ERROR&&ZK(this,1);break;case cast.framework.events.EventType.PLAYING:YK(this,_.Hb,a);break;case cast.framework.events.EventType.PAUSE:YK(this,_.Fb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?YK(this,_.yb,a):YK(this,_.Hb,a)}};
76
- TK.prototype.getPosition=TK.prototype.getPosition;TK.prototype.setVolume=TK.prototype.setVolume;TK.prototype.getVolume=TK.prototype.getVolume;TK.prototype.skip=TK.prototype.skip;TK.prototype.pause=TK.prototype.pause;TK.prototype.resume=TK.prototype.resume;var UK=!1;$K.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(aL(),this.a)};$K.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(aL(),this.a)};$K.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return bL(a)})};
77
- $K.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=_.ig;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.kg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.lg}b&&this.Qb(new _.I(b,{detail:bL(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Qb(new _.I(_.ig,{detail:b.value}))};_.v(cL,_.Q);_.t=cL.prototype;_.t.initialize=function(a){this.l=a;dL().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;dL().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ea=function(){return this.j};_.t.fa=function(){return null};
78
- _.t.za=function(){var a=this.ia();return a&&a.renditions[0]};_.t.Ba=function(){var a=this.ja();return a&&a.renditions[0]};_.t.Qa=function(){return null};_.t.$a=function(){return null};_.t.ab=function(){return null};_.t.Ca=function(){return null};_.t.ia=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.h&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
79
- _.t.ja=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.h&&(b=b.toString(),a=this.ea().find(function(c){return c.id===b})||null)}return a};_.t.Xa=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.na=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.ua=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.Wa=function(){this.g.warn("Video renditions unavailable on Cast")};_.t.ib=function(a){this.na(a&&a.track)};
80
- _.t.jb=function(a){this.ua(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(),_.w(f,cK(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]),fL(b)}catch(g){throw b.g.warn("failed on track",
82
- a),g;}}_.z(f)})};_.t.ka=function(){return!0};_.t.cj=function(){this.f=dL().getAudioTracksManager();var a=this.f.getTracks();this.h=eL(_.P,a);fL(this);a=this.l.getConfiguration();gL(this,_.P,a.preferredAudioLanguage,a.preferredAudioRole);gL(this,_.N,a.preferredTextLanguage,a.preferredTextRole)};cL.prototype.isAbrEnabled=cL.prototype.ka;cL.prototype.addTextTrack=cL.prototype.addTextTrack;cL.prototype.setTextRendition=cL.prototype.jb;cL.prototype.setAudioRendition=cL.prototype.ib;
83
- cL.prototype.setVideoRendition=cL.prototype.Wa;cL.prototype.setTextTrack=cL.prototype.ua;cL.prototype.setAudioTrack=cL.prototype.na;cL.prototype.setVideoTrack=cL.prototype.Xa;cL.prototype.getTextTrack=cL.prototype.ja;cL.prototype.getAudioTrack=cL.prototype.ia;cL.prototype.getVideoTrack=cL.prototype.Ca;cL.prototype.getLoadingTextRendition=cL.prototype.ab;cL.prototype.getLoadingAudioRendition=cL.prototype.$a;cL.prototype.getLoadingVideoRendition=cL.prototype.Qa;cL.prototype.getTextRendition=cL.prototype.Ba;
84
- cL.prototype.getAudioRendition=cL.prototype.za;cL.prototype.getVideoRendition=cL.prototype.fa;cL.prototype.getTextTracks=cL.prototype.ea;cL.prototype.getAudioTracks=cL.prototype.getAudioTracks;cL.prototype.getVideoTracks=cL.prototype.getVideoTracks;_.v(hL,_.Ph);_.t=hL.prototype;_.t.init=function(a,b){var c=this;this.A=a;b&&(this.g=this.o=b);var d=iL();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Ni.bind(this));d.setMediaPlaybackInfoHandler(this.ug.bind(this));this.a=new QK(this);this.a.init();this.h=new cL;this.h.initialize(this);this.m=new $K(function(e){return c.trigger(e)});this.m.init()};
85
- _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=iL();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.A=null,a.o=_.Xi(),a.g=a.o,a.j=-1,a.w=null,a.a?_.w(b,a.a.destroy(),3):b.H(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.z(b)})};
86
- _.t.play=function(){var a=iL();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=iL();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return iL().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
- _.t.isEnded=function(){return iL().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=iL();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(NJ);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return iL().getCurrentTimeSec()};_.t.getDuration=function(){var a=iL().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return iL().getPlaybackRate()};
88
- _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;iL().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=iL().getMediaInformation();if(a){var b=iL().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,Tj:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
- _.t.getPresentationStartTime=function(){return iL().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=iL().getLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.Yl};
91
- _.t.getStats=function(){var a=_.Tl();if(this.f){a=iL().getStats();this.f.m=a.estimatedBandwidth||NaN;this.f.A=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.j=a.width||NaN;b.f=c;b=this.f;c=typeof a.decodedFrames===_.h?a.decodedFrames:NaN;b.h=typeof a.droppedFrames===_.h?a.droppedFrames:NaN;b.g=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 _.Sl;b.a.j=b.f.a;b.w=_.tm(a);_.$i(a)&&(b.g=_.Zi(b.o,a));if(b.B)return b.B=!1,e["return"]();c=b.w[b.j];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.h&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:aK(b.g),local:!0};return _.w(e,iL().load(d),0)})};_.t.getBufferInfo=function(){this.C.warn(_.na);return new _.Oh};
93
- _.t.getTrackManager=function(){return this.h};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.A};_.t.setNetworkEngine=function(a){this.D=a};_.t.getNetworkEngine=function(){return this.D};_.t.getSourceIndex=function(){return this.j};_.t.setSourceIndex=function(a){this.j=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return VJ};_.t.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.t.resetAbr=function(){this.C.warn(RJ)};
94
- _.t.onError=function(a){this.trigger(new _.I(_.Zc,{detail:a}))};_.t.canPlay=function(){return _.vi()?2:0};
95
- _.t.Ni=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=aK(this.getStats());var b=cast.framework.messages.StreamType,c=a.media,d=!!c,e=d&&c.streamType===b.LIVE,f=d&&!c.metadata,g=!!a.liveSeekableRange;if(d&&g&&(!e||e&&f)){d=iL().getStartAbsoluteTime();if(typeof d===_.h){c.startAbsoluteTime=d;var k;f?k=new cast.framework.messages.GenericMediaMetadata:k=c.metadata;k.sectionStartAbsoluteTime=d;c.metadata=k}c.streamType=b.LIVE}return a};
96
- _.t.ug=function(a,b){var c=null;a.media.customData&&(c=bK(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.h?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;lL(c,b);return b};_.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};hL.prototype.getTextDisplayer=hL.prototype.getTextDisplayer;hL.prototype.getNetworkEngine=hL.prototype.getNetworkEngine;
97
- hL.prototype.setNetworkEngine=hL.prototype.setNetworkEngine;_.t=mL.prototype;_.t.init=function(a){var b=this;a&&(this.f=new hL,_.xn(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.A(function(c){return b.l&&b.l.getState()!==_.Xl?_.w(c,ZJ(b.l),0):c.H(0)})}))};
98
- _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=pL(),b=pL().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[XJ]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.fi.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!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.ei.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(XJ,this.w)}};
100
- _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=pL();pL().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(XJ,this.w);a.stop();this.l=this.f=null}};_.t.dd=function(a){this.j=a};_.t.oj=function(a){this.m=a};_.t.on=function(a,b){pL().addEventListener(a,b)};_.t.off=function(a,b){pL().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.ad&&this.g.add(a)};
101
- _.t.removeMessageListener=function(a){typeof a===_.ad&&this.g["delete"](a)};_.t.sendMessage=function(a,b){pL().sendCustomMessage(XJ,b,aK(a))};_.t.$b=function(){return this.a};_.t.Za=function(){var a=pL().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
- _.t.fi=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return rL(this,a);try{var b=(new DOMParser).parseFromString(a,_.ve)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=pL();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ha),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Ie||g===_.ac){g=e[f].getAttribute(_.sd);for(var k=e[f].getElementsByTagName(_.eb),l=
103
- k.length-1;0<=l;--l){var m=k[l].getAttribute(_.sd)||g,n=k[l].getAttribute(_.Dc),p=k[l].getAttribute(_.Xe)||void 0,q=k[l].getAttribute(_.bd)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(k[l])}e[f].getElementsByTagName(_.eb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ha).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.lb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=pL();c=a.getElementsByTagName("StreamIndex");
104
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Ie){e=c[d].getElementsByTagName(_.cb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Pa)||void 0,k=e[f].getAttribute(_.Na)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Ke,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.cb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
- _.t.ei=function(a){var b=this,c,d,e,f,g,k;return _.A(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=bK(c.media.customData.playerConfiguration));if(!b.l||!d){l.H(2);break}if(!b.j){l.H(3);break}return _.w(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.H(5);break}return _.w(l,WK(c.media,d.ima,b.l.getNetworkEngine()),5);case 5:typeof d.startTime===_.h&&d.startTime!==c.currentTime&&(c.currentTime=d.startTime);if(c.media.customData.local){l.H(7);break}b.f.B=!0;return _.w(l,
106
- _.Bn(b.l,d),8);case 8:return _.w(l,_.Cn(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Bb&&(c.media.hlsVideoSegmentFormat=dK(f.Bb,_.Bg)),f.audioMimeType&&(c.media.hlsSegmentFormat=dK(f.audioMimeType,_.P));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.h){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.H(10);break}return _.w(l,
107
- Promise.resolve(b.m(c)),11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.t.Ki=function(a){!this.l||a.media.customData&&a.media.customData.local||_.En(this.l)};_.t.Cg=function(a){if(0<this.g.size){var b=bK(a.data);this.g.forEach(function(c){return c(b)})}};_.B(WJ,mL);mL.prototype.getContentMetadata=mL.prototype.Za;mL.prototype.isApiReady=mL.prototype.$b;mL.prototype.sendMessage=mL.prototype.sendMessage;mL.prototype.removeMessageListener=mL.prototype.removeMessageListener;
108
- mL.prototype.addMessageListener=mL.prototype.addMessageListener;mL.prototype.off=mL.prototype.off;mL.prototype.on=mL.prototype.on;mL.prototype.setLoadRequestDataInterceptor=mL.prototype.oj;mL.prototype.setPlayerConfigInterceptor=mL.prototype.dd;mL.prototype.stop=mL.prototype.stop;mL.prototype.start=mL.prototype.start;mL.prototype.init=mL.prototype.init;mL.getInstance=oL;var nL=null;_.t=sL.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.$i.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()};
109
- _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(YJ,{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===_.h&&(a=b));return a};_.t.dispose=function(){var a=this;return _.A(function(b){a.g.release();_.z(b)})};
110
- _.t.$i=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.I(_.Nb,{adsTimeline:new RK(a.breaks)})));break;case "isPlayingBreak":a.value?uL(this,_.wb):(uL(this,_.Ab),uL(this,_.Kb),uL(this,_.xb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(uL(this,_.Ab),uL(this,_.Kb)),uL(this,_.Jb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?uL(this,_.Fb):uL(this,_.Hb))}};sL.prototype.getPosition=sL.prototype.getPosition;
111
- sL.prototype.setVolume=sL.prototype.setVolume;sL.prototype.getVolume=sL.prototype.getVolume;sL.prototype.skip=sL.prototype.skip;sL.prototype.pause=sL.prototype.pause;sL.prototype.resume=sL.prototype.resume;vL.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};vL.prototype.W=function(a,b){return a.namespace()!==_.yc?!1:!(!b||!b.ima)};vL.prototype.create=function(a){return new sL(a.a)};vL.prototype.create=vL.prototype.create;vL.prototype.isSupported=vL.prototype.W;vL.prototype.name=vL.prototype.name;_.Hm(new vL);wL.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};wL.prototype.W=function(a,b){return oL().$b()?!(!b||!b.ima):!1};wL.prototype.create=function(a){return new TK(a)};wL.prototype.create=wL.prototype.create;wL.prototype.isSupported=wL.prototype.W;wL.prototype.name=wL.prototype.name;_.Hm(new wL);};
67
+ a.C);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.y(d,jL.prototype.destroy.call(a),0)})};_.t.Qg=function(){this.a.trigger(new _.I(_.Wd));this.ja(_.bn)};_.t.Pg=function(){this.ja(_.an)};_.t.$i=function(){this.ja(_.Vm)};_.t.Ti=function(a){a.isBuffering?this.ja(_.Tm):(a=this.a.isPaused()?_.an:_.bn,this.ja(a))};_.t.Sg=function(){this.h=1;this.a.trigger(new _.I(_.Le))};_.t.Rg=function(){this.a.trigger(new _.I(_.Ke))};_.t.pj=function(){this.h=2};_.t.cj=function(){this.ja(_.$m)};
68
+ _.t.Og=function(a){var b=this.a.getStats();this.a.trigger(new _.I(_.qc,{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(_.fd,{detail:a}));this.ja(_.Zm)};_.t=Z.prototype;_.t.sb=function(){return"Google Cast Framework"};_.t.tb=function(){return cast.framework.VERSION};_.t.yb=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.Ib=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.vb=function(){return 0};_.t.ub=function(){return 0};_.t.gb=function(){return 0};_.t.Ua=function(){switch(this.Jb()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Jb=function(){return this.f.position};_.t.Kb=function(){return this.h};
70
+ _.t.xb=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.xb;Z.prototype.getPositionInSequence=Z.prototype.Kb;Z.prototype.getPodTimeOffset=Z.prototype.Jb;
71
+ Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ua;Z.prototype.getMediaBitrate=Z.prototype.gb;Z.prototype.getMediaHeight=Z.prototype.ub;Z.prototype.getMediaWidth=Z.prototype.vb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Ib;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.yb;Z.prototype.getAdManagerVersion=Z.prototype.tb;Z.prototype.getAdManagerName=Z.prototype.sb;bM.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};bM.prototype.Lb=function(){return!!this.a.find(function(a){return 0===a.position})};bM.prototype.hb=function(){return!!this.a.find(function(a){return-1===a.position})};bM.prototype.hasPostroll=bM.prototype.hb;bM.prototype.hasPreroll=bM.prototype.Lb;bM.prototype.getCuePoints=bM.prototype.getCuePoints;_.t=dM.prototype;_.t.load=function(){var a=this;return _.A(function(b){eM&&(eM=!1,jM(a,0));_.z(b)})};_.t.start=function(){return _.A(function(a){cM().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&cM().play()};_.t.pause=function(){-1!==this.getPosition()&&cM().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){cM().removeEventListener(a.f,a.g);_.z(b)})};
74
+ _.t.Tg=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=cM().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.I(_.Wb,{adsTimeline:new bM(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:iM(this,_.Mb,a);break;case cast.framework.events.EventType.BREAK_STARTED:iM(this,_.Fb,a);break;case cast.framework.events.EventType.BREAK_ENDED:iM(this,_.Gb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:iM(this,
75
+ _.Sb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(iM(this,_.Rb,a),iM(this,_.Tb,a)):a.endedReason===b.STOPPED?iM(this,_.Tb,a):a.endedReason===b.END_OF_STREAM?(iM(this,_.Jb,a),iM(this,_.Tb,a)):a.endedReason===b.ERROR&&jM(this,1);break;case cast.framework.events.EventType.PLAYING:iM(this,_.Qb,a);break;case cast.framework.events.EventType.PAUSE:iM(this,_.Ob,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?iM(this,_.Hb,a):iM(this,_.Qb,a)}};
76
+ dM.prototype.getPosition=dM.prototype.getPosition;dM.prototype.setVolume=dM.prototype.setVolume;dM.prototype.getVolume=dM.prototype.getVolume;dM.prototype.skip=dM.prototype.skip;dM.prototype.pause=dM.prototype.pause;dM.prototype.resume=dM.prototype.resume;var eM=!1;kM.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(lM(),this.a)};kM.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(lM(),this.a)};kM.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return mM(a)})};
77
+ kM.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=_.ng;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.pg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.qg}b&&this.Sb(new _.I(b,{detail:mM(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Sb(new _.I(_.ng,{detail:b.value}))};_.v(nM,_.R);_.t=nM.prototype;_.t.initialize=function(a){this.l=a;oM().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;oM().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.fa=function(){return this.j};_.t.ea=function(){return null};
78
+ _.t.Fa=function(){var a=this.ka();return a&&a.renditions[0]};_.t.Ga=function(){var a=this.la();return a&&a.renditions[0]};_.t.Ta=function(){return null};_.t.eb=function(){return null};_.t.fb=function(){return null};_.t.Ia=function(){return null};_.t.ka=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.la=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.fa().find(function(c){return c.id===b})||null)}return a};_.t.$a=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.ra=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ba=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.Za=function(){this.g.warn("Video renditions unavailable on Cast")};_.t.lb=function(a){this.ra(a&&a.track)};
80
+ _.t.mb=function(a){this.Ba(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(),_.y(f,mL(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]),qM(b)}catch(g){throw b.g.warn("failed on track",
82
+ a),g;}}_.z(f)})};_.t.ha=function(){return!0};_.t.vj=function(){this.f=oM().getAudioTracksManager();var a=this.f.getTracks();this.h=pM(_.Q,a);qM(this);a=this.l.getConfiguration();rM(this,_.Q,a.preferredAudioLanguage,a.preferredAudioRole);rM(this,_.P,a.preferredTextLanguage,a.preferredTextRole)};nM.prototype.isAbrEnabled=nM.prototype.ha;nM.prototype.addTextTrack=nM.prototype.addTextTrack;nM.prototype.setTextRendition=nM.prototype.mb;nM.prototype.setAudioRendition=nM.prototype.lb;
83
+ nM.prototype.setVideoRendition=nM.prototype.Za;nM.prototype.setTextTrack=nM.prototype.Ba;nM.prototype.setAudioTrack=nM.prototype.ra;nM.prototype.setVideoTrack=nM.prototype.$a;nM.prototype.getTextTrack=nM.prototype.la;nM.prototype.getAudioTrack=nM.prototype.ka;nM.prototype.getVideoTrack=nM.prototype.Ia;nM.prototype.getLoadingTextRendition=nM.prototype.fb;nM.prototype.getLoadingAudioRendition=nM.prototype.eb;nM.prototype.getLoadingVideoRendition=nM.prototype.Ta;nM.prototype.getTextRendition=nM.prototype.Ga;
84
+ nM.prototype.getAudioRendition=nM.prototype.Fa;nM.prototype.getVideoRendition=nM.prototype.ea;nM.prototype.getTextTracks=nM.prototype.fa;nM.prototype.getAudioTracks=nM.prototype.getAudioTracks;nM.prototype.getVideoTracks=nM.prototype.getVideoTracks;_.v(sM,_.Jj);_.t=sM.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.o=b);var d=tM();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ej.bind(this));d.setMediaPlaybackInfoHandler(this.Dg.bind(this));this.a=new aM(this);this.a.init();this.h=new nM;this.h.initialize(this);this.m=new kM(function(e){return c.trigger(e)});this.m.init()};
85
+ _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=tM();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=_.Pj(),a.g=a.o,a.j=-1,a.w=null,a.a?_.y(b,a.a.destroy(),3):b.H(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.z(b)})};
86
+ _.t.play=function(){var a=tM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=tM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return tM().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
+ _.t.isEnded=function(){return tM().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=tM();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(XK);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return tM().getCurrentTimeSec()};_.t.getDuration=function(){var a=tM().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return tM().getPlaybackRate()};
88
+ _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;tM().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=tM().getMediaInformation();if(a){var b=tM().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,lk:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
+ _.t.getPresentationStartTime=function(){return tM().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=tM().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():_.Pm};
91
+ _.t.getStats=function(){var a=_.Km();if(this.f){a=tM().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 _.Jm;b.a.j=b.f.a;b.w=_.fn(a);_.Sj(a)&&(b.g=_.Rj(b.o,a));if(b.C)return b.C=!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:kL(b.g),local:!0};return _.y(e,tM().load(d),0)})};_.t.getBufferInfo=function(){this.A.warn(_.sa);return new _.Ij};
93
+ _.t.getTrackManager=function(){return this.h};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.D=a};_.t.getNetworkEngine=function(){return this.D};_.t.getSourceIndex=function(){return this.j};_.t.setSourceIndex=function(a){this.j=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return eL};_.t.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.t.resetAbr=function(){this.A.warn(aL)};
94
+ _.t.onError=function(a){this.trigger(new _.I(_.fd,{detail:a}))};_.t.canPlay=function(){return _.Si()?2:0};
95
+ _.t.ej=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=kL(this.getStats());var b=tM(),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=tM().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.Dg=function(a,b){var c=null;a.media.customData&&(c=lL(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;wM(c,b);return b};
97
+ _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};sM.prototype.getTextDisplayer=sM.prototype.getTextDisplayer;sM.prototype.getNetworkEngine=sM.prototype.getNetworkEngine;sM.prototype.setNetworkEngine=sM.prototype.setNetworkEngine;_.t=xM.prototype;_.t.init=function(a){var b=this;a&&(this.f=new sM,_.mo(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.A(function(c){return b.l&&b.l.getState()!==_.Om?_.y(c,iL(b.l),0):c.H(0)})}))};
98
+ _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=AM(),b=AM().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[gL]=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(gL,this.w)}};
100
+ _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=AM();AM().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(gL,this.w);a.stop();this.l=this.f=null}};_.t.ld=function(a){this.j=a};_.t.Ij=function(a){this.m=a};_.t.on=function(a,b){AM().addEventListener(a,b)};_.t.off=function(a,b){AM().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.hd&&this.g.add(a)};
101
+ _.t.removeMessageListener=function(a){typeof a===_.hd&&this.g["delete"](a)};_.t.sendMessage=function(a,b){AM().sendCustomMessage(gL,b,kL(a))};_.t.bc=function(){return this.a};_.t.cb=function(){var a=AM().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
+ _.t.zi=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return CM(this,a);try{var b=(new DOMParser).parseFromString(a,_.Ce)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=AM();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ja),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Pe||g===_.ic){g=e[f].getAttribute(_.Ad);for(var h=e[f].getElementsByTagName(_.kb),l=
103
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Ad)||g,n=h[l].getAttribute(_.Kc),p=h[l].getAttribute(_.df)||void 0,q=h[l].getAttribute(_.id)||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(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.tb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=AM();c=a.getElementsByTagName("StreamIndex");
104
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Pe){e=c[d].getElementsByTagName(_.hb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ua)||void 0,h=e[f].getAttribute(_.Ta)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Re,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=lL(c.media.customData.playerConfiguration));if(!b.l||!d){l.H(2);break}if(!b.j){l.H(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.H(5);break}return _.y(l,gM(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.H(7);
106
+ break}b.f.C=!0;return _.y(l,_.qo(b.l,d),8);case 8:return _.y(l,_.ro(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Cb&&(c.media.hlsVideoSegmentFormat=nL(f.Cb,_.fi)),f.audioMimeType&&(c.media.hlsSegmentFormat=nL(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.H(10);
107
+ break}return _.y(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=_.J.ri;var b=AM().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))}_.to(this.l)}};
108
+ _.t.Ng=function(a){if(0<this.g.size){var b=lL(a.data);this.g.forEach(function(c){return c(b)})}};_.B(fL,xM);xM.prototype.getContentMetadata=xM.prototype.cb;xM.prototype.isApiReady=xM.prototype.bc;xM.prototype.sendMessage=xM.prototype.sendMessage;xM.prototype.removeMessageListener=xM.prototype.removeMessageListener;xM.prototype.addMessageListener=xM.prototype.addMessageListener;xM.prototype.off=xM.prototype.off;xM.prototype.on=xM.prototype.on;xM.prototype.setLoadRequestDataInterceptor=xM.prototype.Ij;
109
+ xM.prototype.setPlayerConfigInterceptor=xM.prototype.ld;xM.prototype.stop=xM.prototype.stop;xM.prototype.start=xM.prototype.start;xM.prototype.init=xM.prototype.init;xM.getInstance=zM;var yM=null;_.t=DM.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(hL,{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(_.Wb,{adsTimeline:new bM(a.breaks)})));break;case "isPlayingBreak":a.value?FM(this,_.Fb):(FM(this,_.Jb),FM(this,_.Tb),FM(this,_.Gb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(FM(this,_.Jb),FM(this,_.Tb)),FM(this,_.Sb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?FM(this,_.Ob):FM(this,_.Qb))}};DM.prototype.getPosition=DM.prototype.getPosition;
112
+ DM.prototype.setVolume=DM.prototype.setVolume;DM.prototype.getVolume=DM.prototype.getVolume;DM.prototype.skip=DM.prototype.skip;DM.prototype.pause=DM.prototype.pause;DM.prototype.resume=DM.prototype.resume;GM.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};GM.prototype.aa=function(a,b){return a.namespace()!==_.Fc?!1:!(!b||!b.ima)};GM.prototype.create=function(a){return new DM(a.a)};GM.prototype.create=GM.prototype.create;GM.prototype.isSupported=GM.prototype.aa;GM.prototype.name=GM.prototype.name;_.un(new GM);HM.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};HM.prototype.aa=function(a,b){return zM().bc()?!(!b||!b.ima):!1};HM.prototype.create=function(a){return new dM(a)};HM.prototype.create=HM.prototype.create;HM.prototype.isSupported=HM.prototype.aa;HM.prototype.name=HM.prototype.name;_.un(new HM);};
112
113
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
113
114
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
114
115
  else{_=this.clpp._;(f.call(g,this));}