@burdenoff/microfe-eventfullymanaged 2026.1123.4 → 2026.1123.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,15 @@
1
- import { VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL as e, VIRTUAL_SIGNAL_SUBSCRIPTION_SDL as t, useEndVirtualSessionMutation as n, useEventQuery as r, useHostVirtualSessionMutation as i, useJoinVirtualSessionMutation as a, useLeaveVirtualSessionMutation as o, usePromoteVirtualPresenterMutation as s, useSendVirtualSignalMutation as ee, useSetVirtualMuteMutation as te, useSetVirtualVideoMutation as ne, useVirtualSessionQuery as c } from "../../api/eventApi.js";
2
- import { useEventfullyManaged as l } from "../../context/EventfullyManagedContext.js";
1
+ import { VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL as e, VIRTUAL_SIGNAL_SUBSCRIPTION_SDL as t, useEndVirtualSessionMutation as n, useEventQuery as r, useHostVirtualSessionMutation as i, useJoinVirtualSessionMutation as a, useLeaveVirtualSessionMutation as o, usePromoteVirtualPresenterMutation as s, useSendVirtualSignalMutation as ee, useSetVirtualMuteMutation as te, useSetVirtualVideoMutation as c, useVirtualSessionQuery as l } from "../../api/eventApi.js";
2
+ import { useEventfullyManaged as ne } from "../../context/EventfullyManagedContext.js";
3
3
  import { useEvmSubscription as u } from "../../hooks/useEvmSubscription.js";
4
4
  import { useVirtualCall as re } from "../../hooks/useVirtualCall.js";
5
5
  import { describeError as d, mutationSucceeded as f } from "../../lib/mutationResult.js";
6
6
  import { notify as p } from "../../lib/toast.js";
