isometrik-plugin-chat-sdk 2.0.12 → 2.0.14

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.
Files changed (118) hide show
  1. package/dist/cjs/{app-globals-c433d8a6.js → app-globals-95486d77.js} +2 -2
  2. package/dist/cjs/{app-globals-c433d8a6.js.map → app-globals-95486d77.js.map} +1 -1
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js +65 -57
  4. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  5. package/dist/cjs/audio-bubble_4.cjs.entry.js +3 -2
  6. package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/isometrik-webchat.cjs.js +4 -4
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/login-page_3.cjs.entry.js +88 -35
  11. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/{runtime-controls-95f6cb3b.js → runtime-controls-959fe6ed.js} +4 -2
  13. package/dist/cjs/runtime-controls-959fe6ed.js.map +1 -0
  14. package/dist/cjs/{send-media-37e09e83.js → send-media-2dadbb03.js} +98 -19
  15. package/dist/cjs/send-media-2dadbb03.js.map +1 -0
  16. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +53 -12
  17. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
  18. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +12 -32
  19. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
  20. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +11 -6
  21. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
  22. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +5 -5
  23. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  24. package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js +2 -2
  25. package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js.map +1 -1
  26. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +21 -2
  27. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
  28. package/dist/collection/components/my-component/web-chat/WebChat.js +19 -0
  29. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
  30. package/dist/collection/components/my-component/web-chat/data-fetch.js +13 -3
  31. package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
  32. package/dist/collection/components/my-component/web-chat/shell-render.js +1 -1
  33. package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
  34. package/dist/collection/lib/chat/index.js +1 -1
  35. package/dist/collection/lib/chat/index.js.map +1 -1
  36. package/dist/collection/lib/chat/send-media.js +96 -18
  37. package/dist/collection/lib/chat/send-media.js.map +1 -1
  38. package/dist/collection/lib/mqtt/dispatch.js +56 -31
  39. package/dist/collection/lib/mqtt/dispatch.js.map +1 -1
  40. package/dist/collection/lib/mqtt/index.js +1 -1
  41. package/dist/collection/lib/mqtt/index.js.map +1 -1
  42. package/dist/collection/lib/mqtt/types.js +17 -0
  43. package/dist/collection/lib/mqtt/types.js.map +1 -1
  44. package/dist/collection/sdk/init.js +2 -0
  45. package/dist/collection/sdk/init.js.map +1 -1
  46. package/dist/components/ChatFooter.js +12 -32
  47. package/dist/components/ChatFooter.js.map +1 -1
  48. package/dist/components/ChatSidebar.js +36 -12
  49. package/dist/components/ChatSidebar.js.map +1 -1
  50. package/dist/components/GroupCast2.js +2 -2
  51. package/dist/components/GroupCast2.js.map +1 -1
  52. package/dist/components/WebChat.js +88 -34
  53. package/dist/components/WebChat.js.map +1 -1
  54. package/dist/components/WebChatBody.js +6 -6
  55. package/dist/components/WebChatBody.js.map +1 -1
  56. package/dist/components/WebChatHeader.js +11 -6
  57. package/dist/components/WebChatHeader.js.map +1 -1
  58. package/dist/components/index.js +2 -0
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/send-media.js +97 -19
  61. package/dist/components/send-media.js.map +1 -1
  62. package/dist/components/video-message2.js +4 -2
  63. package/dist/components/video-message2.js.map +1 -1
  64. package/dist/esm/{app-globals-dfce8a5b.js → app-globals-879c137f.js} +2 -2
  65. package/dist/esm/{app-globals-dfce8a5b.js.map → app-globals-879c137f.js.map} +1 -1
  66. package/dist/esm/attachment-preview_22.entry.js +65 -57
  67. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  68. package/dist/esm/audio-bubble_4.entry.js +3 -2
  69. package/dist/esm/audio-bubble_4.entry.js.map +1 -1
  70. package/dist/esm/index.js +3 -3
  71. package/dist/esm/isometrik-webchat.js +4 -4
  72. package/dist/esm/loader.js +4 -4
  73. package/dist/esm/login-page_3.entry.js +88 -35
  74. package/dist/esm/login-page_3.entry.js.map +1 -1
  75. package/dist/esm/{runtime-controls-ec6d5c75.js → runtime-controls-6b7c852a.js} +4 -2
  76. package/dist/esm/runtime-controls-6b7c852a.js.map +1 -0
  77. package/dist/esm/{send-media-a946c6dd.js → send-media-ac360d8e.js} +98 -20
  78. package/dist/esm/send-media-ac360d8e.js.map +1 -0
  79. package/dist/isometrik-webchat/index.esm.js +1 -1
  80. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  81. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
  82. package/dist/isometrik-webchat/{p-46dcd38f.js → p-217b9dc2.js} +2 -2
  83. package/dist/isometrik-webchat/p-217b9dc2.js.map +1 -0
  84. package/dist/isometrik-webchat/p-2c87c3fd.entry.js +2 -0
  85. package/dist/isometrik-webchat/p-2c87c3fd.entry.js.map +1 -0
  86. package/dist/isometrik-webchat/p-30855ba7.js +2 -0
  87. package/dist/isometrik-webchat/p-30855ba7.js.map +1 -0
  88. package/dist/isometrik-webchat/{p-cc5b86e6.entry.js → p-3120b9d3.entry.js} +2 -2
  89. package/dist/isometrik-webchat/p-3120b9d3.entry.js.map +1 -0
  90. package/dist/isometrik-webchat/{p-63ff4eea.entry.js.map → p-5672fae7.entry.js} +2 -1
  91. package/dist/isometrik-webchat/p-5672fae7.entry.js.map +1 -0
  92. package/dist/isometrik-webchat/p-79d1a171.js +2 -0
  93. package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -0
  94. package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +2 -0
  95. package/dist/types/components/my-component/web-chat/WebChat.d.ts +322 -0
  96. package/dist/types/components/my-component/web-chat/data-fetch.d.ts +14 -0
  97. package/dist/types/components.d.ts +24 -0
  98. package/dist/types/lib/chat/index.d.ts +1 -1
  99. package/dist/types/lib/chat/send-media.d.ts +21 -0
  100. package/dist/types/lib/mqtt/index.d.ts +1 -1
  101. package/dist/types/lib/mqtt/types.d.ts +11 -0
  102. package/dist/types/sdk/init.d.ts +7 -0
  103. package/package.json +1 -1
  104. package/dist/cjs/runtime-controls-95f6cb3b.js.map +0 -1
  105. package/dist/cjs/send-media-37e09e83.js.map +0 -1
  106. package/dist/components/urls.js +0 -5
  107. package/dist/components/urls.js.map +0 -1
  108. package/dist/esm/runtime-controls-ec6d5c75.js.map +0 -1
  109. package/dist/esm/send-media-a946c6dd.js.map +0 -1
  110. package/dist/isometrik-webchat/p-2d69086d.entry.js +0 -2
  111. package/dist/isometrik-webchat/p-2d69086d.entry.js.map +0 -1
  112. package/dist/isometrik-webchat/p-3f355f9e.js +0 -2
  113. package/dist/isometrik-webchat/p-3f355f9e.js.map +0 -1
  114. package/dist/isometrik-webchat/p-46dcd38f.js.map +0 -1
  115. package/dist/isometrik-webchat/p-63ff4eea.entry.js +0 -2
  116. package/dist/isometrik-webchat/p-86be30fe.js +0 -2
  117. package/dist/isometrik-webchat/p-cc5b86e6.entry.js.map +0 -1
  118. /package/dist/isometrik-webchat/{p-86be30fe.js.map → p-79d1a171.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, a as createEvent, h, g as getElement, F as Fragment, f as Host } from './index-bc463197.js';
