@mobilon-dev/chotto 0.3.98 → 0.3.99

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 (211) 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 +61 -42
  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 +38 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -33
  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/MenuIcon.vue.js +10 -16
  22. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  24. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  26. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  28. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  30. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  32. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  33. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  34. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  35. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  36. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +396 -546
  37. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  39. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  51. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  52. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +42 -8
  53. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  54. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  55. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  56. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  57. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  58. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  59. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -61
  60. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +96 -79
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  63. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  64. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  67. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +51 -80
  68. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -182
  69. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +135 -25
  70. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -78
  71. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +95 -73
  72. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  73. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  74. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  75. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  76. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  77. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  78. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  79. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  80. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  81. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  82. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  83. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +60 -34
  84. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  85. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  86. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  87. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  88. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  89. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +33 -39
  90. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  91. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +311 -134
  92. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  93. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  99. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  100. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  101. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +67 -35
  102. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +38 -72
  103. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +57 -76
  104. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  105. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  106. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  107. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  108. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  109. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +39 -19
  110. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -458
  111. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +471 -160
  112. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  113. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  114. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  115. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  116. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  117. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  118. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  119. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  120. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  123. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  124. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  125. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  127. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  128. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +10 -16
  129. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -60
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +53 -36
  131. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  133. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  135. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -250
  136. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +233 -67
  137. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -315
  138. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +319 -98
  139. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  140. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  141. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -155
  142. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +212 -110
  143. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  144. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  145. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  146. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  147. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  148. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  149. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  150. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  151. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  152. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  153. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  154. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  155. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  156. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  157. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  158. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  159. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  160. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  161. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  162. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  163. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  164. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +120 -36
  165. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  166. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  167. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -75
  168. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +63 -10
  169. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  170. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  171. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -346
  172. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +307 -73
  173. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  174. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  175. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -307
  176. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +269 -65
  177. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  178. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  179. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -307
  180. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +298 -76
  181. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  182. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  183. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +18 -35
  184. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  185. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  186. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  187. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  188. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  189. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  190. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  191. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  192. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  193. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -85
  194. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +210 -149
  195. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  196. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  197. package/dist/components/3_compounds/ChatList/ChatList.vue.js +163 -253
  198. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +32 -50
  199. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  200. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -172
  201. package/dist/components/3_compounds/Feed/Feed.vue2.js +257 -126
  202. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  203. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  204. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  205. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  206. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  207. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  208. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  209. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -31
  210. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +56 -85
  211. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- import { defineComponent as je, ref as l, computed as o, inject as Fe, watch as D, nextTick as Be } from "vue";
2
- import Ge from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
- import Ye from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
- import He from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
- import qe from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
- import Ve from "../MessageReactions/MessageReactions.vue.js";
7
- import ze from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
- import We from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
- import Je from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
- import Ke from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
- import { useMessageActions as Qe } from "../../../hooks/messages/useMessageActions.js";
12
- import { useMessageMenuActions as Xe } from "../../../hooks/messages/useMessageMenuActions.js";
13
- import { useMessageLinks as Ze } from "../../../hooks/messages/useMessageLinks.js";
14
- import { useChannelAccentColor as et } from "../../../hooks/messages/useChannelAccentColor.js";
15
- import { useSubtextTooltip as tt } from "../../../hooks/messages/useSubtextTooltip.js";
16
- import { useStartReply as at } from "../../../hooks/messages/useStartReply.js";
1
+ import { defineComponent as Xe, ref as y, computed as m, inject as et, watch as G, createElementBlock as r, openBlock as u, unref as i, normalizeStyle as Y, normalizeClass as w, createCommentVNode as d, createElementVNode as o, createVNode as b, withCtx as Z, createTextVNode as tt, toDisplayString as p, Fragment as q, createBlock as T, withDirectives as z, vShow as ce, vModelText as st, Transition as ve, Teleport as at, nextTick as nt } from "vue";
2
+ import ot from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
+ import it from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
+ import ut from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
+ import lt from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
+ import rt from "../MessageReactions/MessageReactions.vue.js";
7
+ import ge from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
+ import mt from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
+ import dt from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
+ import ct from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
+ import { useMessageActions as vt } from "../../../hooks/messages/useMessageActions.js";
12
+ import { useMessageMenuActions as gt } from "../../../hooks/messages/useMessageMenuActions.js";
13
+ import { useMessageLinks as ft } from "../../../hooks/messages/useMessageLinks.js";
14
+ import { useChannelAccentColor as yt } from "../../../hooks/messages/useChannelAccentColor.js";
15
+ import { useSubtextTooltip as pt } from "../../../hooks/messages/useSubtextTooltip.js";
16
+ import { useStartReply as ht } from "../../../hooks/messages/useStartReply.js";
17
17
  import "../../../hooks/useMessageDraft.js";
18
18
  import "../../../hooks/useSearchModel.js";
19
19
  import "../../../hooks/useTheme.js";
@@ -22,12 +22,36 @@ import "../../../hooks/useEmojiNative.js";
22
22
  /* empty css */
23
23
  import "../../../locale/useLocale.js";
24
24
  /* empty css */
25
- import { buildReplyPayload as W } from "../../../hooks/messages/buildReplyPayload.js";
26
- import { getStatus as nt, getStatusTitle as st } from "../../../functions/getStatusMessage.js";
27
- import { getMessageClass as ot } from "../../../functions/getMessageClass.js";
28
- import { createReactionHandlers as rt } from "../../../functions/createReactionHandlers.js";
25
+ import { buildReplyPayload as fe } from "../../../hooks/messages/buildReplyPayload.js";
26
+ import { getStatus as bt, getStatusTitle as Ct } from "../../../functions/getStatusMessage.js";
27
+ import { getMessageClass as wt } from "../../../functions/getMessageClass.js";
28
+ import { createReactionHandlers as xt } from "../../../functions/createReactionHandlers.js";
29
29
  import "../../../functions/parseMarkdown.js";
