isometrik-plugin-chat-sdk 1.3.19 → 2.0.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 (476) hide show
  1. package/dist/cjs/app-globals-61a8bfde.js +38 -0
  2. package/dist/cjs/app-globals-61a8bfde.js.map +1 -0
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js +122 -44
  4. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  5. package/dist/cjs/audio-bubble_4.cjs.entry.js +38 -8
  6. package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
  7. package/dist/cjs/chat-app.cjs.entry.js +2 -2
  8. package/dist/cjs/chat-app.cjs.entry.js.map +1 -1
  9. package/dist/cjs/{chat-creds-cf537d4b.js → chat-creds-2dbc4087.js} +3 -3
  10. package/dist/cjs/chat-creds-2dbc4087.js.map +1 -0
  11. package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
  12. package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
  13. package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
  14. package/dist/cjs/client-80851676.js +482 -0
  15. package/dist/cjs/client-80851676.js.map +1 -0
  16. package/dist/cjs/{contracts-31632812.js → contracts-dfc84075.js} +2 -2
  17. package/dist/cjs/contracts-dfc84075.js.map +1 -0
  18. package/dist/cjs/destroy-chat-7ae8fc99.js +24 -0
  19. package/dist/cjs/destroy-chat-7ae8fc99.js.map +1 -0
  20. package/dist/cjs/doublecheck-c2461adc.js +36 -0
  21. package/dist/cjs/doublecheck-c2461adc.js.map +1 -0
  22. package/dist/cjs/{drawer-28cc94a4.js → drawer-811d2ce8.js} +2 -2
  23. package/dist/cjs/{drawer-28cc94a4.js.map → drawer-811d2ce8.js.map} +1 -1
  24. package/dist/cjs/forward-memebers.cjs.entry.js +2 -2
  25. package/dist/cjs/forward-message.cjs.entry.js +2 -2
  26. package/dist/cjs/group-chat-contacts.cjs.entry.js +2 -2
  27. package/dist/cjs/{group-members-73ad1074.js → group-members-5a82ec8a.js} +1 -125
  28. package/dist/cjs/group-members-5a82ec8a.js.map +1 -0
  29. package/dist/cjs/{helpers-8061ec7d.js → helpers-154861e9.js} +2 -2
  30. package/dist/cjs/{helpers-8061ec7d.js.map → helpers-154861e9.js.map} +1 -1
  31. package/dist/cjs/{index-1a26d11d.js → index-66f98408.js} +2 -2
  32. package/dist/cjs/index-66f98408.js.map +1 -0
  33. package/dist/cjs/index.cjs.js +55 -182
  34. package/dist/cjs/index.cjs.js.map +1 -1
  35. package/dist/cjs/isometrik-webchat.cjs.js +10 -2
  36. package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
  37. package/dist/cjs/loader.cjs.js +10 -2
  38. package/dist/cjs/loader.cjs.js.map +1 -1
  39. package/dist/cjs/login-page_3.cjs.entry.js +689 -369
  40. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  41. package/dist/cjs/media-gallery.cjs.entry.js +1 -1
  42. package/dist/cjs/media-limits-eba42629.js +165 -0
  43. package/dist/cjs/media-limits-eba42629.js.map +1 -0
  44. package/dist/cjs/member-add.cjs.entry.js +3 -3
  45. package/dist/cjs/message-bubble.cjs.entry.js +30 -8
  46. package/dist/cjs/message-bubble.cjs.entry.js.map +1 -1
  47. package/dist/cjs/my-component.cjs.entry.js +1 -1
  48. package/dist/cjs/new-chat-sidebar.cjs.entry.js +2 -2
  49. package/dist/cjs/reaction-container.cjs.entry.js +4 -4
  50. package/dist/cjs/runtime-controls-201c71ba.js +650 -0
  51. package/dist/cjs/runtime-controls-201c71ba.js.map +1 -0
  52. package/dist/cjs/send-media-14908d4b.js +375 -0
  53. package/dist/cjs/send-media-14908d4b.js.map +1 -0
  54. package/dist/cjs/signup-page.cjs.entry.js +1 -1
  55. package/dist/cjs/{toast-0bf1e688.js → toast-f810e550.js} +8 -8
  56. package/dist/cjs/toast-f810e550.js.map +1 -0
  57. package/dist/collection/collection-manifest.json +2 -1
  58. package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
  59. package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
  60. package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
  61. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +61 -14
  62. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
  63. package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
  64. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +7 -6
  65. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  66. package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +39 -8
  67. package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js.map +1 -1
  68. package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +53 -3
  69. package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js.map +1 -1
  70. package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
  71. package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +19 -1
  72. package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js.map +1 -1
  73. package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble/incoming-text-message-bubble.js +1 -1
  74. package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +47 -7
  75. package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js.map +1 -1
  76. package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
  77. package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.stories.js +1 -1
  78. package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +19 -1
  79. package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js.map +1 -1
  80. package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
  81. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +20 -2
  82. package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
  83. package/dist/collection/components/my-component/my-component.js +1 -1
  84. package/dist/collection/components/my-component/web-chat/FLOW.js +1 -1
  85. package/dist/collection/components/my-component/web-chat/FLOW.js.map +1 -1
  86. package/dist/collection/components/my-component/web-chat/WebChat.js +113 -12
  87. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
  88. package/dist/collection/components/my-component/web-chat/bootstrap.js +7 -0
  89. package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
  90. package/dist/collection/components/my-component/web-chat/data-fetch.js +14 -5
  91. package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
  92. package/dist/collection/components/my-component/web-chat/mqtt-host.js +133 -34
  93. package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
  94. package/dist/collection/components/my-component/web-chat/offline-host.js +212 -0
  95. package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -0
  96. package/dist/collection/components/my-component/web-chat/public-send.js +96 -21
  97. package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
  98. package/dist/collection/components/my-component/web-chat/shell-render.js +47 -28
  99. package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
  100. package/dist/collection/components/theme-provider.js +114 -45
  101. package/dist/collection/components/theme-provider.js.map +1 -1
  102. package/dist/collection/constants/chat-creds.js +2 -2
  103. package/dist/collection/demos/custom-ui-demo-elements.js +2 -2
  104. package/dist/collection/demos/custom-ui-demo-elements.js.map +1 -1
  105. package/dist/collection/global/expose-sdk.js +29 -0
  106. package/dist/collection/global/expose-sdk.js.map +1 -0
  107. package/dist/collection/index.js +10 -141
  108. package/dist/collection/index.js.map +1 -1
  109. package/dist/collection/lib/chat/index.js +3 -0
  110. package/dist/collection/lib/chat/index.js.map +1 -1
  111. package/dist/collection/lib/chat/media-limits.js +21 -0
  112. package/dist/collection/lib/chat/media-limits.js.map +1 -0
  113. package/dist/collection/lib/chat/media-outbox.js +43 -0
  114. package/dist/collection/lib/chat/media-outbox.js.map +1 -0
  115. package/dist/collection/lib/chat/preview-kind.js +41 -0
  116. package/dist/collection/lib/chat/preview-kind.js.map +1 -0
  117. package/dist/collection/lib/chat/send-media.js +5 -2
  118. package/dist/collection/lib/chat/send-media.js.map +1 -1
  119. package/dist/collection/lib/custom-ui/contracts.js +1 -1
  120. package/dist/collection/lib/custom-ui/contracts.js.map +1 -1
  121. package/dist/collection/lib/custom-ui/index.js +1 -1
  122. package/dist/collection/lib/custom-ui/index.js.map +1 -1
  123. package/dist/collection/lib/custom-ui/public-api.js +1 -0
  124. package/dist/collection/lib/custom-ui/public-api.js.map +1 -1
  125. package/dist/collection/lib/destroy-chat.js +15 -16
  126. package/dist/collection/lib/destroy-chat.js.map +1 -0
  127. package/dist/collection/lib/mqtt/inbound-queue.js +17 -0
  128. package/dist/collection/lib/mqtt/inbound-queue.js.map +1 -0
  129. package/dist/collection/lib/mqtt/index.js +2 -1
  130. package/dist/collection/lib/mqtt/index.js.map +1 -1
  131. package/dist/collection/lib/mqtt/session.js +50 -6
  132. package/dist/collection/lib/mqtt/session.js.map +1 -1
  133. package/dist/collection/lib/offline/client.js +167 -0
  134. package/dist/collection/lib/offline/client.js.map +1 -0
  135. package/dist/collection/lib/offline/idb.js +181 -0
  136. package/dist/collection/lib/offline/idb.js.map +1 -0
  137. package/dist/collection/lib/offline/index.js +10 -0
  138. package/dist/collection/lib/offline/index.js.map +1 -0
  139. package/dist/collection/lib/offline/memory-db.js +64 -0
  140. package/dist/collection/lib/offline/memory-db.js.map +1 -0
  141. package/dist/collection/lib/offline/merge.js +24 -0
  142. package/dist/collection/lib/offline/merge.js.map +1 -0
  143. package/dist/collection/lib/offline/multitab.js +47 -0
  144. package/dist/collection/lib/offline/multitab.js.map +1 -0
  145. package/dist/collection/lib/offline/types.js +2 -0
  146. package/dist/collection/lib/offline/types.js.map +1 -0
  147. package/dist/collection/lib/toast.js +6 -6
  148. package/dist/collection/lib/toast.js.map +1 -1
  149. package/dist/collection/sdk/api.js +4 -0
  150. package/dist/collection/sdk/api.js.map +1 -0
  151. package/dist/collection/sdk/composition.js +43 -0
  152. package/dist/collection/sdk/composition.js.map +1 -0
  153. package/dist/collection/sdk/headless-api.js +37 -0
  154. package/dist/collection/sdk/headless-api.js.map +1 -0
  155. package/dist/collection/sdk/index.js +11 -0
  156. package/dist/collection/sdk/index.js.map +1 -0
  157. package/dist/collection/sdk/init.js +207 -0
  158. package/dist/collection/sdk/init.js.map +1 -0
  159. package/dist/collection/sdk/instance.js +63 -0
  160. package/dist/collection/sdk/instance.js.map +1 -0
  161. package/dist/collection/sdk/react-bridge.js +145 -0
  162. package/dist/collection/sdk/react-bridge.js.map +1 -0
  163. package/dist/collection/sdk/runtime-controls.js +54 -0
  164. package/dist/collection/sdk/runtime-controls.js.map +1 -0
  165. package/dist/collection/sdk/slots.js +57 -0
  166. package/dist/collection/sdk/slots.js.map +1 -0
  167. package/dist/collection/sdk/theme-tokens.js +99 -0
  168. package/dist/collection/sdk/theme-tokens.js.map +1 -0
  169. package/dist/collection/sdk/webchat-api.js +36 -0
  170. package/dist/collection/sdk/webchat-api.js.map +1 -0
  171. package/dist/collection/testing/chat-assets-mock.js +45 -0
  172. package/dist/collection/testing/chat-creds-mock.js +18 -0
  173. package/dist/collection/testing/emoji-picker-mock.js +2 -0
  174. package/dist/collection/testing/file-mock.js +1 -0
  175. package/dist/collection/testing/groupcast-mock.js +7 -0
  176. package/dist/collection/testing/helpers-mock.js +4 -0
  177. package/dist/collection/testing/iso-chat-sdk-mock.js +19 -0
  178. package/dist/collection/testing/toast-mock.js +2 -0
  179. package/dist/components/ChatFooter.js +62 -15
  180. package/dist/components/ChatFooter.js.map +1 -1
  181. package/dist/components/ChatSidebar.js +1 -1
  182. package/dist/components/{GroupCast.js → GroupCast2.js} +2 -2
  183. package/dist/components/GroupCast2.js.map +1 -0
  184. package/dist/components/WebChat.js +624 -305
  185. package/dist/components/WebChat.js.map +1 -1
  186. package/dist/components/WebChatBody.js +8 -7
  187. package/dist/components/WebChatBody.js.map +1 -1
  188. package/dist/components/attachment-preview2.js +40 -9
  189. package/dist/components/attachment-preview2.js.map +1 -1
  190. package/dist/components/chat-app.js +3 -3
  191. package/dist/components/chat-app.js.map +1 -1
  192. package/dist/components/chat-assets.js +1 -1
  193. package/dist/components/chat-creds.js +2 -2
  194. package/dist/components/chat-creds.js.map +1 -1
  195. package/dist/components/chat-document-message-bubble.js +1 -1
  196. package/dist/components/chat-image-message-bubble.js +1 -1
  197. package/dist/components/chat-tile2.js +1 -1
  198. package/dist/components/chat-video-message-bubble.js +1 -1
  199. package/dist/components/client.js +728 -0
  200. package/dist/components/client.js.map +1 -0
  201. package/dist/components/contact-info2.js +2 -117
  202. package/dist/components/contact-info2.js.map +1 -1
  203. package/dist/components/contracts.js +1 -1
  204. package/dist/components/contracts.js.map +1 -1
  205. package/dist/components/destroy-chat.js +14 -16
  206. package/dist/components/destroy-chat.js.map +1 -1
  207. package/dist/components/document-message2.js +35 -5
  208. package/dist/components/document-message2.js.map +1 -1
  209. package/dist/components/forward-message.js +2 -2
  210. package/dist/components/group-cast.js +1 -1
  211. package/dist/components/{groupcast2.js → groupcast.js} +1 -1
  212. package/dist/components/groupcast.js.map +1 -0
  213. package/dist/components/image-message2.js +3 -1
  214. package/dist/components/image-message2.js.map +1 -1
  215. package/dist/components/incoming-text-message-bubble2.js +1 -1
  216. package/dist/components/index.js +551 -60
  217. package/dist/components/index.js.map +1 -1
  218. package/dist/components/index2.js +1 -1
  219. package/dist/components/index2.js.map +1 -1
  220. package/dist/components/media-limits.js +24 -0
  221. package/dist/components/media-limits.js.map +1 -0
  222. package/dist/components/member-add.js +1 -1
  223. package/dist/components/message-bubble2.js +31 -7
  224. package/dist/components/message-bubble2.js.map +1 -1
  225. package/dist/components/message-date-pill2.js +1 -1
  226. package/dist/components/messages.js +131 -0
  227. package/dist/components/messages.js.map +1 -0
  228. package/dist/components/my-component.js +1 -1
  229. package/dist/components/outgoing-text-message-bubble2.js +3 -1
  230. package/dist/components/outgoing-text-message-bubble2.js.map +1 -1
  231. package/dist/components/preview-kind.js +30 -0
  232. package/dist/components/preview-kind.js.map +1 -0
  233. package/dist/components/reaction-container.js +2 -2
  234. package/dist/components/reply-message-container2.js +1 -1
  235. package/dist/components/theme-provider2.js +56 -44
  236. package/dist/components/theme-provider2.js.map +1 -1
  237. package/dist/components/theme-tokens.js +102 -0
  238. package/dist/components/theme-tokens.js.map +1 -0
  239. package/dist/components/toast.js +6 -6
  240. package/dist/components/toast.js.map +1 -1
  241. package/dist/components/video-message2.js +4 -2
  242. package/dist/components/video-message2.js.map +1 -1
  243. package/dist/esm/app-globals-2beecb81.js +36 -0
  244. package/dist/esm/app-globals-2beecb81.js.map +1 -0
  245. package/dist/esm/attachment-preview_22.entry.js +120 -42
  246. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  247. package/dist/esm/audio-bubble_4.entry.js +39 -9
  248. package/dist/esm/audio-bubble_4.entry.js.map +1 -1
  249. package/dist/esm/chat-app.entry.js +2 -2
  250. package/dist/esm/chat-app.entry.js.map +1 -1
  251. package/dist/esm/{chat-assets-e3173222.js → chat-assets-bb056958.js} +2 -2
  252. package/dist/esm/{chat-assets-e3173222.js.map → chat-assets-bb056958.js.map} +1 -1
  253. package/dist/esm/{chat-creds-5d0982fc.js → chat-creds-aafad4d0.js} +3 -3
  254. package/dist/esm/chat-creds-aafad4d0.js.map +1 -0
  255. package/dist/esm/chat-document-message-bubble.entry.js +1 -1
  256. package/dist/esm/chat-image-message-bubble.entry.js +1 -1
  257. package/dist/esm/chat-tile_3.entry.js +1 -1
  258. package/dist/esm/chat-video-message-bubble.entry.js +1 -1
  259. package/dist/esm/client-4a3e00da.js +477 -0
  260. package/dist/esm/client-4a3e00da.js.map +1 -0
  261. package/dist/esm/{contracts-614be4db.js → contracts-50f4ddae.js} +2 -2
  262. package/dist/esm/contracts-50f4ddae.js.map +1 -0
  263. package/dist/esm/destroy-chat-d0ee28d6.js +22 -0
  264. package/dist/esm/destroy-chat-d0ee28d6.js.map +1 -0
  265. package/dist/esm/doublecheck-261763ef.js +32 -0
  266. package/dist/esm/doublecheck-261763ef.js.map +1 -0
  267. package/dist/esm/{drawer-8f721119.js → drawer-74c188f1.js} +2 -2
  268. package/dist/esm/{drawer-8f721119.js.map → drawer-74c188f1.js.map} +1 -1
  269. package/dist/esm/forward-memebers.entry.js +3 -3
  270. package/dist/esm/forward-message.entry.js +2 -2
  271. package/dist/esm/group-chat-contacts.entry.js +2 -2
  272. package/dist/esm/{group-members-806fd7a2.js → group-members-05414da2.js} +2 -118
  273. package/dist/esm/group-members-05414da2.js.map +1 -0
  274. package/dist/esm/{groupcast-2ce7187f.js → groupcast-9c7d2a32.js} +2 -2
  275. package/dist/esm/{groupcast-2ce7187f.js.map → groupcast-9c7d2a32.js.map} +1 -1
  276. package/dist/esm/{helpers-4c6d09a7.js → helpers-f33b895c.js} +2 -2
  277. package/dist/esm/{helpers-4c6d09a7.js.map → helpers-f33b895c.js.map} +1 -1
  278. package/dist/esm/{index-beb184c6.js → index-4c865e34.js} +2 -2
  279. package/dist/esm/index-4c865e34.js.map +1 -0
  280. package/dist/esm/index.js +17 -171
  281. package/dist/esm/index.js.map +1 -1
  282. package/dist/esm/isometrik-webchat.js +10 -2
  283. package/dist/esm/isometrik-webchat.js.map +1 -1
  284. package/dist/esm/loader.js +10 -2
  285. package/dist/esm/loader.js.map +1 -1
  286. package/dist/esm/login-page_3.entry.js +672 -352
  287. package/dist/esm/login-page_3.entry.js.map +1 -1
  288. package/dist/esm/media-gallery.entry.js +1 -1
  289. package/dist/esm/media-limits-3fa07c09.js +152 -0
  290. package/dist/esm/media-limits-3fa07c09.js.map +1 -0
  291. package/dist/esm/member-add.entry.js +5 -5
  292. package/dist/esm/message-bubble.entry.js +30 -8
  293. package/dist/esm/message-bubble.entry.js.map +1 -1
  294. package/dist/esm/my-component.entry.js +1 -1
  295. package/dist/esm/new-chat-sidebar.entry.js +3 -3
  296. package/dist/esm/reaction-container.entry.js +4 -4
  297. package/dist/esm/runtime-controls-cf599fe2.js +623 -0
  298. package/dist/esm/runtime-controls-cf599fe2.js.map +1 -0
  299. package/dist/esm/send-media-917dcc2f.js +353 -0
  300. package/dist/esm/send-media-917dcc2f.js.map +1 -0
  301. package/dist/esm/signup-page.entry.js +1 -1
  302. package/dist/esm/{toast-d8ea763c.js → toast-533dd183.js} +8 -8
  303. package/dist/esm/toast-533dd183.js.map +1 -0
  304. package/dist/isometrik-webchat/index.esm.js +1 -1
  305. package/dist/isometrik-webchat/index.esm.js.map +1 -1
  306. package/dist/isometrik-webchat/isometrik-webchat.css +1 -1
  307. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  308. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
  309. package/dist/isometrik-webchat/p-0731d488.js +2 -0
  310. package/dist/isometrik-webchat/p-0731d488.js.map +1 -0
  311. package/dist/isometrik-webchat/{p-a15092d9.entry.js → p-1854b156.entry.js} +2 -2
  312. package/dist/isometrik-webchat/p-1854b156.entry.js.map +1 -0
  313. package/dist/isometrik-webchat/{p-5fea3fd2.entry.js → p-2d3e8cd4.entry.js} +2 -2
  314. package/dist/isometrik-webchat/p-315eee9a.js +2 -0
  315. package/dist/isometrik-webchat/p-315eee9a.js.map +1 -0
  316. package/dist/isometrik-webchat/{p-e7f58d3f.entry.js → p-39b626ed.entry.js} +2 -2
  317. package/dist/isometrik-webchat/{p-eb1f3118.entry.js → p-3c70c22c.entry.js} +2 -2
  318. package/dist/isometrik-webchat/p-4cb54460.js +2 -0
  319. package/dist/isometrik-webchat/p-4cb54460.js.map +1 -0
  320. package/dist/isometrik-webchat/{p-f24cdbbb.js → p-5162774c.js} +1 -1
  321. package/dist/isometrik-webchat/p-5162774c.js.map +1 -0
  322. package/dist/isometrik-webchat/p-53ee98a7.entry.js +2 -0
  323. package/dist/isometrik-webchat/p-53ee98a7.entry.js.map +1 -0
  324. package/dist/isometrik-webchat/{p-5cbc1a16.entry.js → p-586f6978.entry.js} +2 -2
  325. package/dist/isometrik-webchat/{p-5f7eebbf.entry.js → p-5d243250.entry.js} +2 -2
  326. package/dist/isometrik-webchat/{p-23df1c24.js → p-5d98a8a0.js} +2 -2
  327. package/dist/isometrik-webchat/p-7f415f28.js +2 -0
  328. package/dist/isometrik-webchat/p-7f415f28.js.map +1 -0
  329. package/dist/isometrik-webchat/{p-d386acfe.js → p-7fd2c1ad.js} +1 -1
  330. package/dist/isometrik-webchat/p-7fd2c1ad.js.map +1 -0
  331. package/dist/isometrik-webchat/{p-e5884258.js → p-9982fa21.js} +2 -2
  332. package/dist/isometrik-webchat/{p-4db39c93.js → p-a5707f12.js} +2 -2
  333. package/dist/isometrik-webchat/{p-af775c83.entry.js → p-a876991d.entry.js} +2 -2
  334. package/dist/isometrik-webchat/{p-7b80b0b2.js → p-adc45831.js} +1 -1
  335. package/dist/isometrik-webchat/p-adc45831.js.map +1 -0
  336. package/dist/isometrik-webchat/p-ae168135.js +2 -0
  337. package/dist/isometrik-webchat/p-ae168135.js.map +1 -0
  338. package/dist/isometrik-webchat/{p-a6897edc.js → p-b1330793.js} +1 -1
  339. package/dist/isometrik-webchat/p-b1330793.js.map +1 -0
  340. package/dist/isometrik-webchat/p-b61d6c0c.entry.js +2 -0
  341. package/dist/isometrik-webchat/p-b61d6c0c.entry.js.map +1 -0
  342. package/dist/isometrik-webchat/p-b667a9fc.js +2 -0
  343. package/dist/isometrik-webchat/p-b667a9fc.js.map +1 -0
  344. package/dist/isometrik-webchat/p-b857775d.entry.js +2 -0
  345. package/dist/isometrik-webchat/p-bdcdf1c5.js +2 -0
  346. package/dist/isometrik-webchat/p-bdcdf1c5.js.map +1 -0
  347. package/dist/isometrik-webchat/p-c0c19621.entry.js +2 -0
  348. package/dist/isometrik-webchat/{p-064d6200.entry.js → p-ca47d693.entry.js} +2 -2
  349. package/dist/isometrik-webchat/p-d720cf14.entry.js +2 -0
  350. package/dist/isometrik-webchat/{p-53695fc6.entry.js.map → p-d720cf14.entry.js.map} +1 -1
  351. package/dist/isometrik-webchat/{p-5c22ee37.entry.js → p-d892b4d4.entry.js} +2 -2
  352. package/dist/isometrik-webchat/{p-7eb12da3.js → p-dd62bd69.js} +2 -2
  353. package/dist/isometrik-webchat/p-eb54f75d.js +2 -0
  354. package/dist/isometrik-webchat/p-eb54f75d.js.map +1 -0
  355. package/dist/isometrik-webchat/p-f1fbf3be.entry.js +2 -0
  356. package/dist/isometrik-webchat/p-f1fbf3be.entry.js.map +1 -0
  357. package/dist/isometrik-webchat/p-fb705915.entry.js +2 -0
  358. package/dist/isometrik-webchat/p-fb705915.entry.js.map +1 -0
  359. package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js → p-fd6ce589.entry.js} +2 -2
  360. package/dist/isometrik-webchat/p-fdd327f5.entry.js +2 -0
  361. package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +1 -0
  362. package/dist/types/components/ChatUIComponent/shared/attachment-preview/attachment-preview.d.ts +2 -0
  363. package/dist/types/components/ChatUIComponent/shared/document-message/document-message.d.ts +5 -0
  364. package/dist/types/components/ChatUIComponent/shared/image-message/image-message.d.ts +1 -0
  365. package/dist/types/components/ChatUIComponent/shared/message-bubble/message-bubble.d.ts +3 -0
  366. package/dist/types/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.d.ts +1 -0
  367. package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +1 -0
  368. package/dist/types/components/my-component/web-chat/FLOW.d.ts +1 -1
  369. package/dist/types/components/my-component/web-chat/mqtt-host.d.ts +5 -0
  370. package/dist/types/components/my-component/web-chat/offline-host.d.ts +22 -0
  371. package/dist/types/components/theme-provider.d.ts +22 -27
  372. package/dist/types/components.d.ts +84 -11
  373. package/dist/types/demos/custom-ui-demo-elements.d.ts +1 -1
  374. package/dist/types/global/expose-sdk.d.ts +1 -0
  375. package/dist/types/index.d.ts +3 -44
  376. package/dist/types/lib/chat/index.d.ts +3 -0
  377. package/dist/types/lib/chat/media-limits.d.ts +11 -0
  378. package/dist/types/lib/chat/media-outbox.d.ts +8 -0
  379. package/dist/types/lib/chat/preview-kind.d.ts +30 -0
  380. package/dist/types/lib/custom-ui/contracts.d.ts +1 -1
  381. package/dist/types/lib/custom-ui/index.d.ts +1 -1
  382. package/dist/types/lib/custom-ui/public-api.d.ts +1 -1
  383. package/dist/types/lib/destroy-chat.d.ts +2 -0
  384. package/dist/types/lib/mqtt/inbound-queue.d.ts +7 -0
  385. package/dist/types/lib/mqtt/index.d.ts +2 -1
  386. package/dist/types/lib/mqtt/session.d.ts +22 -0
  387. package/dist/types/lib/offline/client.d.ts +44 -0
  388. package/dist/types/lib/offline/idb.d.ts +36 -0
  389. package/dist/types/lib/offline/index.d.ts +10 -0
  390. package/dist/types/lib/offline/memory-db.d.ts +20 -0
  391. package/dist/types/lib/offline/merge.d.ts +3 -0
  392. package/dist/types/lib/offline/multitab.d.ts +13 -0
  393. package/dist/types/lib/offline/types.d.ts +63 -0
  394. package/dist/types/sdk/api.d.ts +3 -0
  395. package/dist/types/sdk/composition.d.ts +32 -0
  396. package/dist/types/sdk/headless-api.d.ts +37 -0
  397. package/dist/types/sdk/index.d.ts +10 -0
  398. package/dist/types/sdk/init.d.ts +87 -0
  399. package/dist/types/sdk/instance.d.ts +15 -0
  400. package/dist/types/sdk/react-bridge.d.ts +64 -0
  401. package/dist/types/sdk/runtime-controls.d.ts +14 -0
  402. package/dist/types/sdk/slots.d.ts +15 -0
  403. package/dist/types/sdk/theme-tokens.d.ts +22 -0
  404. package/dist/types/sdk/webchat-api.d.ts +22 -0
  405. package/docs/ARCHITECTURE.md +272 -0
  406. package/docs/CUSTOMIZATION.md +236 -0
  407. package/docs/INTEGRATION.md +286 -0
  408. package/docs/RELIABILITY.md +51 -0
  409. package/docs/theme-tokens.template.css +72 -0
  410. package/package.json +8 -2
  411. package/readme.md +38 -17
  412. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  413. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  414. package/dist/cjs/chat-creds-cf537d4b.js.map +0 -1
  415. package/dist/cjs/contracts-31632812.js.map +0 -1
  416. package/dist/cjs/destroy-chat-be25dec7.js +0 -26
  417. package/dist/cjs/destroy-chat-be25dec7.js.map +0 -1
  418. package/dist/cjs/doublecheck-997afc94.js +0 -7
  419. package/dist/cjs/doublecheck-997afc94.js.map +0 -1
  420. package/dist/cjs/group-members-73ad1074.js.map +0 -1
  421. package/dist/cjs/index-1a26d11d.js.map +0 -1
  422. package/dist/cjs/toast-0bf1e688.js.map +0 -1
  423. package/dist/components/GroupCast.js.map +0 -1
  424. package/dist/components/groupcast2.js.map +0 -1
  425. package/dist/esm/app-globals-0f993ce5.js +0 -5
  426. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  427. package/dist/esm/chat-creds-5d0982fc.js.map +0 -1
  428. package/dist/esm/contracts-614be4db.js.map +0 -1
  429. package/dist/esm/destroy-chat-e2ebe165.js +0 -24
  430. package/dist/esm/destroy-chat-e2ebe165.js.map +0 -1
  431. package/dist/esm/doublecheck-5e208ef0.js +0 -5
  432. package/dist/esm/doublecheck-5e208ef0.js.map +0 -1
  433. package/dist/esm/group-members-806fd7a2.js.map +0 -1
  434. package/dist/esm/index-beb184c6.js.map +0 -1
  435. package/dist/esm/toast-d8ea763c.js.map +0 -1
  436. package/dist/isometrik-webchat/p-01fd0eb4.entry.js +0 -2
  437. package/dist/isometrik-webchat/p-01fd0eb4.entry.js.map +0 -1
  438. package/dist/isometrik-webchat/p-0f9c3f95.entry.js +0 -2
  439. package/dist/isometrik-webchat/p-0f9c3f95.entry.js.map +0 -1
  440. package/dist/isometrik-webchat/p-1c53e658.js +0 -2
  441. package/dist/isometrik-webchat/p-1c53e658.js.map +0 -1
  442. package/dist/isometrik-webchat/p-1df58381.entry.js +0 -2
  443. package/dist/isometrik-webchat/p-1df58381.entry.js.map +0 -1
  444. package/dist/isometrik-webchat/p-3c690532.entry.js +0 -2
  445. package/dist/isometrik-webchat/p-3c690532.entry.js.map +0 -1
  446. package/dist/isometrik-webchat/p-3c8cbd5f.js +0 -2
  447. package/dist/isometrik-webchat/p-3c8cbd5f.js.map +0 -1
  448. package/dist/isometrik-webchat/p-4e762019.js +0 -2
  449. package/dist/isometrik-webchat/p-4e762019.js.map +0 -1
  450. package/dist/isometrik-webchat/p-53695fc6.entry.js +0 -2
  451. package/dist/isometrik-webchat/p-7b80b0b2.js.map +0 -1
  452. package/dist/isometrik-webchat/p-9924b1bf.entry.js +0 -2
  453. package/dist/isometrik-webchat/p-a15092d9.entry.js.map +0 -1
  454. package/dist/isometrik-webchat/p-a6897edc.js.map +0 -1
  455. package/dist/isometrik-webchat/p-b2bf55b1.entry.js +0 -2
  456. package/dist/isometrik-webchat/p-bfecfa97.entry.js +0 -2
  457. package/dist/isometrik-webchat/p-d386acfe.js.map +0 -1
  458. package/dist/isometrik-webchat/p-e1255160.js +0 -2
  459. package/dist/isometrik-webchat/p-e1255160.js.map +0 -1
  460. package/dist/isometrik-webchat/p-f24cdbbb.js.map +0 -1
  461. /package/dist/isometrik-webchat/{p-5fea3fd2.entry.js.map → p-2d3e8cd4.entry.js.map} +0 -0
  462. /package/dist/isometrik-webchat/{p-e7f58d3f.entry.js.map → p-39b626ed.entry.js.map} +0 -0
  463. /package/dist/isometrik-webchat/{p-eb1f3118.entry.js.map → p-3c70c22c.entry.js.map} +0 -0
  464. /package/dist/isometrik-webchat/{p-5cbc1a16.entry.js.map → p-586f6978.entry.js.map} +0 -0
  465. /package/dist/isometrik-webchat/{p-5f7eebbf.entry.js.map → p-5d243250.entry.js.map} +0 -0
  466. /package/dist/isometrik-webchat/{p-23df1c24.js.map → p-5d98a8a0.js.map} +0 -0
  467. /package/dist/isometrik-webchat/{p-e5884258.js.map → p-9982fa21.js.map} +0 -0
  468. /package/dist/isometrik-webchat/{p-4db39c93.js.map → p-a5707f12.js.map} +0 -0
  469. /package/dist/isometrik-webchat/{p-af775c83.entry.js.map → p-a876991d.entry.js.map} +0 -0
  470. /package/dist/isometrik-webchat/{p-bfecfa97.entry.js.map → p-b857775d.entry.js.map} +0 -0
  471. /package/dist/isometrik-webchat/{p-9924b1bf.entry.js.map → p-c0c19621.entry.js.map} +0 -0
  472. /package/dist/isometrik-webchat/{p-064d6200.entry.js.map → p-ca47d693.entry.js.map} +0 -0
  473. /package/dist/isometrik-webchat/{p-5c22ee37.entry.js.map → p-d892b4d4.entry.js.map} +0 -0
  474. /package/dist/isometrik-webchat/{p-7eb12da3.js.map → p-dd62bd69.js.map} +0 -0
  475. /package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js.map → p-fd6ce589.entry.js.map} +0 -0
  476. /package/dist/isometrik-webchat/{p-b2bf55b1.entry.js.map → p-fdd327f5.entry.js.map} +0 -0
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ const runtimeControls = require('./runtime-controls-201c71ba.js');
4
+ const sendMedia = require('./send-media-14908d4b.js');
5
+
6
+ /**
7
+ * Expose public SDK helpers on window for www demos / script-tag hosts.
8
+ * Bundlers should prefer named ESM imports from the package entry.
9
+ */
10
+ function appGlobalScript () {
11
+ if (typeof window === 'undefined')
12
+ return;
13
+ const w = window;
14
+ w.initializeIsometrikWebchat = runtimeControls.initializeIsometrikWebchat;
15
+ w.destroyIsometrikWebchat = runtimeControls.destroyIsometrikWebchat;
16
+ w.ensureIsometrikWebchat = runtimeControls.ensureIsometrikWebchat;
17
+ w.retainIsometrikWebchat = runtimeControls.retainIsometrikWebchat;
18
+ w.releaseIsometrikWebchat = runtimeControls.releaseIsometrikWebchat;
19
+ w.initializeChat = runtimeControls.initializeIsometrikWebchat;
20
+ w.destroyChat = runtimeControls.destroyIsometrikWebchat;
21
+ w.isometrikWebchatApi = runtimeControls.isometrikWebchatApi;
22
+ w.createWebChatApi = runtimeControls.createWebChatApi;
23
+ w.THEME_TOKEN_NAMES = sendMedia.THEME_TOKEN_NAMES;
24
+ w.mountReactInSlot = runtimeControls.mountReactInSlot;
25
+ w.defineReactCustomPart = runtimeControls.defineReactCustomPart;
26
+ w.unmountReactSlot = runtimeControls.unmountReactSlot;
27
+ w.switchChatTheme = runtimeControls.switchChatTheme;
28
+ w.applyCustomTheme = runtimeControls.applyCustomTheme;
29
+ w.toggleTheme = runtimeControls.toggleTheme;
30
+ w.resolveThemeProvider = runtimeControls.resolveThemeProvider;
31
+ w.resolveWebChat = runtimeControls.resolveWebChat;
32
+ }
33
+
34
+ const globalScripts = appGlobalScript;
35
+
36
+ exports.globalScripts = globalScripts;
37
+
38
+ //# sourceMappingURL=app-globals-61a8bfde.js.map
@@ -0,0 +1 @@
1
+ {"file":"app-globals-61a8bfde.js","mappings":";;;;;AAAA;;;;;IAwBE,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,GAAG,MAAa,CAAC;IACxB,CAAC,CAAC,0BAA0B,GAAGA,0CAA0B,CAAC;IAC1D,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,sBAAsB,GAAGC,sCAAsB,CAAC;IAClD,CAAC,CAAC,uBAAuB,GAAGC,uCAAuB,CAAC;IACpD,CAAC,CAAC,cAAc,GAAGJ,0CAA0B,CAAC;IAC9C,CAAC,CAAC,WAAW,GAAGC,uCAAuB,CAAC;IACxC,CAAC,CAAC,mBAAmB,GAAGI,mCAAmB,CAAC;IAC5C,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,iBAAiB,GAAGC,2BAAiB,CAAC;IACxC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,qBAAqB,GAAGC,qCAAqB,CAAC;IAChD,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,eAAe,GAAGC,+BAAe,CAAC;IACpC,CAAC,CAAC,gBAAgB,GAAGC,gCAAgB,CAAC;IACtC,CAAC,CAAC,WAAW,GAAGC,2BAAW,CAAC;IAC5B,CAAC,CAAC,oBAAoB,GAAGC,oCAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAGC,8BAAc,CAAC;AACpC;;AC3CY,MAAC,aAAa,GAAG;;;;","names":["initializeIsometrikWebchat","destroyIsometrikWebchat","ensureIsometrikWebchat","retainIsometrikWebchat","releaseIsometrikWebchat","isometrikWebchatApi","createWebChatApi","THEME_TOKEN_NAMES","mountReactInSlot","defineReactCustomPart","unmountReactSlot","switchChatTheme","applyCustomTheme","toggleTheme","resolveThemeProvider","resolveWebChat"],"sources":["src/global/expose-sdk.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n","import appGlobalScript from '/Users/3embed/Desktop/isometrik-webchat/src/global/expose-sdk.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -5,20 +5,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f624fc47.js');
6
6
  const chatAssets = require('./chat-assets-686620e7.js');
7
7
  const cancel = require('./cancel-1ffd86d3.js');
8
+ const mediaLimits = require('./media-limits-eba42629.js');
9
+ const doublecheck = require('./doublecheck-c2461adc.js');
8
10
  const index_m = require('./index.m-ff115b26.js');
9
- const drawer = require('./drawer-28cc94a4.js');
10
- const helpers = require('./helpers-8061ec7d.js');
11
- const index$1 = require('./index-1a26d11d.js');
12
- const toast = require('./toast-0bf1e688.js');
11
+ const drawer = require('./drawer-811d2ce8.js');
12
+ const helpers = require('./helpers-154861e9.js');
13
+ const index$1 = require('./index-66f98408.js');
14
+ const toast = require('./toast-f810e550.js');
13
15
  const groupcast = require('./groupcast-c93d4a7d.js');
14
16
  const IsometrikLogo = require('./IsometrikLogo-9e642f65.js');
15
- const groupMembers = require('./group-members-73ad1074.js');
17
+ const groupMembers = require('./group-members-5a82ec8a.js');
16
18
  const messageBodyRender = require('./message-body-render-7c7a026e.js');
17
- const doublecheck = require('./doublecheck-997afc94.js');
18
19
  const content = require('./content-ebca062a.js');
19
20
  const messageReaction = require('./message-reaction-8f93a048.js');
20
- const contracts = require('./contracts-31632812.js');
21
- require('./destroy-chat-be25dec7.js');
21
+ const contracts = require('./contracts-dfc84075.js');
22
+ require('./destroy-chat-7ae8fc99.js');
22
23
 
23
24
  const NewChat = class {
24
25
  constructor(hostRef) {
@@ -4561,10 +4562,18 @@ const AttachmentPreview = class {
4561
4562
  const files = Array.from(input.files || []);
4562
4563
  if (!files.length)
4563
4564
  return;
4565
+ const room = Math.max(0, mediaLimits.MAX_MEDIA_PER_MESSAGE - this.items().length);
4566
+ const accepted = files.slice(0, room);
4567
+ if (!accepted.length) {
4568
+ input.value = '';
4569
+ return;
4570
+ }
4564
4571
  this.fileUploaded.emit({
4565
- files,
4566
- fileTypes: files.map(f => f.type.split('/')[0]),
4567
- totalFiles: files.length,
4572
+ files: accepted,
4573
+ fileTypes: accepted.map(f => f.type.split('/')[0]),
4574
+ totalFiles: accepted.length,
4575
+ rejected: Math.max(0, files.length - accepted.length),
4576
+ maxPerMessage: mediaLimits.MAX_MEDIA_PER_MESSAGE,
4568
4577
  });
4569
4578
  input.value = '';
4570
4579
  };
@@ -4679,10 +4688,19 @@ const AttachmentPreview = class {
4679
4688
  var _a;
4680
4689
  return ((_a = item === null || item === void 0 ? void 0 : item.file) === null || _a === void 0 ? void 0 : _a.name) || (item === null || item === void 0 ? void 0 : item.name) || 'Document';
4681
4690
  }
4691
+ isPdf(item) {
4692
+ return doublecheck.isPdfAttachment({
4693
+ mimeType: item === null || item === void 0 ? void 0 : item.mimeType,
4694
+ name: this.fileName(item),
4695
+ file: item === null || item === void 0 ? void 0 : item.file,
4696
+ });
4697
+ }
4682
4698
  fileIconSrc(item) {
4683
4699
  var _a;
4684
4700
  const mime = (((_a = item === null || item === void 0 ? void 0 : item.file) === null || _a === void 0 ? void 0 : _a.type) || (item === null || item === void 0 ? void 0 : item.mimeType) || '').toLowerCase();
4685
4701
  const name = this.fileName(item).toLowerCase();
4702
+ if (mime.includes('pdf') || name.endsWith('.pdf'))
4703
+ return chatAssets.Icon_Doc;
4686
4704
  if (mime.includes('spreadsheet') || mime.includes('excel') || /\.xlsx?$/.test(name) || name.endsWith('.csv'))
4687
4705
  return chatAssets.Icon_Excel;
4688
4706
  if (mime.includes('rtf') || name.endsWith('.rtf'))
@@ -4697,9 +4715,20 @@ const AttachmentPreview = class {
4697
4715
  const name = this.fileName(item);
4698
4716
  if (mime.includes('pdf') || /\.pdf$/i.test(name))
4699
4717
  return 'PDF';
4718
+ if (mime.includes('presentation') || /\.pptx?$/i.test(name))
4719
+ return 'PPT';
4720
+ if (mime.includes('word') || /\.docx?$/i.test(name))
4721
+ return 'DOC';
4722
+ if (mime.includes('sheet') || mime.includes('excel') || /\.xlsx?$/i.test(name))
4723
+ return 'XLS';
4700
4724
  const ext = name.includes('.') ? name.split('.').pop() : '';
4701
4725
  return (ext || 'File').toUpperCase();
4702
4726
  }
4727
+ openInNewTab(src) {
4728
+ if (!src)
4729
+ return;
4730
+ window.open(src, '_blank', 'noopener,noreferrer');
4731
+ }
4703
4732
  formatSize(bytes) {
4704
4733
  if (bytes == null || Number.isNaN(bytes))
4705
4734
  return '';
@@ -4719,24 +4748,25 @@ const AttachmentPreview = class {
4719
4748
  this.onSend();
4720
4749
  }
4721
4750
  render() {
4722
- var _a, _b, _c;
4751
+ var _a, _b, _c, _d, _e;
4723
4752
  const list = this.items();
4724
4753
  const cur = this.current();
4725
4754
  const type = this.typeOf(cur, this.localIndex);
4726
4755
  const fileMode = this.isFilePreview(type);
4727
4756
  const fileTitle = this.fileName(cur);
4728
- return (index.h("div", { key: 'e5bdbdc3616d6328a5c2e84ff2d08525a62b524e', class: "preview-container" }, index.h("div", { key: '62959e24a5b5d81fa89c015e66565409ff7ec8f6', class: "topbar" }, fileMode && !this.showCamera ? (index.h(index.Fragment, null, index.h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, index.h("img", { class: "theme-icon", src: cancel.CancelIcon, alt: "" })), index.h("span", { class: "topbar-title centered" }, fileTitle), index.h("span", { class: "topbar-spacer" }))) : (index.h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, index.h("img", { class: "theme-icon", src: cancel.CancelIcon, alt: "" })))), index.h("div", { key: '1fbe61d68efefc66ab6a6a21e46b90f21d1a84ce', class: "main" }, this.showCamera ? (index.h("div", { class: "camera-view" }, this.cameraError ? index.h("p", { class: "camera-error" }, this.cameraError) : null, !this.cameraReady && !this.cameraError ? index.h("p", { class: "camera-loading" }, "Opening camera\u2026") : null, index.h("video", { class: this.cameraReady ? 'is-ready' : '', ref: this.bindVideo, autoplay: true, playsinline: true, muted: true, style: { transform: this.facingMode === 'user' ? 'scaleX(-1)' : 'none' } }), this.cameraReady ? (index.h("button", { class: "snap-btn", type: "button", title: "Take photo", onClick: this.snap })) : null)) : !cur ? (index.h("div", null, "No attachment")) : type === 'video' ? (index.h("video", { class: "preview-media", src: this.srcOf(cur), controls: true })) : type === 'image' || !type ? (index.h("img", { src: this.srcOf(cur), alt: "" })) : fileMode ? (index.h("div", { class: "file-preview" }, index.h("div", { class: "file-preview-icon-wrap" }, index.h("img", { src: this.fileIconSrc(cur), alt: "" })), index.h("h3", { class: "file-preview-title" }, "No preview available"), index.h("p", { class: "file-preview-meta" }, [this.formatSize((_b = (_a = cur === null || cur === void 0 ? void 0 : cur.file) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : cur === null || cur === void 0 ? void 0 : cur.size), this.fileKind(cur)].filter(Boolean).join(' - ')))) : (index.h("div", { class: "file-chip" }, ((_c = cur === null || cur === void 0 ? void 0 : cur.file) === null || _c === void 0 ? void 0 : _c.name) || (cur === null || cur === void 0 ? void 0 : cur.name) || type || 'File'))), !this.showCamera ? (index.h("div", { class: "footer" }, index.h("div", { class: "composer" }, this.showEmojiPicker ? (index.h("div", { class: "emoji-panel" }, index.h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, index.h("div", { class: "composer-pill" }, index.h("input", { type: "text", placeholder: this.inputPlaceholder || 'Type a message', value: this.inputValue || '', onInput: this.onCaption, ref: el => (this.captionInputRef = el) }), index.h("button", { class: "icon-btn smile-btn", type: "button", title: "Emoji", "aria-label": "Emoji", onClick: this.toggleEmoji }, index.h("img", { src: chatAssets.Smile, alt: "" }))), index.h("button", { class: "send-btn", type: "button", title: "Send", onClick: () => this.send() }, index.h("img", { src: chatAssets.Send, alt: "" }), list.length > 1 ? index.h("span", { class: "send-badge" }, list.length) : null)), index.h("div", { class: "action-row" }, index.h("div", { class: "thumbs" }, list.map((item, i) => {
4757
+ return (index.h("div", { key: '14aeef8e84f9f619b43fe5749e6d6d061d4ba13b', class: "preview-container" }, index.h("div", { key: '7a6eb4eb7db969281b6b6342224774771370a535', class: "topbar" }, fileMode && !this.showCamera ? (index.h(index.Fragment, null, index.h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, index.h("img", { class: "theme-icon", src: cancel.CancelIcon, alt: "" })), index.h("span", { class: "topbar-title centered" }, fileTitle), index.h("span", { class: "topbar-spacer" }))) : (index.h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, index.h("img", { class: "theme-icon", src: cancel.CancelIcon, alt: "" })))), index.h("div", { key: 'fba60287d74ec7a96ef6bef3bedd1076aec2336f', class: "main" }, this.showCamera ? (index.h("div", { class: "camera-view" }, this.cameraError ? index.h("p", { class: "camera-error" }, this.cameraError) : null, !this.cameraReady && !this.cameraError ? index.h("p", { class: "camera-loading" }, "Opening camera\u2026") : null, index.h("video", { class: this.cameraReady ? 'is-ready' : '', ref: this.bindVideo, autoplay: true, playsinline: true, muted: true, style: { transform: this.facingMode === 'user' ? 'scaleX(-1)' : 'none' } }), this.cameraReady ? (index.h("button", { class: "snap-btn", type: "button", title: "Take photo", onClick: this.snap })) : null)) : !cur ? (index.h("div", null, "No attachment")) : type === 'video' ? (index.h("video", { class: "preview-media", src: this.srcOf(cur), controls: true, preload: "metadata" })) : type === 'audio' ? (index.h("div", { class: "audio-stage" }, index.h("p", { class: "audio-title" }, fileTitle), index.h("audio", { src: this.srcOf(cur), controls: true, preload: "metadata" }), index.h("p", { class: "file-preview-meta" }, this.formatSize((_b = (_a = cur === null || cur === void 0 ? void 0 : cur.file) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : cur === null || cur === void 0 ? void 0 : cur.size)))) : type === 'image' || (!type && !fileMode) ? (index.h("img", { src: this.srcOf(cur), alt: fileTitle })) : this.isPdf(cur) && this.srcOf(cur) ? (index.h("div", { class: "pdf-stage" }, index.h("iframe", { class: "pdf-frame", src: `${this.srcOf(cur)}#toolbar=1&navpanes=0`, title: fileTitle }))) : fileMode ? (index.h("div", { class: "file-preview" }, index.h("div", { class: "file-preview-icon-wrap" }, index.h("img", { src: this.fileIconSrc(cur), alt: "" })), index.h("h3", { class: "file-preview-title" }, fileTitle), index.h("p", { class: "file-preview-meta" }, [this.formatSize((_d = (_c = cur === null || cur === void 0 ? void 0 : cur.file) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : cur === null || cur === void 0 ? void 0 : cur.size), this.fileKind(cur)].filter(Boolean).join(' · ')), index.h("div", { class: "file-preview-actions" }, this.srcOf(cur) ? (index.h("button", { type: "button", onClick: () => this.openInNewTab(this.srcOf(cur)) }, "Open")) : null, this.srcOf(cur) ? (index.h("a", { class: "secondary", href: this.srcOf(cur), download: fileTitle }, "Download")) : null))) : (index.h("div", { class: "file-chip" }, ((_e = cur === null || cur === void 0 ? void 0 : cur.file) === null || _e === void 0 ? void 0 : _e.name) || (cur === null || cur === void 0 ? void 0 : cur.name) || type || 'File'))), !this.showCamera ? (index.h("div", { class: "footer" }, index.h("div", { class: "composer" }, this.showEmojiPicker ? (index.h("div", { class: "emoji-panel" }, index.h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, index.h("div", { class: "composer-pill" }, index.h("input", { type: "text", placeholder: this.inputPlaceholder || 'Type a message', value: this.inputValue || '', onInput: this.onCaption, ref: el => (this.captionInputRef = el) }), index.h("button", { class: "icon-btn smile-btn", type: "button", title: "Emoji", "aria-label": "Emoji", onClick: this.toggleEmoji }, index.h("img", { src: chatAssets.Smile, alt: "" }))), index.h("button", { class: "send-btn", type: "button", title: "Send", onClick: () => this.send() }, index.h("img", { src: chatAssets.Send, alt: "" }), list.length > 1 ? index.h("span", { class: "send-badge" }, list.length) : null)), index.h("div", { class: "action-row" }, index.h("div", { class: "thumbs" }, list.map((item, i) => {
4729
4758
  const t = this.typeOf(item, i);
4730
4759
  const isFile = this.isFilePreview(t);
4760
+ const pdf = this.isPdf(item);
4731
4761
  const select = () => {
4732
4762
  this.localIndex = i;
4733
4763
  this.selectedIndex = i;
4734
4764
  };
4735
- return (index.h("div", { class: "thumb-wrap" }, isFile ? (index.h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, index.h("img", { src: this.fileIconSrc(item), alt: "" }))) : t === 'video' ? (index.h("video", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), muted: true, playsInline: true, preload: "metadata", onClick: select })) : (index.h("img", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), alt: "", onClick: select })), index.h("button", { class: "thumb-x", type: "button", "aria-label": "Remove", onClick: e => {
4765
+ return (index.h("div", { class: "thumb-wrap", key: `thumb-${i}-${this.fileName(item)}` }, pdf ? (index.h("div", { class: `thumb file-thumb pdf-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, index.h("span", null, "PDF"))) : isFile ? (index.h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, index.h("img", { src: this.fileIconSrc(item), alt: "" }))) : t === 'video' ? (index.h("video", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), muted: true, playsInline: true, preload: "metadata", onClick: select })) : t === 'audio' ? (index.h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, "\u266A")) : (index.h("img", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), alt: "", onClick: select })), index.h("button", { class: "thumb-x", type: "button", "aria-label": "Remove", onClick: e => {
4736
4766
  e.stopPropagation();
4737
4767
  this.attachmentRemoved.emit(i);
4738
4768
  } }, "\u00D7")));
4739
- }), index.h("button", { class: "thumb add-thumb", type: "button", title: "Add", "aria-label": "Add", onClick: this.openAddFiles }, "+"), index.h("input", { class: "add-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv", ref: el => (this.addInputRef = el), onChange: this.onAddFiles }))))) : null));
4769
+ }), list.length < mediaLimits.MAX_MEDIA_PER_MESSAGE ? (index.h("button", { class: "thumb add-thumb", type: "button", title: `Add (max ${mediaLimits.MAX_MEDIA_PER_MESSAGE})`, "aria-label": "Add", onClick: this.openAddFiles }, "+")) : null, index.h("input", { class: "add-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf", ref: el => (this.addInputRef = el), onChange: this.onAddFiles }))), index.h("p", { class: "limit-hint" }, list.length, "/", mediaLimits.MAX_MEDIA_PER_MESSAGE, " files \u00B7 send together as one message"))) : null));
4740
4770
  }
4741
4771
  get el() { return index.getElement(this); }
4742
4772
  static get watchers() { return {
@@ -4744,7 +4774,7 @@ const AttachmentPreview = class {
4744
4774
  "showCamera": ["onShowCameraChange"]
4745
4775
  }; }
4746
4776
  };
4747
- AttachmentPreview.style = ":host {\n display: block;\n width: var(--w-full);\n height: var(--h-full);\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .preview-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n padding-bottom: var(--space-16, 1rem);\n }\n .topbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--space-12) var(--space-16);\n flex-shrink: 0;\n }\n .topbar-left {\n display: flex;\n align-items: center;\n gap: var(--gap-10);\n min-width: 0;\n }\n .topbar-title {\n font-size: var(--text-16);\n font-weight: var(--fw-400);\n color: var(--text-primary);\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--icon);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .main {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8) var(--space-16);\n overflow: hidden;\n }\n .main img,\n .main video.preview-media {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--rounded-4);\n box-shadow: 0 2px 12px var(--overlay);\n background: var(--text-primary);\n }\n .file-chip {\n padding: var(--space-16) var(--space-16);\n border-radius: var(--rounded-8);\n background: var(--bg-primary);\n max-width: 80%;\n color: var(--text-primary);\n }\n .file-preview {\n width: 100%;\n max-width: 36rem;\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 70%, transparent);\n border-radius: var(--rounded-16, 1rem);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n box-shadow: 0 1px 2px var(--overlay, rgba(0,0,0,0.05));\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 4rem var(--space-24, 1.5rem);\n box-sizing: border-box;\n text-align: center;\n }\n .file-preview-icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: var(--space-24, 1.5rem);\n }\n .file-preview-icon-wrap img,\n .file-preview-icon-wrap svg {\n width: 5.5rem;\n height: 5.5rem;\n max-width: none;\n max-height: none;\n object-fit: contain;\n display: block;\n background: transparent;\n box-shadow: none;\n border-radius: 0;\n }\n .file-preview-title {\n margin: 0 0 var(--gap-4, 0.25rem);\n font-size: var(--text-20, 1.25rem);\n font-weight: var(--fw-600, 600);\n color: var(--text-tertiary, #94a3b8);\n }\n .file-preview-meta {\n margin: 0;\n font-size: var(--text-12, 0.75rem);\n font-weight: 500;\n color: var(--text-tertiary, #94a3b8);\n }\n .thumb.file-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg-primary);\n object-fit: contain;\n padding: var(--gap-6, 0.375rem);\n box-sizing: border-box;\n border-color: color-mix(in srgb, var(--brand) 40%, transparent);\n }\n .thumb.file-thumb.active {\n border-color: var(--brand);\n }\n .thumb.file-thumb img,\n .thumb.file-thumb svg {\n width: var(--icon-lg, 1.5rem);\n height: var(--icon-lg, 1.5rem);\n object-fit: contain;\n display: block;\n }\n .topbar-title.centered {\n flex: 1;\n text-align: center;\n font-weight: var(--fw-500, 500);\n font-size: var(--text-14, 0.875rem);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 var(--space-16);\n }\n .topbar-spacer {\n width: var(--control, 2.25rem);\n flex-shrink: 0;\n }\n .thumbs {\n display: flex;\n gap: var(--gap-12);\n overflow-x: auto;\n flex: 1;\n justify-content: center;\n align-items: center;\n min-width: 0;\n padding: 0;\n }\n .thumb {\n width: 3rem;\n height: 3rem;\n border-radius: var(--rounded-8);\n object-fit: cover;\n cursor: pointer;\n border: 2px solid var(--border);\n flex-shrink: 0;\n background: var(--bg-primary);\n box-sizing: border-box;\n }\n .thumb.active {\n border-color: var(--brand);\n }\n .thumb.add-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--border);\n background: var(--bg-primary);\n color: var(--text-secondary);\n font-size: var(--text-20);\n line-height: 1;\n padding: 0;\n }\n .thumb.add-thumb:hover {\n border-color: var(--text-tertiary);\n background: var(--hover-overlay);\n }\n .thumb-wrap {\n position: relative;\n width: 3rem;\n height: 3rem;\n flex-shrink: 0;\n }\n .thumb-wrap > .thumb {\n width: 100%;\n height: 100%;\n }\n .thumb-x {\n display: none;\n position: absolute;\n top: 0.125rem;\n right: 0.125rem;\n width: 0.875rem;\n height: 0.875rem;\n border: none;\n border-radius: 999px;\n background: var(--text-primary);\n color: var(--bg-primary);\n font-size: 0.65rem;\n line-height: 1;\n padding: 0;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n z-index: 1;\n }\n .thumb-wrap:hover .thumb-x {\n display: flex;\n }\n .footer {\n display: flex;\n flex-direction: column;\n gap: var(--gap-8);\n padding: var(--space-16) var(--space-24) var(--space-24, 1.5rem);\n flex-shrink: 0;\n width: 100%;\n max-width: 48rem;\n margin: 0 auto;\n box-sizing: border-box;\n position: relative;\n }\n .composer {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n width: 100%;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n .emoji-panel {\n position: absolute;\n bottom: calc(100% + var(--gap-8));\n right: calc(3.5rem + var(--gap-12));\n width: min(360px, calc(100vw - 32px));\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 8px 32px var(--overlay);\n overflow: hidden;\n z-index: 20;\n }\n emoji-picker.emoji-picker {\n --background: var(--bg-primary);\n --border-color: transparent;\n --border-size: 0;\n --indicator-color: var(--brand);\n --indicator-height: 3px;\n --input-border-radius: var(--rounded-8);\n --input-border-color: var(--brand);\n --num-columns: 8;\n --emoji-size: 1.5rem;\n width: 100%;\n height: 320px;\n }\n .composer-pill {\n flex: 1;\n width: auto;\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n background: var(--bg-input);\n border-radius: var(--rounded-12);\n padding: var(--space-12) var(--space-16);\n min-width: 0;\n box-sizing: border-box;\n }\n .composer-pill input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: inherit;\n min-width: 0;\n }\n .composer-pill input::placeholder {\n color: var(--text-tertiary);\n }\n .composer-pill .smile-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .action-row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12);\n width: 100%;\n padding-bottom: var(--space-16, 1rem);\n box-sizing: border-box;\n }\n .send-btn {\n position: relative;\n width: 3.5rem;\n height: 3.5rem;\n border-radius: 50%;\n border: none;\n background: var(--brand);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n box-shadow: 0 2px 8px var(--overlay);\n }\n .send-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n display: block;\n }\n .send-btn:hover {\n opacity: 0.92;\n }\n .send-btn:hover img {\n filter: brightness(0) invert(1);\n }\n .send-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n min-width: 1.125rem;\n height: 1.125rem;\n padding: 0 0.25rem;\n border-radius: var(--rounded-full);\n background: var(--brand);\n color: var(--text-on-brand);\n font-size: var(--text-10);\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n border: 2px solid var(--bg-primary);\n line-height: 1;\n }\n .add-input {\n display: none;\n }\n .camera-view {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--space-16);\n width: 100%;\n height: 100%;\n min-height: 0;\n }\n .camera-view video {\n width: 100%;\n max-width: 720px;\n max-height: calc(100% - 88px);\n object-fit: cover;\n border-radius: var(--rounded-12);\n background: var(--bg-primary);\n transform: scaleX(-1);\n box-shadow: 0 2px 12px var(--overlay);\n }\n .camera-view video:not(.is-ready) {\n visibility: hidden;\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n pointer-events: none;\n }\n .camera-loading {\n color: var(--text-secondary);\n font-size: var(--text-14);\n }\n .snap-btn {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n border: 3px solid var(--danger);\n background: var(--bg-primary);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .snap-btn::after {\n content: '';\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--danger);\n display: block;\n }\n .camera-error {\n color: var(--danger);\n font-size: var(--text-14);\n text-align: center;\n padding: 0 var(--space-16);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
4777
+ AttachmentPreview.style = ":host {\n display: block;\n width: var(--w-full);\n height: var(--h-full);\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .preview-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n padding-bottom: var(--space-16, 1rem);\n }\n .topbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--space-12) var(--space-16);\n flex-shrink: 0;\n }\n .topbar-left {\n display: flex;\n align-items: center;\n gap: var(--gap-10);\n min-width: 0;\n }\n .topbar-title {\n font-size: var(--text-16);\n font-weight: var(--fw-400);\n color: var(--text-primary);\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--icon);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .main {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8) var(--space-16);\n overflow: hidden;\n }\n .main img,\n .main video.preview-media {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--rounded-4);\n box-shadow: 0 2px 12px var(--overlay);\n background: var(--text-primary);\n }\n .pdf-stage {\n width: 100%;\n height: 100%;\n min-height: 0;\n display: flex;\n flex-direction: column;\n border-radius: var(--rounded-12, 0.75rem);\n overflow: hidden;\n background: var(--bg-secondary, #0f172a);\n box-shadow: 0 2px 16px var(--overlay, rgba(0,0,0,0.12));\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 40%, transparent);\n }\n .pdf-frame {\n flex: 1;\n width: 100%;\n min-height: 18rem;\n border: 0;\n background: #525659;\n }\n .pdf-fallback {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12, 0.75rem);\n padding: var(--space-24, 1.5rem);\n color: var(--text-secondary);\n text-align: center;\n }\n .pdf-fallback a,\n .file-preview-actions a,\n .file-preview-actions button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.35rem;\n padding: 0.55rem 1rem;\n border-radius: var(--rounded-8, 0.5rem);\n background: var(--brand);\n color: var(--text-on-brand, #fff);\n text-decoration: none;\n border: none;\n cursor: pointer;\n font-size: var(--text-13, 0.8125rem);\n font-weight: 600;\n font-family: inherit;\n }\n .file-preview-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--gap-8, 0.5rem);\n justify-content: center;\n margin-top: var(--space-16, 1rem);\n }\n .file-preview-actions a.secondary,\n .file-preview-actions button.secondary {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--border, #e2e8f0);\n }\n .audio-stage {\n width: min(100%, 28rem);\n padding: var(--space-24, 1.5rem);\n border-radius: var(--rounded-16, 1rem);\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 80%, transparent);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-16, 1rem);\n box-sizing: border-box;\n }\n .audio-stage audio {\n width: 100%;\n }\n .audio-stage .audio-title {\n margin: 0;\n font-size: var(--text-16, 1rem);\n font-weight: 600;\n color: var(--text-primary);\n text-align: center;\n word-break: break-word;\n }\n .thumb.pdf-thumb {\n position: relative;\n background: #b91c1c;\n color: #fff;\n font-size: 0.55rem;\n font-weight: 800;\n letter-spacing: 0.02em;\n }\n .thumb.pdf-thumb span {\n pointer-events: none;\n }\n .thumb.add-thumb:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n .limit-hint {\n width: 100%;\n text-align: center;\n font-size: var(--text-11, 0.6875rem);\n color: var(--text-tertiary, #94a3b8);\n margin: 0;\n }\n .file-chip {\n padding: var(--space-16) var(--space-16);\n border-radius: var(--rounded-8);\n background: var(--bg-primary);\n max-width: 80%;\n color: var(--text-primary);\n }\n .file-preview {\n width: 100%;\n max-width: 36rem;\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 70%, transparent);\n border-radius: var(--rounded-16, 1rem);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n box-shadow: 0 1px 2px var(--overlay, rgba(0,0,0,0.05));\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 4rem var(--space-24, 1.5rem);\n box-sizing: border-box;\n text-align: center;\n }\n .file-preview-icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: var(--space-24, 1.5rem);\n }\n .file-preview-icon-wrap img,\n .file-preview-icon-wrap svg {\n width: 5.5rem;\n height: 5.5rem;\n max-width: none;\n max-height: none;\n object-fit: contain;\n display: block;\n background: transparent;\n box-shadow: none;\n border-radius: 0;\n }\n .file-preview-title {\n margin: 0 0 var(--gap-4, 0.25rem);\n font-size: var(--text-20, 1.25rem);\n font-weight: var(--fw-600, 600);\n color: var(--text-tertiary, #94a3b8);\n }\n .file-preview-meta {\n margin: 0;\n font-size: var(--text-12, 0.75rem);\n font-weight: 500;\n color: var(--text-tertiary, #94a3b8);\n }\n .thumb.file-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg-primary);\n object-fit: contain;\n padding: var(--gap-6, 0.375rem);\n box-sizing: border-box;\n border-color: color-mix(in srgb, var(--brand) 40%, transparent);\n }\n .thumb.file-thumb.active {\n border-color: var(--brand);\n }\n .thumb.file-thumb img,\n .thumb.file-thumb svg {\n width: var(--icon-lg, 1.5rem);\n height: var(--icon-lg, 1.5rem);\n object-fit: contain;\n display: block;\n }\n .topbar-title.centered {\n flex: 1;\n text-align: center;\n font-weight: var(--fw-500, 500);\n font-size: var(--text-14, 0.875rem);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 var(--space-16);\n }\n .topbar-spacer {\n width: var(--control, 2.25rem);\n flex-shrink: 0;\n }\n .thumbs {\n display: flex;\n gap: var(--gap-12);\n overflow-x: auto;\n flex: 1;\n justify-content: center;\n align-items: center;\n min-width: 0;\n padding: 0;\n }\n .thumb {\n width: 3rem;\n height: 3rem;\n border-radius: var(--rounded-8);\n object-fit: cover;\n cursor: pointer;\n border: 2px solid var(--border);\n flex-shrink: 0;\n background: var(--bg-primary);\n box-sizing: border-box;\n }\n .thumb.active {\n border-color: var(--brand);\n }\n .thumb.add-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--border);\n background: var(--bg-primary);\n color: var(--text-secondary);\n font-size: var(--text-20);\n line-height: 1;\n padding: 0;\n }\n .thumb.add-thumb:hover {\n border-color: var(--text-tertiary);\n background: var(--hover-overlay);\n }\n .thumb-wrap {\n position: relative;\n width: 3rem;\n height: 3rem;\n flex-shrink: 0;\n }\n .thumb-wrap > .thumb {\n width: 100%;\n height: 100%;\n }\n .thumb-x {\n display: none;\n position: absolute;\n top: 0.125rem;\n right: 0.125rem;\n width: 0.875rem;\n height: 0.875rem;\n border: none;\n border-radius: 999px;\n background: var(--text-primary);\n color: var(--bg-primary);\n font-size: 0.65rem;\n line-height: 1;\n padding: 0;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n z-index: 1;\n }\n .thumb-wrap:hover .thumb-x {\n display: flex;\n }\n .footer {\n display: flex;\n flex-direction: column;\n gap: var(--gap-8);\n padding: var(--space-16) var(--space-24) var(--space-24, 1.5rem);\n flex-shrink: 0;\n width: 100%;\n max-width: 48rem;\n margin: 0 auto;\n box-sizing: border-box;\n position: relative;\n }\n .composer {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n width: 100%;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n .emoji-panel {\n position: absolute;\n bottom: calc(100% + var(--gap-8));\n right: calc(3.5rem + var(--gap-12));\n width: min(360px, calc(100vw - 32px));\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 8px 32px var(--overlay);\n overflow: hidden;\n z-index: 20;\n }\n emoji-picker.emoji-picker {\n --background: var(--bg-primary);\n --border-color: transparent;\n --border-size: 0;\n --indicator-color: var(--brand);\n --indicator-height: 3px;\n --input-border-radius: var(--rounded-8);\n --input-border-color: var(--brand);\n --num-columns: 8;\n --emoji-size: 1.5rem;\n width: 100%;\n height: 320px;\n }\n .composer-pill {\n flex: 1;\n width: auto;\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n background: var(--bg-input);\n border-radius: var(--rounded-12);\n padding: var(--space-12) var(--space-16);\n min-width: 0;\n box-sizing: border-box;\n }\n .composer-pill input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: inherit;\n min-width: 0;\n }\n .composer-pill input::placeholder {\n color: var(--text-tertiary);\n }\n .composer-pill .smile-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .action-row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12);\n width: 100%;\n padding-bottom: var(--space-16, 1rem);\n box-sizing: border-box;\n }\n .send-btn {\n position: relative;\n width: 3.5rem;\n height: 3.5rem;\n border-radius: 50%;\n border: none;\n background: var(--brand);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n box-shadow: 0 2px 8px var(--overlay);\n }\n .send-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n display: block;\n }\n .send-btn:hover {\n opacity: 0.92;\n }\n .send-btn:hover img {\n filter: brightness(0) invert(1);\n }\n .send-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n min-width: 1.125rem;\n height: 1.125rem;\n padding: 0 0.25rem;\n border-radius: var(--rounded-full);\n background: var(--brand);\n color: var(--text-on-brand);\n font-size: var(--text-10);\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n border: 2px solid var(--bg-primary);\n line-height: 1;\n }\n .add-input {\n display: none;\n }\n .camera-view {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--space-16);\n width: 100%;\n height: 100%;\n min-height: 0;\n }\n .camera-view video {\n width: 100%;\n max-width: 720px;\n max-height: calc(100% - 88px);\n object-fit: cover;\n border-radius: var(--rounded-12);\n background: var(--bg-primary);\n transform: scaleX(-1);\n box-shadow: 0 2px 12px var(--overlay);\n }\n .camera-view video:not(.is-ready) {\n visibility: hidden;\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n pointer-events: none;\n }\n .camera-loading {\n color: var(--text-secondary);\n font-size: var(--text-14);\n }\n .snap-btn {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n border: 3px solid var(--danger);\n background: var(--bg-primary);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .snap-btn::after {\n content: '';\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--danger);\n display: block;\n }\n .camera-error {\n color: var(--danger);\n font-size: var(--text-14);\n text-align: center;\n padding: 0 var(--space-16);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
4748
4778
 
4749
4779
  const ReplyBlock = class {
4750
4780
  constructor(hostRef) {
@@ -4850,16 +4880,33 @@ const ChatFooter = class {
4850
4880
  return;
4851
4881
  this.showCamera = false;
4852
4882
  const existing = Array.isArray(this.attachmentDetails) ? this.attachmentDetails : [];
4853
- this.attachmentDetails = [...existing, ...incoming];
4854
- // local list: FileReader callbacks can finish in the same turn and would otherwise overwrite each other
4883
+ const { accepted, rejected } = mediaLimits.takeMediaFiles(incoming, existing.length);
4884
+ if (rejected > 0 || !accepted.length) {
4885
+ toast.showToast({
4886
+ message: mediaLimits.mediaLimitToastMessage(rejected || incoming.length, mediaLimits.MAX_MEDIA_PER_MESSAGE),
4887
+ type: 'warning',
4888
+ position: 'bottom-right',
4889
+ });
4890
+ }
4891
+ if (!accepted.length)
4892
+ return;
4893
+ this.attachmentDetails = [...existing, ...accepted];
4894
+ // Keep a shared array so async FileReader callbacks don't clobber each other
4855
4895
  const previews = [...this.mediaPreviews];
4856
- incoming.forEach((file) => {
4896
+ accepted.forEach((file) => {
4897
+ const mime = (file.type || '').toLowerCase();
4898
+ const fileType = mime.split('/')[0] || 'application';
4899
+ if (!['image', 'video', 'application', 'audio', 'text'].includes(fileType))
4900
+ return;
4901
+ // Blob URLs give native PDF / video / audio players a real source (data URLs often fail in iframes)
4902
+ if (mime.includes('pdf') || fileType === 'video' || fileType === 'audio' || fileType === 'application' || fileType === 'text') {
4903
+ previews.push({ type: fileType, src: URL.createObjectURL(file), file });
4904
+ this.mediaPreviews = [...previews];
4905
+ return;
4906
+ }
4857
4907
  const reader = new FileReader();
4858
4908
  reader.onload = (e) => {
4859
4909
  var _a;
4860
- const fileType = file.type.split('/')[0];
4861
- if (!['image', 'video', 'application', 'audio', 'text'].includes(fileType))
4862
- return;
4863
4910
  previews.push({ type: fileType, src: (_a = e.target) === null || _a === void 0 ? void 0 : _a.result, file });
4864
4911
  this.mediaPreviews = [...previews];
4865
4912
  };
@@ -5155,12 +5202,14 @@ const ChatFooter = class {
5155
5202
  const removed = this.mediaPreviews[event.detail];
5156
5203
  if (!removed)
5157
5204
  return;
5205
+ this.revokePreviewSrc(removed.src);
5158
5206
  this.mediaPreviews = this.mediaPreviews.filter((_, i) => i !== event.detail);
5159
5207
  this.attachmentDetails = (this.attachmentDetails || []).filter((file) => file !== removed.file);
5160
5208
  if (!this.mediaPreviews.length)
5161
5209
  this.handleClearAttachment();
5162
5210
  };
5163
5211
  this.handleClearAttachment = () => {
5212
+ this.mediaPreviews.forEach(p => this.revokePreviewSrc(p.src));
5164
5213
  this.attachmentDetails = null;
5165
5214
  this.mediaPreviews = [];
5166
5215
  this.showCamera = false;
@@ -5381,22 +5430,39 @@ const ChatFooter = class {
5381
5430
  var _a;
5382
5431
  this.changeMessageSendingState(true);
5383
5432
  let messageId = Date.now().toString() + Math.random() * 100;
5384
- const attachments = this.attachmentDetails.map(file => ({
5433
+ const files = mediaLimits.takeMediaFiles(this.attachmentDetails || [], 0).accepted;
5434
+ if (!files.length) {
5435
+ this.changeMessageSendingState(false);
5436
+ return;
5437
+ }
5438
+ const attachments = files.map(file => ({
5385
5439
  nameWithExtension: file.name,
5386
5440
  mediaType: file.type.startsWith('image/') ? 0 : file.type.startsWith('video/') ? 1 : file.type.startsWith('audio/') ? 2 : 3,
5387
- mediaId: file.lastModified + '',
5441
+ mediaId: String(file.lastModified || Date.now()) + Math.random().toString(36).slice(2, 6),
5388
5442
  mimeType: file.type,
5389
5443
  size: file.size,
5390
5444
  file,
5391
5445
  }));
5392
- const localAttachments = this.mediaPreviews.map(preview => ({
5446
+ const localAttachments = this.mediaPreviews
5447
+ .filter(p => files.includes(p.file))
5448
+ .slice(0, mediaLimits.MAX_MEDIA_PER_MESSAGE)
5449
+ .map(preview => ({
5393
5450
  name: preview.file.name,
5394
5451
  size: preview.file.size,
5395
5452
  type: preview.type,
5396
5453
  mediaUrl: preview.src,
5397
5454
  mimeType: preview.file.type,
5398
5455
  }));
5399
- const localMessage = this.createLocalMessage(this.messageBody || 'AttachmentMessage:Multiple', localAttachments, messageId);
5456
+ const customType = files.length === 1
5457
+ ? files[0].type.startsWith('image/')
5458
+ ? 'AttachmentMessage:Image'
5459
+ : files[0].type.startsWith('video/')
5460
+ ? 'AttachmentMessage:Video'
5461
+ : files[0].type.startsWith('audio/')
5462
+ ? 'AttachmentMessage:Audio'
5463
+ : 'AttachmentMessage:File'
5464
+ : 'AttachmentMessage:Multiple';
5465
+ const localMessage = Object.assign(Object.assign({}, this.createLocalMessage(this.messageBody || customType, localAttachments, messageId)), { customType });
5400
5466
  try {
5401
5467
  await this.updateConversationListOnMessageSend(localMessage);
5402
5468
  }
@@ -5475,9 +5541,9 @@ const ChatFooter = class {
5475
5541
  });
5476
5542
  });
5477
5543
  await Promise.all(uploadPromises);
5478
- // Determine customType based on media type
5544
+ // One attachment → typed; 2–5 together → Multiple (same message)
5479
5545
  let customType = 'AttachmentMessage:Multiple';
5480
- if ((_a = attachments === null || attachments === void 0 ? void 0 : attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType) {
5546
+ if ((attachments === null || attachments === void 0 ? void 0 : attachments.length) === 1 && ((_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType)) {
5481
5547
  if (attachments[0].mimeType.startsWith('image/')) {
5482
5548
  customType = 'AttachmentMessage:Image';
5483
5549
  }
@@ -5540,6 +5606,16 @@ const ChatFooter = class {
5540
5606
  parentMessageType: this.replyMessage.attachments[0].mimeType,
5541
5607
  })), (((_k = this.messageBody) === null || _k === void 0 ? void 0 : _k.trim()) && { captionMessage: this.messageBody.trim() }));
5542
5608
  }
5609
+ revokePreviewSrc(src) {
5610
+ if (src && typeof src === 'string' && src.startsWith('blob:')) {
5611
+ try {
5612
+ URL.revokeObjectURL(src);
5613
+ }
5614
+ catch (_a) {
5615
+ /* ignore */
5616
+ }
5617
+ }
5618
+ }
5543
5619
  async handleDataChange() {
5544
5620
  this.handleClearAttachment();
5545
5621
  }
@@ -5561,9 +5637,9 @@ const ChatFooter = class {
5561
5637
  const webChat = index$1.findWebChatHost(this.el);
5562
5638
  const hasCustomReply = (webChat ? index$1.hasNamedSlot(webChat, 'reply-preview') : false) || index$1.hasNamedSlot(this.el, 'reply-preview');
5563
5639
  const showAttachment = this.attachmentDetails || this.showCamera;
5564
- return (index.h(index.Host, { key: '199eb4dac984653a45ea6d1d23aebc7c08b1edbd', class: { 'attachment-open': !!showAttachment } }, index.h("div", { key: '15868c212630f526aef704c7bbb7f39d835056c6', class: "chat-footer-container" }, showAttachment ? (index.h("slot", { name: "attachment-preview" }, index.h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (index.h(index.Fragment, null, hasCustomReply ? index.h("slot", { name: "reply-preview" }) : null, index.h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (index.h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5640
+ return (index.h(index.Host, { key: 'd6fd217a7f5a57cf16a0f54c6a6f9ae9b81efcab', class: { 'attachment-open': !!showAttachment } }, index.h("div", { key: '99ca88fbaabe52c1dbbf977bfe3a556f473e5118', class: "chat-footer-container" }, showAttachment ? (index.h("slot", { name: "attachment-preview" }, index.h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (index.h(index.Fragment, null, hasCustomReply ? index.h("slot", { name: "reply-preview" }) : null, index.h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (index.h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
5565
5641
  ? 'You'
5566
- : (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, index.h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (index.h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, index.h("div", { class: "emoji-panel-header" }, index.h("span", null, "Emoji"), index.h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), index.h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, index.h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (index.h("div", { class: "rec-body" }, index.h("div", { class: "rec-left" }, index.h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, index.h("img", { class: "theme-icon", src: chatAssets.Delete, alt: "" })), index.h("div", { class: "rec-timer-wrap" }, index.h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), index.h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), index.h("div", { class: "rec-wave" }, index.h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), index.h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, index.h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), index.h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, index.h("img", { src: chatAssets.Send, alt: "" })))) : (index.h(index.Fragment, null, index.h("div", { class: "attach-wrap" }, index.h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, index.h("img", { src: chatAssets.Attachment, alt: "" })), this.showAttachMenu ? (index.h("div", { class: "attach-menu", style: this.attachMenuStyle }, index.h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, index.h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, index.h("img", { src: DocumentsIcon, alt: "" })), index.h("span", null, "Document")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, index.h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, index.h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), index.h("span", null, "Photos & videos")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, index.h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, index.h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), index.h("span", null, "Camera")))) : null), index.h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, index.h("img", { src: chatAssets.Smile, alt: "" })), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), index.h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (index.h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, index.h("img", { src: chatAssets.Send, alt: "" }))) : (index.h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, index.h("img", { src: chatAssets.Microphone, alt: "" })))))))))))));
5642
+ : (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, index.h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (index.h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, index.h("div", { class: "emoji-panel-header" }, index.h("span", null, "Emoji"), index.h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), index.h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, index.h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (index.h("div", { class: "rec-body" }, index.h("div", { class: "rec-left" }, index.h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, index.h("img", { class: "theme-icon", src: chatAssets.Delete, alt: "" })), index.h("div", { class: "rec-timer-wrap" }, index.h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), index.h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), index.h("div", { class: "rec-wave" }, index.h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), index.h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, index.h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), index.h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, index.h("img", { src: chatAssets.Send, alt: "" })))) : (index.h(index.Fragment, null, index.h("div", { class: "attach-wrap" }, index.h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, index.h("img", { src: chatAssets.Attachment, alt: "" })), this.showAttachMenu ? (index.h("div", { class: "attach-menu", style: this.attachMenuStyle }, index.h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, index.h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, index.h("img", { src: DocumentsIcon, alt: "" })), index.h("span", null, "Document")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, index.h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, index.h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), index.h("span", null, "Photos & videos")), index.h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, index.h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, index.h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), index.h("span", null, "Camera")))) : null), index.h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, index.h("img", { src: chatAssets.Smile, alt: "" })), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), index.h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), index.h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (index.h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, index.h("img", { src: chatAssets.Send, alt: "" }))) : (index.h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, index.h("img", { src: chatAssets.Microphone, alt: "" })))))))))))));
5567
5643
  }
5568
5644
  get el() { return index.getElement(this); }
5569
5645
  static get watchers() { return {
@@ -5938,7 +6014,7 @@ const ContactInfo = class {
5938
6014
  });
5939
6015
  };
5940
6016
  this.onPreviewError = (att) => {
5941
- const urls = groupMembers.mediaPreviewUrls(att);
6017
+ const urls = mediaLimits.mediaPreviewUrls(att);
5942
6018
  const key = this.previewKey(att);
5943
6019
  const i = this.previewTry[key] || 0;
5944
6020
  if (i + 1 >= urls.length)
@@ -6044,7 +6120,7 @@ const ContactInfo = class {
6044
6120
  return String((att === null || att === void 0 ? void 0 : att.mediaId) || (att === null || att === void 0 ? void 0 : att.mediaUrl) || (att === null || att === void 0 ? void 0 : att.name) || '');
6045
6121
  }
6046
6122
  shownSrc(att) {
6047
- const urls = groupMembers.mediaPreviewUrls(att);
6123
+ const urls = mediaLimits.mediaPreviewUrls(att);
6048
6124
  const i = this.previewTry[this.previewKey(att)] || 0;
6049
6125
  return urls[i] || urls[0] || '';
6050
6126
  }
@@ -6056,7 +6132,7 @@ const ContactInfo = class {
6056
6132
  return mime.startsWith('video/') || Number(att === null || att === void 0 ? void 0 : att.mediaType) === 1;
6057
6133
  }
6058
6134
  docIcon(doc) {
6059
- const kind = groupMembers.docIconKind(doc);
6135
+ const kind = mediaLimits.docIconKind(doc);
6060
6136
  if (kind === 'excel')
6061
6137
  return ExcelIcon;
6062
6138
  if (kind === 'pdf')
@@ -6073,7 +6149,7 @@ const ContactInfo = class {
6073
6149
  return ((_a = body.match(/https?:\/\/\S+/)) === null || _a === void 0 ? void 0 : _a[0]) || body;
6074
6150
  }
6075
6151
  extractAttachments() {
6076
- const { media, docs } = groupMembers.splitSharedMessages(this.allAttachments);
6152
+ const { media, docs } = mediaLimits.splitSharedMessages(this.allAttachments);
6077
6153
  const byTime = (a, b) => Number(b.date || 0) - Number(a.date || 0);
6078
6154
  this.mediaItems = media.sort(byTime);
6079
6155
  this.docItems = docs.sort(byTime);
@@ -6671,7 +6747,7 @@ const IncomingTextMessageBubble = class {
6671
6747
  this.showReactionOnHover = false;
6672
6748
  }
6673
6749
  render() {
6674
- return (index.h("message-bubble", { key: '838a04a6e09c02e3b52a684662d9d5fc067c8f9b', isSelf: false, time: this.time, timeColor: this.timeColor, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || '#EFF1FA', borderRadius: this.borderRadius || '7px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, index.h("div", { key: '269bfa432d1c21661442d8bd15078679e450ccf6', style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, messageBodyRender.renderMessageBody(this.textContent, this.mentionedUsers, u => messageBodyRender.emitTagUser(this.tagUserClick, u), false))));
6750
+ return (index.h("message-bubble", { key: 'f16a583b4ef9fcb808e9ea7febebae93d6d1f31c', isSelf: false, time: this.time, timeColor: this.timeColor, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || '#EFF1FA', borderRadius: this.borderRadius || '7px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, index.h("div", { key: '93855e0f79c423d8d3bbce91cf94a55e7fc477b5', style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, messageBodyRender.renderMessageBody(this.textContent, this.mentionedUsers, u => messageBodyRender.emitTagUser(this.tagUserClick, u), false))));
6675
6751
  }
6676
6752
  };
6677
6753
  IncomingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-left: 10px; }";
@@ -6692,7 +6768,7 @@ const MessageDatePill = class {
6692
6768
  this.content = '';
6693
6769
  }
6694
6770
  render() {
6695
- return (index.h("span", { key: '0702a59f67b7213bbce02ceb58cf4338c281678e', class: "pill", style: {
6771
+ return (index.h("span", { key: '07d81baf556c1f5345bbf8cf6a534865dc28400f', class: "pill", style: {
6696
6772
  background: this.bgColor,
6697
6773
  color: this.textColor,
6698
6774
  width: this.width,
@@ -6726,6 +6802,7 @@ const OutgoingTextMessageBubble = class {
6726
6802
  this.alignSelf = undefined;
6727
6803
  this.isRead = undefined;
6728
6804
  this.isDelivered = undefined;
6805
+ this.deliveryStatus = undefined;
6729
6806
  this.textColor = undefined;
6730
6807
  this.mentionedUsers = [];
6731
6808
  this.messageType = undefined;
@@ -6736,7 +6813,7 @@ const OutgoingTextMessageBubble = class {
6736
6813
  this.fontFamily = 'var(--font-primary)';
6737
6814
  }
6738
6815
  render() {
6739
- return (index.h("message-bubble", { key: '1eba216099413f5579f8dcc871fa228f71133bab', isSelf: true, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px' }, index.h("div", { key: 'dc3b6bd69568d2e2f31a0b6e0862b4b74916ec1f', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, messageBodyRender.renderMessageBody(this.textContent, this.mentionedUsers, u => messageBodyRender.emitTagUser(this.tagUserClick, u), true))));
6816
+ return (index.h("message-bubble", { key: '2cc678a3f9f3ce8b2b5192d12f42282809b774d0', isSelf: true, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, deliveryStatus: this.deliveryStatus, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px' }, index.h("div", { key: '07d5f13d5572d8e41cc87657457d0f1443f435cb', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, messageBodyRender.renderMessageBody(this.textContent, this.mentionedUsers, u => messageBodyRender.emitTagUser(this.tagUserClick, u), true))));
6740
6817
  }
6741
6818
  };
6742
6819
  OutgoingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-right: 10px; }";
@@ -6794,7 +6871,7 @@ const ReplyMessageContainer = class {
6794
6871
  render() {
6795
6872
  const parentBody = this.parentMessageBody || this.parentmessageBody || this.repliedMessage || '';
6796
6873
  const parentName = this.parentMessageSenderName || this.senderName || 'Reply';
6797
- return (index.h("message-bubble", { key: 'ee12ad6d5f9a7b50212dd8e4eca8a9a5834001da', isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, index.h("div", { key: 'b06be77b9e414c369857d24087af0186694dbd7e', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, index.h("div", { key: '4314f7d16b2a8f84304976af6ab58606fd01758a', class: "quote-sender" }, parentName), index.h("div", { key: 'dc4c480e0ed2f3887b155c27a747a511eacba498', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (index.h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), index.h("div", { key: '6b1dac9d328314ac4797cd40bf4d6c1bff84639e', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
6874
+ return (index.h("message-bubble", { key: '19d3d2dbd694b65061f9c1c625827a732636eee3', isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, index.h("div", { key: 'c1d4c598c474602a6cd60ed4b3b7299c262481ed', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, index.h("div", { key: 'ae9d571587c21542aaa7d299d68896730c59d519', class: "quote-sender" }, parentName), index.h("div", { key: '2c7e75a12de5dea06f8c9e90d957bf2d077f89a3', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (index.h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), index.h("div", { key: 'fdfdd4fffe9e2da10ea7b22f30f8ed2ffd55713b', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
6798
6875
  }
6799
6876
  };
6800
6877
  ReplyMessageContainer.style = ":host { display: block; }\n .quote {\n border-left: 3px solid var(--brand);\n background: var(--hover-overlay);\n border-radius: 6px;\n padding: 6px 8px;\n margin-bottom: 6px;\n font-size: 12px;\n max-width: 100%;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n }\n .quote-sender { font-weight: 600; margin-bottom: 2px; color: var(--brand); }\n .quote-body { opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .quote-media { max-width: 120px; max-height: 80px; border-radius: 6px; margin-top: 4px; object-fit: cover; }\n .reply-body { width: 100%; text-align: left; }";
@@ -7167,6 +7244,7 @@ const WebChatBody = class {
7167
7244
  isSelf: isSelf,
7168
7245
  isRead: message === null || message === void 0 ? void 0 : message.readByAll,
7169
7246
  isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`,
7247
+ deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '',
7170
7248
  textColor: 'var(--text-outgoing-message)',
7171
7249
  timeColor: 'var(--text-outgoing-time)',
7172
7250
  message: message === null || message === void 0 ? void 0 : message.body,
@@ -7604,7 +7682,7 @@ const WebChatBody = class {
7604
7682
  var _a, _b, _c, _d, _e, _f, _g, _h;
7605
7683
  const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
7606
7684
  const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
7607
- return (index.h("div", { key: '9f147a27411d99e67478ed1169154738a7684075', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (index.h("div", { key: '84a43fa0addeb46e253ab844844722360ba8e683', onClick: this.scrollToBottom, style: {
7685
+ return (index.h("div", { key: '41349e4779d95a79ef70c03dfae5cb49a2b45414', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (index.h("div", { key: '961f05e545a0e143777387b0e47e4600641873c7', onClick: this.scrollToBottom, style: {
7608
7686
  position: 'sticky',
7609
7687
  top: '90%',
7610
7688
  left: '95%',
@@ -7618,7 +7696,7 @@ const WebChatBody = class {
7618
7696
  cursor: 'pointer',
7619
7697
  boxShadow: '0 2px 5px rgba(0,0,0,0.2)',
7620
7698
  zIndex: '100',
7621
- } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (index.h("div", { key: 'd7cd08ce123942a40e9e86c89cb77aef57e9bcd7', style: {
7699
+ } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (index.h("div", { key: '5c19e65015c475122cebb6c534acefead6b34d42', style: {
7622
7700
  position: 'absolute',
7623
7701
  bottom: '22px',
7624
7702
  right: '-2px',
@@ -7632,7 +7710,7 @@ const WebChatBody = class {
7632
7710
  justifyContent: 'center',
7633
7711
  fontSize: '12px',
7634
7712
  padding: '0 4px',
7635
- } })), index.h("svg", { key: '8f4bef505984399f6f378e7aff14ef51c7d0de90', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '0f501f068f298a4a340d72ec772d0bdc534729a8', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (index.h("div", { key: 'c83d267957e4f0bab55a6da876ef00606f0c57b3', style: {
7713
+ } })), index.h("svg", { key: '5b5ebe5fd78b4edeb07af288de25ef448c80c8da', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'cdadce78ef4ea10c889e7e9dfe1af479c96e3928', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (index.h("div", { key: '179cc7c4014f96666cb435fa8367259df8a3cdbd', style: {
7636
7714
  display: 'flex',
7637
7715
  flexDirection: 'column',
7638
7716
  alignItems: 'center',
@@ -7642,7 +7720,7 @@ const WebChatBody = class {
7642
7720
  textAlign: 'center',
7643
7721
  color: 'var(--text-secondary-color)',
7644
7722
  marginTop: '20px',
7645
- } }, index.h("img", { key: '9bb44052d7b4dd104f1af44c80a8a23ef3761d6a', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), index.h("div", { key: '64542179541d638dd8bb3ae71fd9de2bde666224', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, index.h("span", { key: '3c843966b9a49b25edfc7d981fbf7037ca8ef32a', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), index.h("span", { key: '3c2ff4f8a47055a0297a2e62846c0d785d98187d', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (index.h("spinner-loader", { key: '5a8ac1823d00c7f4199a8eabc7c7db7ce4dc34f5', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
7723
+ } }, index.h("img", { key: 'b5378a6691d73fc077fd4cdfddcac75e8e58fe6a', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), index.h("div", { key: '46d0559e27bcc19835a4302a1cc309d54e3676d2', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, index.h("span", { key: '6e98d5e69eb9d6bb7d02492d081d6b168551efd3', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), index.h("span", { key: '0bde23971bbf29e2e96aae4f6f9cd0842a665bdb', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (index.h("spinner-loader", { key: '202bb3f336ff309f71611c60529e589371df0eaf', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
7646
7724
  ((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
7647
7725
  (() => {
7648
7726
  const total = this.allMessages.length;
@@ -7661,7 +7739,7 @@ const WebChatBody = class {
7661
7739
  const previousMessageDate = formatMessageDateFromTimestamp(((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[index$1 - 1]) === null || _d === void 0 ? void 0 : _d.sentAt) || '');
7662
7740
  const showDatePill = currentMessageDate !== previousMessageDate;
7663
7741
  let isSelf = ((message === null || message === void 0 ? void 0 : message.senderId) || ((_e = message === null || message === void 0 ? void 0 : message.senderInfo) === null || _e === void 0 ? void 0 : _e.userId)) === ((_f = this.userMetaData) === null || _f === void 0 ? void 0 : _f.userId);
7664
- // Rounit model: host CE + SDK props/callbacks (functionality stays in SDK)
7742
+ // Host CE + SDK props/callbacks (functionality stays in SDK)
7665
7743
  const bubbleTag = (_g = this.customParts) === null || _g === void 0 ? void 0 : _g.messageBubble;
7666
7744
  if (bubbleTag) {
7667
7745
  const status = contracts.deriveMessageStatus(message);
@@ -7710,7 +7788,7 @@ const WebChatBody = class {
7710
7788
  else {
7711
7789
  // Existing code for regular text messages
7712
7790
  if (isSelf) {
7713
- return (index.h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (index.h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), index.h("div", { id: "outgoing-message", style: { position: 'relative', display: 'flex', width: '100%', justifyContent: 'end' }, "data-message-id": message.messageId }, index.h("outgoing-text-message-bubble", { isRead: message.readByAll, padding: "10px 10px 10px 10px", borderRadius: "10px 10px 0 10px", textContent: message === null || message === void 0 ? void 0 : message.body, time: message === null || message === void 0 ? void 0 : message.sentAt, bgColor: "var(--bg-outgoing-message)", textColor: "var(--text-outgoing-message)", isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`, mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, messageType: message === null || message === void 0 ? void 0 : message.messageType, timeColor: "var(--text-outgoing-time)" }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));
7791
+ return (index.h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (index.h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), index.h("div", { id: "outgoing-message", style: { position: 'relative', display: 'flex', width: '100%', justifyContent: 'end' }, "data-message-id": message.messageId }, index.h("outgoing-text-message-bubble", { isRead: message.readByAll, padding: "10px 10px 10px 10px", borderRadius: "10px 10px 0 10px", textContent: message === null || message === void 0 ? void 0 : message.body, time: message === null || message === void 0 ? void 0 : message.sentAt, bgColor: "var(--bg-outgoing-message)", textColor: "var(--text-outgoing-message)", isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`, deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '', mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, messageType: message === null || message === void 0 ? void 0 : message.messageType, timeColor: "var(--text-outgoing-time)" }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));
7714
7792
  }
7715
7793
  else {
7716
7794
  return (index.h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (index.h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), index.h("div", { style: (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.isGroup) ? { display: 'flex' } : {}, id: "incoming-message" }, (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.isGroup) && this.renderSenderAvatar(message), index.h("incoming-text-message-bubble", { color: "var(--text-incoming-message)", bgColor: "var(--bg-incoming-message)", timeColor: "var(--text-incoming-time)", borderRadius: "10px 10px 10px 0", time: message === null || message === void 0 ? void 0 : message.sentAt, textContent: message === null || message === void 0 ? void 0 : message.body, mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, padding: "10px 10px 20px 10px", userMetaData: this.userMetaData, messageType: message === null || message === void 0 ? void 0 : message.messageType }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));