@layers-app/shared 0.4.7 → 0.4.9

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 (278) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  5. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  6. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  7. package/dist/components/AppContainer/AppContainer.js +76 -71
  8. package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
  9. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  11. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  13. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  14. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
  17. package/dist/components/AppContainer/types.d.ts +12 -0
  18. package/dist/components/AppContainer/types.d.ts.map +1 -1
  19. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  20. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  21. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +59 -52
  22. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  23. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +1 -0
  24. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +16 -15
  26. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +22 -22
  27. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
  31. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
  32. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  33. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
  34. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  35. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
  36. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  37. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  38. package/dist/components/Chat/ChatInput/index.js +264 -164
  39. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  40. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  41. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  42. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  43. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  44. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  45. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  46. package/dist/components/Chat/ChatMessage/index.js +153 -118
  47. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  48. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  49. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  50. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  51. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  52. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  53. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  54. package/dist/components/Chat/MessageActions/index.js +188 -50
  55. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  56. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  57. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  58. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  59. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  60. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  61. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  62. package/dist/components/Chat/MessageList/index.js +201 -149
  63. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  64. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
  65. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  66. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
  67. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  68. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  69. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  70. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  71. package/dist/components/ColorPicker/ColorPickerList.js +83 -72
  72. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  73. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  74. package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
  75. package/dist/components/ColorPicker/icons.js +5 -5
  76. package/dist/components/ColorPicker/types.d.ts +6 -0
  77. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  78. package/dist/components/ColorPicker/types.js +53 -11
  79. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  80. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  81. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  82. package/dist/components/CommentComposer/CommentComposer.module.css.js +14 -10
  83. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  84. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  85. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  86. package/dist/components/CommentComposer/index.d.ts +2 -1
  87. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  88. package/dist/components/CommentComposer/index.js +333 -313
  89. package/dist/components/CommentComposer/types.d.ts +10 -0
  90. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  91. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  92. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  93. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  94. package/dist/components/CustomKBD/index.js +21 -22
  95. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  96. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  97. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  98. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  99. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  100. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  101. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  102. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  103. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  104. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  105. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  106. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  107. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  108. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  109. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  110. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  111. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  112. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  113. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  114. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  115. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  116. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  117. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  118. package/dist/components/Loaders/styles.module.css.js +6 -6
  119. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  120. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  121. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  122. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  123. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  124. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  125. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  126. package/dist/components/Notification/InfiniteScroll.js +42 -0
  127. package/dist/components/Notification/Notification.d.ts +4 -1
  128. package/dist/components/Notification/Notification.d.ts.map +1 -1
  129. package/dist/components/Notification/Notification.module.css.js +28 -4
  130. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  131. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  132. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  133. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  134. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  135. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  136. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  137. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  138. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  139. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  140. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  141. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  142. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  143. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  144. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  145. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  146. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  147. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  148. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  149. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  150. package/dist/components/Notification/atoms/index.d.ts +5 -0
  151. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  152. package/dist/components/Notification/hooks/index.d.ts +8 -0
  153. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  154. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  155. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  156. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  157. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  158. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  159. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  160. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  161. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  162. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  163. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  164. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  165. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  166. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  167. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  168. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  169. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  170. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  171. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  172. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  173. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  174. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  175. package/dist/components/Notification/lib/api.d.ts +4 -0
  176. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  177. package/dist/components/Notification/lib/api.js +19 -0
  178. package/dist/components/Notification/lib/index.d.ts +5 -0
  179. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  180. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  181. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  182. package/dist/components/Notification/lib/notificationText.js +131 -0
  183. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  184. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  185. package/dist/components/Notification/lib/stripHtml.js +6 -0
  186. package/dist/components/Notification/lib/types.d.ts +45 -0
  187. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  188. package/dist/components/Notification/lib/types.js +9 -0
  189. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  190. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  191. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  192. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  193. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  194. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  195. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  196. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  197. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  198. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  199. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  200. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  201. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  202. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  203. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  204. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  205. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  206. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  207. package/dist/components/Notification/molecules/index.d.ts +7 -0
  208. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  209. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  210. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  211. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  212. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  213. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  214. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  215. package/dist/components/Notification/organisms/index.d.ts +3 -0
  216. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  217. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  218. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  219. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  220. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  221. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  222. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  223. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  224. package/dist/components/table/FrontTable.d.ts.map +1 -1
  225. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  226. package/dist/config/envConfig.d.ts +2 -0
  227. package/dist/config/envConfig.d.ts.map +1 -1
  228. package/dist/config/envConfig.js +29 -28
  229. package/dist/helpers/getFileIcons.js +5 -5
  230. package/dist/helpers/getFileType.d.ts +1 -1
  231. package/dist/helpers/getFileType.d.ts.map +1 -1
  232. package/dist/helpers/getFileType.js +11 -1
  233. package/dist/helpers/platform.d.ts +1 -1
  234. package/dist/helpers/platform.d.ts.map +1 -1
  235. package/dist/helpers/platform.js +1 -0
  236. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  237. package/dist/helpers/showNotifications.module.css.js +1 -1
  238. package/dist/hooks/useDateUtils.d.ts +3 -1
  239. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  240. package/dist/hooks/useDateUtils.js +23 -18
  241. package/dist/index.css +1 -1
  242. package/dist/index.js +595 -588
  243. package/dist/lang/locales/ui_en.json.js +9 -7
  244. package/dist/lang/locales/ui_es.json.js +6 -4
  245. package/dist/lang/locales/ui_ru.json.js +8 -6
  246. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  247. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  248. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  249. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  250. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  251. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  252. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  253. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  254. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  255. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  256. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  257. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  258. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  259. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  260. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  261. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  262. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  263. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  264. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  265. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  266. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  267. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  268. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  269. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  270. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  271. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  272. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  273. package/docs/README.md +499 -499
  274. package/package.json +81 -79
  275. package/dist/components/Notification/Notification.js +0 -119
  276. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  277. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  278. package/dist/components/Notification/NotificationCard.js +0 -93