30
- const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
30
+ const Mt = ["messageId"], kt = ["src"], Rt = {
31
+ key: 1,
32
+ class: "audio-message__subtext"
33
+ }, Tt = { class: "audio-message__footer" }, St = { class: "audio-message__info-container" }, Nt = {
34
+ key: 0,
35
+ class: "audio-message__time"
36
+ }, _t = { class: "audio-message__audio-container" }, It = ["src"], Et = { class: "audio-message__progress-wrapper" }, At = ["max"], Ot = { class: "audio-message__speed-btn-container" }, Ft = { class: "audio-message__player-controls" }, Lt = { class: "audio-message__current-time" }, Dt = { class: "audio-message__duration" }, Pt = {
37
+ key: 1,
38
+ class: "audio-message__text-container"
39
+ }, Ut = ["innerHTML"], Vt = { class: "audio-message__footer" }, $t = { class: "audio-message__info-container" }, Bt = {
40
+ key: 0,
41
+ class: "audio-message__actions"
42
+ }, Ht = { class: "audio-message__time" }, jt = {
43
+ key: 0,
44
+ class: "audio-message__expand-panel"
45
+ }, Gt = { class: "audio-message__expand-inner" }, Yt = {
46
+ key: 0,
47
+ class: "audio-message__expand-placeholder"
48
+ }, Zt = ["innerHTML"], qt = {
49
+ key: 1,
50
+ class: "audio-message__expand-plain"
51
+ }, zt = {
52
+ key: 0,
53
+ class: "audio-message__expand-placeholder"
54
+ }, Wt = ["innerHTML"], Jt = { class: "audio-message__expand-close-wrap" }, Kt = "RECOGNITION_READY", Qt = "SUMMARY_READY", _s = /* @__PURE__ */ Xe({
31
55
  __name: "AudioMessage",
32
56
  props: {
33
57
  message: {
@@ -49,7 +73,7 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
49
73
  reactionsMode: {
50
74
  type: String,
51
75
  default: "single",
52
- validator: (N) => ["single", "multi"].includes(N)
76
+ validator: (s) => ["single", "multi"].includes(s)
53
77
  },
54
78
  currentUserId: {
55
79
  type: [String, Number],
@@ -71,9 +95,8 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
71
95
  }
72
96
  },
73
97
  emits: ["action", "reply", "sms-invite"],
74
- setup(N, { expose: Q, emit: X }) {
75
- Q();
76
- const n = N, R = l([
98
+ setup(s, { emit: ye }) {
99
+ const l = s, L = y([
77
100
  {
78
101
  text: "1.0x",
79
102
  speed: 1
@@ -90,92 +113,92 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
90
113
  text: "2.0x",
91
114
  speed: 2
92
115
  }
93
- ]), S = l(0), I = o(() => R.value[S.value] ?? R.value[0]), Z = () => {
94
- S.value = (S.value + 1) % R.value.length, t.value && (t.value.playbackRate = I.value.speed);
95
- }, d = X, { menuActions: ee } = Xe(() => n.message), P = Fe("chatAppId"), { startReply: U } = at(P || ""), t = l(null), p = l(void 0), u = l(!1), c = l(0), i = l(0), v = l(!1), x = o(() => {
96
- var a, s;
97
- const e = n.message;
98
- return e.url || (typeof ((a = e.meta) == null ? void 0 : a.url) == "string" ? e.meta.url : void 0) || ((s = e.data) == null ? void 0 : s.url);
99
- }), M = (e) => {
116
+ ]), D = y(0), P = m(() => L.value[D.value] ?? L.value[0]), pe = () => {
117
+ D.value = (D.value + 1) % L.value.length, a.value && (a.value.playbackRate = P.value.speed);
118
+ }, k = ye, { menuActions: S } = gt(() => l.message), he = et("chatAppId"), { startReply: be } = ht(he || ""), a = y(null), x = y(void 0), c = y(!1), h = y(0), g = y(0), C = y(!1), U = m(() => {
119
+ var t, n;
120
+ const e = l.message;
121
+ return e.url || (typeof ((t = e.meta) == null ? void 0 : t.url) == "string" ? e.meta.url : void 0) || ((n = e.data) == null ? void 0 : n.url);
122
+ }), V = (e) => {
100
123
  if (e == null) return;
101
124
  if (typeof e == "number")
102
125
  return !Number.isFinite(e) || e < 0 ? void 0 : Math.floor(e);
103
- const a = String(e).trim();
104
- if (!a) return;
105
- if (/^\d+$/.test(a)) {
106
- const r = Number(a);
107
- return Number.isFinite(r) && r >= 0 ? Math.floor(r) : void 0;
126
+ const t = String(e).trim();
127
+ if (!t) return;
128
+ if (/^\d+$/.test(t)) {
129
+ const v = Number(t);
130
+ return Number.isFinite(v) && v >= 0 ? Math.floor(v) : void 0;
108
131
  }
109
- const s = a.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
110
- if (s) {
111
- const r = Number(s[1]), C = Number(s[2]), k = Number(s[3]);
112
- return r * 3600 + C * 60 + k;
132
+ const n = t.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
133
+ if (n) {
134
+ const v = Number(n[1]), H = Number(n[2]), j = Number(n[3]);
135
+ return v * 3600 + H * 60 + j;
113
136
  }
114
- const f = a.match(/^(\d+):([0-5]\d)$/);
115
- if (f) return Number(f[1]) * 60 + Number(f[2]);
116
- }, A = () => {
117
- u.value = !1, i.value = 0, c.value = M(n.message.duration) ?? 0, v.value = !1;
137
+ const M = t.match(/^(\d+):([0-5]\d)$/);
138
+ if (M) return Number(M[1]) * 60 + Number(M[2]);
139
+ }, W = () => {
140
+ c.value = !1, g.value = 0, h.value = V(l.message.duration) ?? 0, C.value = !1;
118
141
  };
119
- A(), D(
120
- () => x.value,
121
- (e, a) => {
122
- e !== a && (A(), p.value = void 0, t.value && (t.value.pause(), t.value.currentTime = 0, t.value.removeAttribute("src"), t.value.load()));
142
+ W(), G(
143
+ () => U.value,
144
+ (e, t) => {
145
+ e !== t && (W(), x.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()));
123
146
  }
124
- ), D(
125
- () => n.message.duration,
147
+ ), G(
148
+ () => l.message.duration,
126
149
  () => {
127
- p.value === void 0 && (c.value = M(n.message.duration) ?? 0);
150
+ x.value === void 0 && (h.value = V(l.message.duration) ?? 0);
128
151
  }
129
152
  );
130
153
  const {
131
- isOpenMenu: te,
132
- buttonMenuVisible: ae,
133
- menuAnchorRef: ne,
134
- menuRef: se,
135
- menuStyle: oe,
136
- menuTheme: re,
137
- showMenu: ue,
138
- hideMenu: L,
139
- openMenu: ie,
140
- toggleMenu: le,
141
- onMenuMouseEnter: ce,
142
- onMenuMouseLeave: me,
143
- clickAction: $,
144
- viewsAction: de,
145
- handleClickReplied: pe
146
- } = Qe(n.message, d, {
147
- onReply: () => U(W(n.message, "message.audio"))
148
- }), m = l(null), g = l({ text: !1, summary: !1 }), y = o(() => {
149
- var s;
150
- const e = n.message, a = e.transcript ?? ((s = e.meta) == null ? void 0 : s.transcript);
151
- return !a || typeof a != "object" ? null : a;
152
- }), h = o(() => {
153
- var s;
154
- const e = n.message, a = e.summary ?? ((s = e.meta) == null ? void 0 : s.summary);
155
- return !a || typeof a != "object" ? null : a;
156
- }), j = o(() => {
157
- var a;
158
- const e = (a = y.value) == null ? void 0 : a.html;
154
+ isOpenMenu: Ce,
155
+ buttonMenuVisible: we,
156
+ menuAnchorRef: xe,
157
+ menuRef: Me,
158
+ menuStyle: ke,
159
+ menuTheme: Re,
160
+ showMenu: J,
161
+ hideMenu: $,
162
+ openMenu: Te,
163
+ toggleMenu: K,
164
+ onMenuMouseEnter: Se,
165
+ onMenuMouseLeave: Ne,
166
+ clickAction: _e,
167
+ viewsAction: Q,
168
+ handleClickReplied: Ie
169
+ } = vt(l.message, k, {
170
+ onReply: () => be(fe(l.message, "message.audio"))
171
+ }), f = y(null), N = y({ text: !1, summary: !1 }), _ = m(() => {
172
+ var n;
173
+ const e = l.message, t = e.transcript ?? ((n = e.meta) == null ? void 0 : n.transcript);
174
+ return !t || typeof t != "object" ? null : t;
175
+ }), I = m(() => {
176
+ var n;
177
+ const e = l.message, t = e.summary ?? ((n = e.meta) == null ? void 0 : n.summary);
178
+ return !t || typeof t != "object" ? null : t;
179
+ }), X = m(() => {
180
+ var t;
181
+ const e = (t = _.value) == null ? void 0 : t.html;
159
182
  return typeof e != "string" ? "" : e.trim();
160
- }), F = o(() => {
183
+ }), ee = m(() => {
161
184
  var e;
162
- return ((e = y.value) == null ? void 0 : e.status) === J && j.value.length > 0;
163
- }), B = o(() => {
164
- var a;
165
- const e = (a = h.value) == null ? void 0 : a.html;
185
+ return ((e = _.value) == null ? void 0 : e.status) === Kt && X.value.length > 0;
186
+ }), te = m(() => {
187
+ var t;
188
+ const e = (t = I.value) == null ? void 0 : t.html;
166
189
  return typeof e != "string" ? "" : e.trim();
167
- }), G = o(() => {
190
+ }), se = m(() => {
168
191
  var e;
169
- return ((e = h.value) == null ? void 0 : e.status) === K && B.value.length > 0;
170
- }), E = o(() => {
192
+ return ((e = I.value) == null ? void 0 : e.status) === Qt && te.value.length > 0;
193
+ }), E = m(() => {
171
194
  var e;
172
- return !!((e = y.value) != null && e.status);
173
- }), O = o(() => {
195
+ return !!((e = _.value) != null && e.status);
196
+ }), A = m(() => {
174
197
  var e;
175
- return !!((e = h.value) != null && e.status);
176
- }), ve = o(() => m.value === "text" ? E.value : m.value === "summary" ? O.value : !1), fe = o(() => {
198
+ return !!((e = I.value) != null && e.status);
199
+ }), Ee = m(() => f.value === "text" ? E.value : f.value === "summary" ? A.value : !1), Ae = m(() => {
177
200
  var e;
178
- switch ((e = y.value) == null ? void 0 : e.status) {
201
+ switch ((e = _.value) == null ? void 0 : e.status) {
179
202
  case "RECOGNITION_PLANNED":
180
203
  return "Распознаем сообщение, пожалуйста подождите...";
181
204
  case "RECOGNITION_ERROR":
@@ -185,9 +208,9 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
185
208
  default:
186
209
  return "Текст сообщения недоступен";
187
210
  }
188
- }), ge = o(() => {
211
+ }), Oe = m(() => {
189
212
  var e;
190
- switch ((e = h.value) == null ? void 0 : e.status) {
213
+ switch ((e = I.value) == null ? void 0 : e.status) {
191
214
  case "SUMMARY_PLANNED":
192
215
  return "Формируем резюме, пожалуйста подождите...";
193
216
  case "SUMMARY_ERROR":
@@ -197,19 +220,19 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
197
220
  default:
198
221
  return "Резюме недоступно";
199
222
  }
200
- }), Y = async () => {
201
- var a, s, f;
202
- const e = x.value;
223
+ }), Fe = async () => {
224
+ var t, n, M;
225
+ const e = U.value;
203
226
  if (e)
204
227
  try {
205
- const r = await fetch(e, {
228
+ const v = await fetch(e, {
206
229
  headers: {
207
230
  Accept: "audio/*"
208
231
  }
209
232
  });
210
- if (!r.ok)
211
- throw new Error(`HTTP error! status: ${r.status}`);
212
- const C = r.headers.get("content-type") || "", k = await r.blob(), T = ((s = (a = e.split(".").pop()) == null ? void 0 : a.split("?")[0]) == null ? void 0 : s.toLowerCase()) || "", Le = {
233
+ if (!v.ok)
234
+ throw new Error(`HTTP error! status: ${v.status}`);
235
+ const H = v.headers.get("content-type") || "", j = await v.blob(), O = ((n = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : n.toLowerCase()) || "", Ke = {
213
236
  "audio/mpeg": "mp3",
214
237
  "audio/mp3": "mp3",
215
238
  "audio/wav": "wav",
@@ -220,80 +243,368 @@ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
220
243
  "audio/flac": "flac",
221
244
  "audio/m4a": "m4a",
222
245
  "audio/x-m4a": "m4a",
223
- "application/octet-stream": T || "mp3"
224
- }, q = T && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(T) ? T : Le[C] || "mp3", V = e.split("/"), w = decodeURIComponent(((f = V[V.length - 1]) == null ? void 0 : f.split("?")[0]) || ""), $e = w ? w.includes(".") ? w : `${w}.${q}` : `audio-${n.message.messageId}.${q}`, z = window.URL.createObjectURL(k), b = document.createElement("a");
225
- b.href = z, b.download = $e, document.body.appendChild(b), b.click(), document.body.removeChild(b), window.URL.revokeObjectURL(z);
226
- } catch (r) {
227
- console.error("Ошибка при скачивании аудио:", r), e && window.open(e, "_blank");
246
+ "application/octet-stream": O || "mp3"
247
+ }, re = O && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(O) ? O : Ke[H] || "mp3", me = e.split("/"), F = decodeURIComponent(((M = me[me.length - 1]) == null ? void 0 : M.split("?")[0]) || ""), Qe = F ? F.includes(".") ? F : `${F}.${re}` : `audio-${l.message.messageId}.${re}`, de = window.URL.createObjectURL(j), R = document.createElement("a");
248
+ R.href = de, R.download = Qe, document.body.appendChild(R), R.click(), document.body.removeChild(R), window.URL.revokeObjectURL(de);
249
+ } catch (v) {
250
+ console.error("Ошибка при скачивании аудио:", v), e && window.open(e, "_blank");
228
251
  }
229
- }, ye = (e) => {
230
- e.action === "download" ? (Y(), L()) : $(e);
231
- }, { linkedHtml: he, inNewWindow: be } = Ze(() => n.message.text), Re = o(() => nt(n.message.status)), Se = o(() => st(n.message.status, n.message.statusMsg)), { bubbleStyle: xe } = et(
232
- o(() => n.message),
252
+ }, Le = (e) => {
253
+ e.action === "download" ? (Fe(), $()) : _e(e);
254
+ }, { linkedHtml: De, inNewWindow: ae } = ft(() => l.message.text), ne = m(() => bt(l.message.status)), oe = m(() => Ct(l.message.status, l.message.statusMsg)), { bubbleStyle: Pe } = yt(
255
+ m(() => l.message),
233
256
  { cssVariable: "--chotto-audiomessage-right-background-color", position: "right" }
234
- ), Me = async () => {
235
- const e = x.value;
236
- if (!(!t.value || !e))
237
- if (u.value)
238
- t.value.pause(), u.value = !1;
257
+ ), ie = async () => {
258
+ const e = U.value;
259
+ if (!(!a.value || !e))
260
+ if (c.value)
261
+ a.value.pause(), c.value = !1;
239
262
  else
240
263
  try {
241
- p.value || (p.value = e, await Be(), t.value.load()), await t.value.play(), u.value = !0;
242
- } catch (a) {
243
- console.error("Не удалось воспроизвести аудио", a), u.value = !1;
264
+ x.value || (x.value = e, await nt(), a.value.load()), await a.value.play(), c.value = !0;
265
+ } catch (t) {
266
+ console.error("Не удалось воспроизвести аудио", t), c.value = !1;
244
267
  }
245
- }, _ = (e) => {
246
- const a = Math.floor(e / 60), s = Math.floor(e % 60);
247
- return `${a.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
248
- }, Te = o(() => _(i.value));
249
- D(
250
- () => i.value,
268
+ }, ue = (e) => {
269
+ const t = Math.floor(e / 60), n = Math.floor(e % 60);
270
+ return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
271
+ }, Ue = m(() => ue(g.value));
272
+ G(
273
+ () => g.value,
251
274
  () => {
252
- t.value && v.value && (t.value.duration != 1 / 0 && !Number.isNaN(t.value.duration) && (t.value.currentTime = i.value), Math.abs(i.value - c.value) < 0.1 && (u.value = !1));
275
+ a.value && C.value && (a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = g.value), Math.abs(g.value - h.value) < 0.1 && (c.value = !1));
253
276
  }
254
277
  );
255
- const we = () => {
256
- t.value && v.value && t.value.duration != 1 / 0 && !Number.isNaN(t.value.duration) && (t.value.currentTime = i.value), v.value = !1;
257
- }, Ne = o(() => _(c.value)), Ie = () => {
258
- if (!t.value) return;
259
- const e = t.value;
260
- if (i.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
278
+ const le = () => {
279
+ a.value && C.value && a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = g.value), C.value = !1;
280
+ }, Ve = m(() => ue(h.value)), $e = () => {
281
+ if (!a.value) return;
282
+ const e = a.value;
283
+ if (g.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
261
284
  e.currentTime = 1e101;
262
- const a = () => {
263
- t.value && (c.value = t.value.duration || 0, i.value = 0, t.value.currentTime = 0);
285
+ const t = () => {
286
+ a.value && (h.value = a.value.duration || 0, g.value = 0, a.value.currentTime = 0);
264
287
  };
265
- e.addEventListener("timeupdate", a, { once: !0 });
288
+ e.addEventListener("timeupdate", t, { once: !0 });
266
289
  } else
267
- c.value = e.duration || 0;
268
- e.playbackRate = I.value.speed;
269
- }, Ae = () => {
270
- t.value && (v.value || (i.value = t.value.currentTime), t.value.ended && u.value && (u.value = !1));
271
- }, Ee = () => {
272
- u.value = !1;
273
- }, Oe = () => {
274
- console.error("Не удалось загрузить аудио"), u.value = !1, p.value = void 0, t.value && (t.value.pause(), t.value.currentTime = 0, t.value.removeAttribute("src"), t.value.load()), c.value = M(n.message.duration) ?? 0;
290
+ h.value = e.duration || 0;
291
+ e.playbackRate = P.value.speed;
292
+ }, Be = () => {
293
+ a.value && (C.value || (g.value = a.value.currentTime), a.value.ended && c.value && (c.value = !1));
294
+ }, He = () => {
295
+ c.value = !1;
296
+ }, je = () => {
297
+ console.error("Не удалось загрузить аудио"), c.value = !1, x.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()), h.value = V(l.message.duration) ?? 0;
275
298
  };
276
- function _e(e) {
277
- return ot(e.position, "audio-message");
299
+ function B(e) {
300
+ return wt(e.position, "audio-message");
278
301
  }
279
- const { onToggleReaction: Ce, onAddReaction: ke, onRemoveReaction: De } = rt(d), Pe = tt(() => n.message, () => n.subtextTooltipData);
280
- function Ue() {
281
- d("sms-invite", n.message);
302
+ const { onToggleReaction: Ge, onAddReaction: Ye, onRemoveReaction: Ze } = xt(k), qe = pt(() => l.message, () => l.subtextTooltipData);
303
+ function ze() {
304
+ k("sms-invite", l.message);
282
305
  }
283
- const H = { props: n, speed: R, speedIndex: S, currentSpeed: I, cycleSpeed: Z, emit: d, menuActions: ee, chatAppId: P, startReply: U, player: t, lazyAudioSrc: p, isPlaying: u, audioDuration: c, currentTime: i, isSeeking: v, audioSrc: x, parseMessageDurationToSeconds: M, resetAudioState: A, isOpenMenu: te, buttonMenuVisible: ae, menuAnchorRef: ne, menuRef: se, menuStyle: oe, menuTheme: re, showMenu: ue, hideMenu: L, openMenu: ie, toggleMenu: le, onMenuMouseEnter: ce, onMenuMouseLeave: me, clickAction: $, viewsAction: de, handleClickReplied: pe, expandedPanel: m, requestedOnDemand: g, recognitionReadyStatus: J, summaryReadyStatus: K, transcriptData: y, summaryData: h, transcriptHtml: j, isTranscriptReady: F, summaryHtml: B, isSummaryReady: G, hasTextOption: E, hasSummaryOption: O, isExpandedPanelVisible: ve, transcriptPlaceholderText: fe, summaryPlaceholderText: ge, downloadAudio: Y, handleActionClick: ye, linkedHtml: he, inNewWindow: be, status: Re, statusTitle: Se, rightBubbleStyle: xe, togglePlayPause: Me, formatTime: _, formatCurrentTime: Te, handleSeekEnd: we, formatDuration: Ne, handleLoadedMetadata: Ie, handleTimeUpdate: Ae, handleEnded: Ee, handleAudioError: Oe, getClass: _e, onToggleReaction: Ce, onAddReaction: ke, onRemoveReaction: De, channelInfo: Pe, handleSmsInvite: Ue, handleText: () => {
306
+ const We = () => {
284
307
  if (!E.value) return;
285
- const e = m.value === "text" ? null : "text";
286
- m.value = e, e === "text" && !F.value && !g.value.text && (g.value.text = !0, d("action", { action: "fetchTranscript", messageId: n.message.messageId }));
287
- }, handleSummary: () => {
288
- if (!O.value) return;
289
- const e = m.value === "summary" ? null : "summary";
290
- m.value = e, e === "summary" && !G.value && !g.value.summary && (g.value.summary = !0, d("action", { action: "fetchSummary", messageId: n.message.messageId }));
291
- }, ContextMenu: Ge, LinkPreview: Ye, EmbedPreview: He, BaseReplyMessage: qe, MessageReactions: Ve, MessageStatusIndicator: ze, MessageSmsInvite: We, DeletedMessageContent: Je, Tooltip: Ke, get buildReplyPayload() {
292
- return W;
293
- } };
294
- return Object.defineProperty(H, "__isScriptSetup", { enumerable: !1, value: !0 }), H;
308
+ const e = f.value === "text" ? null : "text";
309
+ f.value = e, e === "text" && !ee.value && !N.value.text && (N.value.text = !0, k("action", { action: "fetchTranscript", messageId: l.message.messageId }));
310
+ }, Je = () => {
311
+ if (!A.value) return;
312
+ const e = f.value === "summary" ? null : "summary";
313
+ f.value = e, e === "summary" && !se.value && !N.value.summary && (N.value.summary = !0, k("action", { action: "fetchSummary", messageId: l.message.messageId }));
314
+ };
315
+ return (e, t) => (u(), r("div", {
316
+ ref_key: "menuAnchorRef",
317
+ ref: xe,
318
+ class: w(["audio-message", [
319
+ B(s.message),
320
+ s.applyStyle(s.message)
321
+ ]]),
322
+ messageId: s.message.messageId,
323
+ style: Y(i(Pe)),
324
+ onMouseleave: t[8] || (t[8] = //@ts-ignore
325
+ (...n) => i($) && i($)(...n))
326
+ }, [
327
+ s.message.avatar && s.isFirstInSeries ? (u(), r("img", {
328
+ key: 0,
329
+ class: "audio-message__avatar",
330
+ src: s.message.avatar,
331
+ height: "32",
332
+ width: "32",
333
+ style: Y({ gridRow: s.message.subText ? "2" : "1" })
334
+ }, null, 12, kt)) : d("", !0),
335
+ s.message.subText && s.isFirstInSeries ? (u(), r("p", Rt, [
336
+ b(ct, {
337
+ text: i(qe),
338
+ position: s.message.position === "left" ? "right" : "left",
339
+ offset: 8
340
+ }, {
341
+ default: Z(() => [
342
+ tt(p(s.message.subText), 1)
343
+ ]),
344
+ _: 1
345
+ }, 8, ["text", "position"])
346
+ ])) : d("", !0),
347
+ o("div", {
348
+ class: w(["audio-message__content", { "is-first": s.isFirstInSeries, "with-avatar-indent": !s.isFirstInSeries && s.message.avatar }]),
349
+ onMouseenter: t[7] || (t[7] = //@ts-ignore
350
+ (...n) => i(J) && i(J)(...n))
351
+ }, [
352
+ t[13] || (t[13] = o("div", {
353
+ class: "audio-message__bottom-shadow",
354
+ "aria-hidden": "true"
355
+ }, null, -1)),
356
+ s.message.deleted ? (u(), r(q, { key: 0 }, [
357
+ b(dt),
358
+ o("div", Tt, [
359
+ o("div", St, [
360
+ s.message.time ? (u(), r("span", Nt, p(s.message.time), 1)) : d("", !0),
361
+ b(ge, {
362
+ "base-class": "audio-message",
363
+ "message-class": B(s.message),
364
+ "message-status": s.message.status,
365
+ "status-class": ne.value,
366
+ "status-title": oe.value
367
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
368
+ ])
369
+ ])
370
+ ], 64)) : (u(), r(q, { key: 1 }, [
371
+ s.message.reply ? (u(), T(lt, {
372
+ key: 0,
373
+ style: { "grid-column": "1/3" },
374
+ message: s.message.reply,
375
+ class: w(s.message.position),
376
+ onReply: i(Ie)
377
+ }, null, 8, ["message", "class", "onReply"])) : d("", !0),
378
+ o("div", _t, [
379
+ o("audio", {
380
+ ref_key: "player",
381
+ ref: a,
382
+ src: x.value,
383
+ type: "audio/webm",
384
+ onLoadedmetadata: $e,
385
+ onTimeupdate: Be,
386
+ onEnded: He,
387
+ onError: je
388
+ }, null, 40, It),
389
+ z(o("button", {
390
+ class: "audio-message__play",
391
+ onClick: ie
392
+ }, [...t[9] || (t[9] = [
393
+ o("div", { class: "audio-message__play-icon" }, [
394
+ o("svg", {
395
+ width: "20",
396
+ height: "23",
397
+ viewBox: "0 0 20 23",
398
+ fill: "none",
399
+ xmlns: "http://www.w3.org/2000/svg"
400
+ }, [
401
+ o("path", {
402
+ d: "M18.99 12.9934L3.0825 22.2234C1.7325 23.0059 0 22.0584 0 20.4809V2.02087C0 0.44587 1.73 -0.50413 3.0825 0.28087L18.99 9.51087C19.2971 9.68618 19.5524 9.93959 19.7299 10.2454C19.9075 10.5512 20.001 10.8985 20.001 11.2521C20.001 11.6057 19.9075 11.953 19.7299 12.2589C19.5524 12.5647 19.2971 12.8181 18.99 12.9934Z",
403
+ fill: "#5F5F5F"
404
+ })
405
+ ])
406
+ ], -1)
407
+ ])], 512), [
408
+ [ce, !c.value]
409
+ ]),
410
+ z(o("button", {
411
+ class: "audio-message__pause",
412
+ onClick: ie
413
+ }, [...t[10] || (t[10] = [
414
+ o("div", { class: "audio-message__pause-icon" }, [
415
+ o("svg", {
416
+ width: "20",
417
+ height: "23",
418
+ viewBox: "0 0 20 23",
419
+ fill: "none",
420
+ xmlns: "http://www.w3.org/2000/svg"
421
+ }, [
422
+ o("path", {
423
+ d: "M3.75 0C4.74456 0 5.69839 0.395088 6.40165 1.09835C7.10491 1.80161 7.5 2.75544 7.5 3.75V18.75C7.5 19.7446 7.10491 20.6984 6.40165 21.4017C5.69839 22.1049 4.74456 22.5 3.75 22.5C2.75544 22.5 1.80161 22.1049 1.09835 21.4017C0.395088 20.6984 2.09588e-08 19.7446 0 18.75V3.75C0 2.75544 0.395088 1.80161 1.09835 1.09835C1.80161 0.395088 2.75544 0 3.75 0ZM16.25 0C17.2446 0 18.1984 0.395088 18.9017 1.09835C19.6049 1.80161 20 2.75544 20 3.75V18.75C20 19.7446 19.6049 20.6984 18.9017 21.4017C18.1984 22.1049 17.2446 22.5 16.25 22.5C15.2554 22.5 14.3016 22.1049 13.5983 21.4017C12.8951 20.6984 12.5 19.7446 12.5 18.75V3.75C12.5 2.75544 12.8951 1.80161 13.5983 1.09835C14.3016 0.395088 15.2554 0 16.25 0Z",
424
+ fill: "#5F5F5F"
425
+ })
426
+ ])
427
+ ], -1)
428
+ ])], 512), [
429
+ [ce, c.value]
430
+ ]),
431
+ o("div", Et, [
432
+ z(o("input", {
433
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => g.value = n),
434
+ class: "audio-message__progress-bar-container",
435
+ type: "range",
436
+ min: 0,
437
+ max: h.value,
438
+ step: "0.1",
439
+ onMousedown: t[1] || (t[1] = (n) => C.value = !0),
440
+ onMouseup: le,
441
+ onTouchstartPassive: t[2] || (t[2] = (n) => C.value = !0),
442
+ onTouchendPassive: le
443
+ }, null, 40, At), [
444
+ [st, g.value]
445
+ ]),
446
+ o("div", Ot, [
447
+ o("button", {
448
+ type: "button",
449
+ class: "audio-message__speed-btn",
450
+ onClick: pe
451
+ }, p(P.value.text), 1)
452
+ ])
453
+ ]),
454
+ o("div", Ft, [
455
+ o("p", Lt, p(Ue.value), 1),
456
+ o("p", Dt, p(Ve.value), 1)
457
+ ])
458
+ ]),
459
+ s.message.text ? (u(), r("div", Pt, [
460
+ o("p", {
461
+ onClick: t[3] || (t[3] = //@ts-ignore
462
+ (...n) => i(ae) && i(ae)(...n)),
463
+ innerHTML: i(De)
464
+ }, null, 8, Ut)
465
+ ])) : d("", !0),
466
+ s.message.linkPreview ? (u(), T(it, {
467
+ key: 2,
468
+ class: w(["audio-message__link-preview", s.message.position]),
469
+ "link-preview": s.message.linkPreview
470
+ }, null, 8, ["class", "link-preview"])) : d("", !0),
471
+ s.message.embed ? (u(), T(ut, {
472
+ key: 3,
473
+ class: w(s.message.position),
474
+ embed: s.message.embed
475
+ }, null, 8, ["class", "embed"])) : d("", !0),
476
+ o("div", Vt, [
477
+ b(rt, {
478
+ reactions: s.message.reactions,
479
+ "message-id": s.message.messageId,
480
+ reply: i(fe)(s.message, "message.audio"),
481
+ enabled: s.reactionsEnabled,
482
+ mode: s.reactionsMode,
483
+ "current-user-id": s.currentUserId,
484
+ "reaction-user-names": s.reactionUserNames,
485
+ "menu-enabled": i(S).length > 0,
486
+ onToggleReaction: i(Ge),
487
+ onAddReaction: i(Ye),
488
+ onRemoveReaction: i(Ze),
489
+ onMenu: i(Te)
490
+ }, null, 8, ["reactions", "message-id", "reply", "enabled", "mode", "current-user-id", "reaction-user-names", "menu-enabled", "onToggleReaction", "onAddReaction", "onRemoveReaction", "onMenu"]),
491
+ o("div", $t, [
492
+ E.value || A.value ? (u(), r("div", Bt, [
493
+ E.value ? (u(), r("button", {
494
+ key: 0,
495
+ class: w([
496
+ "audio-message__action-button",
497
+ { "audio-message__action-button--active": f.value === "text" }
498
+ ]),
499
+ type: "button",
500
+ onClick: We
501
+ }, " Текст ", 2)) : d("", !0),
502
+ A.value ? (u(), r("button", {
503
+ key: 1,
504
+ class: w([
505
+ "audio-message__action-button",
506
+ { "audio-message__action-button--active": f.value === "summary" }
507
+ ]),
508
+ type: "button",
509
+ onClick: Je
510
+ }, " Резюме ", 2)) : d("", !0)
511
+ ])) : d("", !0),
512
+ s.message.views ? (u(), r("div", {
513
+ key: 1,
514
+ class: "audio-message__views",
515
+ onClick: t[4] || (t[4] = //@ts-ignore
516
+ (...n) => i(Q) && i(Q)(...n))
517
+ }, [
518
+ t[11] || (t[11] = o("span", { class: "pi pi-eye" }, null, -1)),
519
+ o("p", null, p(s.message.views), 1)
520
+ ])) : d("", !0),
521
+ o("span", Ht, p(s.message.time), 1),
522
+ b(ge, {
523
+ "base-class": "audio-message",
524
+ "message-class": B(s.message),
525
+ "message-status": s.message.status,
526
+ "status-class": ne.value,
527
+ "status-title": oe.value
528
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
529
+ ])
530
+ ]),
531
+ b(ve, { name: "audio-message-expand" }, {
532
+ default: Z(() => [
533
+ Ee.value ? (u(), r("div", jt, [
534
+ o("div", Gt, [
535
+ f.value === "text" ? (u(), r(q, { key: 0 }, [
536
+ ee.value ? (u(), r("p", {
537
+ key: 1,
538
+ class: "audio-message__expand-plain",
539
+ innerHTML: X.value
540
+ }, null, 8, Zt)) : (u(), r("p", Yt, p(Ae.value), 1))
541
+ ], 64)) : (u(), r("p", qt, [
542
+ se.value ? (u(), r("span", {
543
+ key: 1,
544
+ innerHTML: te.value
545
+ }, null, 8, Wt)) : (u(), r("span", zt, p(Oe.value), 1))
546
+ ]))
547
+ ]),
548
+ o("div", Jt, [
549
+ o("button", {
550
+ type: "button",
551
+ class: "audio-message__expand-close",
552
+ onClick: t[5] || (t[5] = (n) => f.value = null)
553
+ }, " Закрыть ")
554
+ ])
555
+ ])) : d("", !0)
556
+ ]),
557
+ _: 1
558
+ }),
559
+ b(mt, {
560
+ status: s.message.status,
561
+ "has-messenger-account": s.message.hasMessengerAccount,
562
+ channel: s.channel,
563
+ onSmsInvite: ze
564
+ }, null, 8, ["status", "has-messenger-account", "channel"]),
565
+ i(we) && i(S).length && !s.reactionsEnabled ? (u(), r("button", {
566
+ key: 4,
567
+ class: "audio-message__menu-button",
568
+ onClick: t[6] || (t[6] = //@ts-ignore
569
+ (...n) => i(K) && i(K)(...n))
570
+ }, [...t[12] || (t[12] = [
571
+ o("svg", {
572
+ width: "4",
573
+ height: "17",
574
+ viewBox: "0 0 4 17",
575
+ fill: "none",
576
+ xmlns: "http://www.w3.org/2000/svg"
577
+ }, [
578
+ o("path", {
579
+ d: "M3.75 14.375C3.75 14.8723 3.55246 15.3492 3.20083 15.7008C2.84919 16.0525 2.37228 16.25 1.875 16.25C1.37772 16.25 0.900805 16.0525 0.549175 15.7008C0.197544 15.3492 0 14.8723 0 14.375C0 13.8777 0.197544 13.4008 0.549175 13.0492C0.900805 12.6975 1.37772 12.5 1.875 12.5C2.37228 12.5 2.84919 12.6975 3.20083 13.0492C3.55246 13.4008 3.75 13.8777 3.75 14.375ZM3.75 8.125C3.75 8.62228 3.55246 9.09919 3.20083 9.45083C2.84919 9.80246 2.37228 10 1.875 10C1.37772 10 0.900805 9.80246 0.549175 9.45083C0.197544 9.09919 0 8.62228 0 8.125C0 7.62772 0.197544 7.15081 0.549175 6.79917C0.900805 6.44754 1.37772 6.25 1.875 6.25C2.37228 6.25 2.84919 6.44754 3.20083 6.79917C3.55246 7.15081 3.75 7.62772 3.75 8.125ZM3.75 1.875C3.75 2.37228 3.55246 2.84919 3.20083 3.20083C2.84919 3.55246 2.37228 3.75 1.875 3.75C1.37772 3.75 0.900805 3.55246 0.549175 3.20083C0.197544 2.84919 0 2.37228 0 1.875C0 1.37772 0.197544 0.900806 0.549175 0.549175C0.900805 0.197544 1.37772 0 1.875 0C2.37228 0 2.84919 0.197544 3.20083 0.549175C3.55246 0.900806 3.75 1.37772 3.75 1.875Z",
580
+ fill: "#5F5F5F"
581
+ })
582
+ ], -1)
583
+ ])])) : d("", !0),
584
+ (u(), T(at, { to: "body" }, [
585
+ b(ve, null, {
586
+ default: Z(() => [
587
+ i(Ce) && i(S).length ? (u(), T(ot, {
588
+ key: 0,
589
+ ref_key: "menuRef",
590
+ ref: Me,
591
+ class: "audio-message__context-menu message-actions-menu",
592
+ style: Y(i(ke)),
593
+ "data-theme": i(Re),
594
+ actions: i(S),
595
+ onClick: Le,
596
+ onMouseenter: i(Se),
597
+ onMouseleave: i(Ne)
598
+ }, null, 8, ["style", "data-theme", "actions", "onMouseenter", "onMouseleave"])) : d("", !0)
599
+ ]),
600
+ _: 1
601
+ })
602
+ ]))
603
+ ], 64))
604
+ ], 34)
605
+ ], 46, Mt));
295
606
  }
296
607
  });
297
608
  export {
298
- jt as default
609
+ _s as default
299
610
  };