try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3aef8a7f-ba5d-4ea2-8e85-a49b0992a0e4`,e._sentryDebugIdIdentifier=`sentry-dbid-3aef8a7f-ba5d-4ea2-8e85-a49b0992a0e4`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{u as e}from"./vendor-misc-hfpbxrii.js";import{Ri as t,Yi as n,Zi as r}from"./entry.client-dr7r6s9a.js";import{R as i}from"./workspace-leaf-files-mc5sghv7.js";import{t as a}from"./BasePlugin-nelnyp3q.js";import{t as o}from"./dist-igm7e9mu.js";var s=e(),c=o();t();var l=class extends a{hasConsumedSignInAction=!1;get canBeRemoved(){return this.pluginCount===0}chatSocketSagaManager;pluginCount=0;xblTokenProvider;cVProvider;interceptors;logger;constructor(e,t,n,r,a,o){super(e,i,o),this.xblTokenProvider=t,this.cVProvider=n,this.interceptors=r,this.logger=a,this.chatSocketSagaManager=new c.ChatSocketSagaManager([],new c.SeededSeqNumProvider(0),new s.ReconnectingWebSocketFactory,this.xblTokenProvider,this.cVProvider,this.logger,this.interceptors)}destroy(){}*handleActions(){yield n([this.chatSocketSagaManager.watchForActions()])}addPlugin(e){return new Promise((t,n)=>{let i=this;this.reduxEnvironment.sagaMiddleware.run(this.name,function*(){try{let n=yield r([i.chatSocketSagaManager,i.chatSocketSagaManager.addPlugin],e);i.pluginCount++,t(n)}catch(e){n(e)}})})}removePlugin(e){return new Promise((t,n)=>{let i=this;this.reduxEnvironment.sagaMiddleware.run(this.name,function*(){try{yield r([i.chatSocketSagaManager,i.chatSocketSagaManager.removePlugin],e),i.pluginCount--,t()}catch(e){n(e)}})})}socketConnected(){return this.chatSocketSagaManager.isConnected}};export{l as ChatSocketPlugin};