@cloudflare/realtimekit-ui 1.1.0-staging.9 → 1.1.0

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 (774) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{ChatHead-e13f3b0e.js → ChatHead-777e6a2d.js} +1 -1
  3. package/dist/cjs/{TextMessage-1dc6f8b9.js → TextMessage-b9322340.js} +2 -2
  4. package/dist/cjs/{chat-2ae6f058.js → chat-f1a9fd6e.js} +1 -16
  5. package/dist/cjs/{config-0a88d50b.js → config-86164f93.js} +2 -2
  6. package/dist/cjs/{debounce-b06b27ca.js → debounce-267777c1.js} +1 -1
  7. package/dist/cjs/index-2e5758b6.js +4403 -0
  8. package/dist/cjs/{index-821d14b7.js → index-6f8c1928.js} +1 -1
  9. package/dist/cjs/{index-e4244d7d.js → index-92947ea7.js} +2 -2
  10. package/dist/cjs/index.cjs.js +6 -6
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{merge-c46cfa17.js → merge-bb096d88.js} +1 -1
  13. package/dist/cjs/{notification-f3750b61.js → notification-ef397c71.js} +1 -1
  14. package/dist/cjs/realtimekit-ui.cjs.js +30 -3
  15. package/dist/cjs/rtk-ai-toggle.cjs.entry.js +3 -3
  16. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +5 -5
  17. package/dist/cjs/rtk-ai.cjs.entry.js +3 -3
  18. package/dist/cjs/rtk-audio-grid.cjs.entry.js +5 -5
  19. package/dist/cjs/rtk-audio-tile.cjs.entry.js +3 -3
  20. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +4 -4
  21. package/dist/cjs/{rtk-avatar_24.cjs.entry.js → rtk-avatar_26.cjs.entry.js} +651 -603
  22. package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +8 -8
  23. package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +13 -13
  24. package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +3 -3
  25. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +4 -4
  26. package/dist/cjs/rtk-camera-toggle.cjs.entry.js +3 -3
  27. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +3 -3
  28. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +11 -25
  29. package/dist/cjs/rtk-chat-message.cjs.entry.js +6 -6
  30. package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +13 -7
  31. package/dist/cjs/rtk-chat-search-results.cjs.entry.js +4 -4
  32. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +4 -4
  33. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +10 -13
  34. package/dist/cjs/rtk-clock.cjs.entry.js +6 -6
  35. package/dist/cjs/rtk-controlbar-button.cjs.entry.js +4 -4
  36. package/dist/cjs/rtk-controlbar.cjs.entry.js +5 -5
  37. package/dist/cjs/rtk-debugger-audio_4.cjs.entry.js +3 -3
  38. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +4 -4
  39. package/dist/cjs/rtk-dialog-manager.cjs.entry.js +4 -4
  40. package/dist/cjs/rtk-dialog.cjs.entry.js +4 -4
  41. package/dist/cjs/rtk-ended-screen.cjs.entry.js +3 -3
  42. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +4 -4
  43. package/dist/cjs/rtk-file-message_3.cjs.entry.js +14 -14
  44. package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +3 -3
  45. package/dist/cjs/rtk-grid-pagination.cjs.entry.js +4 -4
  46. package/dist/cjs/rtk-grid.cjs.entry.js +4 -4
  47. package/dist/cjs/rtk-header.cjs.entry.js +5 -5
  48. package/dist/cjs/rtk-idle-screen.cjs.entry.js +4 -4
  49. package/dist/cjs/rtk-image-viewer.cjs.entry.js +4 -4
  50. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +4 -4
  51. package/dist/cjs/rtk-leave-button.cjs.entry.js +4 -4
  52. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +2477 -1450
  53. package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +3 -3
  54. package/dist/cjs/rtk-logo.cjs.entry.js +3 -3
  55. package/dist/cjs/rtk-meeting-title.cjs.entry.js +3 -3
  56. package/dist/cjs/rtk-message-list-view.cjs.entry.js +7 -7
  57. package/dist/cjs/rtk-mic-toggle.cjs.entry.js +3 -3
  58. package/dist/cjs/rtk-mixed-grid.cjs.entry.js +4 -4
  59. package/dist/cjs/rtk-more-toggle.cjs.entry.js +5 -5
  60. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +3 -3
  61. package/dist/cjs/rtk-name-tag.cjs.entry.js +4 -4
  62. package/dist/cjs/rtk-network-indicator.cjs.entry.js +3 -3
  63. package/dist/cjs/rtk-notification.cjs.entry.js +7 -7
  64. package/dist/cjs/rtk-notifications.cjs.entry.js +5 -5
  65. package/dist/cjs/rtk-participant-count.cjs.entry.js +3 -3
  66. package/dist/cjs/rtk-participant-setup.cjs.entry.js +5 -5
  67. package/dist/cjs/rtk-participant_2.cjs.entry.js +19 -19
  68. package/dist/cjs/rtk-participants-audio.cjs.entry.js +4 -4
  69. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +5 -5
  70. package/dist/cjs/rtk-participants-toggle.cjs.entry.js +4 -4
  71. package/dist/cjs/rtk-participants.cjs.entry.js +4 -4
  72. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +3 -3
  73. package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +4 -4
  74. package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +4 -4
  75. package/dist/cjs/rtk-plugins_2.cjs.entry.js +7 -7
  76. package/dist/cjs/rtk-poll_2.cjs.entry.js +6 -6
  77. package/dist/cjs/rtk-polls-toggle.cjs.entry.js +4 -4
  78. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +4 -4
  79. package/dist/cjs/rtk-recording-toggle.cjs.entry.js +3 -3
  80. package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +3 -3
  81. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +8 -8
  82. package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +3 -3
  83. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +4 -4
  84. package/dist/cjs/rtk-settings.cjs.entry.js +3 -3
  85. package/dist/cjs/rtk-setup-screen.cjs.entry.js +5 -5
  86. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +5 -5
  87. package/dist/cjs/rtk-sidebar.cjs.entry.js +5 -5
  88. package/dist/cjs/rtk-simple-grid.cjs.entry.js +4 -4
  89. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +6 -6
  90. package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +3 -3
  91. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +3 -3
  92. package/dist/cjs/rtk-stage.cjs.entry.js +4 -4
  93. package/dist/cjs/rtk-transcript.cjs.entry.js +4 -4
  94. package/dist/cjs/rtk-transcripts.cjs.entry.js +3 -3
  95. package/dist/cjs/rtk-ui-provider.cjs.entry.js +3 -3
  96. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +4 -4
  97. package/dist/cjs/{sidebar-0eb1e4ef.js → sidebar-7df66d80.js} +1 -1
  98. package/dist/cjs/{ui-store-6c2d680f.js → ui-store-d0e80f30.js} +113 -34
  99. package/dist/collection/collection-manifest.json +4 -6
  100. package/dist/collection/components/rtk-ai/rtk-ai.js +3 -3
  101. package/dist/collection/components/rtk-ai-toggle/rtk-ai-toggle.js +3 -3
  102. package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +3 -3
  103. package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +4 -4
  104. package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.js +4 -4
  105. package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.js +3 -3
  106. package/dist/collection/components/rtk-avatar/rtk-avatar.js +4 -4
  107. package/dist/collection/components/rtk-breakout-room-manager/rtk-breakout-room-manager.js +3 -3
  108. package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +5 -5
  109. package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.js +4 -4
  110. package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.js +4 -4
  111. package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +5 -5
  112. package/dist/collection/components/rtk-camera-selector/rtk-camera-selector.js +3 -3
  113. package/dist/collection/components/rtk-camera-toggle/rtk-camera-toggle.js +3 -3
  114. package/dist/collection/components/rtk-caption-toggle/rtk-caption-toggle.js +3 -3
  115. package/dist/collection/components/rtk-chat/rtk-chat.css +4 -37
  116. package/dist/collection/components/rtk-chat/rtk-chat.js +63 -388
  117. package/dist/collection/components/rtk-chat-composer-ui/rtk-chat-composer-ui.js +16 -51
  118. package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +30 -17
  119. package/dist/collection/components/{rtk-channel-details/rtk-channel-details.css → rtk-chat-header/rtk-chat-header.css} +28 -46
  120. package/dist/collection/components/rtk-chat-header/rtk-chat-header.js +32 -0
  121. package/dist/collection/components/rtk-chat-message/rtk-chat-message.css +0 -2
  122. package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +9 -9
  123. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.css +0 -2
  124. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +6 -6
  125. package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +92 -97
  126. package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +4 -4
  127. package/dist/collection/components/rtk-chat-selector/rtk-chat-selector.css +141 -0
  128. package/dist/collection/components/rtk-chat-selector/rtk-chat-selector.js +445 -0
  129. package/dist/collection/components/rtk-chat-selector-ui/rtk-chat-selector-ui.js +2 -2
  130. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +9 -12
  131. package/dist/collection/components/rtk-clock/rtk-clock.js +5 -5
  132. package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +4 -4
  133. package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +4 -4
  134. package/dist/collection/components/rtk-controlbar-button/rtk-controlbar-button.js +2 -2
  135. package/dist/collection/components/rtk-counter/rtk-counter.css +0 -2
  136. package/dist/collection/components/rtk-counter/rtk-counter.js +4 -4
  137. package/dist/collection/components/rtk-debugger/rtk-debugger.js +3 -3
  138. package/dist/collection/components/rtk-debugger-audio/rtk-debugger-audio.js +3 -3
  139. package/dist/collection/components/rtk-debugger-screenshare/rtk-debugger-screenshare.js +3 -3
  140. package/dist/collection/components/rtk-debugger-system/rtk-debugger-system.js +3 -3
  141. package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +4 -4
  142. package/dist/collection/components/rtk-debugger-video/rtk-debugger-video.js +3 -3
  143. package/dist/collection/components/rtk-dialog/rtk-dialog.css +1 -2
  144. package/dist/collection/components/rtk-dialog/rtk-dialog.js +3 -3
  145. package/dist/collection/components/rtk-dialog-manager/rtk-dialog-manager.js +3 -3
  146. package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +3 -3
  147. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.css +0 -2
  148. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +3 -3
  149. package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +3 -3
  150. package/dist/collection/components/rtk-ended-screen/rtk-ended-screen.js +3 -3
  151. package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +3 -3
  152. package/dist/collection/components/rtk-file-message/rtk-file-message.js +5 -5
  153. package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +2 -2
  154. package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +4 -4
  155. package/dist/collection/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.js +2 -2
  156. package/dist/collection/components/rtk-grid/rtk-grid.js +3 -3
  157. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.css +0 -2
  158. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +3 -3
  159. package/dist/collection/components/rtk-header/rtk-header.js +4 -4
  160. package/dist/collection/components/rtk-icon/rtk-icon.js +1 -1
  161. package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +4 -4
  162. package/dist/collection/components/rtk-image-message/rtk-image-message.js +7 -7
  163. package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +5 -5
  164. package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +4 -4
  165. package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +2 -2
  166. package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +4 -4
  167. package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +3 -3
  168. package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +5 -5
  169. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +3 -3
  170. package/dist/collection/components/rtk-livestream-player/rtk-livestream-player.js +3 -3
  171. package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +3 -3
  172. package/dist/collection/components/rtk-logo/rtk-logo.js +2 -2
  173. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.css +6 -0
  174. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
  175. package/dist/collection/components/rtk-meeting/rtk-meeting.js +3 -3
  176. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +3 -3
  177. package/dist/collection/components/rtk-menu/rtk-menu.js +4 -4
  178. package/dist/collection/components/rtk-menu-item/rtk-menu-item.css +1 -1
  179. package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +3 -3
  180. package/dist/collection/components/rtk-menu-list/rtk-menu-list.css +3 -3
  181. package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +3 -3
  182. package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +4 -4
  183. package/dist/collection/components/rtk-message-view/rtk-message-view.css +18 -1
  184. package/dist/collection/components/rtk-message-view/rtk-message-view.js +51 -3
  185. package/dist/collection/components/rtk-mic-toggle/rtk-mic-toggle.js +3 -3
  186. package/dist/collection/components/rtk-microphone-selector/rtk-microphone-selector.js +3 -3
  187. package/dist/collection/components/rtk-mixed-grid/rtk-mixed-grid.js +5 -5
  188. package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +4 -4
  189. package/dist/collection/components/rtk-mute-all-button/rtk-mute-all-button.js +3 -3
  190. package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +4 -4
  191. package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +5 -5
  192. package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.js +4 -4
  193. package/dist/collection/components/rtk-notification/rtk-notification.js +4 -4
  194. package/dist/collection/components/rtk-notifications/rtk-notifications.js +3 -3
  195. package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +4 -4
  196. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +104 -2
  197. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +104 -51
  198. package/dist/collection/components/rtk-participant/rtk-participant.js +16 -16
  199. package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +3 -3
  200. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +5 -5
  201. package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +5 -5
  202. package/dist/collection/components/rtk-participants/rtk-participants.js +3 -3
  203. package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +4 -4
  204. package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +4 -4
  205. package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +3 -3
  206. package/dist/collection/components/rtk-participants-toggle/rtk-participants-toggle.js +3 -3
  207. package/dist/collection/components/rtk-participants-viewer-list/rtk-participants-viewer-list.js +3 -3
  208. package/dist/collection/components/rtk-participants-waiting-list/rtk-participants-waiting-list.js +3 -3
  209. package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +4 -4
  210. package/dist/collection/components/rtk-pinned-message-selector/rtk-pinned-message-selector.css +107 -0
  211. package/dist/collection/components/{rtk-channel-header/rtk-channel-header.js → rtk-pinned-message-selector/rtk-pinned-message-selector.js} +181 -118
  212. package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +3 -3
  213. package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.js +5 -5
  214. package/dist/collection/components/rtk-plugins/rtk-plugins.js +4 -4
  215. package/dist/collection/components/rtk-plugins-toggle/rtk-plugins-toggle.js +3 -3
  216. package/dist/collection/components/rtk-poll/rtk-poll.js +5 -5
  217. package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +4 -4
  218. package/dist/collection/components/rtk-polls/rtk-polls.js +6 -6
  219. package/dist/collection/components/rtk-polls-toggle/rtk-polls-toggle.js +3 -3
  220. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +4 -4
  221. package/dist/collection/components/rtk-recording-toggle/rtk-recording-toggle.js +3 -3
  222. package/dist/collection/components/rtk-screen-share-toggle/rtk-screen-share-toggle.js +3 -3
  223. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +9 -9
  224. package/dist/collection/components/rtk-settings/rtk-settings.js +3 -3
  225. package/dist/collection/components/rtk-settings-audio/rtk-settings-audio.js +3 -3
  226. package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +3 -3
  227. package/dist/collection/components/rtk-settings-video/rtk-settings-video.js +3 -3
  228. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.css +0 -2
  229. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +3 -3
  230. package/dist/collection/components/rtk-sidebar/rtk-sidebar.js +3 -3
  231. package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +5 -5
  232. package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.js +3 -3
  233. package/dist/collection/components/rtk-speaker-selector/rtk-speaker-selector.js +3 -3
  234. package/dist/collection/components/rtk-spinner/rtk-spinner.js +2 -2
  235. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +5 -5
  236. package/dist/collection/components/rtk-spotlight-indicator/rtk-spotlight-indicator.js +3 -3
  237. package/dist/collection/components/rtk-stage/rtk-stage.js +3 -3
  238. package/dist/collection/components/rtk-stage-toggle/rtk-stage-toggle.js +3 -3
  239. package/dist/collection/components/rtk-switch/rtk-switch.js +3 -3
  240. package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.js +4 -4
  241. package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +3 -3
  242. package/dist/collection/components/rtk-text-message/rtk-text-message.js +5 -5
  243. package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
  244. package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +1 -1
  245. package/dist/collection/components/rtk-transcript/rtk-transcript.js +2 -2
  246. package/dist/collection/components/rtk-transcripts/rtk-transcripts.js +2 -2
  247. package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +3 -3
  248. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +3 -3
  249. package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
  250. package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +4 -4
  251. package/dist/collection/lib/icons/default-icon-pack.js +0 -2
  252. package/dist/collection/lib/lang/default-language.js +2 -5
  253. package/dist/collection/lib/overrides.js +1 -0
  254. package/dist/collection/utils/chat.js +0 -4
  255. package/dist/collection/utils/flags.js +0 -2
  256. package/dist/components/index.js +8 -8
  257. package/dist/components/{p-bb4983b8.js → p-06de876f.js} +7 -7
  258. package/dist/components/{p-8d6b21d5.js → p-08351fd6.js} +8 -8
  259. package/dist/components/{p-fa476519.js → p-0a36cb4b.js} +11 -11
  260. package/dist/components/{p-dab9d3d6.js → p-0db812c2.js} +1 -12
  261. package/dist/components/{p-7f489600.js → p-1099c0fe.js} +5 -5
  262. package/dist/components/{p-eeb37b16.js → p-12b59b72.js} +5 -5
  263. package/dist/components/{p-fb836f65.js → p-15156a2c.js} +2 -2
  264. package/dist/components/{p-761c0e78.js → p-154bed23.js} +6 -6
  265. package/dist/components/{p-6739a399.js → p-15d2291f.js} +3 -3
  266. package/dist/components/{p-c05530c8.js → p-1b26fbf7.js} +3 -3
  267. package/dist/components/{p-89025409.js → p-2232de67.js} +2482 -1455
  268. package/dist/components/{p-fb900e8f.js → p-22827c53.js} +6 -6
  269. package/dist/components/{p-ad873f2d.js → p-2305aa2d.js} +1 -1
  270. package/dist/components/{p-6f8d2043.js → p-2690645d.js} +3 -3
  271. package/dist/components/{p-cf8f725b.js → p-27029836.js} +4 -4
  272. package/dist/components/{p-616ae7ab.js → p-2976fcb0.js} +8 -8
  273. package/dist/components/{p-28170a8d.js → p-298aa8be.js} +24 -30
  274. package/dist/components/{p-0f2de0f8.js → p-2f68e7bb.js} +18 -12
  275. package/dist/components/{p-02b840f8.js → p-345a07e8.js} +8 -8
  276. package/dist/components/{p-6101a21c.js → p-401ce922.js} +5 -5
  277. package/dist/components/{p-2090b03d.js → p-41bf1c3d.js} +5 -5
  278. package/dist/components/{p-d765dbe4.js → p-45a9a385.js} +11 -11
  279. package/dist/components/{p-a8a6496d.js → p-4942bfd2.js} +9 -9
  280. package/dist/components/{p-294cda89.js → p-4a1144e2.js} +8 -8
  281. package/dist/components/{p-46d99dd9.js → p-4a5d3b4c.js} +7 -7
  282. package/dist/components/{p-8cfdac0d.js → p-52d9029f.js} +9 -9
  283. package/dist/components/{p-da87cc71.js → p-583f9282.js} +1 -1
  284. package/dist/components/{p-a25f3aca.js → p-6ac87493.js} +6 -6
  285. package/dist/components/{p-95e08256.js → p-6e373d96.js} +4 -4
  286. package/dist/components/{p-aae4c250.js → p-707dced6.js} +2 -2
  287. package/dist/components/{p-b30d5f6b.js → p-71fb663b.js} +4 -4
  288. package/dist/components/{p-e0510925.js → p-71fbfb8b.js} +7 -7
  289. package/dist/components/{p-5669b6e7.js → p-7384c20c.js} +9 -9
  290. package/dist/components/{p-35e93724.js → p-73db39b8.js} +2 -2
  291. package/dist/components/{p-193d8051.js → p-76c443b7.js} +3 -3
  292. package/dist/components/{p-4902c5cf.js → p-7adb3504.js} +5 -5
  293. package/dist/components/{p-48acb953.js → p-7f3bfc54.js} +6 -6
  294. package/dist/components/p-7f71b3c7.js +463 -0
  295. package/dist/components/{p-c0db1a83.js → p-881e5548.js} +82 -59
  296. package/dist/components/{p-39e8b34a.js → p-8861d5a3.js} +4 -4
  297. package/dist/components/{p-00bb4abb.js → p-88aded7d.js} +11 -11
  298. package/dist/components/{p-7148ec6a.js → p-8a66a347.js} +5 -5
  299. package/dist/components/{p-05df465d.js → p-8cea6257.js} +1 -1
  300. package/dist/components/{p-695f0784.js → p-95a1fa70.js} +5 -5
  301. package/dist/components/{p-0e5cc539.js → p-9e1478a0.js} +7 -7
  302. package/dist/components/{p-7834fd55.js → p-9f481b70.js} +7 -7
  303. package/dist/components/{p-3b29dda1.js → p-a3cc7425.js} +2 -2
  304. package/dist/components/{p-a51db0d6.js → p-a4d13056.js} +22 -22
  305. package/dist/components/{p-107e55c1.js → p-a6c93f34.js} +5 -5
  306. package/dist/components/{p-4b319158.js → p-a74caccd.js} +4 -4
  307. package/dist/components/{p-4e5a54c2.js → p-a8d77615.js} +16 -16
  308. package/dist/components/{p-2309fb19.js → p-abf952f5.js} +5 -5
  309. package/dist/components/{p-0b2b3442.js → p-ac6a5fc5.js} +7 -7
  310. package/dist/components/{p-c334f0e5.js → p-af2b1476.js} +8 -8
  311. package/dist/components/{p-45220ce9.js → p-b226a124.js} +7 -7
  312. package/dist/components/{p-1a9e3806.js → p-b2d5329f.js} +5 -5
  313. package/dist/components/{p-4aede34c.js → p-b3240843.js} +5 -5
  314. package/dist/components/{p-6c9a833e.js → p-bfc86230.js} +4 -4
  315. package/dist/components/{p-a54b82e9.js → p-c0790538.js} +1 -1
  316. package/dist/components/{p-1a8b46bb.js → p-c0ad28ff.js} +9 -9
  317. package/dist/components/p-c39c6e12.js +218 -0
  318. package/dist/components/p-c3bfa8f1.js +437 -0
  319. package/dist/components/{p-6ec01673.js → p-c6c4c24e.js} +4 -4
  320. package/dist/components/{p-241a8245.js → p-c9db1b82.js} +6 -6
  321. package/dist/components/p-c9ee0428.js +260 -0
  322. package/dist/components/{p-af3b99f4.js → p-cd6656bf.js} +8 -8
  323. package/dist/components/{p-819cb785.js → p-cd6f04ae.js} +5 -5
  324. package/dist/components/{p-598dc3f2.js → p-d029dd2f.js} +8 -8
  325. package/dist/components/{p-dc3143c0.js → p-d0f54eea.js} +3 -3
  326. package/dist/components/{p-43d6a221.js → p-d22fc130.js} +8 -8
  327. package/dist/components/{p-da9018ea.js → p-d2cbc2d1.js} +11 -11
  328. package/dist/components/{p-4b375dfa.js → p-d6024528.js} +4 -4
  329. package/dist/components/{p-540d8eb9.js → p-d9626191.js} +6 -6
  330. package/dist/components/{p-0a31ef52.js → p-dacaa250.js} +3 -3
  331. package/dist/components/{p-2a65883d.js → p-dd8a892e.js} +6 -6
  332. package/dist/components/{p-4ebf9684.js → p-dfdbb665.js} +5 -5
  333. package/dist/components/{p-1f5a4682.js → p-e0ef3893.js} +7 -7
  334. package/dist/components/{p-1391bef0.js → p-e229128b.js} +1 -1
  335. package/dist/components/{p-6f7c46d2.js → p-e334e15c.js} +2 -2
  336. package/dist/components/{p-5476e3f3.js → p-e544a590.js} +6 -6
  337. package/dist/components/{p-2447a26f.js → p-e7b7abfe.js} +5 -5
  338. package/dist/components/p-e93218b8.js +86 -0
  339. package/dist/components/{p-fef53de3.js → p-ecbb4e46.js} +7 -7
  340. package/dist/components/{p-84b30573.js → p-eff3c856.js} +6 -6
  341. package/dist/components/{p-e847fee9.js → p-f19b4abc.js} +114 -35
  342. package/dist/components/{p-60fdbd75.js → p-f3c261ec.js} +1 -1
  343. package/dist/components/{p-89eb65a9.js → p-fa8cf270.js} +3 -3
  344. package/dist/components/p-fdad14c9.js +4028 -0
  345. package/dist/components/{p-3e58e0f3.js → p-fe0d125b.js} +4 -4
  346. package/dist/components/rtk-ai-toggle.js +6 -6
  347. package/dist/components/rtk-ai-transcriptions.js +1 -1
  348. package/dist/components/rtk-ai.js +6 -6
  349. package/dist/components/rtk-audio-grid.js +5 -5
  350. package/dist/components/rtk-audio-tile.js +7 -7
  351. package/dist/components/rtk-audio-visualizer.js +1 -1
  352. package/dist/components/rtk-avatar.js +1 -1
  353. package/dist/components/rtk-breakout-room-manager.js +1 -1
  354. package/dist/components/rtk-breakout-room-participants.js +1 -1
  355. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  356. package/dist/components/rtk-breakout-rooms-toggle.js +6 -6
  357. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  358. package/dist/components/rtk-button.js +1 -1
  359. package/dist/components/rtk-camera-selector.js +1 -1
  360. package/dist/components/rtk-camera-toggle.js +7 -7
  361. package/dist/components/rtk-caption-toggle.js +6 -6
  362. package/dist/components/rtk-chat-composer-ui.js +17 -34
  363. package/dist/components/rtk-chat-composer-view.js +1 -1
  364. package/dist/components/{rtk-channel-header.d.ts → rtk-chat-header.d.ts} +4 -4
  365. package/dist/components/rtk-chat-header.js +6 -0
  366. package/dist/components/rtk-chat-message.js +1 -1
  367. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  368. package/dist/components/rtk-chat-messages-ui.js +26 -20
  369. package/dist/components/rtk-chat-search-results.js +16 -16
  370. package/dist/components/rtk-chat-selector-ui.js +5 -5
  371. package/dist/components/{rtk-channel-creator.d.ts → rtk-chat-selector.d.ts} +4 -4
  372. package/dist/components/rtk-chat-selector.js +6 -0
  373. package/dist/components/rtk-chat-toggle.js +13 -16
  374. package/dist/components/rtk-chat.js +1 -1
  375. package/dist/components/rtk-clock.js +7 -7
  376. package/dist/components/rtk-confirmation-modal.js +1 -1
  377. package/dist/components/rtk-controlbar-button.js +1 -1
  378. package/dist/components/rtk-controlbar.js +5 -5
  379. package/dist/components/rtk-counter.js +1 -1
  380. package/dist/components/rtk-debugger-audio.js +1 -1
  381. package/dist/components/rtk-debugger-screenshare.js +1 -1
  382. package/dist/components/rtk-debugger-system.js +1 -1
  383. package/dist/components/rtk-debugger-toggle.js +7 -7
  384. package/dist/components/rtk-debugger-video.js +1 -1
  385. package/dist/components/rtk-debugger.js +1 -1
  386. package/dist/components/rtk-dialog-manager.js +26 -26
  387. package/dist/components/rtk-dialog.js +1 -1
  388. package/dist/components/rtk-draft-attachment-view.js +1 -1
  389. package/dist/components/rtk-emoji-picker-button.js +1 -1
  390. package/dist/components/rtk-emoji-picker.js +1 -1
  391. package/dist/components/rtk-ended-screen.js +5 -5
  392. package/dist/components/rtk-file-dropzone.js +5 -5
  393. package/dist/components/rtk-file-message-view.js +1 -1
  394. package/dist/components/rtk-file-message.js +1 -1
  395. package/dist/components/rtk-file-picker-button.js +1 -1
  396. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  397. package/dist/components/rtk-grid-pagination.js +7 -7
  398. package/dist/components/rtk-grid.js +12 -12
  399. package/dist/components/rtk-header.js +5 -5
  400. package/dist/components/rtk-icon.js +1 -1
  401. package/dist/components/rtk-idle-screen.js +7 -7
  402. package/dist/components/rtk-image-message-view.js +1 -1
  403. package/dist/components/rtk-image-message.js +1 -1
  404. package/dist/components/rtk-image-viewer.js +6 -6
  405. package/dist/components/rtk-information-tooltip.js +5 -5
  406. package/dist/components/rtk-join-stage.js +1 -1
  407. package/dist/components/rtk-leave-button.js +7 -7
  408. package/dist/components/rtk-leave-meeting.js +1 -1
  409. package/dist/components/rtk-livestream-indicator.js +1 -1
  410. package/dist/components/rtk-livestream-player.js +1 -1
  411. package/dist/components/rtk-livestream-toggle.js +6 -6
  412. package/dist/components/rtk-logo.js +1 -1
  413. package/dist/components/rtk-markdown-view.js +1 -1
  414. package/dist/components/rtk-meeting-title.js +4 -4
  415. package/dist/components/rtk-meeting.js +59 -47
  416. package/dist/components/rtk-menu-item.js +1 -1
  417. package/dist/components/rtk-menu-list.js +1 -1
  418. package/dist/components/rtk-menu.js +1 -1
  419. package/dist/components/rtk-message-list-view.js +8 -8
  420. package/dist/components/rtk-message-view.js +1 -1
  421. package/dist/components/rtk-mic-toggle.js +7 -7
  422. package/dist/components/rtk-microphone-selector.js +1 -1
  423. package/dist/components/rtk-mixed-grid.js +10 -10
  424. package/dist/components/rtk-more-toggle.js +8 -8
  425. package/dist/components/rtk-mute-all-button.js +7 -7
  426. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  427. package/dist/components/rtk-name-tag.js +1 -1
  428. package/dist/components/rtk-network-indicator.js +4 -4
  429. package/dist/components/rtk-notification.js +1 -1
  430. package/dist/components/rtk-notifications.js +8 -8
  431. package/dist/components/rtk-overlay-modal.js +1 -1
  432. package/dist/components/rtk-paginated-list.js +1 -1
  433. package/dist/components/rtk-participant-count.js +4 -4
  434. package/dist/components/rtk-participant-setup.js +5 -5
  435. package/dist/components/rtk-participant-tile.js +1 -1
  436. package/dist/components/rtk-participant.js +1 -1
  437. package/dist/components/rtk-participants-audio.js +7 -7
  438. package/dist/components/rtk-participants-stage-list.js +1 -1
  439. package/dist/components/rtk-participants-stage-queue.js +1 -1
  440. package/dist/components/rtk-participants-toggle.js +7 -7
  441. package/dist/components/rtk-participants-viewer-list.js +1 -1
  442. package/dist/components/rtk-participants-waiting-list.js +1 -1
  443. package/dist/components/rtk-participants.js +17 -17
  444. package/dist/components/rtk-permissions-message.js +1 -1
  445. package/dist/components/rtk-pinned-message-selector.d.ts +11 -0
  446. package/dist/components/rtk-pinned-message-selector.js +6 -0
  447. package/dist/components/rtk-pip-toggle.js +6 -6
  448. package/dist/components/rtk-plugin-main.js +1 -1
  449. package/dist/components/rtk-plugins-toggle.js +7 -7
  450. package/dist/components/rtk-plugins.js +1 -1
  451. package/dist/components/rtk-poll-form.js +1 -1
  452. package/dist/components/rtk-poll.js +1 -1
  453. package/dist/components/rtk-polls-toggle.js +7 -7
  454. package/dist/components/rtk-polls.js +1 -1
  455. package/dist/components/rtk-recording-indicator.js +5 -5
  456. package/dist/components/rtk-recording-toggle.js +6 -6
  457. package/dist/components/rtk-screen-share-toggle.js +7 -7
  458. package/dist/components/rtk-screenshare-view.js +11 -11
  459. package/dist/components/rtk-settings-audio.js +1 -1
  460. package/dist/components/rtk-settings-toggle.js +7 -7
  461. package/dist/components/rtk-settings-video.js +1 -1
  462. package/dist/components/rtk-settings.js +13 -13
  463. package/dist/components/rtk-setup-screen.js +11 -11
  464. package/dist/components/rtk-sidebar-ui.js +1 -1
  465. package/dist/components/rtk-sidebar.js +13 -13
  466. package/dist/components/rtk-simple-grid.js +4 -4
  467. package/dist/components/rtk-speaker-selector.js +1 -1
  468. package/dist/components/rtk-spinner.js +1 -1
  469. package/dist/components/rtk-spotlight-grid.js +6 -6
  470. package/dist/components/rtk-spotlight-indicator.js +1 -1
  471. package/dist/components/rtk-stage-toggle.js +7 -7
  472. package/dist/components/rtk-stage.js +4 -4
  473. package/dist/components/rtk-switch.js +1 -1
  474. package/dist/components/rtk-tab-bar.js +1 -1
  475. package/dist/components/rtk-text-composer-view.js +1 -1
  476. package/dist/components/rtk-text-message-view.js +1 -1
  477. package/dist/components/rtk-text-message.js +1 -1
  478. package/dist/components/rtk-tooltip.js +1 -1
  479. package/dist/components/rtk-transcript.js +1 -1
  480. package/dist/components/rtk-transcripts.js +4 -4
  481. package/dist/components/rtk-ui-provider.js +3 -3
  482. package/dist/components/rtk-viewer-count.js +1 -1
  483. package/dist/components/rtk-virtualized-participant-list.js +1 -1
  484. package/dist/components/rtk-waiting-screen.js +5 -5
  485. package/dist/docs/docs-components.json +10767 -17949
  486. package/dist/docs/docs-vscode.json +58 -108
  487. package/dist/esm/{ChatHead-15c2f8d4.js → ChatHead-148558a8.js} +1 -1
  488. package/dist/esm/{TextMessage-0d8be8c5.js → TextMessage-cdf76ced.js} +2 -2
  489. package/dist/esm/{chat-b2bea75f.js → chat-12f27725.js} +2 -13
  490. package/dist/esm/{config-325caca3.js → config-74c02ff0.js} +2 -2
  491. package/dist/esm/{debounce-3139f9e3.js → debounce-0c6e63e9.js} +1 -1
  492. package/dist/esm/{index-d31a2e33.js → index-3f51790f.js} +1 -1
  493. package/dist/esm/index-55463a54.js +4365 -0
  494. package/dist/esm/{index-6eb882e7.js → index-e677f28b.js} +2 -2
  495. package/dist/esm/index.js +8 -8
  496. package/dist/esm/loader.js +6478 -3606
  497. package/dist/esm/{merge-bc2a0775.js → merge-df16b7d2.js} +1 -1
  498. package/dist/esm/{notification-4beb1e0d.js → notification-dd8b1d52.js} +1 -1
  499. package/dist/esm/realtimekit-ui.js +31 -4
  500. package/dist/esm/rtk-ai-toggle.entry.js +3 -3
  501. package/dist/esm/rtk-ai-transcriptions.entry.js +5 -5
  502. package/dist/esm/rtk-ai.entry.js +3 -3
  503. package/dist/esm/rtk-audio-grid.entry.js +5 -5
  504. package/dist/esm/rtk-audio-tile.entry.js +3 -3
  505. package/dist/esm/rtk-audio-visualizer_4.entry.js +4 -4
  506. package/dist/esm/{rtk-avatar_24.entry.js → rtk-avatar_26.entry.js} +649 -603
  507. package/dist/esm/rtk-breakout-room-manager_3.entry.js +8 -8
  508. package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +13 -13
  509. package/dist/esm/rtk-breakout-rooms-toggle.entry.js +3 -3
  510. package/dist/esm/rtk-camera-selector_2.entry.js +4 -4
  511. package/dist/esm/rtk-camera-toggle.entry.js +3 -3
  512. package/dist/esm/rtk-caption-toggle.entry.js +3 -3
  513. package/dist/esm/rtk-chat-composer-ui.entry.js +11 -25
  514. package/dist/esm/rtk-chat-message.entry.js +6 -6
  515. package/dist/esm/rtk-chat-messages-ui.entry.js +13 -7
  516. package/dist/esm/rtk-chat-search-results.entry.js +4 -4
  517. package/dist/esm/rtk-chat-selector-ui.entry.js +4 -4
  518. package/dist/esm/rtk-chat-toggle.entry.js +10 -13
  519. package/dist/esm/rtk-clock.entry.js +6 -6
  520. package/dist/esm/rtk-controlbar-button.entry.js +4 -4
  521. package/dist/esm/rtk-controlbar.entry.js +5 -5
  522. package/dist/esm/rtk-debugger-audio_4.entry.js +3 -3
  523. package/dist/esm/rtk-debugger-toggle.entry.js +4 -4
  524. package/dist/esm/rtk-dialog-manager.entry.js +4 -4
  525. package/dist/esm/rtk-dialog.entry.js +4 -4
  526. package/dist/esm/rtk-ended-screen.entry.js +3 -3
  527. package/dist/esm/rtk-file-dropzone.entry.js +4 -4
  528. package/dist/esm/rtk-file-message_3.entry.js +14 -14
  529. package/dist/esm/rtk-fullscreen-toggle.entry.js +3 -3
  530. package/dist/esm/rtk-grid-pagination.entry.js +4 -4
  531. package/dist/esm/rtk-grid.entry.js +4 -4
  532. package/dist/esm/rtk-header.entry.js +5 -5
  533. package/dist/esm/rtk-idle-screen.entry.js +4 -4
  534. package/dist/esm/rtk-image-viewer.entry.js +4 -4
  535. package/dist/esm/rtk-information-tooltip.entry.js +4 -4
  536. package/dist/esm/rtk-leave-button.entry.js +4 -4
  537. package/dist/esm/rtk-livestream-indicator_3.entry.js +2477 -1450
  538. package/dist/esm/rtk-livestream-toggle.entry.js +3 -3
  539. package/dist/esm/rtk-logo.entry.js +3 -3
  540. package/dist/esm/rtk-meeting-title.entry.js +3 -3
  541. package/dist/esm/rtk-message-list-view.entry.js +7 -7
  542. package/dist/esm/rtk-mic-toggle.entry.js +3 -3
  543. package/dist/esm/rtk-mixed-grid.entry.js +4 -4
  544. package/dist/esm/rtk-more-toggle.entry.js +5 -5
  545. package/dist/esm/rtk-mute-all-button.entry.js +3 -3
  546. package/dist/esm/rtk-name-tag.entry.js +4 -4
  547. package/dist/esm/rtk-network-indicator.entry.js +3 -3
  548. package/dist/esm/rtk-notification.entry.js +7 -7
  549. package/dist/esm/rtk-notifications.entry.js +5 -5
  550. package/dist/esm/rtk-participant-count.entry.js +3 -3
  551. package/dist/esm/rtk-participant-setup.entry.js +5 -5
  552. package/dist/esm/rtk-participant_2.entry.js +19 -19
  553. package/dist/esm/rtk-participants-audio.entry.js +4 -4
  554. package/dist/esm/rtk-participants-stage-list_4.entry.js +5 -5
  555. package/dist/esm/rtk-participants-toggle.entry.js +4 -4
  556. package/dist/esm/rtk-participants.entry.js +4 -4
  557. package/dist/esm/rtk-pip-toggle.entry.js +3 -3
  558. package/dist/esm/rtk-plugin-main_2.entry.js +4 -4
  559. package/dist/esm/rtk-plugins-toggle.entry.js +4 -4
  560. package/dist/esm/rtk-plugins_2.entry.js +7 -7
  561. package/dist/esm/rtk-poll_2.entry.js +6 -6
  562. package/dist/esm/rtk-polls-toggle.entry.js +4 -4
  563. package/dist/esm/rtk-recording-indicator.entry.js +4 -4
  564. package/dist/esm/rtk-recording-toggle.entry.js +3 -3
  565. package/dist/esm/rtk-screen-share-toggle.entry.js +3 -3
  566. package/dist/esm/rtk-screenshare-view.entry.js +8 -8
  567. package/dist/esm/rtk-settings-audio_2.entry.js +3 -3
  568. package/dist/esm/rtk-settings-toggle.entry.js +4 -4
  569. package/dist/esm/rtk-settings.entry.js +3 -3
  570. package/dist/esm/rtk-setup-screen.entry.js +5 -5
  571. package/dist/esm/rtk-sidebar-ui.entry.js +5 -5
  572. package/dist/esm/rtk-sidebar.entry.js +5 -5
  573. package/dist/esm/rtk-simple-grid.entry.js +4 -4
  574. package/dist/esm/rtk-spotlight-grid.entry.js +6 -6
  575. package/dist/esm/rtk-spotlight-indicator.entry.js +3 -3
  576. package/dist/esm/rtk-stage-toggle.entry.js +3 -3
  577. package/dist/esm/rtk-stage.entry.js +4 -4
  578. package/dist/esm/rtk-transcript.entry.js +4 -4
  579. package/dist/esm/rtk-transcripts.entry.js +3 -3
  580. package/dist/esm/rtk-ui-provider.entry.js +3 -3
  581. package/dist/esm/rtk-waiting-screen.entry.js +4 -4
  582. package/dist/esm/{sidebar-376c9917.js → sidebar-293fd302.js} +1 -1
  583. package/dist/esm/{ui-store-12132d9c.js → ui-store-644e4cb0.js} +114 -35
  584. package/dist/realtimekit-ui/index.esm.js +1 -1
  585. package/dist/realtimekit-ui/p-01ef7b4d.entry.js +1 -0
  586. package/dist/realtimekit-ui/p-06dcd55e.entry.js +1 -0
  587. package/dist/realtimekit-ui/p-0c3f571f.entry.js +1 -0
  588. package/dist/realtimekit-ui/{p-30dcb4cc.entry.js → p-0cfee5d3.entry.js} +1 -1
  589. package/dist/realtimekit-ui/p-10d4354c.entry.js +1 -0
  590. package/dist/realtimekit-ui/p-14dc10b8.entry.js +1 -0
  591. package/dist/realtimekit-ui/p-1517b428.entry.js +1 -0
  592. package/dist/realtimekit-ui/{p-6914a616.entry.js → p-15297e89.entry.js} +1 -1
  593. package/dist/realtimekit-ui/p-1e16ecb3.entry.js +1 -0
  594. package/dist/realtimekit-ui/{p-af58f450.entry.js → p-1feec027.entry.js} +1 -1
  595. package/dist/realtimekit-ui/{p-00445029.entry.js → p-2251059d.entry.js} +1 -1
  596. package/dist/realtimekit-ui/p-25f3e66a.entry.js +1 -0
  597. package/dist/realtimekit-ui/{p-6888b050.entry.js → p-26b4e422.entry.js} +1 -1
  598. package/dist/realtimekit-ui/p-29549a05.entry.js +1 -0
  599. package/dist/realtimekit-ui/{p-a852e0cf.entry.js → p-29d3f735.entry.js} +1 -1
  600. package/dist/realtimekit-ui/{p-532e1a53.entry.js → p-2b47921e.entry.js} +1 -1
  601. package/dist/realtimekit-ui/p-2f93d90b.entry.js +1 -0
  602. package/dist/realtimekit-ui/{p-afa7211c.js → p-2ff77d78.js} +1 -1
  603. package/dist/realtimekit-ui/{p-c5f704a3.entry.js → p-309b8a96.entry.js} +1 -1
  604. package/dist/realtimekit-ui/{p-fcb7a6e2.entry.js → p-30a3007c.entry.js} +1 -1
  605. package/dist/realtimekit-ui/{p-9b550ec4.js → p-315cd380.js} +1 -1
  606. package/dist/realtimekit-ui/{p-a67e2a25.entry.js → p-36f7accb.entry.js} +1 -1
  607. package/dist/realtimekit-ui/{p-05d1b9d5.entry.js → p-3ec85ff3.entry.js} +1 -1
  608. package/dist/realtimekit-ui/{p-14569a57.entry.js → p-40ab8b0f.entry.js} +1 -1
  609. package/dist/realtimekit-ui/{p-be5bdd0a.entry.js → p-43fa4d95.entry.js} +1 -1
  610. package/dist/realtimekit-ui/{p-426bf45e.entry.js → p-4814e742.entry.js} +1 -1
  611. package/dist/realtimekit-ui/{p-616dc312.entry.js → p-4a5e203d.entry.js} +1 -1
  612. package/dist/realtimekit-ui/{p-a7172c2d.entry.js → p-4e604bf1.entry.js} +1 -1
  613. package/dist/realtimekit-ui/p-4ec77793.js +1 -0
  614. package/dist/realtimekit-ui/{p-e78ba202.entry.js → p-50aaac81.entry.js} +1 -1
  615. package/dist/realtimekit-ui/{p-323d1aa4.entry.js → p-5a425dac.entry.js} +1 -1
  616. package/dist/realtimekit-ui/{p-1834416c.entry.js → p-5ef7cf76.entry.js} +1 -1
  617. package/dist/realtimekit-ui/{p-85b3c0c4.entry.js → p-60b3fbb2.entry.js} +1 -1
  618. package/dist/realtimekit-ui/{p-c8773db0.entry.js → p-6573487e.entry.js} +1 -1
  619. package/dist/realtimekit-ui/p-67c674d4.entry.js +1 -0
  620. package/dist/realtimekit-ui/p-6acdcb4f.entry.js +1 -0
  621. package/dist/realtimekit-ui/{p-cb54bd67.entry.js → p-6c2ef845.entry.js} +1 -1
  622. package/dist/realtimekit-ui/{p-0baa78d7.entry.js → p-6f913b9b.entry.js} +1 -1
  623. package/dist/realtimekit-ui/p-71393f37.entry.js +1 -0
  624. package/dist/realtimekit-ui/{p-a7e0277f.js → p-77e5605f.js} +1 -1
  625. package/dist/realtimekit-ui/p-7c6cdccf.entry.js +1 -0
  626. package/dist/realtimekit-ui/{p-f6c82f1b.entry.js → p-8329d4ae.entry.js} +1 -1
  627. package/dist/realtimekit-ui/{p-8778b3e6.entry.js → p-84476389.entry.js} +1 -1
  628. package/dist/realtimekit-ui/{p-342b4926.entry.js → p-879459bb.entry.js} +1 -1
  629. package/dist/realtimekit-ui/{p-2441260e.entry.js → p-8e867ba8.entry.js} +1 -1
  630. package/dist/realtimekit-ui/p-8fc79c56.js +1 -0
  631. package/dist/realtimekit-ui/p-9599b2e4.entry.js +1 -0
  632. package/dist/realtimekit-ui/{p-7d01d588.entry.js → p-975cbc2e.entry.js} +1 -1
  633. package/dist/realtimekit-ui/p-9e27670a.entry.js +1 -0
  634. package/dist/realtimekit-ui/p-9ff0dfdb.entry.js +1 -0
  635. package/dist/realtimekit-ui/{p-f32aecbc.entry.js → p-a43a7ffb.entry.js} +1 -1
  636. package/dist/realtimekit-ui/p-a599f720.js +2 -0
  637. package/dist/realtimekit-ui/p-abbee273.entry.js +1 -0
  638. package/dist/realtimekit-ui/p-ad11a64a.entry.js +1 -0
  639. package/dist/realtimekit-ui/p-aee32120.entry.js +1 -0
  640. package/dist/realtimekit-ui/{p-515a17ce.entry.js → p-b0eaeddc.entry.js} +1 -1
  641. package/dist/realtimekit-ui/p-b5e5e206.js +1 -0
  642. package/dist/realtimekit-ui/p-bb907330.entry.js +1 -0
  643. package/dist/realtimekit-ui/{p-5b00a8fa.entry.js → p-bbaf3e7d.entry.js} +1 -1
  644. package/dist/realtimekit-ui/{p-a1408db4.entry.js → p-be0cae77.entry.js} +1 -1
  645. package/dist/realtimekit-ui/{p-11a469d9.js → p-be0d2b90.js} +1 -1
  646. package/dist/realtimekit-ui/{p-94a37c73.entry.js → p-bea3ee08.entry.js} +1 -1
  647. package/dist/realtimekit-ui/{p-ebfde234.entry.js → p-c0e5ddd4.entry.js} +1 -1
  648. package/dist/realtimekit-ui/{p-1fe6003b.entry.js → p-c794adf9.entry.js} +1 -1
  649. package/dist/realtimekit-ui/p-c7ddf9a9.entry.js +1 -0
  650. package/dist/realtimekit-ui/{p-44d69c6b.entry.js → p-c8239122.entry.js} +1 -1
  651. package/dist/realtimekit-ui/p-c8f0b23e.entry.js +1 -0
  652. package/dist/realtimekit-ui/{p-573187b4.entry.js → p-cbbb09a2.entry.js} +1 -1
  653. package/dist/realtimekit-ui/{p-80e51a73.entry.js → p-cbfe61b9.entry.js} +1 -1
  654. package/dist/realtimekit-ui/{p-cc226b51.entry.js → p-cc71c33f.entry.js} +1 -1
  655. package/dist/realtimekit-ui/{p-ad5e9fdb.entry.js → p-cd086077.entry.js} +1 -1
  656. package/dist/realtimekit-ui/{p-6896e819.entry.js → p-cedff249.entry.js} +1 -1
  657. package/dist/realtimekit-ui/p-d107248e.entry.js +1 -0
  658. package/dist/realtimekit-ui/{p-a40cc665.entry.js → p-d10fe6c7.entry.js} +1 -1
  659. package/dist/realtimekit-ui/p-d24dd330.entry.js +1 -0
  660. package/dist/realtimekit-ui/{p-4b33b435.entry.js → p-d3d4e6de.entry.js} +1 -1
  661. package/dist/realtimekit-ui/p-d432c842.entry.js +1 -0
  662. package/dist/realtimekit-ui/p-d6126ff7.js +1 -0
  663. package/dist/realtimekit-ui/p-d8e64814.entry.js +1 -0
  664. package/dist/realtimekit-ui/{p-d3e520e5.js → p-ddcb6b8b.js} +1 -1
  665. package/dist/realtimekit-ui/{p-4485414e.entry.js → p-de253745.entry.js} +1 -1
  666. package/dist/realtimekit-ui/{p-369648b9.entry.js → p-de2fd3a4.entry.js} +1 -1
  667. package/dist/realtimekit-ui/{p-3dd04263.entry.js → p-e6fc5935.entry.js} +1 -1
  668. package/dist/realtimekit-ui/{p-c8eaa707.js → p-eccb6d78.js} +1 -1
  669. package/dist/realtimekit-ui/p-f1c4d507.entry.js +1 -0
  670. package/dist/realtimekit-ui/{p-fa86682c.entry.js → p-f42001bb.entry.js} +1 -1
  671. package/dist/realtimekit-ui/{p-a0d39ea3.entry.js → p-f423e125.entry.js} +1 -1
  672. package/dist/realtimekit-ui/p-f46787e0.entry.js +1 -0
  673. package/dist/realtimekit-ui/{p-f266302c.entry.js → p-f4e8a0b3.entry.js} +1 -1
  674. package/dist/realtimekit-ui/{p-cd0c5440.js → p-f6fdb3c3.js} +1 -1
  675. package/dist/realtimekit-ui/p-f8089097.entry.js +1 -0
  676. package/dist/realtimekit-ui/p-fc0eb2e6.entry.js +1 -0
  677. package/dist/realtimekit-ui/p-ff86148c.entry.js +1 -0
  678. package/dist/realtimekit-ui/{p-cd56beb7.entry.js → p-ffac36ba.entry.js} +1 -1
  679. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  680. package/dist/types/components/rtk-chat/rtk-chat.d.ts +6 -43
  681. package/dist/types/components/rtk-chat-composer-ui/rtk-chat-composer-ui.d.ts +1 -4
  682. package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +1 -0
  683. package/dist/types/components/rtk-chat-header/rtk-chat-header.d.ts +7 -0
  684. package/dist/types/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.d.ts +6 -15
  685. package/dist/types/components/rtk-chat-selector/rtk-chat-selector.d.ts +54 -0
  686. package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +5 -0
  687. package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +11 -5
  688. package/dist/types/components/rtk-pinned-message-selector/rtk-pinned-message-selector.d.ts +40 -0
  689. package/dist/types/components/rtk-sidebar-ui/rtk-sidebar-ui.d.ts +0 -2
  690. package/dist/types/components.d.ts +208 -498
  691. package/dist/types/lib/icons/default-icon-pack.d.ts +0 -2
  692. package/dist/types/lib/lang/default-language.d.ts +1 -4
  693. package/dist/types/lib/overrides.d.ts +5 -0
  694. package/dist/types/types/props.d.ts +0 -4
  695. package/dist/types/utils/chat.d.ts +1 -3
  696. package/dist/types/utils/flags.d.ts +0 -2
  697. package/package.json +3 -2
  698. package/dist/cjs/index-05554ce6.js +0 -2251
  699. package/dist/cjs/rtk-channel-creator.cjs.entry.js +0 -163
  700. package/dist/cjs/rtk-channel-details.cjs.entry.js +0 -49
  701. package/dist/cjs/rtk-channel-header.cjs.entry.js +0 -83
  702. package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +0 -147
  703. package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.css +0 -210
  704. package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +0 -290
  705. package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +0 -149
  706. package/dist/collection/components/rtk-channel-header/rtk-channel-header.css +0 -99
  707. package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.css +0 -330
  708. package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +0 -286
  709. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +0 -306
  710. package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +0 -341
  711. package/dist/components/p-713c7ed7.js +0 -85
  712. package/dist/components/p-a73665b4.js +0 -203
  713. package/dist/components/p-b64798ac.js +0 -703
  714. package/dist/components/p-c3592601.js +0 -1641
  715. package/dist/components/p-fbc02b1f.js +0 -402
  716. package/dist/components/rtk-channel-creator.js +0 -214
  717. package/dist/components/rtk-channel-details.d.ts +0 -11
  718. package/dist/components/rtk-channel-details.js +0 -6
  719. package/dist/components/rtk-channel-header.js +0 -151
  720. package/dist/components/rtk-channel-selector-ui.d.ts +0 -11
  721. package/dist/components/rtk-channel-selector-ui.js +0 -194
  722. package/dist/components/rtk-channel-selector-view.d.ts +0 -11
  723. package/dist/components/rtk-channel-selector-view.js +0 -6
  724. package/dist/esm/index-c1fb98bb.js +0 -2218
  725. package/dist/esm/rtk-channel-creator.entry.js +0 -159
  726. package/dist/esm/rtk-channel-details.entry.js +0 -45
  727. package/dist/esm/rtk-channel-header.entry.js +0 -79
  728. package/dist/esm/rtk-channel-selector-ui.entry.js +0 -143
  729. package/dist/realtimekit-ui/p-02c6b025.entry.js +0 -1
  730. package/dist/realtimekit-ui/p-0ee570cd.js +0 -2
  731. package/dist/realtimekit-ui/p-1462cbd9.entry.js +0 -1
  732. package/dist/realtimekit-ui/p-21d4bb9c.entry.js +0 -1
  733. package/dist/realtimekit-ui/p-23784be6.entry.js +0 -1
  734. package/dist/realtimekit-ui/p-25c4d10f.js +0 -1
  735. package/dist/realtimekit-ui/p-2b054928.entry.js +0 -1
  736. package/dist/realtimekit-ui/p-322957ed.entry.js +0 -1
  737. package/dist/realtimekit-ui/p-3f4120cc.entry.js +0 -1
  738. package/dist/realtimekit-ui/p-43530cd3.entry.js +0 -1
  739. package/dist/realtimekit-ui/p-45f90b95.js +0 -1
  740. package/dist/realtimekit-ui/p-48c87789.entry.js +0 -1
  741. package/dist/realtimekit-ui/p-4b638184.entry.js +0 -1
  742. package/dist/realtimekit-ui/p-53680d55.entry.js +0 -1
  743. package/dist/realtimekit-ui/p-54a88fdf.entry.js +0 -1
  744. package/dist/realtimekit-ui/p-5892c1e0.entry.js +0 -1
  745. package/dist/realtimekit-ui/p-5b2d97fc.js +0 -1
  746. package/dist/realtimekit-ui/p-612a8d25.entry.js +0 -1
  747. package/dist/realtimekit-ui/p-639601b7.entry.js +0 -1
  748. package/dist/realtimekit-ui/p-64206b62.entry.js +0 -1
  749. package/dist/realtimekit-ui/p-67ead213.entry.js +0 -1
  750. package/dist/realtimekit-ui/p-685adc5f.entry.js +0 -1
  751. package/dist/realtimekit-ui/p-701cdf1b.entry.js +0 -1
  752. package/dist/realtimekit-ui/p-7a9a226e.entry.js +0 -1
  753. package/dist/realtimekit-ui/p-820dad23.entry.js +0 -1
  754. package/dist/realtimekit-ui/p-85b45c3b.entry.js +0 -1
  755. package/dist/realtimekit-ui/p-95fb25d6.entry.js +0 -1
  756. package/dist/realtimekit-ui/p-a031547c.entry.js +0 -1
  757. package/dist/realtimekit-ui/p-a5900df2.js +0 -1
  758. package/dist/realtimekit-ui/p-a680da64.entry.js +0 -1
  759. package/dist/realtimekit-ui/p-a9190330.entry.js +0 -1
  760. package/dist/realtimekit-ui/p-a91a2e10.entry.js +0 -1
  761. package/dist/realtimekit-ui/p-ac6c8ebe.entry.js +0 -1
  762. package/dist/realtimekit-ui/p-b25f7d7b.entry.js +0 -1
  763. package/dist/realtimekit-ui/p-b51e813e.entry.js +0 -1
  764. package/dist/realtimekit-ui/p-be03944b.entry.js +0 -1
  765. package/dist/realtimekit-ui/p-cda276d6.entry.js +0 -1
  766. package/dist/realtimekit-ui/p-d880fb69.entry.js +0 -1
  767. package/dist/realtimekit-ui/p-e5b426fa.entry.js +0 -1
  768. package/dist/realtimekit-ui/p-ea21ec0c.entry.js +0 -1
  769. package/dist/realtimekit-ui/p-ec5ed8a4.entry.js +0 -1
  770. package/dist/types/components/rtk-channel-creator/rtk-channel-creator.d.ts +0 -37
  771. package/dist/types/components/rtk-channel-details/rtk-channel-details.d.ts +0 -16
  772. package/dist/types/components/rtk-channel-header/rtk-channel-header.d.ts +0 -32
  773. package/dist/types/components/rtk-channel-selector-ui/rtk-channel-selector-ui.d.ts +0 -35
  774. package/dist/types/components/rtk-channel-selector-view/rtk-channel-selector-view.d.ts +0 -62