2
2
  import { N as New_Group, c as Group_cast, d as Left_Arrow, e as New_Chat, T as Three_Dots, f as Logout, a as Search, A as Add_User, I as Info, g as CloseButton, h as Clear_Chat, D as Delete, B as Block_User, i as Icon_Doc, j as Icon_Excel, k as Icon_Rtf, l as Icon_Txt, m as Smile, S as Send, n as Attachment, M as Microphone, o as Camera_Add, E as Edit, p as Dark_Theme, q as Message, R as Reply, F as Forward } from './chat-assets-bb056958.js';
3
3
  import { C as CancelIcon } from './cancel-4f6541af.js';
4
- import { M as MAX_MEDIA_PER_MESSAGE, t as takeMediaFiles, l as mediaLimitToastMessage, A as ATTACHMENT_BODY_PLACEHOLDER, j as attachmentBodyForApi, i as buildReplyMetaData, o as mediaPreviewUrls, q as docIconKind, r as splitSharedMessages, v as attachmentCaption } from './send-media-a946c6dd.js';
4
+ import { M as MAX_MEDIA_PER_MESSAGE, t as takeMediaFiles, l as mediaLimitToastMessage, A as ATTACHMENT_BODY_PLACEHOLDER, j as attachmentBodyForApi, i as buildReplyMetaData, o as uploadPresignedMediaAttachment, q as mediaPreviewUrls, r as docIconKind, v as splitSharedMessages, w as attachmentCaption } from './send-media-ac360d8e.js';
5
5
  import { i as isPdfAttachment, D as DoubleCheck } from './doublecheck-261763ef.js';
6
6
  import { M } from './index.m-8c70037f.js';
7
7
  import { d as drawerDialogService } from './drawer-d54c2f10.js';
@@ -163,8 +163,6 @@ const NewChat = class {
163
163
  };
164
164
  NewChat.style = ":host {\n display: block;\n height: var(--h-full);\n }\n .new-chat {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n min-height: 0;\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .header {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .back-btn {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n color: var(--icon);\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .back-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .back-btn:hover {\n color: var(--text-primary);\n background: var(--hover-overlay);\n }\n .title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .search-wrap {\n padding: var(--space-8);\n }\n .search-bar {\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n padding: var(--gap-6) var(--space-12);\n border-radius: var(--rounded-8);\n background: var(--bg-secondary);\n }\n .search-bar:focus-within {\n background: var(--bg-primary);\n box-shadow: 0 0 0 1px var(--border);\n }\n .search-bar input {\n border: none;\n outline: none;\n width: var(--w-full);\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n padding: var(--gap-4);\n }\n .search-bar input::placeholder {\n color: var(--text-tertiary);\n }\n .list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n .row {\n display: flex;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) var(--space-16);\n cursor: pointer;\n transition: background-color 0.15s;\n }\n .row:hover {\n background: var(--bg-secondary);\n }\n .action-icon {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n background: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n .action-icon img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n }\n .action-label {\n font-size: var(--text-18);\n font-weight: 500;\n }\n .section-label {\n padding: var(--space-16) var(--space-16) var(--space-8);\n font-size: var(--text-10);\n font-weight: 600;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--brand);\n }\n .avatar {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n object-fit: cover;\n background: var(--brand-soft);\n color: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: var(--text-14);\n flex-shrink: 0;\n overflow: hidden;\n }\n .avatar img {\n width: var(--w-full);\n height: var(--h-full);\n object-fit: cover;\n }\n .row-meta {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n gap: var(--gap-2);\n padding-bottom: var(--gap-4);\n border-bottom: 1px solid var(--border);\n }\n .row-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--gap-8);\n }\n .row-name {\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .row-side {\n font-size: var(--text-10);\n color: var(--text-tertiary);\n flex-shrink: 0;\n }\n .empty {\n padding: var(--space-16);\n text-align: center;\n color: var(--text-secondary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
165
165
 
