1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DX4embJU.js","./SxTMtrMD.js","./WlC7hOMx.js","./entry.8QCOb_Jj.css","./bundle.Ct9wau4u.css"])))=>i.map(i=>d[i]); 2import{_ as l}from"./WlC7hOMx.js";import{l as d,g,aj as p,an as u,d as m,m as C}from"./SxTMtrMD.js";function h(){return"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"}function f(){return!!window.cast?.framework}function w(){return!!window.chrome?.cast?.isAvailable}function i(){return o().getCastState()===cast.framework.CastState.CONNECTED}function o(){return window.cast.framework.CastContext.getInstance()}function c(){return o().getCurrentSession()}function v(){return c()?.getSessionObj().media[0]}function k(e){return v()?.media.contentId===e?.src}function E(){return{language:"en-US",autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,resumeSavedSession:!0,androidReceiverCompatible:!0}}function y(e){return`Google Cast Error Code: ${e}`}function I(e,t){return d(o(),e,t)}var S=class{name="google-cast";target;#e;get cast(){return o()}mediaType(){return"video"}canPlay(e){return g&&!p&&u(e)}async prompt(e){let t,a,r;try{t=await this.#r(e),this.#e||(this.#e=new cast.framework.RemotePlayer,new cast.framework.RemotePlayerController(this.#e)),a=e.player.createEvent("google-cast-prompt-open",{trigger:t}),e.player.dispatchEvent(a),this.#t(e,"connecting",a),await this.#o(m(e.$props.googleCast)),e.$state.remotePlaybackInfo.set({deviceName:c()?.getCastDevice().friendlyName}),i()&&this.#t(e,"connected",a)}catch(s){const n=s instanceof Error?s:this.#a((s+"").toUpperCase(),"Prompt failed.");throw r=e.player.createEvent("google-cast-prompt-error",{detail:n,trigger:a??t,cancelable:!0}),e.player.dispatch(r),this.#t(e,i()?"connected":"disconnected",r),n}finally{e.player.dispatch("google-cast-prompt-close",{trigger:r??a??t})}}async load(e){if(!this.#e)throw Error("[vidstack] google cast player was not initialized");return new(await l(()=>import("./DX4embJU.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).GoogleCastProvider(this.#e,e)}async#r(e){if(f())return;const t=e.player.createEvent("google-cast-load-start");e.player.dispatch(t),await C(h()),await customElements.whenDefined("google-cast-launcher");const a=e.player.createEvent("google-cast-loaded",{trigger:t});if(e.player.dispatch(a),!w())throw this.#a("CAST_NOT_AVAILABLE","Google Cast not available on this platform.");return a}async#o(e){this.#s(e);const t=await this.cast.requestSession();if(t)throw this.#a(t.toUpperCase(),y(t))}#s(e){this.cast?.setOptions({...E(),...e})}#t(e,t,a){const r={type:"google-cast",state:t};e.notify("remote-playback-change",r,a)}#a(e,t){const a=Error(t);return a.code=e,a}};const A=Object.freeze(Object.defineProperty({__proto__:null,GoogleCastLoader:S},Symbol.toStringTag,{value:"Module"}));export{c as a,v as b,y as c,o as g,k as h,I as l,A as v};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.