@@ -2,24 +2,24 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index$1 = require('./index-05554ce6.js');
6
- const uiStore = require('./ui-store-6c2d680f.js');
5
+ const index$1 = require('./index-2e5758b6.js');
6
+ const uiStore = require('./ui-store-d0e80f30.js');
7
7
  const string = require('./string-9bce3253.js');
8
- const index = require('./index-e4244d7d.js');
9
- const debounce = require('./debounce-b06b27ca.js');
10
- const chat = require('./chat-2ae6f058.js');
8
+ const index = require('./index-92947ea7.js');
9
+ const chat = require('./chat-f1a9fd6e.js');
11
10
  const file = require('./file-0b9afa34.js');
12
- const merge = require('./merge-c46cfa17.js');
13
- const index$2 = require('./index-821d14b7.js');
14
- const config = require('./config-0a88d50b.js');
11
+ const merge = require('./merge-bb096d88.js');
12
+ const index$2 = require('./index-6f8c1928.js');
13
+ const config = require('./config-86164f93.js');
15
14
  const ResizeObserver_es = require('./ResizeObserver.es-ba961f16.js');
16
15
  const floatingUi_dom_esm = require('./floating-ui.dom.esm-705e65f3.js');
17
16
  const date = require('./date-61ffcd0a.js');
