(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},k;
if("function"==typeof Object.setPrototypeOf)k=Object.setPrototypeOf;else{var m;a:{var da={Ub:!0},ea={};try{ea.__proto__=da;m=ea.Ub;break a}catch(a){}m=!1}k=m?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var fa=k,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]},p=this||self,ha=function(){},q=function(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"},t=function(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length},v="closure_uid_"+(1E9*Math.random()>>>0),ia=0,ja=function(a,
b,c){return a.call.apply(a.bind,arguments)},ka=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)}},w=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?w=ja:w=ka;return w.apply(null,arguments)},x=Date.now||function(){return+new Date},
y=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},la=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},z=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];y("chrome.cast.VERSION",chrome.cast.VERSION);chrome.cast.Gc=!0;y("chrome.cast.usingPresentationApi",chrome.cast.Gc);chrome.cast.ab=function(a,b){this.credentials=a;this.credentialsType=void 0===b?"web":b};y("chrome.cast.CredentialsData",chrome.cast.ab);chrome.cast.Error=function(a,b,c){this.code=a;this.description=b||null;this.details=c||null};y("chrome.cast.Error",chrome.cast.Error);chrome.cast.Db=function(a){this.platform=a;this.packageId=this.url=null};
y("chrome.cast.SenderApplication",chrome.cast.Db);chrome.cast.Image=function(a){this.url=a;this.width=this.height=null};y("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};y("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"};y("chrome.cast.AutoJoinPolicy",chrome.cast.ka);chrome.cast.na={CREATE_SESSION:"create_session",CAST_THIS_TAB:"cast_this_tab"};y("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"};
y("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"};y("chrome.cast.ErrorCode",chrome.cast.u);chrome.cast.N={AVAILABLE:"available",UNAVAILABLE:"unavailable"};
y("chrome.cast.ReceiverAvailability",chrome.cast.N);chrome.cast.Eb={CHROME:"chrome",IOS:"ios",ANDROID:"android"};y("chrome.cast.SenderPlatform",chrome.cast.Eb);chrome.cast.Ba={CAST:"cast",DIAL:"dial",HANGOUT:"hangout",CUSTOM:"custom"};y("chrome.cast.ReceiverType",chrome.cast.Ba);chrome.cast.eb={RUNNING:"running",STOPPED:"stopped",ERROR:"error"};y("chrome.cast.DialAppState",chrome.cast.eb);chrome.cast.zb={CAST:"cast",STOP:"stop"};y("chrome.cast.ReceiverAction",chrome.cast.zb);
chrome.cast.I={CONNECTED:"connected",DISCONNECTED:"disconnected",STOPPED:"stopped"};y("chrome.cast.SessionStatus",chrome.cast.I);chrome.cast.Sb={ATTENUATION:"attenuation",FIXED:"fixed",MASTER:"master"};y("chrome.cast.VolumeControlType",chrome.cast.Sb);var A=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};la(A,Error);A.prototype.name="CustomError";var B=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");A.call(this,c+a[d])};la(B,A);B.prototype.name="AssertionError";var ma=function(a,b){throw new B("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var na=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,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},oa=function(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 C;var pa=/&/g,qa=/</g,ra=/>/g,sa=/"/g,ta=/'/g,ua=/\x00/g,va=/[\x00&<>"']/;var D;a:{var wa=p.navigator;if(wa){var xa=wa.userAgent;if(xa){D=xa;break a}}D=""}var E=function(a){return-1!=D.indexOf(a)};var F=function(){this.a="";this.f=ya};F.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var za=function(a){if(a instanceof F&&a.constructor===F&&a.f===ya)return a.a;ma("expected object of type SafeHtml, got '"+a+"' of type "+q(a));return"type_error:SafeHtml"},ya={},Aa=new F;Aa.a=p.trustedTypes&&p.trustedTypes.emptyHTML?p.trustedTypes.emptyHTML:"";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 g=b[d];if(g)return g;"#"==e.charAt(0)&&(e=Number("0"+e.substr(1)),isNaN(e)||(g=String.fromCharCode(e)));if(!g){g=d+" ";e=new F;if(void 0===C){var h=null;var l=p.trustedTypes;if(l&&l.createPolicy){try{h=l.createPolicy("goog#html",{createHTML:z,createScript:z,createScriptURL:z})}catch(r){p.console&&p.console.error(r.message)}C=h}else C=h}h=C;e.a=h?h.createHTML(g):
g;if(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(e);g=c.firstChild.nodeValue.slice(0,-1)}return b[d]=g})},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=[]};y("chrome.cast.ApiConfig",chrome.cast.Wa);chrome.cast.hb=function(a,b){this.appName=a;this.launchParameter=b||null};y("chrome.cast.DialRequest",chrome.cast.hb);
chrome.cast.fb=function(a,b,c){this.receiver=a;this.appState=b;this.extraData=c||null};y("chrome.cast.DialLaunchData",chrome.cast.fb);chrome.cast.gb=function(a,b){this.doLaunch=a;this.launchParameter=b||null};y("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};y("chrome.cast.SessionRequest",chrome.cast.Fb);
chrome.cast.yb=function(a,b,c,d){this.label=a;a=b;va.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(pa,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(qa,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(ra,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(sa,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(ta,"&#39;")),-1!=a.indexOf("\x00")&&(a=a.replace(ua,"&#0;")));this.friendlyName=a;this.capabilities=c||[];this.volume=d||null;this.receiverType=chrome.cast.Ba.CAST;this.displayStatus=this.isActiveInput=null};
y("chrome.cast.Receiver",chrome.cast.yb);chrome.cast.Ab=function(a,b){this.statusText=a;this.appImages=b;this.showStop=null};y("chrome.cast.ReceiverDisplayStatus",chrome.cast.Ab);chrome.cast.Ea=function(){this.requestSession=6E4;this.sendCustomMessage=this.setReceiverVolume=this.stopSession=this.leaveSession=3E3};y("chrome.cast.Timeout",chrome.cast.Ea);chrome.cast.timeout=new chrome.cast.Ea;y("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"};y("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"};y("chrome.cast.media.HlsSegmentFormat",chrome.cast.media.mb);chrome.cast.media.nb={MPEG2_TS:"mpeg2_ts",FMP4:"fmp4"};y("chrome.cast.media.HlsVideoSegmentFormat",chrome.cast.media.nb);chrome.cast.media.qb={PAUSE:"pause",SEEK:"seek",STREAM_VOLUME:"stream_volume",STREAM_MUTE:"stream_mute"};
y("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"};y("chrome.cast.media.QueueType",chrome.cast.media.wb);chrome.cast.media.V={GENERIC_CONTAINER:0,AUDIOBOOK_CONTAINER:1};y("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};y("chrome.cast.media.MetadataType",chrome.cast.media.C);chrome.cast.media.A={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"};y("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"};y("chrome.cast.media.RepeatMode",chrome.cast.media.W);
chrome.cast.media.Bb={PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"};y("chrome.cast.media.ResumeState",chrome.cast.media.Bb);chrome.cast.media.Da={BUFFERED:"BUFFERED",LIVE:"LIVE",OTHER:"OTHER"};y("chrome.cast.media.StreamType",chrome.cast.media.Da);chrome.cast.media.ob={CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"};y("chrome.cast.media.IdleReason",chrome.cast.media.ob);chrome.cast.media.Nb={TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"};
y("chrome.cast.media.TrackType",chrome.cast.media.Nb);chrome.cast.media.Kb={SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"};y("chrome.cast.media.TextTrackType",chrome.cast.media.Kb);chrome.cast.media.Gb={NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"};y("chrome.cast.media.TextTrackEdgeType",chrome.cast.media.Gb);chrome.cast.media.Lb={NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"};
y("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"};y("chrome.cast.media.TextTrackFontGenericFamily",chrome.cast.media.Hb);chrome.cast.media.Ib={NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"};y("chrome.cast.media.TextTrackFontStyle",chrome.cast.media.Ib);
chrome.cast.media.Ob={LIKE:"LIKE",DISLIKE:"DISLIKE",FOLLOW:"FOLLOW",UNFOLLOW:"UNFOLLOW"};y("chrome.cast.media.UserAction",chrome.cast.media.Ob);chrome.cast.media.pa=function(){this.customData=null};y("chrome.cast.media.GetStatusRequest",chrome.cast.media.pa);chrome.cast.media.ta=function(){this.customData=null};y("chrome.cast.media.PauseRequest",chrome.cast.media.ta);chrome.cast.media.va=function(){this.customData=null};y("chrome.cast.media.PlayRequest",chrome.cast.media.va);chrome.cast.media.Cb=function(){this.customData=this.resumeState=this.currentTime=null};y("chrome.cast.media.SeekRequest",chrome.cast.media.Cb);
chrome.cast.media.Ca=function(){this.customData=null};y("chrome.cast.media.StopRequest",chrome.cast.media.Ca);chrome.cast.media.Tb=function(a){this.volume=a;this.customData=null};y("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};y("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};y("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};y("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};y("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);
y("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);y("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);y("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);y("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);y("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);y("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);y("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};y("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};y("chrome.cast.media.QueueItem",chrome.cast.media.xa);chrome.cast.media.cb="CC1AD845";y("chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID",chrome.cast.media.cb);chrome.cast.media.timeout={};chrome.cast.media.timeout.load=0;y("chrome.cast.media.timeout.load",chrome.cast.media.timeout.load);
chrome.cast.media.timeout.P=0;y("chrome.cast.media.timeout.getStatus",chrome.cast.media.timeout.P);chrome.cast.media.timeout.play=0;y("chrome.cast.media.timeout.play",chrome.cast.media.timeout.play);chrome.cast.media.timeout.pause=0;y("chrome.cast.media.timeout.pause",chrome.cast.media.timeout.pause);chrome.cast.media.timeout.seek=0;y("chrome.cast.media.timeout.seek",chrome.cast.media.timeout.seek);chrome.cast.media.timeout.stop=0;y("chrome.cast.media.timeout.stop",chrome.cast.media.timeout.stop);
chrome.cast.media.timeout.S=0;y("chrome.cast.media.timeout.setVolume",chrome.cast.media.timeout.S);chrome.cast.media.timeout.O=0;y("chrome.cast.media.timeout.editTracksInfo",chrome.cast.media.timeout.O);chrome.cast.media.timeout.l=0;y("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};y("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};y("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};
y("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};y("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};y("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};y("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};y("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};y("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};y("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};y("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};y("chrome.cast.media.BreakClip",chrome.cast.media.Ya);
chrome.cast.media.Qb=function(){this.adsResponse=this.adTagUrl=void 0};y("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};y("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};y("chrome.cast.media.LiveSeekableRange",chrome.cast.media.qa);
chrome.cast.media.ub=function(a,b,c,d,e,g,h){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=g;this.startTime=h;this.containerMetadata=void 0};y("chrome.cast.media.QueueData",chrome.cast.media.ub);chrome.cast.media.Pb=function(a){this.userAction=a;this.customData=void 0};y("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};
y("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.f=[];this.liveSeekableRange=
void 0};y("chrome.cast.media.Media",chrome.cast.media.b);chrome.cast.media.b.prototype.P=function(a,b,c){a||(a=new chrome.cast.media.pa);G.a(this,"MEDIA_GET_STATUS",a,b,c,chrome.cast.media.timeout.P)};chrome.cast.media.b.prototype.getStatus=chrome.cast.media.b.prototype.P;chrome.cast.media.b.prototype.play=function(a,b,c){this.Ka(G,a,b,c)};chrome.cast.media.b.prototype.play=chrome.cast.media.b.prototype.play;
chrome.cast.media.b.prototype.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)};chrome.cast.media.b.prototype.playWithContext=chrome.cast.media.b.prototype.Ka;chrome.cast.media.b.prototype.pause=function(a,b,c){this.Ja(G,a,b,c)};chrome.cast.media.b.prototype.pause=chrome.cast.media.b.prototype.pause;chrome.cast.media.b.prototype.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)};
chrome.cast.media.b.prototype.pauseWithContext=chrome.cast.media.b.prototype.Ja;chrome.cast.media.b.prototype.seek=function(a,b,c){G.a(this,"SEEK",a,b,c,chrome.cast.media.timeout.seek)};chrome.cast.media.b.prototype.seek=chrome.cast.media.b.prototype.seek;chrome.cast.media.b.prototype.stop=function(a,b,c){a||(a=new chrome.cast.media.Ca);G.a(this,"STOP_MEDIA",a,b,c,chrome.cast.media.timeout.stop)};chrome.cast.media.b.prototype.stop=chrome.cast.media.b.prototype.stop;
chrome.cast.media.b.prototype.S=function(a,b,c){G.a(this,"MEDIA_SET_VOLUME",a,b,c,chrome.cast.media.timeout.S)};chrome.cast.media.b.prototype.setVolume=chrome.cast.media.b.prototype.S;chrome.cast.media.b.prototype.O=function(a,b,c){G.a(this,"EDIT_TRACKS_INFO",a,b,c,chrome.cast.media.timeout.O)};chrome.cast.media.b.prototype.editTracksInfo=chrome.cast.media.b.prototype.O;chrome.cast.media.b.prototype.lc=function(a,b,c){G.a(this,"QUEUE_INSERT",a,b,c,chrome.cast.media.timeout.l)};
chrome.cast.media.b.prototype.queueInsertItems=chrome.cast.media.b.prototype.lc;chrome.cast.media.b.prototype.kc=function(a,b,c){G.a(this,"QUEUE_INSERT",new chrome.cast.media.wa([a]),b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueAppendItem=chrome.cast.media.b.prototype.kc;chrome.cast.media.b.prototype.vc=function(a,b,c){G.a(this,"QUEUE_UPDATE",a,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueUpdateItems=chrome.cast.media.b.prototype.vc;
chrome.cast.media.b.prototype.qc=function(a,b){var c=new chrome.cast.media.M;c.jump=-1;G.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queuePrev=chrome.cast.media.b.prototype.qc;chrome.cast.media.b.prototype.pc=function(a,b){var c=new chrome.cast.media.M;c.jump=1;G.a(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueNext=chrome.cast.media.b.prototype.pc;
chrome.cast.media.b.prototype.mc=function(a,b,c){if(!(0>H(this,a))){var d=new chrome.cast.media.M;d.currentItemId=a;G.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)}};chrome.cast.media.b.prototype.queueJumpToItem=chrome.cast.media.b.prototype.mc;chrome.cast.media.b.prototype.uc=function(a,b,c){var d=new chrome.cast.media.Aa;d.repeatMode=a;G.a(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueSetRepeatMode=chrome.cast.media.b.prototype.uc;
chrome.cast.media.b.prototype.sc=function(a,b,c){G.a(this,"QUEUE_REMOVE",a,b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueRemoveItems=chrome.cast.media.b.prototype.sc;chrome.cast.media.b.prototype.rc=function(a,b,c){0>H(this,a)||G.a(this,"QUEUE_REMOVE",new chrome.cast.media.ya([a]),b,c,chrome.cast.media.timeout.l)};chrome.cast.media.b.prototype.queueRemoveItem=chrome.cast.media.b.prototype.rc;chrome.cast.media.b.prototype.tc=function(a,b,c){G.a(this,"QUEUE_REORDER",a,b,c,chrome.cast.media.timeout.l)};
chrome.cast.media.b.prototype.queueReorderItems=chrome.cast.media.b.prototype.tc;chrome.cast.media.b.prototype.oc=function(a,b,c,d){var e=H(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 g=null;b=b>e?b+1:b;b<this.items.length&&(g=this.items[b]);a=new chrome.cast.media.za([a]);a.insertBefore=g?g.itemId:null;G.a(this,"QUEUE_REORDER",a,c,d,chrome.cast.media.timeout.l)}};chrome.cast.media.b.prototype.queueMoveItemToNewIndex=chrome.cast.media.b.prototype.oc;
chrome.cast.media.b.prototype.Fc=function(a){return-1<this.supportedMediaCommands.indexOf(a)};chrome.cast.media.b.prototype.supportsCommand=chrome.cast.media.b.prototype.Fc;chrome.cast.media.b.prototype.dc=function(){if(this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a){var a=(x()-this.a)/1E3;a=this.currentTime+this.playbackRate*a;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};
chrome.cast.media.b.prototype.getEstimatedTime=chrome.cast.media.b.prototype.dc;chrome.cast.media.b.prototype.bc=function(){if(this.breakStatus&&void 0!==this.breakStatus.currentBreakTime)return this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a?this.breakStatus.currentBreakTime+(x()-this.a)/1E3:this.breakStatus.currentBreakTime};chrome.cast.media.b.prototype.getEstimatedBreakTime=chrome.cast.media.b.prototype.bc;
chrome.cast.media.b.prototype.ac=function(){if(this.breakStatus&&void 0!==this.breakStatus.currentBreakClipTime)return this.playerState==chrome.cast.media.A.PLAYING&&0<=this.a?this.breakStatus.currentBreakClipTime+(x()-this.a)/1E3:this.breakStatus.currentBreakClipTime};chrome.cast.media.b.prototype.getEstimatedBreakClipTime=chrome.cast.media.b.prototype.ac;
chrome.cast.media.b.prototype.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=(x()-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}};chrome.cast.media.b.prototype.getEstimatedLiveSeekableRange=chrome.cast.media.b.prototype.cc;chrome.cast.media.b.prototype.Z=function(a){this.J(G,a)};chrome.cast.media.b.prototype.addUpdateListener=chrome.cast.media.b.prototype.Z;chrome.cast.media.b.prototype.J=function(a,b){a.Wb(this,b)};chrome.cast.media.b.prototype.addUpdateListenerWithContext=chrome.cast.media.b.prototype.J;chrome.cast.media.b.prototype.ca=function(a){this.L(G,a)};
chrome.cast.media.b.prototype.removeUpdateListener=chrome.cast.media.b.prototype.ca;chrome.cast.media.b.prototype.L=function(a,b){G.xc(this,b)};chrome.cast.media.b.prototype.removeUpdateListenerWithContext=chrome.cast.media.b.prototype.L;var H=function(a,b){return oa(a.items,function(c){return c.itemId==b})};var G=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.c=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=""};y("chrome.cast.Session",chrome.cast.c);chrome.cast.c.prototype.Ec=function(a,b,c){this.Ra(G,a,b,c)};chrome.cast.c.prototype.setReceiverVolumeLevel=chrome.cast.c.prototype.Ec;
chrome.cast.c.prototype.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)};chrome.cast.c.prototype.setReceiverVolumeLevelWithContext=chrome.cast.c.prototype.Ra;chrome.cast.c.prototype.Dc=function(a,b,c){this.Qa(G,a,b,c)};chrome.cast.c.prototype.setReceiverMuted=chrome.cast.c.prototype.Dc;
chrome.cast.c.prototype.Qa=function(a,b,c,d){a=new Ha(new chrome.cast.Volume(null,b),this.receiver.volume);G.setReceiverVolume(this.sessionId,a,c,d)};chrome.cast.c.prototype.setReceiverMutedWithContext=chrome.cast.c.prototype.Qa;chrome.cast.c.prototype.fc=function(a,b){G.leaveSession(this.sessionId,a,b)};chrome.cast.c.prototype.leave=chrome.cast.c.prototype.fc;chrome.cast.c.prototype.stop=function(a,b){this.Ta(G,a,b)};chrome.cast.c.prototype.stop=chrome.cast.c.prototype.stop;
chrome.cast.c.prototype.Ta=function(a,b,c){a.Oa(new Ia(this.sessionId),b,c,chrome.cast.timeout.stopSession)};chrome.cast.c.prototype.stopWithContext=chrome.cast.c.prototype.Ta;chrome.cast.c.prototype.sendMessage=function(a,b,c,d){this.Pa(G,a,b,c,d)};chrome.cast.c.prototype.sendMessage=chrome.cast.c.prototype.sendMessage;chrome.cast.c.prototype.Pa=function(a,b,c,d,e){a.Ac(new Ga(this.sessionId,b,c),d,e)};chrome.cast.c.prototype.sendMessageWithContext=chrome.cast.c.prototype.Pa;
chrome.cast.c.prototype.Z=function(a){this.J(G,a)};chrome.cast.c.prototype.addUpdateListener=chrome.cast.c.prototype.Z;chrome.cast.c.prototype.J=function(a,b){a.Yb(this.sessionId,b)};chrome.cast.c.prototype.addUpdateListenerWithContext=chrome.cast.c.prototype.J;chrome.cast.c.prototype.ca=function(a){this.L(G,a)};chrome.cast.c.prototype.removeUpdateListener=chrome.cast.c.prototype.ca;chrome.cast.c.prototype.L=function(a,b){a.zc(this.sessionId,b)};
chrome.cast.c.prototype.removeUpdateListenerWithContext=chrome.cast.c.prototype.L;chrome.cast.c.prototype.Xb=function(a,b){this.Ha(G,a,b)};chrome.cast.c.prototype.addMessageListener=chrome.cast.c.prototype.Xb;chrome.cast.c.prototype.Ha=function(a,b,c){a.Vb(this.sessionId,b,c)};chrome.cast.c.prototype.addMessageListenerWithContext=chrome.cast.c.prototype.Ha;chrome.cast.c.prototype.X=function(a){this.Ga(G,a)};chrome.cast.c.prototype.addMediaListener=chrome.cast.c.prototype.X;
chrome.cast.c.prototype.Ga=function(a,b){a.X(this.sessionId,b)};chrome.cast.c.prototype.addMediaListenerWithContext=chrome.cast.c.prototype.Ga;chrome.cast.c.prototype.aa=function(a){this.La(G,a)};chrome.cast.c.prototype.removeMediaListener=chrome.cast.c.prototype.aa;chrome.cast.c.prototype.La=function(a,b){a.aa(this.sessionId,b)};chrome.cast.c.prototype.removeMediaListenerWithContext=chrome.cast.c.prototype.La;chrome.cast.c.prototype.yc=function(a,b){this.Ma(G,a,b)};
chrome.cast.c.prototype.removeMessageListener=chrome.cast.c.prototype.yc;chrome.cast.c.prototype.Ma=function(a,b,c){a.wc(this.sessionId,b,c)};chrome.cast.c.prototype.removeMessageListenerWithContext=chrome.cast.c.prototype.Ma;chrome.cast.c.prototype.hc=function(a,b,c){a.sessionId=this.sessionId;G.ma(a,"LOAD",b,c)};chrome.cast.c.prototype.loadMedia=chrome.cast.c.prototype.hc;chrome.cast.c.prototype.nc=function(a,b,c){a.sessionId=this.sessionId;G.ma(a,"QUEUE_LOAD",b,c)};
chrome.cast.c.prototype.queueLoad=chrome.cast.c.prototype.nc;var I="StopIteration"in p?p.StopIteration:{message:"StopIteration",stack:""},J=function(){};J.prototype.next=function(){throw I;};J.prototype.v=function(){return this};
var Ja=function(a){if(a instanceof J)return a;if("function"==typeof a.v)return a.v(!1);if(t(a)){var b=0,c=new J;c.next=function(){for(;;){if(b>=a.length)throw I;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},K=function(a,b){if(t(a))try{na(a,b,void 0)}catch(c){if(c!==I)throw c;}else{a=Ja(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==I)throw c;}}};var L=function(a,b){this.a={};this.i=[];this.g=this.f=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 L)for(M(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])};L.prototype.K=function(){M(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.a[this.i[b]]);return a};L.prototype.clear=function(){this.a={};this.g=this.f=this.i.length=0};
L.prototype.remove=function(a){return N(this.a,a)?(delete this.a[a],this.f--,this.g++,this.i.length>2*this.f&&M(this),!0):!1};var M=function(a){if(a.f!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];N(a.a,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.f!=a.i.length){var e={};for(c=b=0;b<a.i.length;)d=a.i[b],N(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};L.prototype.get=function(a,b){return N(this.a,a)?this.a[a]:b};
L.prototype.set=function(a,b){N(this.a,a)||(this.f++,this.i.push(a),this.g++);this.a[a]=b};L.prototype.v=function(a){M(this);var b=0,c=this.g,d=this,e=new J;e.next=function(){if(c!=d.g)throw Error("The map has changed since the iterator was created");if(b>=d.i.length)throw I;var g=d.i[b++];return a?g:d.a[g]};return e};var N=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var O=function(a,b){this.requestId=a;this.h=b;this.Ua=null};O.prototype.f=function(){};var Ka=function(){this.a=new L},La=function(a,b){a.a.set(b.requestId,b);b.Ua=setTimeout(function(){a.a.remove(b.requestId);b.f()},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 P=function(a,b,c,d){O.call(this,a,d||6E5);this.g=b;this.a=c};n(P,O);P.prototype.f=function(){this.a(new chrome.cast.Error(chrome.cast.u.TIMEOUT))};var Q=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 R=function(a){this.g=a;this.f=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.f;b=JSON.stringify(b);if(32768<b.length)return"Message length over limit";a.a.send(b);return null};R.prototype.connect=function(a){this.a=a;this.a.onmessage=w(this.h,this);Na(this,new Q("client_connect",this.f))};R.prototype.disconnect=function(){this.a.close();this.a=null};
R.prototype.h=function(a){a=JSON.parse(a.data);if(a.clientId==this.f)this.g.onMessage(a)};var Oa=function(a,b,c){this.g=a;this.f=b;this.a=c},Pa=function(a){var b="cast-dial:"+a.g,c=new URLSearchParams;a.f&&c.set("dialPostData",a.f);a.a&&c.set("clientId",a.a);(a=c.toString())&&(b+="?"+a);return b};var Qa=function(a,b,c,d,e,g,h,l,r,u,Ya,Za){this.D=a;this.a=b||null;this.f=c||null;this.o=d||null;this.s=void 0!==e?e:null;this.B=g||null;this.G=h||null;this.F=l||!1;this.h=r||null;this.g=u||null;this.H=Ya?["WEB","ANDROID_TV"]:["WEB"];this.m=Za||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.f&&e.set("autoJoinPolicy",a.f);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.f={}},Ua=function(a,b,c){var d=a.a[b];return d?(d.status=c,d.media.forEach(function(e){delete a.f[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.c(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.f[c];d||(d=new chrome.cast.media.b(b.sessionId,b.mediaSessionId),a.f[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 g=a.items;c={};if(g)for(var h=0;h<g.length;h++)c[g[h].itemId]=h;b=ba(b.items);for(g=b.next();!g.done;g=b.next()){g=g.value;if(!g.media){h=g.itemId;var l=a.items?a.items[c[h]]:null;l&&l.media?g.media=l.media:h==a.currentItemId&&
a.media&&(g.media=a.media)}e.push(Xa(g))}a.items=e}return d},$a=function(a,b){delete a.f[b.sessionId+"#"+b.mediaSessionId];if(a=a.a[b.sessionId])b=a.media.indexOf(b),-1!=b&&a.media.splice(b,1)},Xa=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=E("Opera"),cb=E("Gecko")&&!(-1!=D.toLowerCase().indexOf("webkit")&&!E("Edge"))&&!(E("Trident")||E("MSIE"))&&!E("Edge"),db=-1!=D.toLowerCase().indexOf("webkit")&&!E("Edge");try{(new self.OffscreenCanvas(0,0)).getContext("2d")}catch(a){};var eb=function(a,b){if("function"!=q(a))if(a&&"function"==typeof a.handleEvent)a=w(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:p.setTimeout(a,b||0)};var S=function(a,b,c){this.s=null!=c?a.bind(c):a;this.o=b;this.h=null;this.f=!1;this.g=0;this.a=null};n(S,ab);S.prototype.m=function(a){this.h=arguments;this.a||this.g?this.f=!0:T(this)};S.prototype.stop=function(){this.a&&(p.clearTimeout(this.a),this.a=null,this.f=!1,this.h=null)};S.prototype.pause=function(){this.g++};S.prototype.resume=function(){this.g--;this.g||!this.f||this.a||(this.f=!1,T(this))};
var T=function(a){a.a=eb(function(){a.a=null;a.f&&!a.g&&(a.f=!1,T(a))},a.o);var b=a.h;a.h=null;a.s.apply(null,b)};var fb=E("Safari")&&!((E("Chrome")||E("CriOS"))&&!E("Edge")||E("Coast")||E("Opera")||E("Edge")||E("Edg/")||E("OPR")||E("Firefox")||E("FxiOS")||E("Silk")||E("Android"))&&!(E("iPhone")&&!E("iPod")&&!E("iPad")||E("iPad")||E("iPod"));var gb={},U=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(!U)for(U={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++){var g=c.concat(d[e].split(""));gb[e]=g;for(var h=0;h<g.length;h++){var l=g[h];void 0===U[l]&&(U[l]=h)}}a=gb[a];c=[];for(d=0;d<b.length;d+=
3){var r=b[d],u=(e=d+1<b.length)?b[d+1]:0;l=(g=d+2<b.length)?b[d+2]:0;h=r>>2;r=(r&3)<<4|u>>4;u=(u&15)<<2|l>>6;l&=63;g||(l=64,e||(u=64));c.push(a[h],a[r],a[u]||"",a[l]||"")}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(t(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 kb=function(){this.a=new L},lb=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(Object.prototype.hasOwnProperty.call(a,v)&&a[v]||(a[v]=++ia)):b.substr(0,1)+a};f=kb.prototype;f.add=function(a){this.a.set(lb(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(lb(a))};f.clear=function(){this.a.clear()};f.contains=function(a){a=lb(a);return N(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 R(this);this.f=null;this.H=new Ta;this.h=0;this.ga=new Ka;this.B=new L;this.la=!1;this.o=new L;this.F=new L;this.G=[];this.jb=this.Zb.bind(this);this.g=null;this.D=0;this.m=null;this.bb=new S(this.kb,200,this);this.ha=null},mb=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;G=this;this.f=a;a.invisibleSender||(a=new PresentationRequest(X(this)),a.getAvailability().then(function(d){d.onchange=function(){c.la=!!d.value;c.f.receiverListener(d.value?chrome.cast.N.AVAILABLE:chrome.cast.N.UNAVAILABLE)};d.onchange()},function(){c.f.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":nb(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(){nb(a,chrome.cast.I.STOPPED)};"connected"==b.state?a.s.connect(b):b.onconnect=function(){a.s.connect(b)}},qb=function(a){var b=Z;ob.has(a.type)&&b.la&&(b.m?(a.sessionId=b.m,pb(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?mb(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,g=null,h=b||a.f.sessionRequest,l=h.dialRequest;l&&(e=l.appName,(g=l.launchParameter)&&!g.match(rb)&&(g=ib(g)));var r=[];r.push({appId:h.appId,capabilities:h.capabilities});b||na(a.f.additionalSessionRequests,function(u){r.push({appId:u.appId,capabilities:u.capabilities})});return Sa(new Qa(r,a.s.f,a.f.autoJoinPolicy,a.f.defaultActionPolicy,h.requestSessionTimeout,e,g,a.f.invisibleSender,c,d,h.androidReceiverCompatible,h.credentialsData))};
V.prototype.ma=function(a,b,c,d){var e=this;this.D++;pb(this,null,b,a,function(g){e.D--;g.g=!0;c&&c(g)},function(g){e.D--;d(g)},chrome.cast.media.timeout.load)};V.prototype.a=function(a,b,c,d,e,g){var h=this;pb(this,a,b,c,function(l){h.Ia(l);d&&d(void 0)},e,g)};
var pb=function(a,b,c,d,e,g,h){d.type=c;null!=b&&(d.mediaSessionId=b.mediaSessionId,d.sessionId=b.sessionId);a.Oa(d,function(l){l.status&&1==l.status.length?e&&e(l.status[0]):(l=new chrome.cast.Error(chrome.cast.u.SESSION_ERROR),g&&g(l))},g,h)};f=V.prototype;f.setReceiverVolume=function(a,b,c,d){b.sessionId=a;W(this,new Q("v2_message",b,void 0,chrome.cast.timeout.setReceiverVolume),new P(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 Q("leave_session",a,void 0,chrome.cast.timeout.leaveSession),new P(this.h,b,c,chrome.cast.timeout.leaveSession))};f.Ac=function(a,b,c){W(this,new Q("app_message",a,void 0,chrome.cast.timeout.sendCustomMessage),new P(this.h,b,c,chrome.cast.timeout.sendCustomMessage))};
f.Oa=function(a,b,c,d){W(this,new Q("v2_message",a,void 0,d),new P(this.h,b,c,d))};var sb=function(a,b,c){var d=a.get(b);d||(d=new kb,a.set(b,d));d.add(c)};f=V.prototype;f.Yb=function(a,b){sb(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 L,this.o.set(a,d));a=d.get(b);a||(a=new kb,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){sb(this.F,a,b)};f.aa=function(a,b){(a=this.F.get(a))&&a.remove(b)};f.Wb=function(a,b){-1==a.f.indexOf(b)&&a.f.push(b)};f.xc=function(a,b){b=a.f.indexOf(b);-1!=b&&a.f.splice(b,1)};f.Ia=function(a){if(a.g){var b=a.playerState!=chrome.cast.media.A.IDLE||null!=a.loadingItemId;a.f.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&&K(c.v(),function(d){d(a)})}};
f.Zb=function(a){return Va(this.H,a)};var nb=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),K(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":tb(this,b);break;case "new_session":this.m=b.sessionId;this.g?(this.g(b),this.g=null):this.f&&this.f.sessionListener(b);break;
case "update_session":ub(this,b);break;case "app_message":vb(this,b);break;case "v2_message":"MEDIA_STATUS"==b.type&&b.status.forEach(this.Ia.bind(this));break;case "custom_dial_launch":wb(this,a.sequenceNumber,b)}};
var ub=function(a,b){(a=a.B.get(b.sessionId))&&K(a.v(),function(c){c(!0)})},tb=function(a,b){a.G.forEach(function(c){c(b.receiver,b.action)})},vb=function(a,b){(a=a.o.get(b.sessionId))&&(a=a.get(b.namespaceName))&&K(a.v(),function(c){c(b.namespaceName,b.message)})},xb=function(a,b,c){W(a,new Q("custom_dial_launch",c,void 0,chrome.cast.timeout.sendCustomMessage),null,b)},wb=function(a,b,c){a.f.customDialLaunchCallback?a.f.customDialLaunchCallback(c).then(function(d){xb(a,b,d)},function(){xb(a,b)}):
xb(a,b)},rb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ob=new Set(["PRECACHE"]),Z=new V;chrome.cast.R=function(a,b,c){Z.R(a,b,c)};y("chrome.cast.initialize",chrome.cast.R);chrome.cast.ec=function(a,b,c){var d=new V;d.R(a,b,c);return d};y("chrome.cast.initializeWithContext",chrome.cast.ec);chrome.cast.ea=function(a){Z.ea(a)};y("chrome.cast.setPageContext",chrome.cast.ea);chrome.cast.requestSession=function(a,b,c){Z.requestSession(a,b,c)};y("chrome.cast.requestSession",chrome.cast.requestSession);chrome.cast.jc=function(a){qb(new chrome.cast.media.tb(a))};y("chrome.cast.precache",chrome.cast.jc);
chrome.cast.da=function(a){chrome.cast.Na(Z,a)};y("chrome.cast.requestSessionById",chrome.cast.da);chrome.cast.Na=function(a,b){a.da(b)};y("chrome.cast.requestSessionByIdWithContext",chrome.cast.Na);chrome.cast.Y=function(a){Z.Y(a)};y("chrome.cast.addReceiverActionListener",chrome.cast.Y);chrome.cast.ba=function(a){Z.ba(a)};y("chrome.cast.removeReceiverActionListener",chrome.cast.ba);chrome.cast.ic=function(){};y("chrome.cast.logMessage",chrome.cast.ic);chrome.cast.Bc=function(a,b){b()};
y("chrome.cast.setCustomReceivers",chrome.cast.Bc);chrome.cast.Cc=function(a,b){b()};y("chrome.cast.setReceiverDisplayStatus",chrome.cast.Cc);chrome.cast.unescape=function(a){return-1!=a.indexOf("&")?"document"in p?Ea(a):Fa(a):a};y("chrome.cast.unescape",chrome.cast.unescape);chrome.cast.isAvailable=!1;y("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);
