@bcc-code/vue-bcc-chat-ui 7.1.44 → 7.1.45

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.
@@ -6143,7 +6143,7 @@ F([() => Q.value?.conversations.value, () => Hl.value], async () => {
6143
6143
  async function Ql(e, t) {
6144
6144
  Pl.value = t.loggerCallback, _t(t.language ?? "en"), Bl(t.themeMode);
6145
6145
  let n = e.config.globalProperties.$primevue;
6146
- n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat", mh), e.provide("theme", { theme: El });
6146
+ n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat", gh), e.provide("theme", { theme: El });
6147
6147
  let r = Vl(t.environment);
6148
6148
  zl(Ol.INFO, "Initializing chat", {
6149
6149
  environment: t.environment,
@@ -7916,11 +7916,15 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7916
7916
  }
7917
7917
  }), [["__scopeId", "data-v-84a9e2b1"]]), $d = 1800;
7918
7918
  function ef(e) {
7919
- let t = e.actionMenuRef, n = w(null), r = w(null), i = typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches, a = null;
7920
- function o(e) {
7919
+ let t = e.actionMenuRef, r = w(null), i = w(null), a = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null, o = w(!!a?.matches);
7920
+ a?.addEventListener("change", (e) => {
7921
+ o.value = e.matches;
7922
+ });
7923
+ let s = null;
7924
+ function c(e) {
7921
7925
  return e.kind === "text" && Hs(e.text);
7922
7926
  }
7923
- function s(e) {
7927
+ function l(e) {
7924
7928
  return e.isOwn && [
7925
7929
  "text",
7926
7930
  "image",
@@ -7929,29 +7933,29 @@ function ef(e) {
7929
7933
  "file"
7930
7934
  ].includes(e.kind) && !e.isDeleted && e.deliveryState === "sent";
7931
7935
  }
7932
- function c(e) {
7936
+ function u(e) {
7933
7937
  return e.isOwn && e.deliveryState === "sent";
7934
7938
  }
7935
- function l(e) {
7939
+ function d(e) {
7936
7940
  return e.isOwn && !e.isDeleted;
7937
7941
  }
7938
- function u(e) {
7942
+ function f(e) {
7939
7943
  return Xs(e);
7940
7944
  }
7941
- function d(e) {
7945
+ function p(e) {
7942
7946
  return e.attachments.find((e) => e.kind === "image" && !!e.url);
7943
7947
  }
7944
- async function f(e) {
7945
- let t = d(e);
7948
+ async function m(e) {
7949
+ let t = p(e);
7946
7950
  if (!t?.url || typeof navigator > "u" || !navigator.clipboard?.write || typeof ClipboardItem > "u") return !1;
7947
7951
  let n = await fetch(t.url);
7948
7952
  if (!n.ok) return !1;
7949
7953
  let r = await n.blob();
7950
7954
  if (!r.type.startsWith("image/")) return !1;
7951
- let i = { [r.type]: r }, a = u(e);
7955
+ let i = { [r.type]: r }, a = f(e);
7952
7956
  return a && (i["text/plain"] = new Blob([a], { type: "text/plain" })), await navigator.clipboard.write([new ClipboardItem(i)]), !0;
7953
7957
  }
7954
- function p(e) {
7958
+ function g(e) {
7955
7959
  let t = Number.isFinite(e.clientX) ? e.clientX : 0, n = Number.isFinite(e.clientY) ? e.clientY : 0;
7956
7960
  if (t > 0 || n > 0) return {
7957
7961
  x: t,
@@ -7970,137 +7974,150 @@ function ef(e) {
7970
7974
  y: 0
7971
7975
  };
7972
7976
  }
7973
- async function m(r, a, o) {
7974
- if (!e.canUseMessageActions() || o === "contextmenu" && !i || o === "tap" && i) return;
7975
- a.preventDefault(), a.stopPropagation(), e.onMenuOpen?.(), n.value = r;
7976
- let s = p(a);
7977
- await h(), t.value?.show(a, {
7978
- x: s.x + 2,
7979
- y: s.y + 2
7980
- });
7977
+ function _(e, t) {
7978
+ if (o.value) {
7979
+ let t = g(e);
7980
+ return {
7981
+ x: t.x + 2,
7982
+ y: t.y + 2
7983
+ };
7984
+ } else if (window) {
7985
+ let n = e.target instanceof HTMLElement ? e.target.closest(".message-item").getBoundingClientRect().height : 0;
7986
+ return {
7987
+ x: t.isOwn ? window.innerWidth * 2 / 3 : window.innerWidth / 3,
7988
+ y: window.innerHeight / 2 + n / 2
7989
+ };
7990
+ }
7991
+ return {
7992
+ x: 0,
7993
+ y: 0
7994
+ };
7981
7995
  }
7982
- function g(e, t) {
7983
- m(e, t, "contextmenu");
7996
+ async function v(n, i, a) {
7997
+ e.canUseMessageActions() && (a === "contextmenu" && !o.value || a === "tap" && o.value || (i.preventDefault(), i.stopPropagation(), e.onMenuOpen?.(), r.value = n, await h(), t.value?.show(i, _(i, n))));
7984
7998
  }
7985
- function _(e, t) {
7986
- if (n.value) {
7987
- t.preventDefault(), t.stopPropagation(), v();
7999
+ function y(e, t) {
8000
+ v(e, t, "contextmenu");
8001
+ }
8002
+ function b(e, t) {
8003
+ if (r.value) {
8004
+ t.preventDefault(), t.stopPropagation(), x();
7988
8005
  return;
7989
8006
  }
7990
- m(e, t, "tap");
8007
+ v(e, t, "tap");
7991
8008
  }
7992
- function v() {
7993
- y(), t.value?.hide();
8009
+ function x() {
8010
+ S(), t.value?.hide();
7994
8011
  }
7995
- function y() {
7996
- n.value = null;
8012
+ function S() {
8013
+ r.value = null;
7997
8014
  }
7998
- function b(t, n) {
7999
- e.canReact() && (e.emit.toggleReaction(t, n), v());
8015
+ function C(t, n) {
8016
+ e.canReact() && (e.emit.toggleReaction(t, n), x());
8000
8017
  }
8001
- function x(t, n) {
8018
+ function T(t, n) {
8002
8019
  e.canReact() && e.emit.toggleReaction(t, n);
8003
8020
  }
8004
- async function S(e) {
8021
+ async function E(e) {
8005
8022
  if (typeof navigator > "u") return;
8006
8023
  let t = !1;
8007
8024
  try {
8008
- t = await f(e);
8025
+ t = await m(e);
8009
8026
  } catch {
8010
8027
  t = !1;
8011
8028
  }
8012
8029
  if (!t) {
8013
- let t = u(e);
8030
+ let t = f(e);
8014
8031
  if (!t || !navigator.clipboard?.writeText) return;
8015
8032
  await navigator.clipboard.writeText(t);
8016
8033
  }
8017
- r.value = e.id, a && clearTimeout(a), a = setTimeout(() => {
8018
- r.value = null;
8019
- }, $d), v();
8020
- }
8021
- function C(t) {
8022
- e.canReply() && (e.emit.reply(t), v());
8023
- }
8024
- function T(t) {
8025
- e.emit.edit(t), v();
8026
- }
8027
- function E(t) {
8028
- e.canOpenThread() && (e.emit.openThread(t), v());
8034
+ i.value = e.id, s && clearTimeout(s), s = setTimeout(() => {
8035
+ i.value = null;
8036
+ }, $d), x();
8029
8037
  }
8030
8038
  function D(t) {
8031
- e.emit.translate(t), v();
8039
+ e.canReply() && (e.emit.reply(t), x());
8032
8040
  }
8033
8041
  function O(t) {
8034
- e.emit.info(t), v();
8042
+ e.emit.edit(t), x();
8035
8043
  }
8036
8044
  function k(t) {
8037
- e.emit.delete(t), v();
8045
+ e.canOpenThread() && (e.emit.openThread(t), x());
8038
8046
  }
8039
8047
  function A(t) {
8048
+ e.emit.translate(t), x();
8049
+ }
8050
+ function j(t) {
8051
+ e.emit.info(t), x();
8052
+ }
8053
+ function M(t) {
8054
+ e.emit.delete(t), x();
8055
+ }
8056
+ function N(t) {
8040
8057
  return [
8041
8058
  {
8042
8059
  key: "reply",
8043
8060
  label: e.t("reply"),
8044
8061
  icon: Me,
8045
8062
  visible: e.canReply(),
8046
- command: () => C(t)
8063
+ command: () => D(t)
8047
8064
  },
8048
8065
  {
8049
8066
  key: "edit",
8050
8067
  label: e.t("edit"),
8051
8068
  icon: ye,
8052
- visible: s(t),
8053
- command: () => T(t)
8069
+ visible: l(t),
8070
+ command: () => O(t)
8054
8071
  },
8055
8072
  {
8056
8073
  key: "copy",
8057
- label: r.value === t.id ? e.t("copied") : e.t("copyText"),
8058
- icon: r.value === t.id ? de : me,
8074
+ label: i.value === t.id ? e.t("copied") : e.t("copyText"),
8075
+ icon: i.value === t.id ? de : me,
8059
8076
  visible: !0,
8060
- command: () => S(t)
8077
+ command: () => E(t)
8061
8078
  },
8062
8079
  {
8063
8080
  key: "info",
8064
8081
  label: e.t("info"),
8065
8082
  icon: Te,
8066
- visible: c(t),
8067
- command: () => O(t)
8083
+ visible: u(t),
8084
+ command: () => j(t)
8068
8085
  },
8069
8086
  {
8070
8087
  key: "thread",
8071
8088
  label: e.t("threadWithCount", { count: t.replyCount }),
8072
8089
  icon: Ce,
8073
8090
  visible: !e.isInThread() && e.canOpenThread(),
8074
- command: () => E(t)
8091
+ command: () => k(t)
8075
8092
  },
8076
8093
  {
8077
8094
  key: "delete",
8078
8095
  label: e.t("delete"),
8079
8096
  icon: he,
8080
- visible: l(t),
8081
- command: () => k(t)
8097
+ visible: d(t),
8098
+ command: () => M(t)
8082
8099
  },
8083
8100
  {
8084
8101
  key: "translate",
8085
8102
  label: e.t("translate"),
8086
8103
  icon: Le,
8087
- visible: o(t),
8088
- command: () => D(t)
8104
+ visible: c(t),
8105
+ command: () => A(t)
8089
8106
  }
8090
8107
  ].filter((e) => e.visible);
8091
8108
  }
8092
8109
  return {
8093
8110
  actionMenuRef: t,
8094
- activeActionMessage: n,
8095
- copiedMessageId: r,
8096
- supportsDesktopContextMenu: i,
8097
- handleMessageContextMenu: g,
8098
- handleMessageTap: _,
8099
- closeActionMenu: v,
8100
- resetActionMenuState: y,
8101
- reactToMessage: b,
8102
- toggleInlineReaction: x,
8103
- getActionItems: A
8111
+ activeActionMessage: r,
8112
+ copiedMessageId: i,
8113
+ supportsDesktopContextMenu: n(() => o.value),
8114
+ handleMessageContextMenu: y,
8115
+ handleMessageTap: b,
8116
+ closeActionMenu: x,
8117
+ resetActionMenuState: S,
8118
+ reactToMessage: C,
8119
+ toggleInlineReaction: T,
8120
+ getActionItems: N
8104
8121
  };
8105
8122
  }
8106
8123
  //#endregion
@@ -8883,13 +8900,14 @@ var df = { class: "w-full" }, ff = {
8883
8900
  "id",
8884
8901
  "data-message-id",
8885
8902
  "data-message-kind"
8886
- ], Lp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Rp = /* @__PURE__ */ $(/* @__PURE__ */ u({
8903
+ ], Lp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Rp = { class: "message-bubble-wrapper" }, zp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Bp = /* @__PURE__ */ $(/* @__PURE__ */ u({
8887
8904
  __name: "MessageItem",
8888
8905
  props: {
8889
8906
  message: {},
8890
8907
  currentUserId: {},
8891
8908
  canReact: { type: Boolean },
8892
8909
  canOpenThread: { type: Boolean },
8910
+ contextMenuOpen: { type: Boolean },
8893
8911
  canShowSenderAvatar: { type: Boolean },
8894
8912
  pendingOptionKey: {},
8895
8913
  actionMessageClass: {},
@@ -8906,20 +8924,27 @@ var df = { class: "w-full" }, ff = {
8906
8924
  "anchorclick"
8907
8925
  ],
8908
8926
  setup(t, { emit: s }) {
8909
- let c = t, u = s, d = n(() => c.message.kind === "action" ? ["is-action", c.actionMessageClass] : c.message.isOwn ? "is-own" : "is-other"), f = n(() => c.actionMessageRowClass ?? c.actionMessageClass);
8910
- function p(e) {
8911
- return e instanceof Element ? !!e.closest("button, a, input, textarea, select, label, summary, video, audio") : !1;
8912
- }
8927
+ let c = t, u = s, d = n(() => {
8928
+ let e = [];
8929
+ return e = c.message.kind === "action" ? ["is-action", c.actionMessageClass] : [c.message.isOwn ? "is-own" : "is-other"], c.contextMenuOpen && e.push("context-menu-open"), e.filter((e) => !!e);
8930
+ }), f = n(() => c.message.kind === "poll" ? "message-bubble--poll" : c.message.attachments?.length ? "message-bubble--attachment" : "message-bubble--text"), p = n(() => c.actionMessageRowClass ?? c.actionMessageClass);
8913
8931
  function m(e) {
8914
- p(e.target) || u("contextmenu", e);
8932
+ return e instanceof Element ? !!e.closest("button, a, input, textarea, select, label, summary, video, audio") : !1;
8915
8933
  }
8916
8934
  function h(e) {
8917
- p(e.target) || u("tap", e);
8935
+ m(e.target) || u("contextmenu", e);
8918
8936
  }
8919
- function _() {
8937
+ function _(e) {
8938
+ m(e.target) || u("tap", e);
8939
+ }
8940
+ function v() {
8920
8941
  let e = c.message.replyTo?.messageId?.trim();
8921
8942
  e && u("openReferencedMessage", e);
8922
8943
  }
8944
+ let y = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null;
8945
+ function b() {
8946
+ return !!y?.matches;
8947
+ }
8923
8948
  return (n, s) => (S(), a("div", {
8924
8949
  id: `chat-message-${t.message.id}`,
8925
8950
  "data-message-id": t.message.id,
@@ -8928,71 +8953,118 @@ var df = { class: "w-full" }, ff = {
8928
8953
  }, [t.message.kind === "action" ? (S(), r(Nf, {
8929
8954
  key: 0,
8930
8955
  text: t.message.text,
8931
- class: g(f.value)
8932
- }, null, 8, ["text", "class"])) : (S(), a(e, { key: 1 }, [t.canShowSenderAvatar && !t.message.isOwn ? (S(), r(j(R), {
8933
- key: 0,
8934
- image: t.message.senderAvatar,
8935
- label: t.message.senderAvatar ? void 0 : t.message.senderName.slice(0, 1).toUpperCase(),
8936
- shape: "circle",
8937
- class: "mb-1 shrink-0 self-end"
8938
- }, null, 8, ["image", "label"])) : i("", !0), o("div", {
8939
- "data-testid": "message-bubble",
8940
- class: g(["message-bubble", [t.message.kind === "poll" ? "message-bubble--poll" : t.message.attachments?.length ? "message-bubble--attachment" : "message-bubble--text"]]),
8941
- onContextmenu: m,
8942
- onClick: h
8943
- }, [
8944
- !t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(hp, {
8956
+ class: g(p.value)
8957
+ }, null, 8, ["text", "class"])) : (S(), a(e, { key: 1 }, [
8958
+ t.canShowSenderAvatar && !t.message.isOwn ? (S(), r(j(R), {
8945
8959
  key: 0,
8946
- message: t.message
8947
- }, null, 8, ["message"])) : i("", !0),
8948
- t.message.replyTo ? (S(), r(Np, {
8960
+ image: t.message.senderAvatar,
8961
+ label: t.message.senderAvatar ? void 0 : t.message.senderName.slice(0, 1).toUpperCase(),
8962
+ shape: "circle",
8963
+ class: "mb-1 shrink-0 self-end"
8964
+ }, null, 8, ["image", "label"])) : i("", !0),
8965
+ o("div", {
8966
+ "data-testid": "message-bubble",
8967
+ class: g(["message-bubble", f.value]),
8968
+ onContextmenu: h,
8969
+ onClick: _
8970
+ }, [
8971
+ !t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(hp, {
8972
+ key: 0,
8973
+ message: t.message
8974
+ }, null, 8, ["message"])) : i("", !0),
8975
+ t.message.replyTo ? (S(), r(Np, {
8976
+ key: 1,
8977
+ message: t.message,
8978
+ onOpen: v
8979
+ }, null, 8, ["message"])) : i("", !0),
8980
+ t.message.kind === "poll" && t.message.poll ? (S(), r(Ap, {
8981
+ key: 2,
8982
+ message: t.message,
8983
+ "current-user-id": t.currentUserId,
8984
+ "pending-option-key": t.pendingOptionKey,
8985
+ onVote: s[0] ||= (e) => u("votePoll", e)
8986
+ }, null, 8, [
8987
+ "message",
8988
+ "current-user-id",
8989
+ "pending-option-key"
8990
+ ])) : t.message.attachments?.length ? (S(), r(lp, {
8991
+ key: 3,
8992
+ message: t.message,
8993
+ onOpenMedia: s[1] ||= (e) => u("openMedia", e)
8994
+ }, null, 8, ["message"])) : (S(), r(Fp, {
8995
+ key: 4,
8996
+ message: t.message,
8997
+ onAnchorclick: s[2] ||= (e, t) => n.$emit("anchorclick", e, t)
8998
+ }, null, 8, ["message"])),
8999
+ o("div", Lp, [l(xp, {
9000
+ message: t.message,
9001
+ "can-react": t.canReact,
9002
+ "can-open-thread": t.canOpenThread,
9003
+ onToggleReaction: s[3] ||= (e) => u("toggleReaction", e),
9004
+ onOpenThread: s[4] ||= (e) => u("openThread")
9005
+ }, null, 8, [
9006
+ "message",
9007
+ "can-react",
9008
+ "can-open-thread"
9009
+ ]), l(fp, { message: t.message }, null, 8, ["message"])])
9010
+ ], 34),
9011
+ t.contextMenuOpen && !b() ? (S(), a("div", {
8949
9012
  key: 1,
8950
- message: t.message,
8951
- onOpen: _
8952
- }, null, 8, ["message"])) : i("", !0),
8953
- t.message.kind === "poll" && t.message.poll ? (S(), r(Ap, {
8954
- key: 2,
8955
- message: t.message,
8956
- "current-user-id": t.currentUserId,
8957
- "pending-option-key": t.pendingOptionKey,
8958
- onVote: s[0] ||= (e) => u("votePoll", e)
8959
- }, null, 8, [
8960
- "message",
8961
- "current-user-id",
8962
- "pending-option-key"
8963
- ])) : t.message.attachments?.length ? (S(), r(lp, {
8964
- key: 3,
8965
- message: t.message,
8966
- onOpenMedia: s[1] ||= (e) => u("openMedia", e)
8967
- }, null, 8, ["message"])) : (S(), r(Fp, {
8968
- key: 4,
8969
- message: t.message,
8970
- onAnchorclick: s[2] ||= (e, t) => n.$emit("anchorclick", e, t)
8971
- }, null, 8, ["message"])),
8972
- o("div", Lp, [l(xp, {
8973
- message: t.message,
8974
- "can-react": t.canReact,
8975
- "can-open-thread": t.canOpenThread,
8976
- onToggleReaction: s[3] ||= (e) => u("toggleReaction", e),
8977
- onOpenThread: s[4] ||= (e) => u("openThread")
8978
- }, null, 8, [
8979
- "message",
8980
- "can-react",
8981
- "can-open-thread"
8982
- ]), l(fp, { message: t.message }, null, 8, ["message"])])
8983
- ], 34)], 64))], 10, Ip));
9013
+ class: g(["message-bubble--spotlight", f.value])
9014
+ }, [o("div", Rp, [o("div", { class: g(["message-bubble", f.value]) }, [
9015
+ !t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(hp, {
9016
+ key: 0,
9017
+ message: t.message
9018
+ }, null, 8, ["message"])) : i("", !0),
9019
+ t.message.replyTo ? (S(), r(Np, {
9020
+ key: 1,
9021
+ message: t.message,
9022
+ onOpen: v
9023
+ }, null, 8, ["message"])) : i("", !0),
9024
+ t.message.kind === "poll" && t.message.poll ? (S(), r(Ap, {
9025
+ key: 2,
9026
+ message: t.message,
9027
+ "current-user-id": t.currentUserId,
9028
+ "pending-option-key": t.pendingOptionKey,
9029
+ onVote: s[5] ||= (e) => u("votePoll", e)
9030
+ }, null, 8, [
9031
+ "message",
9032
+ "current-user-id",
9033
+ "pending-option-key"
9034
+ ])) : t.message.attachments?.length ? (S(), r(lp, {
9035
+ key: 3,
9036
+ message: t.message,
9037
+ onOpenMedia: s[6] ||= (e) => u("openMedia", e)
9038
+ }, null, 8, ["message"])) : (S(), r(Fp, {
9039
+ key: 4,
9040
+ message: t.message,
9041
+ onAnchorclick: s[7] ||= (e, t) => n.$emit("anchorclick", e, t)
9042
+ }, null, 8, ["message"])),
9043
+ o("div", zp, [l(xp, {
9044
+ message: t.message,
9045
+ "can-react": t.canReact,
9046
+ "can-open-thread": t.canOpenThread,
9047
+ onToggleReaction: s[8] ||= (e) => u("toggleReaction", e),
9048
+ onOpenThread: s[9] ||= (e) => u("openThread")
9049
+ }, null, 8, [
9050
+ "message",
9051
+ "can-react",
9052
+ "can-open-thread"
9053
+ ]), l(fp, { message: t.message }, null, 8, ["message"])])
9054
+ ], 2)])], 2)) : i("", !0)
9055
+ ], 64))], 10, Ip));
8984
9056
  }
8985
- }), [["__scopeId", "data-v-cb4a4183"]]), zp = [
9057
+ }), [["__scopeId", "data-v-86260b1a"]]), Vp = [
8986
9058
  "👍",
8987
9059
  "❤️",
8988
9060
  "🔥",
8989
9061
  "😂",
8990
9062
  "🙏",
8991
9063
  "🎉"
8992
- ], Bp = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), Vp = { class: "shadow-overlay bg-elevation-surface-raised-default mx-auto flex w-max max-w-full items-center gap-1 rounded-full px-3 py-1" }, Hp = ["disabled", "onClick"], Up = ["disabled"], Wp = {
9064
+ ], Hp = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), Up = { class: "shadow-overlay bg-elevation-surface-raised-default mx-auto flex w-max max-w-full items-center gap-1 rounded-full px-3 py-1" }, Wp = ["disabled", "onClick"], Gp = ["disabled"], Kp = {
8993
9065
  key: 0,
8994
9066
  class: "bg-elevation-surface-raised-default shadow-overlay m-0 grid grid-cols-6 gap-1 rounded-lg p-1.5"
8995
- }, Gp = ["onClick"], Kp = /* @__PURE__ */ $(/* @__PURE__ */ u({
9067
+ }, qp = ["onClick"], Jp = /* @__PURE__ */ $(/* @__PURE__ */ u({
8996
9068
  __name: "MessageItemMenuReactions",
8997
9069
  props: {
8998
9070
  message: {},
@@ -9004,20 +9076,20 @@ var df = { class: "w-full" }, ff = {
9004
9076
  F(() => c.message.id, () => {
9005
9077
  u.value = !1;
9006
9078
  });
9007
- let d = n(() => Bp);
9079
+ let d = n(() => Hp);
9008
9080
  function f(e) {
9009
9081
  return (c.message.reactions ?? []).some((t) => t.emoji === e);
9010
9082
  }
9011
9083
  function p() {
9012
9084
  c.canReact && (u.value = !u.value);
9013
9085
  }
9014
- return (n, s) => (S(), a(e, null, [o("div", Vp, [(S(!0), a(e, null, T(j(zp), (e) => (S(), a("button", {
9086
+ return (n, s) => (S(), a(e, null, [o("div", Up, [(S(!0), a(e, null, T(j(Vp), (e) => (S(), a("button", {
9015
9087
  key: `${t.message.id}-${e}-common`,
9016
9088
  type: "button",
9017
9089
  class: g(["message-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
9018
9090
  disabled: !t.canReact,
9019
9091
  onClick: (t) => l("react", e)
9020
- }, k(e), 11, Hp))), 128)), o("button", {
9092
+ }, k(e), 11, Wp))), 128)), o("button", {
9021
9093
  type: "button",
9022
9094
  class: "message-reaction-more",
9023
9095
  disabled: !t.canReact,
@@ -9025,14 +9097,14 @@ var df = { class: "w-full" }, ff = {
9025
9097
  }, [(S(), r(D(u.value ? j(De) : j(Ee)), {
9026
9098
  class: "size-7",
9027
9099
  "aria-hidden": "true"
9028
- }))], 8, Up)]), u.value && t.canReact ? (S(), a("div", Wp, [(S(!0), a(e, null, T(d.value, (e) => (S(), a("button", {
9100
+ }))], 8, Gp)]), u.value && t.canReact ? (S(), a("div", Kp, [(S(!0), a(e, null, T(d.value, (e) => (S(), a("button", {
9029
9101
  key: `${t.message.id}-${e}-extended`,
9030
9102
  type: "button",
9031
9103
  class: g(["message-expanded-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
9032
9104
  onClick: (t) => l("react", e)
9033
- }, k(e), 11, Gp))), 128))])) : i("", !0)], 64));
9105
+ }, k(e), 11, qp))), 128))])) : i("", !0)], 64));
9034
9106
  }
9035
- }), [["__scopeId", "data-v-0a11761a"]]), qp = /* @__PURE__ */ $(/* @__PURE__ */ u({
9107
+ }), [["__scopeId", "data-v-0a11761a"]]), Yp = /* @__PURE__ */ $(/* @__PURE__ */ u({
9036
9108
  __name: "MessageItemMenu",
9037
9109
  props: {
9038
9110
  message: {},
@@ -9040,75 +9112,87 @@ var df = { class: "w-full" }, ff = {
9040
9112
  actionItems: {}
9041
9113
  },
9042
9114
  emits: ["hide", "react"],
9043
- setup(e, { expose: n, emit: o }) {
9044
- let s = o, c = w(null), u = w(!1), d = w({
9115
+ setup(e, { expose: o, emit: s }) {
9116
+ let c = s, u = w(null), d = w(!1), f = w({
9045
9117
  left: 0,
9046
9118
  top: 0
9047
- }), f = null, p = null;
9048
- function m(e) {
9119
+ }), p = null, m = null;
9120
+ function g(e) {
9049
9121
  let t = e.currentTarget ?? e.target;
9050
9122
  return t instanceof HTMLElement ? t : null;
9051
9123
  }
9052
- async function g() {
9053
- if (typeof window > "u" || !c.value) return;
9054
- let e = window.visualViewport, t = e?.offsetLeft ?? 0, n = e?.offsetTop ?? 0, r = e?.width ?? window.innerWidth, i = e?.height ?? window.innerHeight, a = c.value.getBoundingClientRect(), o = t + 12, s = t + r - a.width - 12, l = n + 12, u = n + i - a.height - 12, m = Math.max(o, s), h = o, g = l;
9055
- if (p) {
9056
- let e = p.y + 10 + a.height <= n + i - 12;
9057
- h = Math.min(Math.max(p.x - a.width / 2, o), m), g = e ? Math.min(p.y + 10, u) : Math.max(p.y - a.height - 10, l);
9058
- } else if (f) {
9059
- let e = f.getBoundingClientRect(), t = e.left + e.width / 2, r = e.top + Math.min(e.height / 2, 32), s = r + 10 + a.height <= n + i - 12;
9060
- h = Math.min(Math.max(t - a.width / 2, o), m), g = s ? Math.min(r + 10, u) : Math.max(r - a.height - 10, l);
9124
+ async function _() {
9125
+ if (typeof window > "u" || !u.value) return;
9126
+ let e = window.visualViewport, t = e?.offsetLeft ?? 0, n = e?.offsetTop ?? 0, r = e?.width ?? window.innerWidth, i = e?.height ?? window.innerHeight, a = u.value.getBoundingClientRect(), o = t + 12, s = t + r - a.width - 12, c = n + 12, l = n + i - a.height - 12, d = Math.max(o, s), h = o, g = c;
9127
+ if (m) {
9128
+ let e = m.y + 10 + a.height <= n + i - 12;
9129
+ h = Math.min(Math.max(m.x - a.width / 2, o), d), g = e ? Math.min(m.y + 10, l) : Math.max(m.y - a.height - 10, c);
9130
+ } else if (p) {
9131
+ let e = p.getBoundingClientRect(), t = e.left + e.width / 2, r = e.top + Math.min(e.height / 2, 32), s = r + 10 + a.height <= n + i - 12;
9132
+ h = Math.min(Math.max(t - a.width / 2, o), d), g = s ? Math.min(r + 10, l) : Math.max(r - a.height - 10, c);
9061
9133
  }
9062
- d.value = {
9134
+ f.value = {
9063
9135
  left: h,
9064
9136
  top: g
9065
9137
  };
9066
9138
  }
9067
- async function _(e, t) {
9068
- f = m(e), p = t ?? null, !(!f && !p) && (u.value = !0, await h(), await g());
9069
- }
9070
- function b() {
9071
- u.value && (u.value = !1, f = null, p = null, s("hide"));
9139
+ async function b(e, t) {
9140
+ p = g(e), m = t ?? null, !(!p && !m) && (d.value = !0, await h(), await _());
9072
9141
  }
9073
- function x(e) {
9074
- if (!u.value) return;
9075
- let t = e.target;
9076
- c.value?.contains(t) || f?.contains(t) || b();
9142
+ function x() {
9143
+ d.value && (d.value = !1, p = null, m = null, c("hide"));
9077
9144
  }
9078
9145
  function C(e) {
9079
- e.key === "Escape" && b();
9080
- }
9081
- function T() {
9082
- b();
9146
+ if (!d.value) return;
9147
+ let t = e.target;
9148
+ if (!u.value?.contains(t)) {
9149
+ if (p) {
9150
+ if (p.closest(".message-item")?.contains(t) && t instanceof HTMLElement && t.classList.contains("message-bubble--spotlight")) {
9151
+ setTimeout(() => {
9152
+ x();
9153
+ }, 100);
9154
+ return;
9155
+ }
9156
+ if (p?.contains(t) || p.closest(".message-item")?.contains(t)) return;
9157
+ }
9158
+ x();
9159
+ }
9083
9160
  }
9084
- return typeof window < "u" && (document.addEventListener("pointerdown", x, !0), document.addEventListener("keydown", C), window.addEventListener("resize", T), window.addEventListener("scroll", T, !0)), y(() => {
9085
- typeof window > "u" || (document.removeEventListener("pointerdown", x, !0), document.removeEventListener("keydown", C), window.removeEventListener("resize", T), window.removeEventListener("scroll", T, !0));
9086
- }), n({
9087
- show: _,
9088
- hide: b
9089
- }), (n, o) => (S(), r(t, { to: "body" }, [u.value && e.message ? (S(), a("div", {
9161
+ function T(e) {
9162
+ e.key === "Escape" && x();
9163
+ }
9164
+ function E() {
9165
+ x();
9166
+ }
9167
+ return typeof window < "u" && (document.addEventListener("pointerdown", C, !0), document.addEventListener("keydown", T), window.addEventListener("resize", E), window.addEventListener("scroll", E, !0)), y(() => {
9168
+ typeof window > "u" || (document.removeEventListener("pointerdown", C, !0), document.removeEventListener("keydown", T), window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0));
9169
+ }), o({
9170
+ show: b,
9171
+ hide: x,
9172
+ visible: n(() => d.value)
9173
+ }), (n, o) => (S(), r(t, { to: "body" }, [d.value && e.message ? (S(), a("div", {
9090
9174
  key: 0,
9091
9175
  ref_key: "panelRef",
9092
- ref: c,
9176
+ ref: u,
9093
9177
  class: "message-action-menu max-w-62 min-w-54",
9094
9178
  style: v({
9095
- left: `${d.value.left}px`,
9096
- top: `${d.value.top}px`
9179
+ left: `${f.value.left}px`,
9180
+ top: `${f.value.top}px`
9097
9181
  }),
9098
9182
  "data-testid": "message-action-popover-shell"
9099
- }, [l(Kp, {
9183
+ }, [l(Jp, {
9100
9184
  message: e.message,
9101
9185
  "can-react": e.canReact,
9102
- onReact: o[0] ||= (e) => s("react", e)
9186
+ onReact: o[0] ||= (e) => c("react", e)
9103
9187
  }, null, 8, ["message", "can-react"]), l(j(ae), { model: e.actionItems }, null, 8, ["model"])], 4)) : i("", !0)]));
9104
9188
  }
9105
- }), [["__scopeId", "data-v-54f6bf5c"]]), Jp = { class: "chat-header border-default bg-elevation-surface-default sticky top-0 z-10 flex items-center justify-between gap-3 border-b px-4 py-3 max-md:px-4 max-md:pb-3 sm:px-5 sm:py-3.5" }, Yp = {
9189
+ }), [["__scopeId", "data-v-f45f7b6d"]]), Xp = { class: "chat-header border-default bg-elevation-surface-default sticky top-0 z-10 flex items-center justify-between gap-3 border-b px-4 py-3 max-md:px-4 max-md:pb-3 sm:px-5 sm:py-3.5" }, Zp = {
9106
9190
  key: 0,
9107
9191
  class: "chat-header__identity flex min-w-0 items-center gap-3"
9108
- }, Xp = { class: "chat-header__text min-w-0" }, Zp = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, Qp = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, $p = { key: 0 }, em = { key: 1 }, tm = { class: "chat-header__actions flex items-center gap-2" }, nm = {
9192
+ }, Qp = { class: "chat-header__text min-w-0" }, $p = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, em = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, tm = { key: 0 }, nm = { key: 1 }, rm = { class: "chat-header__actions flex items-center gap-2" }, im = {
9109
9193
  key: 0,
9110
9194
  class: "chat-header__tags hidden flex-wrap gap-2 md:flex"
9111
- }, rm = /* @__PURE__ */ u({
9195
+ }, am = /* @__PURE__ */ u({
9112
9196
  __name: "MessageListHeader",
9113
9197
  props: {
9114
9198
  conversation: {},
@@ -9116,28 +9200,28 @@ var df = { class: "w-full" }, ff = {
9116
9200
  },
9117
9201
  setup(t) {
9118
9202
  let { t: n } = K();
9119
- return (s, c) => (S(), a("header", Jp, [t.conversation ? (S(), a("div", Yp, [l(j(R), {
9203
+ return (s, c) => (S(), a("header", Xp, [t.conversation ? (S(), a("div", Zp, [l(j(R), {
9120
9204
  image: t.conversation.avatar,
9121
9205
  label: t.conversation.avatar ? void 0 : t.conversation.title.slice(0, 1).toUpperCase(),
9122
9206
  shape: "circle",
9123
9207
  class: "chat-header__avatar shrink-0"
9124
- }, null, 8, ["image", "label"]), o("div", Xp, [o("p", Zp, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", Qp, [t.parentMessage ? (S(), a("span", $p, k(t.parentMessage.senderName), 1)) : (S(), a("span", em, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", tm, [t.conversation?.tags?.length ? (S(), a("div", nm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(V), {
9208
+ }, null, 8, ["image", "label"]), o("div", Qp, [o("p", $p, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", em, [t.parentMessage ? (S(), a("span", tm, k(t.parentMessage.senderName), 1)) : (S(), a("span", nm, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", rm, [t.conversation?.tags?.length ? (S(), a("div", im, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(V), {
9125
9209
  key: e,
9126
9210
  text: e,
9127
9211
  context: "secondary",
9128
9212
  rounded: ""
9129
9213
  }, null, 8, ["text"]))), 128))])) : i("", !0)])]));
9130
9214
  }
9131
- }), im = {
9215
+ }), om = {
9132
9216
  key: 1,
9133
9217
  class: "message-list__empty-state"
9134
- }, am = { class: "space-y-2" }, om = {
9218
+ }, sm = { class: "space-y-2" }, cm = {
9135
9219
  key: 0,
9136
9220
  class: "message-list__thread-root"
9137
- }, sm = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, cm = { class: "body-md text-default mt-1 line-clamp-2" }, lm = {
9221
+ }, lm = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, um = { class: "body-md text-default mt-1 line-clamp-2" }, dm = {
9138
9222
  key: 1,
9139
9223
  class: "surface-default text-subtle rounded-2xl p-5 text-center"
9140
- }, um = /* @__PURE__ */ $(/* @__PURE__ */ u({
9224
+ }, fm = /* @__PURE__ */ $(/* @__PURE__ */ u({
9141
9225
  __name: "MessageList",
9142
9226
  props: {
9143
9227
  target: {},
@@ -9230,7 +9314,7 @@ var df = { class: "w-full" }, ff = {
9230
9314
  title: D.value,
9231
9315
  subtitle: O.value,
9232
9316
  memberCount: A.value
9233
- }, () => [l(rm, {
9317
+ }, () => [l(am, {
9234
9318
  conversation: j(u).conversation.value,
9235
9319
  "parent-message": _.value
9236
9320
  }, null, 8, ["conversation", "parent-message"])], !0) : i("", !0), j(u).conversation.value ? (S(), a("div", {
@@ -9241,12 +9325,12 @@ var df = { class: "w-full" }, ff = {
9241
9325
  ref: te,
9242
9326
  class: g(["message-list__scroll min-h-0 flex-1", F.value ? "p-0" : P.value ? "px-5 py-4" : "px-2 pt-2 pb-3"]),
9243
9327
  onScroll: n[2] ||= (...e) => j(L) && j(L)(...e)
9244
- }, [o("div", am, [
9245
- _.value ? (S(), a("div", om, [o("p", sm, k(_.value.senderName), 1), o("p", cm, k(j(Ws)(_.value, j(c)("message"), j(u).mentionNameByUid.value)), 1)])) : i("", !0),
9328
+ }, [o("div", sm, [
9329
+ _.value ? (S(), a("div", cm, [o("p", lm, k(_.value.senderName), 1), o("p", um, k(j(Ws)(_.value, j(c)("message"), j(u).mentionNameByUid.value)), 1)])) : i("", !0),
9246
9330
  (S(!0), a(e, null, T(m.value, (o, c) => (S(), a(e, { key: o.id }, [ue(c) ? (S(), r(Af, {
9247
9331
  key: 0,
9248
9332
  date: o.sentAt
9249
- }, null, 8, ["date"])) : i("", !0), l(Rp, {
9333
+ }, null, 8, ["date"])) : i("", !0), l(Bp, {
9250
9334
  message: o,
9251
9335
  "current-user-id": j(u).currentUserId.value,
9252
9336
  "can-react": j(u).canReact.value,
@@ -9255,6 +9339,7 @@ var df = { class: "w-full" }, ff = {
9255
9339
  "pending-option-key": ee.value,
9256
9340
  "action-message-class": s.actionMessageClass,
9257
9341
  "action-message-row-class": s.actionMessageRowClass,
9342
+ "context-menu-open": j(z)?.id === o.id && R.value?.visible,
9258
9343
  onContextmenu: (e) => j(ne)(o, e),
9259
9344
  onTap: (e) => j(B)(o, e),
9260
9345
  onOpenMedia: V,
@@ -9272,19 +9357,20 @@ var df = { class: "w-full" }, ff = {
9272
9357
  "pending-option-key",
9273
9358
  "action-message-class",
9274
9359
  "action-message-row-class",
9360
+ "context-menu-open",
9275
9361
  "onContextmenu",
9276
9362
  "onTap",
9277
9363
  "onVotePoll",
9278
9364
  "onToggleReaction",
9279
9365
  "onOpenThread"
9280
9366
  ])], 64))), 128)),
9281
- m.value.length === 0 && C.value && !h.value ? (S(), a("div", lm, k(j(c)("noMessagesYetInThisGroup")), 1)) : i("", !0)
9282
- ])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", P.value ? F.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div", im, k(j(c)("selectConversationToStart")), 1))], 2),
9367
+ m.value.length === 0 && C.value && !h.value ? (S(), a("div", dm, k(j(c)("noMessagesYetInThisGroup")), 1)) : i("", !0)
9368
+ ])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", P.value ? F.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div", om, k(j(c)("selectConversationToStart")), 1))], 2),
9283
9369
  l(Df, {
9284
9370
  attachment: M.value,
9285
9371
  onClose: H
9286
9372
  }, null, 8, ["attachment"]),
9287
- l(qp, {
9373
+ l(Yp, {
9288
9374
  ref_key: "actionMenuRef",
9289
9375
  ref: R,
9290
9376
  message: j(z),
@@ -9300,13 +9386,13 @@ var df = { class: "w-full" }, ff = {
9300
9386
  ])
9301
9387
  ], 64));
9302
9388
  }
9303
- }), [["__scopeId", "data-v-bea26e53"]]), dm = { class: "receipt-section" }, fm = { class: "receipt-section__header" }, pm = { class: "heading-sm text-default" }, mm = { class: "body-sm text-subtlest" }, hm = {
9389
+ }), [["__scopeId", "data-v-2c53d015"]]), pm = { class: "receipt-section" }, mm = { class: "receipt-section__header" }, hm = { class: "heading-sm text-default" }, gm = { class: "body-sm text-subtlest" }, _m = {
9304
9390
  key: 0,
9305
9391
  class: "space-y-2"
9306
- }, gm = { class: "flex min-w-0 items-center gap-3" }, _m = { class: "min-w-0" }, vm = { class: "heading-sm text-default truncate" }, ym = { class: "body-sm text-subtle truncate" }, bm = { class: "body-sm text-subtle shrink-0" }, xm = {
9392
+ }, vm = { class: "flex min-w-0 items-center gap-3" }, ym = { class: "min-w-0" }, bm = { class: "heading-sm text-default truncate" }, xm = { class: "body-sm text-subtle truncate" }, Sm = { class: "body-sm text-subtle shrink-0" }, Cm = {
9307
9393
  key: 1,
9308
9394
  class: "receipt-section__empty"
9309
- }, Sm = /* @__PURE__ */ $(/* @__PURE__ */ u({
9395
+ }, wm = /* @__PURE__ */ $(/* @__PURE__ */ u({
9310
9396
  __name: "ReceiptSection",
9311
9397
  props: {
9312
9398
  title: {},
@@ -9315,29 +9401,29 @@ var df = { class: "w-full" }, ff = {
9315
9401
  formatDateTime: { type: Function }
9316
9402
  },
9317
9403
  setup(t) {
9318
- return (n, r) => (S(), a("section", dm, [o("div", fm, [o("p", pm, k(t.title), 1), o("span", mm, k(t.receipts.length), 1)]), t.receipts.length ? (S(), a("div", hm, [(S(!0), a(e, null, T(t.receipts, (e) => (S(), a("div", {
9404
+ return (n, r) => (S(), a("section", pm, [o("div", mm, [o("p", hm, k(t.title), 1), o("span", gm, k(t.receipts.length), 1)]), t.receipts.length ? (S(), a("div", _m, [(S(!0), a(e, null, T(t.receipts, (e) => (S(), a("div", {
9319
9405
  key: `${e.kind}-${e.user.uid}`,
9320
9406
  class: "receipt-section__row"
9321
- }, [o("div", gm, [l(j(R), {
9407
+ }, [o("div", vm, [l(j(R), {
9322
9408
  image: e.user.avatar,
9323
9409
  label: e.user.avatar ? void 0 : e.user.name.slice(0, 1).toUpperCase(),
9324
9410
  shape: "circle",
9325
9411
  class: "shrink-0"
9326
- }, null, 8, ["image", "label"]), o("div", _m, [o("p", vm, k(e.user.name), 1), o("p", ym, k(e.user.uid), 1)])]), o("p", bm, k(t.formatDateTime(e.timestamp)), 1)]))), 128))])) : (S(), a("div", xm, k(t.emptyLabel), 1))]));
9412
+ }, null, 8, ["image", "label"]), o("div", ym, [o("p", bm, k(e.user.name), 1), o("p", xm, k(e.user.uid), 1)])]), o("p", Sm, k(t.formatDateTime(e.timestamp)), 1)]))), 128))])) : (S(), a("div", Cm, k(t.emptyLabel), 1))]));
9327
9413
  }
9328
- }), [["__scopeId", "data-v-2b2f0a3e"]]), Cm = {
9414
+ }), [["__scopeId", "data-v-2b2f0a3e"]]), Tm = {
9329
9415
  key: 0,
9330
9416
  class: "message-info-dialog-content space-y-5 overflow-y-auto"
9331
- }, wm = { class: "message-info-summary px-4 py-4 sm:px-6 sm:py-5" }, Tm = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, Em = { class: "mt-4 grid gap-3 sm:grid-cols-3" }, Dm = { class: "message-info-metric px-3 py-3" }, Om = { class: "body-sm text-subtlest font-semibold uppercase" }, km = { class: "heading-sm text-default mt-1" }, Am = { class: "message-info-metric px-3 py-3" }, jm = { class: "flex items-center gap-2" }, Mm = { class: "body-sm text-subtlest font-semibold uppercase" }, Nm = { class: "heading-sm text-default mt-1" }, Pm = { class: "message-info-metric px-3 py-3" }, Fm = { class: "flex items-center gap-2" }, Im = { class: "body-sm text-subtlest font-semibold uppercase" }, Lm = { class: "heading-sm text-default mt-1" }, Rm = {
9417
+ }, Em = { class: "message-info-summary px-4 py-4 sm:px-6 sm:py-5" }, Dm = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, Om = { class: "mt-4 grid gap-3 sm:grid-cols-3" }, km = { class: "message-info-metric px-3 py-3" }, Am = { class: "body-sm text-subtlest font-semibold uppercase" }, jm = { class: "heading-sm text-default mt-1" }, Mm = { class: "message-info-metric px-3 py-3" }, Nm = { class: "flex items-center gap-2" }, Pm = { class: "body-sm text-subtlest font-semibold uppercase" }, Fm = { class: "heading-sm text-default mt-1" }, Im = { class: "message-info-metric px-3 py-3" }, Lm = { class: "flex items-center gap-2" }, Rm = { class: "body-sm text-subtlest font-semibold uppercase" }, zm = { class: "heading-sm text-default mt-1" }, Bm = {
9332
9418
  key: 0,
9333
9419
  class: "flex items-center justify-center px-4 py-8 sm:px-6"
9334
- }, zm = {
9420
+ }, Vm = {
9335
9421
  key: 1,
9336
9422
  class: "message-info-error body-md mx-4 rounded-xl px-4 py-3 sm:mx-6"
9337
- }, Bm = {
9423
+ }, Hm = {
9338
9424
  key: 2,
9339
9425
  class: "space-y-4 pb-4 sm:pb-5"
9340
- }, Vm = /* @__PURE__ */ $(/* @__PURE__ */ u({
9426
+ }, Um = /* @__PURE__ */ $(/* @__PURE__ */ u({
9341
9427
  __name: "MessageInfoDialog",
9342
9428
  props: {
9343
9429
  open: { type: Boolean },
@@ -9366,27 +9452,27 @@ var df = { class: "w-full" }, ff = {
9366
9452
  "close-label": j(d)("close"),
9367
9453
  onClose: n[0] ||= (e) => c("close")
9368
9454
  }, {
9369
- default: I(() => [e.message ? (S(), a("div", Cm, [o("div", wm, [o("p", Tm, k(j(Ws)(e.message, j(d)("message"), j(f).mentionNameByUid.value)), 1), o("div", Em, [
9370
- o("div", Dm, [o("p", Om, k(j(d)("sent")), 1), o("p", km, k(g(e.message.sentAt)), 1)]),
9371
- o("div", Am, [o("div", jm, [o("p", Mm, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(V), {
9455
+ default: I(() => [e.message ? (S(), a("div", Tm, [o("div", Em, [o("p", Dm, k(j(Ws)(e.message, j(d)("message"), j(f).mentionNameByUid.value)), 1), o("div", Om, [
9456
+ o("div", km, [o("p", Am, k(j(d)("sent")), 1), o("p", jm, k(g(e.message.sentAt)), 1)]),
9457
+ o("div", Mm, [o("div", Nm, [o("p", Pm, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(V), {
9372
9458
  key: 0,
9373
9459
  text: String(h.value.length),
9374
9460
  context: "secondary",
9375
9461
  rounded: ""
9376
- }, null, 8, ["text"])) : i("", !0)]), o("p", Nm, k(_(e.message.receipts.deliveredAt, h.value.length)), 1)]),
9377
- o("div", Pm, [o("div", Fm, [o("p", Im, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(V), {
9462
+ }, null, 8, ["text"])) : i("", !0)]), o("p", Fm, k(_(e.message.receipts.deliveredAt, h.value.length)), 1)]),
9463
+ o("div", Im, [o("div", Lm, [o("p", Rm, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(V), {
9378
9464
  key: 0,
9379
9465
  text: String(m.value.length),
9380
9466
  context: "success",
9381
9467
  rounded: ""
9382
- }, null, 8, ["text"])) : i("", !0)]), o("p", Lm, k(_(e.message.receipts.readAt, m.value.length)), 1)])
9383
- ])]), e.loading ? (S(), a("div", Rm, [l(j(se), {
9468
+ }, null, 8, ["text"])) : i("", !0)]), o("p", zm, k(_(e.message.receipts.readAt, m.value.length)), 1)])
9469
+ ])]), e.loading ? (S(), a("div", Bm, [l(j(se), {
9384
9470
  style: {
9385
9471
  width: "2.5rem",
9386
9472
  height: "2.5rem"
9387
9473
  },
9388
9474
  "stroke-width": "5"
9389
- })])) : e.error ? (S(), a("div", zm, k(e.error), 1)) : (S(), a("div", Bm, [l(Sm, {
9475
+ })])) : e.error ? (S(), a("div", Vm, k(e.error), 1)) : (S(), a("div", Hm, [l(wm, {
9390
9476
  title: j(d)("readBy"),
9391
9477
  receipts: m.value,
9392
9478
  "empty-label": j(d)("nobodyHasReadThisMessageYet"),
@@ -9395,7 +9481,7 @@ var df = { class: "w-full" }, ff = {
9395
9481
  "title",
9396
9482
  "receipts",
9397
9483
  "empty-label"
9398
- ]), l(Sm, {
9484
+ ]), l(wm, {
9399
9485
  title: j(d)("deliveredNotYetRead"),
9400
9486
  receipts: p.value,
9401
9487
  "empty-label": j(d)("noRecipientsDeliveredStageYet"),
@@ -9413,34 +9499,34 @@ var df = { class: "w-full" }, ff = {
9413
9499
  "close-label"
9414
9500
  ]));
9415
9501
  }
9416
- }), [["__scopeId", "data-v-30ce65f1"]]), Hm = { class: "min-h-0 flex-1 overflow-y-auto" }, Um = {
9502
+ }), [["__scopeId", "data-v-30ce65f1"]]), Wm = { class: "min-h-0 flex-1 overflow-y-auto" }, Gm = {
9417
9503
  key: 0,
9418
9504
  class: "flex h-full min-h-64 items-center justify-center"
9419
- }, Wm = {
9505
+ }, Km = {
9420
9506
  key: 1,
9421
9507
  class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-64 items-center justify-center rounded-xl px-6 text-center"
9422
- }, Gm = {
9508
+ }, qm = {
9423
9509
  key: 2,
9424
9510
  class: "space-y-3"
9425
- }, Km = { class: "flex flex-wrap items-start justify-between gap-3" }, qm = { class: "w-full space-y-2" }, Jm = { class: "center between gap-2" }, Ym = { class: "" }, Xm = { class: "space-y-1" }, Zm = { class: "heading-sm text-default" }, Qm = {
9511
+ }, Jm = { class: "flex flex-wrap items-start justify-between gap-3" }, Ym = { class: "w-full space-y-2" }, Xm = { class: "center between gap-2" }, Zm = { class: "" }, Qm = { class: "space-y-1" }, $m = { class: "heading-sm text-default" }, eh = {
9426
9512
  key: 0,
9427
9513
  class: "body-md text-default"
9428
- }, $m = {
9514
+ }, th = {
9429
9515
  key: 1,
9430
9516
  class: "body-md text-default wrap-break-word whitespace-pre-wrap"
9431
- }, eh = {
9517
+ }, nh = {
9432
9518
  key: 0,
9433
9519
  class: "max-w-sm"
9434
- }, th = { class: "flex flex-wrap items-center gap-1" }, nh = {
9520
+ }, rh = { class: "flex flex-wrap items-center gap-1" }, ih = {
9435
9521
  key: 0,
9436
9522
  class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-center"
9437
- }, rh = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, ih = { class: "flex items-center gap-2" }, ah = {
9523
+ }, ah = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, oh = { class: "flex items-center gap-2" }, sh = {
9438
9524
  key: 1,
9439
9525
  class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3"
9440
- }, oh = {
9526
+ }, ch = {
9441
9527
  key: 0,
9442
9528
  class: "relative max-w-sm"
9443
- }, sh = { class: "absolute top-2 right-2" }, ch = ["placeholder"], lh = { class: "flex items-center justify-end gap-2" }, uh = /* @__PURE__ */ $(/* @__PURE__ */ u({
9529
+ }, lh = { class: "absolute top-2 right-2" }, uh = ["placeholder"], dh = { class: "flex items-center justify-end gap-2" }, fh = /* @__PURE__ */ $(/* @__PURE__ */ u({
9444
9530
  __name: "ScheduledMessagesDialog",
9445
9531
  props: {
9446
9532
  open: { type: Boolean },
@@ -9529,17 +9615,17 @@ var df = { class: "w-full" }, ff = {
9529
9615
  "close-label": j(v)("close"),
9530
9616
  onClose: s[3] ||= (e) => u("close")
9531
9617
  }, {
9532
- default: I(() => [o("div", Hm, [t.loading ? (S(), a("div", Um, [l(j(se), {
9618
+ default: I(() => [o("div", Wm, [t.loading ? (S(), a("div", Gm, [l(j(se), {
9533
9619
  style: {
9534
9620
  width: "2.75rem",
9535
9621
  height: "2.75rem"
9536
9622
  },
9537
9623
  "stroke-width": "6"
9538
- })])) : y.value.length === 0 ? (S(), a("div", Wm, k(j(v)("noScheduledMessagesForConversation")), 1)) : (S(), a("div", Gm, [(S(!0), a(e, null, T(y.value, (e) => (S(), a("article", {
9624
+ })])) : y.value.length === 0 ? (S(), a("div", Km, k(j(v)("noScheduledMessagesForConversation")), 1)) : (S(), a("div", qm, [(S(!0), a(e, null, T(y.value, (e) => (S(), a("article", {
9539
9625
  key: e.id,
9540
9626
  class: "border-default rounded-lg border px-4 py-3"
9541
- }, [o("div", Km, [o("div", qm, [
9542
- o("div", Jm, [o("div", Ym, [e.kind === "poll" ? (S(), r(j(V), {
9627
+ }, [o("div", Jm, [o("div", Ym, [
9628
+ o("div", Xm, [o("div", Zm, [e.kind === "poll" ? (S(), r(j(V), {
9543
9629
  key: 0,
9544
9630
  text: j(v)("poll"),
9545
9631
  context: "info",
@@ -9560,9 +9646,9 @@ var df = { class: "w-full" }, ff = {
9560
9646
  size: "small",
9561
9647
  onClick: (t) => B(e)
9562
9648
  }, null, 8, ["icon", "onClick"])]),
9563
- o("div", Xm, [o("p", Zm, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", Qm, k(e.poll.question), 1)) : (S(), a("p", $m, k(j(Ws)(e, j(v)("attachment"))), 1))]),
9564
- L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", eh, [l(lp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
9565
- ]), o("div", th, [e.kind === "poll" ? i("", !0) : (S(), r(j(z), {
9649
+ o("div", Qm, [o("p", $m, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", eh, k(e.poll.question), 1)) : (S(), a("p", th, k(j(Ws)(e, j(v)("attachment"))), 1))]),
9650
+ L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", nh, [l(lp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
9651
+ ]), o("div", rh, [e.kind === "poll" ? i("", !0) : (S(), r(j(z), {
9566
9652
  key: 0,
9567
9653
  label: j(v)("edit"),
9568
9654
  icon: j(ye),
@@ -9584,7 +9670,7 @@ var df = { class: "w-full" }, ff = {
9584
9670
  "label",
9585
9671
  "icon",
9586
9672
  "onClick"
9587
- ])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div", nh, [o("div", rh, [te(o("input", {
9673
+ ])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div", ih, [o("div", ah, [te(o("input", {
9588
9674
  "onUpdate:modelValue": s[0] ||= (e) => m.value = e,
9589
9675
  type: "date",
9590
9676
  class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
@@ -9596,7 +9682,7 @@ var df = { class: "w-full" }, ff = {
9596
9682
  pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
9597
9683
  "aria-label": "Time (24-hour)",
9598
9684
  class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
9599
- }, null, 512), [[ee, h.value]])]), o("div", ih, [l(j(z), {
9685
+ }, null, 512), [[ee, h.value]])]), o("div", oh, [l(j(z), {
9600
9686
  label: j(v)("save"),
9601
9687
  size: "small",
9602
9688
  disabled: !m.value || !b.value,
@@ -9610,8 +9696,8 @@ var df = { class: "w-full" }, ff = {
9610
9696
  size: "small",
9611
9697
  text: "",
9612
9698
  onClick: M
9613
- }, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div", ah, [
9614
- L(e) ? (S(), a("div", oh, [l(lp, { message: N(e) }, null, 8, ["message"]), o("div", sh, [l(j(z), {
9699
+ }, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div", sh, [
9700
+ L(e) ? (S(), a("div", ch, [l(lp, { message: N(e) }, null, 8, ["message"]), o("div", lh, [l(j(z), {
9615
9701
  icon: j(fe),
9616
9702
  "aria-label": j(v)("remove"),
9617
9703
  text: "",
@@ -9625,8 +9711,8 @@ var df = { class: "w-full" }, ff = {
9625
9711
  rows: "3",
9626
9712
  class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
9627
9713
  placeholder: j(v)("writeMessage")
9628
- }, null, 8, ch), [[ee, g.value]]),
9629
- o("div", lh, [l(j(z), {
9714
+ }, null, 8, uh), [[ee, g.value]]),
9715
+ o("div", dh, [l(j(z), {
9630
9716
  label: j(v)("cancel"),
9631
9717
  size: "small",
9632
9718
  text: "",
@@ -9650,7 +9736,7 @@ var df = { class: "w-full" }, ff = {
9650
9736
  "close-label"
9651
9737
  ]));
9652
9738
  }
9653
- }), [["__scopeId", "data-v-0bb2dc95"]]), dh = { class: "chat-status-overlay" }, fh = { class: "chat-status-overlay__card" }, ph = /* @__PURE__ */ $(/* @__PURE__ */ u({
9739
+ }), [["__scopeId", "data-v-0bb2dc95"]]), ph = { class: "chat-status-overlay" }, mh = { class: "chat-status-overlay__card" }, hh = /* @__PURE__ */ $(/* @__PURE__ */ u({
9654
9740
  __name: "ChatStatusOverlay",
9655
9741
  props: {
9656
9742
  visible: { type: Boolean },
@@ -9683,9 +9769,9 @@ var df = { class: "w-full" }, ff = {
9683
9769
  message: t.messages.connecting,
9684
9770
  slotName: "connecting"
9685
9771
  } : null);
9686
- return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div", dh, [o("div", fh, [E(e.$slots, `${r.value.slotName}-content`, {}, () => [o("span", null, k(r.value.message), 1)], !0)])])], !0) : i("", !0);
9772
+ return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div", ph, [o("div", mh, [E(e.$slots, `${r.value.slotName}-content`, {}, () => [o("span", null, k(r.value.message), 1)], !0)])])], !0) : i("", !0);
9687
9773
  }
9688
- }), [["__scopeId", "data-v-7749aec9"]]), mh = /* @__PURE__ */ u({
9774
+ }), [["__scopeId", "data-v-7749aec9"]]), gh = /* @__PURE__ */ u({
9689
9775
  __name: "BccChat",
9690
9776
  props: {
9691
9777
  client: { default: null },
@@ -9916,7 +10002,7 @@ var df = { class: "w-full" }, ff = {
9916
10002
  _: 1
9917
10003
  })]) : i("", !0),
9918
10004
  T.value ? (S(), a(e, { key: 1 }, [
9919
- l(um, {
10005
+ l(fm, {
9920
10006
  target: "main",
9921
10007
  class: g(["h-full", t.containerClass]),
9922
10008
  "hide-group-actions": t.hideGroupActions,
@@ -9950,7 +10036,7 @@ var df = { class: "w-full" }, ff = {
9950
10036
  "close-aria-label": j(m)("closeThread"),
9951
10037
  onClose: r[0] ||= (e) => j(re).emit("ui:closeThread")
9952
10038
  }, {
9953
- default: I(() => [l(um, {
10039
+ default: I(() => [l(fm, {
9954
10040
  target: "thread",
9955
10041
  class: "min-h-0 flex-1",
9956
10042
  "action-message-class": t.actionMessageClass,
@@ -9971,7 +10057,7 @@ var df = { class: "w-full" }, ff = {
9971
10057
  "close-label",
9972
10058
  "close-aria-label"
9973
10059
  ]),
9974
- l(uh, {
10060
+ l(fh, {
9975
10061
  open: j(R).showScheduledMessages.value,
9976
10062
  loading: j(R).loadingScheduledMessages.value,
9977
10063
  messages: j(R).scheduledMessages.value,
@@ -9986,7 +10072,7 @@ var df = { class: "w-full" }, ff = {
9986
10072
  "messages",
9987
10073
  "conversation-title"
9988
10074
  ]),
9989
- l(Vm, {
10075
+ l(Um, {
9990
10076
  open: !!j(R).infoMessage.value,
9991
10077
  message: j(R).infoMessage.value,
9992
10078
  receipts: j(R).infoMessageReceipts.value,
@@ -10001,7 +10087,7 @@ var df = { class: "w-full" }, ff = {
10001
10087
  "error"
10002
10088
  ])
10003
10089
  ], 64)) : i("", !0),
10004
- l(ph, {
10090
+ l(hh, {
10005
10091
  visible: D.value && (T.value?.offlineMode.value || !T.value?.connected.value || x.value && !te.value || v.value || C.value || t.displayNoMessagesText && j(P).isChatEmpty.value),
10006
10092
  "offline-mode": !!(T.value?.offlineMode.value && !O.value),
10007
10093
  connected: !!(T.value?.connected.value || O.value),
@@ -10041,6 +10127,6 @@ var df = { class: "w-full" }, ff = {
10041
10127
  }
10042
10128
  });
10043
10129
  //#endregion
10044
- export { mh as BccChat, mh as BccChatMessageList, Ol as LogSeverity, gu as chat, gu as default, cc as createChatClient };
10130
+ export { gh as BccChat, gh as BccChatMessageList, Ol as LogSeverity, gu as chat, gu as default, cc as createChatClient };
10045
10131
 
10046
10132
  //# sourceMappingURL=vue-bcc-chat-ui.js.map