@@ -0,0 +1,170 @@
1
+ import { useRef as m, useState as a, useEffect as i, useCallback as u } from "react";
2
+ function Ee(r = {}) {
3
+ const n = m(null), o = m(null), [v, l] = a(!1), [N, y] = a(0), [B, P] = a(0), [U, E] = a(0), [W, g] = a(r.volume ?? 1), [j, p] = a(r.muted ?? !1), [z, h] = a(r.playbackRate ?? 1), [A, L] = a(!1), [G, d] = a(!1), [H, J] = a(null), [K, O] = a(!1), [Q, b] = a(!1), [X, R] = a(!1), [Y, Z] = a(!1), [_, $] = a(!1);
4
+ i(() => {
5
+ typeof document > "u" || (Z(!!document.fullscreenEnabled), $(
6
+ document.pictureInPictureEnabled === !0
7
+ ));
8
+ }, []);
9
+ const c = m(r);
10
+ c.current = r, i(() => {
11
+ const e = n.current;
12
+ if (!e) return;
13
+ const t = () => {
14
+ l(!0), L(!1), c.current.onPlayChange?.(!0);
15
+ }, s = () => {
16
+ l(!1), c.current.onPlayChange?.(!1);
17
+ }, k = () => {
18
+ L(!0), l(!1), c.current.onEnded?.();
19
+ }, C = () => {
20
+ y(e.currentTime), c.current.onCurrentTimeChange?.(e.currentTime);
21
+ }, f = () => {
22
+ const D = e.duration || 0;
23
+ P(D), c.current.onDurationChange?.(D);
24
+ }, F = () => {
25
+ g(e.volume), p(e.muted), c.current.onVolumeChange?.(e.volume);
26
+ }, T = () => {
27
+ h(e.playbackRate), c.current.onPlaybackRateChange?.(e.playbackRate);
28
+ }, I = () => d(!0), x = () => d(!1), M = () => {
29
+ R(!0), d(!1);
30
+ }, w = () => {
31
+ e.buffered.length > 0 && E(e.buffered.end(e.buffered.length - 1));
32
+ }, q = () => {
33
+ J(e.error), d(!1), c.current.onError?.(e.error);
34
+ }, S = () => {
35
+ b(!0), c.current.onEnterPictureInPicture?.();
36
+ }, V = () => {
37
+ b(!1), c.current.onLeavePictureInPicture?.();
38
+ };
39
+ return e.addEventListener("play", t), e.addEventListener("pause", s), e.addEventListener("ended", k), e.addEventListener("timeupdate", C), e.addEventListener("durationchange", f), e.addEventListener("loadedmetadata", f), e.addEventListener("volumechange", F), e.addEventListener("ratechange", T), e.addEventListener("waiting", I), e.addEventListener("playing", x), e.addEventListener("canplay", M), e.addEventListener("progress", w), e.addEventListener("error", q), e.addEventListener("enterpictureinpicture", S), e.addEventListener("leavepictureinpicture", V), Number.isFinite(e.duration) && e.duration > 0 && P(e.duration), e.currentTime > 0 && y(e.currentTime), (e.volume !== 1 || e.muted) && (g(e.volume), p(e.muted)), e.playbackRate !== 1 && h(e.playbackRate), e.paused || l(!0), e.readyState >= 3 && R(!0), e.buffered.length > 0 && E(e.buffered.end(e.buffered.length - 1)), () => {
40
+ e.removeEventListener("play", t), e.removeEventListener("pause", s), e.removeEventListener("ended", k), e.removeEventListener("timeupdate", C), e.removeEventListener("durationchange", f), e.removeEventListener("loadedmetadata", f), e.removeEventListener("volumechange", F), e.removeEventListener("ratechange", T), e.removeEventListener("waiting", I), e.removeEventListener("playing", x), e.removeEventListener("canplay", M), e.removeEventListener("progress", w), e.removeEventListener("error", q), e.removeEventListener("enterpictureinpicture", S), e.removeEventListener("leavepictureinpicture", V);
41
+ };
42
+ }, []), i(() => {
43
+ if (typeof document > "u") return;
44
+ const e = () => {
45
+ const t = document.fullscreenElement === o.current || document.fullscreenElement === n.current;
46
+ O(t), c.current.onFullscreenChange?.(t);
47
+ };
48
+ return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
49
+ }, []), i(() => {
50
+ if (r.playing === void 0) return;
51
+ const e = n.current;
52
+ e && (r.playing && e.paused ? e.play().catch(() => {
53
+ }) : !r.playing && !e.paused && e.pause());
54
+ }, [r.playing]), i(() => {
55
+ if (r.currentTime === void 0) return;
56
+ const e = n.current;
57
+ e && Math.abs(e.currentTime - r.currentTime) > 0.5 && (e.currentTime = r.currentTime);
58
+ }, [r.currentTime]), i(() => {
59
+ if (r.volume === void 0) return;
60
+ const e = n.current;
61
+ e && Math.abs(e.volume - r.volume) > 0.01 && (e.volume = Math.max(0, Math.min(1, r.volume)));
62
+ }, [r.volume]), i(() => {
63
+ if (r.playbackRate === void 0) return;
64
+ const e = n.current;
65
+ e && e.playbackRate !== r.playbackRate && (e.playbackRate = r.playbackRate);
66
+ }, [r.playbackRate]);
67
+ const ee = u(async () => {
68
+ const e = n.current;
69
+ if (e)
70
+ try {
71
+ await e.play();
72
+ } catch {
73
+ }
74
+ }, []), te = u(() => {
75
+ n.current?.pause();
76
+ }, []), ne = u(() => {
77
+ const e = n.current;
78
+ e && (e.paused ? e.play().catch(() => {
79
+ }) : e.pause());
80
+ }, []), re = u((e) => {
81
+ const t = n.current;
82
+ if (!t) return;
83
+ const s = Number.isFinite(t.duration) ? t.duration : 1 / 0;
84
+ t.currentTime = Math.max(0, Math.min(e, s));
85
+ }, []), ue = u((e) => {
86
+ const t = n.current;
87
+ if (!t) return;
88
+ const s = Number.isFinite(t.duration) ? t.duration : 1 / 0;
89
+ t.currentTime = Math.max(0, Math.min(t.currentTime + e, s));
90
+ }, []), ae = u((e) => {
91
+ const t = n.current;
92
+ t && (t.volume = Math.max(0, Math.min(1, e)), e > 0 && t.muted && (t.muted = !1));
93
+ }, []), ce = u(() => {
94
+ n.current && (n.current.muted = !0);
95
+ }, []), ie = u(() => {
96
+ n.current && (n.current.muted = !1);
97
+ }, []), se = u(() => {
98
+ const e = n.current;
99
+ e && (e.muted = !e.muted);
100
+ }, []), oe = u((e) => {
101
+ n.current && (n.current.playbackRate = e);
102
+ }, []), le = u(async () => {
103
+ const e = o.current;
104
+ e && e.requestFullscreen && await e.requestFullscreen();
105
+ }, []), de = u(async () => {
106
+ typeof document < "u" && document.fullscreenElement && await document.exitFullscreen();
107
+ }, []), fe = u(async () => {
108
+ if (typeof document < "u" && document.fullscreenElement)
109
+ await document.exitFullscreen();
110
+ else {
111
+ const e = o.current;
112
+ e?.requestFullscreen && await e.requestFullscreen();
113
+ }
114
+ }, []), me = u(async () => {
115
+ const e = n.current;
116
+ e?.requestPictureInPicture && await e.requestPictureInPicture();
117
+ }, []), ve = u(async () => {
118
+ if (typeof document > "u") return;
119
+ const e = document;
120
+ e.pictureInPictureElement && e.exitPictureInPicture && await e.exitPictureInPicture();
121
+ }, []), ye = u(async () => {
122
+ if (typeof document > "u") return;
123
+ const e = document;
124
+ if (e.pictureInPictureElement && e.exitPictureInPicture)
125
+ await e.exitPictureInPicture();
126
+ else {
127
+ const t = n.current;
128
+ t?.requestPictureInPicture && await t.requestPictureInPicture();
129
+ }
130
+ }, []);
131
+ return {
132
+ videoRef: n,
133
+ containerRef: o,
134
+ playing: v,
135
+ paused: !v,
136
+ ended: A,
137
+ currentTime: N,
138
+ duration: B,
139
+ buffered: U,
140
+ volume: W,
141
+ muted: j,
142
+ playbackRate: z,
143
+ fullscreen: K,
144
+ pip: Q,
145
+ isLoading: G,
146
+ error: H,
147
+ canPlay: X,
148
+ canFullscreen: Y,
149
+ canPiP: _,
150
+ play: ee,
151
+ pause: te,
152
+ toggle: ne,
153
+ seek: re,
154
+ seekBy: ue,
155
+ setVolume: ae,
156
+ mute: ce,
157
+ unmute: ie,
158
+ toggleMute: se,
159
+ setPlaybackRate: oe,
160
+ requestFullscreen: le,
161
+ exitFullscreen: de,
162
+ toggleFullscreen: fe,
163
+ requestPiP: me,
164
+ exitPiP: ve,
165
+ togglePiP: ye
166
+ };
167
+ }
168
+ export {
169
+ Ee as useVideo
170
+ };