17
+ const debounce = require('./debounce-267777c1.js');
18
18
 
19
19
  const rtkAvatarCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px);align-items:center;justify-content:center;font-size:28px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));overflow:clip;border-radius:9999px;-webkit-user-select:none;-moz-user-select:none;user-select:none}rtk-icon{height:50%;width:50%}.image-ctr{display:flex;height:100%;width:100%;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}img{height:var(--rtk-space-0, 0px);width:var(--rtk-space-0, 0px);-o-object-fit:cover;object-fit:cover}img.loaded{height:100%;width:100%}.initials{display:flex;height:100%;width:100%;align-items:center;justify-content:center;text-transform:uppercase}.image{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.image img{display:none;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.image img.loaded{display:block}:host([variant='hexagon']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%)}:host([variant='square']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)}:host([size='sm']){height:var(--rtk-space-14, 56px);width:var(--rtk-space-14, 56px);font-size:12px}:host([size='md']){height:var(--rtk-space-28, 112px);width:var(--rtk-space-28, 112px)}:host([size='lg']){height:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px)}";
20
20
  const RtkAvatarStyle0 = rtkAvatarCss;
21
21
 
22
- var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22
+ var __decorate$i = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23
23
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
24
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
25
25
  r = Reflect.decorate(decorators, target, key, desc);
@@ -54,13 +54,13 @@ const RtkAvatar = class {
54
54
  };
55
55
  }
56
56
  render() {
57
- return (index$1.h(index$1.Host, { key: 'c1a0be37edb75c40b275ad59af85cee7df3f1cdf' }, this.getAvatar(), index$1.h("slot", { key: '1cd71e7494a09d68a52051edc279911dc3168515' })));
57
+ return (index$1.h(index$1.Host, { key: 'd7d3a7b03a3807984dc6798b5e35cec4418e06e7' }, this.getAvatar(), index$1.h("slot", { key: '25aa9fe632a132c1e2f8ef88ac98043bb8ef085a' })));
58
58
  }
59
59
  };
