import * as e from "react";
import j, { useState as le, useMemo as me } from "react";
import { c as Le, w as Re, r as xe, m as Ae, a as Q } from "./room-BGS9nDH_.mjs";
import { C as De, S as Be, a as Oe, u as ae, M as Y, b as _e, c as He, T as K, d as Ve, P as $e, e as pe, f as he, g as Ue, h as se, i as ze, j as We, k as qe, l as je, D as ne, m as ue, n as Ge, o as fe, L as ce, G as Ee, p as X, F as ge, q as ve, r as ke, R as Se, s as be, t as Ke, v as Je, w as Qe, x as Ye, y as de, z as Ze, A as Xe, B as Fe, E as et } from "./components-B4NSQgV8.mjs";
import { w as tt, x as ie, y as nt, a as at, z as Ce, A as st, B as Ne, C as ye, n as F, m as we, D as ct } from "./hooks-Ciw65R3n.mjs";
import { k as Pe, h as G, an as it, ao as rt, l as _, ap as ot, a as lt, aq as ut, ar as dt, as as mt, at as pt, au as ht, av as Me, a2 as J, aw as Te, ax as Ie, f as ft } from "./contexts-qVJoFpjK.mjs";
import { Track as w, facingModeFromLocalTrack as Et, Mutex as gt, createLocalTracks as vt, createLocalVideoTrack as kt, VideoPresets as St, createLocalAudioTrack as bt, ConnectionState as Ct, RoomEvent as q } from "@cc-livekit/livekit-client";
function re({
  messageFormatter: t,
  messageDecoder: s,
  messageEncoder: a,
  channelTopic: n,
  ...l
}) {
  const u = e.useRef(null), d = e.useRef(null), f = e.useMemo(() => ({ messageDecoder: s, messageEncoder: a, channelTopic: n }), [s, a, n]), { send: c, chatMessages: m, isSending: p } = tt(f), N = Pe(), E = e.useRef(0);
  async function i(r) {
    r.preventDefault(), u.current && u.current.value.trim() !== "" && c && (await c(u.current.value), u.current.value = "", u.current.focus());
  }
  return e.useEffect(() => {
    var r;
    d && ((r = d.current) == null || r.scrollTo({ top: d.current.scrollHeight }));
  }, [d, m]), e.useEffect(() => {
    var v, y, C, g, k;
    if (!N || m.length === 0)
      return;
    if ((v = N.widget.state) != null && v.showChat && m.length > 0 && E.current !== ((y = m[m.length - 1]) == null ? void 0 : y.timestamp)) {
      E.current = (C = m[m.length - 1]) == null ? void 0 : C.timestamp;
      return;
    }
    const r = m.filter(
      (S) => !E.current || S.timestamp > E.current
    ).length, { widget: o } = N;
    r > 0 && ((g = o.state) == null ? void 0 : g.unreadMessages) !== r && ((k = o.dispatch) == null || k.call(o, { msg: "unread_msg", count: r }));
  }, [m, N == null ? void 0 : N.widget]), /* @__PURE__ */ e.createElement("div", { ...l, className: "lk-chat" }, /* @__PURE__ */ e.createElement("div", { className: "lk-chat-header" }, "Messages", N && /* @__PURE__ */ e.createElement(De, { className: "lk-close-button" }, /* @__PURE__ */ e.createElement(Be, null))), /* @__PURE__ */ e.createElement("ul", { className: "lk-list lk-chat-messages", ref: d }, l.children ? m.map(
    (r, o) => Le(l.children, {
      entry: r,
      key: r.id ?? o,
      messageFormatter: t
    })
  ) : m.map((r, o, v) => {
    const y = o >= 1 && v[o - 1].from === r.from, C = o >= 1 && r.timestamp - v[o - 1].timestamp < 6e4;
    return /* @__PURE__ */ e.createElement(
      Oe,
      {
        key: r.id ?? o,
        hideName: y,
        hideTimestamp: y === !1 ? !1 : C,
        entry: r,
        messageFormatter: t
      }
    );
  })), /* @__PURE__ */ e.createElement("form", { className: "lk-chat-form", onSubmit: i }, /* @__PURE__ */ e.createElement(
    "input",
    {
      className: "lk-form-control lk-chat-form-input",
      disabled: p,
      ref: u,
      type: "text",
      placeholder: "Enter a message...",
      onInput: (r) => r.stopPropagation(),
      onKeyDown: (r) => r.stopPropagation(),
      onKeyUp: (r) => r.stopPropagation()
    }
  ), /* @__PURE__ */ e.createElement("button", { type: "submit", className: "lk-button lk-chat-form-button", disabled: p }, "Send")));
}
const Nt = {
  micNoiseSuppression: "Mic Noise Suppression"
}, yt = {
  micNoiseSuppression: "麦克风噪声抑制"
}, wt = {
  en: Nt,
  "zh-CN": yt
};
function Pt() {
  const { locale: t = "en" } = G() ?? {};
  return ae((a) => {
    var n;
    return ((n = wt[t]) == null ? void 0 : n[a]) ?? a;
  });
}
function Z({
  kind: t,
  initialSelection: s,
  onActiveDeviceChange: a,
  tracks: n,
  requestPermissions: l = !1,
  ...u
}) {
  const [d, f] = e.useState(!1), [c, m] = e.useState([]), [p, N] = e.useState(!0), [E, i] = e.useState(l), { denoiseEnable: r, onDenoiseEnableChange: o } = G() ?? {}, v = Pt(), y = (S, I) => {
    _.debug("handle device change"), f(!1), a == null || a(S, I);
  }, C = e.useRef(null), g = e.useRef(null);
  e.useLayoutEffect(() => {
    d && i(!0);
  }, [d]), e.useLayoutEffect(() => {
    C.current && g.current && (c || p) && it(C.current, g.current).then(({ x: S, y: I }) => {
      g.current && Object.assign(g.current.style, { left: `${S}px`, top: `${I}px` });
    }), N(!1);
  }, [C, g, c, p]);
  const k = e.useCallback(
    (S) => {
      g.current && S.target !== C.current && d && rt(g.current, S) && f(!1);
    },
    [d, g, C]
  );
  return e.useEffect(() => (document.addEventListener("click", k), window.addEventListener("resize", () => N(!0)), () => {
    document.removeEventListener("click", k), window.removeEventListener("resize", () => N(!0));
  }), [k, N]), /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
    "button",
    {
      className: "lk-button lk-button-menu",
      "aria-pressed": d,
      ...u,
      onClick: () => f(!d),
      ref: C
    },
    u.children
  ), !u.disabled && /* @__PURE__ */ e.createElement(
    "div",
    {
      className: "lk-device-menu",
      ref: g,
      style: { visibility: d ? "visible" : "hidden" }
    },
    t ? t === "audioinput" ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
      "p",
      {
        style: {
          textAlign: "left",
          color: "var(--dst-color-text-third)",
          fontSize: 12,
          fontWeight: 400,
          marginBottom: 6
        }
      },
      "Microphone"
    ), /* @__PURE__ */ e.createElement(
      Y,
      {
        initialSelection: s,
        onActiveDeviceChange: (S) => y("audioinput", S),
        onDeviceListChange: m,
        kind: "audioinput",
        track: n == null ? void 0 : n.audioinput,
        requestPermissions: E
      }
    ), /* @__PURE__ */ e.createElement(
      "p",
      {
        style: {
          textAlign: "left",
          marginTop: 4,
          color: "var(--dst-color-text-third)",
          fontSize: 12,
          fontWeight: 400,
          marginBottom: 6
        }
      },
      "Speakers"
    ), /* @__PURE__ */ e.createElement(
      Y,
      {
        initialSelection: s,
        onActiveDeviceChange: (S) => y("audiooutput", S),
        onDeviceListChange: m,
        kind: "audiooutput",
        track: n == null ? void 0 : n.audiooutput,
        requestPermissions: E
      }
    ), d && /* @__PURE__ */ e.createElement("div", { className: "lk-device-menu-noise-suppression" }, v("micNoiseSuppression"), /* @__PURE__ */ e.createElement(
      _e,
      {
        size: "small",
        checked: r,
        onChange: (S) => o == null ? void 0 : o(S)
      }
    ))) : /* @__PURE__ */ e.createElement(
      Y,
      {
        initialSelection: s,
        onActiveDeviceChange: (S) => y(t, S),
        onDeviceListChange: m,
        kind: t,
        track: n == null ? void 0 : n[t],
        requestPermissions: E
      }
    ) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "lk-device-menu-heading" }, "Audio inputs"), /* @__PURE__ */ e.createElement(
      Y,
      {
        kind: "audioinput",
        onActiveDeviceChange: (S) => y("audioinput", S),
        onDeviceListChange: m,
        track: n == null ? void 0 : n.audioinput,
        requestPermissions: E
      }
    ), /* @__PURE__ */ e.createElement("div", { className: "lk-device-menu-heading" }, "Video inputs"), /* @__PURE__ */ e.createElement(
      Y,
      {
        kind: "videoinput",
        onActiveDeviceChange: (S) => y("videoinput", S),
        onDeviceListChange: m,
        track: n == null ? void 0 : n.videoinput,
        requestPermissions: E
      }
    ))
  ));
}
function ee() {
  e.useEffect(() => {
    Re();
  }, []);
}
function Mt(t, s) {
  const [a, n] = e.useState(), l = e.useMemo(() => new gt(), []);
  return e.useEffect(() => {
    let u = !1, d = [];
    return l.lock().then(async (f) => {
      try {
        (t.audio || t.video) && (d = await vt(t), u ? d.forEach((c) => c.stop()) : n(d));
      } catch (c) {
        s && c instanceof Error ? s(c) : _.error(c);
      } finally {
        f();
      }
    }), () => {
      u = !0, d.forEach((f) => {
        f.stop();
      });
    };
  }, [JSON.stringify(t, xe), s, l]), a;
}
function Zt(t, s, a) {
  const [n, l] = e.useState(null), [u, d] = e.useState(!1), f = nt({ kind: a }), [c, m] = e.useState(
    void 0
  ), [p, N] = e.useState(), [E, i] = e.useState(s);
  e.useEffect(() => {
    i(s);
  }, [s]);
  const r = async (y, C) => {
    try {
      const g = C === "videoinput" ? await kt({
        deviceId: y,
        resolution: St.h720.resolution
      }) : await bt({ deviceId: y }), k = await g.getDeviceId();
      k && y !== k && (v.current = k, i(k)), N(g);
    } catch (g) {
      g instanceof Error && l(g);
    }
  }, o = async (y, C) => {
    await y.setDeviceId(C), v.current = C;
  }, v = e.useRef(E);
  return e.useEffect(() => {
    t && !p && !n && !u && (_.debug("creating track", a), d(!0), r(E, a).finally(() => {
      d(!1);
    }));
  }, [t, p, n, u]), e.useEffect(() => {
    p && (t ? c != null && c.deviceId && v.current !== (c == null ? void 0 : c.deviceId) ? (_.debug(`switching ${a} device from`, v.current, c.deviceId), o(p, c.deviceId)) : (_.debug(`unmuting local ${a} track`), p.unmute()) : (_.debug(`muting ${a} track`), p.mute().then(() => _.debug(p.mediaStreamTrack))));
  }, [p, c, t, a]), e.useEffect(() => () => {
    p && (_.debug(`stopping local ${a} track`), p.stop(), p.mute());
  }, []), e.useEffect(() => {
    m(f == null ? void 0 : f.find((y) => y.deviceId === E));
  }, [E, f]), {
    selectedDevice: c,
    localTrack: p,
    deviceError: n
  };
}
function Xt({
  defaults: t = {},
  onValidate: s,
  onSubmit: a,
  onError: n,
  debug: l,
  joinLabel: u = "Join Room",
  micLabel: d = "Microphone",
  camLabel: f = "Camera",
  userLabel: c = "Username",
  persistUserChoices: m = !0,
  videoProcessor: p,
  ...N
}) {
  const [E, i] = e.useState(ot), r = {
    ...t.audioDeviceId !== void 0 && { audioDeviceId: t.audioDeviceId },
    ...t.videoDeviceId !== void 0 && { videoDeviceId: t.videoDeviceId },
    ...t.audioEnabled !== void 0 && { audioEnabled: t.audioEnabled },
    ...t.videoEnabled !== void 0 && { videoEnabled: t.videoEnabled },
    ...t.username !== void 0 && { username: t.username }
  }, {
    userChoices: o,
    saveAudioInputDeviceId: v,
    saveAudioInputEnabled: y,
    saveVideoInputDeviceId: C,
    saveVideoInputEnabled: g,
    saveUsername: k
  } = ie({
    defaults: r,
    preventSave: !m,
    preventLoad: !m
  }), [S, I] = e.useState(o.audioEnabled), [R, x] = e.useState(o.videoEnabled), [H, P] = e.useState(
    o.audioDeviceId
  ), [D, W] = e.useState(
    o.videoDeviceId
  ), [z, M] = e.useState(o.username);
  e.useEffect(() => {
    y(S);
  }, [S, y]), e.useEffect(() => {
    g(R);
  }, [R, g]), e.useEffect(() => {
    v(H);
  }, [H, v]), e.useEffect(() => {
    C(D);
  }, [D, C]), e.useEffect(() => {
    k(z);
  }, [z, k]);
  const h = Mt(
    {
      audio: S ? { deviceId: o.audioDeviceId } : !1,
      video: R ? { deviceId: o.videoDeviceId, processor: p } : !1
    },
    n
  ), B = e.useRef(null), T = e.useMemo(
    () => h == null ? void 0 : h.filter((L) => L.kind === w.Kind.Video)[0],
    [h]
  ), V = e.useMemo(() => {
    if (T) {
      const { facingMode: L } = Et(T);
      return L;
    } else
      return "undefined";
  }, [T]), O = e.useMemo(
    () => h == null ? void 0 : h.filter((L) => L.kind === w.Kind.Audio)[0],
    [h]
  );
  e.useEffect(() => (B.current && T && (T.unmute(), T.attach(B.current)), () => {
    T == null || T.detach();
  }), [T]);
  const [A, U] = e.useState(), b = e.useCallback(
    (L) => typeof s == "function" ? s(L) : L.username !== "",
    [s]
  );
  e.useEffect(() => {
    const L = {
      username: z,
      videoEnabled: R,
      videoDeviceId: D,
      audioEnabled: S,
      audioDeviceId: H
    };
    i(L), U(b(L));
  }, [z, R, b, S, H, D]);
  function $(L) {
    L.preventDefault(), b(E) ? typeof a == "function" && a(E) : _.warn("Validation failed with: ", E);
  }
  return ee(), /* @__PURE__ */ e.createElement("div", { className: "lk-prejoin", ...N }, /* @__PURE__ */ e.createElement("div", { className: "lk-video-container" }, T && /* @__PURE__ */ e.createElement("video", { ref: B, width: "1280", height: "720", "data-lk-facing-mode": V }), (!T || !R) && /* @__PURE__ */ e.createElement("div", { className: "lk-camera-off-note" }, /* @__PURE__ */ e.createElement(He, null))), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-container" }, /* @__PURE__ */ e.createElement("div", { className: "lk-button-group audio" }, /* @__PURE__ */ e.createElement(
    K,
    {
      initialState: S,
      source: w.Source.Microphone,
      onChange: (L) => I(L)
    },
    d
  ), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    Z,
    {
      initialSelection: H,
      kind: "audioinput",
      disabled: !O,
      tracks: { audioinput: O },
      onActiveDeviceChange: (L, te) => P(te)
    }
  ))), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group video" }, /* @__PURE__ */ e.createElement(
    K,
    {
      initialState: R,
      source: w.Source.Camera,
      onChange: (L) => x(L)
    },
    f
  ), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    Z,
    {
      initialSelection: D,
      kind: "videoinput",
      disabled: !T,
      tracks: { videoinput: T },
      onActiveDeviceChange: (L, te) => W(te)
    }
  )))), /* @__PURE__ */ e.createElement("form", { className: "lk-username-container" }, /* @__PURE__ */ e.createElement(
    "input",
    {
      className: "lk-form-control",
      id: "username",
      name: "username",
      type: "text",
      defaultValue: z,
      placeholder: c,
      onChange: (L) => M(L.target.value),
      autoComplete: "off"
    }
  ), /* @__PURE__ */ e.createElement(
    "button",
    {
      className: "lk-button lk-join-button",
      type: "submit",
      onClick: $,
      disabled: !A
    },
    u
  )), l && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("strong", null, "User Choices:"), /* @__PURE__ */ e.createElement("ul", { className: "lk-list", style: { overflow: "hidden", maxWidth: "15rem" } }, /* @__PURE__ */ e.createElement("li", null, "Username: ", `${E.username}`), /* @__PURE__ */ e.createElement("li", null, "Video Enabled: ", `${E.videoEnabled}`), /* @__PURE__ */ e.createElement("li", null, "Audio Enabled: ", `${E.audioEnabled}`), /* @__PURE__ */ e.createElement("li", null, "Video Device: ", `${E.videoDeviceId}`), /* @__PURE__ */ e.createElement("li", null, "Audio Device: ", `${E.audioDeviceId}`))));
}
function Tt({ props: t }) {
  const { dispatch: s, state: a } = lt().widget, n = "lk-button lk-settings-toggle";
  return { mergedProps: e.useMemo(() => Ae(t, {
    className: n,
    onClick: () => {
      s && s({ msg: "toggle_settings" });
    },
    "aria-pressed": a != null && a.showSettings ? "true" : "false"
  }), [t, n, s, a]) };
}
const It = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const { mergedProps: n } = Tt({ props: s });
    return /* @__PURE__ */ e.createElement("button", { ref: a, ...n }, s.children);
  }
);
function Lt(t) {
  return { buttonProps: e.useMemo(() => {
    const { className: a } = ut();
    return Q(t, {
      className: a
    });
  }, [t]) };
}
const Rt = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const { buttonProps: n } = Lt(s);
    return /* @__PURE__ */ e.createElement("button", { ref: a, ...n }, s.children);
  }
);
function xt(t) {
  return { buttonProps: e.useMemo(() => {
    const { className: a } = dt();
    return Q(t, {
      className: a
    });
  }, [t]) };
}
const At = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const { buttonProps: n } = xt(s);
    return /* @__PURE__ */ e.createElement("button", { ref: a, ...n }, s.children);
  }
), Dt = [
  "Good 👍",
  "Agree ✅",
  "Disagree ❌",
  "Bad 😝",
  "Can't hear you. Bad Signal",
  "Can't hear you. Your voice is too low",
  "Please make screen bigger",
  "Please go faster",
  "Gotta go, bye"
], Bt = (t) => {
  const s = Math.ceil(t.length / 2);
  return t.reduce(
    (a, n, l) => {
      const u = l < s ? 0 : 1;
      return a[u].push(n), a;
    },
    [[], []]
  );
}, Ot = (t) => {
  const [s, a] = le(""), [n, l] = le(!1), u = me(() => t.presetTexts ? t.presetTexts : Dt, [t.presetTexts]), d = () => {
    const f = Bt(u).map((c, m) => /* @__PURE__ */ j.createElement("div", { className: "unprefix-text-message-preset-block", key: m }, c.map((p, N) => /* @__PURE__ */ j.createElement(
      "span",
      {
        key: N,
        className: "unprefix-text-message-preset-block-cell",
        onClick: () => {
          var E;
          (E = t.onSendMessage) == null || E.call(t, p), l(!1);
        }
      },
      p
    ))));
    return /* @__PURE__ */ j.createElement("div", { className: "unprefix-text-message-preset" }, f);
  };
  return /* @__PURE__ */ j.createElement("div", { className: "lk-message-sender-container" }, /* @__PURE__ */ j.createElement("div", { className: "lk-message-sender-icon" }, /* @__PURE__ */ j.createElement(Ve, null)), /* @__PURE__ */ j.createElement(
    $e,
    {
      content: d(),
      open: n,
      onOpenChange: (f) => l(f),
      destroyTooltipOnHide: !0,
      overlayClassName: "unprefix-message-sender-preset-popover"
    },
    /* @__PURE__ */ j.createElement(
      "input",
      {
        type: "text",
        maxLength: 500,
        placeholder: "Send to all",
        value: s,
        onChange: (f) => {
          const c = f.currentTarget.value;
          c && n && l(!1), !c && !n && l(!0), a(c);
        },
        onKeyDown: (f) => {
          var c, m;
          f.key !== "Enter" || (c = f.nativeEvent) != null && c.isComposing || s && ((m = t.onSendMessage) == null || m.call(t, s), a(""));
        },
        spellCheck: !1
      }
    )
  ));
}, _t = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const n = at();
    return /* @__PURE__ */ e.createElement(pe, { title: "End Call for All" }, /* @__PURE__ */ e.createElement(
      "button",
      {
        ref: a,
        disabled: n === Ct.Disconnected,
        className: "lk-end-call-button",
        onClick: s.onClick
      },
      s.children
    ));
  }
);
function Ht(t) {
  return { buttonProps: e.useMemo(() => {
    const { className: a } = mt();
    return Q(t, {
      className: a
    });
  }, [t]) };
}
const Vt = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const { buttonProps: n } = Ht(s);
    return /* @__PURE__ */ e.createElement("button", { ref: a, ...n }, s.children);
  }
);
function $t(t) {
  return { buttonProps: e.useMemo(() => {
    const { className: a } = pt();
    return Q(t, {
      className: a
    });
  }, [t]) };
}
const Ut = /* @__PURE__ */ e.forwardRef(
  function(s, a) {
    const { buttonProps: n } = $t(s), l = G(), { localParticipant: u } = Ce(), d = me(() => {
      var c;
      return (c = l == null ? void 0 : l.raiseHandList) == null ? void 0 : c.some(
        (m) => m.identity === (u == null ? void 0 : u.identity)
      );
    }, [l == null ? void 0 : l.raiseHandList, u == null ? void 0 : u.identity]), f = ae(async () => {
      if (!(!l || !u))
        try {
          d ? await l.cancelHand([u.identity]) : await l.raiseHand();
        } catch (c) {
          console.log("raise hand button click error", c);
        }
    });
    return /* @__PURE__ */ e.createElement(
      "button",
      {
        ref: a,
        ...n,
        className: he([
          n.className,
          {
            "lk-is-raised": d
          }
        ]),
        onClick: f
      },
      s.children
    );
  }
);
function oe({
  variation: t,
  controls: s,
  saveUserChoices: a = !0,
  onDeviceError: n,
  onScreenShareClick: l,
  onAddMember: u,
  onMemberList: d,
  ...f
}) {
  var A, U;
  const [c, m] = e.useState(!1), p = Pe();
  e.useEffect(() => {
    var b, $;
    ((b = p == null ? void 0 : p.widget.state) == null ? void 0 : b.showChat) !== void 0 && m(($ = p == null ? void 0 : p.widget.state) == null ? void 0 : $.showChat);
  }, [(A = p == null ? void 0 : p.widget.state) == null ? void 0 : A.showChat]);
  const E = st(`(max-width: ${c ? 1e3 : 760}px)`) ? "minimal" : "verbose";
  t ?? (t = E);
  const i = { leave: !0, ...s }, r = Ne(), o = ye(), [v, y] = e.useState(!1);
  r ? (i.camera ?? (i.camera = r.canPublish), i.microphone ?? (i.microphone = r.canPublish), i.screenShare ?? (i.screenShare = r.canPublish), i.chat ?? (i.chat = r.canPublishData && (s == null ? void 0 : s.chat))) : (i.camera = !1, i.chat = !1, i.microphone = !1, i.screenShare = !1);
  const C = e.useMemo(
    () => t === "minimal" || t === "verbose",
    [t]
  ), g = e.useMemo(
    () => t === "textOnly" || t === "verbose",
    [t]
  ), k = ht(), [S, I] = e.useState(!1), R = e.useCallback(
    (b) => {
      I(b);
    },
    [I]
  ), x = Q({ className: "lk-control-bar" }, f), {
    saveAudioInputEnabled: H,
    saveVideoInputEnabled: P,
    saveAudioInputDeviceId: D,
    saveVideoInputDeviceId: W
  } = ie({ preventSave: !a }), z = e.useCallback(
    (b, $) => $ ? H(b) : null,
    [H]
  ), M = e.useCallback(
    (b, $) => $ ? P(b) : null,
    [P]
  ), h = G(), B = (h == null ? void 0 : h.onSendMessage) || void 0, T = () => {
    var b;
    (b = h == null ? void 0 : h.onEndCall) == null || b.call(h);
  }, V = () => {
    var b;
    (b = h == null ? void 0 : h.onBackToMain) == null || b.call(h);
  }, O = ((U = h == null ? void 0 : h.components) == null ? void 0 : U.ContextMenu) ?? e.Fragment;
  return /* @__PURE__ */ e.createElement("div", { ...x }, i.backToMain && /* @__PURE__ */ e.createElement(Vt, { onClick: V }, /* @__PURE__ */ e.createElement(Ue, null)), /* @__PURE__ */ e.createElement("div", { className: "lk-control-area" }, i.raiseHand && /* @__PURE__ */ e.createElement(Ut, null, /* @__PURE__ */ e.createElement(se, null)), i.microphone && /* @__PURE__ */ e.createElement("div", { className: "lk-button-group" }, /* @__PURE__ */ e.createElement(pe, { mouseEnterDelay: 0.5, placement: "top", title: "Press spacebar to mute/unmute" }, /* @__PURE__ */ e.createElement(
    K,
    {
      source: w.Source.Microphone,
      showIcon: C,
      onChange: z,
      onDeviceError: (b) => n == null ? void 0 : n({ source: w.Source.Microphone, error: b })
    },
    g && "Microphone"
  )), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    Z,
    {
      kind: "audioinput",
      onActiveDeviceChange: (b, $) => D($ ?? "")
    }
  ))), i.camera && /* @__PURE__ */ e.createElement("div", { className: "lk-button-group" }, /* @__PURE__ */ e.createElement(
    K,
    {
      source: w.Source.Camera,
      showIcon: C,
      onChange: M,
      onDeviceError: (b) => n == null ? void 0 : n({ source: w.Source.Camera, error: b })
    },
    g && "Camera"
  ), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    Z,
    {
      kind: "videoinput",
      onActiveDeviceChange: (b, $) => W($ ?? "")
    }
  ))), i.screenShare && k && /* @__PURE__ */ e.createElement(
    K,
    {
      source: w.Source.ScreenShare,
      captureOptions: { audio: !0, selfBrowserSurface: "include" },
      showIcon: C,
      onChange: R,
      onClick: l,
      onDeviceError: (b) => n == null ? void 0 : n({ source: w.Source.ScreenShare, error: b })
    },
    g && (S ? "Stop screen share" : "Share screen")
  ), i.settings && /* @__PURE__ */ e.createElement(It, null, C && /* @__PURE__ */ e.createElement(ze, null), g && "Settings"), i.addMember && /* @__PURE__ */ e.createElement(Rt, { onClick: u }, C && /* @__PURE__ */ e.createElement(We, null), g && "Add member"), i.memberList && /* @__PURE__ */ e.createElement("div", { className: "lk-button-group lk-member-list-button-group" }, /* @__PURE__ */ e.createElement(At, { onClick: d }, C && /* @__PURE__ */ e.createElement(qe, null), g && "Member list", /* @__PURE__ */ e.createElement("span", { style: { fontSize: 14, fontWeight: 510 } }, o.length)), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    O,
    {
      trigger: ["click"],
      placement: "top",
      align: {
        offset: [0, -2]
      },
      menu: {
        items: [
          {
            key: "invite",
            label: /* @__PURE__ */ e.createElement(
              "div",
              {
                className: "lk-invite-member-item",
                onClick: () => {
                  u == null || u();
                }
              },
              /* @__PURE__ */ e.createElement(je, null),
              " Invite"
            ),
            onClick: () => {
              u == null || u();
            }
          }
        ]
      }
    },
    /* @__PURE__ */ e.createElement(
      "button",
      {
        className: "lk-button lk-button-menu",
        onClick: () => y((b) => !b)
      }
    )
  ))), i.leave && (h == null ? void 0 : h.type) === "1on1" && /* @__PURE__ */ e.createElement(ne, { title: "End call" }, C && /* @__PURE__ */ e.createElement(ue, null), g && "Leave"), i.leave && (h == null ? void 0 : h.type) !== "1on1" && /* @__PURE__ */ e.createElement("div", { className: "lk-leave-button-group" }, /* @__PURE__ */ e.createElement(ne, null, C && /* @__PURE__ */ e.createElement(Ge, null), "Leave"), /* @__PURE__ */ e.createElement(_t, { onClick: T }, /* @__PURE__ */ e.createElement(ue, null))), /* @__PURE__ */ e.createElement(fe, null)), i.chat && /* @__PURE__ */ e.createElement(Ot, { onSendMessage: B, presetTexts: h == null ? void 0 : h.chatPresets }));
}
function Ft({
  chatMessageFormatter: t,
  chatMessageDecoder: s,
  chatMessageEncoder: a,
  SettingsComponent: n,
  onScreenShareClick: l,
  onAddMember: u,
  onMemberList: d,
  controls: f,
  ...c
}) {
  var C, g;
  const [m, p] = e.useState({
    showChat: !1,
    unreadMessages: 0,
    showSettings: !1
  }), N = e.useRef(null), E = F(
    [
      { source: w.Source.Camera, withPlaceholder: !0 },
      { source: w.Source.ScreenShare, withPlaceholder: !1 }
    ],
    { updateOnlyOn: [q.ActiveSpeakersChanged], onlySubscribed: !1 }
  ), i = (k) => {
    _.debug("updating widget state", k), p(k);
  }, r = Me(), o = E.filter(J).filter((k) => k.publication.source === w.Source.ScreenShare), v = (C = we(r)) == null ? void 0 : C[0], y = E.filter((k) => !Te(k, v));
  return e.useEffect(() => {
    var k, S, I, R, x, H;
    if (o.some((P) => P.publication.isSubscribed) && N.current === null ? (_.debug("Auto set screen share focus:", { newScreenShareTrack: o[0] }), (S = (k = r.pin).dispatch) == null || S.call(k, { msg: "set_pin", trackReference: o[0] }), N.current = o[0]) : N.current && !o.some(
      (P) => {
        var D, W;
        return P.publication.trackSid === ((W = (D = N.current) == null ? void 0 : D.publication) == null ? void 0 : W.trackSid);
      }
    ) && (_.debug("Auto clearing screen share focus."), (R = (I = r.pin).dispatch) == null || R.call(I, { msg: "clear_pin" }), N.current = null), v && !J(v)) {
      const P = E.find(
        (D) => D.participant.identity === v.participant.identity && D.source === v.source
      );
      P !== v && J(P) && ((H = (x = r.pin).dispatch) == null || H.call(x, { msg: "set_pin", trackReference: P }));
    }
  }, [
    o.map((k) => `${k.publication.trackSid}_${k.publication.isSubscribed}`).join(),
    (g = v == null ? void 0 : v.publication) == null ? void 0 : g.trackSid,
    E
  ]), ee(), /* @__PURE__ */ e.createElement("div", { className: "lk-video-conference", ...c }, Ie() && /* @__PURE__ */ e.createElement(
    ce,
    {
      value: r,
      onWidgetChange: i
    },
    /* @__PURE__ */ e.createElement("div", { className: "lk-video-conference-inner" }, v ? /* @__PURE__ */ e.createElement("div", { className: "lk-focus-layout-wrapper" }, /* @__PURE__ */ e.createElement(ge, null, /* @__PURE__ */ e.createElement(ve, { tracks: y }, /* @__PURE__ */ e.createElement(X, null)), v && /* @__PURE__ */ e.createElement(ke, { trackRef: v }))) : /* @__PURE__ */ e.createElement("div", { className: "lk-grid-layout-wrapper" }, /* @__PURE__ */ e.createElement(Ee, { tracks: E }, /* @__PURE__ */ e.createElement(X, null))), /* @__PURE__ */ e.createElement(
      oe,
      {
        variation: "minimal",
        onAddMember: u,
        onMemberList: d,
        controls: { chat: !0, settings: !!n, ...f },
        onScreenShareClick: l
      }
    )),
    /* @__PURE__ */ e.createElement(
      re,
      {
        style: { display: m.showChat ? "grid" : "none" },
        messageFormatter: t,
        messageEncoder: a,
        messageDecoder: s
      }
    ),
    n && /* @__PURE__ */ e.createElement(
      "div",
      {
        className: "lk-settings-menu-modal",
        style: { display: m.showSettings ? "block" : "none" }
      },
      /* @__PURE__ */ e.createElement(n, null)
    )
  ), /* @__PURE__ */ e.createElement(Se, null), /* @__PURE__ */ e.createElement(be, null));
}
function en({ ...t }) {
  const [s, a] = e.useState({
    showChat: !1,
    unreadMessages: 0
  }), n = F([w.Source.Microphone]);
  return ee(), /* @__PURE__ */ e.createElement(ce, { onWidgetChange: a }, /* @__PURE__ */ e.createElement("div", { className: "lk-audio-conference", ...t }, /* @__PURE__ */ e.createElement("div", { className: "lk-audio-conference-stage" }, /* @__PURE__ */ e.createElement(Ke, { tracks: n }, /* @__PURE__ */ e.createElement(Je, null))), /* @__PURE__ */ e.createElement(
    oe,
    {
      controls: { microphone: !0, screenShare: !1, camera: !1, chat: !0 }
    }
  ), s.showChat && /* @__PURE__ */ e.createElement(re, null)));
}
const zt = () => {
  const t = G(), s = (t == null ? void 0 : t.raiseHandList) ?? [], [a, n] = e.useState(!0), { renderParticipantPlaceholder: l, nameFormatter: u, cancelHand: d } = t ?? {}, f = e.useMemo(() => {
    const c = s.sort((m, p) => m.ts - p.ts);
    return a ? c.slice(0, 5) : c;
  }, [s, a]);
  return s.length === 0 ? null : /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list" }, /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-header" }, /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-header-icon" }, /* @__PURE__ */ e.createElement(se, null)), /* @__PURE__ */ e.createElement("span", { className: "lk-raise-hand-list-header-text" }, "Raise hand (", s.length, ")")), /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-content" }, f.map((c, m) => /* @__PURE__ */ e.createElement("div", { key: m, className: "lk-raise-hand-list-item" }, /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-item-info" }, /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-item-avatar" }, l == null ? void 0 : l(c, { size: 28 })), /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-list-item-info-name" }, /* @__PURE__ */ e.createElement("span", { className: "lk-raise-hand-list-item-info-name-text" }, u ? u(c) : c.identity))), /* @__PURE__ */ e.createElement(
    "div",
    {
      className: "lk-raise-hand-list-item-lower",
      onClick: () => d == null ? void 0 : d([c.identity])
    },
    "Lower"
  ))), s.length > 5 && /* @__PURE__ */ e.createElement(
    "div",
    {
      className: "lk-raise-hand-list-collapse-toggle",
      onClick: () => n((c) => !c)
    },
    a ? /* @__PURE__ */ e.createElement(Ze, null) : /* @__PURE__ */ e.createElement(Xe, null)
  )));
}, Wt = (t) => {
  const { open: s, onClose: a } = t, [n, l] = e.useState(""), u = ye(), d = ct(u), f = G(), { renderParticipantPlaceholder: c, nameFormatter: m, components: p } = f, N = (p == null ? void 0 : p.ContextMenu) ?? e.Fragment, E = e.useMemo(() => d.filter(
    (o) => ((m == null ? void 0 : m(o)) ?? o.identity).toLowerCase().includes(n.toLowerCase())
  ), [d, n]), [i] = F(
    [{ source: w.Source.ScreenShare, withPlaceholder: !1 }],
    { updateOnlyOn: [q.ActiveSpeakersChanged], onlySubscribed: !1 }
  ), { getContextMenuItems: r } = Qe();
  return s ? /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list" }, /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-header" }, /* @__PURE__ */ e.createElement("span", { className: "lk-participant-aside-list-header-title" }, "Attendees(", d.length, ")"), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-close-button", onClick: a }, /* @__PURE__ */ e.createElement(Ye, null))), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-search" }, /* @__PURE__ */ e.createElement(
    "input",
    {
      type: "text",
      placeholder: "Search",
      value: n,
      onChange: (o) => l(o.target.value),
      className: "lk-participant-aside-list-input"
    }
  )), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list" }, !n && /* @__PURE__ */ e.createElement(zt, null), E.map((o, v) => {
    var y;
    return /* @__PURE__ */ e.createElement("div", { key: v, className: "lk-participant-aside-list-list-item" }, /* @__PURE__ */ e.createElement(
      N,
      {
        menu: { items: r(o) },
        disabled: r(o).length === 0
      },
      /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-info" }, /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-avatar" }, c == null ? void 0 : c(o, { size: 28 })), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-info-name" }, /* @__PURE__ */ e.createElement("span", { className: "lk-participant-aside-list-list-item-info-name-text" }, m ? m(o) : o.identity), /* @__PURE__ */ e.createElement("span", { className: "lk-participant-aside-list-list-item-sharing" }, ((y = i == null ? void 0 : i.participant) == null ? void 0 : y.identity) === o.identity ? "Sharing" : "")))
    ), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-status" }, /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-status-audio" }, /* @__PURE__ */ e.createElement(
      de,
      {
        trackRef: {
          participant: o,
          source: w.Source.Microphone
        },
        show: "always",
        singleColor: !0
      }
    )), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-aside-list-list-item-status-video" }, /* @__PURE__ */ e.createElement(
      de,
      {
        trackRef: {
          participant: o,
          source: w.Source.Camera
        },
        show: "always",
        singleColor: !0
      }
    ))));
  }))) : null;
}, qt = ({ onClick: t }) => {
  const s = G(), a = (s == null ? void 0 : s.raiseHandList) ?? [], n = e.useMemo(() => a.length === 0 ? "" : `${a.map((l) => l.displayName).join(", ")}${a.length > 3 ? "..." : ""}`, [a]);
  return a.length === 0 ? null : /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-indicator", onClick: t }, /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-indicator-icon" }, /* @__PURE__ */ e.createElement(se, null)), /* @__PURE__ */ e.createElement("div", { className: "lk-raise-hand-indicator-text" }, n));
};
function tn({
  chatMessageFormatter: t,
  chatMessageDecoder: s,
  chatMessageEncoder: a,
  SettingsComponent: n,
  onScreenShareClick: l,
  onAddMember: u,
  onMemberList: d,
  filterLocalTracks: f,
  controls: c,
  onDeviceError: m,
  ...p
}) {
  var W, z;
  const [N, E] = e.useState({
    showChat: !1,
    unreadMessages: 0,
    showSettings: !1
  }), i = ft(), r = e.useRef(null), [o, v] = e.useState(!1), [y, C] = e.useState(!0), g = F(
    [
      { source: w.Source.Camera, withPlaceholder: !0 },
      { source: w.Source.ScreenShare, withPlaceholder: !1 }
    ],
    {
      updateOnlyOn: [q.ActiveSpeakersChanged, q.TrackMuted, q.TrackUnmuted],
      onlySubscribed: !1,
      filterLocalTracks: f
    }
  ), k = g.find((M) => M.source === w.Source.ScreenShare), S = (M) => {
    E(M);
  }, I = Me(), R = g.filter(J).filter((M) => M.publication.source === w.Source.ScreenShare), x = (W = we(I)) == null ? void 0 : W[0], H = g.filter((M) => !Te(M, x)), P = G();
  e.useEffect(() => {
    var B, T;
    if ((P == null ? void 0 : P.type) === "instant")
      return [...Array.from(i.remoteParticipants.values()), i.localParticipant].some(
        (A) => A.getTrackPublication(w.Source.ScreenShare)
      ) || (T = (B = I.pin).dispatch) == null ? void 0 : T.call(B, { msg: "clear_pin" });
    if (!i || (P == null ? void 0 : P.type) !== "1on1")
      return;
    const M = () => {
      var O, A;
      const V = i.remoteParticipants;
      if (!(V.size > 1))
        for (let [U, b] of V)
          (A = (O = I.pin).dispatch) == null || A.call(O, {
            msg: "set_pin",
            trackReference: {
              participant: b,
              publication: b.getTrackPublication(w.Source.Camera),
              source: w.Source.Camera
            }
          });
    }, h = (V) => {
      var O, A;
      i.remoteParticipants.size > 1 || k || (console.log("set pin when remote connected"), (A = (O = I.pin).dispatch) == null || A.call(O, {
        msg: "set_pin",
        trackReference: {
          participant: V,
          publication: V.getTrackPublication(w.Source.Camera),
          source: w.Source.Camera
        }
      }));
    };
    return i.on(q.Connected, M), i.on(q.ParticipantConnected, h), () => {
      i.off(q.Connected, M), i.off(q.ParticipantConnected, h);
    };
  }, [i, P == null ? void 0 : P.type, k]), e.useEffect(() => {
    if ((P == null ? void 0 : P.type) === "1on1" && !k) {
      const M = i.remoteParticipants.values().next().value;
      M && setTimeout(() => {
        var h, B;
        (B = (h = I.pin).dispatch) == null || B.call(h, {
          msg: "set_pin",
          trackReference: {
            participant: M,
            publication: M.getTrackPublication(w.Source.Camera),
            source: w.Source.Camera
          }
        });
      });
    }
  }, [P == null ? void 0 : P.type, k]), e.useEffect(() => {
    var M, h, B, T, V, O;
    if (R.some((A) => A.publication.isSubscribed) && r.current === null ? (_.debug("Auto set screen share focus:", { newScreenShareTrack: R[0] }), console.warn("set pin 5"), (h = (M = I.pin).dispatch) == null || h.call(M, { msg: "set_pin", trackReference: R[0] }), r.current = R[0]) : r.current && !R.some(
      (A) => {
        var U, b;
        return A.publication.trackSid === ((b = (U = r.current) == null ? void 0 : U.publication) == null ? void 0 : b.trackSid);
      }
    ) && (_.debug("Auto clearing screen share focus."), (T = (B = I.pin).dispatch) == null || T.call(B, { msg: "clear_pin" }), r.current = null), x && !J(x)) {
      const A = g.find(
        (U) => U.participant.identity === x.participant.identity && U.source === x.source
      );
      A !== x && J(A) && (console.warn("set pin 6"), (O = (V = I.pin).dispatch) == null || O.call(V, { msg: "set_pin", trackReference: A }));
    }
  }, [
    R.map((M) => `${M.publication.trackSid}_${M.publication.isSubscribed}`).join(),
    (z = x == null ? void 0 : x.publication) == null ? void 0 : z.trackSid,
    g
  ]), ee();
  const D = ae(() => {
    v(!0);
  });
  return /* @__PURE__ */ e.createElement(
    "div",
    {
      className: he("lk-video-conference", {
        "lk-show-aside-list": o,
        "lk-has-screen-share": R.length
      }),
      ...p
    },
    Ie() && /* @__PURE__ */ e.createElement(
      ce,
      {
        value: I,
        onWidgetChange: S
      },
      /* @__PURE__ */ e.createElement("div", { className: "lk-video-conference-inner" }, x ? /* @__PURE__ */ e.createElement("div", { className: "lk-focus-layout-wrapper" }, /* @__PURE__ */ e.createElement(ge, null, x && /* @__PURE__ */ e.createElement(ke, { trackRef: x }), /* @__PURE__ */ e.createElement(Fe, null, /* @__PURE__ */ e.createElement(
        ve,
        {
          tracks: H,
          focusTrack: x,
          orientation: "vertical"
        },
        /* @__PURE__ */ e.createElement(X, { renderPlaceholderExtraProps: { size: 64 } })
      )))) : /* @__PURE__ */ e.createElement("div", { className: "lk-grid-layout-wrapper" }, /* @__PURE__ */ e.createElement(Ee, { tracks: g }, /* @__PURE__ */ e.createElement(
        X,
        {
          onRestPlaceholderClick: () => v((M) => !M)
        }
      ))), /* @__PURE__ */ e.createElement(
        oe,
        {
          variation: "minimal",
          onAddMember: u,
          onMemberList: (...M) => {
            v((h) => !h), d == null || d(...M);
          },
          controls: { chat: !0, settings: !!n, ...c },
          onScreenShareClick: l,
          onDeviceError: m
        }
      )),
      /* @__PURE__ */ e.createElement(
        re,
        {
          style: { display: N.showChat ? "grid" : "none" },
          messageFormatter: t,
          messageEncoder: a,
          messageDecoder: s
        }
      ),
      n && /* @__PURE__ */ e.createElement(
        "div",
        {
          className: "lk-settings-menu-modal",
          style: { display: N.showSettings ? "block" : "none" }
        },
        /* @__PURE__ */ e.createElement(n, null)
      )
    ),
    /* @__PURE__ */ e.createElement(Se, { filterLocalTracks: f }),
    /* @__PURE__ */ e.createElement(be, null),
    /* @__PURE__ */ e.createElement(
      Wt,
      {
        open: o,
        onClose: () => {
          v(!1), C(!0);
        }
      }
    ),
    y && /* @__PURE__ */ e.createElement(qt, { onClick: D })
  );
}
function nn({
  controls: t,
  saveUserChoices: s = !0,
  onDeviceError: a,
  ...n
}) {
  const l = { leave: !0, microphone: !0, ...t }, u = Ne(), { microphoneTrack: d, localParticipant: f } = Ce(), c = e.useMemo(() => ({
    participant: f,
    source: w.Source.Microphone,
    publication: d
  }), [f, d]);
  u ? l.microphone ?? (l.microphone = u.canPublish) : l.microphone = !1;
  const m = Q({ className: "lk-agent-control-bar" }, n), { saveAudioInputEnabled: p, saveAudioInputDeviceId: N } = ie({
    preventSave: !s
  }), E = e.useCallback(
    (i, r) => {
      r && p(i);
    },
    [p]
  );
  return /* @__PURE__ */ e.createElement("div", { ...m }, l.microphone && /* @__PURE__ */ e.createElement("div", { className: "lk-button-group" }, /* @__PURE__ */ e.createElement(
    K,
    {
      source: w.Source.Microphone,
      showIcon: !0,
      onChange: E,
      onDeviceError: (i) => a == null ? void 0 : a({ source: w.Source.Microphone, error: i })
    },
    /* @__PURE__ */ e.createElement(et, { trackRef: c, barCount: 7, options: { minHeight: 5 } })
  ), /* @__PURE__ */ e.createElement("div", { className: "lk-button-group-menu" }, /* @__PURE__ */ e.createElement(
    Z,
    {
      kind: "audioinput",
      onActiveDeviceChange: (i, r) => N(r ?? "")
    }
  ))), l.leave && /* @__PURE__ */ e.createElement(ne, null, "Disconnect"), /* @__PURE__ */ e.createElement(fe, null));
}
export {
  en as AudioConference,
  re as Chat,
  oe as ControlBar,
  Z as MediaDeviceMenu,
  tn as NewVideoConference,
  Xt as PreJoin,
  Ft as VideoConference,
  nn as VoiceAssistantControlBar,
  Zt as usePreviewDevice,
  Mt as usePreviewTracks
};
//# sourceMappingURL=prefabs.mjs.map
