(function(){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
'use strict';var f,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}},ca="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},g;
if("function"==typeof Object.setPrototypeOf)g=Object.setPrototypeOf;else{var l;a:{var da={Ub:!0},ea={};try{ea.__proto__=da;l=ea.Ub;break a}catch(a){}l=!1}g=l?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var fa=g,n=function(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(fa)fa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Fc=b.prototype},p=this||self,ha=function(){},ia=function(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"},q=function(a){var b=ia(a);return"array"==b||"object"==b&&"number"==typeof a.length},r="closure_uid_"+(1E9*Math.random()>>>
0),ja=0,ka=function(a,b,c){return a.call.apply(a.bind,arguments)},la=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},v=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v=ka:v=la;return v.apply(null,arguments)},w=function(a,b){a=
a.split(".");var c=p;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b},ma=function(a,b){function c(){}c.prototype=b.prototype;a.Fc=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ic=function(d,e,h){for(var k=Array(arguments.length-2),m=2;m<arguments.length;m++)k[m-2]=arguments[m];return b.prototype[e].apply(d,k)}},x=function(a){return a};var chrome=chrome||window.chrome||{};chrome.cast=chrome.cast||{};chrome.cast.media=chrome.cast.media||{};var mojo={};chrome.cast.VERSION=[1,2];w("chrome.cast.VERSION",chrome.cast.VERSION);chrome.cast.Hc=!0;w("chrome.cast.usingPresentationApi",chrome.cast.Hc);chrome.cast.ab=function(a,b){this.credentials=a;this.credentialsType=void 0===b?"web":b};w("chrome.cast.CredentialsData",chrome.cast.ab);chrome.cast.Error=function(a,b,c){this.code=a;this.description=b||null;this.details=c||null};w("chrome.cast.Error",chrome.cast.Error);chrome.cast.Db=function(a){this.platform=a;this.packageId=this.url=null};
w("chrome.cast.SenderApplication",chrome.cast.Db);chrome.cast.Image=function(a){this.url=a;this.width=this.height=null};w("chrome.cast.Image",chrome.cast.Image);chrome.cast.Volume=function(a,b){this.level=void 0!==a?a:null;this.muted=void 0!==b?b:null};w("chrome.cast.Volume",chrome.cast.Volume);chrome.cast.ka={CUSTOM_CONTROLLER_SCOPED:"custom_controller_scoped",TAB_AND_ORIGIN_SCOPED:"tab_and_origin_scoped",ORIGIN_SCOPED:"origin_scoped",PAGE_SCOPED:"page_scoped"};w("chrome.cast.AutoJoinPolicy",chrome.cast.ka);chrome.cast.na={CREATE_SESSION:"create_session",CAST_THIS_TAB:"cast_this_tab"};w("chrome.cast.DefaultActionPolicy",chrome.cast.na);chrome.cast.T={VIDEO_OUT:"video_out",AUDIO_OUT:"audio_out",VIDEO_IN:"video_in",AUDIO_IN:"audio_in",MULTIZONE_GROUP:"multizone_group"};
w("chrome.cast.Capability",chrome.cast.T);chrome.cast.u={CANCEL:"cancel",TIMEOUT:"timeout",API_NOT_INITIALIZED:"api_not_initialized",INVALID_PARAMETER:"invalid_parameter",EXTENSION_NOT_COMPATIBLE:"extension_not_compatible",EXTENSION_MISSING:"extension_missing",RECEIVER_UNAVAILABLE:"receiver_unavailable",SESSION_ERROR:"session_error",CHANNEL_ERROR:"channel_error",LOAD_MEDIA_FAILED:"load_media_failed"};w("chrome.cast.ErrorCode",chrome.cast.u);chrome.cast.N={AVAILABLE:"available",UNAVAILABLE:"unavailable"};
w("chrome.cast.ReceiverAvailability",chrome.cast.N);chrome.cast.Eb={CHROME:"chrome",IOS:"ios",ANDROID:"android"};w("chrome.cast.SenderPlatform",chrome.cast.Eb);chrome.cast.Ba={CAST:"cast",DIAL:"dial",HANGOUT:"hangout",CUSTOM:"custom"};w("chrome.cast.ReceiverType",chrome.cast.Ba);chrome.cast.eb={RUNNING:"running",STOPPED:"stopped",ERROR:"error"};w("chrome.cast.DialAppState",chrome.cast.eb);chrome.cast.zb={CAST:"cast",STOP:"stop"};w("chrome.cast.ReceiverAction",chrome.cast.zb);
chrome.cast.I={CONNECTED:"connected",DISCONNECTED:"disconnected",STOPPED:"stopped"};w("chrome.cast.SessionStatus",chrome.cast.I);chrome.cast.Sb={ATTENUATION:"attenuation",FIXED:"fixed",MASTER:"master"};w("chrome.cast.VolumeControlType",chrome.cast.Sb);function y(a){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}ma(y,Error);y.prototype.name="CustomError";var z=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");y.call(this,c+a[d])};ma(z,y);z.prototype.name="AssertionError";var na=function(a,b){throw new z("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var oa=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,h=0;h<d;h++)h in e&&b.call(c,e[h],h,a)};function pa(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return e;return-1};var A;var qa=/&/g,ra=/</g,sa=/>/g,ta=/"/g,ua=/'/g,va=/\x00/g,wa=/[\x00&<>"']/;var B;a:{var xa=p.navigator;if(xa){var ya=xa.userAgent;if(ya){B=ya;break a}}B=""}var C=function(a){return-1!=B.indexOf(a)};var E=function(a,b,c){this.a=c===D?a:""};E.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var za=function(a){if(a instanceof E&&a.constructor===E)return a.a;na("expected object of type SafeHtml, got '"+a+"' of type "+ia(a));return"type_error:SafeHtml"},D={},Aa=new E(p.trustedTypes&&p.trustedTypes.emptyHTML||"",0,D);var Ba={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Ca=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}}(function(){if("undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=za(Aa);return!b.parentElement});var Ea=function(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var c=p.document.createElement("div");return a.replace(Da,function(d,e){var h=b[d];if(h)return h;"#"==e.charAt(0)&&(e=Number("0"+e.substr(1)),isNaN(e)||(h=String.fromCharCode(e)));if(!h){h=d+" ";if(void 0===A){e=null;var k=p.trustedTypes;if(k&&k.createPolicy){try{e=k.createPolicy("goog#html",{createHTML:x,createScript:x,createScriptURL:x})}catch(m){p.console&&p.console.error(m.message)}A=e}else A=e}h=(e=A)?e.createHTML(h):h;
h=new E(h,null,D);if(c.tagName&&Ba[c.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+c.tagName+".");if(Ca())for(;c.lastChild;)c.removeChild(c.lastChild);c.innerHTML=za(h);h=c.firstChild.nodeValue.slice(0,-1)}return b[d]=h})},Fa=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.substr(1)),isNaN(c))?b:String.fromCharCode(c)}})},
Da=/&([^;\s<&]+);?/g;chrome.cast.Wa=function(a,b,c,d,e){this.sessionRequest=a;this.sessionListener=b;this.receiverListener=c;this.autoJoinPolicy=d||chrome.cast.ka.TAB_AND_ORIGIN_SCOPED;this.defaultActionPolicy=e||chrome.cast.na.CREATE_SESSION;this.customDialLaunchCallback=null;this.invisibleSender=!1;this.additionalSessionRequests=[]};w("chrome.cast.ApiConfig",chrome.cast.Wa);chrome.cast.hb=function(a,b){this.appName=a;this.launchParameter=b||null};w("chrome.cast.DialRequest",chrome.cast.hb);
chrome.cast.fb=function(a,b,c){this.receiver=a;this.appState=b;this.extraData=c||null};w("chrome.cast.DialLaunchData",chrome.cast.fb);chrome.cast.gb=function(a,b){this.doLaunch=a;this.launchParameter=b||null};w("chrome.cast.DialLaunchResponse",chrome.cast.gb);
chrome.cast.Fb=function(a,b,c,d,e){c=void 0===c?chrome.cast.timeout.requestSession:c;this.appId=a;this.capabilities=Array.isArray(b)?b:[chrome.cast.T.VIDEO_OUT,chrome.cast.T.AUDIO_OUT];this.requestSessionTimeout=c;this.dialRequest=this.language=null;this.androidReceiverCompatible=void 0===d?!1:d;this.credentialsData=void 0===e?null:e};w("chrome.cast.SessionRequest",chrome.cast.Fb);
chrome.cast.yb=function(a,b,c,d){this.label=a;a=b;wa.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(qa,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(ra,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(sa,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(ta,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(ua,"&#39;")),-1!=a.indexOf("\x00")&&(a=a.replace(va,"&#0;")));this.friendlyName=a;this.capabilities=c||[];this.volume=d||null;this.receiverType=chrome.cast.Ba.CAST;this.displayStatus=this.isActiveInput=null};
w("chrome.cast.Receiver",chrome.cast.yb);chrome.cast.Ab=function(a,b){this.statusText=a;this.appImages=b;this.showStop=null};w("chrome.cast.ReceiverDisplayStatus",chrome.cast.Ab);chrome.cast.Ea=function(){this.requestSession=6E4;this.sendCustomMessage=this.setReceiverVolume=this.stopSession=this.leaveSession=3E3};w("chrome.cast.Timeout",chrome.cast.Ea);chrome.cast.timeout=new chrome.cast.Ea;w("chrome.cast.timeout",chrome.cast.timeout);chrome.cast.Va="auto-join";chrome.cast.sb="cast-session_";chrome.cast.media.lb={SDR:"sdr",HDR:"hdr",DV:"dv"};w("chrome.cast.media.HdrType",chrome.cast.media.lb);chrome.cast.media.mb={AAC:"aac",AC3:"ac3",MP3:"mp3",TS:"ts",TS_AAC:"ts_aac",E_AC3:"e_ac3",FMP4:"fmp4"};w("chrome.cast.media.HlsSegmentFormat",chrome.cast.media.mb);chrome.cast.media.nb={MPEG2_TS:"mpeg2_ts",FMP4:"fmp4"};w("chrome.cast.media.HlsVideoSegmentFormat",chrome.cast.media.nb);chrome.cast.media.qb={PAUSE:"pause",SEEK:"seek",STREAM_VOLUME:"stream_volume",STREAM_MUTE:"stream_mute"};
w("chrome.cast.media.MediaCommand",chrome.cast.media.qb);chrome.cast.media.wb={ALBUM:"ALBUM",PLAYLIST:"PLAYLIST",AUDIOBOOK:"AUDIOBOOK",RADIO_STATION:"RADIO_STATION",PODCAST_SERIES:"PODCAST_SERIES",TV_SERIES:"TV_SERIES",VIDEO_PLAYLIST:"VIDEO_PLAYLIST",LIVE_TV:"LIVE_TV",MOVIE:"MOVIE"};w("chrome.cast.media.QueueType",chrome.cast.media.wb);chrome.cast.media.V={GENERIC_CONTAINER:0,AUDIOBOOK_CONTAINER:1};w("chrome.cast.media.ContainerType",chrome.cast.media.V);
chrome.cast.media.C={GENERIC:0,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};w("chrome.cast.media.MetadataType",chrome.cast.media.C);chrome.cast.media.A={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"};w("chrome.cast.media.PlayerState",chrome.cast.media.A);chrome.cast.media.W={OFF:"REPEAT_OFF",ALL:"REPEAT_ALL",SINGLE:"REPEAT_SINGLE",ALL_AND_SHUFFLE:"REPEAT_ALL_AND_SHUFFLE"};w("chrome.cast.media.RepeatMode",chrome.cast.media.W);
chrome.cast.media.Bb={PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"};w("chrome.cast.media.ResumeState",chrome.cast.media.Bb);chrome.cast.media.Da={BUFFERED:"BUFFERED",LIVE:"LIVE",OTHER:"OTHER"};w("chrome.cast.media.StreamType",chrome.cast.media.Da);chrome.cast.media.ob={CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"};w("chrome.cast.media.IdleReason",chrome.cast.media.ob);chrome.cast.media.Nb={TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"};
w("chrome.cast.media.TrackType",chrome.cast.media.Nb);chrome.cast.media.Kb={SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"};w("chrome.cast.media.TextTrackType",chrome.cast.media.Kb);chrome.cast.media.Gb={NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"};w("chrome.cast.media.TextTrackEdgeType",chrome.cast.media.Gb);chrome.cast.media.Lb={NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"};
w("chrome.cast.media.TextTrackWindowType",chrome.cast.media.Lb);chrome.cast.media.Hb={SANS_SERIF:"SANS_SERIF",MONOSPACED_SANS_SERIF:"MONOSPACED_SANS_SERIF",SERIF:"SERIF",MONOSPACED_SERIF:"MONOSPACED_SERIF",CASUAL:"CASUAL",CURSIVE:"CURSIVE",SMALL_CAPITALS:"SMALL_CAPITALS"};w("chrome.cast.media.TextTrackFontGenericFamily",chrome.cast.media.Hb);chrome.cast.media.Ib={NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"};w("chrome.cast.media.TextTrackFontStyle",chrome.cast.media.Ib);
chrome.cast.media.Ob={LIKE:"LIKE",DISLIKE:"DISLIKE",FOLLOW:"FOLLOW",UNFOLLOW:"UNFOLLOW"};w("chrome.cast.media.UserAction",chrome.cast.media.Ob);chrome.cast.media.pa=function(){this.customData=null};w("chrome.cast.media.GetStatusRequest",chrome.cast.media.pa);chrome.cast.media.ta=function(){this.customData=null};w("chrome.cast.media.PauseRequest",chrome.cast.media.ta);chrome.cast.media.va=function(){this.customData=null};w("chrome.cast.media.PlayRequest",chrome.cast.media.va);chrome.cast.media.Cb=function(){this.customData=this.resumeState=this.currentTime=null};w("chrome.cast.media.SeekRequest",chrome.cast.media.Cb);
chrome.cast.media.Ca=function(){this.customData=null};w("chrome.cast.media.StopRequest",chrome.cast.media.Ca);chrome.cast.media.Tb=function(a){this.volume=a;this.customData=null};w("chrome.cast.media.VolumeRequest",chrome.cast.media.Tb);
chrome.cast.media.pb=function(a){this.type="LOAD";this.requestId=0;this.sessionId=null;this.media=a;this.activeTrackIds=null;this.autoplay=!0;this.atvCredentialsType=this.atvCredentials=this.credentialsType=this.credentials=void 0;this.customData=this.currentTime=null;this.queueData=this.playbackRate=void 0};w("chrome.cast.media.LoadRequest",chrome.cast.media.pb);chrome.cast.media.tb=function(a){this.type="PRECACHE";this.requestId=0;this.precacheData=a};
chrome.cast.media.ib=function(a,b){this.requestId=0;this.activeTrackIds=a||null;this.textTrackStyle=b||null};w("chrome.cast.media.EditTracksInfoRequest",chrome.cast.media.ib);chrome.cast.media.U=function(a){this.containerType=a=void 0===a?chrome.cast.media.V.GENERIC_CONTAINER:a;this.containerDuration=this.containerImages=this.sections=this.title=void 0};w("chrome.cast.media.ContainerMetadata",chrome.cast.media.U);
chrome.cast.media.j=function(a){this.metadataType=this.type=a;this.queueItemId=this.sectionStartTimeInContainer=this.sectionStartAbsoluteTime=this.sectionStartTimeInMedia=this.sectionDuration=void 0};w("chrome.cast.media.MediaMetadata",chrome.cast.media.j);chrome.cast.media.oa=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.GENERIC);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.title=void 0};n(chrome.cast.media.oa,chrome.cast.media.j);
w("chrome.cast.media.GenericMediaMetadata",chrome.cast.media.oa);chrome.cast.media.ra=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.MOVIE);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.studio=this.title=void 0};n(chrome.cast.media.ra,chrome.cast.media.j);w("chrome.cast.media.MovieMediaMetadata",chrome.cast.media.ra);
chrome.cast.media.Fa=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.TV_SHOW);this.originalAirdate=this.releaseYear=this.images=this.episode=this.episodeNumber=this.season=this.seasonNumber=this.episodeTitle=this.title=this.seriesTitle=void 0};n(chrome.cast.media.Fa,chrome.cast.media.j);w("chrome.cast.media.TvShowMediaMetadata",chrome.cast.media.Fa);
chrome.cast.media.sa=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.MUSIC_TRACK);this.releaseDate=this.releaseYear=this.images=this.discNumber=this.trackNumber=this.artistName=this.songName=this.composer=this.artist=this.albumArtist=this.title=this.albumName=void 0};n(chrome.cast.media.sa,chrome.cast.media.j);w("chrome.cast.media.MusicTrackMediaMetadata",chrome.cast.media.sa);
chrome.cast.media.ua=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.PHOTO);this.creationDateTime=this.height=this.width=this.longitude=this.latitude=this.images=this.location=this.artist=this.title=void 0};n(chrome.cast.media.ua,chrome.cast.media.j);w("chrome.cast.media.PhotoMediaMetadata",chrome.cast.media.ua);chrome.cast.media.ja=function(){chrome.cast.media.U.call(this,chrome.cast.media.V.AUDIOBOOK_CONTAINER);this.releaseDate=this.publisher=this.narrators=this.authors=void 0};
n(chrome.cast.media.ja,chrome.cast.media.U);w("chrome.cast.media.AudiobookContainerMetadata",chrome.cast.media.ja);chrome.cast.media.ia=function(){chrome.cast.media.j.call(this,chrome.cast.media.C.AUDIOBOOK_CHAPTER);this.images=this.subtitle=this.bookTitle=this.chapterNumber=this.title=this.chapterTitle=void 0};n(chrome.cast.media.ia,chrome.cast.media.j);w("chrome.cast.media.AudiobookChapterMediaMetadata",chrome.cast.media.ia);
chrome.cast.media.rb=function(a,b){this.contentId=a;this.contentUrl=void 0;this.streamType=chrome.cast.media.Da.BUFFERED;this.contentType=b;this.metadata=null;this.atvEntity=this.entity=void 0;this.duration=null;this.startAbsoluteTime=void 0;this.customData=this.textTrackStyle=this.tracks=null;this.userActionStates=this.hlsVideoSegmentFormat=this.hlsSegmentFormat=this.vmapAdsRequest=this.breakClips=this.breaks=void 0};w("chrome.cast.media.MediaInfo",chrome.cast.media.rb);
chrome.cast.media.xa=function(a){this.itemId=null;this.media=a;this.autoplay=!0;this.startTime=0;this.playbackDuration=null;this.preloadTime=0;this.customData=this.activeTrackIds=null};w("chrome.cast.media.QueueItem",chrome.cast.media.xa);chrome.cast.media.cb="CC1AD845";w("chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID",chrome.cast.media.cb);chrome.cast.media.timeout={};chrome.cast.media.timeout.load=0;w("chrome.cast.media.timeout.load",chrome.cast.media.timeout.load);
chrome.cast.media.timeout.P=0;w("chrome.cast.media.timeout.getStatus",chrome.cast.media.timeout.P);chrome.cast.media.timeout.play=0;w("chrome.cast.media.timeout.play",chrome.cast.media.timeout.play);chrome.cast.media.timeout.pause=0;w("chrome.cast.media.timeout.pause",chrome.cast.media.timeout.pause);chrome.cast.media.timeout.seek=0;w("chrome.cast.media.timeout.seek",chrome.cast.media.timeout.seek);chrome.cast.media.timeout.stop=0;w("chrome.cast.media.timeout.stop",chrome.cast.media.timeout.stop);
chrome.cast.media.timeout.S=0;w("chrome.cast.media.timeout.setVolume",chrome.cast.media.timeout.S);chrome.cast.media.timeout.O=0;w("chrome.cast.media.timeout.editTracksInfo",chrome.cast.media.timeout.O);chrome.cast.media.timeout.l=0;w("chrome.cast.media.timeout.queue",chrome.cast.media.timeout.l);chrome.cast.media.Mb=function(a,b){this.trackId=a;this.trackContentType=this.trackContentId=null;this.type=b;this.customData=this.subtype=this.language=this.name=null};w("chrome.cast.media.Track",chrome.cast.media.Mb);
chrome.cast.media.Jb=function(){this.customData=this.fontStyle=this.fontGenericFamily=this.fontFamily=this.fontScale=this.windowRoundedCornerRadius=this.windowColor=this.windowType=this.edgeColor=this.edgeType=this.backgroundColor=this.foregroundColor=null};w("chrome.cast.media.TextTrackStyle",chrome.cast.media.Jb);chrome.cast.media.vb=function(a){this.type="QUEUE_LOAD";this.sessionId=this.requestId=null;this.items=a;this.startIndex=0;this.repeatMode=chrome.cast.media.W.OFF;this.customData=null};
w("chrome.cast.media.QueueLoadRequest",chrome.cast.media.vb);chrome.cast.media.wa=function(a){this.type="QUEUE_INSERT";this.sessionId=this.requestId=null;this.items=a;this.customData=this.insertBefore=null};w("chrome.cast.media.QueueInsertItemsRequest",chrome.cast.media.wa);chrome.cast.media.xb=function(a){this.type="QUEUE_UPDATE";this.sessionId=this.requestId=null;this.items=a;this.customData=null};w("chrome.cast.media.QueueUpdateItemsRequest",chrome.cast.media.xb);
chrome.cast.media.M=function(){this.type="QUEUE_UPDATE";this.customData=this.jump=this.currentItemId=this.sessionId=this.requestId=null};w("chrome.cast.media.QueueJumpRequest",chrome.cast.media.M);chrome.cast.media.Aa=function(){this.type="QUEUE_UPDATE";this.customData=this.repeatMode=this.sessionId=this.requestId=null};w("chrome.cast.media.QueueSetPropertiesRequest",chrome.cast.media.Aa);
chrome.cast.media.ya=function(a){this.type="QUEUE_REMOVE";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=null};w("chrome.cast.media.QueueRemoveItemsRequest",chrome.cast.media.ya);chrome.cast.media.za=function(a){this.type="QUEUE_REORDER";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=this.insertBefore=null};w("chrome.cast.media.QueueReorderItemsRequest",chrome.cast.media.za);
chrome.cast.media.Xa=function(a,b,c){this.id=a;this.breakClipIds=b;this.position=c;this.duration=void 0;this.isWatched=!1;this.isEmbedded=void 0};w("chrome.cast.media.Break",chrome.cast.media.Xa);chrome.cast.media.Ya=function(a){this.id=a;this.vastAdsRequest=this.customData=this.hlsSegmentFormat=this.clickThroughUrl=this.posterUrl=this.whenSkippable=this.duration=this.title=this.contentType=this.contentUrl=this.contentId=void 0};w("chrome.cast.media.BreakClip",chrome.cast.media.Ya);
chrome.cast.media.Qb=function(){this.adsResponse=this.adTagUrl=void 0};w("chrome.cast.media.VastAdsRequest",chrome.cast.media.Qb);chrome.cast.media.Za=function(){this.whenSkippable=this.breakClipId=this.breakId=this.currentBreakClipTime=this.currentBreakTime=void 0};w("chrome.cast.media.BreakStatus",chrome.cast.media.Za);chrome.cast.media.qa=function(a,b,c,d){this.start=a;this.end=b;this.isMovingWindow=c;this.isLiveDone=d};w("chrome.cast.media.LiveSeekableRange",chrome.cast.media.qa);
chrome.cast.media.ub=function(a,b,c,d,e,h,k){this.id=a;this.queueType=this.entity=void 0;this.name=b;this.description=c;this.repeatMode=d;this.shuffle=!1;this.items=e;this.startIndex=h;this.startTime=k;this.containerMetadata=void 0};w("chrome.cast.media.QueueData",chrome.cast.media.ub);chrome.cast.media.Pb=function(a){this.userAction=a;this.customData=void 0};w("chrome.cast.media.UserActionState",chrome.cast.media.Pb);chrome.cast.media.Rb=function(a,b,c){this.width=a;this.height=b;this.hdrType=c};
w("chrome.cast.media.VideoInformation",chrome.cast.media.Rb);chrome.cast.media.b=function(a,b){this.sessionId=a;this.mediaSessionId=b;this.media=null;this.videoInfo=this.queueData=void 0;this.playbackRate=1;this.playerState=chrome.cast.media.A.IDLE;this.currentTime=0;this.a=-1;this.supportedMediaCommands=[];this.volume=new chrome.cast.Volume;this.items=this.preloadedItemId=this.loadingItemId=this.currentItemId=this.customData=this.activeTrackIds=this.idleReason=null;this.repeatMode=chrome.cast.media.W.OFF;this.breakStatus=void 0;this.g=!1;this.c=[];this.liveSeekableRange=
void 0};f=chrome.cast.media.b.prototype;f.P=function(a,b,c){a||(a=new chrome.cast.media.pa);F.a(this,"MEDIA_GET_STATUS",a,b,c,chrome.cast.media.timeout.P)};f.play=function(a,b,c){this.Ka(F,a,b,c)};f.Ka=function(a,b,c,d){b||(b=new chrome.cast.media.va);a.a(this,"PLAY",b,c,d,chrome.cast.media.timeout.play)};f.pause=function(a,b,c){this.Ja(F,a,b,c)};f.Ja=function(a,b,c,d){b||(b=new chrome.cast.media.ta);a.a(this,"PAUSE",b,c,d,chrome.cast.media.timeout.pause)};
f.seek=function(a,b,c){F.a(this,"SEEK",a,b,c,chrome.cast.media.timeout.seek)};f.stop=function(a,b,c){a||(a=new chrome.cast.media.Ca);F.a(this,"STOP_MEDIA",a,b,c,chrome.cast.media.timeout.stop)};f.S=function(a,b,c){F.a(this,"MEDIA_SET_VOLUME",a,b,c,chrome.cast.media.timeout.S)};f.O=function(a,b,c){F.a(this,"EDIT_TRACKS_INFO",a,b,c,chrome.cast.media.timeout.O)};f.lc=function(a,b,c){F.a(this,"QUEUE_INSERT",a,b,c,chrome.cast.media.timeout.l)};
f.kc=function(a,b,c){F.a(this,"QUEUE_INSERT",new chrome.cast.media.wa([a]),b,c,chrome.cast.media.timeout.l)};f.vc=function(a,b,c){F.a(this,"QUEUE_UPDATE",a,b,c,chrome.cast.media.timeout.l)};f.qc=function(a,b){var c=new chrome.cast.media.M;c.jump=-1;F.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};f.pc=function(a,b){var c=new chrome.cast.media.M;c.jump=1;F.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};
f.mc=function(a,b,c){if(!(0>G(this,a))){var d=new chrome.cast.media.M;d.currentItemId=a;F.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)}};f.uc=function(a,b,c){var d=new chrome.cast.media.Aa;d.repeatMode=a;F.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)};f.sc=function(a,b,c){F.a(this,"QUEUE_REMOVE",a,b,c,chrome.cast.media.timeout.l)};f.rc=function(a,b,c){0>G(this,a)||F.a(this,"QUEUE_REMOVE",new chrome.cast.media.ya([a]),b,c,chrome.cast.media.timeout.l)};
f.tc=function(a,b,c){F.a(this,"QUEUE_REORDER",a,b,c,chrome.cast.media.timeout.l)};f.oc=function(a,b,c,d){var e=G(this,a);if(!(0>e))if(0>b)d&&d(new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER));else if(e==b)c&&c();else{var h=null;b=b>e?b+1:b;b<this.items.length&&(h=this.items[b]);a=new chrome.cast.media.za([a]);a.insertBefore=h?h.itemId:null;F.a(this,"QUEUE_REORDER",a,c,d,chrome.cast.media.timeout.l)}};f.Gc=function(a){return-1<this.supportedMediaCommands.indexOf(a)};
f.dc=function(){if(this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a){var a=this.currentTime+(Date.now()-this.a)/1E3*this.playbackRate;this.media&&null!=this.media.duration&&a>this.media.duration&&-1!=this.media.duration&&(a=this.media.duration);0>a&&(a=0);return a}return this.currentTime};f.bc=function(){if(this.breakStatus&&void 0!==this.breakStatus.currentBreakTime)return this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a?this.breakStatus.currentBreakTime+(Date.now()-this.a)/1E3:this.breakStatus.currentBreakTime};
f.ac=function(){if(this.breakStatus&&void 0!==this.breakStatus.currentBreakClipTime)return this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a?this.breakStatus.currentBreakClipTime+(Date.now()-this.a)/1E3:this.breakStatus.currentBreakClipTime};
f.cc=function(){if(this.liveSeekableRange&&void 0!==this.liveSeekableRange.start&&void 0!==this.liveSeekableRange.end){if(this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a){var a=(Date.now()-this.a)/1E3,b=new chrome.cast.media.qa;b.isMovingWindow=this.liveSeekableRange.isMovingWindow;b.isLiveDone=this.liveSeekableRange.isLiveDone;b.start=b.isMovingWindow?this.liveSeekableRange.start+a:this.liveSeekableRange.start;b.end=b.isLiveDone?this.liveSeekableRange.end:this.liveSeekableRange.end+a;return b}return this.liveSeekableRange}};
f.Z=function(a){this.J(F,a)};f.J=function(a,b){a.Wb(this,b)};f.ca=function(a){this.L(F,a)};f.L=function(a,b){F.xc(this,b)};var G=function(a,b){return pa(a.items,function(c){return c.itemId==b})};w("chrome.cast.media.Media",chrome.cast.media.b);chrome.cast.media.b.prototype.removeUpdateListenerWithContext=chrome.cast.media.b.prototype.L;chrome.cast.media.b.prototype.removeUpdateListener=chrome.cast.media.b.prototype.ca;chrome.cast.media.b.prototype.addUpdateListenerWithContext=chrome.cast.media.b.prototype.J;
chrome.cast.media.b.prototype.addUpdateListener=chrome.cast.media.b.prototype.Z;chrome.cast.media.b.prototype.getEstimatedLiveSeekableRange=chrome.cast.media.b.prototype.cc;chrome.cast.media.b.prototype.getEstimatedBreakClipTime=chrome.cast.media.b.prototype.ac;chrome.cast.media.b.prototype.getEstimatedBreakTime=chrome.cast.media.b.prototype.bc;chrome.cast.media.b.prototype.getEstimatedTime=chrome.cast.media.b.prototype.dc;chrome.cast.media.b.prototype.supportsCommand=chrome.cast.media.b.prototype.Gc;
chrome.cast.media.b.prototype.queueMoveItemToNewIndex=chrome.cast.media.b.prototype.oc;chrome.cast.media.b.prototype.queueReorderItems=chrome.cast.media.b.prototype.tc;chrome.cast.media.b.prototype.queueRemoveItem=chrome.cast.media.b.prototype.rc;chrome.cast.media.b.prototype.queueRemoveItems=chrome.cast.media.b.prototype.sc;chrome.cast.media.b.prototype.queueSetRepeatMode=chrome.cast.media.b.prototype.uc;chrome.cast.media.b.prototype.queueJumpToItem=chrome.cast.media.b.prototype.mc;
chrome.cast.media.b.prototype.queueNext=chrome.cast.media.b.prototype.pc;chrome.cast.media.b.prototype.queuePrev=chrome.cast.media.b.prototype.qc;chrome.cast.media.b.prototype.queueUpdateItems=chrome.cast.media.b.prototype.vc;chrome.cast.media.b.prototype.queueAppendItem=chrome.cast.media.b.prototype.kc;chrome.cast.media.b.prototype.queueInsertItems=chrome.cast.media.b.prototype.lc;chrome.cast.media.b.prototype.editTracksInfo=chrome.cast.media.b.prototype.O;
chrome.cast.media.b.prototype.setVolume=chrome.cast.media.b.prototype.S;chrome.cast.media.b.prototype.stop=chrome.cast.media.b.prototype.stop;chrome.cast.media.b.prototype.seek=chrome.cast.media.b.prototype.seek;chrome.cast.media.b.prototype.pauseWithContext=chrome.cast.media.b.prototype.Ja;chrome.cast.media.b.prototype.pause=chrome.cast.media.b.prototype.pause;chrome.cast.media.b.prototype.playWithContext=chrome.cast.media.b.prototype.Ka;chrome.cast.media.b.prototype.play=chrome.cast.media.b.prototype.play;
chrome.cast.media.b.prototype.getStatus=chrome.cast.media.b.prototype.P;var F=null;var Ga=function(a,b,c){this.sessionId=a;this.namespaceName=b;this.message=c};var Ha=function(a,b){this.type="SET_VOLUME";this.requestId=0;this.volume=a;this.expectedVolume=b||null};var Ia=function(a){this.type="STOP";this.requestId=0;this.sessionId=a||null};chrome.cast.f=function(a,b,c,d,e){this.sessionId=a;this.appId=b;this.displayName=c;this.statusText=null;this.appImages=d;this.receiver=e;this.senderApps=[];this.namespaces=[];this.media=[];this.status=chrome.cast.I.CONNECTED;this.transportId=""};f=chrome.cast.f.prototype;f.Ec=function(a,b,c){this.Ra(F,a,b,c)};f.Ra=function(a,b,c,d){b=new Ha(new chrome.cast.Volume(b,null),this.receiver.volume);a.setReceiverVolume(this.sessionId,b,c,d)};f.Dc=function(a,b,c){this.Qa(F,a,b,c)};
f.Qa=function(a,b,c,d){a=new Ha(new chrome.cast.Volume(null,b),this.receiver.volume);F.setReceiverVolume(this.sessionId,a,c,d)};f.fc=function(a,b){F.leaveSession(this.sessionId,a,b)};f.stop=function(a,b){this.Ta(F,a,b)};f.Ta=function(a,b,c){a.Oa(new Ia(this.sessionId),b,c,chrome.cast.timeout.stopSession)};f.sendMessage=function(a,b,c,d){this.Pa(F,a,b,c,d)};f.Pa=function(a,b,c,d,e){a.Ac(new Ga(this.sessionId,b,c),d,e)};f.Z=function(a){this.J(F,a)};f.J=function(a,b){a.Yb(this.sessionId,b)};
f.ca=function(a){this.L(F,a)};f.L=function(a,b){a.zc(this.sessionId,b)};f.Xb=function(a,b){this.Ha(F,a,b)};f.Ha=function(a,b,c){a.Vb(this.sessionId,b,c)};f.X=function(a){this.Ga(F,a)};f.Ga=function(a,b){a.X(this.sessionId,b)};f.aa=function(a){this.La(F,a)};f.La=function(a,b){a.aa(this.sessionId,b)};f.yc=function(a,b){this.Ma(F,a,b)};f.Ma=function(a,b,c){a.wc(this.sessionId,b,c)};f.hc=function(a,b,c){a.sessionId=this.sessionId;F.ma(a,"LOAD",b,c)};
f.nc=function(a,b,c){a.sessionId=this.sessionId;F.ma(a,"QUEUE_LOAD",b,c)};w("chrome.cast.Session",chrome.cast.f);chrome.cast.f.prototype.queueLoad=chrome.cast.f.prototype.nc;chrome.cast.f.prototype.loadMedia=chrome.cast.f.prototype.hc;chrome.cast.f.prototype.removeMessageListenerWithContext=chrome.cast.f.prototype.Ma;chrome.cast.f.prototype.removeMessageListener=chrome.cast.f.prototype.yc;chrome.cast.f.prototype.removeMediaListenerWithContext=chrome.cast.f.prototype.La;
chrome.cast.f.prototype.removeMediaListener=chrome.cast.f.prototype.aa;chrome.cast.f.prototype.addMediaListenerWithContext=chrome.cast.f.prototype.Ga;chrome.cast.f.prototype.addMediaListener=chrome.cast.f.prototype.X;chrome.cast.f.prototype.addMessageListenerWithContext=chrome.cast.f.prototype.Ha;chrome.cast.f.prototype.addMessageListener=chrome.cast.f.prototype.Xb;chrome.cast.f.prototype.removeUpdateListenerWithContext=chrome.cast.f.prototype.L;chrome.cast.f.prototype.removeUpdateListener=chrome.cast.f.prototype.ca;
chrome.cast.f.prototype.addUpdateListenerWithContext=chrome.cast.f.prototype.J;chrome.cast.f.prototype.addUpdateListener=chrome.cast.f.prototype.Z;chrome.cast.f.prototype.sendMessageWithContext=chrome.cast.f.prototype.Pa;chrome.cast.f.prototype.sendMessage=chrome.cast.f.prototype.sendMessage;chrome.cast.f.prototype.stopWithContext=chrome.cast.f.prototype.Ta;chrome.cast.f.prototype.stop=chrome.cast.f.prototype.stop;chrome.cast.f.prototype.leave=chrome.cast.f.prototype.fc;
chrome.cast.f.prototype.setReceiverMutedWithContext=chrome.cast.f.prototype.Qa;chrome.cast.f.prototype.setReceiverMuted=chrome.cast.f.prototype.Dc;chrome.cast.f.prototype.setReceiverVolumeLevelWithContext=chrome.cast.f.prototype.Ra;chrome.cast.f.prototype.setReceiverVolumeLevel=chrome.cast.f.prototype.Ec;var H="StopIteration"in p?p.StopIteration:{message:"StopIteration",stack:""},I=function(){};I.prototype.next=function(){throw H;};I.prototype.v=function(){return this};
var Ja=function(a){if(a instanceof I)return a;if("function"==typeof a.v)return a.v(!1);if(q(a)){var b=0,c=new I;c.next=function(){for(;;){if(b>=a.length)throw H;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},J=function(a,b){if(q(a))try{oa(a,b,void 0)}catch(c){if(c!==H)throw c;}else{a=Ja(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==H)throw c;}}};var K=function(a,b){this.a={};this.i=[];this.g=this.c=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a)if(a instanceof K)for(L(a),c=a.i.concat(),d=0;d<c.length;d++)this.set(c[d],a.get(c[d]));else for(d in a)this.set(d,a[d])};K.prototype.K=function(){L(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.a[this.i[b]]);return a};K.prototype.clear=function(){this.a={};this.g=this.c=this.i.length=0};
K.prototype.remove=function(a){return M(this.a,a)?(delete this.a[a],this.c--,this.g++,this.i.length>2*this.c&&L(this),!0):!1};var L=function(a){if(a.c!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];M(a.a,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.c!=a.i.length){var e={};for(c=b=0;b<a.i.length;)d=a.i[b],M(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};K.prototype.get=function(a,b){return M(this.a,a)?this.a[a]:b};
K.prototype.set=function(a,b){M(this.a,a)||(this.c++,this.i.push(a),this.g++);this.a[a]=b};K.prototype.v=function(a){L(this);var b=0,c=this.g,d=this,e=new I;e.next=function(){if(c!=d.g)throw Error("The map has changed since the iterator was created");if(b>=d.i.length)throw H;var h=d.i[b++];return a?h:d.a[h]};return e};var M=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var N=function(a,b){this.requestId=a;this.h=b;this.Ua=null};N.prototype.c=function(){};var Ka=function(){this.a=new K},La=function(a,b){a.a.set(b.requestId,b);b.Ua=setTimeout(function(){a.a.remove(b.requestId);b.c()},b.h)},Ma=function(a,b){var c=a.a.get(b);if(!c)return null;clearTimeout(c.Ua);a.a.remove(b);return c};var O=function(a,b,c,d){N.call(this,a,d||6E5);this.g=b;this.a=c};n(O,N);O.prototype.c=function(){this.a(new chrome.cast.Error(chrome.cast.u.TIMEOUT))};var P=function(a,b,c,d){this.type=a;this.message=b;this.sequenceNumber=void 0!==c?c:-1;this.timeoutMillis=d||0;this.clientId=""};var Q=function(a){this.g=a;this.c=String(Date.now())+String(Math.floor(1E5*Math.random()));this.a=null},Na=function(a,b){if(!a.a)return"No active session";b.clientId=a.c;b=JSON.stringify(b);if(32768<b.length)return"Message length over limit";a.a.send(b);return null};Q.prototype.connect=function(a){this.a=a;this.a.onmessage=v(this.h,this);Na(this,new P("client_connect",this.c))};Q.prototype.disconnect=function(){this.a.close();this.a=null};
Q.prototype.h=function(a){a=JSON.parse(a.data);if(a.clientId==this.c)this.g.onMessage(a)};var Oa=function(a,b,c){this.g=a;this.c=b;this.a=c},Pa=function(a){var b="cast-dial:"+a.g,c=new URLSearchParams;a.c&&c.set("dialPostData",a.c);a.a&&c.set("clientId",a.a);(a=c.toString())&&(b+="?"+a);return b};var Qa=function(a,b,c,d,e,h,k,m,t,u,Xa,Ya){this.D=a;this.a=b||null;this.c=c||null;this.o=d||null;this.s=void 0!==e?e:null;this.B=h||null;this.G=k||null;this.F=m||!1;this.h=t||null;this.g=u||null;this.H=Xa?["WEB","ANDROID_TV"]:["WEB"];this.m=Ya||null},Ra=function(a){var b={launchCheckerParams:{}};a.m&&(b.launchCheckerParams.credentialsData=a.m);return b},Sa=function(a){var b=a.D.map(function(c){var d="cast:"+c.appId,e=new URLSearchParams;c.capabilities&&0<c.capabilities.length&&e.set("capabilities",
c.capabilities.join(","));a.a&&e.set("clientId",a.a);a.c&&e.set("autoJoinPolicy",a.c);a.o&&e.set("defaultActionPolicy",a.o);null!=a.s&&e.set("launchTimeout",String(a.s));a.F&&e.set("invisibleSender","true");a.h&&(e.set("broadcastNamespace",a.h),e.set("broadcastId",String(Math.random())));a.g&&e.set("broadcastMessage",encodeURIComponent(JSON.stringify(a.g)));e.set("supportedAppTypes",a.H.join(","));e.set("appParams",JSON.stringify(Ra(a)));return d+"?"+e.toString()});a.B&&b.push(Pa(new Oa(a.B,a.G,a.a)));
return b};var Ta=function(){this.a={};this.c={}},Ua=function(a,b,c){var d=a.a[b];return d?(d.status=c,d.media.forEach(function(e){delete a.c[e.sessionId+"#"+e.mediaSessionId]}),delete a.a[b],!0):!1},Wa=function(a,b){var c=a.a[b.sessionId];if(c)return c.statusText=b.statusText,c.namespaces=b.namespaces||[],c.receiver.volume=b.receiver.volume,c;c=new chrome.cast.f(b.sessionId,b.appId,b.displayName,b.appImages,b.receiver);for(var d in b)"media"==d?c.media=b.media.map(function(e){e=Va(a,e);e.h=!1;e.g=!0;return e}):
b.hasOwnProperty(d)&&(c[d]=b[d]);return a.a[b.sessionId]=c},Va=function(a,b){var c=b.sessionId+"#"+b.mediaSessionId,d=a.c[c];d||(d=new chrome.cast.media.b(b.sessionId,b.mediaSessionId),a.c[c]=d,(a=a.a[b.sessionId])&&a.media.push(d));a=d;a.currentItemId=null;a.loadingItemId=null;a.preloadedItemId=null;for(var e in b)"items"!=e&&b.hasOwnProperty(e)&&("volume"==e?(a.volume.level=b.volume.level,a.volume.muted=b.volume.muted):a[e]=b[e]);e=ba(["idleReason","extendedStatus"]);for(c=e.next();!c.done;c=e.next())c=
c.value,b.hasOwnProperty(c)||(a[c]=null);"currentTime"in b&&(a.a=Date.now());if(a.playerState==chrome.cast.media.A.IDLE&&null==a.loadingItemId)a.currentItemId=null,a.loadingItemId=null,a.preloadedItemId=null,a.items=null;else if(b.hasOwnProperty("items")&&b.items){e=[];var h=a.items;c={};if(h)for(var k=0;k<h.length;k++)c[h[k].itemId]=k;b=ba(b.items);for(h=b.next();!h.done;h=b.next()){h=h.value;if(!h.media){k=h.itemId;var m=a.items?a.items[c[k]]:null;m&&m.media?h.media=m.media:k==a.currentItemId&&
a.media&&(h.media=a.media)}e.push(Za(h))}a.items=e}return d},$a=function(a,b){delete a.c[b.sessionId+"#"+b.mediaSessionId];if(a=a.a[b.sessionId])b=a.media.indexOf(b),-1!=b&&a.media.splice(b,1)},Za=function(a){var b=new chrome.cast.media.xa(a.media),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};var ab=function(){};var bb=C("Opera"),cb=C("Gecko")&&!(-1!=B.toLowerCase().indexOf("webkit")&&!C("Edge"))&&!(C("Trident")||C("MSIE"))&&!C("Edge"),db=-1!=B.toLowerCase().indexOf("webkit")&&!C("Edge");try{(new self.OffscreenCanvas(0,0)).getContext("2d")}catch(a){};var eb=function(a,b){if("function"!==typeof a)if(a&&"function"==typeof a.handleEvent)a=v(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:p.setTimeout(a,b||0)};var R=function(a,b,c){this.s=null!=c?a.bind(c):a;this.o=b;this.h=null;this.c=!1;this.g=0;this.a=null};n(R,ab);R.prototype.m=function(a){this.h=arguments;this.a||this.g?this.c=!0:S(this)};R.prototype.stop=function(){this.a&&(p.clearTimeout(this.a),this.a=null,this.c=!1,this.h=null)};R.prototype.pause=function(){this.g++};R.prototype.resume=function(){this.g--;this.g||!this.c||this.a||(this.c=!1,S(this))};
var S=function(a){a.a=eb(function(){a.a=null;a.c&&!a.g&&(a.c=!1,S(a))},a.o);var b=a.h;a.h=null;a.s.apply(null,b)};var fb=C("Safari")&&!((C("Chrome")||C("CriOS"))&&!C("Edge")||C("Coast")||C("Opera")||C("Edge")||C("Edg/")||C("OPR")||C("Firefox")||C("FxiOS")||C("Silk")||C("Android"))&&!(C("iPhone")&&!C("iPod")&&!C("iPad")||C("iPad")||C("iPod"));var gb={},T=null,hb=cb||db&&!fb||bb||"function"==typeof p.btoa,ib=function(a){if(hb)var b=p.btoa(a);else{b=[];for(var c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}a=void 0;void 0===a&&(a=0);if(!T)for(T={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++){var h=c.concat(d[e].split(""));gb[e]=h;for(var k=0;k<h.length;k++){var m=h[k];void 0===T[m]&&(T[m]=k)}}a=gb[a];c=[];for(d=0;d<b.length;d+=
3){var t=b[d],u=(e=d+1<b.length)?b[d+1]:0;m=(h=d+2<b.length)?b[d+2]:0;k=t>>2;t=(t&3)<<4|u>>4;u=(u&15)<<2|m>>6;m&=63;h||(m=64,e||(u=64));c.push(a[k],a[t],a[u]||"",a[m]||"")}b=c.join("")}return b};var jb=function(a){if(a.K&&"function"==typeof a.K)return a.K();if("string"===typeof a)return a.split("");if(q(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b};var U=function(){this.a=new K},kb=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(Object.prototype.hasOwnProperty.call(a,r)&&a[r]||(a[r]=++ja)):b.substr(0,1)+a};f=U.prototype;f.add=function(a){this.a.set(kb(a),a)};f.removeAll=function(a){a=jb(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};f.remove=function(a){return this.a.remove(kb(a))};f.clear=function(){this.a.clear()};f.contains=function(a){a=kb(a);return M(this.a.a,a)};f.K=function(){return this.a.K()};f.v=function(){return this.a.v(!1)};var V=function(){this.s=new Q(this);this.c=null;this.H=new Ta;this.h=0;this.ga=new Ka;this.B=new K;this.la=!1;this.o=new K;this.F=new K;this.G=[];this.jb=this.Zb.bind(this);this.g=null;this.D=0;this.m=null;this.bb=new R(this.kb,200,this);this.ha=null},lb=function(a){var b=new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER,"Already requesting session");a&&a(b)},W=function(a,b,c,d){c&&La(a.ga,c);void 0!==d?b.sequenceNumber=d:(b.sequenceNumber=a.h,a.h=(a.h+1)%9007199254740992);d=Na(a.s,b);c&&d&&(a=
Ma(a.ga,b.sequenceNumber),b=new chrome.cast.Error(chrome.cast.u.INVALID_PARAMETER,d),(a=a.a)&&a(b))};
V.prototype.R=function(a,b){var c=this;F=this;this.c=a;a.invisibleSender||(a=new PresentationRequest(X(this)),a.getAvailability().then(function(d){d.onchange=function(){c.la=!!d.value;c.c.receiverListener(d.value?chrome.cast.N.AVAILABLE:chrome.cast.N.UNAVAILABLE)};d.onchange()},function(){c.c.receiverListener(chrome.cast.N.AVAILABLE)}),a.onconnectionavailable=function(d){Y(c,d.connection)},this.ha=(p.navigator||null).presentation.defaultRequest=a,a.reconnect(chrome.cast.Va).then(function(d){Y(c,d)},
ha));b&&b(void 0)};V.prototype.ea=function(a){a.navigator.presentation.defaultRequest=this.ha};
var Y=function(a,b,c){c=void 0===c?null:c;b.onclose=function(d){a.g=null;switch(d.reason){case "closed":mb(a,chrome.cast.I.DISCONNECTED);break;case "error":c&&(d=new chrome.cast.Error(chrome.cast.u.SESSION_ERROR),c&&c(d))}};b.onterminate=function(){mb(a,chrome.cast.I.STOPPED)};"connected"==b.state?a.s.connect(b):b.onconnect=function(){a.s.connect(b)}},pb=function(a){var b=Z;nb.has(a.type)&&b.la&&(b.m?(a.sessionId=b.m,ob(b,null,a.type,a,function(){},function(){})):b.bb.m(X(b,void 0,"urn:x-cast:com.google.cast.media",
a)))};V.prototype.kb=function(a){(a=(new PresentationRequest(a)).getAvailability())&&a.then(function(){},function(){})};V.prototype.requestSession=function(a,b,c){var d=this;this.g?lb(b):(c=X(this,c),this.g=a,(new PresentationRequest(c)).start().then(function(e){Y(d,e,b)}).catch(function(e){d.g=null;e=new chrome.cast.Error("AbortError"==e.name||"NotAllowedError"==e.name?chrome.cast.u.CANCEL:chrome.cast.u.SESSION_ERROR);b&&b(e)}))};
var X=function(a,b,c,d){var e=null,h=null,k=b||a.c.sessionRequest,m=k.dialRequest;m&&(e=m.appName,(h=m.launchParameter)&&!h.match(qb)&&(h=ib(h)));var t=[];t.push({appId:k.appId,capabilities:k.capabilities});b||oa(a.c.additionalSessionRequests,function(u){t.push({appId:u.appId,capabilities:u.capabilities})});return Sa(new Qa(t,a.s.c,a.c.autoJoinPolicy,a.c.defaultActionPolicy,k.requestSessionTimeout,e,h,a.c.invisibleSender,c,d,k.androidReceiverCompatible,k.credentialsData))};
V.prototype.ma=function(a,b,c,d){var e=this;this.D++;ob(this,null,b,a,function(h){e.D--;h.g=!0;c&&c(h)},function(h){e.D--;d(h)},chrome.cast.media.timeout.load)};V.prototype.a=function(a,b,c,d,e,h){var k=this;ob(this,a,b,c,function(m){k.Ia(m);d&&d(void 0)},e,h)};
var ob=function(a,b,c,d,e,h,k){d.type=c;null!=b&&(d.mediaSessionId=b.mediaSessionId,d.sessionId=b.sessionId);a.Oa(d,function(m){m.status&&1==m.status.length?e&&e(m.status[0]):(m=new chrome.cast.Error(chrome.cast.u.SESSION_ERROR),h&&h(m))},h,k)};f=V.prototype;f.setReceiverVolume=function(a,b,c,d){b.sessionId=a;W(this,new P("v2_message",b,void 0,chrome.cast.timeout.setReceiverVolume),new O(this.h,c,d,chrome.cast.timeout.sendCustomMessage))};
f.da=function(a){var b=this;(new PresentationRequest(X(this))).reconnect(chrome.cast.sb+a).then(function(c){Y(b,c)},ha)};f.leaveSession=function(a,b,c){W(this,new P("leave_session",a,void 0,chrome.cast.timeout.leaveSession),new O(this.h,b,c,chrome.cast.timeout.leaveSession))};f.Ac=function(a,b,c){W(this,new P("app_message",a,void 0,chrome.cast.timeout.sendCustomMessage),new O(this.h,b,c,chrome.cast.timeout.sendCustomMessage))};
f.Oa=function(a,b,c,d){W(this,new P("v2_message",a,void 0,d),new O(this.h,b,c,d))};var rb=function(a,b,c){var d=a.get(b);d||(d=new U,a.set(b,d));d.add(c)};f=V.prototype;f.Yb=function(a,b){rb(this.B,a,b)};f.zc=function(a,b){(a=this.B.get(a))&&a.remove(b)};f.Y=function(a){this.G.push(a)};f.ba=function(a){a=this.G.indexOf(a);0<=a&&this.G.splice(a,1)};f.Vb=function(a,b,c){var d=this.o.get(a);d||(d=new K,this.o.set(a,d));a=d.get(b);a||(a=new U,d.set(b,a));a.add(c)};
f.wc=function(a,b,c){(a=this.o.get(a))&&(b=a.get(b))&&b.remove(c)};f.X=function(a,b){rb(this.F,a,b)};f.aa=function(a,b){(a=this.F.get(a))&&a.remove(b)};f.Wb=function(a,b){-1==a.c.indexOf(b)&&a.c.push(b)};f.xc=function(a,b){b=a.c.indexOf(b);-1!=b&&a.c.splice(b,1)};f.Ia=function(a){if(a.g){var b=a.playerState!=chrome.cast.media.A.IDLE||null!=a.loadingItemId;a.c.forEach(function(d){d(b)});b||$a(this.H,a)}else if(!(0<this.D)){a.g=!0;var c=this.F.get(a.sessionId);c&&J(c.v(),function(d){d(a)})}};
f.Zb=function(a){return Va(this.H,a)};var mb=function(a,b){if(a.m){var c=a.m;a.m=null;a.s.disconnect();var d=b!=chrome.cast.I.STOPPED;Ua(a.H,c,b)&&(a.o.remove(c),a.F.remove(c),b=a.B.get(c))&&(a.B.remove(c),J(b.v(),function(e){e(d)}))}};
V.prototype.onMessage=function(a){switch(a.type){case "new_session":case "update_session":a.message=Wa(this.H,a.message);break;case "v2_message":var b=a.message;b&&"MEDIA_STATUS"==b.type&&b.status&&(b.status=b.status.map(this.jb))}if(b=Ma(this.ga,a.sequenceNumber))"error"==a.type?(b=b.a)&&b(a.message):(b=b.g)&&b(a.message);if(b=a.message)switch(a.type){case "receiver_action":sb(this,b);break;case "new_session":this.m=b.sessionId;this.g?(this.g(b),this.g=null):this.c&&this.c.sessionListener(b);break;
case "update_session":tb(this,b);break;case "app_message":ub(this,b);break;case "v2_message":"MEDIA_STATUS"==b.type&&b.status.forEach(this.Ia.bind(this));break;case "custom_dial_launch":vb(this,a.sequenceNumber,b)}};
var tb=function(a,b){(a=a.B.get(b.sessionId))&&J(a.v(),function(c){c(!0)})},sb=function(a,b){a.G.forEach(function(c){c(b.receiver,b.action)})},ub=function(a,b){(a=a.o.get(b.sessionId))&&(a=a.get(b.namespaceName))&&J(a.v(),function(c){c(b.namespaceName,b.message)})},wb=function(a,b,c){W(a,new P("custom_dial_launch",c,void 0,chrome.cast.timeout.sendCustomMessage),null,b)},vb=function(a,b,c){a.c.customDialLaunchCallback?a.c.customDialLaunchCallback(c).then(function(d){wb(a,b,d)},function(){wb(a,b)}):
wb(a,b)},qb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nb=new Set(["PRECACHE"]),Z=new V;chrome.cast.R=function(a,b,c){Z.R(a,b,c)};w("chrome.cast.initialize",chrome.cast.R);chrome.cast.ec=function(a,b,c){var d=new V;d.R(a,b,c);return d};w("chrome.cast.initializeWithContext",chrome.cast.ec);chrome.cast.ea=function(a){Z.ea(a)};w("chrome.cast.setPageContext",chrome.cast.ea);chrome.cast.requestSession=function(a,b,c){Z.requestSession(a,b,c)};w("chrome.cast.requestSession",chrome.cast.requestSession);chrome.cast.jc=function(a){pb(new chrome.cast.media.tb(a))};w("chrome.cast.precache",chrome.cast.jc);
chrome.cast.da=function(a){chrome.cast.Na(Z,a)};w("chrome.cast.requestSessionById",chrome.cast.da);chrome.cast.Na=function(a,b){a.da(b)};w("chrome.cast.requestSessionByIdWithContext",chrome.cast.Na);chrome.cast.Y=function(a){Z.Y(a)};w("chrome.cast.addReceiverActionListener",chrome.cast.Y);chrome.cast.ba=function(a){Z.ba(a)};w("chrome.cast.removeReceiverActionListener",chrome.cast.ba);chrome.cast.ic=function(){};w("chrome.cast.logMessage",chrome.cast.ic);chrome.cast.Bc=function(a,b){b()};
w("chrome.cast.setCustomReceivers",chrome.cast.Bc);chrome.cast.Cc=function(a,b){b()};w("chrome.cast.setReceiverDisplayStatus",chrome.cast.Cc);chrome.cast.unescape=function(a){return-1!=a.indexOf("&")?"document"in p?Ea(a):Fa(a):a};w("chrome.cast.unescape",chrome.cast.unescape);chrome.cast.isAvailable=!1;w("chrome.cast.isAvailable",chrome.cast.isAvailable);chrome.cast.Sa=!1;
chrome.cast.fa=function(){if(!chrome.cast.Sa){chrome.cast.Sa=!0;chrome.cast.isAvailable=!0;var a=window.__onGCastApiAvailable;a&&"function"==typeof a&&a(!0)}};"complete"==document.readyState?chrome.cast.fa():(window.addEventListener("load",chrome.cast.fa,!1),window.addEventListener("DOMContentLoaded",chrome.cast.fa,!1));}).call(this);