7
- import { useCallback as ie, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
7
+ import { VirtualEngagementPanel as m } from "./VirtualEngagementPanel.js";
8
+ import { useCallback as ie, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
8
9
  import { useParams as ae } from "react-router";
9
- import { Fragment as oe, jsx as v, jsxs as y } from "react/jsx-runtime";
10
- import { ArrowLeft as se, Mic as ce, MicOff as b, PhoneOff as x, Radio as le, ScreenShare as ue, Users as de, Video as S, VideoOff as C } from "lucide-react";
11
- import { Badge as w, Button as T, EmphasisPanel as E, GlassCard as D, GradientText as fe, IllustratedEmptyState as O, PagePurpose as pe, Select as me, SelectContent as he, SelectItem as k, SelectTrigger as ge, SelectValue as _e, Skeleton as A } from "@burdenoff/fe-libs/ui";
10
+ import { Fragment as oe, jsx as y, jsxs as b } from "react/jsx-runtime";
11
+ import { ArrowLeft as x, Mic as S, MicOff as C, PhoneOff as se, Radio as ce, ScreenShare as le, Users as ue, Video as w, VideoOff as de } from "lucide-react";
12
+ import { Badge as T, Button as E, EmphasisPanel as fe, GlassCard as D, GradientText as pe, IllustratedEmptyState as O, PagePurpose as me, Select as he, SelectContent as ge, SelectItem as k, SelectTrigger as _e, SelectValue as ve, Skeleton as A } from "@burdenoff/fe-libs/ui";
12
13
  // src/eventfullymanaged/pages/events/VirtualSessionPage.tsx
13
14
  function j(e) {
14
15
  return e.slice(0, 2).toUpperCase();
@@ -17,32 +18,32 @@ function M(e) {
17
18
  return e === "connected" ? "bg-status-success" : e === "connecting" || e === "new" ? "bg-status-warning" : e === "failed" || e === "disconnected" || e === "closed" ? "bg-status-danger" : "bg-text-muted";
18
19
  }
19
20
  function N({ actorId: e, role: t, isLocal: n, stream: r, muted: i, videoEnabled: a, connectionState: o }) {
20
- let s = g(null);
21
- return m(() => {
21
+ let s = _(null);
22
+ return h(() => {
22
23
  s.current && (s.current.srcObject = r);
23
- }, [r]), /* @__PURE__ */ y("div", {
24
+ }, [r]), /* @__PURE__ */ b("div", {
24
25
  className: "relative aspect-video overflow-hidden rounded-card border border-border-seam bg-bg-sunken",
25
- children: [r && a ? /* @__PURE__ */ v("video", {
26
+ children: [r && a ? /* @__PURE__ */ y("video", {
26
27
  ref: s,
27
28
  autoPlay: !0,
28
29
  playsInline: !0,
29
30
  muted: n,
30
31
  className: "h-full w-full object-cover",
31
32
  style: n ? { transform: "scaleX(-1)" } : void 0
32
- }) : /* @__PURE__ */ v("div", {
33
+ }) : /* @__PURE__ */ y("div", {
33
34
  className: "flex h-full w-full items-center justify-center",
34
- children: /* @__PURE__ */ v("span", {
35
+ children: /* @__PURE__ */ y("span", {
35
36
  className: "flex h-12 w-12 items-center justify-center rounded-full bg-accent-primary/10 text-sm font-semibold text-accent-primary",
36
37
  children: j(e)
37
38
  })
38
- }), /* @__PURE__ */ y("div", {
39
+ }), /* @__PURE__ */ b("div", {
39
40
  className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-bg-overlay to-transparent p-2",
40
- children: [/* @__PURE__ */ y("span", {
41
+ children: [/* @__PURE__ */ b("span", {
41
42
  className: "truncate text-xs font-medium text-action-primary-text",
42
43
  children: [n ? "You" : `Participant ${e.slice(0, 6)}`, t === "HOST" ? " · Host" : t === "PRESENTER" ? " · Presenter" : ""]
43
- }), /* @__PURE__ */ y("span", {
44
+ }), /* @__PURE__ */ b("span", {
44
45
  className: "flex items-center gap-1.5",
45
- children: [i ? /* @__PURE__ */ v(b, { className: "h-3.5 w-3.5 text-action-primary-text" }) : null, n ? null : /* @__PURE__ */ v("span", {
46
+ children: [i ? /* @__PURE__ */ y(C, { className: "h-3.5 w-3.5 text-action-primary-text" }) : null, n ? null : /* @__PURE__ */ y("span", {
46
47
  className: `h-2 w-2 rounded-full ${M(o)}`,
47
48
  title: o ?? "connecting"
48
49
  })]
@@ -51,296 +52,300 @@ function N({ actorId: e, role: t, isLocal: n, stream: r, muted: i, videoEnabled:
51
52
  });
52
53
  }
53
54
  function P() {
54
- let { id: g = "" } = ae(), { navigate: j, currentUser: P } = l(), F = P?.id ?? "", { data: I, loading: ve } = r(g), L = c({ eventId: g }), R = L.data?.virtualSession ?? null, [z, ye] = _("MEETING"), [be, { loading: B }] = i(), [xe, { loading: V }] = a(), [Se, { loading: H }] = o(), [Ce, { loading: U }] = n(), [we] = te(), [Te] = ne(), [Ee] = s(), [W] = ee(), G = h(() => R?.participants.find((e) => e.actorId === F && !e.leftAt) ?? null, [R, F]), K = h(() => (R?.participants ?? []).filter((e) => !e.leftAt), [R]), [q, J] = _(!1), [Y, X] = _(!1);
55
- m(() => {
56
- G && (J(G.muted), X(!G.videoEnabled));
57
- }, [G?.muted, G?.videoEnabled]);
58
- let De = ie(async (e) => {
59
- R && await W({ variables: {
60
- sessionId: R.id,
55
+ let { id: _ = "" } = ae(), { navigate: j, currentUser: P } = ne(), F = P?.id ?? "", { data: ye, loading: be } = r(_), I = l({ eventId: _ }), L = I.data?.virtualSession ?? null, [R, xe] = v("MEETING"), [Se, { loading: z }] = i(), [Ce, { loading: B }] = a(), [we, { loading: V }] = o(), [Te, { loading: H }] = n(), [Ee] = te(), [De] = c(), [Oe] = s(), [U] = ee(), W = g(() => L?.participants.find((e) => e.actorId === F && !e.leftAt) ?? null, [L, F]), G = g(() => (L?.participants ?? []).filter((e) => !e.leftAt), [L]), [K, q] = v(!1), [J, Y] = v(!1);
56
+ h(() => {
57
+ W && (q(W.muted), Y(!W.videoEnabled));
58
+ }, [W?.muted, W?.videoEnabled]);
59
+ let ke = ie(async (e) => {
60
+ L && await U({ variables: {
61
+ sessionId: L.id,
61
62
  toActorId: e.toActorId,
62
63
  signalType: e.signalType,
63
64
  payload: e.payload
64
65
  } });
65
- }, [R, W]), Z = re({
66
- sessionId: G ? R?.id : null,
66
+ }, [L, U]), X = re({
67
+ sessionId: W ? L?.id : null,
67
68
  selfActorId: F,
68
- mode: R?.mode ?? "MEETING",
69
- selfRole: G?.role ?? null,
70
- participants: K.map((e) => ({
69
+ mode: L?.mode ?? "MEETING",
70
+ selfRole: W?.role ?? null,
71
+ participants: G.map((e) => ({
71
72
  actorId: e.actorId,
72
73
  role: e.role
73
74
  })),
74
- sendSignal: De,
75
- muted: q,
76
- videoEnabled: !Y
75
+ sendSignal: ke,
76
+ muted: K,
77
+ videoEnabled: !J
77
78
  });
78
79
  u({
79
80
  query: t,
80
- variables: { sessionId: R?.id },
81
+ variables: { sessionId: L?.id },
81
82
  operationName: "EventfullymanagedVirtualSignal",
82
- enabled: !!(G && R),
83
+ enabled: !!(W && L),
83
84
  onData: (e) => {
84
85
  let t = e.eventfullyManagedVirtualSignal;
85
- t && Z.handleIncomingSignal(t);
86
+ t && X.handleIncomingSignal(t);
86
87
  },
87
88
  pollFn: () => {},
88
89
  pollIntervalMs: 15e3
89
90
  }), u({
90
91
  query: e,
91
- variables: { sessionId: R?.id },
92
+ variables: { sessionId: L?.id },
92
93
  operationName: "EventfullymanagedVirtualParticipantsChanged",
93
- enabled: !!R,
94
+ enabled: !!L,
94
95
  onData: () => {
95
- L.refetch();
96
+ I.refetch();
96
97
  },
97
98
  pollFn: () => {
98
- L.refetch();
99
+ I.refetch();
99
100
  },
100
101
  pollIntervalMs: 5e3
101
102
  });
102
- let Oe = async (e) => {
103
+ let Ae = async (e) => {
103
104
  try {
104
- let t = await be({ variables: {
105
- eventId: g,
105
+ let t = await Se({ variables: {
106
+ eventId: _,
106
107
  mode: e
107
108
  } });
108
109
  if (!f(t, t.data?.hostVirtualSession?.id, "Could not start session")) return;
109
- p.success("Session started", e === "WEBINAR" ? "Hosting as a webinar." : "Hosting a meeting."), await L.refetch();
110
+ p.success("Session started", e === "WEBINAR" ? "Hosting as a webinar." : "Hosting a meeting."), await I.refetch();
110
111
  } catch (e) {
111
112
  p.error("Could not start session", d(e));
112
113
  }
113
- }, ke = async () => {
114
+ }, je = async () => {
114
115
  try {
115
- let e = await xe({ variables: { eventId: g } });
116
+ let e = await Ce({ variables: { eventId: _ } });
116
117
  if (!f(e, e.data?.joinVirtualSession?.id, "Could not join session")) return;
117
- await L.refetch();
118
+ await I.refetch();
118
119
  } catch (e) {
119
120
  p.error("Could not join session", d(e));
120
121
  }
121
- }, Ae = async () => {
122
- if (R) try {
123
- await Se({ variables: { sessionId: R.id } }), p.success("Left session", "You are no longer in the virtual session."), await L.refetch();
122
+ }, Me = async () => {
123
+ if (L) try {
124
+ await we({ variables: { sessionId: L.id } }), p.success("Left session", "You are no longer in the virtual session."), await I.refetch();
124
125
  } catch (e) {
125
126
  p.error("Could not leave session", d(e));
126
127
  }
127
- }, je = async () => {
128
- if (R) try {
129
- await Ce({ variables: { sessionId: R.id } }), p.success("Session ended", "The virtual session has been ended for everyone."), await L.refetch();
128
+ }, Z = async () => {
129
+ if (L) try {
130
+ await Te({ variables: { sessionId: L.id } }), p.success("Session ended", "The virtual session has been ended for everyone."), await I.refetch();
130
131
  } catch (e) {
131
132
  p.error("Could not end session", d(e));
132
133
  }
133
- }, Me = async () => {
134
- if (!R) return;
135
- let e = !q;
136
- J(e);
134
+ }, Ne = async () => {
135
+ if (!L) return;
136
+ let e = !K;
137
+ q(e);
137
138
  try {
138
- await we({ variables: {
139
- sessionId: R.id,
139
+ await Ee({ variables: {
140
+ sessionId: L.id,
140
141
  muted: e
141
142
  } });
142
143
  } catch (t) {
143
- J(!e), p.error("Could not update mute state", d(t));
144
+ q(!e), p.error("Could not update mute state", d(t));
144
145
  }
145
- }, Ne = async () => {
146
- if (!R) return;
147
- let e = !Y;
148
- X(e);
146
+ }, Pe = async () => {
147
+ if (!L) return;
148
+ let e = !J;
149
+ Y(e);
149
150
  try {
150
- await Te({ variables: {
151
- sessionId: R.id,
151
+ await De({ variables: {
152
+ sessionId: L.id,
152
153
  videoEnabled: !e
153
154
  } });
154
155
  } catch (t) {
155
- X(!e), p.error("Could not update camera state", d(t));
156
+ Y(!e), p.error("Could not update camera state", d(t));
156
157
  }
157
- }, Pe = async (e) => {
158
- if (R) try {
159
- await Ee({ variables: {
160
- sessionId: R.id,
158
+ }, Fe = async (e) => {
159
+ if (L) try {
160
+ await Oe({ variables: {
161
+ sessionId: L.id,
161
162
  actorId: e.actorId
162
- } }), p.success("Promoted to presenter", `Participant ${e.actorId.slice(0, 6)} can now broadcast.`), await L.refetch();
163
+ } }), p.success("Promoted to presenter", `Participant ${e.actorId.slice(0, 6)} can now broadcast.`), await I.refetch();
163
164
  } catch (e) {
164
165
  p.error("Could not promote participant", d(e));
165
166
  }
166
- }, Q = G?.role === "HOST", $ = B || V || H || U;
167
- return ve || L.loading ? /* @__PURE__ */ y("div", {
167
+ }, Q = W?.role === "HOST", $ = z || B || V || H;
168
+ return be || I.loading ? /* @__PURE__ */ b("div", {
168
169
  className: "space-y-4 p-6",
169
- children: [/* @__PURE__ */ v(A, { className: "h-8 w-64" }), /* @__PURE__ */ v(A, { className: "h-64 w-full" })]
170
- }) : /* @__PURE__ */ y("div", {
170
+ children: [/* @__PURE__ */ y(A, { className: "h-8 w-64" }), /* @__PURE__ */ y(A, { className: "h-64 w-full" })]
171
+ }) : /* @__PURE__ */ b("div", {
171
172
  className: "space-y-6 p-6",
172
173
  children: [
173
- /* @__PURE__ */ y(T, {
174
+ /* @__PURE__ */ b(E, {
174
175
  type: "button",
175
176
  variant: "ghost",
176
177
  size: "sm",
177
- onClick: () => j(`/events/${g}`),
178
- children: [/* @__PURE__ */ v(se, { className: "h-4 w-4" }), "Back to Event"]
178
+ onClick: () => j(`/events/${_}`),
179
+ children: [/* @__PURE__ */ y(x, { className: "h-4 w-4" }), "Back to Event"]
179
180
  }),
180
- /* @__PURE__ */ v(pe, { children: "A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers." }),
181
- /* @__PURE__ */ y(E, {
181
+ /* @__PURE__ */ y(me, { children: "A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers." }),
182
+ /* @__PURE__ */ b(fe, {
182
183
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
183
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
184
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
184
185
  className: "text-2xl font-bold text-text-primary",
185
- children: /* @__PURE__ */ v(fe, { children: "Virtual Session" })
186
- }), /* @__PURE__ */ v("p", {
186
+ children: /* @__PURE__ */ y(pe, { children: "Virtual Session" })
187
+ }), /* @__PURE__ */ y("p", {
187
188
  className: "mt-1 text-sm text-text-secondary",
188
- children: I?.event?.name ?? "Event"
189
- })] }), R ? /* @__PURE__ */ y(w, {
190
- variant: R.status === "ACTIVE" ? "success" : "secondary",
189
+ children: ye?.event?.name ?? "Event"
190
+ })] }), L ? /* @__PURE__ */ b(T, {
191
+ variant: L.status === "ACTIVE" ? "success" : "secondary",
191
192
  className: "uppercase",
192
193
  children: [
193
- R.mode,
194
+ L.mode,
194
195
  " · ",
195
- R.status
196
+ L.status
196
197
  ]
197
198
  }) : null]
198
199
  }),
199
- !R || R.status !== "ACTIVE" ? /* @__PURE__ */ y(D, {
200
+ !L || L.status !== "ACTIVE" ? /* @__PURE__ */ b(D, {
200
201
  treatment: "plain",
201
202
  className: "border-border-seam p-8",
202
- children: [/* @__PURE__ */ v(O, {
203
+ children: [/* @__PURE__ */ y(O, {
203
204
  illustration: "empty-data",
204
205
  title: "No live virtual session",
205
206
  description: "Start a session to host attendees over WebRTC, or join once someone else has started one.",
206
207
  className: "py-6"
207
- }), /* @__PURE__ */ y("div", {
208
+ }), /* @__PURE__ */ b("div", {
208
209
  className: "mt-4 flex flex-wrap items-center justify-center gap-2",
209
- children: [/* @__PURE__ */ y(me, {
210
- value: z,
211
- onValueChange: (e) => ye(e),
212
- children: [/* @__PURE__ */ v(ge, {
210
+ children: [/* @__PURE__ */ b(he, {
211
+ value: R,
212
+ onValueChange: (e) => xe(e),
213
+ children: [/* @__PURE__ */ y(_e, {
213
214
  "aria-label": "Session mode",
214
215
  className: "w-48",
215
- children: /* @__PURE__ */ v(_e, {})
216
- }), /* @__PURE__ */ y(he, { children: [/* @__PURE__ */ v(k, {
216
+ children: /* @__PURE__ */ y(ve, {})
217
+ }), /* @__PURE__ */ b(ge, { children: [/* @__PURE__ */ y(k, {
217
218
  value: "MEETING",
218
219
  children: "Meeting (up to 8)"
219
- }), /* @__PURE__ */ v(k, {
220
+ }), /* @__PURE__ */ y(k, {
220
221
  value: "WEBINAR",
221
222
  children: "Webinar (up to 30)"
222
223
  })] })]
223
- }), /* @__PURE__ */ y(T, {
224
+ }), /* @__PURE__ */ b(E, {
224
225
  type: "button",
225
- onClick: () => Oe(z),
226
+ onClick: () => Ae(R),
226
227
  disabled: $,
227
- children: [/* @__PURE__ */ v(le, { className: "h-4 w-4" }), B ? "Starting…" : "Start session"]
228
+ children: [/* @__PURE__ */ y(ce, { className: "h-4 w-4" }), z ? "Starting…" : "Start session"]
228
229
  })]
229
230
  })]
230
- }) : G ? /* @__PURE__ */ y(oe, { children: [
231
- Z.mediaError ? /* @__PURE__ */ y(D, {
231
+ }) : W ? /* @__PURE__ */ b(oe, { children: [
232
+ X.mediaError ? /* @__PURE__ */ b(D, {
232
233
  treatment: "plain",
233
234
  className: "border-status-danger/40 bg-status-danger/5 p-4 text-sm text-status-danger",
234
235
  children: [
235
236
  "Camera/microphone unavailable: ",
236
- Z.mediaError,
237
+ X.mediaError,
237
238
  ". You are still connected to the session and can see other participants, but others will not see or hear you."
238
239
  ]
239
240
  }) : null,
240
- /* @__PURE__ */ y("div", {
241
+ /* @__PURE__ */ b("div", {
241
242
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
242
- children: [/* @__PURE__ */ v(N, {
243
+ children: [/* @__PURE__ */ y(N, {
243
244
  actorId: F,
244
- role: G.role,
245
+ role: W.role,
245
246
  isLocal: !0,
246
- stream: Z.localStream,
247
- muted: q,
248
- videoEnabled: !Y
249
- }), K.filter((e) => e.actorId !== F).map((e) => /* @__PURE__ */ v(N, {
247
+ stream: X.localStream,
248
+ muted: K,
249
+ videoEnabled: !J
250
+ }), G.filter((e) => e.actorId !== F).map((e) => /* @__PURE__ */ y(N, {
250
251
  actorId: e.actorId,
251
252
  role: e.role,
252
253
  isLocal: !1,
253
- stream: Z.remoteStreams.get(e.actorId) ?? null,
254
+ stream: X.remoteStreams.get(e.actorId) ?? null,
254
255
  muted: e.muted,
255
256
  videoEnabled: e.videoEnabled,
256
- connectionState: Z.connectionStates.get(e.actorId)
257
+ connectionState: X.connectionStates.get(e.actorId)
257
258
  }, e.actorId))]
258
259
  }),
259
- /* @__PURE__ */ y(D, {
260
+ /* @__PURE__ */ b(D, {
260
261
  treatment: "plain",
261
262
  className: "flex flex-wrap items-center justify-center gap-2 border-border-seam p-4",
262
263
  children: [
263
- /* @__PURE__ */ y(T, {
264
+ /* @__PURE__ */ b(E, {
264
265
  type: "button",
265
- variant: q ? "outline" : "secondary",
266
- onClick: Me,
267
- children: [v(q ? b : ce, { className: "h-4 w-4" }), q ? "Unmute" : "Mute"]
266
+ variant: K ? "outline" : "secondary",
267
+ onClick: Ne,
268
+ children: [y(K ? C : S, { className: "h-4 w-4" }), K ? "Unmute" : "Mute"]
268
269
  }),
269
- /* @__PURE__ */ y(T, {
270
+ /* @__PURE__ */ b(E, {
270
271
  type: "button",
271
- variant: Y ? "outline" : "secondary",
272
- onClick: Ne,
273
- children: [v(Y ? C : S, { className: "h-4 w-4" }), Y ? "Start Video" : "Stop Video"]
272
+ variant: J ? "outline" : "secondary",
273
+ onClick: Pe,
274
+ children: [y(J ? de : w, { className: "h-4 w-4" }), J ? "Start Video" : "Stop Video"]
274
275
  }),
275
- /* @__PURE__ */ y(T, {
276
+ /* @__PURE__ */ b(E, {
276
277
  type: "button",
277
278
  variant: "outline",
278
- onClick: Ae,
279
+ onClick: Me,
279
280
  disabled: $,
280
- children: [/* @__PURE__ */ v(x, { className: "h-4 w-4" }), H ? "Leaving…" : "Leave"]
281
+ children: [/* @__PURE__ */ y(se, { className: "h-4 w-4" }), V ? "Leaving…" : "Leave"]
281
282
  }),
282
- Q ? /* @__PURE__ */ y(T, {
283
+ Q ? /* @__PURE__ */ b(E, {
283
284
  type: "button",
284
285
  variant: "destructive",
285
- onClick: je,
286
+ onClick: Z,
286
287
  disabled: $,
287
- children: [/* @__PURE__ */ v(ue, { className: "h-4 w-4" }), U ? "Ending…" : "End for everyone"]
288
+ children: [/* @__PURE__ */ y(le, { className: "h-4 w-4" }), H ? "Ending…" : "End for everyone"]
288
289
  }) : null
289
290
  ]
290
291
  }),
291
- /* @__PURE__ */ y(D, {
292
+ /* @__PURE__ */ y(m, {
293
+ sessionId: L.id,
294
+ canModerate: !!W && L.hostId === F
295
+ }, L.id),
296
+ /* @__PURE__ */ b(D, {
292
297
  treatment: "plain",
293
298
  className: "border-border-seam p-4",
294
- children: [/* @__PURE__ */ y("h2", {
299
+ children: [/* @__PURE__ */ b("h2", {
295
300
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
296
301
  children: [
297
- /* @__PURE__ */ v(de, { className: "h-4 w-4 text-accent-primary" }),
302
+ /* @__PURE__ */ y(ue, { className: "h-4 w-4 text-accent-primary" }),
298
303
  "Participants (",
299
- K.length,
304
+ G.length,
300
305
  "/",
301
- R.maxParticipants,
306
+ L.maxParticipants,
302
307
  ")"
303
308
  ]
304
- }), /* @__PURE__ */ v("div", {
309
+ }), /* @__PURE__ */ y("div", {
305
310
  className: "mt-3 space-y-2",
306
- children: K.map((e) => /* @__PURE__ */ y("div", {
311
+ children: G.map((e) => /* @__PURE__ */ b("div", {
307
312
  className: "flex items-center justify-between gap-2 text-sm",
308
- children: [/* @__PURE__ */ y("span", {
313
+ children: [/* @__PURE__ */ b("span", {
309
314
  className: "flex items-center gap-2 text-text-secondary",
310
315
  children: [
311
- /* @__PURE__ */ v("span", { className: `h-2 w-2 rounded-full ${e.actorId === F ? "bg-status-success" : M(Z.connectionStates.get(e.actorId))}` }),
316
+ /* @__PURE__ */ y("span", { className: `h-2 w-2 rounded-full ${e.actorId === F ? "bg-status-success" : M(X.connectionStates.get(e.actorId))}` }),
312
317
  e.actorId === F ? "You" : `Participant ${e.actorId.slice(0, 6)}`,
313
- /* @__PURE__ */ v(w, {
318
+ /* @__PURE__ */ y(T, {
314
319
  variant: "secondary",
315
320
  className: "uppercase",
316
321
  children: e.role
317
322
  })
318
323
  ]
319
- }), Q && R.mode === "WEBINAR" && e.role === "ATTENDEE" ? /* @__PURE__ */ v(T, {
324
+ }), Q && L.mode === "WEBINAR" && e.role === "ATTENDEE" ? /* @__PURE__ */ y(E, {
320
325
  type: "button",
321
326
  variant: "ghost",
322
327
  size: "sm",
323
- onClick: () => Pe(e),
328
+ onClick: () => Fe(e),
324
329
  children: "Promote to presenter"
325
330
  }) : null]
326
331
  }, e.id))
327
332
  })]
328
333
  })
329
- ] }) : /* @__PURE__ */ y(D, {
334
+ ] }) : /* @__PURE__ */ b(D, {
330
335
  treatment: "plain",
331
336
  className: "border-border-seam p-8",
332
- children: [/* @__PURE__ */ v(O, {
337
+ children: [/* @__PURE__ */ y(O, {
333
338
  illustration: "empty-people",
334
339
  title: "A session is live",
335
- description: `${R.participantCount} of ${R.maxParticipants} seats in use. Join to turn on your camera and mic.`,
340
+ description: `${L.participantCount} of ${L.maxParticipants} seats in use. Join to turn on your camera and mic.`,
336
341
  className: "py-6"
337
- }), /* @__PURE__ */ v("div", {
342
+ }), /* @__PURE__ */ y("div", {
338
343
  className: "mt-4 flex justify-center",
339
- children: /* @__PURE__ */ y(T, {
344
+ children: /* @__PURE__ */ b(E, {
340
345
  type: "button",
341
- onClick: ke,
346
+ onClick: je,
342
347
  disabled: $,
343
- children: [/* @__PURE__ */ v(S, { className: "h-4 w-4" }), V ? "Joining…" : "Join session"]
348
+ children: [/* @__PURE__ */ y(w, { className: "h-4 w-4" }), B ? "Joining…" : "Join session"]
344
349
  })
345
350
  })]
346
351
  })