166
- const GROUP_PROFILE_PLACEHOLDER_IMAGE = 'https://chatstorage.isometrik.ai/5eb3db9ba9252000014f82ff/e1241039-2fef-4830-b927-5bb3424f1764/Users/65eabd45837d05000165d096_1739274360060.svg';
167
-
168
166
  const { state, onChange } = createStore({
169
167
  conversationTitle: '',
170
168
  conversationId: '',
@@ -405,6 +403,7 @@ const ChatSidebar = class {
405
403
  }
406
404
  };
407
405
  this.isMqttConnected = undefined;
406
+ this.showMqttStatus = true;
408
407
  this.conversationList = [];
409
408
  this.isChatFilter = undefined;
410
409
  this.isAllChatButton = undefined;
@@ -701,9 +700,12 @@ const ChatSidebar = class {
701
700
  ? 'you'
702
701
  : ((_b = members === null || members === void 0 ? void 0 : members[0]) === null || _b === void 0 ? void 0 : _b.memberName) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0])}`;
703
702
  case 'membersRemove':
703
+ case 'memberRemove':
704
704
  return `${userId === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) ? 'You' : userName} removed ${((_c = members === null || members === void 0 ? void 0 : members[0]) === null || _c === void 0 ? void 0 : _c.memberId) === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0]) === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userName)
705
705
  ? 'you'
