@mobilon-dev/chotto 0.3.121 → 0.3.124

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 (227) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +59 -40
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +35 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -30
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +13 -26
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
  19. package/dist/components/1_icons/CloseIcon.vue.js +10 -16
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
  21. package/dist/components/1_icons/DeletedMessageIcon.vue.js +11 -17
  22. package/dist/components/1_icons/MenuIcon.vue.js +10 -16
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  24. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  26. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  28. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  30. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  32. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  33. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  34. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  35. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  36. package/dist/components/1_icons/VerifiedBadge.vue.js +19 -25
  37. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  38. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +402 -552
  39. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  51. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  52. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  53. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  54. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +46 -12
  55. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  56. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  57. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  58. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  59. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  60. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -62
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +98 -80
  63. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  64. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  67. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  68. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  69. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +45 -76
  70. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -100
  71. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +91 -16
  72. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -79
  73. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +111 -88
  74. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  75. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  76. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  77. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  78. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  79. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  80. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  81. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  82. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  83. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  84. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  85. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +58 -32
  86. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  87. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  88. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  89. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  90. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  91. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +35 -41
  92. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  93. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +314 -131
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  99. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  100. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  101. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  102. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  103. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +68 -36
  104. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +37 -71
  105. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +62 -83
  106. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  107. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  108. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  109. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  110. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  111. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +42 -22
  112. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -460
  113. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +499 -181
  114. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  115. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  116. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  117. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  118. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  119. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  120. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  123. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  124. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  125. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  127. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  128. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  129. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -47
  131. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +46 -37
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  133. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  135. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  136. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +4 -52
  137. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +39 -16
  138. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -270
  139. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +274 -95
  140. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -409
  141. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +422 -143
  142. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  143. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  144. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -57
  145. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +69 -41
  146. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +4 -97
  147. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +173 -102
  148. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  149. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  150. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  151. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  152. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  153. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  154. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  155. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  156. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  157. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  158. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  159. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  160. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  161. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  162. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  163. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  164. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  165. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  166. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  167. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  168. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  169. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +118 -34
  170. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  171. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  172. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -94
  173. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +76 -10
  174. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  175. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  176. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -348
  177. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +339 -97
  178. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  179. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  180. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -308
  181. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +299 -89
  182. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  183. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  184. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -321
  185. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +338 -96
  186. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  187. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  188. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +19 -36
  189. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  190. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  191. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  192. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  193. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  194. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  195. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  196. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  197. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  198. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -170
  199. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +336 -239
  200. package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +25 -43
  201. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  202. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  203. package/dist/components/3_compounds/ChatList/ChatList.vue.js +166 -256
  204. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +39 -57
  205. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  206. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -185
  207. package/dist/components/3_compounds/Feed/Feed.vue2.js +314 -161
  208. package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +19 -17
  209. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  210. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  211. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  212. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  213. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  214. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  215. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  216. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -33
  217. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +59 -90
  218. package/dist/themes/dark.css +1 -1
  219. package/dist/themes/default.css +1 -1
  220. package/dist/themes/glass.css +1 -1
  221. package/dist/themes/green.css +1 -1
  222. package/dist/themes/mobilon1.css +1 -1
  223. package/dist/types/src/apps/data/chats.d.ts +48 -4
  224. package/dist/types/src/apps/data/messages.d.ts +366 -282
  225. package/dist/types/src/components/2_chatlist_elements/ChatTabs/styles/types.d.ts +2 -0
  226. package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +2 -0
  227. package/package.json +1 -1
