1import{r as g}from"./vendor-core-CUMhuV44.js";function m(){const s=g(!1),r=g(null),t=()=>window.Echo??null;return{isConnected:s,connectionError:r,isAvailable:()=>window.Echo!=null,getEcho:t,subscribeToConversation:(e,n)=>{const o=t();if(!o)return r.value="Echo not initialized",null;const i=o.private(`conversation.${e}`);return n.onMessage&&i.listen(".message.sent",n.onMessage),n.onTyping&&i.listenForWhisper("typing",n.onTyping),n.onMessageRead&&i.listen(".message.read",n.onMessageRead),n.onParticipantLeft&&i.listen(".participant.left",n.onParticipantLeft),n.onReactionToggled&&i.listen(".reaction.toggled",n.onReactionToggled),n.onPollVoted&&i.listen(".poll.voted",n.onPollVoted),s.value=!0,i},subscribeToUserChannel:(e,n)=>{const o=t();if(!o)return r.value="Echo not initialized",null;const i=o.private(`user.${e}`);return n.onNewConversation&&i.listen(".conversation.created",n.onNewConversation),n.onNotification&&(i.listen(".notification",n.onNotification),i.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",u=>{n.onNotification({type:u.type||"unknown",data:u})})),n.onGuildAnnouncement&&i.listen(".guild.announcement",n.onGuildAnnouncement),n.onPermissionsUpdated&&i.listen(".permissions.updated",n.onPermissionsUpdated),n.onApplicationStatusChanged&&i.listen(".application.status_changed",n.onApplicationStatusChanged),i},subscribeToGuildManagers:(e,n)=>{const o=t();if(!o)return r.value="Echo not initialized",null;const i=o.private(`guild-managers.${e}`);return n.onRankUp&&i.listen(".guild.rank_up",n.onRankUp),i},joinTypingChannel:(e,n)=>{const o=t();if(!o)return r.value="Echo not initialized",null;const i=o.join(`conversation.${e}.typing`);return n.onHere&&i.here(n.onHere),n.onJoining&&i.joining(n.onJoining),n.onLeaving&&i.leaving(n.onLeaving),i},joinGlobalPresence:e=>{const n=t();if(!n)return r.value="Echo not initialized",null;const o=n.join("presence.online");return e.onHere&&o.here(e.onHere),e.onJoining&&o.joining(e.onJoining),e.onLeaving&&o.leaving(e.onLeaving),e.onPresenceChanged&&o.listen(".user.presence",e.onPresenceChanged),o},sendTypingIndicator:(e,n)=>{const o=t();o&&o.private(`conversation.${e}`).whisper("typing",{typing:n})},leaveChannel:e=>{const n=t();n&&n.leave(e)},disconnect:()=>{const e=t();e&&(e.disconnect(),s.value=!1)}}}export{m as u};
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.