706
706
  : ((_d = members === null || members === void 0 ? void 0 : members[0]) === null || _d === void 0 ? void 0 : _d.memberName) || (memberAdded === null || memberAdded === void 0 ? void 0 : memberAdded[0])}`;
707
+ case 'memberLeave':
708
+ return `${userId === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) ? 'You' : userName || 'Someone'} left the conversation`;
707
709
  case 'conversationTitleUpdated':
708
710
  return 'Conversation Title Updated';
709
711
  case 'conversationImageUpdated':
@@ -726,7 +728,7 @@ const ChatSidebar = class {
726
728
  if ((details === null || details === void 0 ? void 0 : details.action) === 'conversationCreated') {
727
729
  return formatUnixTimestamp((details === null || details === void 0 ? void 0 : details.createdAt) || ((_a = details === null || details === void 0 ? void 0 : details.conversationDetails) === null || _a === void 0 ? void 0 : _a.createdAt) || (tile === null || tile === void 0 ? void 0 : tile.createdAt));
728
730
  }
729
- if (['addAdmin', 'removeAdmin', 'membersAdd', 'membersRemove'].includes(details === null || details === void 0 ? void 0 : details.action)) {
731
+ if (['addAdmin', 'removeAdmin', 'membersAdd', 'membersRemove', 'memberRemove', 'memberLeave'].includes(details === null || details === void 0 ? void 0 : details.action)) {
730
732
  return formatUnixTimestamp(details === null || details === void 0 ? void 0 : details.sentAt);
731
733
  }
732
734
  return formatUnixTimestamp((details === null || details === void 0 ? void 0 : details.updatedAt) || (details === null || details === void 0 ? void 0 : details.sentAt) || (tile === null || tile === void 0 ? void 0 : tile.updatedAt) || '');
@@ -974,13 +976,29 @@ const ChatSidebar = class {
974
976
  const { conversationTitle, imageFile, selectedUserIds, isGroupCast, selectedUsers } = event.detail;
975
977
  try {
976
978
  this.isGroupCreationLoading = true;
979
+ // Empty → profile-avatar group fallback (avoid broken X placeholder CDN asset).
977
980
  let conversationImageUrl = '';
978
981
  if (imageFile) {
979
- // @ts-ignore
980
- conversationImageUrl = await this.getPresignedUrl(imageFile);
981
- }
982
- else {
983
- conversationImageUrl = GROUP_PROFILE_PLACEHOLDER_IMAGE;
982
+ try {
983
+ conversationImageUrl = await this.getPresignedUrl(imageFile);
984
+ }
985
+ catch (uploadErr) {
986
+ console.error('Group image upload failed', uploadErr);
987
+ showToast({
988
+ message: 'Could not upload group photo. Try again or create without a photo.',
989
+ type: 'error',
990
+ position: 'bottom-right',
991
+ });
992
+ return;
993
+ }
994
+ if (!conversationImageUrl) {
995
+ showToast({
996
+ message: 'Group photo upload returned an empty URL',
997
+ type: 'error',
998
+ position: 'bottom-right',
999
+ });
1000
+ return;
1001
+ }
984
1002
  }
985
1003
  const paramsForCreateConversation = {
986
1004
  typingEvents: true,
@@ -1043,13 +1061,17 @@ const ChatSidebar = class {
1043
1061
  members: selectedUserIds,
1044
1062
  };
1045
1063
  this.conversationList = [newConversation, ...this.conversationList];
1046
- // this.sortConversations();
1047
1064
  this.selectedConversationID = res.conversationId;
1048
- // Update URL
1065
+ // Keep header avatar in sync immediately (details fetch can lag / omit image).
1066
+ conversationStore.updateConversationDetails({
1067
+ conversationId: res.conversationId,
1068
+ conversationTitle,
1069
+ conversationImageUrl: conversationImageUrl || '',
1070
+ isGroup: true,
1071
+ });
1049
1072
  const url = new URL(window.location.href);
1050
1073
  url.searchParams.set('conversation', res.conversationId);
1051
1074
  window.history.pushState({}, '', url);
1052
- // Emit chat tile selected event
1053
1075
  this.chatTileSelected.emit(res.conversationId);
1054
1076
  showToast({
1055
1077
  message: 'Group created successfully',
@@ -1162,7 +1184,7 @@ const ChatSidebar = class {
1162
1184
  return (title || '').toLowerCase().includes(searchQuery);
1163
1185
  });
1164
1186
  return (h("div", { class: "chat-sidebar-container", style: { backgroundColor: this.sidebarColor || undefined } }, this.isGroupCreationLoading && (h("div", { class: "loader" }, h("spinner-loader", { height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))), this.showGroupInfo ? (h("div", { class: "new-chat-panel" }, h("iso-group-info", { label: this.memberPickerIsGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.pendingGroupMembers.map(m => m.userId), selectedUsers: this.pendingGroupMembers, isGroupCast: this.memberPickerIsGroupCast, closeGroupInfo: this.closeGroupInfoStep, afterCreate: this.finishGroupInfoStep }))) : this.showMemberPicker ? (h("div", { class: "new-chat-panel" }, h("div", { class: "picker-back" }, h("button", { type: "button", onClick: this.closeMemberPicker, "aria-label": "Back" }, h("img", { class: "theme-icon", src: Left_Arrow, alt: "" })), h("h2", { class: "picker-title" }, this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group')), h("searchable-list", { label: this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group', hideTopbar: true, contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getAllGroupMemeber(query || '', skip || 0), onSend: this.submitMemberPicker, height: "100%" }))) : this.showNewChat ? (h("div", { class: "new-chat-panel" }, h("new-chat", { contactList: this.nonBlockedContacts, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, onSearch: (query, skip) => this.getAllMemeber(query || '', skip || 0), onSelect: this.handleNewChatContactPick, onClose: () => this.closeNewChat(), customParts: this.customParts, groupcastEnabled: this.groupcastEnabled }))) : ([
1165
- h("div", { class: "chat-sidebar-top" }, h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats')) : (h("span", null)), h("div", { class: "chat-sidebar-actions" }, h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, h("img", { src: New_Chat, alt: "New chat" })), h("div", { class: "more-wrap" }, h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, h("img", { class: "theme-icon", src: Three_Dots, alt: "" })), this.showMoreMenu ? (h("div", { class: "more-menu", role: "menu" }, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, h("img", { class: "theme-icon", src: New_Group, alt: "" }), h("span", null, "New group")), h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (h("div", { class: "chat-sidebar-search" }, h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null),
1187
+ h("div", { class: "chat-sidebar-top" }, h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats', this.showMqttStatus !== false ? (h("span", { class: "mqtt-status", title: this.isMqttConnected ? 'Realtime connected' : 'Realtime disconnected', "aria-label": this.isMqttConnected ? 'MQTT connected' : 'MQTT disconnected' }, h("span", { class: { 'mqtt-status-dot': true, 'is-connected': !!this.isMqttConnected } }))) : null)) : this.showMqttStatus !== false ? (h("span", { class: "mqtt-status", title: this.isMqttConnected ? 'Realtime connected' : 'Realtime disconnected', "aria-label": this.isMqttConnected ? 'MQTT connected' : 'MQTT disconnected' }, h("span", { class: { 'mqtt-status-dot': true, 'is-connected': !!this.isMqttConnected } }))) : (h("span", null)), h("div", { class: "chat-sidebar-actions" }, h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, h("img", { src: New_Chat, alt: "New chat" })), h("div", { class: "more-wrap" }, h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, h("img", { class: "theme-icon", src: Three_Dots, alt: "" })), this.showMoreMenu ? (h("div", { class: "more-menu", role: "menu" }, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, h("img", { class: "theme-icon", src: New_Group, alt: "" }), h("span", null, "New group")), h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (h("div", { class: "chat-sidebar-search" }, h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null),
1166
1188
  h("div", { class: "chat-sidebar-list", onScroll: (e) => this.handleListScroll(e) }, this.isConversationLoading ? (h("div", { class: "chat-sidebar-loading" }, h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))) : filteredConversations.length > 0 ? (filteredConversations.map((tile) => this.renderConversationTile(tile))) : (h("div", { class: "chat-sidebar-empty" }, "No conversation found")), this.isLoading && this.hasMoreConversations && (h("div", { class: "chat-sidebar-loading" }, h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))),
1167
1189
  ])));
1168
1190
  }
@@ -1172,7 +1194,7 @@ const ChatSidebar = class {
1172
1194
  "conversationDetails": ["handleConversationDetailsChange"]
1173
1195
  }; }
1174
1196
  };
1175
- ChatSidebar.style = ":host {\n display: block;\n height: var(--h-full);\n width: var(--w-full);\n min-width: 0;\n max-width: var(--w-full);\n min-height: 0;\n overflow: hidden;\n font-family: var(--font-primary);\n }\n .chat-sidebar-container {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n width: var(--w-full);\n max-width: var(--w-full);\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n background: var(--bg-primary);\n border-right: 1px solid var(--border);\n z-index: 10;\n font-family: var(--font-primary);\n overflow: hidden;\n }\n .chat-sidebar-top {\n padding: var(--space-16) var(--space-16) var(--space-8);\n }\n .chat-sidebar-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--gap-4);\n }\n .chat-sidebar-header {\n font-size: var(--text-24);\n font-weight: 700;\n letter-spacing: -0.02em;\n color: var(--text-primary);\n margin: 0;\n }\n .chat-sidebar-actions {\n display: flex;\n align-items: center;\n gap: var(--gap-4);\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n transition: background-color 0.15s;\n }\n .icon-btn:hover {\n background-color: var(--hover-overlay);\n }\n .icon-btn img {\n width: var(--icon-lg);\n height: var(--icon-lg);\n display: block;\n }\n .more-wrap .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-4);\n width: 13rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--space-8) 0;\n z-index: 50;\n }\n .more-item {\n width: calc(100% - 12px);\n margin: 0 6px;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n padding: var(--space-8) var(--space-12);\n border: none;\n background: transparent;\n border-radius: var(--rounded-8);\n cursor: pointer;\n text-align: left;\n font-size: var(--text-14);\n color: var(--text-primary);\n }\n .more-item:hover {\n background: var(--brand-soft);\n color: var(--brand);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n color: var(--danger);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) var(--space-8);\n }\n .chat-sidebar-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .chat-sidebar-header-actions button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .chat-sidebar-header-actions img {\n width: 28px;\n height: 28px;\n }\n .new-chat-overlay {\n position: absolute;\n inset: 0;\n z-index: 20;\n background: var(--bg-primary-color);\n }\n .chat-sidebar-search {\n position: relative;\n margin-bottom: var(--gap-8);\n }\n .chat-sidebar-search input {\n width: var(--w-full);\n box-sizing: border-box;\n padding: var(--space-12) var(--space-12);\n border: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n outline: none;\n }\n .chat-sidebar-search input::placeholder {\n color: var(--text-tertiary);\n }\n .chat-sidebar-search input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .chat-sidebar-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n }\n .chat-sidebar-list::-webkit-scrollbar {\n width: var(--scrollbar);\n }\n .chat-sidebar-list::-webkit-scrollbar-track {\n background: transparent;\n }\n .chat-sidebar-list::-webkit-scrollbar-thumb {\n background-color: var(--bg-input);\n border-radius: var(--rounded-10);\n }\n .chat-sidebar-empty,\n .chat-sidebar-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-16) var(--space-12);\n color: var(--text-primary);\n text-align: center;\n }\n .loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: var(--space-16);\n border-radius: var(--rounded-4);\n z-index: 10000;\n height: var(--h-full);\n width: var(--w-full);\n background: var(--overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .toaster {\n position: fixed;\n bottom: var(--space-16);\n right: var(--space-16);\n z-index: 1000;\n }\n .new-chat-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .new-chat-panel new-chat,\n .new-chat-panel searchable-list {\n display: block;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .picker-back {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n font-family: var(--font-primary);\n }\n .picker-back button {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .picker-back button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .picker-back button:hover {\n background: var(--hover-overlay);\n }\n .picker-title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
1197
+ ChatSidebar.style = ":host {\n display: block;\n height: var(--h-full);\n width: var(--w-full);\n min-width: 0;\n max-width: var(--w-full);\n min-height: 0;\n overflow: hidden;\n font-family: var(--font-primary);\n }\n .chat-sidebar-container {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n width: var(--w-full);\n max-width: var(--w-full);\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n background: var(--bg-primary);\n border-right: 1px solid var(--border);\n z-index: 10;\n font-family: var(--font-primary);\n overflow: hidden;\n }\n .chat-sidebar-top {\n padding: var(--space-16) var(--space-16) var(--space-8);\n }\n .chat-sidebar-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--gap-4);\n }\n .chat-sidebar-header {\n font-size: var(--text-24);\n font-weight: 700;\n letter-spacing: -0.02em;\n color: var(--text-primary);\n margin: 0;\n }\n .chat-sidebar-actions {\n display: flex;\n align-items: center;\n gap: var(--gap-4);\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n transition: background-color 0.15s;\n }\n .icon-btn:hover {\n background-color: var(--hover-overlay);\n }\n .icon-btn img {\n width: var(--icon-lg);\n height: var(--icon-lg);\n display: block;\n }\n .more-wrap .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-4);\n width: 13rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--space-8) 0;\n z-index: 50;\n }\n .more-item {\n width: calc(100% - 12px);\n margin: 0 6px;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n padding: var(--space-8) var(--space-12);\n border: none;\n background: transparent;\n border-radius: var(--rounded-8);\n cursor: pointer;\n text-align: left;\n font-size: var(--text-14);\n color: var(--text-primary);\n }\n .more-item:hover {\n background: var(--brand-soft);\n color: var(--brand);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n color: var(--danger);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) var(--space-8);\n }\n .chat-sidebar-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .chat-sidebar-header-actions button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .chat-sidebar-header-actions img {\n width: 28px;\n height: 28px;\n }\n .new-chat-overlay {\n position: absolute;\n inset: 0;\n z-index: 20;\n background: var(--bg-primary-color);\n }\n .chat-sidebar-search {\n position: relative;\n margin-bottom: var(--gap-8);\n }\n .chat-sidebar-search input {\n width: var(--w-full);\n box-sizing: border-box;\n padding: var(--space-12) var(--space-12);\n border: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n outline: none;\n }\n .chat-sidebar-search input::placeholder {\n color: var(--text-tertiary);\n }\n .chat-sidebar-search input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .chat-sidebar-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n }\n .chat-sidebar-list::-webkit-scrollbar {\n width: var(--scrollbar);\n }\n .chat-sidebar-list::-webkit-scrollbar-track {\n background: transparent;\n }\n .chat-sidebar-list::-webkit-scrollbar-thumb {\n background-color: var(--bg-input);\n border-radius: var(--rounded-10);\n }\n .chat-sidebar-empty,\n .chat-sidebar-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-16) var(--space-12);\n color: var(--text-primary);\n text-align: center;\n }\n .loader {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: var(--space-16);\n border-radius: var(--rounded-4);\n z-index: 10000;\n height: var(--h-full);\n width: var(--w-full);\n background: var(--overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .toaster {\n position: fixed;\n bottom: var(--space-16);\n right: var(--space-16);\n z-index: 1000;\n }\n .new-chat-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .new-chat-panel new-chat,\n .new-chat-panel searchable-list {\n display: block;\n flex: 1;\n min-height: 0;\n height: var(--h-full);\n }\n .picker-back {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n font-family: var(--font-primary);\n }\n .picker-back button {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .picker-back button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .picker-back button:hover {\n background: var(--hover-overlay);\n }\n .picker-title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }\n .mqtt-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-left: 8px;\n font-size: 11px;\n font-weight: 500;\n color: var(--text-tertiary);\n letter-spacing: 0.01em;\n user-select: none;\n }\n .mqtt-status-dot {\n width: 8px;\n height: 8px;\n border-radius: 999px;\n flex-shrink: 0;\n background: #ef4444;\n box-shadow: 0 0 0 2px color-mix(in srgb, #ef4444 25%, transparent);\n }\n .mqtt-status-dot.is-connected {\n background: #22c55e;\n box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent);\n }";
1176
1198
 
1177
1199
  const ContextMenu = class {
1178
1200
  constructor(hostRef) {
@@ -1389,7 +1411,8 @@ const GroupCast = class {
1389
1411
  const { conversationTitle, imageFile, selectedUserIds, selectedUsers } = event.detail || {};
1390
1412
  try {
1391
1413
  this.isCreating = true;
1392
- let groupcastImageUrl = GROUP_PROFILE_PLACEHOLDER_IMAGE;
1414
+ // Empty → avatar fallback (avoid broken CDN placeholder X).
1415
+ let groupcastImageUrl = '';
1393
1416
  if (imageFile)
1394
1417
  groupcastImageUrl = await this.getPresignedUrl(imageFile);
1395
1418
  const members = (selectedUserIds || []).map((id) => {
@@ -1728,15 +1751,20 @@ const WebChatHeader = class {
1728
1751
  const imageUrl = newValue.isGroup
1729
1752
  ? newValue.conversationImageUrl
1730
1753
  : (_a = newValue.opponentDetails) === null || _a === void 0 ? void 0 : _a.userProfileImageUrl;
1754
+ // Keep prior store image when details briefly omit it (group create race).
1755
+ const nextId = String((newValue === null || newValue === void 0 ? void 0 : newValue.conversationId) || '');
1756
+ const sameConversation = nextId === String(conversationStore.state.conversationId || '');
1757
+ const resolvedImage = imageUrl ||
1758
+ (sameConversation && newValue.isGroup ? conversationStore.state.conversationImageUrl : '') ||
1759
+ '';
1731
1760
  conversationStore.updateConversationDetails({
1732
1761
  conversationTitle: newValue.isGroup ? newValue.conversationTitle : (_b = newValue.opponentDetails) === null || _b === void 0 ? void 0 : _b.userName,
1733
- // @ts-ignore
1734
- conversationId: newValue.conversationId,
1762
+ conversationId: nextId,
1735
1763
  isGroup: newValue.isGroup,
1736
- conversationImageUrl: imageUrl || '',
1764
+ conversationImageUrl: resolvedImage,
1737
1765
  opponentDetails: newValue.opponentDetails,
1738
1766
  });
1739
- this.displayImageUrl = imageUrl || '';
1767
+ this.displayImageUrl = resolvedImage;
1740
1768
  }
1741
1769
  }
1742
1770
  handleDocumentClick(e) {
@@ -1815,10 +1843,10 @@ const WebChatHeader = class {
1815
1843
  const groupcast = this.isGroupcast();
1816
1844
  const isGroup = !!((_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.isGroup) && !groupcast;
1817
1845
  const showBlock = !groupcast && !((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.isGroup);
1818
- return (h(Fragment, { key: '57a94c04c51d4f734dd70f0b66de3fcf08152816' }, h("div", { key: '7763a5e9b131839e5a5f150763ccbee42f2b83bf', class: "head-container", style: {
1846
+ return (h(Fragment, { key: 'e4989621054b476ce51c0e9087a5ca30106af3ba' }, h("div", { key: 'fb93b8d0bfbc24b6f19d3529a2542d6b54749234', class: "head-container", style: {
1819
1847
  backgroundColor: this.headerBgColor || undefined,
1820
1848
  color: this.headerUsernameColor || undefined,
1821
- } }, h("div", { key: '0febc95ec5b3cd047f3efe822419d84e1b8649cf', class: "head-left" }, h("button", { key: '9944b8aa9869d8232f68f70eab151b83b6dcd42f', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, h("img", { key: '143b10007a063bb1b1d0f2338ada2ff976c2032d', class: "theme-icon", src: Left_Arrow, alt: "" })), h("div", { key: '90913639f468f40c2f5086541e23af179a464e4a', class: "identity", onClick: this.handleTextClick }, h("profile-avatar", { key: '8361c0dfeab12d5bc9964caa313313abeaa33bce', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), h("div", { key: '2eea1c6e4694ec49db17087318c6e29efeed6866', class: "text-container" }, h("div", { key: '3815b900951bdd4e9fa206a8b36b4345c5ad1853', class: "title" }, this.title()), h("div", { key: '98e18e86abb970c5853b56ffa8eb6ef8a755d2ef', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), h("div", { key: 'a1f43c9e9cce0af81a08c0dff7cbf800d40c7d5e', class: "actions" }, !groupcast ? (h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }))) : null, h("div", { key: '1eb744c5e5df5d94203fd1c534626d959322ed46', class: "more-wrap" }, h("button", { key: '0f6649a741e2e72adb57567296326dc2c4c15537', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, h("img", { key: '92d40afb11d9a96ff31b9fc175520fb5c5188618', class: "theme-icon", src: Three_Dots, alt: "" })), this.menuOpen ? (h("div", { class: "more-menu", role: "menu" }, isGroup ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, h("img", { class: "theme-icon", src: Add_User, alt: "" }), h("span", null, "Add member")), h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, h("img", { class: "theme-icon", src: Info, alt: "" }), h("span", null, "Group info")))) : null, !groupcast ? (h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }), h("span", null, "Search"))) : null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, h("img", { class: "theme-icon", src: CloseButton, alt: "" }), h("span", null, "Close chat")), !groupcast ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, h("img", { class: "theme-icon", src: Clear_Chat, alt: "" }), h("span", null, "Clear chat")), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.deleteChat }, h("img", { class: "theme-icon", src: Delete, alt: "" }), h("span", null, "Delete chat")))) : null, isGroup ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Exit group")))) : null, showBlock ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, h("img", { class: "theme-icon", src: Block_User, alt: "" }), h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (h("div", { key: 'b7308b2385393a374edbb60a72a04f4eb12ba828', class: "loading-overlay" }, h("spinner-loader", { key: '93fe73e5a422c0e75827f8605c6458b80bf2953e', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
1849
+ } }, h("div", { key: '069215af70baf46d900f48ddda1232bd861495a1', class: "head-left" }, h("button", { key: '5841d03c58c113f4b132226490f9001ca4326a79', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, h("img", { key: '45bd54812559e8777df86e946c3123d431e301b3', class: "theme-icon", src: Left_Arrow, alt: "" })), h("div", { key: 'faf94dd0d56d0ec3c97731b22732bd3f5fe40cb2', class: "identity", onClick: this.handleTextClick }, h("profile-avatar", { key: '2e59dafbe6027af70a7b8c0d92e0a9fefcb8c76f', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), h("div", { key: '33fadb7d1f78386b386877597ddf37e0966fb885', class: "text-container" }, h("div", { key: '9e324b54d9361aefe765834d3fe22057bf362e60', class: "title" }, this.title()), h("div", { key: 'dfcd78f382fac8d2fea01fa32225815c52e947c7', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), h("div", { key: 'f509642674589183ec7b51c449ad347000427e42', class: "actions" }, !groupcast ? (h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }))) : null, h("div", { key: 'e5364213c7fa7c928d5a514bf3ebd7c1504338a0', class: "more-wrap" }, h("button", { key: '59f70c417841e40235c66d4133c86953499eda73', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, h("img", { key: 'ca10b629d529026fc06dd0938d1ed68b01d81513', class: "theme-icon", src: Three_Dots, alt: "" })), this.menuOpen ? (h("div", { class: "more-menu", role: "menu" }, isGroup ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, h("img", { class: "theme-icon", src: Add_User, alt: "" }), h("span", null, "Add member")), h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, h("img", { class: "theme-icon", src: Info, alt: "" }), h("span", null, "Group info")))) : null, !groupcast ? (h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }), h("span", null, "Search"))) : null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, h("img", { class: "theme-icon", src: CloseButton, alt: "" }), h("span", null, "Close chat")), !groupcast ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, h("img", { class: "theme-icon", src: Clear_Chat, alt: "" }), h("span", null, "Clear chat")), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.deleteChat }, h("img", { class: "theme-icon", src: Delete, alt: "" }), h("span", null, "Delete chat")))) : null, isGroup ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Exit group")))) : null, showBlock ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, h("img", { class: "theme-icon", src: Block_User, alt: "" }), h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (h("div", { key: '8949c76692e5f0bd8d95f6ea077e2f4e45785348', class: "loading-overlay" }, h("spinner-loader", { key: '34003652980ba02171ced3b7302bc973dda5f965', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
1822
1850
  }
1823
1851
  get el() { return getElement(this); }
1824
1852
  static get watchers() { return {
@@ -5709,38 +5737,18 @@ const ChatFooter = class {
5709
5737
  var _a, _b, _c;
5710
5738
  const allPayloads = [];
5711
5739
  const uploadPromises = presignedUrls.map(async (urlDetails, index) => {
5712
- let mediaId, mediaUrl, thumbnailUrl, mediaPresignedUrl;
5713
- if (this.isGroupcast) {
5714
- mediaUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5715
- mediaPresignedUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl;
5716
- mediaId = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5717
- thumbnailUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
5718
- }
5719
- else {
5720
- ({ mediaPresignedUrl, mediaId, mediaUrl, thumbnailUrl } = urlDetails);
5721
- }
5722
5740
  const attachmentPayload = attachments[index];
5723
- const fileExtensionType = attachmentPayload.mimeType.split('/')[1];
5724
- const newPayload = {
5725
- mediaId,
5726
- mediaUrl,
5727
- thumbnailUrl,
5728
- mediaType: attachmentPayload.mediaType,
5729
- nameWithExtension: attachmentPayload.nameWithExtension,
5730
- name: attachmentPayload.nameWithExtension,
5731
- mimeType: attachmentPayload.mimeType,
5732
- extension: fileExtensionType,
5733
- size: attachmentPayload.size,
5734
- attachmentType: 0,
5735
- };
5736
- allPayloads.push(newPayload);
5737
- await fetch(mediaPresignedUrl, {
5738
- method: 'PUT',
5739
- body: attachmentPayload.file,
5740
- headers: {
5741
- 'Content-Type': attachmentPayload.mimeType,
5742
- },
5741
+ if (!attachmentPayload)
5742
+ return;
5743
+ // Groupcast presign shape differs — map onto the shared uploader contract.
5744
+ const normalized = this.isGroupcast
5745
+ ? Object.assign(Object.assign({}, urlDetails), { mediaPresignedUrl: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaPresignedUrl), mediaId: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaId) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl), thumbnailUrl: (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.thumbnailUrl) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl), thumbnailPresignedUrl: urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.thumbnailPresignedUrl }) : urlDetails;
5746
+ const payload = await uploadPresignedMediaAttachment({
5747
+ urlDetails: normalized,
5748
+ attachment: attachmentPayload,
5743
5749
  });
5750
+ if (payload)
5751
+ allPayloads.push(payload);
5744
5752
  });
5745
5753
  await Promise.all(uploadPromises);
5746
5754
  // One attachment → typed; 2–5 together → Multiple (same message)
@@ -5839,7 +5847,7 @@ const ChatFooter = class {
5839
5847
  const webChat = findWebChatHost(this.el);
5840
5848
  const hasCustomReply = (webChat ? hasNamedSlot(webChat, 'reply-preview') : false) || hasNamedSlot(this.el, 'reply-preview');
5841
5849
  const showAttachment = this.attachmentDetails || this.showCamera;
5842
- return (h(Host, { key: 'de774ccefb329af2fe95f29fc90fa4cad874af9c', class: { 'attachment-open': !!showAttachment } }, h("div", { key: '0e8d6829943505e92e45c38980c827b57366902c', class: "chat-footer-container" }, showAttachment ? (h("slot", { name: "attachment-preview" }, h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (h(Fragment, null, hasCustomReply ? h("slot", { name: "reply-preview" }) : null, h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5850
+ return (h(Host, { key: '41aa3584baa28864ebbaa4177f9109ab89fc1afa', class: { 'attachment-open': !!showAttachment } }, h("div", { key: '7f5c23e432043756124aaf3af2956764eaa5481d', class: "chat-footer-container" }, showAttachment ? (h("slot", { name: "attachment-preview" }, h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (h(Fragment, null, hasCustomReply ? h("slot", { name: "reply-preview" }) : null, h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5843
5851
  ? 'You'
5844
5852
  : (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, h("div", { class: "emoji-panel-header" }, h("span", null, "Emoji"), h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (h("div", { class: "rec-body" }, h("div", { class: "rec-left" }, h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, h("img", { class: "theme-icon", src: Delete, alt: "" })), h("div", { class: "rec-timer-wrap" }, h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), h("div", { class: "rec-wave" }, h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, h("img", { src: Send, alt: "" })))) : (h(Fragment, null, h("div", { class: "attach-wrap" }, h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, h("img", { src: Attachment, alt: "" })), this.showAttachMenu ? (h("div", { class: "attach-menu", style: this.attachMenuStyle }, h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, h("img", { src: DocumentsIcon, alt: "" })), h("span", null, "Document")), h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), h("span", null, "Photos & videos")), h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), h("span", null, "Camera")))) : null), h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, h("img", { src: Smile, alt: "" })), h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, h("img", { src: Send, alt: "" }))) : (h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, h("img", { src: Microphone, alt: "" })))))))))))));
5845
5853
  }
@@ -7710,7 +7718,7 @@ const WebChatBody = class {
7710
7718
  return (h("document-message", Object.assign({}, props, { docType: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, fileName: attachment === null || attachment === void 0 ? void 0 : attachment.name, href: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, width: "220px", padding: "10px", docName: attachment === null || attachment === void 0 ? void 0 : attachment.name })));
7711
7719
  }
7712
7720
  if (((_c = attachment === null || attachment === void 0 ? void 0 : attachment.mimeType) === null || _c === void 0 ? void 0 : _c.startsWith('video/')) || (message === null || message === void 0 ? void 0 : message.customType) === 'AttachmentMessage:Video') {
7713
- return (h("video-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 30px 10px", type: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, videoSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl })));
7721
+ return (h("video-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 30px 10px", type: attachment === null || attachment === void 0 ? void 0 : attachment.mimeType, videoSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, poster: (attachment === null || attachment === void 0 ? void 0 : attachment.thumbnailUrl) || '' })));
7714
7722
  }
7715
7723
  if (((_d = attachment === null || attachment === void 0 ? void 0 : attachment.mimeType) === null || _d === void 0 ? void 0 : _d.startsWith('image/')) || (message === null || message === void 0 ? void 0 : message.customType) === 'AttachmentMessage:Image') {
7716
7724
  return (h("image-message", Object.assign({}, props, { height: '220px', width: '250px', padding: "10px 10px 10px 10px", imageSrc: attachment === null || attachment === void 0 ? void 0 : attachment.mediaUrl, borderWidth: '5px', borderColor: isSelf ? 'var(--bg-grey-color)' : '#F2F2F2', borderStyle: 'solid', allAttachments: this.allAttachments, onImageClick: this.onMediaClick, loadingMediaGallery: this.loadingMediaGallery })));
@@ -8110,7 +8118,7 @@ const WebChatBody = class {
8110
8118
  var _a, _b, _c, _d, _e, _f, _g, _h;
8111
8119
  const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
8112
8120
  const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
8113
- return (h("div", { key: '04d498fc21493a71497a28f855d184eb14e32763', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, (this.showScrollButton || this.newMessageNotification) && (h("div", { key: '42c9a73991cfb913403d104dce510ba6ca9eb5bb', class: "jump-latest", onClick: this.scrollToBottom, role: "button", "aria-label": "Jump to latest messages", style: {
8121
+ return (h("div", { key: 'fdb79d6e91df3996d26a8e34ca2294c5a9748911', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, (this.showScrollButton || this.newMessageNotification) && (h("div", { key: '001e8486fcc83b0a7169cc00769c3ad684f045c3', class: "jump-latest", onClick: this.scrollToBottom, role: "button", "aria-label": "Jump to latest messages", style: {
8114
8122
  position: 'sticky',
8115
8123
  bottom: '1rem',
8116
8124
  marginLeft: 'auto',
@@ -8127,7 +8135,7 @@ const WebChatBody = class {
8127
8135
  cursor: 'pointer',
8128
8136
  boxShadow: '0 2px 8px rgba(0,0,0,0.14)',
8129
8137
  zIndex: '100',
8130
- } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '2004cdee625a06da51879110339379878072d93f', style: {
8138
+ } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '3774b25b962a80d916fa2959c371d566ee242164', style: {
8131
8139
  position: 'absolute',
8132
8140
  bottom: '22px',
8133
8141
  right: '-2px',
@@ -8141,7 +8149,7 @@ const WebChatBody = class {
8141
8149
  justifyContent: 'center',
8142
8150
  fontSize: '12px',
8143
8151
  padding: '0 4px',
8144
- } })), h("svg", { key: '12e09d0c2ac7327e64ae671ebb1ce406ca0a5538', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'e67f759077573794ea5923aeaff2a18143ec1887', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: 'ad56d354279bc44df4e53a583976cb02f208bdc8', style: {
8152
+ } })), h("svg", { key: '6453eb80f1157871dc8e0491a1ea3062dd7b615e', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '7e79caf3621cce0c12c5979bf8e26c6c38cd633f', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: 'df3d217231d691f2a1d1ec80c0daef9a2938e543', style: {
8145
8153
  display: 'flex',
8146
8154
  flexDirection: 'column',
8147
8155
  alignItems: 'center',
@@ -8151,7 +8159,7 @@ const WebChatBody = class {
8151
8159
  textAlign: 'center',
8152
8160
  color: 'var(--text-secondary-color)',
8153
8161
  marginTop: '20px',
8154
- } }, h("img", { key: 'bd08d76f2db678ee4af1aae5d39bf0ae3c083b6f', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: '1fbb6c63dbc25065bf7248c4e03503b6693901d4', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: 'ffdfd34864bfa277e433ced72e0de8670301b86b', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '5c3827cbd2ab1dacb9f75f248d7bbf4c83b33e89', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '88169d80e7d17419beb4094b3ce89f91927d8784', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
8162
+ } }, h("img", { key: '632263e5acde91cf1c7d07f7a24c65e28272356c', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: 'e4c81c8c4abc260616693deecc9f9410269c07e1', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: '0b00d9f2b07732b00bad8dfcf01877bd6591b5c0', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '65e2ea1e6ba9c56d37cb504f97667756bd6ee593', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '1810734057073e94d00f2d7eb38c0326afed8482', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
8155
8163
  ((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
8156
8164
  (() => {
8157
8165
  const total = this.allMessages.length;