@castlabs/prestoplay 6.15.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +114 -114
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +546 -544
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -74
  10. package/cjs/cl.externs.js +57 -55
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +368 -289
  17. package/cjs/cl.muxdata.js +15 -15
  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.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -72
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +71 -71
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +20 -20
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +5 -5
  34. package/cl.cast.js +89 -89
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +452 -452
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +69 -69
  39. package/cl.externs.js +57 -55
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -71
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +17 -17
  45. package/cl.mse.js +318 -255
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +11 -11
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +13 -13
  51. package/cl.smooth.js +59 -59
  52. package/cl.thumbnails.js +19 -19
  53. package/cl.tizen.js +57 -57
  54. package/cl.ttml.js +22 -22
  55. package/cl.verimatrix.js +4 -4
  56. package/cl.vimond.js +8 -8
  57. package/cl.vr.js +15 -15
  58. package/cl.vtt.js +12 -12
  59. package/cl.youbora.js +15 -15
  60. package/package.json +1 -1
  61. package/typings.d.ts +46 -0
package/cjs/cl.cast.js CHANGED
@@ -1,118 +1,118 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var OR="Cannot seek during ads playout.",PR="Cannot switch track",QR="Media session does not exist.",RR="No receivers available",SR="Reset ABR functionality not available on cast.",TR="SDK not yet ready",UR="Sender is destroyed.",VR="clpp.cast.CastProxy",WR="clpp.cast.Player",YR="clpp.cast.Receiver",ZR="urn:x-cast:castlabs",$R="urn:x-cast:com.google.cast.media",aS=function(a){return _.E(function(b){return 1==b.a?_.x(b,a.vc(_.af),2):_.x(b,a.vc(_.$e),0)})},bS=function(a,b){this.log=new _.K(b);this.player=
3
- a;this.j=null;this.f=_.jp;this.l=_.kp;this.h=2;this.B=Date.now();this.A=-1},cS=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Xe?"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}})},dS=function(a){if(typeof a!==_.hg)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}},eS=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.E(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=_.Ik(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Jj(a.url);return _.x(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.lj(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)})},fS=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 _.Hg:return d.FMP4;case _.Gg:return b===_.jk?d.MPEG2_TS:c.TS;case _.cd:return c.AAC;case _.dd:return c.AC3;case _.ed:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.fd:return c.FMP4}},hS=function(a){a=
6
- void 0===a?gS:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(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}},iS=function(a){bS.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.Hb.bind(this)},jS=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},kS=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},mS=function(a,b){var c=kS(a);return lS(a,b).find(function(d){return c.includes(d.id)})||null},lS=function(a,b){return a.h.filter(function(c){return c.type===b})},oS=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.ta();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;nS(a,b)},function(f){a.f[b]=null;a.g.debug(PR,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){nS(a,b)},function(f){a.g.debug(PR,f)}))},nS=function(a,b){b===_.ik?a.a.trigger(new _.L(_.Nl)):b===_.T&&a.a.trigger(new _.L(_.Ol))},sS=function(a,b,c,d){_.Ul.call(this);this.g=new _.K(_.Fd);this.ba=a;this.o=new _.Vk(b);this.$=c;this.fa=d;this.h=this.J=
9
- _.$l();this.D=[];this.B=0;this.L=new _.ck;this.H=this.l=this.a=null;this.A=this.w=!1;this.ia="";this.Ka=1E6;this.f=new jS;this.f.initialize(this);this.j=new iS(this);this.I=new _.Sh;this.K=null;this.G=new Set;this.T=this.El.bind(this);this.Ca=this.Xl.bind(this);this.ea=this.Ol.bind(this);this.V=this.Il.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(){pS(!0)},0)}});qS(this);rS.add(this)},
10
- tS=function(a){var b,c;return _.E(function(d){if(1==d.a)return rS["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.Ca)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.$=null;a.fa=null;_.y(d)})},yS=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(uS);c=_.t(c);for(var d=c.next();!d.done;d=c.next()){d=_.t(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=hS(uS[b]);return Object.assign(b,a)},DS=function(a){var b=void 0===b?gS:b;return Object.values(uS).includes(a)?a:b},IS=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},qS=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.ba.length){a.w=!0;a.o.dg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ba;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.Ca);JS&&a.o.da(.02)}},KS=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
- null;a=null===a?null:a+b;return null===a?b:a},MS=function(a,b){LS(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ea);b.addMessageListener(ZR,a.V)},LS=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Qi.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Ke)))},NS=function(a){return _.E(function(b){return a.rb()?
14
- b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},OS=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v,z,B,I,F;return _.E(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.Xu,_.x(D,NS(a),2);case 2:if(!b)return D["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Lb;m=h.audioMimeType;g.hlsVideoSegmentFormat=fS(l,d.VIDEO);
15
- g.hlsSegmentFormat=fS(m,d.AUDIO);if(!b.Xa){D.F(3);break}if(!a.N){D.F(4);break}return _.x(D,Promise.resolve(a.N(b.Xa)),5);case 5:if(n=D.f)b.Xa=n;case 4:a.h=b.Xa;a.D=_.Bp(a.h);a.B=a.D.findIndex(function(G){return G.url===b.source.url});if(!b.Xa.remoteTextTracks){D.F(6);break}return _.x(D,Promise.all(b.Xa.remoteTextTracks.map(a.Wj.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(G){return G}),b.Xa.remoteTextTracks=void 0;case 6:delete b.Xa.autoplay,b.Xa.startTime=null,g.customData={playerConfiguration:cS(b.Xa)};
16
- case 3:q=a.lb()||{};u=DS(q.metadataType);typeof b.Rf===_.k&&(v={metadataType:u,sectionStartAbsoluteTime:b.Rf});b.source.name&&(z={metadataType:u,title:b.source.name});B=IS(q);if(I=yS(Object.assign({},v,z,B)))g.metadata=I;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.kd&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(D,f.loadMedia(F),0)}})},PS=function(a,b,c){c=void 0===c?0:c;var d,e;return _.E(function(f){(d=a.f.ta())&&d.language&&(a.h.preferredTextLanguage=
17
- d.language);(e=a.f.la())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,OS(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Rf:a.getPresentationStartTime(),autoplay:b,Xa:a.h}),0)})},pS=function(a){if(a){a=_.t(rS);for(var b=a.next();!b.done;b=a.next())qS(b.value)}},RS=function(a,b,c){_.Ul.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ue?c:function(e,f){d.f&&e!==_.qp&&e!==_.jp&&d.f.load(f)};this.a=QS(this);this.g=new _.K(VR);this.f&&this.forwardEventsTo(this.f)},
18
- QS=function(a){return new sS(a.h,function(){a.trigger(new _.L(_.rd))},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.rg&&(d.preferredAudioLanguage=c.rg);c.fi&&(d.preferredTextLanguage=c.fi);_.Hq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return SS(a)})},SS=function(a){var b;return _.E(function(c){if(1==c.a)return a.trigger(new _.L(_.qd)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.Hq(a.f,a.a);_.y(c)})},TS=function(a){bS.call(this,a,"clpp.cast.StateManager");this.I=this.Ui.bind(this);this.H=this.Ti.bind(this);this.w=this.Kl.bind(this);this.o=this.Dl.bind(this);this.K=this.Wi.bind(this);this.J=this.Vi.bind(this);this.L=this.$l.bind(this);this.G=this.Nl.bind(this);this.D=this.U.bind(this);this.a=this.Si.bind(this)},US=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.h=
20
- typeof e===_.k?e:0},VS=function(a){this.a=a},XS=function(a){this.m=a;this.a=null;this.h=this.Xi.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
- WS().addEventListener(this.f,this.h)},$S=function(a,b,c){var d,e,f,g,h,l,m;return _.E(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.A(n,2);YS=!1;e=_.Jj(d);return _.x(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.aa(f.data),h=new DOMParser,l=h.parseFromString(g,_.og),l.getElementsByTagName("vmap:VMAP").length)_.J("VMAP detected."),a.vmapAdsRequest=ZS(g);else if(l.getElementsByTagName("VAST").length){_.J("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=ZS(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.J("Unsupported schema."),YS=!0;return _.oh(n,0)}m=_.C(n);_.J("Failed to fetch an ad",m);YS=!0;_.y(n)})},ZS=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},WS=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},bT=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=aT(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},cT=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},aT=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.hg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.hg&&(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 US(d,e,b.index,b.total,f)}return c},dT=function(a){this.dc=a;this.a=this.f.bind(this)},eT=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]},fT=function(a){var b=a.dashTimedMetadata,c=_.zg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.yg)?
25
- _.bi:_.$h,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},gT=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.tm.bind(this);this.a=this.f=null},hT=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},jT=function(a){a.a=hT().getTextTracksManager();var b=a.a.getTracks();a.j=iT(_.T,b)},kT=function(a,b,c,d){c=_.gi(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.ik?f=a.getAudioTracks():b===_.T&&(f=a.ha());if(c=c.find(function(h){var l=_.dj(h);return f.some(function(m){m=_.dj(m.language||"");return _.ej(l,m)})})){var g=_.dj(c);c=f.filter(function(h){h=_.dj(h.language||"");return _.ej(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.Ae(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===_.ik?a.xa(e):b===_.T&&a.Ja(e))},iT=function(a,b){for(var c=[],d=_.t(b),
27
- e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.gk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=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 _.pk(f.id,f));c.push(f)}return c},lT=function(){_.Ul.call(this);this.g=new _.K(WR);this.h=this.w=_.$l();this.A=null;
28
- this.l=-1;this.G=new _.ck;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},mT=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},pT=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=_.xm(d);if(e){var f=[_.Rd];_.Bp(a)[0].type!==_.$c&&f.unshift(_.Td);d.preferredDrmSystem===_.Rd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.Za[g];h?(d=g===_.Td?cast.framework.ContentProtection.WIDEVINE:g===_.Rd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},nT(b,h,a,d),oT(b,h,a,d)):c()}else c()}else c()},nT=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Jj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
30
- d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},oT=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.E(function(h){return 1==h.a?(g=_.Kj(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.lj(g.data))})}:a.licenseHandler=void 0},qT=function(){this.a=!1;this.g=new _.K(YR);this.f=this.m=null;this.h=new Set;this.A=this.Ml.bind(this);
31
- this.w=this.Ri.bind(this);this.j=null;this.o=new _.Sh;this.l=null},sT=function(){return rT||(rT=new qT)},tT=function(){return cast.framework.CastReceiverContext.getInstance()},vT=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=tT();c=(tT().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Hg:_.Gg;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=
32
- uT(h,_.sa),m=uT(h,_.Sb),n=_.t([]),p=n.next().value;n=n.next().value;m&&(m=_.t(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")},uT=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},wT=function(a){this.f=a;this.a=null;this.h=new _.Sh;this.j=
33
- [cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},yT=function(a,b){var c=null,d=xT(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},xT=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})||
34
- null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position: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 US(d,c,e,f,g)}return b},zT=function(){},AT=function(){};_.r=bS.prototype;_.r.release=function(){this.sa(_.jp)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};
35
- _.r.onError=function(a){a.severity===_.Q&&this.sa(_.up)};
36
- _.r.sa=function(a){if(a!==this.f)if(this.f===_.up&&a!==_.jp)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.op?(this.A=b,this.player.trigger(new _.L(_.md,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.op&&this.player.trigger(new _.L(_.ld,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.$o(this.j,this.f);this.player.trigger(new _.L(_.eg,
37
- {detail:a}))}};_.H("clpp.cast.CastUtils",function(){});var gS=0,uS={GENERIC:gS,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(iS,bS);iS.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};iS.prototype.destroy=function(){var a=this;return _.E(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,bS.prototype.destroy.call(a),0)})};iS.prototype.sa=function(a){var b=this.player.l;b&&b.isPlayingBreak||bS.prototype.sa.call(this,a)};
38
- iS.prototype.Hb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.sa(_.qp);break;case chrome.cast.media.IdleReason.ERROR:this.sa(_.up);break;default:this.sa(_.jp)}break;case chrome.cast.media.PlayerState.PLAYING:this.sa(_.xp);break;case chrome.cast.media.PlayerState.PAUSED:this.sa(_.wp);break;case chrome.cast.media.PlayerState.BUFFERING:this.sa(_.op)}};_.w(jS,_.U);_.r=jS.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
39
- _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.jk;break;case chrome.cast.media.TrackType.AUDIO:c=_.ik;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.gk(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);
40
- c.renditions.push(new _.pk(c.id,c));return c}):[],this.a.trigger(new _.L(_.Zu)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return lS(this,_.jk)};_.r.getAudioTracks=function(){return lS(this,_.ik)};_.r.ha=function(){return lS(this,_.T)};_.r.ma=function(){var a=this.Ha();return a?a.renditions[0]:null};_.r.Oa=function(){var a=this.la();return a?a.renditions[0]:null};_.r.Ga=function(){var a=this.ta();return a?a.renditions[0]:null};_.r.cb=function(){return this.f[_.jk]||null};
41
- _.r.mb=function(){return this.f[_.ik]||null};_.r.nb=function(){return this.f[_.T]||null};_.r.Ha=function(){return mS(this,_.jk)};_.r.la=function(){return mS(this,_.ik)};_.r.ta=function(){return mS(this,_.T)};_.r.jb=function(a){oS(this,_.jk,a)};_.r.xa=function(a){oS(this,_.ik,a)};_.r.Ja=function(a){oS(this,_.T,a)};_.r.Ya=function(a){this.jb(a&&a.track)};_.r.hb=function(a){this.xa(a&&a.track)};_.r.ib=function(a){this.Ja(a&&a.track)};_.r.addTextTrack=function(){return _.E(function(a){_.y(a)})};
42
- _.r.pa=function(){return!0};jS.prototype.isAbrEnabled=jS.prototype.pa;jS.prototype.addTextTrack=jS.prototype.addTextTrack;jS.prototype.setTextRendition=jS.prototype.ib;jS.prototype.setAudioRendition=jS.prototype.hb;jS.prototype.setVideoRendition=jS.prototype.Ya;jS.prototype.setTextTrack=jS.prototype.Ja;jS.prototype.setAudioTrack=jS.prototype.xa;jS.prototype.setVideoTrack=jS.prototype.jb;jS.prototype.getTextTrack=jS.prototype.ta;jS.prototype.getAudioTrack=jS.prototype.la;
43
- jS.prototype.getVideoTrack=jS.prototype.Ha;jS.prototype.getLoadingTextRendition=jS.prototype.nb;jS.prototype.getLoadingAudioRendition=jS.prototype.mb;jS.prototype.getLoadingVideoRendition=jS.prototype.cb;jS.prototype.getTextRendition=jS.prototype.Ga;jS.prototype.getAudioRendition=jS.prototype.Oa;jS.prototype.getVideoRendition=jS.prototype.ma;jS.prototype.getTextTracks=jS.prototype.ha;jS.prototype.getAudioTracks=jS.prototype.getAudioTracks;jS.prototype.getVideoTracks=jS.prototype.getVideoTracks;_.w(sS,_.Ul);_.r=sS.prototype;_.r.init=function(a,b){this.h=this.J=b};_.r.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)})};_.r.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.Gb)};_.r.appendLoad=function(){return Promise.reject(_.Gb)};_.r.seekWith=function(){return Promise.reject(_.Gb)};
44
- _.r.destroy=function(){return _.E(function(a){_.y(a)})};_.r.Yd=function(a){this.N=a};_.r.pc=function(){return this.w};_.r.rb=function(){return this.A};_.r.xf=function(){return this.ia};
45
- _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.E(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.A(g,3);return _.x(g,e.sendMessage(a,cS(b)),5);case 5:_.oh(g,2);break;case 3:f=_.C(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
46
- _.r.cast=function(){var a=this,b,c;return _.E(function(d){if(1==d.a){if(!a.pc())throw a.g.warn(TR),new _.P(1,8,8001,void 0);if(!JS)throw a.g.warn(RR),new _.P(1,8,8002,void 0);if(a.rb())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.A(d,2);return _.x(d,NS(a),4)}if(2!=d.a)return _.oh(d,0);b=_.C(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.P(1,8,8E3,c);})};_.r.tf=function(){this.rb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.r.addMessageListener=function(a){typeof a===_.ue&&this.G.add(a)};_.r.removeMessageListener=function(a){typeof a===_.ue&&this.G["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?PS(this,!0):new Promise(function(b,c){if(!a.a)return c(QR);a.a.play(null,b,c)})};_.r.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(QR);a.a.pause(null,b,c)})};_.r.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.r.isEnded=function(){return this.getState()===_.qp};_.r.seek=function(a){var b=this;return this.isEnded()?PS(this,!1,a):new Promise(function(c,d){b.a||d(QR);b.l.isPlayingBreak&&d(OR);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Bg));b.a.seek(e,function(){b.trigger(new _.L(_.Ag));c()},d)})};_.r.getPosition=function(){return this.getMediaPosition()};_.r.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.r.getDuration=function(){return this.getMediaDuration()};
49
- _.r.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage($R,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
- _.r.getVolume=function(){return this.a&&this.a.volume.level};_.r.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.a&&this.a.volume.muted};_.r.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
- _.r.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};_.r.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};_.r.getState=function(){return this.j?this.j.getState():_.kp};
52
- _.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?dS(this.a.customData.stats):_.fp()};_.r.isLive=function(){return Infinity===this.getDuration()};_.r.load=function(a){var b=this,c,d;return _.E(function(e){if(!b.pc())return b.g.warn(TR),e["return"]();if(!JS)return b.g.warn(RR),e["return"]();b.D=_.Bp(a);b.h=_.bm(b.J,a);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,Xa:b.h,Lb:c.Lb,audioMimeType:c.audioMimeType};return _.x(e,OS(b,d),0)})};
53
- _.r.getBufferInfo=function(){return new _.Tl};_.r.getTrackManager=function(){return this.f};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.L=a};_.r.getNetworkEngine=function(){return this.L};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};
54
- _.r.getTimelineCues=function(){return[]};_.r.resetAbr=function(){this.g.warn(SR)};_.r.onError=function(a){if(a&&(this.trigger(new _.L(_.re,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.Fd};_.r.canPlay=function(){return this.pc()?2:0};_.r.lb=function(){return this.K};_.r.wc=function(a){this.K=yS(a)};_.r.jf=function(){this.K=null};_.r.Yf=function(a){var b=this.lb()||{};a={metadataType:DS(b.metadataType),title:a};this.wc(Object.assign({},b,a))};
55
- _.r.Wf=function(a){var b=this.lb()||{},c=DS(b.metadataType);a=new chrome.cast.Image(a);this.wc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Vf=function(a){var b=this.lb()||{};this.wc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Xf=function(a){var b=this.lb()||{};a={metadataType:DS(b.metadataType),releaseDate:a};this.wc(Object.assign({},b,a))};
56
- _.r.El=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;JS=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ia=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.dg()};
57
- _.r.Xl=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;MS(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.rb()||(this.A=!0,MS(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.rb()&&this.a){var b=this.a.media,c=this.f.la(),d=this.f.ta();c=c&&c.language||void 0;d=d&&d.language||void 0;this.$(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:KS(this),fi:d,rg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ea);a.session.removeMessageListener(ZR,this.V);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.r.Ol=function(a){this.g.debug("New media session",a.mediaSession);LS(this,a.mediaSession)};_.r.Il=function(a,b){if(a===ZR&&0<this.G.size){var c=dS(b);this.G.forEach(function(d){return d(c)})}};_.r.Qi=function(){this.trigger(new _.L(_.rg))};
59
- _.r.Wj=function(a){var b=this,c,d;return _.E(function(e){if(1==e.a)return c=null,_.x(e,eS(a,[_.ng,_.Zc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ka++,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)})};_.r.getTextDisplayer=function(){return null};sS.prototype.getTextDisplayer=sS.prototype.getTextDisplayer;sS.prototype.getNetworkEngine=sS.prototype.getNetworkEngine;
60
- sS.prototype.setNetworkEngine=sS.prototype.setNetworkEngine;var JS=!1,rS=new Set;window.__onGCastApiAvailable=pS;_.w(RS,_.Ul);_.r=RS.prototype;_.r.destroy=function(){var a=this;return _.E(function(b){if(1==b.a)return a.a?_.x(b,tS(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.y(b)})};_.r.ff=function(){return!!this.a&&this.a.pc()&&JS};_.r.rb=function(){return!!this.a&&this.a.rb()};_.r.xf=function(){return this.a?this.a.xf():""};_.r.Yd=function(a){this.a&&this.a.Yd(a)};
61
- _.r.cast=function(a){var b=this,c,d,e;return _.E(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.A(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.la();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.ta())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.kd?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Rf:b.f.getPresentationStartTime(),Lb:m,audioMimeType:p,Xa:g}}c=g;return _.x(f,SS(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.x(f,OS(b.a,c),7);case 7:_.oh(f,0);break;case 2:d=_.C(f),
63
- b.g.error("Error while trying to cast",d),e=new _.L(_.re,{detail:d}),b.trigger(e),_.y(f)}})};_.r.tf=function(){this.a&&this.a.tf()};_.r.Mi=function(a){var b=this;return _.E(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,tS(b.a),2):c.F(2)}b.a=QS(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.E(function(c){return b.a?_.x(c,b.a.sendMessage(ZR,a),0):(b.g.warn(UR),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(UR)};
64
- _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(UR)};_.r.lb=function(){return this.a&&this.a.lb()};_.r.wc=function(a){this.a&&this.a.wc(a)};_.r.jf=function(){this.a&&this.a.jf()};_.r.Yf=function(a){this.a&&this.a.Yf(a)};_.r.Wf=function(a){this.a&&this.a.Wf(a)};_.r.Vf=function(a){this.a&&this.a.Vf(a)};_.r.Xf=function(a){this.a&&this.a.Xf(a)};_.H(VR,RS);RS.prototype.setContentReleaseDate=RS.prototype.Xf;RS.prototype.setContentArtist=RS.prototype.Vf;
65
- RS.prototype.setContentImage=RS.prototype.Wf;RS.prototype.setContentTitle=RS.prototype.Yf;RS.prototype.clearContentMetadata=RS.prototype.jf;RS.prototype.setContentMetadata=RS.prototype.wc;RS.prototype.getContentMetadata=RS.prototype.lb;RS.prototype.removeMessageListener=RS.prototype.removeMessageListener;RS.prototype.addMessageListener=RS.prototype.addMessageListener;RS.prototype.sendMessage=RS.prototype.sendMessage;RS.prototype.changeReceiverId=RS.prototype.Mi;RS.prototype.forceDisconnect=RS.prototype.tf;
66
- RS.prototype.cast=RS.prototype.cast;RS.prototype.setPlayerConfigInterceptor=RS.prototype.Yd;RS.prototype.getReceiverName=RS.prototype.xf;RS.prototype.isCasting=RS.prototype.rb;RS.prototype.canCast=RS.prototype.ff;RS.prototype.destroy=RS.prototype.destroy;_.w(TS,bS);_.r=TS.prototype;
67
- _.r.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.L);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
- _.r.destroy=function(){var a=this,b,c;return _.E(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.L);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,bS.prototype.destroy.call(a),0)})};_.r.Ui=function(){this.player.trigger(new _.L(_.lf));this.sa(_.xp)};_.r.Ti=function(){this.sa(_.wp)};_.r.Kl=function(){this.sa(_.qp)};_.r.Dl=function(a){a.isBuffering?this.sa(_.op):(a=this.player.isPaused()?_.wp:_.xp,this.sa(a))};_.r.Wi=function(){this.h=1;this.player.trigger(new _.L(_.Bg))};_.r.Vi=function(){this.player.trigger(new _.L(_.Ag))};_.r.$l=function(){this.h=2};_.r.Nl=function(){this.sa(_.vp)};
70
- _.r.Si=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.jd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.U=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.re,{detail:a}));this.sa(_.up)};_.r=US.prototype;_.r.yb=function(){return"Google Cast Framework"};_.r.zb=function(){return cast.framework.VERSION};_.r.Fb=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};
71
- _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.rc=function(){return!1};_.r.Sb=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.Cb=function(){return 0};_.r.Bb=function(){return 0};_.r.ob=function(){return 0};_.r.eb=function(){switch(this.Tb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.h};_.r.Tb=function(){return this.f.position};_.r.Ub=function(){return this.j};
72
- _.r.Eb=function(){return this.l};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};US.prototype.getWrapperCreativeIds=US.prototype.getWrapperCreativeIds;US.prototype.getWrapperAdSystems=US.prototype.getWrapperAdSystems;US.prototype.getWrapperAdIds=US.prototype.getWrapperAdIds;US.prototype.getSequenceLength=US.prototype.Eb;US.prototype.getPositionInSequence=US.prototype.Ub;US.prototype.getPodTimeOffset=US.prototype.Tb;
73
- US.prototype.getPodIndex=US.prototype.getPodIndex;US.prototype.getPodType=US.prototype.eb;US.prototype.getMediaBitrate=US.prototype.ob;US.prototype.getMediaHeight=US.prototype.Bb;US.prototype.getMediaWidth=US.prototype.Cb;US.prototype.getMediaUrl=US.prototype.getMediaUrl;US.prototype.getClickThroughUrl=US.prototype.Sb;US.prototype.isBumper=US.prototype.rc;US.prototype.getSkipTimeOffset=US.prototype.getSkipTimeOffset;US.prototype.getDuration=US.prototype.getDuration;US.prototype.getTitle=US.prototype.getTitle;
74
- US.prototype.getAdvertiserName=US.prototype.getAdvertiserName;US.prototype.getAdSystem=US.prototype.getAdSystem;US.prototype.getApiFramework=US.prototype.getApiFramework;US.prototype.getCreativeId=US.prototype.getCreativeId;US.prototype.getId=US.prototype.getId;US.prototype.getTechnology=US.prototype.Fb;US.prototype.getAdManagerVersion=US.prototype.zb;US.prototype.getAdManagerName=US.prototype.yb;VS.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};VS.prototype.Wb=function(){return!!this.a.find(function(a){return 0===a.position})};VS.prototype.qb=function(){return!!this.a.find(function(a){return-1===a.position})};VS.prototype.hasPostroll=VS.prototype.qb;VS.prototype.hasPreroll=VS.prototype.Wb;VS.prototype.getCuePoints=VS.prototype.getCuePoints;_.r=XS.prototype;_.r.load=function(){var a=this;return _.E(function(b){YS&&(YS=!1,cT(a,0));_.y(b)})};_.r.start=function(){return _.E(function(a){WS().play();_.y(a)})};_.r.resume=function(){-1!==this.getPosition()&&WS().play()};_.r.pause=function(){-1!==this.getPosition()&&WS().pause()};_.r.skip=function(){};_.r.getVolume=function(){return this.m.getVolume()||0};_.r.setVolume=function(a){this.m.setVolume(a)};
75
- _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.dispose=function(){var a=this;return _.E(function(b){WS().removeEventListener(a.f,a.h);_.y(b)})};
76
- _.r.Xi=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=WS().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Oc,{adsTimeline:new VS(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:bT(this,_.Ec,a);break;case cast.framework.events.EventType.BREAK_STARTED:bT(this,_.xc,a);break;case cast.framework.events.EventType.BREAK_ENDED:bT(this,_.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:bT(this,
77
- _.Kc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(bT(this,_.Jc,a),bT(this,_.Lc,a)):a.endedReason===b.STOPPED?bT(this,_.Lc,a):a.endedReason===b.END_OF_STREAM?(bT(this,_.Bc,a),bT(this,_.Lc,a)):a.endedReason===b.ERROR&&cT(this,1);break;case cast.framework.events.EventType.PLAYING:bT(this,_.Ic,a);break;case cast.framework.events.EventType.PAUSE:bT(this,_.Gc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?bT(this,_.zc,a):bT(this,_.Ic,a)}};
78
- XS.prototype.getPosition=XS.prototype.getPosition;XS.prototype.setVolume=XS.prototype.setVolume;XS.prototype.getVolume=XS.prototype.getVolume;XS.prototype.skip=XS.prototype.skip;XS.prototype.pause=XS.prototype.pause;XS.prototype.resume=XS.prototype.resume;var YS=!1;dT.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(eT(),this.a)};dT.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(eT(),this.a)};dT.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return fT(a)})};
79
- dT.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=_.ci;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.ei;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.fi}b&&this.dc(new _.L(b,{detail:fT(a.timedMetadataInfo)}))}else for(a=_.t(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.dc(new _.L(_.ci,{detail:b.value}))};_.w(gT,_.U);_.r=gT.prototype;_.r.initialize=function(a){this.m=a;hT().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;hT().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.ha=function(){return this.j};_.r.ma=function(){return null};
80
- _.r.Oa=function(){var a=this.la();return a&&a.renditions[0]};_.r.Ga=function(){var a=this.ta();return a&&a.renditions[0]};_.r.cb=function(){return null};_.r.mb=function(){return null};_.r.nb=function(){return null};_.r.Ha=function(){return null};_.r.la=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};
81
- _.r.ta=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ha().find(function(c){return c.id===b})||null)}return a};_.r.jb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.xa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.Ja=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Ya=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.hb=function(a){this.xa(a&&a.track)};
82
- _.r.ib=function(a){this.Ja(a&&a.track)};
83
- _.r.addTextTrack=function(a){var b=this,c,d,e;return _.E(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,eS(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.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]),jT(b)}catch(g){throw b.g.warn("failed on track",
84
- a),g;}}_.y(f)})};_.r.pa=function(){return!0};_.r.tm=function(){this.f=hT().getAudioTracksManager();var a=this.f.getTracks();this.h=iT(_.ik,a);jT(this);a=this.m.getConfiguration();kT(this,_.ik,a.preferredAudioLanguage,a.preferredAudioRole);kT(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};gT.prototype.isAbrEnabled=gT.prototype.pa;gT.prototype.addTextTrack=gT.prototype.addTextTrack;gT.prototype.setTextRendition=gT.prototype.ib;gT.prototype.setAudioRendition=gT.prototype.hb;
85
- gT.prototype.setVideoRendition=gT.prototype.Ya;gT.prototype.setTextTrack=gT.prototype.Ja;gT.prototype.setAudioTrack=gT.prototype.xa;gT.prototype.setVideoTrack=gT.prototype.jb;gT.prototype.getTextTrack=gT.prototype.ta;gT.prototype.getAudioTrack=gT.prototype.la;gT.prototype.getVideoTrack=gT.prototype.Ha;gT.prototype.getLoadingTextRendition=gT.prototype.nb;gT.prototype.getLoadingAudioRendition=gT.prototype.mb;gT.prototype.getLoadingVideoRendition=gT.prototype.cb;gT.prototype.getTextRendition=gT.prototype.Ga;
86
- gT.prototype.getAudioRendition=gT.prototype.Oa;gT.prototype.getVideoRendition=gT.prototype.ma;gT.prototype.getTextTracks=gT.prototype.ha;gT.prototype.getAudioTracks=gT.prototype.getAudioTracks;gT.prototype.getVideoTracks=gT.prototype.getVideoTracks;_.w(lT,_.Ul);_.r=lT.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=mT();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Pl.bind(this));d.setMediaPlaybackInfoHandler(this.Bi.bind(this));this.a=new TS(this);this.a.init();this.j=new gT;this.j.initialize(this);this.o=new dT(function(e){return c.trigger(e)});this.o.init()};
87
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=mT();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.E(function(b){if(1==b.a)return a.B=null,a.w=_.$l(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
88
- _.r.play=function(){var a=mT();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=mT();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return mT().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
- _.r.isEnded=function(){return mT().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=mT();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(OR);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};_.r.getMediaPosition=function(){return mT().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};
90
- _.r.getMediaDuration=function(){var a=mT().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return mT().getPlaybackRate()};_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;mT().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.r.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
91
- _.r.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.r.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
92
- _.r.getLoadedSource=function(){var a=mT().getMediaInformation();if(a){var b=mT().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Cn:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return mT().getStartAbsoluteTime()};
93
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=mT().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():_.kp};
94
- _.r.getStats=function(){var a=_.fp();if(this.f){a=mT().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
95
- _.r.load=function(a){var b=this,c,d;return _.E(function(e){b.f=new _.ep;b.a.j=b.f.a;b.A=_.Bp(a);b.h=_.bm(b.w,a);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:cS(b.h),local:!0};return _.x(e,mT().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.ua);return new _.Tl};
96
- _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.Gb)};_.r.appendLoad=function(){return Promise.reject(_.Gb)};_.r.seekWith=function(){return Promise.reject(_.Gb)};_.r.setNetworkEngine=function(a){this.G=a};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
97
- _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return WR};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.resetAbr=function(){this.g.warn(SR)};_.r.onError=function(a){this.trigger(new _.L(_.re,{detail:a}))};_.r.canPlay=function(){return _.al()?2:0};
98
- _.r.Pl=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=cS(this.getStats());var b=mT(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.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&&
99
- (!e||e&&f)){d=mT().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};_.r.Bi=function(a,b){var c=null;a.media.customData&&(c=dS(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;pT(c,b);return b};
100
- _.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};lT.prototype.getTextDisplayer=lT.prototype.getTextDisplayer;lT.prototype.getNetworkEngine=lT.prototype.getNetworkEngine;lT.prototype.setNetworkEngine=lT.prototype.setNetworkEngine;_.r=qT.prototype;_.r.init=function(a){var b=this;a&&(this.f=new lT,_.Hq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.E(function(c){return b.m&&b.m.getState()!==_.jp?_.x(c,aS(b.m),0):c.F(0)})}))};
101
- _.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=tT(),b=tT().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[ZR]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.hl.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.fl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(ZR,this.w)}};
103
- _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=tT();tT().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(ZR,this.w);a.stop();this.m=this.f=null}};_.r.Yd=function(a){this.j=a};_.r.Im=function(a){this.l=a};_.r.on=function(a,b){tT().addEventListener(a,b)};_.r.off=function(a,b){tT().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.h.add(a)};
104
- _.r.removeMessageListener=function(a){typeof a===_.ue&&this.h["delete"](a)};_.r.sendMessage=function(a,b){tT().sendCustomMessage(ZR,b,cS(a))};_.r.pc=function(){return this.a};_.r.lb=function(){var a=tT().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
- _.r.hl=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return vT(this,a);try{var b=(new DOMParser).parseFromString(a,_.og)}catch(u){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=tT();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===_.Fg||g===_.bd){g=e[f].getAttribute(_.Re);for(var h=e[f].getElementsByTagName(_.Tb),l=
106
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Re)||g,n=h[l].getAttribute(_.Md),p=h[l].getAttribute(_.Ug)||void 0,q=h[l].getAttribute(_.ve)||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(_.Tb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.cc)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=tT();c=a.getElementsByTagName("StreamIndex");
107
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Fg){e=c[d].getElementsByTagName(_.Rb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.yb)||void 0,h=e[f].getAttribute(_.xb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Hg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Rb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
- _.r.fl=function(a){var b=this,c,d,e,f,g,h;return _.E(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=dS(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.x(l,$S(c.media,d.ima,b.m.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.F(7);
109
- break}b.f.D=!0;return _.x(l,_.Rq(b.m,d),8);case 8:return _.x(l,_.Sq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Lb&&(c.media.hlsVideoSegmentFormat=fS(f.Lb,_.jk)),f.audioMimeType&&(c.media.hlsSegmentFormat=fS(f.audioMimeType,_.ik));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.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
110
- break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.Ml=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.O.Xk;var b=tT().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.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.m.seek(b))}_.Oq(this.m)}};
111
- _.r.Ri=function(a){if(0<this.h.size){var b=dS(a.data);this.h.forEach(function(c){return c(b)})}};_.H(YR,qT);qT.prototype.getContentMetadata=qT.prototype.lb;qT.prototype.isApiReady=qT.prototype.pc;qT.prototype.sendMessage=qT.prototype.sendMessage;qT.prototype.removeMessageListener=qT.prototype.removeMessageListener;qT.prototype.addMessageListener=qT.prototype.addMessageListener;qT.prototype.off=qT.prototype.off;qT.prototype.on=qT.prototype.on;qT.prototype.setLoadRequestDataInterceptor=qT.prototype.Im;
112
- qT.prototype.setPlayerConfigInterceptor=qT.prototype.Yd;qT.prototype.stop=qT.prototype.stop;qT.prototype.start=qT.prototype.start;qT.prototype.init=qT.prototype.init;qT.getInstance=sT;var rT=null;_.r=wT.prototype;_.r.load=function(){var a=this,b,c,d,e,f;return _.E(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.bm.bind(a),d=_.t(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.y(g)})};_.r.start=function(){return _.E(function(a){_.y(a)})};_.r.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.r.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
- _.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage($R,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.r.getVolume=function(){return this.f.getVolume()||0};_.r.setVolume=function(a){this.f.setVolume(a)};_.r.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.dispose=function(){var a=this;return _.E(function(b){a.h.release();_.y(b)})};
114
- _.r.bm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Oc,{adsTimeline:new VS(a.breaks)})));break;case "isPlayingBreak":a.value?yT(this,_.xc):(yT(this,_.Bc),yT(this,_.Lc),yT(this,_.yc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(yT(this,_.Bc),yT(this,_.Lc)),yT(this,_.Kc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?yT(this,_.Gc):yT(this,_.Ic))}};wT.prototype.getPosition=wT.prototype.getPosition;
115
- wT.prototype.setVolume=wT.prototype.setVolume;wT.prototype.getVolume=wT.prototype.getVolume;wT.prototype.skip=wT.prototype.skip;wT.prototype.pause=wT.prototype.pause;wT.prototype.resume=wT.prototype.resume;zT.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};zT.prototype.isSupported=function(a,b){return a.namespace()!==_.Fd?!1:!(!b||!b.ima)};zT.prototype.create=function(a){return new wT(a.a)};zT.prototype.create=zT.prototype.create;zT.prototype.isSupported=zT.prototype.isSupported;zT.prototype.name=zT.prototype.name;_.Rp(new zT);AT.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};AT.prototype.isSupported=function(a,b){return sT().pc()?!(!b||!b.ima):!1};AT.prototype.create=function(a){return new XS(a)};AT.prototype.create=AT.prototype.create;AT.prototype.isSupported=AT.prototype.isSupported;AT.prototype.name=AT.prototype.name;_.Rp(new AT);};
2
+ var f=function(window){var HV="Cannot seek during ads playout.",IV="Cannot switch track",JV="Media session does not exist.",KV="No receivers available",LV="Reset ABR functionality not available on cast.",MV="SDK not yet ready",NV="Sender is destroyed.",OV="clpp.cast.CastProxy",PV="clpp.cast.Player",QV="clpp.cast.Receiver",RV="urn:x-cast:castlabs",SV="urn:x-cast:com.google.cast.media",TV=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.Hc(_.bf),2):_.y(b,a.Hc(_.af),0)})},UV=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.np;this.l=_.op;this.h=2;this.C=Date.now();this.A=-1},VV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ve){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ye?"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}})},WV=function(a){if(typeof a!==_.kg)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}},XV=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(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=_.Kk(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Lj(a.url);return _.y(q,c.fetch(l).N,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.nj(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)})},YV=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 _.Gg:return d.FMP4;case _.Fg:return b===_.jk?d.MPEG2_TS:c.TS;case _.cd:return c.AAC;case _.dd:return c.AC3;case _.fd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.gd:return c.FMP4}},$V=function(a){a=
6
+ void 0===a?ZV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(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}},aW=function(a){UV.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.tb.bind(this)},bW=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},cW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},eW=function(a,b){var c=cW(a);return dW(a,b).find(function(d){return c.includes(d.id)})||null},dW=function(a,b){return a.h.filter(function(c){return c.type===b})},gW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.Ea();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;fW(a,b)},function(f){a.f[b]=null;a.g.debug(IV,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){fW(a,b)},function(f){a.g.debug(IV,f)}))},fW=function(a,b){b===_.ik?a.a.trigger(new _.L(_.Rl)):b===_.T&&a.a.trigger(new _.L(_.Sl))},kW=function(a,b,c,d){_.Yl.call(this);this.g=new _.K(_.Fd);this.ca=a;this.o=new _.Zk(b);this.ba=c;this.ja=d;this.h=this.J=
9
+ _.dm();this.D=[];this.C=0;this.M=new _.ck;this.H=this.l=this.a=null;this.A=this.w=!1;this.na="";this.Wa=1E6;this.f=new bW;this.f.initialize(this);this.j=new aW(this);this.I=new _.Uh;this.L=null;this.G=new Set;this.T=this.lm.bind(this);this.Pa=this.Bm.bind(this);this.ia=this.tm.bind(this);this.W=this.pm.bind(this);this.P=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){hW(!0)},0)}});iW(this);jW.add(this)},
10
+ lW=function(a){var b,c;return _.I(function(d){if(1==d.a)return jW["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.Pa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.ba=null;a.ja=null;_.C(d)})},qW=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(mW);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=$V(mW[b]);return Object.assign(b,a)},vW=function(a){var b=void 0===b?ZV:b;return Object.values(mW).includes(a)?a:b},AW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},iW=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ca.length){a.w=!0;a.o.yg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ca;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.Pa);BW&&a.o.fa(.02)}},CW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
+ null;a=null===a?null:a+b;return null===a?b:a},EW=function(a,b){DW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ia);b.addMessageListener(RV,a.W)},DW=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.uj.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Ke)))},FW=function(a){return _.I(function(b){return a.Gb()?
14
+ b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},GW=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,B,F,G;return _.I(function(A){switch(A.a){case 1:return c=chrome.cast.media.StreamType,d=_.Mu,_.y(A,FW(a),2);case 2:if(!b)return A["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.Wb;m=h.audioMimeType;g.hlsVideoSegmentFormat=YV(l,d.VIDEO);
15
+ g.hlsSegmentFormat=YV(m,d.AUDIO);if(!b.kb){A.F(3);break}if(!a.P){A.F(4);break}return _.y(A,Promise.resolve(a.P(b.kb)),5);case 5:if(n=A.f)b.kb=n;case 4:a.h=b.kb;a.D=_.Fp(a.h);a.C=a.D.findIndex(function(H){return H.url===b.source.url});if(!b.kb.remoteTextTracks){A.F(6);break}return _.y(A,Promise.all(b.kb.remoteTextTracks.map(a.Fk.bind(a))),7);case 7:p=A.f,g.tracks=p.filter(function(H){return H}),b.kb.remoteTextTracks=void 0;case 6:delete b.kb.autoplay,b.kb.startTime=null,g.customData={playerConfiguration:VV(b.kb)};
16
+ case 3:q=a.Ab()||{};t=vW(q.metadataType);typeof b.lg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.lg});b.source.name&&(z={metadataType:t,title:b.source.name});B=AW(q);if(F=qW(Object.assign({},v,z,B)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.ld&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(A,f.loadMedia(G),0)}})},HW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.Ea())&&d.language&&(a.h.preferredTextLanguage=
17
+ d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,GW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),lg:a.getPresentationStartTime(),autoplay:b,kb:a.h}),0)})},hW=function(a){if(a){a=_.w(jW);for(var b=a.next();!b.done;b=a.next())iW(b.value)}},JW=function(a,b,c){_.Yl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ve?c:function(e,f){d.f&&e!==_.up&&e!==_.np&&d.f.load(f)};this.a=IW(this);this.g=new _.K(OV);this.f&&this.forwardEventsTo(this.f)},
18
+ IW=function(a){return new kW(a.h,function(){a.trigger(new _.L(_.sd))},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.Ng&&(d.preferredAudioLanguage=c.Ng);c.Li&&(d.preferredTextLanguage=c.Li);_.Lq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return KW(a)})},KW=function(a){var b;return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.rd)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Lq(a.f,a.a);_.C(c)})},LW=function(a){UV.call(this,a,"clpp.cast.StateManager");this.I=this.yj.bind(this);this.H=this.xj.bind(this);this.w=this.qm.bind(this);this.o=this.km.bind(this);this.L=this.Aj.bind(this);this.J=this.zj.bind(this);this.M=this.Em.bind(this);this.G=this.sm.bind(this);this.D=this.V.bind(this);this.a=this.wj.bind(this)},MW=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.h=
20
+ typeof e===_.k?e:0},NW=function(a){this.a=a},PW=function(a){this.m=a;this.a=null;this.h=this.Bj.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
+ OW().addEventListener(this.f,this.h)},SW=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);QW=!1;e=_.Lj(d);return _.y(n,c.fetch(e).N,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.ea(f.data),h=new DOMParser,l=h.parseFromString(g,_.rg),l.getElementsByTagName("vmap:VMAP").length)_.Fh("VMAP detected."),a.vmapAdsRequest=RW(g);else if(l.getElementsByTagName("VAST").length){_.Fh("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=RW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Fh("Unsupported schema."),QW=!0;return _.qh(n,0)}m=_.E(n);_.Fh("Failed to fetch an ad",m);QW=!0;_.C(n)})},RW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},OW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},UW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=TW(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},VW=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},TW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.kg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.kg&&(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 MW(d,e,b.index,b.total,f)}return c},WW=function(a){this.nc=a;this.a=this.f.bind(this)},XW=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]},YW=function(a){var b=a.dashTimedMetadata,c=_.zg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.yg)?
25
+ _.di:_.bi,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},ZW=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Wm.bind(this);this.a=this.f=null},$W=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},bX=function(a){a.a=$W().getTextTracksManager();var b=a.a.getTracks();a.j=aX(_.T,b)},cX=function(a,b,c,d){c=_.ji(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.ik?f=a.getAudioTracks():b===_.T&&(f=a.ma());if(c=c.find(function(h){var l=_.fj(h);return f.some(function(m){m=_.fj(m.language||"");return _.gj(l,m)})})){var g=_.fj(c);c=f.filter(function(h){h=_.fj(h.language||"");return _.gj(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Ue(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===_.ik?a.Ia(e):b===_.T&&a.Va(e))},aX=function(a,b){for(var c=[],d=_.w(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.gk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=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 _.rk(f.id,f));c.push(f)}return c},dX=function(){_.Yl.call(this);this.g=new _.K(PV);this.h=this.w=_.dm();this.A=null;
28
+ this.l=-1;this.G=new _.ck;this.f=this.o=this.j=this.a=this.C=null;this.D=!1},eX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},hX=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=_.Bm(d);if(e){var f=[_.Sd];_.Fp(a)[0].type!==_.$c&&f.unshift(_.Ud);d.preferredDrmSystem===_.Sd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.mb[g];h?(d=g===_.Ud?cast.framework.ContentProtection.WIDEVINE:g===_.Sd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},fX(b,h,a,d),gX(b,h,a,d)):c()}else c()}else c()},fX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Lj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
30
+ d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},gX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.Mj(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.nj(g.data))})}:a.licenseHandler=void 0},iX=function(){this.a=!1;this.g=new _.K(QV);this.f=this.m=null;this.h=new Set;this.A=this.rm.bind(this);
31
+ this.w=this.vj.bind(this);this.j=null;this.o=new _.Uh;this.l=null},kX=function(){return jX||(jX=new iX)},lX=function(){return cast.framework.CastReceiverContext.getInstance()},nX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=lX();c=(lX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Gg:_.Fg;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=
32
+ mX(h,_.ta),m=mX(h,_.Tb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(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")},mX=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},oX=function(a){this.f=a;this.a=null;this.h=new _.Uh;this.j=
33
+ [cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},qX=function(a,b){var c=null,d=pX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},pX=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})||
34
+ null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position: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 MW(d,c,e,f,g)}return b},rX=function(){},sX=function(){};_.u=UV.prototype;_.u.release=function(){this.Ca(_.np)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};
35
+ _.u.onError=function(a){a.severity===_.Q&&this.Ca(_.yp)};
36
+ _.u.Ca=function(a){if(a!==this.f)if(this.f===_.yp&&a!==_.np)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.sp?(this.A=b,this.player.trigger(new _.L(_.nd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.sp&&this.player.trigger(new _.L(_.md,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.C};this.C=b;this.j&&_.dp(this.j,this.f);this.player.trigger(new _.L(_.hg,
37
+ {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var ZV=0,mW={GENERIC:ZV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(aW,UV);aW.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};aW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,UV.prototype.destroy.call(a),0)})};aW.prototype.Ca=function(a){var b=this.player.l;b&&b.isPlayingBreak||UV.prototype.Ca.call(this,a)};
38
+ aW.prototype.tb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.Ca(_.up);break;case chrome.cast.media.IdleReason.ERROR:this.Ca(_.yp);break;default:this.Ca(_.np)}break;case chrome.cast.media.PlayerState.PLAYING:this.Ca(_.Bp);break;case chrome.cast.media.PlayerState.PAUSED:this.Ca(_.Ap);break;case chrome.cast.media.PlayerState.BUFFERING:this.Ca(_.sp)}};_.x(bW,_.Mk);_.u=bW.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
+ _.u.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.jk;break;case chrome.cast.media.TrackType.AUDIO:c=_.ik;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.gk(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);
40
+ c.renditions.push(new _.rk(c.id,c));return c}):[],this.a.trigger(new _.L(_.Ou)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return dW(this,_.jk)};_.u.getAudioTracks=function(){return dW(this,_.ik)};_.u.ma=function(){return dW(this,_.T)};_.u.qa=function(){var a=this.Ta();return a?a.renditions[0]:null};_.u.Za=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ra=function(){var a=this.Ea();return a?a.renditions[0]:null};_.u.pb=function(){return this.f[_.jk]||null};
41
+ _.u.Bb=function(){return this.f[_.ik]||null};_.u.Cb=function(){return this.f[_.T]||null};_.u.Ta=function(){return eW(this,_.jk)};_.u.pa=function(){return eW(this,_.ik)};_.u.Ea=function(){return eW(this,_.T)};_.u.xb=function(a){gW(this,_.jk,a)};_.u.Ia=function(a){gW(this,_.ik,a)};_.u.Va=function(a){gW(this,_.T,a)};_.u.lb=function(a){this.xb(a&&a.track)};_.u.vb=function(a){this.Ia(a&&a.track)};_.u.wb=function(a){this.Va(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.C(a)})};
42
+ _.u.xa=function(){return!0};bW.prototype.isAbrEnabled=bW.prototype.xa;bW.prototype.addTextTrack=bW.prototype.addTextTrack;bW.prototype.setTextRendition=bW.prototype.wb;bW.prototype.setAudioRendition=bW.prototype.vb;bW.prototype.setVideoRendition=bW.prototype.lb;bW.prototype.setTextTrack=bW.prototype.Va;bW.prototype.setAudioTrack=bW.prototype.Ia;bW.prototype.setVideoTrack=bW.prototype.xb;bW.prototype.getTextTrack=bW.prototype.Ea;bW.prototype.getAudioTrack=bW.prototype.pa;
43
+ bW.prototype.getVideoTrack=bW.prototype.Ta;bW.prototype.getLoadingTextRendition=bW.prototype.Cb;bW.prototype.getLoadingAudioRendition=bW.prototype.Bb;bW.prototype.getLoadingVideoRendition=bW.prototype.pb;bW.prototype.getTextRendition=bW.prototype.Ra;bW.prototype.getAudioRendition=bW.prototype.Za;bW.prototype.getVideoRendition=bW.prototype.qa;bW.prototype.getTextTracks=bW.prototype.ma;bW.prototype.getAudioTracks=bW.prototype.getAudioTracks;bW.prototype.getVideoTracks=bW.prototype.getVideoTracks;_.x(kW,_.Yl);_.u=kW.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.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)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Hb)};_.u.appendLoad=function(){return Promise.reject(_.Hb)};_.u.seekWith=function(){return Promise.reject(_.Hb)};
44
+ _.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.ne=function(a){this.P=a};_.u.Cc=function(){return this.w};_.u.Gb=function(){return this.A};_.u.Rf=function(){return this.na};
45
+ _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,VV(b)),5);case 5:_.qh(g,2);break;case 3:f=_.E(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.C(g)}})};
46
+ _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(MV),new _.P(1,8,8001,void 0);if(!BW)throw a.g.warn(KV),new _.P(1,8,8002,void 0);if(a.Gb())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.D(d,2);return _.y(d,FW(a),4)}if(2!=d.a)return _.qh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.P(1,8,8E3,c);})};_.u.Mf=function(){this.Gb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.u.addMessageListener=function(a){typeof a===_.ve&&this.G.add(a)};_.u.removeMessageListener=function(a){typeof a===_.ve&&this.G["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?HW(this,!0):new Promise(function(b,c){if(!a.a)return c(JV);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(JV);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.u.isEnded=function(){return this.getState()===_.up};_.u.seek=function(a){var b=this;return this.isEnded()?HW(this,!1,a):new Promise(function(c,d){b.a||d(JV);b.l.isPlayingBreak&&d(HV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Bg));b.a.seek(e,function(){b.trigger(new _.L(_.Ag));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
+ _.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(SV,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
+ _.u.getVolume=function(){return this.a&&this.a.volume.level};_.u.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.u.isMuted=function(){return this.a&&this.a.volume.muted};_.u.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
+ _.u.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};_.u.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};_.u.getState=function(){return this.j?this.j.getState():_.op};
52
+ _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?WV(this.a.customData.stats):_.jp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(MV),e["return"]();if(!BW)return b.g.warn(KV),e["return"]();b.D=_.Fp(a);b.h=_.fm(b.J,a);c=b.D[b.C];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,kb:b.h,Wb:c.Wb,audioMimeType:c.audioMimeType};return _.y(e,GW(b,d),0)})};
53
+ _.u.getBufferInfo=function(){return new _.Xl};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.M=a};_.u.getNetworkEngine=function(){return this.M};_.u.getSourceIndex=function(){return this.C};_.u.setSourceIndex=function(a){this.C=a};_.u.getLoadedSource=function(){return this.D[this.C]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
+ _.u.getTimelineCues=function(){return[]};_.u.resetAbr=function(){this.g.warn(LV)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.se,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Fd};_.u.canPlay=function(){return this.Cc()?2:0};_.u.Ab=function(){return this.L};_.u.Jc=function(a){this.L=qW(a)};_.u.Cf=function(){this.L=null};_.u.sg=function(a){var b=this.Ab()||{};a={metadataType:vW(b.metadataType),title:a};this.Jc(Object.assign({},b,a))};
55
+ _.u.qg=function(a){var b=this.Ab()||{},c=vW(b.metadataType);a=new chrome.cast.Image(a);this.Jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.pg=function(a){var b=this.Ab()||{};this.Jc(Object.assign({},b,{metadataType:3,artist:a}))};_.u.rg=function(a){var b=this.Ab()||{};a={metadataType:vW(b.metadataType),releaseDate:a};this.Jc(Object.assign({},b,a))};
56
+ _.u.lm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;BW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.yg()};
57
+ _.u.Bm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;EW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Gb()||(this.A=!0,EW(this,a.session),this.ja());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Gb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.Ea();c=c&&c.language||void 0;d=d&&d.language||void 0;this.ba(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
+ isLive:this.isLive()},currentTime:CW(this),Li:d,Ng:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ia);a.session.removeMessageListener(RV,this.W);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.u.tm=function(a){this.g.debug("New media session",a.mediaSession);DW(this,a.mediaSession)};_.u.pm=function(a,b){if(a===RV&&0<this.G.size){var c=WV(b);this.G.forEach(function(d){return d(c)})}};_.u.uj=function(){this.trigger(new _.L(_.sg))};
59
+ _.u.Fk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,XV(a,[_.qg,_.Zc],b.M,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Wa++,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)})};_.u.getTextDisplayer=function(){return null};kW.prototype.getTextDisplayer=kW.prototype.getTextDisplayer;kW.prototype.getNetworkEngine=kW.prototype.getNetworkEngine;
60
+ kW.prototype.setNetworkEngine=kW.prototype.setNetworkEngine;var BW=!1,jW=new Set;window.__onGCastApiAvailable=hW;_.x(JW,_.Yl);_.u=JW.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,lW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.zf=function(){return!!this.a&&this.a.Cc()&&BW};_.u.Gb=function(){return!!this.a&&this.a.Gb()};_.u.Rf=function(){return this.a?this.a.Rf():""};_.u.ne=function(a){this.a&&this.a.ne(a)};
61
+ _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(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.pa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.Ea())l.language&&
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.ld?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),lg:b.f.getPresentationStartTime(),Wb:m,audioMimeType:p,kb:g}}c=g;return _.y(f,KW(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.F(7);break}return _.y(f,GW(b.a,c),7);case 7:_.qh(f,0);break;case 2:d=_.E(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.L(_.se,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Mf=function(){this.a&&this.a.Mf()};_.u.qj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,lW(b.a),2):c.F(2)}b.a=IW(b);_.C(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(RV,a),0):(b.g.warn(NV),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(NV)};
64
+ _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(NV)};_.u.Ab=function(){return this.a&&this.a.Ab()};_.u.Jc=function(a){this.a&&this.a.Jc(a)};_.u.Cf=function(){this.a&&this.a.Cf()};_.u.sg=function(a){this.a&&this.a.sg(a)};_.u.qg=function(a){this.a&&this.a.qg(a)};_.u.pg=function(a){this.a&&this.a.pg(a)};_.u.rg=function(a){this.a&&this.a.rg(a)};_.J(OV,JW);JW.prototype.setContentReleaseDate=JW.prototype.rg;JW.prototype.setContentArtist=JW.prototype.pg;
65
+ JW.prototype.setContentImage=JW.prototype.qg;JW.prototype.setContentTitle=JW.prototype.sg;JW.prototype.clearContentMetadata=JW.prototype.Cf;JW.prototype.setContentMetadata=JW.prototype.Jc;JW.prototype.getContentMetadata=JW.prototype.Ab;JW.prototype.removeMessageListener=JW.prototype.removeMessageListener;JW.prototype.addMessageListener=JW.prototype.addMessageListener;JW.prototype.sendMessage=JW.prototype.sendMessage;JW.prototype.changeReceiverId=JW.prototype.qj;JW.prototype.forceDisconnect=JW.prototype.Mf;
66
+ JW.prototype.cast=JW.prototype.cast;JW.prototype.setPlayerConfigInterceptor=JW.prototype.ne;JW.prototype.getReceiverName=JW.prototype.Rf;JW.prototype.isCasting=JW.prototype.Gb;JW.prototype.canCast=JW.prototype.zf;JW.prototype.destroy=JW.prototype.destroy;_.x(LW,UV);_.u=LW.prototype;
67
+ _.u.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.L);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.M);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
+ _.u.destroy=function(){var a=this,b,c;return _.I(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.L);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.M);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,UV.prototype.destroy.call(a),0)})};_.u.yj=function(){this.player.trigger(new _.L(_.mf));this.Ca(_.Bp)};_.u.xj=function(){this.Ca(_.Ap)};_.u.qm=function(){this.Ca(_.up)};_.u.km=function(a){a.isBuffering?this.Ca(_.sp):(a=this.player.isPaused()?_.Ap:_.Bp,this.Ca(a))};_.u.Aj=function(){this.h=1;this.player.trigger(new _.L(_.Bg))};_.u.zj=function(){this.player.trigger(new _.L(_.Ag))};_.u.Em=function(){this.h=2};_.u.sm=function(){this.Ca(_.zp)};
70
+ _.u.wj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.kd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.V=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.se,{detail:a}));this.Ca(_.yp)};_.u=MW.prototype;_.u.Nb=function(){return"Google Cast Framework"};_.u.Ob=function(){return cast.framework.VERSION};_.u.Tb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};
71
+ _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Dc=function(){return!1};_.u.dc=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.Rb=function(){return 0};_.u.Qb=function(){return 0};_.u.Db=function(){return 0};_.u.qb=function(){switch(this.ec()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.h};_.u.ec=function(){return this.f.position};_.u.fc=function(){return this.j};
72
+ _.u.Sb=function(){return this.l};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};MW.prototype.getWrapperCreativeIds=MW.prototype.getWrapperCreativeIds;MW.prototype.getWrapperAdSystems=MW.prototype.getWrapperAdSystems;MW.prototype.getWrapperAdIds=MW.prototype.getWrapperAdIds;MW.prototype.getSequenceLength=MW.prototype.Sb;MW.prototype.getPositionInSequence=MW.prototype.fc;MW.prototype.getPodTimeOffset=MW.prototype.ec;
73
+ MW.prototype.getPodIndex=MW.prototype.getPodIndex;MW.prototype.getPodType=MW.prototype.qb;MW.prototype.getMediaBitrate=MW.prototype.Db;MW.prototype.getMediaHeight=MW.prototype.Qb;MW.prototype.getMediaWidth=MW.prototype.Rb;MW.prototype.getMediaUrl=MW.prototype.getMediaUrl;MW.prototype.getClickThroughUrl=MW.prototype.dc;MW.prototype.isBumper=MW.prototype.Dc;MW.prototype.getSkipTimeOffset=MW.prototype.getSkipTimeOffset;MW.prototype.getDuration=MW.prototype.getDuration;MW.prototype.getTitle=MW.prototype.getTitle;
74
+ MW.prototype.getAdvertiserName=MW.prototype.getAdvertiserName;MW.prototype.getAdSystem=MW.prototype.getAdSystem;MW.prototype.getApiFramework=MW.prototype.getApiFramework;MW.prototype.getCreativeId=MW.prototype.getCreativeId;MW.prototype.getId=MW.prototype.getId;MW.prototype.getTechnology=MW.prototype.Tb;MW.prototype.getAdManagerVersion=MW.prototype.Ob;MW.prototype.getAdManagerName=MW.prototype.Nb;NW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};NW.prototype.hc=function(){return!!this.a.find(function(a){return 0===a.position})};NW.prototype.Fb=function(){return!!this.a.find(function(a){return-1===a.position})};NW.prototype.hasPostroll=NW.prototype.Fb;NW.prototype.hasPreroll=NW.prototype.hc;NW.prototype.getCuePoints=NW.prototype.getCuePoints;_.u=PW.prototype;_.u.load=function(){var a=this;return _.I(function(b){QW&&(QW=!1,VW(a,0));_.C(b)})};_.u.start=function(){return _.I(function(a){OW().play();_.C(a)})};_.u.resume=function(){-1!==this.getPosition()&&OW().play()};_.u.pause=function(){-1!==this.getPosition()&&OW().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
75
+ _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.dispose=function(){var a=this;return _.I(function(b){OW().removeEventListener(a.f,a.h);_.C(b)})};
76
+ _.u.Bj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=OW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Pc,{adsTimeline:new NW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:UW(this,_.Fc,a);break;case cast.framework.events.EventType.BREAK_STARTED:UW(this,_.yc,a);break;case cast.framework.events.EventType.BREAK_ENDED:UW(this,_.zc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:UW(this,
77
+ _.Lc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(UW(this,_.Kc,a),UW(this,_.Mc,a)):a.endedReason===b.STOPPED?UW(this,_.Mc,a):a.endedReason===b.END_OF_STREAM?(UW(this,_.Cc,a),UW(this,_.Mc,a)):a.endedReason===b.ERROR&&VW(this,1);break;case cast.framework.events.EventType.PLAYING:UW(this,_.Jc,a);break;case cast.framework.events.EventType.PAUSE:UW(this,_.Hc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?UW(this,_.Ac,a):UW(this,_.Jc,a)}};
78
+ PW.prototype.getPosition=PW.prototype.getPosition;PW.prototype.setVolume=PW.prototype.setVolume;PW.prototype.getVolume=PW.prototype.getVolume;PW.prototype.skip=PW.prototype.skip;PW.prototype.pause=PW.prototype.pause;PW.prototype.resume=PW.prototype.resume;var QW=!1;WW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(XW(),this.a)};WW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(XW(),this.a)};WW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return YW(a)})};
79
+ WW.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=_.fi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.hi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ii}b&&this.nc(new _.L(b,{detail:YW(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.nc(new _.L(_.fi,{detail:b.value}))};_.x(ZW,_.Mk);_.u=ZW.prototype;_.u.initialize=function(a){this.m=a;$W().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;$W().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ma=function(){return this.j};_.u.qa=function(){return null};
80
+ _.u.Za=function(){var a=this.pa();return a&&a.renditions[0]};_.u.Ra=function(){var a=this.Ea();return a&&a.renditions[0]};_.u.pb=function(){return null};_.u.Bb=function(){return null};_.u.Cb=function(){return null};_.u.Ta=function(){return null};_.u.pa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
81
+ _.u.Ea=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ma().find(function(c){return c.id===b})||null)}return a};_.u.xb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Ia=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Va=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.lb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.vb=function(a){this.Ia(a&&a.track)};
82
+ _.u.wb=function(a){this.Va(a&&a.track)};
83
+ _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,XV(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.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]),bX(b)}catch(g){throw b.g.warn("failed on track",
84
+ a),g;}}_.C(f)})};_.u.xa=function(){return!0};_.u.Wm=function(){this.f=$W().getAudioTracksManager();var a=this.f.getTracks();this.h=aX(_.ik,a);bX(this);a=this.m.getConfiguration();cX(this,_.ik,a.preferredAudioLanguage,a.preferredAudioRole);cX(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};ZW.prototype.isAbrEnabled=ZW.prototype.xa;ZW.prototype.addTextTrack=ZW.prototype.addTextTrack;ZW.prototype.setTextRendition=ZW.prototype.wb;ZW.prototype.setAudioRendition=ZW.prototype.vb;
85
+ ZW.prototype.setVideoRendition=ZW.prototype.lb;ZW.prototype.setTextTrack=ZW.prototype.Va;ZW.prototype.setAudioTrack=ZW.prototype.Ia;ZW.prototype.setVideoTrack=ZW.prototype.xb;ZW.prototype.getTextTrack=ZW.prototype.Ea;ZW.prototype.getAudioTrack=ZW.prototype.pa;ZW.prototype.getVideoTrack=ZW.prototype.Ta;ZW.prototype.getLoadingTextRendition=ZW.prototype.Cb;ZW.prototype.getLoadingAudioRendition=ZW.prototype.Bb;ZW.prototype.getLoadingVideoRendition=ZW.prototype.pb;ZW.prototype.getTextRendition=ZW.prototype.Ra;
86
+ ZW.prototype.getAudioRendition=ZW.prototype.Za;ZW.prototype.getVideoRendition=ZW.prototype.qa;ZW.prototype.getTextTracks=ZW.prototype.ma;ZW.prototype.getAudioTracks=ZW.prototype.getAudioTracks;ZW.prototype.getVideoTracks=ZW.prototype.getVideoTracks;_.x(dX,_.Yl);_.u=dX.prototype;_.u.init=function(a,b){var c=this;this.C=a;b&&(this.h=this.w=b);var d=eX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.um.bind(this));d.setMediaPlaybackInfoHandler(this.gj.bind(this));this.a=new LW(this);this.a.init();this.j=new ZW;this.j.initialize(this);this.o=new WW(function(e){return c.trigger(e)});this.o.init()};
87
+ _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=eX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.C=null,a.w=_.dm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.C(b)})};
88
+ _.u.play=function(){var a=eX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=eX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return eX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
+ _.u.isEnded=function(){return eX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=eX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(HV);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return eX().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
90
+ _.u.getMediaDuration=function(){var a=eX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return eX().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;eX().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
91
+ _.u.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.u.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
92
+ _.u.getLoadedSource=function(){var a=eX().getMediaInformation();if(a){var b=eX().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Zn:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return eX().getStartAbsoluteTime()};
93
+ _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=eX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.op};
94
+ _.u.getStats=function(){var a=_.jp();if(this.f){a=eX().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
95
+ _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.ip;b.a.j=b.f.a;b.A=_.Fp(a);b.h=_.fm(b.w,a);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:VV(b.h),local:!0};return _.y(e,eX().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.va);return new _.Xl};
96
+ _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.C};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Hb)};_.u.appendLoad=function(){return Promise.reject(_.Hb)};_.u.seekWith=function(){return Promise.reject(_.Hb)};_.u.setNetworkEngine=function(a){this.G=a};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
97
+ _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return PV};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.resetAbr=function(){this.g.warn(LV)};_.u.onError=function(a){this.trigger(new _.L(_.se,{detail:a}))};_.u.canPlay=function(){return _.fl()?2:0};
98
+ _.u.um=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=VV(this.getStats());var b=eX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.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&&
99
+ (!e||e&&f)){d=eX().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};_.u.gj=function(a,b){var c=null;a.media.customData&&(c=WV(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;hX(c,b);return b};
100
+ _.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};dX.prototype.getTextDisplayer=dX.prototype.getTextDisplayer;dX.prototype.getNetworkEngine=dX.prototype.getNetworkEngine;dX.prototype.setNetworkEngine=dX.prototype.setNetworkEngine;_.u=iX.prototype;_.u.init=function(a){var b=this;a&&(this.f=new dX,_.Lq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.np?_.y(c,TV(b.m),0):c.F(0)})}))};
101
+ _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=lX(),b=lX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[RV]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Pl.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Nl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(RV,this.w)}};
103
+ _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=lX();lX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(RV,this.w);a.stop();this.m=this.f=null}};_.u.ne=function(a){this.j=a};_.u.kn=function(a){this.l=a};_.u.on=function(a,b){lX().addEventListener(a,b)};_.u.off=function(a,b){lX().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.ve&&this.h.add(a)};
104
+ _.u.removeMessageListener=function(a){typeof a===_.ve&&this.h["delete"](a)};_.u.sendMessage=function(a,b){lX().sendCustomMessage(RV,b,VV(a))};_.u.Cc=function(){return this.a};_.u.Ab=function(){var a=lX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
+ _.u.Pl=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return nX(this,a);try{var b=(new DOMParser).parseFromString(a,_.rg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=lX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.bd){g=e[f].getAttribute(_.Se);for(var h=e[f].getElementsByTagName(_.Ub),l=h.length-
106
+ 1;0<=l;--l){var m=h[l].getAttribute(_.Se)||g,n=h[l].getAttribute(_.Nd),p=h[l].getAttribute(_.Wg)||void 0,q=h[l].getAttribute(_.we)||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(_.Ub).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.dc)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=lX();c=a.getElementsByTagName("StreamIndex");
107
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Sb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.zb)||void 0,h=e[f].getAttribute(_.yb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Gg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Sb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
+ _.u.Nl=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=WV(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,SW(c.media,d.ima,b.m.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.F(7);
109
+ break}b.f.D=!0;return _.y(l,_.Vq(b.m,d),8);case 8:return _.y(l,_.Wq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Wb&&(c.media.hlsVideoSegmentFormat=YV(f.Wb,_.jk)),f.audioMimeType&&(c.media.hlsSegmentFormat=YV(f.audioMimeType,_.ik));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.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
110
+ break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.rm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.O.Fl;var b=lX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.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.m.seek(b))}_.Sq(this.m)}};
111
+ _.u.vj=function(a){if(0<this.h.size){var b=WV(a.data);this.h.forEach(function(c){return c(b)})}};_.J(QV,iX);iX.prototype.getContentMetadata=iX.prototype.Ab;iX.prototype.isApiReady=iX.prototype.Cc;iX.prototype.sendMessage=iX.prototype.sendMessage;iX.prototype.removeMessageListener=iX.prototype.removeMessageListener;iX.prototype.addMessageListener=iX.prototype.addMessageListener;iX.prototype.off=iX.prototype.off;iX.prototype.on=iX.prototype.on;iX.prototype.setLoadRequestDataInterceptor=iX.prototype.kn;
112
+ iX.prototype.setPlayerConfigInterceptor=iX.prototype.ne;iX.prototype.stop=iX.prototype.stop;iX.prototype.start=iX.prototype.start;iX.prototype.init=iX.prototype.init;iX.getInstance=kX;var jX=null;_.u=oX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Fm.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.C(g)})};_.u.start=function(){return _.I(function(a){_.C(a)})};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
+ _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(SV,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.dispose=function(){var a=this;return _.I(function(b){a.h.release();_.C(b)})};
114
+ _.u.Fm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Pc,{adsTimeline:new NW(a.breaks)})));break;case "isPlayingBreak":a.value?qX(this,_.yc):(qX(this,_.Cc),qX(this,_.Mc),qX(this,_.zc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(qX(this,_.Cc),qX(this,_.Mc)),qX(this,_.Lc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?qX(this,_.Hc):qX(this,_.Jc))}};oX.prototype.getPosition=oX.prototype.getPosition;
115
+ oX.prototype.setVolume=oX.prototype.setVolume;oX.prototype.getVolume=oX.prototype.getVolume;oX.prototype.skip=oX.prototype.skip;oX.prototype.pause=oX.prototype.pause;oX.prototype.resume=oX.prototype.resume;rX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};rX.prototype.isSupported=function(a,b){return a.namespace()!==_.Fd?!1:!(!b||!b.ima)};rX.prototype.create=function(a){return new oX(a.a)};rX.prototype.create=rX.prototype.create;rX.prototype.isSupported=rX.prototype.isSupported;rX.prototype.name=rX.prototype.name;_.Vp(new rX);sX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};sX.prototype.isSupported=function(a,b){return kX().Cc()?!(!b||!b.ima):!1};sX.prototype.create=function(a){return new PW(a)};sX.prototype.create=sX.prototype.create;sX.prototype.isSupported=sX.prototype.isSupported;sX.prototype.name=sX.prototype.name;_.Vp(new sX);};
116
116
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
117
117
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
118
118
  else{_=this.clpp._;(f.call(g,this));}