60
- __decorate$h([
60
+ __decorate$i([
61
61
  index.SyncWithStore()
62
62
  ], RtkAvatar.prototype, "iconPack", void 0);
63
- __decorate$h([
63
+ __decorate$i([
64
64
  index.SyncWithStore()
65
65
  ], RtkAvatar.prototype, "t", void 0);
66
66
  RtkAvatar.style = RtkAvatarStyle0;
@@ -89,150 +89,10 @@ const RtkButton = class {
89
89
  };
90
90
  RtkButton.style = RtkButtonStyle0;
91
91
 
92
- const rtkChannelSelectorViewCss = ".scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n position: relative;\n z-index: 10;\n height: var(--rtk-space-12, 48px);\n min-height: 48px;\n}\n\n.dropdown-trigger {\n height: 100%;\n width: 100%;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n padding: var(--rtk-space-4, 16px);\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n font-size: 14px;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n cursor: pointer;\n position: absolute;\n z-index: 20;\n}\n\n.dropdown-trigger span {\n display: flex;\n flex: 1 1 0%;\n align-items: center;\n justify-content: flex-start;\n gap: var(--rtk-space-2, 8px);\n}\n\n.dropdown-trigger rtk-icon {\n margin-left: var(--rtk-space-1, 4px);\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\n flex-shrink: 0;\n}\n\n@container chatcontainer (height < 360px) {\n .dropdown-trigger {\n padding: var(--rtk-space-2, 8px);\n }\n .dropdown {\n top: var(--rtk-space-8, 32px) !important;\n }\n .search-container {\n padding-left: var(--rtk-space-0, 0px) !important;\n padding-right: var(--rtk-space-0, 0px) !important;\n padding-top: var(--rtk-space-0, 0px) !important;\n padding-bottom: var(--rtk-space-0, 0px) !important;\n }\n input {\n height: var(--rtk-space-8, 32px) !important;\n border-radius: var(--rtk-border-radius-none, 0) !important;\n }\n .avatar-icon {\n height: var(--rtk-space-3, 12px) !important;\n width: var(--rtk-space-3, 12px) !important;\n padding: var(--rtk-space-1, 4px) !important;\n }\n}\n\n.dropdown {\n position: absolute;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n top: var(--rtk-space-12, 48px);\n z-index: 10;\n animation: 0.3s slide-down ease;\n}\n\n.dropdown .channels-container {\n max-height: var(--rtk-space-80, 320px);\n}\n\n.list {\n display: flex;\n flex-direction: column;\n}\n\n.list .channel .channel-data {\n align-items: flex-start;\n}\n\n.unread-count {\n display: flex;\n justify-content: center;\n height: var(--rtk-space-5, 20px);\n min-width: var(--rtk-space-3, 12px);\n border-radius: 9999px;\n padding-left: var(--rtk-space-1, 4px);\n padding-right: var(--rtk-space-1, 4px);\n font-size: 12px;\n line-height: 1.25rem;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\ninput {\n height: var(--rtk-space-9, 36px);\n width: 100%;\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n outline: 2px solid transparent;\n outline-offset: 2px;\n border-radius: var(--rtk-border-radius-sm, 4px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.search-container {\n display: flex;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n align-items: center;\n padding-top: var(--rtk-space-3, 12px);\n padding-bottom: var(--rtk-space-3, 12px);\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-2, 8px);\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.search-container rtk-icon {\n margin-left: calc(var(--rtk-space-8, 32px) * -1);\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channels-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n overflow-y: auto;\n}\n\nrtk-avatar {\n height: var(--rtk-space-4, 16px) !important;\n width: var(--rtk-space-4, 16px) !important;\n overflow: clip;\n border-radius: 9999px;\n padding: var(--rtk-space-2, 8px);\n font-size: 12px;\n}\n\n.channel {\n flex-shrink: 0;\n padding-top: var(--rtk-space-2, 8px);\n padding-bottom: var(--rtk-space-2, 8px);\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n outline: 2px solid transparent;\n outline-offset: 2px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n width: 100%;\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-3, 12px);\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.channel:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.channel .channel-data {\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.channel .name {\n font-size: 16px;\n}\n\n.channel .name, \n .channel .last-message {\n max-width: var(--rtk-space-40, 160px);\n text-align: left;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n}\n\n.channel .no-message {\n font-style: italic;\n}\n\n.channel .avatar-icon {\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\n padding: var(--rtk-space-2, 8px);\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n overflow: clip;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n}\n\n.channel time, \n .channel .last-message {\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channel.active {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.channel.active .unread-count {\n background-color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity));\n}\n\n.channel.active time {\n color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n}\n\n.channel.active .last-message {\n color: rgb(var(--rtk-colors-text-on-brand-700, var(--rtk-colors-text-700, 255 255 255 / 0.64)));\n}\n\n.channel.active rtk-avatar {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.col {\n gap: var(--rtk-space-1, 4px);\n display: flex;\n flex-direction: column;\n}\n\n.channel-meta {\n flex-shrink: 0;\n align-items: flex-end;\n}\n\n@keyframes slide-down {\n from {\n transform: translateY(-50px);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
93
- const RtkChannelSelectorViewStyle0 = rtkChannelSelectorViewCss;
94
-
95
- var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
98
- r = Reflect.decorate(decorators, target, key, desc);
99
- else
100
- for (var i = decorators.length - 1; i >= 0; i--)
101
- if (d = decorators[i])
102
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
103
- return c > 3 && r && Object.defineProperty(target, key, r), r;
104
- };
105
- const RtkChannelSelectorView = class {
106
- constructor(hostRef) {
107
- index$1.registerInstance(this, hostRef);
108
- this.channelChange = index$1.createEvent(this, "channelChange", 7);
109
- /** Disables search bar (default = false) */
110
- this.disableSearch = false;
111
- /** Hides avatar (default = false) */
112
- this.hideAvatar = false;
113
- /** Icon Pack */
114
- this.iconPack = uiStore.defaultIconPack;
115
- /** Language */
116
- this.t = uiStore.useLanguage();
117
- /** Render as dropdown or list (default = list) */
118
- this.viewAs = 'list';
119
- this.searchQuery = '';
120
- this.showDropdown = false;
121
- this.calculateListHeight = debounce.debounce(() => {
122
- if (this.viewAs === 'list' && this.$listEl) {
123
- let height = 0;
124
- const slotEl = this.$el.shadowRoot.querySelector('slot[name="header"]');
125
- if (slotEl) {
126
- slotEl.assignedElements().forEach((e) => (height += e.offsetHeight));
127
- }
128
- if (this.$searchEl) {
129
- height += this.$searchEl.offsetHeight;
130
- }
131
- this.$listEl.style.height = `${window.innerHeight - height - 16}px`;
132
- }
133
- }, 60);
134
- this.getFilteredChannels = () => {
135
- if (this.searchQuery.trim() === '') {
136
- return this.channels;
137
- }
138
- return this.channels.filter((channel) => {
139
- return channel['name'].toLowerCase().includes(this.searchQuery.toLowerCase());
140
- });
141
- };
142
- this.toggleDropdown = () => {
143
- this.showDropdown = !this.showDropdown;
144
- };
145
- this.getChannelById = (id) => {
146
- return this.channels.find((channel) => channel.id === id);
147
- };
148
- this.getTotalUnreads = () => {
149
- return this.channels.reduce((acc, curr) => {
150
- return acc + curr.unreadCount;
151
- }, 0);
152
- };
153
- this.onChannelClickHandler = (channel) => {
154
- this.channelChange.emit(channel);
155
- if (this.viewAs === 'dropdown') {
156
- this.showDropdown = false;
157
- }
158
- };
159
- }
160
- connectedCallback() {
161
- this.resizeObserver = new ResizeObserver(this.calculateListHeight);
162
- }
163
- componentDidLoad() {
164
- this.resizeObserver.observe(this.$el);
165
- this.calculateListHeight();
166
- }
167
- disconnectedCallback() {
168
- var _a;
169
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
170
- this.calculateListHeight.cancel();
171
- }
172
- getTimeLabel(messageDate) {
173
- const today = new Date();
174
- const yesterday = new Date(today);
175
- yesterday.setDate(today.getDate() - 1);
176
- const firstDayOfWeek = new Date(today);
177
- firstDayOfWeek.setDate(today.getDate() - today.getDay() - 1);
178
- if (messageDate.toDateString() === today.toDateString()) {
179
- return messageDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
180
- }
181
- else if (messageDate.toDateString() === yesterday.toDateString()) {
182
- return this.t('date.yesteday');
183
- }
184
- else if (messageDate > firstDayOfWeek) {
185
- const weekdays = [
186
- 'date.sunday',
187
- 'date.monday',
188
- 'date.tuesday',
189
- 'date.wednesday',
190
- 'date.thursday',
191
- 'date.friday',
192
- 'date.saturday',
193
- ];
194
- return this.t(weekdays[messageDate.getDay()]);
195
- }
196
- else {
197
- return Intl.DateTimeFormat([], {
198
- day: '2-digit',
199
- month: '2-digit',
200
- year: '2-digit',
201
- }).format(messageDate);
202
- }
203
- }
204
- render() {
205
- const filteredChannels = this.getFilteredChannels();
206
- const shouldShowDropdown = this.viewAs === 'list' || (this.viewAs === 'dropdown' && this.showDropdown);
207
- return (index$1.h(index$1.Host, { key: 'adc8ab4b9c8c865998588fbd9766296f18b3e48e' }, this.viewAs === 'list' && index$1.h("slot", { key: 'e5740725a4349472ca2eb1fb0816eb2311a99838', name: "header" }), shouldShowDropdown && (index$1.h("div", { key: '425adc920c28e0421e07bb0bd9f61b31c42fcda9', class: {
208
- dropdown: this.viewAs === 'dropdown',
209
- scrollbar: this.viewAs === 'dropdown',
210
- list: this.viewAs === 'list',
211
- } }, !this.disableSearch && (index$1.h("div", { key: '9fbbc48d8489f2a6490729fac1fecdef1838e84a', class: "search-container", ref: (el) => (this.$searchEl = el) }, index$1.h("input", { key: 'f7fb43662d50274f80380b735ef9f5fc0b215442', type: "text", placeholder: this.t('chat.search_conversations'), value: this.searchQuery, onInput: (e) => (this.searchQuery = e.target.value) }), index$1.h("rtk-icon", { key: 'af76e65a1397d2a6e557a28b687e26aef641c568', icon: this.iconPack.search }))), index$1.h("div", { key: '0711a9cfcc811269a5020dc41030c0daee5cc8bf', class: "channels-container scrollbar", ref: (el) => (this.$listEl = el) }, filteredChannels.map((channel) => {
212
- return (index$1.h("button", { class: { channel: true, active: this.selectedChannelId === channel.id }, onClick: () => this.onChannelClickHandler(channel) }, !this.hideAvatar && (index$1.h("div", null, channel.icon ? (index$1.h("rtk-icon", { class: "avatar-icon", icon: this.iconPack[channel.icon] })) : (index$1.h("rtk-avatar", { participant: {
213
- name: channel.name,
214
- picture: channel.avatarUrl,
215
- } })))), index$1.h("div", { class: "channel-data" }, index$1.h("div", { class: "col" }, index$1.h("div", { class: "name" }, channel.name), channel.latestMessage && (index$1.h("div", { class: {
216
- 'last-message': true,
217
- 'no-message': !channel.latestMessage,
218
- } }, index$1.h("rtk-text-message-view", { isMarkdown: true, text: channel.latestMessage })))), index$1.h("div", { class: "col channel-meta" }, channel.latestMessageTime && (index$1.h("time", { class: "time" }, this.getTimeLabel(channel.latestMessageTime))), channel.unreadCount > 0 && (index$1.h("div", { class: "unread-count" }, channel.unreadCount))))));
219
- })))), this.viewAs === 'dropdown' && (index$1.h("button", { key: '0c87f90d6d0fe22284995ab7259689f80a862829', class: "dropdown-trigger", onClick: this.toggleDropdown }, index$1.h("span", { key: 'd1a364f2c5c57d19702d0b8707ca661c1dc4c14f' }, index$1.h("rtk-icon", { key: 'a4a028e536459fab6de2884e25b0312d2a36bc32', icon: this.iconPack.participants }), this.selectedChannelId &&
220
- `${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (index$1.h("div", { key: '83c8efae8daed7dce4c4fdb55b523876c71a9a85', class: "unread-count" }, this.getTotalUnreads()))), index$1.h("rtk-icon", { key: '855ff62e593c7c14f448bbd5b8cf898e13d5d391', icon: this.showDropdown ? this.iconPack.chevron_up : this.iconPack.chevron_down })))));
221
- }
222
- get $el() { return index$1.getElement(this); }
223
- };
224
- __decorate$g([
225
- index.SyncWithStore()
226
- ], RtkChannelSelectorView.prototype, "iconPack", void 0);
227
- __decorate$g([
228
- index.SyncWithStore()
229
- ], RtkChannelSelectorView.prototype, "t", void 0);
230
- RtkChannelSelectorView.style = RtkChannelSelectorViewStyle0;
231
-
232
- const rtkChatCss = ":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n font-size: 14px;\n position: relative;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\nh3 {\n margin: var(--rtk-space-0, 0px);\n display: flex;\n height: var(--rtk-space-12, 48px);\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 400;\n color: rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));\n text-align: center;\n}\n\n#dropzone {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n z-index: 10;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n#dropzone.active {\n display: flex;\n animation: 0.2s slide-up ease-in;\n}\n\nrtk-chat-messages-ui,\nrtk-chat-messages-ui-paginated {\n flex: 1 0 0;\n}\n\nrtk-chat-composer-view {\n margin: var(--rtk-space-2, 8px);\n}\n\n.chat-container {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: row;\n container-type: size;\n container-name: chatcontainer;\n}\n\n@container chatcontainer (height < 360px) {\n rtk-channel-selector-view {\n height: var(--rtk-space-8, 32px);\n min-height: 24px;\n }\n}\n\n.chat {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n}\n\n.banner {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.banner .welcome-new-channel {\n width: var(--rtk-space-48, 192px);\n}\n\n.banner .create-channel-illustration {\n height: var(--rtk-space-40, 160px);\n width: var(--rtk-space-40, 160px);\n}\n\n.channel-selector-header {\n box-sizing: border-box;\n height: var(--rtk-space-16, 64px);\n padding: var(--rtk-space-4, 16px);\n display: flex;\n justify-content: space-between;\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.channel-selector-header .channel-create-btn {\n width: var(--rtk-space-8, 32px);\n justify-content: center;\n}\n\n.channel-selector-header .channel-create-btn:hover {\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\n.view-chats-btn {\n margin-top: var(--rtk-space-4, 16px);\n}\n\n.selector-container {\n z-index: 50;\n width: 100%;\n max-width: var(--rtk-space-80, 320px);\n border-right: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.selector-container.hide {\n display: none;\n}\n\n.mobile-close-btn {\n display: none;\n}\n\n.selector-container.mobile {\n height: 100%;\n width: 100%;\n max-width: 100%;\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);\n display: flex;\n}\n\n.selector-container.mobile rtk-channel-selector-view {\n max-width: var(--rtk-space-96, 384px);\n animation: 0.3s swipe-in;\n}\n\n.selector-container.mobile .mobile-close-btn {\n margin-top: var(--rtk-space-4, 16px);\n margin-bottom: var(--rtk-space-4, 16px);\n margin-left: var(--rtk-space-6, 24px);\n margin-right: var(--rtk-space-6, 24px);\n display: block;\n}\n\n.pinned-messages {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.pinned-messages-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n padding: var(--rtk-space-4, 16px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n font-size: 14px;\n cursor: pointer;\n}\n\n.pinned-messages-header div {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n}\n\n.pinned-messages-header rtk-icon {\n height: var(--rtk-space-3, 12px);\n width: var(--rtk-space-3, 12px);\n}\n\n.pinned-messages-content {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n position: absolute;\n left: var(--rtk-space-0, 0px);\n top: 100%;\n z-index: 50;\n width: 100%;\n}\n\n.pinned-message {\n display: flex;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n padding: var(--rtk-space-4, 16px);\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n}\n\n.pinned-message-avatar {\n height: var(--rtk-space-6, 24px) !important;\n width: var(--rtk-space-6, 24px) !important;\n}\n\n@keyframes swipe-in {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n";
92
+ const rtkChatCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;height:100%;width:100%;flex-direction:column;font-size:14px;position:relative;box-sizing:border-box;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}h3{margin:var(--rtk-space-0, 0px);display:flex;height:var(--rtk-space-12, 48px);align-items:center;justify-content:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));text-align:center}#dropzone{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;display:none;flex-direction:column;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}#dropzone.active{display:flex;animation:0.2s slide-up ease-in}rtk-chat-messages-ui,rtk-chat-messages-ui-paginated{flex:1 0 0}rtk-chat-composer-view{margin:var(--rtk-space-2, 8px)}.chat-container{display:flex;height:100%;width:100%;flex-direction:row;container-type:size;container-name:chatcontainer}.chat{box-sizing:border-box;display:flex;flex:1 1 0%;flex-direction:column}.banner{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.view-chats-btn{margin-top:var(--rtk-space-4, 16px)}.selector-container{z-index:50;width:100%;max-width:var(--rtk-space-80, 320px);border-right:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}.selector-container.hide{display:none}.mobile-close-btn{display:none}.selector-container.mobile{height:100%;width:100%;max-width:100%;position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);display:flex}.selector-container.mobile .mobile-close-btn{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);margin-left:var(--rtk-space-6, 24px);margin-right:var(--rtk-space-6, 24px);display:block}.pinned-messages{position:relative;display:flex;flex-direction:column}.pinned-messages-header{display:flex;align-items:center;justify-content:space-between;gap:var(--rtk-space-2, 8px);padding:var(--rtk-space-4, 16px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));font-size:14px;cursor:pointer}.pinned-messages-header div{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px)}.pinned-messages-header rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}.pinned-messages-content{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));position:absolute;left:var(--rtk-space-0, 0px);top:100%;z-index:50;max-height:30vh;width:100%;overflow:auto}.pinned-message{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px);--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));padding:var(--rtk-space-4, 16px);border-bottom-width:var(--rtk-border-width-sm, 1px);border-right-width:var(--rtk-border-width-none, 0);border-left-width:var(--rtk-border-width-none, 0);border-top-width:var(--rtk-border-width-none, 0);border-style:solid}.pinned-message-avatar{height:var(--rtk-space-6, 24px) !important;width:var(--rtk-space-6, 24px) !important}@keyframes swipe-in{from{transform:translateX(-100%)}to{transform:translateX(0)}}";
233
93
  const RtkChatStyle0 = rtkChatCss;
234
94
 
235
- var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95
+ var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
236
96
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
237
97
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
238
98
  r = Reflect.decorate(decorators, target, key, desc);
@@ -246,15 +106,6 @@ const RtkChat = class {
246
106
  constructor(hostRef) {
247
107
  index$1.registerInstance(this, hostRef);
248
108
  this.stateUpdate = index$1.createEvent(this, "rtkStateUpdate", 7);
249
- this.chatUpdateListener = ({ message }) => {
250
- if (message.channelId)
251
- return;
252
- if (!this.displayFilter || this.displayFilter(message)) {
253
- this.addToChatGroup(message);
254
- // shallow copy to trigger render
255
- this.chatGroups = Object.assign({}, this.chatGroups);
256
- }
257
- };
258
109
  this.chatPermissionUpdateListener = () => {
259
110
  this.canSend = this.meeting.self.permissions.chatPublic.canSend;
260
111
  this.canSendTextMessage = this.meeting.self.permissions.chatPublic.text;
@@ -268,25 +119,8 @@ const RtkChat = class {
268
119
  this.t = uiStore.useLanguage();
269
120
  /** UI Overrides */
270
121
  this.overrides = uiStore.defaultOverrides;
271
- /** disables private chat */
272
- this.disablePrivateChat = false;
273
122
  /** Can current user pin/unpin messages */
274
123
  this.canPinMessages = false;
275
- /**
276
- * @deprecated
277
- * Beta API, will change in future
278
- * List of target presets allowed as private chat recipient
279
- */
280
- this.privatePresetFilter = [];
281
- /**
282
- * @deprecated
283
- * Beta API, will change in future
284
- * A filter function for messages to be displayed
285
- */
286
- this.displayFilter = undefined;
287
- this.unreadCountGroups = {};
288
- this.chatGroups = { everyone: [] };
289
- this.selectedGroup = 'everyone';
290
124
  this.now = new Date();
291
125
  this.dropzoneActivated = false;
292
126
  this.showLatestMessageButton = false;
@@ -297,16 +131,13 @@ const RtkChat = class {
297
131
  this.canSendPrivateTexts = false;
298
132
  this.canSendPrivateFiles = false;
299
133
  this.emojiPickerEnabled = false;
300
- this.chatRecipientId = 'everyone';
301
134
  this.participants = [];
302
- this.channels = [];
303
135
  this.editingMessage = null;
304
136
  this.replyMessage = null;
305
137
  this.searchQuery = '';
306
138
  this.selectorState = 'hide';
307
- this.creatingChannel = false;
139
+ this.isSendingMessage = false;
308
140
  this.showPinnedMessages = false;
309
- this.channelMap = new Map();
310
141
  this.onDragOver = (e) => {
311
142
  e.preventDefault();
312
143
  this.dropzoneActivated = true;
@@ -334,55 +165,10 @@ const RtkChat = class {
334
165
  });
335
166
  };
336
167
  this.disconnectMeeting = (meeting) => {
337
- var _a, _b, _c, _d, _e, _f;
338
- if (this.isPrivateChatSupported()) {
339
- meeting === null || meeting === void 0 ? void 0 : meeting.participants.joined.removeListener('participantJoined', this.onParticipantUpdate);
340
- meeting === null || meeting === void 0 ? void 0 : meeting.participants.joined.removeListener('participantLeft', this.onParticipantUpdate);
341
- }
342
- (_a = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _a === void 0 ? void 0 : _a.removeListener('chatUpdate', this.chatUpdateListener);
343
- (_b = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _b === void 0 ? void 0 : _b.removeListener('channelCreate', this.onChannelCreateOrUpdate);
344
- (_c = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _c === void 0 ? void 0 : _c.removeListener('channelUpdate', this.onChannelCreateOrUpdate);
345
- (_d = meeting === null || meeting === void 0 ? void 0 : meeting.chat) === null || _d === void 0 ? void 0 : _d.removeListener('channelMessageUpdate', this.onChannelCreateOrUpdate);
346
- (_f = (_e = meeting === null || meeting === void 0 ? void 0 : meeting.participants) === null || _e === void 0 ? void 0 : _e.all) === null || _f === void 0 ? void 0 : _f.removeListener('participantsUpdate', this.onChannelCreateOrUpdate);
347
168
  meeting.self.permissions.removeListener('*', this.chatPermissionUpdateListener);
348
169
  };
349
- this.getFilteredParticipants = () => {
350
- if (this.privatePresetFilter.length === 0)
351
- return this.participants;
352
- return this.participants.filter((p) => this.privatePresetFilter.includes(p.presetName));
353
- };
354
- this.onParticipantUpdate = () => {
355
- this.participants = this.meeting.participants.joined
356
- .toArray()
357
- .filter((p) => this.privatePresetFilter.length === 0 || this.privatePresetFilter.includes(p.presetName));
358
- // if selected participant leaves, reset state to everyone
359
- if (this.selectedParticipant && !this.participants.includes(this.selectedParticipant)) {
360
- this.selectedParticipant = null;
361
- this.chatRecipientId = this.selectedGroup = 'everyone';
362
- }
363
- };
364
- this.updateUnreadCountGroups = (obj) => {
365
- this.unreadCountGroups = Object.assign(Object.assign({}, this.unreadCountGroups), obj);
366
- };
367
- this.isPrivateChatSupported = () => {
368
- return this.canPrivateMessage && !this.disablePrivateChat;
369
- };
370
- this.updateRecipients = (event) => {
371
- const { id } = event.detail;
372
- this.chatRecipientId = id;
373
- this.selectedParticipant = this.participants.find((p) => p.userId === id);
374
- if (this.chatRecipientId !== 'everyone') {
375
- const allParticipants = [this.chatRecipientId, this.meeting.self.userId];
376
- const targetKey = chat.generateChatGroupKey(allParticipants);
377
- this.selectedGroup = targetKey;
378
- }
379
- else {
380
- this.selectedGroup = 'everyone';
381
- }
382
- this.updateUnreadCountGroups({ [this.selectedGroup]: 0 });
383
- };
384
170
  this.isTextMessagingAllowed = () => {
385
- if (this.chatRecipientId === 'everyone') {
171
+ if (!this.selectedParticipant) {
386
172
  // public chat
387
173
  return this.canSend && this.canSendTextMessage;
388
174
  }
@@ -390,106 +176,36 @@ const RtkChat = class {
390
176
  return this.canPrivateMessage && this.canSendPrivateTexts;
391
177
  };
392
178
  this.isFileMessagingAllowed = () => {
393
- if (this.chatRecipientId === 'everyone') {
179
+ if (!this.selectedParticipant) {
394
180
  // public chat
395
181
  return this.canSend && this.canSendFiles;
396
182
  }
397
183
  // private chat
398
184
  return this.canPrivateMessage && this.canSendPrivateFiles;
399
185
  };
400
- this.onChannelChanged = (e) => {
401
- const channel = e.detail;
402
- if (channel.id.includes(chat.TEMPORARY_CHANNEL_PREFIX)) {
403
- this.createDMChannel(channel.id.replace(chat.TEMPORARY_CHANNEL_PREFIX, ''));
404
- }
405
- else {
406
- this.selectedChannelId = channel.id;
407
- }
408
- this.cleanup();
409
- if (this.selectorState !== 'desktop') {
410
- this.selectorState = 'hide';
411
- }
412
- };
413
- this.createDMChannel = async (memberId) => {
414
- this.creatingChannel = true;
415
- const newChannel = await this.meeting.chat.createChannel('Direct Message', [memberId], {
416
- visibility: 'private',
417
- isDirectMessage: true,
418
- });
419
- this.creatingChannel = false;
420
- this.selectedChannelId = newChannel.id;
421
- };
422
- this.cleanup = () => {
423
- this.editingMessage = null;
424
- this.replyMessage = null;
425
- this.searchQuery = '';
426
- };
427
186
  this.onQuotedMessageDismiss = () => {
428
187
  this.replyMessage = null;
429
188
  };
430
- this.onChannelCreateOrUpdate = (channel) => {
431
- if (channel) {
432
- this.channelMap.set(channel.id, channel);
433
- }
434
- else {
435
- this.meeting.chat.channels.forEach((chan) => this.channelMap.set(chan.id, chan));
436
- }
437
- const allChannels = Array.from(this.channelMap.values());
438
- const channels = allChannels
439
- .filter((channel) => !chat.isDirectMessageChannel(channel))
440
- .sort((a, b) => chat.alphabeticalSorter(a.displayName, b.displayName));
441
- const membersWithChannel = allChannels.filter(chat.isDirectMessageChannel).map((channel) => {
442
- return Object.assign(Object.assign({}, channel), { displayName: this.getMemberDisplayName(channel) });
443
- });
444
- const membersWithoutChannel = this.meeting.participants.all
445
- .toArray()
446
- .filter((member) => {
447
- if (member.userId === this.meeting.self.userId)
448
- return false;
449
- const matcher = chat.getDMComparator([this.meeting.self.userId, member.userId]);
450
- return membersWithChannel.every((channel) => chat.getDMComparator(channel.memberIds) !== matcher);
451
- })
452
- .map((member) => {
453
- return {
454
- id: `${chat.TEMPORARY_CHANNEL_PREFIX}${member.userId}`,
455
- displayName: member.name,
456
- displayPictureUrl: member.picture,
457
- isDirectMessage: true,
458
- unreadCount: 0,
459
- };
460
- });
461
- const dms = [...membersWithChannel, ...membersWithoutChannel].sort((a, b) => chat.alphabeticalSorter(a.displayName, b.displayName));
462
- this.channels = [...channels, ...dms];
463
- // select channel only if it is created in db
464
- const nonTemporaryChannel = [...channels, ...membersWithChannel];
465
- if (!this.selectedChannelId && nonTemporaryChannel.length !== 0) {
466
- this.selectedChannelId = nonTemporaryChannel[0].id;
467
- }
468
- };
469
- this.getMemberDisplayName = (channel) => {
470
- var _a;
471
- let id;
472
- if (channel.memberIds.length === 1) {
473
- // channel with self
474
- id = channel.memberIds[0];
475
- }
476
- else {
477
- id =
478
- channel.memberIds[0] === this.meeting.self.userId
479
- ? channel.memberIds[1]
480
- : channel.memberIds[0];
481
- }
482
- const member = this.meeting.participants.all.toArray().find((member) => member.userId === id);
483
- return (_a = member === null || member === void 0 ? void 0 : member.name) !== null && _a !== void 0 ? _a : id;
484
- };
485
189
  this.onNewMessageHandler = async (e) => {
486
190
  const message = e.detail;
487
- this.meeting.chat.sendMessage(message, this.getRecipientPeerIds());
191
+ this.isSendingMessage = true;
192
+ try {
193
+ await this.meeting.chat.sendMessage(message, this.getRecipientPeerIds());
194
+ }
195
+ finally {
196
+ this.isSendingMessage = false;
197
+ }
488
198
  };
489
199
  this.onEditMessageHandler = async (e) => {
490
200
  var _a, _b;
491
- await ((_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.chat) === null || _b === void 0 ? void 0 : _b.editTextMessage(this.editingMessage.id, e.detail, this.editingMessage.channelId));
492
- this.editingMessage = null;
201
+ this.isSendingMessage = true;
202
+ try {
203
+ await ((_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.chat) === null || _b === void 0 ? void 0 : _b.editTextMessage(this.editingMessage.id, e.detail));
204
+ }
205
+ finally {
206
+ this.isSendingMessage = false;
207
+ this.editingMessage = null;
208
+ }
493
209
  };
494
210
  this.onEditCancel = () => {
495
211
  this.editingMessage = null;
@@ -504,7 +220,26 @@ const RtkChat = class {
504
220
  }
505
221
  };
506
222
  this.onDeleteMessage = (event) => {
223
+ var _a;
507
224
  const message = event.detail;
225
+ if (((_a = this.editingMessage) === null || _a === void 0 ? void 0 : _a.id) === message.id) {
226
+ this.editingMessage = null;
227
+ }
228
+ try {
229
+ if (typeof localStorage !== 'undefined') {
230
+ const keysToRemove = [];
231
+ for (let i = 0; i < localStorage.length; i++) {
232
+ const key = localStorage.key(i);
233
+ if (key && key.startsWith('rtk-chat-edit-') && key.endsWith(`-${message.id}`)) {
234
+ keysToRemove.push(key);
235
+ }
236
+ }
237
+ keysToRemove.forEach((key) => localStorage.removeItem(key));
238
+ }
239
+ }
240
+ catch (_b) {
241
+ // ignore storage access errors
242
+ }
508
243
  this.meeting.chat.deleteMessage(message.id);
509
244
  };
510
245
  this.onMessageEdit = (event) => {
@@ -514,45 +249,6 @@ const RtkChat = class {
514
249
  this.replyMessage = null;
515
250
  this.editingMessage = message;
516
251
  };
517
- this.getPrivateChatRecipients = () => {
518
- const participants = this.getFilteredParticipants().map((participant) => {
519
- const key = chat.generateChatGroupKey([participant.userId, this.meeting.self.userId]);
520
- const result = {
521
- id: participant.userId,
522
- name: participant.name,
523
- avatarUrl: participant.picture,
524
- unreadCount: this.unreadCountGroups[key],
525
- };
526
- return result;
527
- });
528
- const everyone = {
529
- id: 'everyone',
530
- name: this.t('chat.everyone'),
531
- icon: 'participants',
532
- unreadCount: this.unreadCountGroups['everyone'],
533
- };
534
- return [everyone, ...participants];
535
- };
536
- this.getPinnedMessageLabel = (message) => {
537
- if (message.type === 'text')
538
- return message.message;
539
- if (message.type === 'image')
540
- return 'Image';
541
- if (message.type === 'file')
542
- return 'File';
543
- return '';
544
- };
545
- this.renderPinnedMessagesHeader = () => {
546
- if (this.meeting.chat.pinned.length === 0)
547
- return null;
548
- /**
549
- * We do not display a picture against the avatar because the chatMessage API does not provide it.
550
- */
551
- return (index$1.h("div", { class: "pinned-messages" }, index$1.h("div", { class: "pinned-messages-header", onClick: () => (this.showPinnedMessages = !this.showPinnedMessages) }, index$1.h("div", null, index$1.h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }), this.t('chat.pinned_msgs'), ` (${this.meeting.chat.pinned.length})`), index$1.h("rtk-icon", { icon: this.showPinnedMessages ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" })), this.showPinnedMessages && (index$1.h("div", { class: "pinned-messages-content" }, this.meeting.chat.pinned.map((message) => {
552
- const label = this.getPinnedMessageLabel(message);
553
- return (index$1.h("div", { class: "pinned-message" }, index$1.h("rtk-avatar", { class: "pinned-message-avatar", participant: { name: message.displayName, picture: '' }, size: "sm" }), index$1.h("span", null, label.length > 20 ? `${label.substring(0, 20)}...` : label)));
554
- })))));
555
- };
556
252
  }
557
253
  connectedCallback() {
558
254
  if (!this.meeting)
@@ -575,6 +271,16 @@ const RtkChat = class {
575
271
  this.editingMessage = event.detail.payload;
576
272
  }
577
273
  }
274
+ onChatSelectorChange(event) {
275
+ var _a;
276
+ const selectedUser = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.selectedUser;
277
+ // Everyone
278
+ if (!selectedUser) {
279
+ this.selectedParticipant = null;
280
+ return;
281
+ }
282
+ this.selectedParticipant = selectedUser;
283
+ }
578
284
  disconnectedCallback() {
579
285
  var _a;
580
286
  (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
@@ -584,7 +290,7 @@ const RtkChat = class {
584
290
  this.host.removeEventListener('drop', this.onDrop);
585
291
  }
586
292
  meetingChanged(meeting, oldMeeting) {
587
- var _a, _b, _c, _d, _e, _f;
293
+ var _a, _b, _c, _d;
588
294
  if (oldMeeting != undefined)
589
295
  this.disconnectMeeting(oldMeeting);
590
296
  if (meeting && !meeting.chat)
@@ -597,97 +303,16 @@ const RtkChat = class {
597
303
  ((_b = meeting.self.permissions.chatPrivate) === null || _b === void 0 ? void 0 : _b.canReceive));
598
304
  this.canSendPrivateTexts = !!((_c = meeting.self.permissions.chatPrivate) === null || _c === void 0 ? void 0 : _c.text);
599
305
  this.canSendPrivateFiles = !!((_d = meeting.self.permissions.chatPrivate) === null || _d === void 0 ? void 0 : _d.files);
600
- this.canPinMessages =
601
- ((_e = meeting === null || meeting === void 0 ? void 0 : meeting.__internals__) === null || _e === void 0 ? void 0 : _e.features.hasFeature(uiStore.FlagsmithFeatureFlags.PINNED_MESSAGES)) &&
602
- meeting.self.permissions.pinParticipant;
603
- this.initializeChatGroups();
604
- // shallow copy to trigger render
605
- this.chatGroups = Object.assign({}, this.chatGroups);
606
306
  meeting.self.permissions.on('*', this.chatPermissionUpdateListener);
607
- this.onParticipantUpdate();
608
- (_f = meeting.chat) === null || _f === void 0 ? void 0 : _f.addListener('chatUpdate', this.chatUpdateListener);
609
- if (this.isPrivateChatSupported()) {
610
- meeting.participants.joined.addListener('participantJoined', this.onParticipantUpdate);
611
- meeting.participants.joined.addListener('participantLeft', this.onParticipantUpdate);
612
- }
613
- }
614
- }
615
- chatGroupsChanged(chatGroups) {
616
- var _a, _b;
617
- if (!this.isPrivateChatSupported()) {
618
- return;
619
- }
620
- const unreadCounts = {};
621
- for (const key in chatGroups) {
622
- const lastReadTimestamp = (_a = uiStore.chatUnreadTimestamps[key]) !== null && _a !== void 0 ? _a : 0;
623
- unreadCounts[key] = chatGroups[key].filter((c) => c.type == 'chat' &&
624
- c.message.time > lastReadTimestamp &&
625
- c.message.userId !== this.meeting.self.userId).length;
626
- if (key ===
627
- chat.generateChatGroupKey([this.meeting.self.userId, (_b = this.selectedParticipant) === null || _b === void 0 ? void 0 : _b.userId]) ||
628
- (key === 'everyone' && this.selectedParticipant === null)) {
629
- unreadCounts[key] = 0;
630
- uiStore.chatUnreadTimestamps[key] = new Date();
631
- }
632
- }
633
- this.updateUnreadCountGroups(unreadCounts);
634
- }
635
- initializeChatGroups() {
636
- var _a;
637
- (_a = this.meeting.chat) === null || _a === void 0 ? void 0 : _a.messages.forEach((message) => {
638
- if (!this.displayFilter || this.displayFilter(message)) {
639
- this.addToChatGroup(message);
640
- }
641
- });
642
- }
643
- onDisplayFilterChanged(newFilter, oldFilter) {
644
- if (newFilter !== oldFilter) {
645
- this.chatGroups = {};
646
- this.initializeChatGroups();
647
- }
648
- }
649
- addToChatGroup(message) {
650
- var _a;
651
- const parsedMessage = chat.parseMessageForTarget(message);
652
- let key = 'everyone';
653
- if (((_a = parsedMessage.targetUserIds) === null || _a === void 0 ? void 0 : _a.length) > 0) {
654
- const allParticipants = new Set([
655
- parsedMessage.userId,
656
- ...parsedMessage.targetUserIds,
657
- ]);
658
- key = chat.generateChatGroupKey(Array.from(allParticipants));
659
- }
660
- if (this.chatGroups[key] === undefined)
661
- this.chatGroups[key] = [];
662
- let isEditedMessage = false;
663
- let messages = [];
664
- this.chatGroups[key].forEach((chat) => {
665
- if (chat.type === 'chat' && chat.message.id === message.id) {
666
- isEditedMessage = true;
667
- messages.push({ type: 'chat', message: parsedMessage });
668
- }
669
- else {
670
- messages.push(chat);
671
- }
672
- });
673
- if (!isEditedMessage) {
674
- messages.push({ type: 'chat', message: parsedMessage });
675
307
  }
676
- this.chatGroups[key] = messages;
677
308
  }
678
309
  getRecipientPeerIds() {
679
- let peerIds = [];
680
- if (this.chatRecipientId !== 'everyone') {
681
- peerIds = [this.selectedParticipant.id];
682
- }
683
- return peerIds;
684
- }
685
- channelSwitchListener(e) {
686
- this.onChannelChanged(e);
310
+ if (!this.selectedParticipant)
311
+ return [];
312
+ return [this.selectedParticipant.id];
687
313
  }
688
314
  renderComposerUI() {
689
- var _a;
690
- if (this.chatRecipientId === 'everyone') {
315
+ if (!this.selectedParticipant) {
691
316
  if (!this.canSendTextMessage && !this.canSendFiles)
692
317
  return null;
693
318
  }
@@ -698,42 +323,37 @@ const RtkChat = class {
698
323
  const uiProps = { iconPack: this.iconPack, t: this.t, size: this.size };
699
324
  const message = this.editingMessage ? this.editingMessage.message : '';
700
325
  const quotedMessage = this.replyMessage ? this.replyMessage.message : '';
701
- const draftStorageKey = this.selectedChannelId
702
- ? `rtk-chat-draft-${this.selectedChannelId}`
703
- : 'rtk-chat-draft';
326
+ const draftStorageKey = 'rtk-chat-draft';
704
327
  const editStorageKey = this.editingMessage
705
- ? `rtk-chat-edit-${(_a = this.selectedChannelId) !== null && _a !== void 0 ? _a : 'no-channel'}-${this.editingMessage.id}`
328
+ ? `rtk-chat-edit-${'no-channel'}-${this.editingMessage.id}`
706
329
  : 'rtk-chat-edit';
707
330
  const storageKey = this.editingMessage ? editStorageKey : draftStorageKey;
708
- return (index$1.h("rtk-chat-composer-view", Object.assign({ message: message, storageKey: storageKey, quotedMessage: quotedMessage, isEditing: !!this.editingMessage, canSendTextMessage: this.isTextMessagingAllowed(), canSendFiles: this.isFileMessagingAllowed(), disableEmojiPicker: this.overrides.disableEmojiPicker, maxLength: this.meeting.chat.maxTextLimit, rateLimits: this.meeting.chat.rateLimits, inputTextPlaceholder: this.t('chat.message_placeholder'), onNewMessage: this.onNewMessageHandler, onEditMessage: this.onEditMessageHandler, onEditCancel: this.onEditCancel, onQuotedMessageDismiss: this.onQuotedMessageDismiss }, uiProps), index$1.h("slot", { name: "chat-addon", slot: "chat-addon" })));
331
+ return (index$1.h("rtk-chat-composer-view", Object.assign({ message: message, storageKey: storageKey, quotedMessage: quotedMessage, isEditing: !!this.editingMessage, isSending: this.isSendingMessage, canSendTextMessage: this.isTextMessagingAllowed(), canSendFiles: this.isFileMessagingAllowed(), disableEmojiPicker: this.overrides.disableEmojiPicker, maxLength: this.meeting.chat.maxTextLimit, rateLimits: this.meeting.chat.rateLimits, inputTextPlaceholder: this.t('chat.message_placeholder'), onNewMessage: this.onNewMessageHandler, onEditMessage: this.onEditMessageHandler, onEditCancel: this.onEditCancel, onQuotedMessageDismiss: this.onQuotedMessageDismiss }, uiProps), index$1.h("slot", { name: "chat-addon", slot: "chat-addon" })));
709
332
  }
710
333
  render() {
711
- var _a;
712
334
  if (!this.meeting) {
713
335
  return null;
714
336
  }
715
- return (index$1.h(index$1.Host, null, index$1.h("div", { class: "chat-container" }, index$1.h("div", { class: "chat" }, this.isFileMessagingAllowed() && (index$1.h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, index$1.h("rtk-icon", { icon: this.iconPack.attach }), index$1.h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), this.isPrivateChatSupported() && (index$1.h("rtk-channel-selector-view", { channels: this.getPrivateChatRecipients(), selectedChannelId: ((_a = this.selectedParticipant) === null || _a === void 0 ? void 0 : _a.userId) || 'everyone', onChannelChange: this.updateRecipients, t: this.t, viewAs: "dropdown" })), index$1.h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, onPinMessage: this.onPinMessage, onEditMessage: this.onMessageEdit, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
337
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: "chat-container" }, index$1.h("div", { class: "chat" }, this.isFileMessagingAllowed() && (index$1.h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, index$1.h("rtk-icon", { icon: this.iconPack.attach }), index$1.h("p", null, this.t('chat.send_attachment')))), index$1.h("rtk-chat-header", null), index$1.h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, privateChatRecipient: this.selectedParticipant, onPinMessage: this.onPinMessage, onEditMessage: this.onMessageEdit, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
716
338
  }
717
339
  get host() { return index$1.getElement(this); }
718
340
  static get watchers() { return {
719
- "meeting": ["meetingChanged"],
720
- "chatGroups": ["chatGroupsChanged"],
721
- "displayFilter": ["onDisplayFilterChanged"]
341
+ "meeting": ["meetingChanged"]
722
342
  }; }
723
343
  };
724
- __decorate$f([
344
+ __decorate$h([
725
345
  index.SyncWithStore()
726
346
  ], RtkChat.prototype, "meeting", void 0);
727
- __decorate$f([
347
+ __decorate$h([
728
348
  index.SyncWithStore()
729
349
  ], RtkChat.prototype, "config", void 0);
730
- __decorate$f([
350
+ __decorate$h([
731
351
  index.SyncWithStore()
732
352
  ], RtkChat.prototype, "iconPack", void 0);
733
- __decorate$f([
353
+ __decorate$h([
734
354
  index.SyncWithStore()
735
355
  ], RtkChat.prototype, "t", void 0);
736
- __decorate$f([
356
+ __decorate$h([
737
357
  index.SyncWithStore()
738
358
  ], RtkChat.prototype, "overrides", void 0);
739
359
  RtkChat.style = RtkChatStyle0;
@@ -741,7 +361,7 @@ RtkChat.style = RtkChatStyle0;
741
361
  const rtkChatComposerViewCss = ":host {\n display: flex;\n flex-direction: column;\n font-family: var(--rtk-font-family, sans-serif);\n font-size: 14px;\n position: relative;\n}\n\n.quoted-message-container {\n margin-bottom: var(--rtk-space-2, 8px);\n display: flex;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n border-radius: var(--rtk-border-radius-md, 8px);\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.quoted-message-container .quoted-message {\n flex: 1 1 0%;\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n max-height: var(--rtk-space-24, 96px);\n overflow-y: auto;\n word-break: break-all;\n}\n\n.quoted-message-container .quoted-message blockquote {\n display: none;\n}\n\n.quoted-message-container rtk-icon.dismiss {\n margin-left: auto;\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n}\n\n.quoted-message-container rtk-icon.dismiss:hover {\n cursor: pointer;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.quoted-message-container rtk-icon.dismiss {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.composer-container {\n position: relative;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n border-radius: var(--rtk-border-radius-md, 8px);\n overflow: hidden;\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.composer-container > .composers {\n min-height: 60px;\n }\n\n@container chatcontainer (height < 360px) {\n .composer-container > .composers {\n min-height: 30px;\n }\n}\n\n.chat-buttons {\n padding: var(--rtk-space-3, 12px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.chat-buttons .right {\n z-index: 10;\n}\n\n.chat-buttons .right .edit-buttons {\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.chat-buttons > div {\n display: flex;\n align-items: center;\n}\n\nrtk-emoji-picker {\n z-index: 20;\n position: absolute;\n top: calc(var(--rtk-space-72, 288px) * -1);\n border-top: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n animation: 0.3s slide-up ease;\n}\n\n@keyframes slide-up {\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
742
362
  const RtkChatComposerViewStyle0 = rtkChatComposerViewCss;
743
363
 
744
- var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
364
+ var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
745
365
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
746
366
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
747
367
  r = Reflect.decorate(decorators, target, key, desc);
@@ -764,6 +384,7 @@ const RtkChatComposerView = class {
764
384
  this.onQuotedMessageDismiss = index$1.createEvent(this, "quotedMessageDismiss", 7);
765
385
  /** Whether user can send text messages */
766
386
  this.canSendTextMessage = true;
387
+ this.isSending = false;
767
388
  /** Whether user can send file messages */
768
389
  this.canSendFiles = true;
769
390
  /** Message to be pre-populated */
@@ -824,15 +445,7 @@ const RtkChatComposerView = class {
824
445
  messageLimits.messagesSent += 1;
825
446
  this.checkRateLimitBreached(currentTime);
826
447
  if (message.length > 0) {
827
- if (this.quotedMessage.length !== 0) {
828
- this.onNewMessage.emit({
829
- type: 'text',
830
- message,
831
- });
832
- }
833
- else {
834
- this.onNewMessage.emit({ type: 'text', message });
835
- }
448
+ this.onNewMessage.emit({ type: 'text', message });
836
449
  this.cleanup();
837
450
  }
838
451
  };
@@ -916,31 +529,56 @@ const RtkChatComposerView = class {
916
529
  render() {
917
530
  var _a;
918
531
  const uiProps = { iconPack: this.iconPack, t: this.t };
919
- return (index$1.h(index$1.Host, { key: '06455539e3067eb1c1c592b551d0ef99eba2f331' }, this.canSendTextMessage && this.isEmojiPickerOpen && (index$1.h("rtk-emoji-picker", Object.assign({ key: 'fe83b0ab9562cc0e1c61f89e4b441ef592edfa1a', part: "emoji-picker", onPickerClose: () => {
532
+ return (index$1.h(index$1.Host, { key: '2df23422579c855ced1cb6d24bb95786a1326baf' }, this.canSendTextMessage && this.isEmojiPickerOpen && (index$1.h("rtk-emoji-picker", Object.assign({ key: 'a7ed280a636d0207f58f0ad13f79c1eaed52ab9c', part: "emoji-picker", onPickerClose: () => {
920
533
  this.isEmojiPickerOpen = false;
921
534
  }, onRtkEmojiClicked: (e) => {
922
535
  this.textMessage += e.detail;
923
536
  this.$textComposer.setText(this.textMessage, true);
924
- } }, uiProps))), index$1.h("slot", { key: '8653c2e805e41adf5958941cc10ff01d43f97792', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (index$1.h("div", { key: '82b9bf5203a799709e980d61ab827b9daf8292e6', class: "quoted-message-container", part: "quoted-message-container" }, index$1.h("div", { key: '4b9fe8f382da7075e815c329f2d7dca17ce0f694', class: "quoted-message scrollbar" }, index$1.h("rtk-text-message-view", { key: '7a16547e83d9bca43794e46e56c5a9c743a9929a', text: this.quotedMessage, isMarkdown: true })), index$1.h("div", { key: '5691b8d882016cda66cd2faf3858bc38cd53458c' }, index$1.h("rtk-icon", { key: '2d5b222bd5eaac6d46812b704674f52f86efdb92', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), index$1.h("div", { key: 'd7638411df9ae1b2cbef8cae66d0af2b7ad310e6', class: "composer-container" }, index$1.h("div", { key: 'ca1ee222584fdd27e53989d28b6ce583c6b0c400', class: "composers" }, this.fileToUpload && (index$1.h("rtk-draft-attachment-view", Object.assign({ key: 'd511c900c71a97f8f92640b73a7575dcd267de88' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (index$1.h("rtk-text-composer-view", { key: '08f214184853dcedeccb5f07dac2a0a308269793', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : chat.MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), index$1.h("div", { key: '9b6cbe7cb8529c8e60f8cc9e13cc95ca64504efc', class: "chat-buttons", part: "chat-buttons" }, index$1.h("div", { key: '30e24e8edf58179ef20ccd436d3833ba177ebb0d', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (index$1.h("div", { key: '54ad294bedab1c0bc7c02a72c4f3f51bc10bba85' }, this.canSendFiles && [
925
- index$1.h("rtk-file-picker-button", Object.assign({ key: '1a0760e05a183b6c8da2ff02e33ecd40bfdb6e97' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
926
- index$1.h("rtk-file-picker-button", Object.assign({ key: '5d6cf1928c8edb6737b367807c93152ad62cea36', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
927
- ], this.canSendTextMessage && !this.disableEmojiPicker && (index$1.h("rtk-emoji-picker-button", Object.assign({ key: '50f14152b8d15009104e9b1dd05ee5e1ec49ab16', isActive: this.isEmojiPickerOpen, onClick: () => {
537
+ } }, uiProps))), index$1.h("slot", { key: '759df2a2029fbba963cfc26cd871771881dd6c5e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (index$1.h("div", { key: '413be05a7374fc76f790ad3f6f5bef5a56a6ef97', class: "quoted-message-container", part: "quoted-message-container" }, index$1.h("div", { key: '7fb6b571103c675dca202b74bd07fd55062dab70', class: "quoted-message scrollbar" }, index$1.h("rtk-text-message-view", { key: '3997aa719a746234c5641e976dd0c27e68b69dae', text: this.quotedMessage, isMarkdown: true })), index$1.h("div", { key: 'f76ec54e3d67d6957d5d152b144b22d8cc122660' }, index$1.h("rtk-icon", { key: '897b52fc41814d2cb8beeb461c36c9843cb2869e', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), index$1.h("div", { key: '35447eb1fffffd372c231bc76ce741e483e7f26a', class: "composer-container" }, index$1.h("div", { key: '0f8f198df49fcc27f6c85b8d6909eb2a7c00e142', class: "composers" }, this.fileToUpload && (index$1.h("rtk-draft-attachment-view", Object.assign({ key: '9d325d05fecb12ecb41f02e54561d2e1b59b2c2f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (index$1.h("rtk-text-composer-view", { key: 'fbc870bb9d9c2418e528e64273edb67846e23e17', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : chat.MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), index$1.h("div", { key: '20191403531eb87bca86d13387c7937153a4c99e', class: "chat-buttons", part: "chat-buttons" }, index$1.h("div", { key: '4914a61fea3f502dc14778a237e9ce35a97e3afc', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (index$1.h("div", { key: '76c843588f2f7d90f5e60a1e44955309026eda27' }, this.canSendFiles && [
538
+ index$1.h("rtk-file-picker-button", Object.assign({ key: 'cbb6f17b22f10b48ada27a4b4da3c1d5b2c7e320' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
539
+ index$1.h("rtk-file-picker-button", Object.assign({ key: '0868162a2da021dd4175e977adf47d72ca54044a', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
540
+ ], this.canSendTextMessage && !this.disableEmojiPicker && (index$1.h("rtk-emoji-picker-button", Object.assign({ key: 'a73378b5495dc3bfcde7dba335f674292ee6a96c', isActive: this.isEmojiPickerOpen, onClick: () => {
928
541
  this.isEmojiPickerOpen = !this.isEmojiPickerOpen;
929
- } }, uiProps))), index$1.h("slot", { key: '1e1fe81e1e196fc8d679bfc2d6ed0c6402c74a4a', name: "chat-buttons" })))), index$1.h("div", { key: '272526b7c81ed1acd028beceb3869c584e94308f', class: "right", part: "chat-buttons-right" }, !this.isEditing && (index$1.h("rtk-tooltip", { key: '6750abf323b2f1c951661c44390eb97d3ec71544', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, index$1.h("rtk-button", { key: 'a159fa6dcc1f8ede64085abd8286a69ad86b7002', kind: "icon", disabled: this.disableSendButton, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, index$1.h("rtk-icon", { key: 'bb26a3a7954727859f5566ecc60d746ac6700b7b', icon: this.iconPack.send })))), this.isEditing && (index$1.h("div", { key: '5ef512e3fc236510a518e76ce027f0c8fc1c9a0c', class: "edit-buttons" }, index$1.h("rtk-tooltip", { key: 'e18ae7567350d32b18a70de8cb2c1af0830353bc', variant: "secondary", label: this.t('cancel'), delay: 2000 }, index$1.h("rtk-button", { key: '4f4aa2e44308a393314ab95244c87a3b8d4b282c', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, index$1.h("rtk-icon", { key: 'a4a99fe9ae34707cb63f63461a4728baf70e3e7a', icon: this.iconPack.dismiss }))), index$1.h("rtk-tooltip", { key: '789315dbf551ba74d004459981532fa9a467ac45', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, index$1.h("rtk-button", { key: '61da43993c2da9b8bd00796544030e9b4cb45f12', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, index$1.h("rtk-icon", { key: 'e45aab29b0f6553ed2d7f370a8817bdccdabe42e', icon: this.iconPack.checkmark }))))))))));
542
+ } }, uiProps))), index$1.h("slot", { key: '31208ad279dec430da4527d22730de8e418bc722', name: "chat-buttons" })))), index$1.h("div", { key: '04fcdd3f690548cbf1e257ffb2982785e557726b', class: "right", part: "chat-buttons-right" }, !this.isEditing && (index$1.h("rtk-tooltip", { key: '367bf710673a0a2276f46d52289409abb77fe27b', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, index$1.h("rtk-button", { key: 'c677e3026636c375ed7eee411c596f6d2a802794', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (index$1.h("rtk-spinner", { size: "sm" })) : (index$1.h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (index$1.h("div", { key: '1e09e8868e4ae048b36bc8198b8aa1de92209a00', class: "edit-buttons" }, index$1.h("rtk-tooltip", { key: '29ff7a39bd168169fa7d104357b529a2c9efe0fd', variant: "secondary", label: this.t('cancel'), delay: 2000 }, index$1.h("rtk-button", { key: '27cf5353d0e8c2620fd8d4213994a9dcc83f83f3', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, index$1.h("rtk-icon", { key: 'aeb4c9df3993c6cebf952f64f6676eb8a3866bb0', icon: this.iconPack.dismiss }))), index$1.h("rtk-tooltip", { key: '835195d0f51a1db81e66a1b2d9076a71f2aaee4e', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, index$1.h("rtk-button", { key: 'd524f01ba5d7ca52224d39e23e7f963972ad80c9', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (index$1.h("rtk-spinner", { size: "sm" })) : (index$1.h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
930
543
  }
931
544
  };
932
- __decorate$e([
545
+ __decorate$g([
933
546
  index.SyncWithStore()
934
547
  ], RtkChatComposerView.prototype, "iconPack", void 0);
935
- __decorate$e([
548
+ __decorate$g([
936
549
  index.SyncWithStore()
937
550
  ], RtkChatComposerView.prototype, "t", void 0);
938
551
  RtkChatComposerView.style = RtkChatComposerViewStyle0;
939
552
 
553
+ const rtkChatHeaderCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;width:100%;flex-direction:column;gap:var(--rtk-space-2, 8px);font-size:14px;z-index:10;margin-bottom:var(--rtk-space-2, 8px);box-sizing:border-box;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.chat-header{position:relative;margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));border-radius:var(--rtk-border-radius-sm, 4px);overflow:hidden;border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));cursor:pointer}.chat-header-label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px)}";
554
+ const RtkChatHeaderStyle0 = rtkChatHeaderCss;
555
+
556
+ const RtkChatHeader = class {
557
+ constructor(hostRef) {
558
+ index$1.registerInstance(this, hostRef);
559
+ this.onPinnedToggle = async (e) => {
560
+ var _a, _b, _c;
561
+ if ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.open) {
562
+ await ((_c = (_b = this.$chatSelector) === null || _b === void 0 ? void 0 : _b.close) === null || _c === void 0 ? void 0 : _c.call(_b));
563
+ }
564
+ };
565
+ this.onChatToggle = async (e) => {
566
+ var _a, _b, _c;
567
+ if ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.open) {
568
+ await ((_c = (_b = this.$pinnedSelector) === null || _b === void 0 ? void 0 : _b.close) === null || _c === void 0 ? void 0 : _c.call(_b));
569
+ }
570
+ };
571
+ }
572
+ render() {
573
+ return (index$1.h(index$1.Host, { key: 'af9956ff6e693f29fb63a6180ef773a0e64822e5' }, index$1.h("rtk-pinned-message-selector", { key: 'b0d9199d02d84453f8ee26c3a47e00c82047e4f6', ref: (el) => (this.$pinnedSelector = el), onRtkDropdownToggle: this.onPinnedToggle }), index$1.h("rtk-chat-selector", { key: '4d019562a85ebfeaf4ceae2e99d1b9c8c282127a', ref: (el) => (this.$chatSelector = el), onRtkDropdownToggle: this.onChatToggle })));
574
+ }
575
+ };
576
+ RtkChatHeader.style = RtkChatHeaderStyle0;
577
+
940
578
  const rtkChatMessagesUiPaginatedCss = ":host{display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));flex:1 0 0px}";
941
579
  const RtkChatMessagesUiPaginatedStyle0 = rtkChatMessagesUiPaginatedCss;
942
580
 
943
- var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
581
+ var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
944
582
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
945
583
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
946
584
  r = Reflect.decorate(decorators, target, key, desc);
@@ -962,31 +600,37 @@ const RtkChatMessagesUiPaginated = class {
962
600
  this.iconPack = uiStore.defaultIconPack;
963
601
  /** Language */
964
602
  this.t = uiStore.useLanguage();
965
- /** Whether to align chat bubbles to the left */
966
- this.leftAlign = false;
967
603
  this.permissionsChanged = false;
968
604
  this.pageSize = 25;
969
- this.lastReadMessageIndex = -1;
970
605
  this.permissionsUpdateListener = () => {
971
606
  this.permissionsChanged = !this.permissionsChanged;
972
607
  };
973
- this.maybeMarkChannelAsRead = (messages) => {
974
- if (!this.selectedChannelId)
975
- return;
976
- if (messages.length === 0)
977
- return;
978
- if (this.lastReadMessageIndex !== -1)
979
- return;
980
- const latestMsg = messages.at(0).time > messages.at(-1).time ? messages.at(0) : messages.at(-1);
981
- if (!latestMsg.channelIndex)
982
- return;
983
- this.lastReadMessageIndex = parseInt(latestMsg.channelIndex, 10);
984
- this.meeting.chat.markLastReadMessage(this.selectedChannelId, latestMsg);
985
- };
986
608
  this.getChatMessages = async (timestamp, size, reversed) => {
987
- const { messages } = await this.meeting.chat.getMessages(timestamp, size, reversed, undefined, this.selectedChannelId);
988
- this.maybeMarkChannelAsRead(messages);
989
- return messages;
609
+ if (this.privateChatRecipient) {
610
+ try {
611
+ const messages = await this.meeting.chat.fetchPrivateMessages({
612
+ timestamp,
613
+ limit: size,
614
+ direction: reversed ? 'before' : 'after',
615
+ userId: this.privateChatRecipient.userId,
616
+ });
617
+ return messages;
618
+ }
619
+ catch (err) {
620
+ return [];
621
+ }
622
+ }
623
+ try {
624
+ const messages = await this.meeting.chat.fetchPublicMessages({
625
+ timestamp,
626
+ limit: size,
627
+ direction: reversed ? 'before' : 'after',
628
+ });
629
+ return messages;
630
+ }
631
+ catch (err) {
632
+ return [];
633
+ }
990
634
  };
991
635
  this.createChatNodes = (data) => {
992
636
  /**
@@ -994,8 +638,11 @@ const RtkChatMessagesUiPaginated = class {
994
638
  * will fail in current implementation
995
639
  */
996
640
  return data.map((message, idx) => {
997
- var _a;
641
+ var _a, _b;
998
642
  const isContinued = message.userId === ((_a = data[idx - 1]) === null || _a === void 0 ? void 0 : _a.userId);
643
+ // FIXME(ikabra): Socket sends private messages sent to the recipient as a part of public messages
644
+ if (!this.privateChatRecipient && ((_b = message.targetUserIds) === null || _b === void 0 ? void 0 : _b.length) > 0)
645
+ return;
999
646
  return this.createChatNode(message, isContinued);
1000
647
  });
1001
648
  };
@@ -1005,13 +652,17 @@ const RtkChatMessagesUiPaginated = class {
1005
652
  (_b = this.meeting) === null || _b === void 0 ? void 0 : _b.self.permissions.removeListener('permissionsUpdate', this.permissionsUpdateListener);
1006
653
  };
1007
654
  this.getMessageActions = (message) => {
655
+ var _a;
1008
656
  const actions = [];
1009
657
  const messageBelongsToSelf = message.userId === this.meeting.self.userId;
1010
- actions.push({
1011
- id: 'pin_message',
1012
- label: message.pinned ? this.t('unpin') : this.t('pin'),
1013
- icon: this.iconPack.pin,
1014
- });
658
+ const isPrivateMessage = ((_a = message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length) > 0;
659
+ if (!isPrivateMessage) {
660
+ actions.push({
661
+ id: 'pin_message',
662
+ label: message.pinned ? this.t('unpin') : this.t('pin'),
663
+ icon: this.iconPack.pin,
664
+ });
665
+ }
1015
666
  if (messageBelongsToSelf) {
1016
667
  actions.push({
1017
668
  id: 'edit_message',
@@ -1041,8 +692,6 @@ const RtkChatMessagesUiPaginated = class {
1041
692
  };
1042
693
  this.createChatNode = (message, isContinued) => {
1043
694
  var _a, _b, _c, _d;
1044
- if (message.targetUserIds.length !== 0)
1045
- return null; // don't render private messages
1046
695
  let displayPicture;
1047
696
  if (this.meeting.meta.viewType === 'CHAT') {
1048
697
  displayPicture = (_a = this.meeting.participants.all
@@ -1062,17 +711,23 @@ const RtkChatMessagesUiPaginated = class {
1062
711
  }
1063
712
  const isSelf = message.userId === this.meeting.self.userId;
1064
713
  const viewType = isSelf ? 'outgoing' : 'incoming';
1065
- return (index$1.h("div", null, index$1.h("div", { class: "message-wrapper", id: message.id }, index$1.h("rtk-message-view", { pinned: message.pinned, time: message.time, actions: this.getMessageActions(message), authorName: message.displayName, isSelf: isSelf, avatarUrl: displayPicture, hideAuthorName: isContinued, viewType: viewType, variant: "bubble", onAction: (event) => this.onMessageActionHandler(event.detail, message) }, index$1.h("div", null, index$1.h("div", { class: "body" }, message.type === 'text' && (index$1.h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (index$1.h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (index$1.h("rtk-image-message-view", { url: message.link, onPreview: () => {
714
+ return (index$1.h("div", null, index$1.h("div", { class: "message-wrapper", id: message.id }, index$1.h("rtk-message-view", { messageType: message.type, pinned: message.pinned, isEdited: message.isEdited, time: message.time, actions: this.getMessageActions(message), authorName: message.displayName, isSelf: isSelf, avatarUrl: displayPicture, hideAuthorName: isContinued, viewType: viewType, variant: "bubble", onAction: (event) => this.onMessageActionHandler(event.detail, message) }, index$1.h("div", null, index$1.h("div", { class: "body" }, message.type === 'text' && (index$1.h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (index$1.h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (index$1.h("rtk-image-message-view", { url: message.link, onPreview: () => {
1066
715
  this.stateUpdate.emit({ image: message });
1067
716
  } }))))))));
1068
717
  };
1069
718
  this.chatUpdateListener = (data) => {
1070
- if (this.selectedChannelId && data.message.channelId !== this.selectedChannelId)
719
+ var _a, _b, _c;
720
+ // if private message and not for privateChatRecipient, ignore
721
+ // if private message and public chat selected, ignore
722
+ if (((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
723
+ !data.message.targetUserIds.includes((_b = this.privateChatRecipient) === null || _b === void 0 ? void 0 : _b.userId))
724
+ return;
725
+ // if public message and private chat selected, ignore
726
+ if (this.privateChatRecipient && ((_c = data.message.targetUserIds) === null || _c === void 0 ? void 0 : _c.length) === 0) {
1071
727
  return;
728
+ }
1072
729
  if (data.action === 'add') {
1073
730
  this.$paginatedListRef.onNewNode(data.message);
1074
- this.lastReadMessageIndex = -1;
1075
- this.maybeMarkChannelAsRead([data.message]);
1076
731
  }
1077
732
  else if (data.action === 'delete') {
1078
733
  this.$paginatedListRef.onNodeDelete(data.message.id);
@@ -1091,9 +746,20 @@ const RtkChatMessagesUiPaginated = class {
1091
746
  connectedCallback() {
1092
747
  this.meetingChanged(this.meeting);
1093
748
  }
749
+ async onPinnedMessageSelect(event) {
750
+ var _a, _b;
751
+ const message = event.detail;
752
+ if (!message)
753
+ return;
754
+ await ((_b = (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.reset) === null || _b === void 0 ? void 0 : _b.call(_a, message.timeMs + 1));
755
+ }
1094
756
  disconnectedCallback() {
1095
757
  this.disconnectMeeting(this.meeting);
1096
758
  }
759
+ privateChatRecipientChanged() {
760
+ var _a;
761
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.reset();
762
+ }
1097
763
  meetingChanged(meeting, oldMeeting) {
1098
764
  var _a;
1099
765
  if (oldMeeting != undefined)
@@ -1106,33 +772,220 @@ const RtkChatMessagesUiPaginated = class {
1106
772
  }
1107
773
  this.permissionsUpdateListener();
1108
774
  }
1109
- channelChanged() {
1110
- this.lastReadMessageIndex = -1;
1111
- }
1112
775
  render() {
1113
- return (index$1.h(index$1.Host, { key: '55b594d1fad2c164a70b71e297f63273ece0bc4f' }, index$1.h("rtk-paginated-list", { key: '1554ee896643feec72a02672f156f95c988813ce', ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getChatMessages, createNodes: this.createChatNodes, selectedItemId: this.selectedChannelId, emptyListLabel: this.t('chat.empty_channel') }, index$1.h("slot", { key: '03aeb2069b87cb217b9759cabd3835c9bac81f11' }))));
776
+ return (index$1.h(index$1.Host, { key: '8062f966f4bc489a4fdadb2da59bb88473e45194' }, index$1.h("rtk-paginated-list", { key: '7f50458ee29cd7bd83bd123303e82db556230d67', ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getChatMessages, createNodes: this.createChatNodes, emptyListLabel: this.t('chat.empty_chat') }, index$1.h("slot", { key: '69b0106558d9995b0bc24ed3d0d36f56febbf90f' }))));
1114
777
  }
1115
778
  get host() { return index$1.getElement(this); }
1116
779
  static get watchers() { return {
1117
- "meeting": ["meetingChanged"],
1118
- "selectedChannelId": ["channelChanged"]
780
+ "privateChatRecipient": ["privateChatRecipientChanged"],
781
+ "meeting": ["meetingChanged"]
1119
782
  }; }
1120
783
  };
1121
- __decorate$d([
784
+ __decorate$f([
1122
785
  index.SyncWithStore()
1123
786
  ], RtkChatMessagesUiPaginated.prototype, "meeting", void 0);
1124
- __decorate$d([
787
+ __decorate$f([
1125
788
  index.SyncWithStore()
1126
789
  ], RtkChatMessagesUiPaginated.prototype, "iconPack", void 0);
1127
- __decorate$d([
790
+ __decorate$f([
1128
791
  index.SyncWithStore()
1129
792
  ], RtkChatMessagesUiPaginated.prototype, "t", void 0);
1130
793
  RtkChatMessagesUiPaginated.style = RtkChatMessagesUiPaginatedStyle0;
1131
794
 
795
+ const rtkChatSelectorCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;width:100%;flex-direction:column;font-size:14px;position:relative;box-sizing:border-box;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.chat-header{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));cursor:pointer;border-radius:var(--rtk-border-radius-sm, 4px);border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}.chat-header-label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px)}.dropdown{position:absolute;top:100%;z-index:10;padding:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));opacity:0;pointer-events:none;border-bottom-right-radius:var(--rtk-border-radius-sm, 4px);border-bottom-left-radius:var(--rtk-border-radius-sm, 4px);left:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);max-width:calc(100vw - var(--rtk-space-4, 16px));box-sizing:border-box}.dropdown.open{opacity:1;pointer-events:auto;border-width:1px;border-top-width:var(--rtk-border-width-none, 0);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity))}.dropdown rtk-paginated-list{box-sizing:border-box;display:flex;height:30vh;flex-direction:column}.public-chat-group-label{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);border-left-width:var(--rtk-border-width-none, 0);border-right-width:var(--rtk-border-width-none, 0);border-top-width:var(--rtk-border-width-none, 0);border-bottom-width:var(--rtk-border-width-none, 0);border-bottom-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}.public-chat-icon{display:flex;align-items:center;justify-content:center;padding:var(--rtk-space-1, 4px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}.public-chat-icon rtk-icon{color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}";
796
+ const RtkChatSelectorStyle0 = rtkChatSelectorCss;
797
+
798
+ var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
799
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
800
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
801
+ r = Reflect.decorate(decorators, target, key, desc);
802
+ else
803
+ for (var i = decorators.length - 1; i >= 0; i--)
804
+ if (d = decorators[i])
805
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
806
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
807
+ };
808
+ const RtkChatSelector = class {
809
+ constructor(hostRef) {
810
+ index$1.registerInstance(this, hostRef);
811
+ this.dropdownToggle = index$1.createEvent(this, "rtkDropdownToggle", 7);
812
+ this.chatSelectorChange = index$1.createEvent(this, "rtkChatSelectorChange", 7);
813
+ /** Config */
814
+ this.config = uiStore.createDefaultConfig();
815
+ /** Icon pack */
816
+ this.iconPack = uiStore.defaultIconPack;
817
+ /** Language */
818
+ this.t = uiStore.useLanguage();
819
+ /** UI Overrides */
820
+ this.overrides = uiStore.defaultOverrides;
821
+ this.isOpen = false;
822
+ this.showPrivateChat = false;
823
+ this.selectedUser = undefined;
824
+ //NOTE(ikabra): Fix this value once backend supports pagination for participants
825
+ this.pageSize = 100000;
826
+ this.pagesAllowed = 3;
827
+ this.unreadMap = new Map();
828
+ this.disconnectMeeting = (meeting) => {
829
+ var _a, _b, _c, _d;
830
+ const { self, participants } = meeting || {};
831
+ (_a = meeting.chat) === null || _a === void 0 ? void 0 : _a.off('chatUpdate', this.chatUpdateListener);
832
+ (_b = self === null || self === void 0 ? void 0 : self.permissions) === null || _b === void 0 ? void 0 : _b.off('*', this.chatPermissionUpdateListener);
833
+ (_c = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _c === void 0 ? void 0 : _c.off('participantJoined', this.participantJoinedListener);
834
+ (_d = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _d === void 0 ? void 0 : _d.off('participantLeft', this.participantLeftListener);
835
+ };
836
+ this.toggle = (e) => {
837
+ e.preventDefault();
838
+ e.stopPropagation();
839
+ this.isOpen = !this.isOpen;
840
+ this.dropdownToggle.emit({ open: this.isOpen });
841
+ };
842
+ this.selectUser = async (user) => {
843
+ if (user === null || user === void 0 ? void 0 : user.userId) {
844
+ this.unreadMap.set(user.userId, false);
845
+ this.$paginatedListRef.rerenderList();
846
+ }
847
+ this.selectedUser = user;
848
+ this.chatSelectorChange.emit({ selectedUser: user });
849
+ await this.close();
850
+ };
851
+ this.chatPermissionUpdateListener = () => {
852
+ var _a, _b;
853
+ this.showPrivateChat = !!(((_a = this.meeting.self.permissions.chatPrivate) === null || _a === void 0 ? void 0 : _a.canSend) ||
854
+ ((_b = this.meeting.self.permissions.chatPrivate) === null || _b === void 0 ? void 0 : _b.canReceive));
855
+ if (!this.showPrivateChat) {
856
+ this.selectedUser = undefined;
857
+ this.chatSelectorChange.emit({ selectedUser: undefined });
858
+ }
859
+ };
860
+ this.onParticipantUpdate = () => {
861
+ var _a, _b, _c, _d;
862
+ if (!this.selectedUser)
863
+ return;
864
+ const participants = ((_d = (_c = (_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.participants) === null || _b === void 0 ? void 0 : _b.joined) === null || _c === void 0 ? void 0 : _c.toArray) === null || _d === void 0 ? void 0 : _d.call(_c)) || [];
865
+ if (!participants.some((p) => { var _a; return p.id === ((_a = this.selectedUser) === null || _a === void 0 ? void 0 : _a.id); })) {
866
+ this.selectedUser = undefined;
867
+ this.chatSelectorChange.emit({ selectedUser: undefined });
868
+ }
869
+ };
870
+ this.participantJoinedListener = (data) => {
871
+ this.$paginatedListRef.onNewNode(data);
872
+ };
873
+ this.participantLeftListener = (data) => {
874
+ this.$paginatedListRef.onNodeDelete(data.id);
875
+ this.onParticipantUpdate();
876
+ };
877
+ // @ts-ignore - unused params
878
+ this.getParticipants = async (timestamp, size, reversed) => {
879
+ const meeting = this.meeting;
880
+ if (!meeting)
881
+ return [];
882
+ /**
883
+ * FIXME(ikabra): This is a temporary hack in place to handle the initial load
884
+ * and not repeat participants when a user reaches the top of the list.
885
+ * This must be replaced by actual pagination APIs from backend for participants.
886
+ */
887
+ if (!timestamp)
888
+ return [];
889
+ const participants = meeting.participants.joined.toArray();
890
+ return participants;
891
+ };
892
+ this.createPaticipantNodes = (data) => {
893
+ return data.map((participant) => {
894
+ var _a;
895
+ return (index$1.h("div", { class: "private-chat-label", id: participant.id, onClick: () => this.selectUser(participant) }, index$1.h("rtk-avatar", { size: "sm", participant: participant }), index$1.h("span", null, (_a = participant.name) !== null && _a !== void 0 ? _a : this.t('participant')), this.unreadMap.get(participant.userId) ? (index$1.h("div", { class: "private-chat-unread-badge" })) : null));
896
+ });
897
+ };
898
+ this.chatUpdateListener = (data) => {
899
+ var _a;
900
+ if (data.action !== 'add')
901
+ return;
902
+ if (!((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length))
903
+ return;
904
+ const selfUserId = this.meeting.self.userId;
905
+ const otherUserId = data.message.targetUserIds.find((id) => id !== selfUserId);
906
+ if (!otherUserId)
907
+ return;
908
+ this.unreadMap.set(otherUserId, true);
909
+ this.$paginatedListRef.rerenderList();
910
+ };
911
+ }
912
+ /** */
913
+ async close() {
914
+ if (!this.isOpen)
915
+ return;
916
+ this.isOpen = false;
917
+ this.dropdownToggle.emit({ open: false });
918
+ }
919
+ connectedCallback() {
920
+ this.meetingChanged(this.meeting);
921
+ this.overridesChanged(this.overrides);
922
+ }
923
+ disconnectedCallback() {
924
+ var _a, _b, _c;
925
+ if (!this.meeting)
926
+ return;
927
+ const { self, participants } = this.meeting;
928
+ (_a = self === null || self === void 0 ? void 0 : self.permissions) === null || _a === void 0 ? void 0 : _a.off('*', this.chatPermissionUpdateListener);
929
+ (_b = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _b === void 0 ? void 0 : _b.off('participantJoined', this.participantJoinedListener);
930
+ (_c = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _c === void 0 ? void 0 : _c.off('participantLeft', this.participantLeftListener);
931
+ }
932
+ overridesChanged(overrides) {
933
+ var _a, _b;
934
+ if (!this.meeting || this.meeting.self)
935
+ return;
936
+ this.showPrivateChat =
937
+ !!(((_a = this.meeting.self.permissions.chatPrivate) === null || _a === void 0 ? void 0 : _a.canSend) ||
938
+ ((_b = this.meeting.self.permissions.chatPrivate) === null || _b === void 0 ? void 0 : _b.canReceive)) && !overrides.disablePrivateChat;
939
+ }
940
+ meetingChanged(meeting, oldMeeting) {
941
+ var _a, _b, _c, _d, _e, _f, _g;
942
+ if (oldMeeting)
943
+ this.disconnectMeeting(oldMeeting);
944
+ if (!meeting || !meeting.chat)
945
+ return;
946
+ this.showPrivateChat =
947
+ !!(((_a = meeting.self.permissions.chatPrivate) === null || _a === void 0 ? void 0 : _a.canSend) ||
948
+ ((_b = meeting.self.permissions.chatPrivate) === null || _b === void 0 ? void 0 : _b.canReceive)) && !this.overrides.disablePrivateChat;
949
+ this.onParticipantUpdate();
950
+ (_c = meeting.chat) === null || _c === void 0 ? void 0 : _c.on('chatUpdate', this.chatUpdateListener);
951
+ meeting.self.permissions.on('*', this.chatPermissionUpdateListener);
952
+ (_e = (_d = meeting === null || meeting === void 0 ? void 0 : meeting.participants) === null || _d === void 0 ? void 0 : _d.joined) === null || _e === void 0 ? void 0 : _e.on('participantJoined', this.participantJoinedListener);
953
+ (_g = (_f = meeting === null || meeting === void 0 ? void 0 : meeting.participants) === null || _f === void 0 ? void 0 : _f.joined) === null || _g === void 0 ? void 0 : _g.on('participantLeft', this.participantLeftListener);
954
+ }
955
+ render() {
956
+ if (!this.showPrivateChat)
957
+ return null;
958
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: "chat-header", onClick: this.toggle }, index$1.h("div", { class: "chat-header-label" }, this.selectedUser ? (index$1.h("rtk-icon", { icon: this.iconPack.people, size: "sm" })) : (index$1.h("rtk-icon", { icon: this.iconPack.participants, size: "sm" })), !this.selectedUser ? this.t('chat.everyone') : this.selectedUser.name), index$1.h("div", { class: "chevron" }, index$1.h("rtk-icon", { icon: this.isOpen ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" }))), index$1.h("div", { class: { dropdown: true, open: this.isOpen, scrollbar: true } }, index$1.h("div", { class: "public-chat-group-label", onClick: () => this.selectUser(undefined) }, index$1.h("div", { class: "public-chat-icon" }, index$1.h("rtk-icon", { icon: this.iconPack.participants, size: "sm" })), this.t('chat.everyone')), index$1.h("rtk-paginated-list", { class: "chat-selector-paginated-list", ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getParticipants, createNodes: this.createPaticipantNodes, emptyListLabel: this.t('participants.empty_list') }, index$1.h("slot", null)))));
959
+ }
960
+ static get watchers() { return {
961
+ "overrides": ["overridesChanged"],
962
+ "meeting": ["meetingChanged"]
963
+ }; }
964
+ };
965
+ __decorate$e([
966
+ index.SyncWithStore()
967
+ ], RtkChatSelector.prototype, "meeting", void 0);
968
+ __decorate$e([
969
+ index.SyncWithStore()
970
+ ], RtkChatSelector.prototype, "states", void 0);
971
+ __decorate$e([
972
+ index.SyncWithStore()
973
+ ], RtkChatSelector.prototype, "config", void 0);
974
+ __decorate$e([
975
+ index.SyncWithStore()
976
+ ], RtkChatSelector.prototype, "iconPack", void 0);
977
+ __decorate$e([
978
+ index.SyncWithStore()
979
+ ], RtkChatSelector.prototype, "t", void 0);
980
+ __decorate$e([
981
+ index.SyncWithStore()
982
+ ], RtkChatSelector.prototype, "overrides", void 0);
983
+ RtkChatSelector.style = RtkChatSelectorStyle0;
984
+
1132
985
  const rtkDraftAttachmentViewCss = ":host{display:flex;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));border-top-left-radius:var(--rtk-border-radius-md, 8px);border-top-right-radius:var(--rtk-border-radius-md, 8px)}.preview-overlay{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);background-color:inherit}.preview{position:absolute;top:var(--rtk-space-4, 16px);left:var(--rtk-space-4, 16px);max-width:-moz-fit-content;max-width:fit-content;max-height:var(--rtk-space-20, 80px)}.preview:hover rtk-tooltip{display:block}.preview rtk-tooltip{position:absolute;top:calc(var(--rtk-space-1, 4px) * -1);left:calc(var(--rtk-space-1, 4px) * -1);display:none;margin-left:calc(var(--rtk-space-1, 4px) * -1);margin-top:calc(var(--rtk-space-1, 4px) * -1)}.preview rtk-button{display:flex;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));border:1px solid rgb(var(--rtk-colors-text-1000, 255 255 255))}.preview rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.preview-image{height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);-o-object-fit:cover;object-fit:cover;max-height:100%;max-width:100%;overflow:clip;border-radius:var(--rtk-border-radius-md, 8px)}.preview-file{padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--rtk-border-radius-md, 8px);max-width:200px}";
1133
986
  const RtkDraftAttachmentViewStyle0 = rtkDraftAttachmentViewCss;
1134
987
 
1135
- var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
988
+ var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1136
989
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1137
990
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1138
991
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1183,16 +1036,16 @@ const RtkDraftAttachmentView = class {
1183
1036
  this.onAttachmentChange();
1184
1037
  }
1185
1038
  render() {
1186
- return (index$1.h(index$1.Host, { key: 'f6ede093bcdf8100807baab4de2a296fc4960a07' }, index$1.h("div", { key: 'b19bbe9b2ea58ea4adccc2028a1b24ea6bc9f0a9', class: "preview-overlay" }, index$1.h("div", { key: 'cbb2bfcb3a50e6e7fbfd4109eb340ba51d6a162d', class: "preview" }, index$1.h("rtk-tooltip", { key: '15b50c547470b0fa22014e0992a1c7e26b234573', label: this.t('chat.cancel_upload') }, index$1.h("rtk-button", { key: '940332a51747af3368ffec497d5ef76fa64ecf75', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, index$1.h("rtk-icon", { key: 'cc04b0ac70753e970ff638f187ad5f702dc3656b', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (index$1.h("img", { class: "preview-image", src: this.filePreview })) : (index$1.h("div", { class: "preview-file" }, index$1.h("span", null, this.filePreview)))))));
1039
+ return (index$1.h(index$1.Host, { key: '51ac9914a6c3626f3abd63d8101dd33d956f0cb0' }, index$1.h("div", { key: '9520035fca81e905b7bcc3696ec9803ca127a370', class: "preview-overlay" }, index$1.h("div", { key: '6c8139ece3ce95836f7853a160c0a01e298c2892', class: "preview" }, index$1.h("rtk-tooltip", { key: 'd3379d7a4a3b09c15d75ec4fce8bc7c2e89b1df4', label: this.t('chat.cancel_upload') }, index$1.h("rtk-button", { key: 'd5badd1b4a2fce0f2958d8923adde9353562eb8a', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, index$1.h("rtk-icon", { key: '4acde8f6352eab6e2277f6317ef226d22defe4e0', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (index$1.h("img", { class: "preview-image", src: this.filePreview })) : (index$1.h("div", { class: "preview-file" }, index$1.h("span", null, this.filePreview)))))));
1187
1040
  }
1188
1041
  static get watchers() { return {
1189
1042
  "attachment": ["onAttachmentChange"]
1190
1043
  }; }
1191
1044
  };
1192
- __decorate$c([
1045
+ __decorate$d([
1193
1046
  index.SyncWithStore()
1194
1047
  ], RtkDraftAttachmentView.prototype, "iconPack", void 0);
1195
- __decorate$c([
1048
+ __decorate$d([
1196
1049
  index.SyncWithStore()
1197
1050
  ], RtkDraftAttachmentView.prototype, "t", void 0);
1198
1051
  RtkDraftAttachmentView.style = RtkDraftAttachmentViewStyle0;
@@ -1211,10 +1064,10 @@ const fetchEmojis = async () => {
1211
1064
  return cachedEmojis;
1212
1065
  };
1213
1066
 
1214
- const rtkEmojiPickerCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{width:100%}.emoji-parent{box-sizing:border-box;display:inline-flex;height:var(--rtk-space-64, 256px);width:100%;max-width:640px;flex-direction:column;padding:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-0, 0px);-webkit-user-select:none;-moz-user-select:none;user-select:none;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.close-parent{display:flex;flex:1 1 0%;justify-content:flex-end;padding:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}#emoji-grid{margin-top:var(--rtk-space-2, 8px);box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;overflow-x:hidden;overflow-y:scroll;height:100%;grid-auto-rows:minmax(min-content, max-content)}#loader{display:flex;height:100%;width:100%;align-items:center;justify-content:center}input{display:block;height:var(--rtk-space-8, 32px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);font-size:14px;border-width:var(--rtk-border-width-none, 0);border-style:solid;border-style:none;border-color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}input::-moz-placeholder{color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}input::placeholder{color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}input{border-radius:var(--rtk-border-radius-sm, 4px);outline:2px solid transparent;outline-offset:2px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}input:focus{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-ring-opacity));--tw-ring-opacity:0.3}.emoji{height:var(--rtk-space-10, 40px);width:var(--rtk-space-10, 40px);font-size:20px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}";
1067
+ const rtkEmojiPickerCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{width:100%}.emoji-parent{box-sizing:border-box;display:inline-flex;height:var(--rtk-space-64, 256px);width:100%;max-width:640px;flex-direction:column;padding:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-0, 0px);-webkit-user-select:none;-moz-user-select:none;user-select:none;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.close-parent{display:flex;flex:1 1 0%;justify-content:flex-end;padding:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}#emoji-grid{margin-top:var(--rtk-space-2, 8px);box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;overflow-x:hidden;overflow-y:scroll;height:100%;grid-auto-rows:minmax(min-content, max-content)}#loader{display:flex;height:100%;width:100%;align-items:center;justify-content:center}input{display:block;height:var(--rtk-space-8, 32px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);font-size:14px;border-width:var(--rtk-border-width-none, 0);border-style:solid;border-style:none;border-color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}input::-moz-placeholder{color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}input::placeholder{color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}input{border-radius:var(--rtk-border-radius-sm, 4px);outline:2px solid transparent;outline-offset:2px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}input:focus{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-ring-opacity));--tw-ring-opacity:0.3}.emoji{height:var(--rtk-space-10, 40px);width:var(--rtk-space-10, 40px);font-size:20px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}";
1215
1068
  const RtkEmojiPickerStyle0 = rtkEmojiPickerCss;
1216
1069
 
1217
- var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1070
+ var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1218
1071
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1219
1072
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1220
1073
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1268,13 +1121,13 @@ const RtkEmojiPicker = class {
1268
1121
  return (index$1.h("div", { id: "emoji-grid", class: "scrollbar max-w-40" }, this.filteredEmojis.map((e) => (index$1.h("rtk-button", { key: `emoji-button-${e.name}`, class: "emoji", variant: "ghost", kind: "icon", title: e.name, onClick: () => this.handleEmojiClick(e.emoji) }, e.emoji)))));
1269
1122
  }
1270
1123
  render() {
1271
- return (index$1.h(index$1.Host, { key: '6581d26d75a7b869d0ba00243ec74ee06b927e7d' }, index$1.h("div", { key: '3705d8c557ac3e05769171998e9176e7e40a232c', class: 'close-parent' }, index$1.h("rtk-button", { key: 'b437e579cb828a709de255ddfa6b751e4bdfbe51', variant: "ghost", kind: "icon", class: "close", onClick: () => { var _a; return (_a = this.pickerClose) === null || _a === void 0 ? void 0 : _a.emit(); }, "aria-label": this.t('close') }, index$1.h("rtk-icon", { key: '7fac79a21c6be57156d17ceeff9ceb2834bbf709', icon: this.iconPack.dismiss }))), index$1.h("div", { key: '46cb2af6654ef36b7258baf47e3cd9e5bd60bf89', class: 'emoji-parent' }, index$1.h("input", { key: 'cfde33638d531f9bac1b1bf25d966a369f4dfb38', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
1124
+ return (index$1.h(index$1.Host, { key: 'db0bbe8c8af774ca199ac800fb2a0fba9ef7ab6d' }, index$1.h("div", { key: '3e51dd2b14a87ebc0c65ee406ec67f92722296ab', class: 'close-parent' }, index$1.h("rtk-button", { key: 'a8697bf95723f0598de3e2b6f88729562466ed81', variant: "ghost", kind: "icon", class: "close", onClick: () => { var _a; return (_a = this.pickerClose) === null || _a === void 0 ? void 0 : _a.emit(); }, "aria-label": this.t('close') }, index$1.h("rtk-icon", { key: 'dc787e4ccf8a6f170ccd1f0954602a08a85b12ad', icon: this.iconPack.dismiss }))), index$1.h("div", { key: '77f7377f40708c4f5fa3e531621660bf68f01b4b', class: 'emoji-parent' }, index$1.h("input", { key: '7db399dc58c0c6863db8ed1c80ac313417eab8c9', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
1272
1125
  }
1273
1126
  };
1274
- __decorate$b([
1127
+ __decorate$c([
1275
1128
  index.SyncWithStore()
1276
1129
  ], RtkEmojiPicker.prototype, "iconPack", void 0);
1277
- __decorate$b([
1130
+ __decorate$c([
1278
1131
  index.SyncWithStore()
1279
1132
  ], RtkEmojiPicker.prototype, "t", void 0);
1280
1133
  RtkEmojiPicker.style = RtkEmojiPickerStyle0;
@@ -1282,7 +1135,7 @@ RtkEmojiPicker.style = RtkEmojiPickerStyle0;
1282
1135
  const rtkEmojiPickerButtonCss = ":host{}";
1283
1136
  const RtkEmojiPickerButtonStyle0 = rtkEmojiPickerButtonCss;
1284
1137
 
1285
- var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1138
+ var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1286
1139
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1287
1140
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1288
1141
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1301,13 +1154,13 @@ const RtkEmojiPickerButton = class {
1301
1154
  this.t = uiStore.useLanguage();
1302
1155
  }
1303
1156
  render() {
1304
- return (index$1.h("rtk-tooltip", { key: '45ef1f18da6d1ecc3c02882590cd22e930461562', label: this.t('chat.send_emoji') }, index$1.h("rtk-button", { key: '6504abab2f1c6537443699c53a8cbdcf13530cba', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, index$1.h("rtk-icon", { key: 'd730c81abce72d9c3226f1f666941e1136bee77f', icon: this.iconPack.emoji_multiple }))));
1157
+ return (index$1.h("rtk-tooltip", { key: '82c39530cddfd5cab8672cc5f7f590587749f9cc', label: this.t('chat.send_emoji') }, index$1.h("rtk-button", { key: '8e7ee7dbe901b78482ad3f828bb28bda1fdc36b7', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, index$1.h("rtk-icon", { key: 'a83691903dae86b3cb7c8cf17fb488e4da13090b', icon: this.iconPack.emoji_multiple }))));
1305
1158
  }
1306
1159
  };
1307
- __decorate$a([
1160
+ __decorate$b([
1308
1161
  index.SyncWithStore()
1309
1162
  ], RtkEmojiPickerButton.prototype, "iconPack", void 0);
1310
- __decorate$a([
1163
+ __decorate$b([
1311
1164
  index.SyncWithStore()
1312
1165
  ], RtkEmojiPickerButton.prototype, "t", void 0);
1313
1166
  RtkEmojiPickerButton.style = RtkEmojiPickerButtonStyle0;
@@ -1315,7 +1168,7 @@ RtkEmojiPickerButton.style = RtkEmojiPickerButtonStyle0;
1315
1168
  const rtkFileMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);min-width:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.file .file-data{margin-left:var(--rtk-space-1, 4px);flex:1 1 0%}.file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}";
1316
1169
  const RtkFileMessageViewStyle0 = rtkFileMessageViewCss;
1317
1170
 
1318
- var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1171
+ var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1319
1172
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1320
1173
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1321
1174
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1332,10 +1185,10 @@ const RtkFileMessageView = class {
1332
1185
  this.iconPack = uiStore.defaultIconPack;
1333
1186
  }
1334
1187
  render() {
1335
- return (index$1.h("div", { key: '5cc29b4780f581a2f8b045e5051bcc66f3fdaf55', class: "file" }, index$1.h("rtk-button", { key: '4100b47bc1d72f08ec5fe645291bfbb58e3a6486', variant: "secondary", kind: "icon", onClick: () => file.downloadFile(string.sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, index$1.h("rtk-icon", { key: '52ae14abb7c27b89861d5ba4c907d606257628c9', icon: this.iconPack.download })), index$1.h("div", { key: '02c9ad8d173172a85cc474273a966607d456360e', class: "file-data" }, index$1.h("div", { key: '6ceca21685d04f175006ba35a6de194cc98879ad', class: "name" }, this.name), index$1.h("div", { key: 'b07d07bcaedee3fd6fbcfe81ce2f6bf757655b5f', class: "file-data-split" }, index$1.h("div", { key: '280635ef486de02bc68ca3e774be14fa5a461d1c', class: "ext" }, file.getExtension(this.name)), index$1.h("span", { key: '84f72d8b37b7d15c257faed036b76c737eec780b', class: "divider" }), index$1.h("div", { key: '1b88f48f51afe3fceb57920c3d17f586e848a25f', class: "size" }, file.getFileSize(this.size))))));
1188
+ return (index$1.h("div", { key: '9fce348979b0354484f0deeddc6e55007ef70ae5', class: "file" }, index$1.h("rtk-button", { key: '22bc5f6cdff07ec4f9cdb1b588b64e5e604d0029', variant: "secondary", kind: "icon", onClick: () => file.downloadFile(string.sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, index$1.h("rtk-icon", { key: '3d46920c69604896bba651ae8205d3a761ffdeb7', icon: this.iconPack.download })), index$1.h("div", { key: 'c42a4c9bdd415d4d307efcb4f375f575220e473a', class: "file-data" }, index$1.h("div", { key: 'fe9bd86c88ce3184ed0b38dfe312bf7ac0207551', class: "name" }, this.name), index$1.h("div", { key: '93aa6bf4c3933b292c59a1522b8398e96938aba3', class: "file-data-split" }, index$1.h("div", { key: '2807cbf9844af17617ec76db10689fc6dcb80e0e', class: "ext" }, file.getExtension(this.name)), index$1.h("span", { key: 'fa0a03cf79b2f4dee34a11fb0a0bf82a608ca3c1', class: "divider" }), index$1.h("div", { key: '0fd5d15e43aca15ffd3ae2fc6b176c0455ea5db3', class: "size" }, file.getFileSize(this.size))))));
1336
1189
  }
1337
1190
  };
1338
- __decorate$9([
1191
+ __decorate$a([
1339
1192
  index.SyncWithStore()
1340
1193
  ], RtkFileMessageView.prototype, "iconPack", void 0);
1341
1194
  RtkFileMessageView.style = RtkFileMessageViewStyle0;
@@ -1343,7 +1196,7 @@ RtkFileMessageView.style = RtkFileMessageViewStyle0;
1343
1196
  const rtkFilePickerButtonCss = ":host{}";
1344
1197
  const RtkFilePickerButtonStyle0 = rtkFilePickerButtonCss;
1345
1198
 
1346
- var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1199
+ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1347
1200
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1348
1201
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1349
1202
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1388,13 +1241,13 @@ const RtkFilePickerButton = class {
1388
1241
  render() {
1389
1242
  const label = this.label || this.t('chat.send_file');
1390
1243
  const icon = this.iconPack[this.icon];
1391
- return (index$1.h("rtk-tooltip", { key: '057a0a5a714dbbde228e3481e53adea4f88fb3ad', label: label }, index$1.h("rtk-button", { key: '04193df1053b14687fb9464a122b9158707bdda1', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, index$1.h("rtk-icon", { key: 'ed2fce30b93dfce9dd6b967d5993c93496cf3388', icon: icon }))));
1244
+ return (index$1.h("rtk-tooltip", { key: 'c97c7e1e106e14f2443dd405fd6657a14d9d315c', label: label }, index$1.h("rtk-button", { key: 'cffa7ef14cc7fe0285e642ca76b658b6c70d4b42', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, index$1.h("rtk-icon", { key: '47133f919946ce2a63e4f2b64977f1127a4eae7c', icon: icon }))));
1392
1245
  }
1393
1246
  };
1394
- __decorate$8([
1247
+ __decorate$9([
1395
1248
  index.SyncWithStore()
1396
1249
  ], RtkFilePickerButton.prototype, "iconPack", void 0);
1397
- __decorate$8([
1250
+ __decorate$9([
1398
1251
  index.SyncWithStore()
1399
1252
  ], RtkFilePickerButton.prototype, "t", void 0);
1400
1253
  RtkFilePickerButton.style = RtkFilePickerButtonStyle0;
@@ -1419,7 +1272,7 @@ const RtkIcon = class {
1419
1272
  this.size = 'lg';
1420
1273
  }
1421
1274
  render() {
1422
- return (index$1.h(index$1.Host, { key: 'fbacb1ee3dd4c1ca7aa612f08e938601df73036c' }, index$1.h("div", { key: '04c026967cb7aa3acb3fba09fcf5b0d33f45e2b0', class: "icon-wrapper", innerHTML: parseIcon(this.icon), part: "wrapper" })));
1275
+ return (index$1.h(index$1.Host, { key: 'fdbe6fd9647bae7cfdf02ba6a250aa3c0c39ad85' }, index$1.h("div", { key: '114baca2f9ce9376e69073b40170473cc359915f', class: "icon-wrapper", innerHTML: parseIcon(this.icon), part: "wrapper" })));
1423
1276
  }
1424
1277
  };
1425
1278
  RtkIcon.style = RtkIconStyle0;
@@ -1427,7 +1280,7 @@ RtkIcon.style = RtkIconStyle0;
1427
1280
  const rtkImageMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.image-spinner{cursor:wait}.image-errored{cursor:not-allowed}.image{display:block;font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}";
1428
1281
  const RtkImageMessageViewStyle0 = rtkImageMessageViewCss;
1429
1282
 
1430
- var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1283
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1431
1284
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1432
1285
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1433
1286
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1448,7 +1301,7 @@ const RtkImageMessageView = class {
1448
1301
  this.status = 'loading';
1449
1302
  }
1450
1303
  render() {
1451
- return (index$1.h("div", { key: '066606e6ae62634b2466bb46b453e0c2d91b17ea', class: { image: true, loaded: this.status === 'loaded' } }, index$1.h("img", { key: 'f042e5d3c1a6341e9fc0845e6643016f1be5b5f7', src: string.sanitizeLink(this.url), onLoad: () => {
1304
+ return (index$1.h("div", { key: '5fd48d25a86c8a1f3084ff4c27ba95ddca04482f', class: { image: true, loaded: this.status === 'loaded' } }, index$1.h("img", { key: '99d019ebaf2e4deb2f6f9f8541f1bd67bc089fee', src: string.sanitizeLink(this.url), onLoad: () => {
1452
1305
  this.status = 'loaded';
1453
1306
  }, onError: () => {
1454
1307
  this.status = 'errored';
@@ -1456,20 +1309,20 @@ const RtkImageMessageView = class {
1456
1309
  if (this.status === 'loaded') {
1457
1310
  this.onPreview.emit(this.url);
1458
1311
  }
1459
- } }), this.status === 'loading' && (index$1.h("div", { key: 'd4a5030468fbf70afae62bd55ae4d0fa989e15c2', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, index$1.h("rtk-spinner", { key: '216aba361a46cc100e7d26cc2daf1ffb0948d695', iconPack: this.iconPack }))), this.status === 'errored' && (index$1.h("div", { key: '01f5da8f70872c9fa22dc9a9b70b046b0001d05b', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, index$1.h("rtk-icon", { key: '0f7e6fed2730f6366d07fc6afddb2b247e9b7d3a', icon: this.iconPack.image_off }))), this.status === 'loaded' && (index$1.h("div", { key: '5ac0e61c65a88a8d6b9ee54c900b856854d1b84b', class: "actions" }, index$1.h("rtk-button", { key: 'fd83dfecd7b5d9c3976374c3c55731b1f026fc0a', class: "action", variant: "secondary", kind: "icon", onClick: () => {
1312
+ } }), this.status === 'loading' && (index$1.h("div", { key: '9e0eba0b06ee2039d0a36f598e2b55b79c6d4151', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, index$1.h("rtk-spinner", { key: '0488df56c74ff7fbcb30ae7a16f77eca57cdd50a', iconPack: this.iconPack }))), this.status === 'errored' && (index$1.h("div", { key: 'd4f2cc45d94be0a4519d93169e337522f30949cf', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, index$1.h("rtk-icon", { key: 'a633902737fe1a4690f349092fedb6d0c7a18bbf', icon: this.iconPack.image_off }))), this.status === 'loaded' && (index$1.h("div", { key: 'bfb0b8f3f130315e1691dd87f9be6de211d669cd', class: "actions" }, index$1.h("rtk-button", { key: 'c0e200f62e7896b11f0cb1717e15db96223b2b45', class: "action", variant: "secondary", kind: "icon", onClick: () => {
1460
1313
  this.onPreview.emit(this.url);
1461
- } }, index$1.h("rtk-icon", { key: '3ca7384fa28e6716345acacf9225ae9471ff8d63', icon: this.iconPack.full_screen_maximize })), index$1.h("rtk-button", { key: '198787808c389e4df48d3609a53c2d27cf2e7fb3', class: "action", variant: "secondary", kind: "icon", onClick: () => file.downloadFile(this.url, { fallbackName: 'image' }) }, index$1.h("rtk-icon", { key: 'f38fe3da48d1fc854001c719164c95f0673808c5', icon: this.iconPack.download }))))));
1314
+ } }, index$1.h("rtk-icon", { key: '2527495fac5a7760c7a320c7f3fc769b4321dd66', icon: this.iconPack.full_screen_maximize })), index$1.h("rtk-button", { key: '80f46436895374dc43f9a3fb1adf2472c82c328b', class: "action", variant: "secondary", kind: "icon", onClick: () => file.downloadFile(this.url, { fallbackName: 'image' }) }, index$1.h("rtk-icon", { key: '5650cc2537980b244b31b937a5d367a800d0b0f9', icon: this.iconPack.download }))))));
1462
1315
  }
1463
1316
  };
1464
- __decorate$7([
1317
+ __decorate$8([
1465
1318
  index.SyncWithStore()
1466
1319
  ], RtkImageMessageView.prototype, "iconPack", void 0);
1467
- __decorate$7([
1320
+ __decorate$8([
1468
1321
  index.SyncWithStore()
1469
1322
  ], RtkImageMessageView.prototype, "t", void 0);
1470
1323
  RtkImageMessageView.style = RtkImageMessageViewStyle0;
1471
1324
 
1472
- const rtkMarkdownViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{overflow-wrap:break-word}a{color:currentColor}.block-quote,blockquote{margin:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px);--tw-border-spacing-x:1px;--tw-border-spacing-y:1px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);border-top-width:var(--rtk-border-width-none, 0);border-bottom-width:var(--rtk-border-width-none, 0);border-left-width:var(--rtk-border-width-md, 2px);border-right-width:var(--rtk-border-width-none, 0);border-style:solid;padding:var(--rtk-space-0\\.5, 2px);padding-left:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);border-top-left-radius:var(--rtk-border-radius-none, 0);border-bottom-left-radius:var(--rtk-border-radius-none, 0)}pre{white-space:pre-wrap}";
1325
+ const rtkMarkdownViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{overflow-wrap:break-word}a{color:currentColor}.block-quote,blockquote{margin:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px);--tw-border-spacing-x:1px;--tw-border-spacing-y:1px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);border-top-width:var(--rtk-border-width-none, 0);border-bottom-width:var(--rtk-border-width-none, 0);border-left-width:var(--rtk-border-width-md, 2px);border-right-width:var(--rtk-border-width-none, 0);border-style:solid;padding:var(--rtk-space-0\\.5, 2px);padding-left:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);border-top-left-radius:var(--rtk-border-radius-none, 0);border-bottom-left-radius:var(--rtk-border-radius-none, 0)}pre{white-space:pre-wrap;width:300px;margin-right:var(--rtk-space-2, 8px)}.markdown-message{box-sizing:border-box}";
1473
1326
  const RtkMarkdownViewStyle0 = rtkMarkdownViewCss;
1474
1327
 
1475
1328
  const RtkMarkdownView = class {
@@ -1549,7 +1402,7 @@ const RtkMarkdownView = class {
1549
1402
  const slicedMessage = this.text.slice(0, this.maxLength);
1550
1403
  const withReply = chat.extractReplyBlock(slicedMessage, true);
1551
1404
  const withoutReply = chat.stripOutReplyBlock(slicedMessage);
1552
- return (index$1.h("p", { key: '787e6d3177f4faf1c8dcd7c73d83a6de9c57b42b' }, withReply.length !== 0 && index$1.h("blockquote", { key: '1c4b82fb870994e6707d35adcd5e6f2f0e65dd26' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1405
+ return (index$1.h("p", { key: '2c21b4c1dc9f18a17048f0827e552ffb8d595eee', class: "markdown-message" }, withReply.length !== 0 && index$1.h("blockquote", { key: 'f6ff3e02781136f2fb5f3e68dbbeac39430b6386' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
1553
1406
  }
1554
1407
  };
1555
1408
  RtkMarkdownView.style = RtkMarkdownViewStyle0;
@@ -1879,7 +1732,7 @@ RtkMeeting.style = RtkMeetingStyle0;
1879
1732
  const rtkMenuCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:inline-block;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}#menu-list{position:absolute;z-index:20;display:none}";
1880
1733
  const RtkMenuStyle0 = rtkMenuCss;
1881
1734
 
1882
- var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1735
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1883
1736
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1884
1737
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1885
1738
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1930,7 +1783,7 @@ const RtkMenu$1 = class {
1930
1783
  });
1931
1784
  }
1932
1785
  render() {
1933
- return (index$1.h(index$1.Host, { key: '15461c803838be1651df6116a61598ce8ab988f9' }, index$1.h("span", { key: 'f36cdd2f1141f46a993daa880682382904a72509', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1786
+ return (index$1.h(index$1.Host, { key: '98d1a73c1fdd151945433a13dc1d9f11cfaaeb05' }, index$1.h("span", { key: '5cb225dca906f51ea4f9cfe999840af35cbbf865', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
1934
1787
  this.clickedThis = true;
1935
1788
  if (this.menuListEl.style.display !== 'block') {
1936
1789
  this.menuListEl.style.display = 'block';
@@ -1939,21 +1792,21 @@ const RtkMenu$1 = class {
1939
1792
  else {
1940
1793
  this.menuListEl.style.display = 'none';
1941
1794
  }
1942
- } }, index$1.h("slot", { key: 'af622c9dbb3394cb46a6bb909a45c5e3248b1a09', name: "trigger" })), index$1.h("span", { key: '445258e31b4b775fbc22b268234fe15a33f809c9', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, index$1.h("slot", { key: '87396622c6078253736cbe43a1cac55c6f90754f' }))));
1795
+ } }, index$1.h("slot", { key: '75146b82e06b27ec57e85d741f42b6112d740334', name: "trigger" })), index$1.h("span", { key: 'ef16bf3d6197fd16fa7fb9dca36bc97f9cafec52', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, index$1.h("slot", { key: 'fa8644e4eff65fa5832d80cd53a70e626ea0b1e9' }))));
1943
1796
  }
1944
1797
  };
1945
- __decorate$6([
1798
+ __decorate$7([
1946
1799
  index.SyncWithStore()
1947
1800
  ], RtkMenu$1.prototype, "iconPack", void 0);
1948
- __decorate$6([
1801
+ __decorate$7([
1949
1802
  index.SyncWithStore()
1950
1803
  ], RtkMenu$1.prototype, "t", void 0);
1951
1804
  RtkMenu$1.style = RtkMenuStyle0;
1952
1805
 
1953
- const rtkMenuItemCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host(.primary:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}:host(.red){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";
1806
+ const rtkMenuItemCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host(.primary:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-400, 53 110 253) / var(--tw-bg-opacity))}:host(.red){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";
1954
1807
  const RtkMenuItemStyle0 = rtkMenuItemCss;
1955
1808
 
1956
- var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1809
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1957
1810
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1958
1811
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1959
1812
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1974,21 +1827,21 @@ const RtkMenuItem = class {
1974
1827
  this.t = uiStore.useLanguage();
1975
1828
  }
1976
1829
  render() {
1977
- return (index$1.h(index$1.Host, { key: '8679dae05e846bb8b83a1dbc9580aa2dcad18ccd', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: 'da53376b8188bfc47f904d348212fedff932b03a', name: "start" }), index$1.h("slot", { key: '4394a3afa13bd298880c1be5255f5a004c5ed42e' }), index$1.h("slot", { key: '2be62c70172912e6516ce207b571ea4794aa4f6c', name: "end" })));
1830
+ return (index$1.h(index$1.Host, { key: 'd9b20b45e47b9fe8ab36a87a66eac6386b4c678c', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: '639bd9af7b8ecd614ea87a21906e250023889a1c', name: "start" }), index$1.h("slot", { key: '9b6aa572707a1f78c8f82873b40132ec09290404' }), index$1.h("slot", { key: '02c7034af853977922e5cf3ac30f88e5f0148d75', name: "end" })));
1978
1831
  }
1979
1832
  };
1980
- __decorate$5([
1833
+ __decorate$6([
1981
1834
  index.SyncWithStore()
1982
1835
  ], RtkMenuItem.prototype, "iconPack", void 0);
1983
- __decorate$5([
1836
+ __decorate$6([
1984
1837
  index.SyncWithStore()
1985
1838
  ], RtkMenuItem.prototype, "t", void 0);
1986
1839
  RtkMenuItem.style = RtkMenuItemStyle0;
1987
1840
 
1988
- const rtkMenuListCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:-moz-max-content;width:max-content;flex-direction:column;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-1000, 255 255 255));border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-backdrop-filter:blur(60px);backdrop-filter:blur(60px)}:host(.primary){--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.3)}";
1841
+ const rtkMenuListCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:-moz-max-content;width:max-content;flex-direction:column;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-1000, 255 255 255));border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);backdrop-filter:blur(60px)}:host(.primary){--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}";
1989
1842
  const RtkMenuListStyle0 = rtkMenuListCss;
1990
1843
 
1991
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1844
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1992
1845
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1993
1846
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1994
1847
  r = Reflect.decorate(decorators, target, key, desc);
@@ -2009,21 +1862,21 @@ const RtkMenuList = class {
2009
1862
  this.t = uiStore.useLanguage();
2010
1863
  }
2011
1864
  render() {
2012
- return (index$1.h(index$1.Host, { key: 'b743da0bae39c93cff7896968a64c84166b8a751', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: '46ca973e68fccbf5c8c7544f61bb9745840d0054' })));
1865
+ return (index$1.h(index$1.Host, { key: '0ac5ed2be7991106090b3ca0aa5a66a59f0e8250', class: { [this.menuVariant]: true } }, index$1.h("slot", { key: 'cd8312cfd2de7eeb7d590e4189f482d620f59ef8' })));
2013
1866
  }
2014
1867
  };
2015
- __decorate$4([
1868
+ __decorate$5([
2016
1869
  index.SyncWithStore()
2017
1870
  ], RtkMenuList.prototype, "iconPack", void 0);
2018
- __decorate$4([
1871
+ __decorate$5([
2019
1872
  index.SyncWithStore()
2020
1873
  ], RtkMenuList.prototype, "t", void 0);
2021
1874
  RtkMenuList.style = RtkMenuListStyle0;
2022
1875
 
2023
- const rtkMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.avatar{display:none}rtk-menu{position:absolute;right:var(--rtk-space-1, 4px);top:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-lg, 12px)}rtk-menu rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);cursor:pointer}.actions{display:flex;align-items:center;justify-content:center;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));padding:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none}.actions rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming rtk-avatar{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.incoming .actions{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}@media (min-width: 400px){.avatar{display:flex;width:var(--rtk-space-6, 24px)}.avatar rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px);font-size:10px;overflow:clip;border-radius:9999px}}@media (hover: hover){rtk-menu{visibility:hidden}.body:hover rtk-menu{visibility:visible}}";
1876
+ const rtkMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming .metadata{margin-top:var(--rtk-space-2, 8px);display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.metadata-content{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px)}.avatar{display:none}rtk-menu{position:absolute;right:var(--rtk-space-1, 4px);top:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-lg, 12px)}rtk-menu rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);cursor:pointer}.actions{display:flex;align-items:center;justify-content:center;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));padding:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none}.actions rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming rtk-avatar{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.incoming .actions{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}@media (min-width: 400px){.avatar{display:flex;width:var(--rtk-space-6, 24px)}.avatar rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px);font-size:10px;overflow:clip;border-radius:9999px}}@media (hover: hover){rtk-menu{visibility:hidden}.body:hover rtk-menu{visibility:visible}}";
2024
1877
  const RtkMessageViewStyle0 = rtkMessageViewCss;
2025
1878
 
2026
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1879
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2027
1880
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2028
1881
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2029
1882
  r = Reflect.decorate(decorators, target, key, desc);
@@ -2057,18 +1910,22 @@ const RtkMessageView = class {
2057
1910
  this.iconPack = uiStore.defaultIconPack;
2058
1911
  }
2059
1912
  renderActions() {
2060
- return (index$1.h("rtk-menu", { placement: this.isSelf ? 'bottom-start' : 'bottom-end', offset: 1 }, index$1.h("button", { slot: "trigger", class: "actions" }, index$1.h("rtk-icon", { icon: this.iconPack.chevron_down })), index$1.h("rtk-menu-list", { menuVariant: this.isSelf ? 'primary' : 'secondary' }, this.actions.map((action) => (index$1.h("rtk-menu-item", { menuVariant: this.isSelf ? 'primary' : 'secondary', onClick: () => this.onAction.emit(action.id) }, action.icon && index$1.h("rtk-icon", { icon: action.icon, slot: "start" }), action.label))))));
1913
+ return (index$1.h("rtk-menu", { placement: this.isSelf ? 'bottom-start' : 'bottom-end', offset: 1 }, index$1.h("button", { slot: "trigger", class: "actions" }, index$1.h("rtk-icon", { icon: this.iconPack.chevron_down })), index$1.h("rtk-menu-list", { menuVariant: this.isSelf ? 'primary' : 'secondary' }, this.actions.map((action) => {
1914
+ if (action.id === 'edit_message' && this.messageType !== 'text')
1915
+ return;
1916
+ return (index$1.h("rtk-menu-item", { menuVariant: this.isSelf ? 'primary' : 'secondary', onClick: () => this.onAction.emit(action.id) }, action.icon && index$1.h("rtk-icon", { icon: action.icon, slot: "start" }), action.label));
1917
+ }))));
2061
1918
  }
2062
1919
  render() {
2063
- return (index$1.h(index$1.Host, { key: '7a4f7b9cd801a12871077b56c96213d6c7f53685' }, index$1.h("div", { key: '2b1731b82f709cf90f6d7ab239a8a516886de227', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (index$1.h("aside", { key: '9963f792a5475c74e8170c0baec328162828163d', class: "avatar", part: "avatar" }, index$1.h("rtk-avatar", { key: 'e09b73fbba38f108809e6444940e8053c71a0276', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), index$1.h("div", { key: 'cdd752fa1553c5977251dcb0a32ecc5b65984514', class: "message", part: "message" }, !this.hideAuthorName && (index$1.h("div", { key: 'd0a758ac727a0a9b1757e8a61caf57bfadc20d08', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), index$1.h("div", { key: '32687e9a0462eaad2d625eb93d82205a23f99f51', class: { body: true, bubble: this.variant === 'bubble' } }, index$1.h("slot", { key: 'ca2022939cb8becf5d81655a37e344ff930a3251' }), !this.hideMetadata && !!this.time && (index$1.h("div", { key: '11dec318a44909b3080dcd29b3a6c4074ce394e3', class: "metadata", title: date.formatDateTime(this.time) }, this.pinned && index$1.h("rtk-icon", { key: '7a68a35c7113407f3676ee09de42fcab50485f39', icon: this.iconPack.pin, size: "sm" }), date.elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
1920
+ return (index$1.h(index$1.Host, { key: '3d53fc59bda6a82e4c4753e34f915c8f62611f6b' }, index$1.h("div", { key: '1f9cbd79c9e5526645fafd0c4436b91c6c612f08', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (index$1.h("aside", { key: '23071b4dff9dd4ecc1385be9a1610ffbab98a9e9', class: "avatar", part: "avatar" }, index$1.h("rtk-avatar", { key: '9a4596ea3636188ef391e65f86d6a608b3aa02d5', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), index$1.h("div", { key: 'eefe1bf5803e371266a0b8ee230dd2f42a193dc2', class: "message", part: "message" }, !this.hideAuthorName && (index$1.h("div", { key: '45ba437f7a3ba2b253f22a1885d7e5be954a387e', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), index$1.h("div", { key: 'e9636fb45358423d5cc4e8144b6b47cf065117cc', class: { body: true, bubble: this.variant === 'bubble' } }, index$1.h("slot", { key: '1d6cd92eb8d4514b7ae4266fae8cd060a56ac1e3' }), !this.hideMetadata && !!this.time && (index$1.h("div", { key: '77b29974a960e4b4809025305ce005aeab8edebc', class: "metadata", title: date.formatDateTime(this.time) }, this.pinned && (index$1.h("span", { key: 'e6b99085f2cbcbc9505c20e5407a98c382306614', class: "metadata-content" }, index$1.h("rtk-icon", { key: '45ad875ef38b1db0105c85659cf938cc9bd792d8', icon: this.iconPack.pin, size: "sm" }), " \u2022")), this.isEdited && (index$1.h("span", { key: '48d5ecd659fe2308d8c33e94a2216049a2bea5ef', class: "metadata-content" }, index$1.h("span", { key: '9203ff6d3f65b81b875f5bc17231fd2c65c1c2c2' }, "Edited"), " \u2022")), date.elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
2064
1921
  }
2065
1922
  };
2066
- __decorate$3([
1923
+ __decorate$4([
2067
1924
  index.SyncWithStore()
2068
1925
  ], RtkMessageView.prototype, "iconPack", void 0);
2069
1926
  RtkMessageView.style = RtkMessageViewStyle0;
2070
1927
 
2071
- const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh);transform:translateY(20px)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{position:absolute;bottom:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px);display:flex;flex-direction:column-reverse}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
1928
+ const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;flex-direction:column;flex:1}:host(.chat-selector-paginated-list) .container{box-sizing:border-box;display:flex;flex-direction:column;padding:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}:host(.chat-selector-paginated-list) .private-chat-label{display:flex;width:100%;cursor:pointer;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px)}:host(.chat-selector-paginated-list) .private-chat-label rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host(.chat-selector-paginated-list) .show-new-messages-ctr.active{display:none}.private-chat-unread-badge{height:var(--rtk-space-2, 8px);width:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}:host(.pinned-message-selector-paginated-list) .container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}:host(.pinned-message-selector-paginated-list) .page{position:relative;box-sizing:border-box}:host(.pinned-message-selector-paginated-list) .pinned-message{box-sizing:border-box;display:flex;width:100%;cursor:pointer;flex-direction:row;overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px)}:host(.pinned-message-selector-paginated-list) .pinned-message:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}:host(.pinned-message-selector-paginated-list) .pinned-message-container{display:flex;width:100%;flex-direction:row;align-items:flex-start;padding:var(--rtk-space-2, 8px)}:host(.pinned-message-selector-paginated-list) .pinned-message-content{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);display:flex;min-width:var(--rtk-space-0, 0px);flex:1 1 0%;flex-direction:column}:host(.pinned-message-selector-paginated-list) .pinned-message-time{font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}:host(.pinned-message-selector-paginated-list) .pinned-message-preview{margin-bottom:var(--rtk-space-2, 8px);word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}:host(.pinned-message-selector-paginated-list) rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh);transform:translateY(20px)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{position:absolute;bottom:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px);display:flex;flex-direction:column-reverse}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
2072
1929
  const RtkPaginatedListStyle0 = rtkPaginatedListCss;
2073
1930
 
2074
1931
  /**
@@ -2097,7 +1954,7 @@ const RtkPaginatedListStyle0 = rtkPaginatedListCss;
2097
1954
  * - If page is empty, delete it
2098
1955
  * - Update timestamp curors
2099
1956
  */
2100
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1957
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2101
1958
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2102
1959
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2103
1960
  r = Reflect.decorate(decorators, target, key, desc);
@@ -2110,6 +1967,12 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
2110
1967
  const RtkPaginatedList = class {
2111
1968
  constructor(hostRef) {
2112
1969
  index$1.registerInstance(this, hostRef);
1970
+ // Timestamp pertaining to the oldest stored message
1971
+ this.oldestPaginatedTimestamp = 0;
1972
+ // Timestamp pertaining to the latest stored message
1973
+ this.latestPaginatedTimestamp = null;
1974
+ // Timestamp pertaining to the latest message stored in backend
1975
+ this.latestMessageTimestamp = null;
2113
1976
  // the length of pages will always be pageSize + 2
2114
1977
  this.pages = [];
2115
1978
  // Controls whether to keep auto-scrolling when a new page load.
@@ -2134,6 +1997,12 @@ const RtkPaginatedList = class {
2134
1997
  return rect.top >= 0 && rect.bottom <= window.innerHeight;
2135
1998
  };
2136
1999
  }
2000
+ /**
2001
+ * Rerender paginated list
2002
+ */
2003
+ async rerenderList() {
2004
+ this.rerenderBoolean = !this.rerenderBoolean;
2005
+ }
2137
2006
  /**
2138
2007
  * Adds a new node to the beginning of the paginated list
2139
2008
  * @param {DataNode} node - The data node to add to the beginning of the list
@@ -2141,33 +2010,33 @@ const RtkPaginatedList = class {
2141
2010
  async onNewNode(node) {
2142
2011
  // if there are no pages, append to the first page
2143
2012
  if (this.pages.length < 1) {
2144
- this.oldTS = node.timeMs;
2013
+ this.oldestPaginatedTimestamp = node.timeMs;
2145
2014
  this.pages.unshift([node]);
2146
- this.newTS = node.timeMs;
2147
- this.maxTS = node.timeMs;
2015
+ this.latestPaginatedTimestamp = node.timeMs;
2016
+ this.latestMessageTimestamp = node.timeMs;
2148
2017
  this.rerender();
2149
2018
  if (this.autoScroll)
2150
2019
  this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
2151
2020
  }
2152
- else if (this.maxTS === this.newTS) {
2153
- this.maxTS = node.timeMs;
2021
+ else if (this.latestMessageTimestamp === this.latestPaginatedTimestamp) {
2154
2022
  // append messages to the page if page has not reached full capacity
2155
2023
  if (this.pages[0].length < this.pageSize) {
2156
2024
  this.pages[0].unshift(node);
2157
- this.newTS = node.timeMs;
2025
+ this.latestPaginatedTimestamp = node.timeMs;
2026
+ this.latestMessageTimestamp = node.timeMs;
2158
2027
  this.rerender();
2159
2028
  }
2160
2029
  else {
2161
2030
  // if page is at full capacity, load next page
2162
2031
  this.pages.unshift([node]);
2163
- this.newTS = node.timeMs;
2032
+ this.latestPaginatedTimestamp = node.timeMs;
2033
+ this.latestMessageTimestamp = node.timeMs;
2164
2034
  // remove pages if out of bounds
2165
2035
  if (this.pages.length > this.pagesAllowed)
2166
2036
  this.pages.pop();
2167
2037
  // update timestamps
2168
2038
  const lastPage = this.pages[this.pages.length - 1];
2169
- this.oldTS = lastPage[lastPage.length - 1].timeMs;
2170
- this.newTS = this.pages[0][0].timeMs;
2039
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
2171
2040
  this.rerender();
2172
2041
  }
2173
2042
  if (this.autoScroll)
@@ -2198,11 +2067,11 @@ const RtkPaginatedList = class {
2198
2067
  // update timestamps
2199
2068
  const firstPage = this.pages[0];
2200
2069
  const lastPage = this.pages[this.pages.length - 1];
2201
- this.newTS = (_a = firstPage === null || firstPage === void 0 ? void 0 : firstPage[0]) === null || _a === void 0 ? void 0 : _a.timeMs;
2202
- this.oldTS = (_b = lastPage === null || lastPage === void 0 ? void 0 : lastPage[lastPage.length - 1]) === null || _b === void 0 ? void 0 : _b.timeMs;
2203
- // if I have deleted the latest message, update maxTS
2070
+ this.latestPaginatedTimestamp = (_a = firstPage === null || firstPage === void 0 ? void 0 : firstPage[0]) === null || _a === void 0 ? void 0 : _a.timeMs;
2071
+ this.oldestPaginatedTimestamp = (_b = lastPage === null || lastPage === void 0 ? void 0 : lastPage[lastPage.length - 1]) === null || _b === void 0 ? void 0 : _b.timeMs;
2072
+ // if I have deleted the latest message, update latestMessageTimestamp
2204
2073
  if (index === 0 && i === 0)
2205
- this.maxTS = this.newTS;
2074
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2206
2075
  this.rerender();
2207
2076
  break;
2208
2077
  }
@@ -2219,11 +2088,31 @@ const RtkPaginatedList = class {
2219
2088
  if (index === -1)
2220
2089
  continue;
2221
2090
  // edit message
2222
- this.pages[i][index] = node;
2091
+ this.pages[i][index] = Object.assign(Object.assign({}, this.pages[i][index]), node);
2223
2092
  this.rerender();
2224
2093
  break;
2225
2094
  }
2226
2095
  }
2096
+ /**
2097
+ * Resets the paginated list to a given timestamp
2098
+ */
2099
+ async reset(timestamp = 0) {
2100
+ this.oldestPaginatedTimestamp = timestamp;
2101
+ this.latestPaginatedTimestamp = null;
2102
+ this.pages = [];
2103
+ this.shouldScrollToBottom = false;
2104
+ this.showNewMessagesCTR = false;
2105
+ this.pendingScrollAnchor = null;
2106
+ this.isLoading = false;
2107
+ this.isLoadingTop = false;
2108
+ this.isLoadingBottom = false;
2109
+ if (timestamp === 0) {
2110
+ // preserve latestMessageTimestamp if reseting to a particular message
2111
+ this.latestMessageTimestamp = null;
2112
+ }
2113
+ this.rerender();
2114
+ await this.loadPrevPage();
2115
+ }
2227
2116
  connectedCallback() {
2228
2117
  this.rerender = debounce.debounce(this.rerender.bind(this), 50, { maxWait: 200 });
2229
2118
  }
@@ -2236,7 +2125,8 @@ const RtkPaginatedList = class {
2236
2125
  if (this.shouldScrollToBottom)
2237
2126
  return;
2238
2127
  // handle top and bottom scroll
2239
- if (this.isInView(this.$bottomRef)) {
2128
+ if (this.isInView(this.$bottomRef) &&
2129
+ this.latestMessageTimestamp > this.latestPaginatedTimestamp) {
2240
2130
  await this.loadNextPage();
2241
2131
  }
2242
2132
  else if (this.isInView(this.$topRef)) {
@@ -2257,13 +2147,13 @@ const RtkPaginatedList = class {
2257
2147
  if (this.isLoading)
2258
2148
  return;
2259
2149
  const scrollAnchor = this.getScrollAnchor('top');
2260
- // if no old timestamp, it means we are at initial state
2261
- if (!this.oldTS)
2262
- this.oldTS = new Date().getTime();
2150
+ // if old timestamp is 0, it means we are at initial state
2151
+ if (this.oldestPaginatedTimestamp === 0)
2152
+ this.oldestPaginatedTimestamp = new Date().getTime();
2263
2153
  // load data
2264
2154
  this.isLoading = true;
2265
2155
  this.isLoadingTop = true;
2266
- const data = await this.fetchData(this.oldTS - 1, this.pageSize, true);
2156
+ const data = await this.fetchData(this.oldestPaginatedTimestamp - 1, this.pageSize, true);
2267
2157
  this.isLoading = false;
2268
2158
  this.isLoadingTop = false;
2269
2159
  // no more old messages to show, we are at the top of the page
@@ -2276,10 +2166,10 @@ const RtkPaginatedList = class {
2276
2166
  this.pages.shift();
2277
2167
  // update timestamps
2278
2168
  const lastPage = this.pages[this.pages.length - 1];
2279
- this.oldTS = lastPage[lastPage.length - 1].timeMs;
2280
- this.newTS = this.pages[0][0].timeMs;
2281
- if (!this.maxTS)
2282
- this.maxTS = this.newTS;
2169
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
2170
+ this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
2171
+ if (!this.latestMessageTimestamp)
2172
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2283
2173
  this.rerender();
2284
2174
  // fix scroll position
2285
2175
  if (scrollAnchor)
@@ -2289,19 +2179,19 @@ const RtkPaginatedList = class {
2289
2179
  if (this.isLoading)
2290
2180
  return [];
2291
2181
  // Do nothing. New timestamp needs to be assigned by loadPrevPage method
2292
- if (!this.newTS) {
2182
+ if (!this.latestPaginatedTimestamp) {
2293
2183
  this.showNewMessagesCTR = false;
2294
2184
  return [];
2295
2185
  }
2296
2186
  this.isLoading = true;
2297
2187
  this.isLoadingBottom = true;
2298
2188
  const scrollAnchor = this.getScrollAnchor('bottom');
2299
- const data = await this.fetchData(this.newTS + 1, this.pageSize, false);
2189
+ const data = await this.fetchData(this.latestPaginatedTimestamp + 1, this.pageSize, false);
2300
2190
  this.isLoading = false;
2301
2191
  this.isLoadingBottom = false;
2302
2192
  // no more new messages to load
2303
2193
  if (!data.length) {
2304
- this.maxTS = this.newTS;
2194
+ this.latestMessageTimestamp = this.latestPaginatedTimestamp;
2305
2195
  this.showNewMessagesCTR = false;
2306
2196
  return [];
2307
2197
  }
@@ -2323,8 +2213,8 @@ const RtkPaginatedList = class {
2323
2213
  this.pages.pop();
2324
2214
  // update timestamps
2325
2215
  const lastPage = this.pages[this.pages.length - 1];
2326
- this.oldTS = lastPage[lastPage.length - 1].timeMs;
2327
- this.newTS = this.pages[0][0].timeMs;
2216
+ this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
2217
+ this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
2328
2218
  this.rerender();
2329
2219
  this.pendingScrollAnchor = scrollAnchor;
2330
2220
  return data;
@@ -2396,22 +2286,178 @@ const RtkPaginatedList = class {
2396
2286
  this.rerenderBoolean = !this.rerenderBoolean;
2397
2287
  }
2398
2288
  render() {
2289
+ var _a;
2399
2290
  /**
2400
2291
  * div.container is flex=column-reversewhich is why div#bottom-scroll comes before div#top-scroll
2401
2292
  */
2402
- return (index$1.h(index$1.Host, { key: '3e7a77a4254ea0c75513edeaf72a5a77cee0e913' }, index$1.h("div", { key: 'f61e72e7a447048fe17ed8321a077841f991bfc5', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, index$1.h("div", { key: '9efd0543b48b5ad5e147a763d258f7ef1a5024c5', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, index$1.h("rtk-button", { key: '4b9bfda38538ceb89f31f317ddcb15d24f75ae8e', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2293
+ return (index$1.h(index$1.Host, { key: 'bff4fc91b737334c5764e690fbf2adafa1444408' }, index$1.h("div", { key: 'f4efa98ef0bd178602ee03718d35fcb833487909', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, index$1.h("div", { key: '37403f6462812a6662efa9577ae9ed43d27f63d6', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, index$1.h("rtk-button", { key: 'ee7e04e6281370dddb1b1e10b753e96dc602d42a', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2403
2294
  this.scrollToBottom();
2404
- } }, index$1.h("rtk-icon", { key: 'fbcbc895940c8046916a2382806fb403e83a0a53', icon: this.iconPack.chevron_down }))), index$1.h("div", { key: 'fe2e51385216cba1905c75db783f037953e4831e', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && index$1.h("rtk-spinner", { key: '548899e797bbf139526208df3c7696b5859cc884', size: "sm" }), this.isLoading && this.pages.length < 1 && index$1.h("rtk-spinner", { key: '6353d5970e284369c274c28fc3c774d03fd555cc', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (index$1.h("div", { class: "empty-list" }, this.t('list.empty'))) : (index$1.h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (index$1.h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && index$1.h("rtk-spinner", { key: 'ff7b4e80f27610c0b73b63ea32fa5331b0cf4630', size: "sm" }), index$1.h("div", { key: '8729bf082cde39f7b154fa5816a70b6fb2c7f7df', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2295
+ } }, this.shouldScrollToBottom ? (index$1.h("rtk-spinner", { size: "sm" })) : (index$1.h("rtk-icon", { icon: this.iconPack.chevron_down })))), index$1.h("div", { key: '91bcdadd2518313fa06306a172575f5acc786596', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && index$1.h("rtk-spinner", { key: '932af19af69c3ecd5af22dd3051a5eea5cb25e7a', size: "sm" }), this.isLoading && this.pages.length < 1 && index$1.h("rtk-spinner", { key: '9fa60fb784a09800a32a3accdc81d940476330d2', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (index$1.h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (index$1.h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (index$1.h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && index$1.h("rtk-spinner", { key: '73103f58338bdb89be69f9f6dc742e3cdd2c95d8', size: "sm" }), index$1.h("div", { key: '9c4c43ffb6442d58040448fe1b2d7332505fc81e', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2405
2296
  }
2406
2297
  };
2407
- __decorate$2([
2298
+ __decorate$3([
2408
2299
  index.SyncWithStore()
2409
2300
  ], RtkPaginatedList.prototype, "iconPack", void 0);
2410
- __decorate$2([
2301
+ __decorate$3([
2411
2302
  index.SyncWithStore()
2412
2303
  ], RtkPaginatedList.prototype, "t", void 0);
2413
2304
  RtkPaginatedList.style = RtkPaginatedListStyle0;
2414
2305
 
2306
+ const rtkPinnedMessageSelectorCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;width:100%;flex-direction:column;font-size:14px;position:relative;box-sizing:border-box;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.chat-header{position:relative;margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);cursor:pointer;gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));border-radius:var(--rtk-border-radius-sm, 4px);border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}.chat-header-label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px)}.dropdown{position:absolute;top:100%;z-index:10;padding:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));opacity:0;pointer-events:none;border-bottom-right-radius:var(--rtk-border-radius-sm, 4px);border-bottom-left-radius:var(--rtk-border-radius-sm, 4px);left:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);max-width:calc(100vw - var(--rtk-space-4, 16px));box-sizing:border-box}.dropdown.open{opacity:1;pointer-events:auto;border-width:1px;border-top-width:var(--rtk-border-width-none, 0);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity))}.dropdown rtk-paginated-list{box-sizing:border-box;display:flex;height:30vh;flex-direction:column}";
2307
+ const RtkPinnedMessageSelectorStyle0 = rtkPinnedMessageSelectorCss;
2308
+
2309
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2310
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2311
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2312
+ r = Reflect.decorate(decorators, target, key, desc);
2313
+ else
2314
+ for (var i = decorators.length - 1; i >= 0; i--)
2315
+ if (d = decorators[i])
2316
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2317
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2318
+ };
2319
+ const RtkPinnedMessageSelector = class {
2320
+ constructor(hostRef) {
2321
+ index$1.registerInstance(this, hostRef);
2322
+ this.dropdownToggle = index$1.createEvent(this, "rtkDropdownToggle", 7);
2323
+ this.pinnedMessageSelect = index$1.createEvent(this, "rtkPinnedMessageSelect", 7);
2324
+ this.isOpen = false;
2325
+ /** Icon pack */
2326
+ this.iconPack = uiStore.defaultIconPack;
2327
+ /** Language */
2328
+ this.t = uiStore.useLanguage();
2329
+ //NOTE(ikabra): Fix this value once backend supports pagination for participants
2330
+ this.pageSize = 25;
2331
+ this.pagesAllowed = 3;
2332
+ this.showPinnedMessages = true;
2333
+ this.toggle = (e) => {
2334
+ e.preventDefault();
2335
+ e.stopPropagation();
2336
+ this.isOpen = !this.isOpen;
2337
+ this.dropdownToggle.emit({ open: this.isOpen });
2338
+ };
2339
+ this.getPinnedChatMessages = async (timestamp, size, reversed) => {
2340
+ const localMeeting = this.meeting;
2341
+ if (!localMeeting)
2342
+ return [];
2343
+ try {
2344
+ const messages = await localMeeting.chat.fetchPinnedMessages({
2345
+ timestamp,
2346
+ limit: size,
2347
+ direction: reversed ? 'before' : 'after',
2348
+ });
2349
+ return messages;
2350
+ }
2351
+ catch (err) {
2352
+ return [];
2353
+ }
2354
+ };
2355
+ this.createPinnedChatNodes = (messages) => {
2356
+ return messages.map((message) => {
2357
+ const preview = message.type === 'text'
2358
+ ? (message.message || '').replace(/\s+/g, ' ').trim()
2359
+ : message.type === 'file'
2360
+ ? 'File Attachment'
2361
+ : message.type === 'image'
2362
+ ? 'Image Attachment'
2363
+ : '';
2364
+ return (index$1.h("div", { class: "pinned-message", id: message.id, onClick: () => {
2365
+ this.pinnedMessageSelect.emit(message);
2366
+ this.close();
2367
+ } }, index$1.h("div", { class: "pinned-message-container" }, index$1.h("rtk-avatar", { size: "sm", participant: {
2368
+ name: message.displayName,
2369
+ picture: '',
2370
+ } }), index$1.h("div", { class: "pinned-message-content" }, index$1.h("div", { class: "pinned-message-preview", title: preview }, preview), index$1.h("div", { class: "pinned-message-meta" }, index$1.h("span", { class: "pinned-message-time" }, date.elapsedDuration(message.time, new Date(Date.now()))))))));
2371
+ });
2372
+ };
2373
+ this.pinChatListener = (data) => {
2374
+ var _a, _b;
2375
+ if (((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length) > 0) {
2376
+ // pinned messages are not supported for private chat
2377
+ return;
2378
+ }
2379
+ /**
2380
+ * FIXME(ikabra): This is a temporary hack to refresh the list when a new message is pinned.
2381
+ * This is done to avoid duplicate messages in the list.
2382
+ * Fix is being implemented by socket where they are updating the `updatedAt` timestamp when the message is pinned.
2383
+ */
2384
+ (_b = this.$paginatedListRef) === null || _b === void 0 ? void 0 : _b.reset();
2385
+ };
2386
+ this.unpinChatListener = async (data) => {
2387
+ var _a, _b;
2388
+ if (((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length) > 0) {
2389
+ // pinned messages are not supported for private chat
2390
+ return;
2391
+ }
2392
+ (_b = this.$paginatedListRef) === null || _b === void 0 ? void 0 : _b.onNodeDelete(data.message.id);
2393
+ };
2394
+ this.chatUpdateListener = async (data) => {
2395
+ if (data.action !== 'delete')
2396
+ return;
2397
+ this.unpinChatListener(data);
2398
+ };
2399
+ }
2400
+ connectedCallback() {
2401
+ this.meetingChanged(this.meeting);
2402
+ }
2403
+ disconnectedCallback() {
2404
+ this.disconnectMeeting(this.meeting);
2405
+ }
2406
+ disconnectMeeting(meeting) {
2407
+ var _a, _b, _c;
2408
+ (_a = meeting.chat) === null || _a === void 0 ? void 0 : _a.removeListener('pinMessage', this.pinChatListener);
2409
+ (_b = meeting.chat) === null || _b === void 0 ? void 0 : _b.removeListener('unpinMessage', this.unpinChatListener);
2410
+ (_c = meeting.chat) === null || _c === void 0 ? void 0 : _c.removeListener('chatUpdate', this.chatUpdateListener);
2411
+ }
2412
+ meetingChanged(meeting, oldMeeting) {
2413
+ var _a, _b, _c, _d;
2414
+ if (oldMeeting)
2415
+ this.disconnectMeeting(oldMeeting);
2416
+ if (!meeting)
2417
+ return;
2418
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.reset();
2419
+ (_b = meeting.chat) === null || _b === void 0 ? void 0 : _b.addListener('pinMessage', this.pinChatListener);
2420
+ (_c = meeting.chat) === null || _c === void 0 ? void 0 : _c.addListener('unpinMessage', this.unpinChatListener);
2421
+ (_d = meeting.chat) === null || _d === void 0 ? void 0 : _d.addListener('chatUpdate', this.chatUpdateListener);
2422
+ }
2423
+ /** */
2424
+ async close() {
2425
+ if (!this.isOpen)
2426
+ return;
2427
+ this.isOpen = false;
2428
+ this.dropdownToggle.emit({ open: false });
2429
+ }
2430
+ async onChatSelectorChange(event) {
2431
+ var _a;
2432
+ const selectedUser = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.selectedUser;
2433
+ // Everyone
2434
+ if (!selectedUser) {
2435
+ this.showPinnedMessages = true;
2436
+ }
2437
+ else {
2438
+ this.showPinnedMessages = false;
2439
+ }
2440
+ }
2441
+ render() {
2442
+ if (!this.showPinnedMessages)
2443
+ return null;
2444
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: "chat-header", onClick: this.toggle }, index$1.h("div", { class: "chat-header-label" }, index$1.h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }), this.t('chat.pinned_msgs')), index$1.h("div", { class: "chevron" }, index$1.h("rtk-icon", { icon: this.isOpen ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" }))), index$1.h("div", { class: { dropdown: true, open: this.isOpen, scrollbar: true } }, index$1.h("rtk-paginated-list", { class: "pinned-message-selector-paginated-list", ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getPinnedChatMessages, createNodes: this.createPinnedChatNodes, emptyListLabel: this.t('chat.empty_search') }, index$1.h("slot", null)))));
2445
+ }
2446
+ static get watchers() { return {
2447
+ "meeting": ["meetingChanged"]
2448
+ }; }
2449
+ };
2450
+ __decorate$2([
2451
+ index.SyncWithStore()
2452
+ ], RtkPinnedMessageSelector.prototype, "meeting", void 0);
2453
+ __decorate$2([
2454
+ index.SyncWithStore()
2455
+ ], RtkPinnedMessageSelector.prototype, "iconPack", void 0);
2456
+ __decorate$2([
2457
+ index.SyncWithStore()
2458
+ ], RtkPinnedMessageSelector.prototype, "t", void 0);
2459
+ RtkPinnedMessageSelector.style = RtkPinnedMessageSelectorStyle0;
2460
+
2415
2461
  const rtkSpinnerCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:block;height:var(--rtk-space-10, 40px);width:var(--rtk-space-10, 40px);--rtk-spinner-color:currentColor}.spinner{height:100%;width:100%}@keyframes spin{to{transform:rotate(360deg)}}.spinner{animation:spin 1s linear infinite;border-radius:9999px;background-color:transparent;animation-duration:1.3s}:host([size='md']){height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']){height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px)}";
2416
2462
  const RtkSpinnerStyle0 = rtkSpinnerCss;
2417
2463
 
@@ -2434,7 +2480,7 @@ const RtkSpinner = class {
2434
2480
  this.size = 'md';
2435
2481
  }
2436
2482
  render() {
2437
- return (index$1.h(index$1.Host, { key: 'c042cbd31d8fa9e58c0cbbc5646575a3172fc824' }, index$1.h("rtk-icon", { key: '0171ba3d5f7506e2c67eb813c5ad5b263352088d', class: "spinner", icon: this.iconPack.spinner })));
2483
+ return (index$1.h(index$1.Host, { key: 'f9f0f938827fb04712fb9f406fb07d48c398865a' }, index$1.h("rtk-icon", { key: 'a2daa23191ea94007c8a980f221409c6dfe35d03', class: "spinner", icon: this.iconPack.spinner })));
2438
2484
  }
2439
2485
  };
2440
2486
  __decorate$1([
@@ -2512,7 +2558,7 @@ const RtkTextComposerView = class {
2512
2558
  }
2513
2559
  }
2514
2560
  render() {
2515
- return (index$1.h("div", { key: 'e5f7fa2bd4a2386ff5185001981477ccacf24556', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (index$1.h("div", { key: '4c06c853ddc7bebafe45fdb2e2c5c9e1c20021fe', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, index$1.h("rtk-icon", { key: '524037dc257f0aea206fbc3503d1fe1cb03449be', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.maxLengthBreached, " / ", this.maxLength, " ", this.t('chat.max_limit_warning'))), this.rateLimitBreached && (index$1.h("div", { key: 'cf975664f367f2621593239ab1cf2e73f5acdb45', class: 'text-error breached' }, index$1.h("rtk-icon", { key: '70a6555f1fa9752f91951181b46e0ed0e7eb8679', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), index$1.h("textarea", { key: '7fc7280dd143cd701d5037e04c2b36c3ea8ec023', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
2561
+ return (index$1.h("div", { key: '38a6c64bb92fd72f76109e0d55c04c00a77bb43a', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (index$1.h("div", { key: 'b3d3ed9cd0694edf05cb7ccda50dc8f6157315ef', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, index$1.h("rtk-icon", { key: 'c5cd3e9887e90970729dc808413997bc17835ae6', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.maxLengthBreached, " / ", this.maxLength, " ", this.t('chat.max_limit_warning'))), this.rateLimitBreached && (index$1.h("div", { key: 'fd2c53dc324defba567638782d2fafd66f9be11b', class: 'text-error breached' }, index$1.h("rtk-icon", { key: '7f60d2b74f45a7c4e4cbe422066803ff750fa5ef', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), index$1.h("textarea", { key: 'd60bd094237e82a8a66e5afd6be464a242f43afa', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
2516
2562
  }
2517
2563
  };
2518
2564
  __decorate([
@@ -2533,7 +2579,7 @@ const RtkTextMessageView = class {
2533
2579
  this.isMarkdown = false;
2534
2580
  }
2535
2581
  render() {
2536
- return (index$1.h("p", { key: 'b4cbabb44d32f96a23cd72f108d6a36b05491c97', class: { text: true, emoji: string.hasOnlyEmojis(this.text) } }, this.isMarkdown ? index$1.h("rtk-markdown-view", { text: this.text }) : this.text));
2582
+ return (index$1.h("p", { key: '415dec939e8fa149f006a5c3afc4bafc11f911af', class: { text: true, emoji: string.hasOnlyEmojis(this.text) } }, this.isMarkdown ? index$1.h("rtk-markdown-view", { text: this.text }) : this.text));
2537
2583
  }
2538
2584
  };
2539
2585
  RtkTextMessageView.style = RtkTextMessageViewStyle0;
@@ -2639,7 +2685,7 @@ const RtkMenu = class {
2639
2685
  });
2640
2686
  }
2641
2687
  render() {
2642
- return (index$1.h(index$1.Host, { key: '5278137bc9b99d9fe9ffeb0fc30bd887d600494d' }, index$1.h("span", { key: 'cbefda068a15340dad76668c3696a10bd94cb8e9', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, index$1.h("slot", { key: 'f160cf29ece64145e795a9a11459bd458482c446' })), index$1.h("div", { key: '1056b2bbc8cbacd3c32280d334d9f703a578b5ef', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, index$1.h("div", { key: '6c6816fa1b18d49fa22ab6ffb600aaa23c5b9ec5', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, index$1.h("slot", { key: '3c2d3425b2e8b4d810de2ce40394491c4698aede', name: "tooltip" }))));
2688
+ return (index$1.h(index$1.Host, { key: 'ce9cb2211743e50c83b7f572b2e9dc5b02fa3ac8' }, index$1.h("span", { key: '74f73894f5a62519b3bf8c03a83e7102092ccd5c', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, index$1.h("slot", { key: '4551b2a438b1c57ca68e4a2973529186063a13c2' })), index$1.h("div", { key: 'e3dd196c6ee225cb363bcf54d35836ff17ed5969', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, index$1.h("div", { key: '4eb8bb3af588160018ef9d8899afc09edf4b195d', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, index$1.h("slot", { key: 'c427ef3ef9953b764f9b1adcb4a8b7eee1fe91cd', name: "tooltip" }))));
2643
2689
  }
2644
2690
  static get watchers() { return {
2645
2691
  "open": ["openChanged"]
@@ -2649,10 +2695,11 @@ RtkMenu.style = RtkTooltipStyle0;
2649
2695
 
2650
2696
  exports.rtk_avatar = RtkAvatar;
2651
2697
  exports.rtk_button = RtkButton;
2652
- exports.rtk_channel_selector_view = RtkChannelSelectorView;
2653
2698
  exports.rtk_chat = RtkChat;
2654
2699
  exports.rtk_chat_composer_view = RtkChatComposerView;
2700
+ exports.rtk_chat_header = RtkChatHeader;
2655
2701
  exports.rtk_chat_messages_ui_paginated = RtkChatMessagesUiPaginated;
2702
+ exports.rtk_chat_selector = RtkChatSelector;
2656
2703
  exports.rtk_draft_attachment_view = RtkDraftAttachmentView;
2657
2704
  exports.rtk_emoji_picker = RtkEmojiPicker;
2658
2705
  exports.rtk_emoji_picker_button = RtkEmojiPickerButton;
@@ -2667,6 +2714,7 @@ exports.rtk_menu_item = RtkMenuItem;
2667
2714
  exports.rtk_menu_list = RtkMenuList;
2668
2715
  exports.rtk_message_view = RtkMessageView;
2669
2716
  exports.rtk_paginated_list = RtkPaginatedList;
2717
+ exports.rtk_pinned_message_selector = RtkPinnedMessageSelector;
2670
2718
  exports.rtk_spinner = RtkSpinner;
2671
2719
  exports.rtk_text_composer_view = RtkTextComposerView;
2672
2720
  exports.rtk_text_message_view = RtkTextMessageView;