@@ -1,34 +1,52 @@
1
- import { defineComponent as Fe, inject as Ne, ref as i, computed as s, watch as E, nextTick as k, onMounted as Ve, onUnmounted as qe } from "vue";
2
- import Ke from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
- import Qe from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
- import Ge from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
- import Je from "../FeedReplyQuote/FeedReplyQuote.vue.js";
6
- import Xe from "../../2_modals/ModalFullscreen/ModalFullscreen.vue.js";
7
- import Ye from "../MessageReactions/MessageReactions.vue.js";
8
- import Ze from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
9
- import et from "../MessageSmsInvite/MessageSmsInvite.vue.js";
10
- import tt from "../DeletedMessageContent/DeletedMessageContent.vue.js";
11
- import st from "../../1_atoms/Tooltip/Tooltip.vue.js";
12
- import { useMessageActions as nt } from "../../../hooks/messages/useMessageActions.js";
13
- import { useMessageHoverActions as ot } from "../../../hooks/messages/useMessageHoverActions.js";
14
- import { useMessageReactionsInFeed as at } from "../../../hooks/messages/useMessageReactionsInFeed.js";
15
- import { useMessageMenuActions as it } from "../../../hooks/messages/useMessageMenuActions.js";
16
- import { useMessageLinks as rt } from "../../../hooks/messages/useMessageLinks.js";
17
- import { useChannelAccentColor as lt } from "../../../hooks/messages/useChannelAccentColor.js";
18
- import { useSubtextTooltip as ut } from "../../../hooks/messages/useSubtextTooltip.js";
19
- import { useStartReply as mt } from "../../../hooks/messages/useStartReply.js";
20
- import { useTheme as ct } from "../../../hooks/useTheme.js";
1
+ import { defineComponent as as, inject as ns, ref as b, computed as r, watch as K, nextTick as Q, onMounted as ls, onUnmounted as os, createElementBlock as o, openBlock as l, normalizeStyle as j, normalizeClass as k, unref as a, createCommentVNode as i, createElementVNode as m, createBlock as p, createVNode as v, withCtx as M, createTextVNode as is, toDisplayString as R, Fragment as O, renderList as ms, withModifiers as A, Transition as L, Teleport as ke } from "vue";
2
+ import us from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
+ import rs from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
+ import gs from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
+ import cs from "../FeedReplyQuote/FeedReplyQuote.vue.js";
6
+ import ds from "../../2_modals/ModalFullscreen/ModalFullscreen.vue.js";
7
+ import vs from "../MessageReactions/MessageReactions.vue.js";
8
+ import Me from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
9
+ import fs from "../MessageSmsInvite/MessageSmsInvite.vue.js";
10
+ import bs from "../DeletedMessageContent/DeletedMessageContent.vue.js";
11
+ import ys from "../../1_atoms/Tooltip/Tooltip.vue.js";
12
+ import { useMessageActions as hs } from "../../../hooks/messages/useMessageActions.js";
13
+ import { useMessageHoverActions as ps } from "../../../hooks/messages/useMessageHoverActions.js";
14
+ import { useMessageReactionsInFeed as ws } from "../../../hooks/messages/useMessageReactionsInFeed.js";
15
+ import { useMessageMenuActions as ks } from "../../../hooks/messages/useMessageMenuActions.js";
16
+ import { useMessageLinks as Ms } from "../../../hooks/messages/useMessageLinks.js";
17
+ import { useChannelAccentColor as Rs } from "../../../hooks/messages/useChannelAccentColor.js";
18
+ import { useSubtextTooltip as xs } from "../../../hooks/messages/useSubtextTooltip.js";
19
+ import { useStartReply as Is } from "../../../hooks/messages/useStartReply.js";
20
+ import { useTheme as Cs } from "../../../hooks/useTheme.js";
21
21
  /* empty css */
22
22
  /* empty css */
23
23
  import "../../../locale/useLocale.js";
24
24
  /* empty css */
25
- import { buildReplyPayload as te } from "../../../hooks/messages/buildReplyPayload.js";
26
- import { getImageMessageItems as gt } from "../../../hooks/messages/getImageMessageItems.js";
27
- import { getStatus as dt, getStatusTitle as vt } from "../../../functions/getStatusMessage.js";
28
- import { getMessageClass as pt } from "../../../functions/getMessageClass.js";
29
- import { createReactionHandlers as ft } from "../../../functions/createReactionHandlers.js";
25
+ import { buildReplyPayload as Re } from "../../../hooks/messages/buildReplyPayload.js";
26
+ import { getImageMessageItems as Ts } from "../../../hooks/messages/getImageMessageItems.js";
27
+ import { getStatus as Ss, getStatusTitle as As } from "../../../functions/getStatusMessage.js";
28
+ import { getMessageClass as Ls } from "../../../functions/getMessageClass.js";
29
+ import { createReactionHandlers as Es } from "../../../functions/createReactionHandlers.js";
30
30
  import "../../../functions/parseMarkdown.js";
