@mobilon-dev/chotto 0.3.119 → 0.3.121

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