31
- const f = 4, Kt = /* @__PURE__ */ Fe({
31
+ const Us = ["messageId"], Ps = ["src"], js = {
32
+ key: 1,
33
+ class: "image-message__subtext"
34
+ }, Os = { class: "image-message__info-container" }, Bs = {
35
+ key: 0,
36
+ class: "image-message__time"
37
+ }, Fs = ["onClick"], Ns = ["src", "alt"], zs = {
38
+ key: 0,
39
+ class: "image-message__album-overflow"
40
+ }, Hs = {
41
+ key: 0,
42
+ class: "image-message__blur-wrapper"
43
+ }, Vs = ["src", "alt"], $s = ["src", "alt"], Ds = ["src", "alt"], Ws = {
44
+ key: 0,
45
+ class: "image-message__info-container"
46
+ }, _s = { class: "image-message__time" }, qs = ["innerHTML"], Ks = { class: "image-message__modal-body" }, Qs = ["src", "alt"], Gs = {
47
+ key: 2,
48
+ class: "image-message__modal-counter"
49
+ }, B = 4, Ct = /* @__PURE__ */ as({
32
50
  __name: "ImageMessage",
33
51
  props: {
34
52
  message: {
@@ -50,7 +68,7 @@ const f = 4, Kt = /* @__PURE__ */ Fe({
50
68
  reactionsMode: {
51
69
  type: String,
52
70
  default: "single",
53
- validator: (x) => ["single", "multi"].includes(x)
71
+ validator: (e) => ["single", "multi"].includes(e)
54
72
  },
55
73
  currentUserId: {
56
74
  type: [String, Number],
@@ -72,119 +90,118 @@ const f = 4, Kt = /* @__PURE__ */ Fe({
72
90
  }
73
91
  },
74
92
  emits: ["action", "reply", "sms-invite"],
75
- setup(x, { expose: se, emit: ne }) {
76
- se();
77
- const A = Ne("chatAppId"), { getTheme: oe } = ct(A || ""), { menuActions: O } = it(() => t.message), { hoverActionsEnabled: ae, reactionsActive: C } = ot(
93
+ setup(e, { emit: xe }) {
94
+ const G = ns("chatAppId"), { getTheme: J } = Cs(G || ""), { menuActions: E } = ks(() => t.message), { hoverActionsEnabled: Ie, reactionsActive: X } = ps(
78
95
  () => t.channel,
79
96
  () => t.reactionsEnabled,
80
97
  () => t.message
81
- ), { startReply: j } = mt(A || ""), t = x, b = ne, m = i(!1), r = i(0), o = s(() => gt(t.message)), v = s(() => o.value.length > 1), U = s(() => o.value.slice(0, f)), _ = s(() => Math.max(0, o.value.length - f)), ie = s(() => String(Math.min(o.value.length, f))), re = s(() => {
82
- const e = o.value[0];
83
- return (e == null ? void 0 : e.imagePreviewUrl) || (e == null ? void 0 : e.url) || "";
84
- }), w = s(() => o.value[r.value] || o.value[0]), le = s(() => {
85
- var e;
86
- return ((e = w.value) == null ? void 0 : e.url) || "";
87
- }), L = s(() => {
88
- var e;
89
- return ((e = w.value) == null ? void 0 : e.filename) || t.message.alt;
90
- }), ue = s(() => v.value ? L.value || `${r.value + 1} / ${o.value.length}` : L.value);
91
- function S(e) {
92
- r.value = e, m.value = !0;
98
+ ), { startReply: Ce } = Is(G || ""), t = e, F = xe, x = b(!1), y = b(0), g = r(() => Ts(t.message)), d = r(() => g.value.length > 1), N = r(() => g.value.slice(0, B)), z = r(() => Math.max(0, g.value.length - B)), Te = r(() => String(Math.min(g.value.length, B))), H = r(() => {
99
+ const s = g.value[0];
100
+ return (s == null ? void 0 : s.imagePreviewUrl) || (s == null ? void 0 : s.url) || "";
101
+ }), V = r(() => g.value[y.value] || g.value[0]), Se = r(() => {
102
+ var s;
103
+ return ((s = V.value) == null ? void 0 : s.url) || "";
104
+ }), $ = r(() => {
105
+ var s;
106
+ return ((s = V.value) == null ? void 0 : s.filename) || t.message.alt;
107
+ }), Ae = r(() => d.value ? $.value || `${y.value + 1} / ${g.value.length}` : $.value);
108
+ function Y(s) {
109
+ y.value = s, x.value = !0;
93
110
  }
94
- function me() {
95
- v.value || S(0);
111
+ function Le() {
112
+ d.value || Y(0);
96
113
  }
97
- function ce(e) {
98
- const u = _.value > 0 && e === U.value.length - 1;
99
- S(u ? f : e);
114
+ function Ee(s) {
115
+ const n = z.value > 0 && s === N.value.length - 1;
116
+ Y(n ? B : s);
100
117
  }
101
- function z() {
102
- const e = o.value.length;
103
- e < 2 || (r.value = (r.value - 1 + e) % e);
118
+ function Z() {
119
+ const s = g.value.length;
120
+ s < 2 || (y.value = (y.value - 1 + s) % s);
104
121
  }
105
- function P() {
106
- const e = o.value.length;
107
- e < 2 || (r.value = (r.value + 1) % e);
122
+ function ee() {
123
+ const s = g.value.length;
124
+ s < 2 || (y.value = (y.value + 1) % s);
108
125
  }
109
- function h(e) {
110
- !m.value || !v.value || (e.key === "ArrowLeft" ? (e.preventDefault(), z()) : e.key === "ArrowRight" && (e.preventDefault(), P()));
126
+ function D(s) {
127
+ !x.value || !d.value || (s.key === "ArrowLeft" ? (s.preventDefault(), Z()) : s.key === "ArrowRight" && (s.preventDefault(), ee()));
111
128
  }
112
- E(m, (e) => {
113
- e ? window.addEventListener("keydown", h) : window.removeEventListener("keydown", h);
129
+ K(x, (s) => {
130
+ s ? window.addEventListener("keydown", D) : window.removeEventListener("keydown", D);
114
131
  });
115
132
  const {
116
- isOpenMenu: ge,
117
- buttonMenuVisible: B,
118
- menuAnchorRef: de,
119
- menuRef: ve,
120
- menuStyle: pe,
121
- menuTheme: fe,
122
- showMenu: H,
123
- hideMenu: $,
124
- openMenu: D,
125
- toggleMenu: be,
126
- onMenuMouseEnter: we,
127
- onMenuMouseLeave: W,
128
- clickAction: he,
129
- viewsAction: Me,
130
- handleClickReplied: ye
131
- } = nt(t.message, b, {
132
- onReply: () => j(te(t.message, "message.image"))
133
- }), M = i(!1), { linkedHtml: F, inNewWindow: Re } = rt(() => t.message.text), l = i(null), a = i(null), c = i(0), y = i(0);
134
- E(
135
- () => F.value,
133
+ isOpenMenu: Ue,
134
+ buttonMenuVisible: se,
135
+ menuAnchorRef: Pe,
136
+ menuRef: je,
137
+ menuStyle: Oe,
138
+ menuTheme: Be,
139
+ showMenu: Fe,
140
+ hideMenu: Ne,
141
+ openMenu: ze,
142
+ toggleMenu: te,
143
+ onMenuMouseEnter: He,
144
+ onMenuMouseLeave: Ve,
145
+ clickAction: $e,
146
+ viewsAction: ae,
147
+ handleClickReplied: De
148
+ } = hs(t.message, F, {
149
+ onReply: () => Ce(Re(t.message, "message.image"))
150
+ }), I = b(!1), { linkedHtml: ne, inNewWindow: le } = Ms(() => t.message.text), w = b(null), f = b(null), C = b(0), W = b(0);
151
+ K(
152
+ () => ne.value,
136
153
  () => {
137
- g(), k(() => {
138
- n && a.value && n.observe(a.value);
154
+ T(), Q(() => {
155
+ c && f.value && c.observe(f.value);
139
156
  });
140
157
  }
141
158
  );
142
- const g = () => {
143
- k(() => {
144
- l.value && (c.value = l.value.offsetWidth), a.value && (y.value = a.value.offsetWidth);
159
+ const T = () => {
160
+ Q(() => {
161
+ w.value && (C.value = w.value.offsetWidth), f.value && (W.value = f.value.offsetWidth);
145
162
  });
146
163
  };
147
- let n = null, d = null;
148
- Ve(() => {
149
- g(), d = () => g(), window.addEventListener("resize", d), typeof ResizeObserver < "u" && (n = new ResizeObserver(() => {
150
- g();
151
- }), l.value && n.observe(l.value), a.value && n.observe(a.value));
152
- }), qe(() => {
153
- d && window.removeEventListener("resize", d), n && n.disconnect(), window.removeEventListener("keydown", h);
154
- }), E(
164
+ let c = null, U = null;
165
+ ls(() => {
166
+ T(), U = () => T(), window.addEventListener("resize", U), typeof ResizeObserver < "u" && (c = new ResizeObserver(() => {
167
+ T();
168
+ }), w.value && c.observe(w.value), f.value && c.observe(f.value));
169
+ }), os(() => {
170
+ U && window.removeEventListener("resize", U), c && c.disconnect(), window.removeEventListener("keydown", D);
171
+ }), K(
155
172
  () => [t.message.text, t.message.url, t.message.imagePreviewUrl, t.message.items],
156
173
  () => {
157
- g(), k(() => {
158
- n && (n.disconnect(), l.value && n.observe(l.value), a.value && n.observe(a.value));
174
+ T(), Q(() => {
175
+ c && (c.disconnect(), w.value && c.observe(w.value), f.value && c.observe(f.value));
159
176
  });
160
177
  },
161
178
  { immediate: !0 }
162
179
  );
163
- const Ie = s(() => v.value ? !1 : !!t.message.text && y.value > c.value && c.value > 0), xe = () => {
164
- H(), M.value = !0;
165
- }, Ae = (e) => {
166
- $(e), B.value || (M.value = !1);
167
- }, Le = () => {
168
- W(), M.value = !1;
169
- }, Se = s(() => t.message.reply && t.message.text ? "0" : t.message.text ? y.value > c.value && c.value > 0 ? "0" : "var(--chotto-imagemessage-preview-with-caption-border-radius, 7px 7px 0 0)" : t.message.reply ? "var(--chotto-imagemessage-preview-with-reply-border-radius, 0 0 7px 7px)" : "var(--chotto-imagemessage-preview-border-radius, 7px)"), Te = s(() => dt(t.message.status)), Ee = s(() => vt(t.message.status, t.message.statusMsg)), { bubbleStyle: ke } = lt(
170
- s(() => t.message),
180
+ const oe = r(() => d.value ? !1 : !!t.message.text && W.value > C.value && C.value > 0), We = () => {
181
+ Fe(), I.value = !0;
182
+ }, ie = (s) => {
183
+ Ne(s), se.value || (I.value = !1);
184
+ }, _e = () => {
185
+ Ve(), I.value = !1;
186
+ }, me = r(() => t.message.reply && t.message.text ? "0" : t.message.text ? W.value > C.value && C.value > 0 ? "0" : "var(--chotto-imagemessage-preview-with-caption-border-radius, 7px 7px 0 0)" : t.message.reply ? "var(--chotto-imagemessage-preview-with-reply-border-radius, 0 0 7px 7px)" : "var(--chotto-imagemessage-preview-border-radius, 7px)"), ue = r(() => Ss(t.message.status)), re = r(() => As(t.message.status, t.message.statusMsg)), { bubbleStyle: qe } = Rs(
187
+ r(() => t.message),
171
188
  { cssVariable: "--chotto-imagemessage-right-bg", position: "right" }
172
189
  );
173
- function Oe(e) {
174
- return pt(e.position, "image-message");
190
+ function _(s) {
191
+ return Ls(s.position, "image-message");
175
192
  }
176
- const Ce = () => {
177
- m.value = !1;
178
- }, N = s(() => m.value ? w.value : o.value[0]), je = async () => {
179
- var u, Y;
180
- const e = N.value;
181
- if (e != null && e.url)
193
+ const Ke = () => {
194
+ x.value = !1;
195
+ }, Qe = r(() => x.value ? V.value : g.value[0]), Ge = async () => {
196
+ var n, u;
197
+ const s = Qe.value;
198
+ if (s != null && s.url)
182
199
  try {
183
- const R = await fetch(e.url, {
200
+ const h = await fetch(s.url, {
184
201
  headers: {
185
202
  Accept: "image/*"
186
203
  }
187
- }), He = R.headers.get("content-type") || "", $e = await R.blob(), T = ((Y = (u = e.url.split(".").pop()) == null ? void 0 : u.split("?")[0]) == null ? void 0 : Y.toLowerCase()) || "", De = {
204
+ }), he = h.headers.get("content-type") || "", es = await h.blob(), q = ((u = (n = s.url.split(".").pop()) == null ? void 0 : n.split("?")[0]) == null ? void 0 : u.toLowerCase()) || "", ss = {
188
205
  "image/jpeg": "jpg",
189
206
  "image/jpg": "jpg",
190
207
  "image/png": "png",
@@ -193,48 +210,310 @@ const f = 4, Kt = /* @__PURE__ */ Fe({
193
210
  "image/svg+xml": "svg",
194
211
  "image/bmp": "bmp"
195
212
  };
196
- let Z = T && ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp"].includes(T) ? T : De[He] || "jpg";
197
- const I = e.filename || t.message.alt, We = I ? I.includes(".") ? I : `${I}.${Z}` : `image-${t.message.messageId}.${Z}`, ee = window.URL.createObjectURL($e), p = document.createElement("a");
198
- p.href = ee, p.download = We, document.body.appendChild(p), p.click(), document.body.removeChild(p), window.URL.revokeObjectURL(ee);
199
- } catch (R) {
200
- console.error("Ошибка при скачивании изображения:", R);
213
+ let pe = q && ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp"].includes(q) ? q : ss[he] || "jpg";
214
+ const P = s.filename || t.message.alt, ts = P ? P.includes(".") ? P : `${P}.${pe}` : `image-${t.message.messageId}.${pe}`, we = window.URL.createObjectURL(es), S = document.createElement("a");
215
+ S.href = we, S.download = ts, document.body.appendChild(S), S.click(), document.body.removeChild(S), window.URL.revokeObjectURL(we);
216
+ } catch (h) {
217
+ console.error("Ошибка при скачивании изображения:", h);
201
218
  }
202
- }, { onToggleReaction: V, onAddReaction: q, onRemoveReaction: K } = ft(b), Q = i(null), G = i(null), J = s(() => {
203
- var u;
204
- const e = (u = G.value) == null ? void 0 : u.$el;
205
- return e instanceof HTMLElement ? e : null;
206
- }), { showReactions: Ue, onContentPointerEnter: _e, onContentPointerLeave: ze } = at({
219
+ }, { onToggleReaction: ge, onAddReaction: ce, onRemoveReaction: de } = Es(F), ve = b(null), fe = b(null), Je = r(() => {
220
+ var n;
221
+ const s = (n = fe.value) == null ? void 0 : n.$el;
222
+ return s instanceof HTMLElement ? s : null;
223
+ }), { showReactions: Xe, onContentPointerEnter: be, onContentPointerLeave: ye } = ws({
207
224
  message: () => t.message,
208
225
  messageId: () => t.message.messageId,
209
226
  reactions: () => t.message.reactions,
210
- reactionsActive: C,
227
+ reactionsActive: X,
211
228
  reactionsMode: () => t.reactionsMode,
212
- reply: () => te(t.message, "message.image"),
213
- menuEnabled: () => O.value.length > 0,
214
- contentRef: Q,
215
- chipsRef: J,
229
+ reply: () => Re(t.message, "message.image"),
230
+ menuEnabled: () => E.value.length > 0,
231
+ contentRef: ve,
232
+ chipsRef: Je,
216
233
  handlers: {
217
- onToggleReaction: V,
218
- onAddReaction: q,
219
- onRemoveReaction: K,
220
- onMenu: D
234
+ onToggleReaction: ge,
235
+ onAddReaction: ce,
236
+ onRemoveReaction: de,
237
+ onMenu: ze
221
238
  }
222
- }), Pe = ut(() => t.message, () => t.subtextTooltipData);
223
- function Be() {
224
- b("sms-invite", t.message);
239
+ }), Ye = xs(() => t.message, () => t.subtextTooltipData);
240
+ function Ze() {
241
+ F("sms-invite", t.message);
225
242
  }
226
- const X = { chatAppId: A, getTheme: oe, menuActions: O, hoverActionsEnabled: ae, reactionsActive: C, startReply: j, props: t, emit: b, isOpenModal: m, modalIndex: r, ALBUM_VISIBLE_LIMIT: f, imageItems: o, isAlbum: v, visibleAlbumItems: U, albumOverflow: _, albumLayout: ie, feedImageUrl: re, modalImage: w, modalImageUrl: le, modalImageAlt: L, modalTitle: ue, openModal: S, onPreviewClick: me, onAlbumTileClick: ce, showPrevModalImage: z, showNextModalImage: P, onModalKeydown: h, isOpenMenu: ge, buttonMenuVisible: B, menuAnchorRef: de, menuRef: ve, menuStyle: pe, menuTheme: fe, baseShowMenu: H, baseHideMenu: $, openMenu: D, toggleMenu: be, onMenuMouseEnter: we, baseOnMenuMouseLeave: W, clickAction: he, viewsAction: Me, handleClickReplied: ye, buttonDownloadVisible: M, linkedHtml: F, inNewWindow: Re, imageRef: l, textRef: a, imageWidth: c, textWidth: y, updateWidths: g, get resizeObserver() {
227
- return n;
228
- }, set resizeObserver(e) {
229
- n = e;
230
- }, get windowResizeHandler() {
231
- return d;
232
- }, set windowResizeHandler(e) {
233
- d = e;
234
- }, shouldApplyBlur: Ie, showMenu: xe, hideMenu: Ae, onMenuMouseLeave: Le, imageBorderRadius: Se, status: Te, statusTitle: Ee, rightBubbleStyle: ke, getClass: Oe, closeModal: Ce, downloadTarget: N, downloadImage: je, onToggleReaction: V, onAddReaction: q, onRemoveReaction: K, contentRef: Q, reactionsRef: G, chipsRef: J, showReactions: Ue, onContentPointerEnter: _e, onContentPointerLeave: ze, channelInfo: Pe, handleSmsInvite: Be, ContextMenu: Ke, LinkPreview: Qe, EmbedPreview: Ge, FeedReplyQuote: Je, ModalFullscreen: Xe, MessageReactions: Ye, MessageStatusIndicator: Ze, MessageSmsInvite: et, DeletedMessageContent: tt, Tooltip: st };
235
- return Object.defineProperty(X, "__isScriptSetup", { enumerable: !1, value: !0 }), X;
243
+ return (s, n) => (l(), o("div", {
244
+ ref_key: "menuAnchorRef",
245
+ ref: Pe,
246
+ class: k(["image-message", [
247
+ _(e.message),
248
+ e.applyStyle(e.message)
249
+ ]]),
250
+ messageId: e.message.messageId,
251
+ style: j(a(qe)),
252
+ onMouseleave: ie
253
+ }, [
254
+ e.message.avatar && e.isFirstInSeries ? (l(), o("img", {
255
+ key: 0,
256
+ class: "image-message__avatar",
257
+ src: e.message.avatar,
258
+ height: "32",
259
+ width: "32"
260
+ }, null, 8, Ps)) : i("", !0),
261
+ e.message.subText && e.isFirstInSeries ? (l(), o("p", js, [
262
+ v(ys, {
263
+ text: a(Ye),
264
+ position: e.message.position === "left" ? "right" : "left",
265
+ offset: 8
266
+ }, {
267
+ default: M(() => [
268
+ is(R(e.message.subText), 1)
269
+ ]),
270
+ _: 1
271
+ }, 8, ["text", "position"])
272
+ ])) : i("", !0),
273
+ m("div", {
274
+ ref_key: "contentRef",
275
+ ref: ve,
276
+ class: k(["image-message__content", { "is-first": e.isFirstInSeries, "with-avatar-indent": !e.isFirstInSeries && e.message.avatar, "has-caption": !!e.message.text }]),
277
+ onPointerenter: n[3] || (n[3] = //@ts-ignore
278
+ (...u) => a(be) && a(be)(...u)),
279
+ onPointerleave: n[4] || (n[4] = //@ts-ignore
280
+ (...u) => a(ye) && a(ye)(...u))
281
+ }, [
282
+ n[8] || (n[8] = m("div", {
283
+ class: "image-message__bottom-shadow",
284
+ "aria-hidden": "true"
285
+ }, null, -1)),
286
+ e.message.deleted ? (l(), o(O, { key: 0 }, [
287
+ v(bs),
288
+ m("div", Os, [
289
+ e.message.time ? (l(), o("span", Bs, R(e.message.time), 1)) : i("", !0),
290
+ v(Me, {
291
+ "base-class": "image-message",
292
+ "message-class": _(e.message),
293
+ "message-status": e.message.status,
294
+ "status-class": ue.value,
295
+ "status-title": re.value
296
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
297
+ ])
298
+ ], 64)) : (l(), o(O, { key: 1 }, [
299
+ e.message.reply ? (l(), p(cs, {
300
+ key: 0,
301
+ style: { margin: "10px 10px 4px 16px" },
302
+ class: k(e.message.position),
303
+ message: e.message.reply,
304
+ onReply: a(De)
305
+ }, null, 8, ["class", "message", "onReply"])) : i("", !0),
306
+ m("div", {
307
+ class: k(["image-message__preview-button", {
308
+ "image-message__preview-button--blur-edges": oe.value,
309
+ "image-message__preview-button--album": d.value
310
+ }]),
311
+ style: j(d.value ? { borderRadius: me.value } : void 0),
312
+ onClick: Le,
313
+ onMouseenter: We,
314
+ onMouseleave: ie
315
+ }, [
316
+ d.value ? (l(), o("div", {
317
+ key: 0,
318
+ class: k(["image-message__album", "image-message__album--" + Te.value])
319
+ }, [
320
+ (l(!0), o(O, null, ms(N.value, (u, h) => (l(), o("button", {
321
+ key: (u.url || "") + "-" + h,
322
+ type: "button",
323
+ class: "image-message__album-tile",
324
+ onClick: A((he) => Ee(h), ["stop"])
325
+ }, [
326
+ m("img", {
327
+ class: "image-message__album-image",
328
+ src: u.imagePreviewUrl || u.url,
329
+ alt: u.filename
330
+ }, null, 8, Ns),
331
+ z.value > 0 && h === N.value.length - 1 ? (l(), o("span", zs, "+" + R(z.value), 1)) : i("", !0)
332
+ ], 8, Fs))), 128))
333
+ ], 2)) : (l(), o(O, { key: 1 }, [
334
+ oe.value ? (l(), o("div", Hs, [
335
+ m("img", {
336
+ class: "image-message__blur-left",
337
+ src: H.value,
338
+ alt: e.message.alt
339
+ }, null, 8, Vs),
340
+ m("img", {
341
+ class: "image-message__blur-right",
342
+ src: H.value,
343
+ alt: e.message.alt
344
+ }, null, 8, $s)
345
+ ])) : i("", !0),
346
+ m("img", {
347
+ ref_key: "imageRef",
348
+ ref: w,
349
+ class: "image-message__preview-image",
350
+ style: j({ borderRadius: me.value }),
351
+ src: H.value,
352
+ alt: e.message.alt
353
+ }, null, 12, Ds)
354
+ ], 64)),
355
+ v(L, { name: "modal-fade" }, {
356
+ default: M(() => [
357
+ I.value ? (l(), o("div", Ws, [
358
+ e.message.views ? (l(), o("div", {
359
+ key: 0,
360
+ class: "image-message__views",
361
+ onClick: n[0] || (n[0] = A(
362
+ //@ts-ignore
363
+ (...u) => a(ae) && a(ae)(...u),
364
+ ["stop"]
365
+ ))
366
+ }, [
367
+ n[5] || (n[5] = m("span", { class: "pi pi-eye" }, null, -1)),
368
+ m("p", null, R(e.message.views), 1)
369
+ ])) : i("", !0),
370
+ m("span", _s, R(e.message.time), 1),
371
+ v(Me, {
372
+ "base-class": "image-message",
373
+ "message-class": _(e.message),
374
+ "message-status": e.message.status,
375
+ "status-class": ue.value,
376
+ "status-title": re.value
377
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
378
+ ])) : i("", !0)
379
+ ]),
380
+ _: 1
381
+ }),
382
+ v(L, { name: "modal-fade" }, {
383
+ default: M(() => [
384
+ I.value ? (l(), o("button", {
385
+ key: 0,
386
+ class: "image-message__download-button",
387
+ onClick: A(Ge, ["stop"])
388
+ }, [...n[6] || (n[6] = [
389
+ m("span", { class: "pi pi-download" }, null, -1)
390
+ ])])) : i("", !0)
391
+ ]),
392
+ _: 1
393
+ })
394
+ ], 38),
395
+ v(L, { name: "modal-fade" }, {
396
+ default: M(() => [
397
+ a(se) && a(E).length && !e.reactionsEnabled && a(Ie) ? (l(), o("button", {
398
+ key: 0,
399
+ class: "image-message__menu-button",
400
+ onClick: n[1] || (n[1] = //@ts-ignore
401
+ (...u) => a(te) && a(te)(...u))
402
+ }, [...n[7] || (n[7] = [
403
+ m("span", { class: "pi pi-ellipsis-h" }, null, -1)
404
+ ])])) : i("", !0)
405
+ ]),
406
+ _: 1
407
+ }),
408
+ (l(), p(ke, { to: "body" }, [
409
+ v(L, { name: "context-menu" }, {
410
+ default: M(() => [
411
+ a(Ue) && a(E).length ? (l(), p(us, {
412
+ key: 0,
413
+ ref_key: "menuRef",
414
+ ref: je,
415
+ class: "image-message__context-menu message-actions-menu",
416
+ style: j(a(Oe)),
417
+ "data-theme": a(Be),
418
+ actions: a(E),
419
+ onClick: a($e),
420
+ onMouseenter: a(He),
421
+ onMouseleave: _e
422
+ }, null, 8, ["style", "data-theme", "actions", "onClick", "onMouseenter"])) : i("", !0)
423
+ ]),
424
+ _: 1
425
+ })
426
+ ])),
427
+ e.message.text ? (l(), o("div", {
428
+ key: 1,
429
+ ref_key: "textRef",
430
+ ref: f,
431
+ class: "image-message__text-container"
432
+ }, [
433
+ m("p", {
434
+ onClick: n[2] || (n[2] = //@ts-ignore
435
+ (...u) => a(le) && a(le)(...u)),
436
+ innerHTML: a(ne)
437
+ }, null, 8, qs)
438
+ ], 512)) : i("", !0),
439
+ v(fs, {
440
+ status: e.message.status,
441
+ "has-messenger-account": e.message.hasMessengerAccount,
442
+ channel: e.channel,
443
+ onSmsInvite: Ze
444
+ }, null, 8, ["status", "has-messenger-account", "channel"]),
445
+ e.message.linkPreview ? (l(), p(rs, {
446
+ key: 2,
447
+ class: k(["image-message__link-preview", e.message.position]),
448
+ "link-preview": e.message.linkPreview
449
+ }, null, 8, ["class", "link-preview"])) : i("", !0),
450
+ e.message.embed ? (l(), p(gs, {
451
+ key: 3,
452
+ class: k(e.message.position),
453
+ embed: e.message.embed
454
+ }, null, 8, ["class", "embed"])) : i("", !0),
455
+ a(Xe) ? (l(), p(vs, {
456
+ key: 4,
457
+ ref_key: "reactionsRef",
458
+ ref: fe,
459
+ reactions: e.message.reactions,
460
+ "message-id": e.message.messageId,
461
+ enabled: a(X),
462
+ mode: e.reactionsMode,
463
+ "current-user-id": e.currentUserId,
464
+ "reaction-user-names": e.reactionUserNames,
465
+ onToggleReaction: a(ge),
466
+ onAddReaction: a(ce),
467
+ onRemoveReaction: a(de)
468
+ }, null, 8, ["reactions", "message-id", "enabled", "mode", "current-user-id", "reaction-user-names", "onToggleReaction", "onAddReaction", "onRemoveReaction"])) : i("", !0)
469
+ ], 64))
470
+ ], 34),
471
+ (l(), p(ke, { to: "body" }, [
472
+ v(L, { name: "modal-fade" }, {
473
+ default: M(() => [
474
+ x.value && !e.message.deleted ? (l(), p(ds, {
475
+ key: 0,
476
+ "data-theme": a(J)().theme ? a(J)().theme : "light",
477
+ title: Ae.value,
478
+ onClose: Ke
479
+ }, {
480
+ default: M(() => [
481
+ m("div", Ks, [
482
+ d.value ? (l(), o("button", {
483
+ key: 0,
484
+ type: "button",
485
+ class: "image-message__modal-nav image-message__modal-nav--prev",
486
+ "aria-label": "Предыдущее изображение",
487
+ onClick: A(Z, ["stop"])
488
+ }, [...n[9] || (n[9] = [
489
+ m("span", { class: "pi pi-chevron-left" }, null, -1)
490
+ ])])) : i("", !0),
491
+ m("img", {
492
+ class: "image-message__modal-image",
493
+ src: Se.value,
494
+ alt: $.value
495
+ }, null, 8, Qs),
496
+ d.value ? (l(), o("button", {
497
+ key: 1,
498
+ type: "button",
499
+ class: "image-message__modal-nav image-message__modal-nav--next",
500
+ "aria-label": "Следующее изображение",
501
+ onClick: A(ee, ["stop"])
502
+ }, [...n[10] || (n[10] = [
503
+ m("span", { class: "pi pi-chevron-right" }, null, -1)
504
+ ])])) : i("", !0),
505
+ d.value ? (l(), o("span", Gs, R(y.value + 1) + " / " + R(g.value.length), 1)) : i("", !0)
506
+ ])
507
+ ]),
508
+ _: 1
509
+ }, 8, ["data-theme", "title"])) : i("", !0)
510
+ ]),
511
+ _: 1
512
+ })
513
+ ]))
514
+ ], 46, Us));
236
515
  }
237
516
  });
238
517
  export {
239
- Kt as default
518
+ Ct as default
240
519
  };